Files
zeekay 87d088ed73 Regenerate against the current cloud document
The lock sat at 574d1f1d while the product moved on. The team surface
stopped at rooms — no messages path, no way to open one — so anything
built on this client had to reach past it with its own HTTP calls, which
is the duplication a generated client exists to prevent.
2026-09-01 02:21:56 -07:00

327 lines
21 KiB
Swift

//
// SpaceAPI.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
open class SpaceAPI {
/**
Removes an EMPTY drive and answers 204.
- parameter space: (path) Space is the space's name, from the path.
- parameter drive: (path) Drive is the drive's name, from the path.
- parameter apiConfiguration: The configuration for the http request.
- returns: Void
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteSpaceBySpaceDrivesByDrive(space: String, drive: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await deleteSpaceBySpaceDrivesByDriveWithRequestBuilder(space: space, drive: drive, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes an EMPTY drive and answers 204.
- DELETE /v1/space/{space}/drives/{drive}
- Removes an EMPTY drive and answers 204. A drive holding files is 409 rather than a cascade: deleting an org's files behind a single drive call is not a thing this surface will do silently. A drive or space the caller's org does not own is the same 404 an unknown name gives. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing deleted, and the debit lands only once the drive is gone.
- Bearer Token:
- type: http
- name: bearer
- parameter space: (path) Space is the space's name, from the path.
- parameter drive: (path) Drive is the drive's name, from the path.
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func deleteSpaceBySpaceDrivesByDriveWithRequestBuilder(space: String, drive: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/space/{space}/drives/{drive}"
let spacePreEscape = "\(APIHelper.mapValueToPathItem(space))"
let spacePostEscape = spacePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{space}", with: spacePostEscape, options: .literal, range: nil)
let drivePreEscape = "\(APIHelper.mapValueToPathItem(drive))"
let drivePostEscape = drivePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{drive}", with: drivePostEscape, options: .literal, range: nil)
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Lists a space's drives.
- parameter space: (path) Space is the space&#39;s name, from the path.
- parameter apiConfiguration: The configuration for the http request.
- returns: DriveList
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getSpaceBySpaceDrives(space: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> DriveList {
return try await getSpaceBySpaceDrivesWithRequestBuilder(space: space, apiConfiguration: apiConfiguration).execute().body
}
/**
Lists a space's drives.
- GET /v1/space/{space}/drives
- Lists a space's drives. Listing the drives IS listing the space's root folder, because a drive is the first segment of a key and nothing else — so the two can never disagree the way a drives table and the keys under it would. A space the caller's org does not own is the same 404 an unknown name gives. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing read, and the debit lands only once the listing has succeeded.
- Bearer Token:
- type: http
- name: bearer
- parameter space: (path) Space is the space&#39;s name, from the path.
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<DriveList>
*/
open class func getSpaceBySpaceDrivesWithRequestBuilder(space: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<DriveList> {
var localVariablePath = "/v1/space/{space}/drives"
let spacePreEscape = "\(APIHelper.mapValueToPathItem(space))"
let spacePostEscape = spacePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{space}", with: spacePostEscape, options: .literal, range: nil)
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<DriveList>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Lists one folder level of a drive.
- parameter space: (path) Space is the space to list in, from the path.
- parameter drive: (path) Drive is the drive to list, from the path.
- parameter folder: (query) (optional)
- parameter recursive: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: FileList
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getSpaceBySpaceDrivesByDriveFiles(space: String, drive: String, folder: String? = nil, recursive: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> FileList {
return try await getSpaceBySpaceDrivesByDriveFilesWithRequestBuilder(space: space, drive: drive, folder: folder, recursive: recursive, apiConfiguration: apiConfiguration).execute().body
}
/**
Lists one folder level of a drive.
- GET /v1/space/{space}/drives/{drive}/files
- Lists one folder level of a drive. Folder-style by default: sub-folders come back as folder entries, which is the file-manager view. `?recursive=true` lists every file flat under the folder instead. Names are RELATIVE to `?folder=`, and the listing is bounded so a huge drive cannot exhaust memory — Total is what came back, not what the drive holds. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing read, and the debit lands only once the listing has succeeded.
- Bearer Token:
- type: http
- name: bearer
- parameter space: (path) Space is the space to list in, from the path.
- parameter drive: (path) Drive is the drive to list, from the path.
- parameter folder: (query) (optional)
- parameter recursive: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<FileList>
*/
open class func getSpaceBySpaceDrivesByDriveFilesWithRequestBuilder(space: String, drive: String, folder: String? = nil, recursive: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<FileList> {
var localVariablePath = "/v1/space/{space}/drives/{drive}/files"
let spacePreEscape = "\(APIHelper.mapValueToPathItem(space))"
let spacePostEscape = spacePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{space}", with: spacePostEscape, options: .literal, range: nil)
let drivePreEscape = "\(APIHelper.mapValueToPathItem(drive))"
let drivePostEscape = drivePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{drive}", with: drivePostEscape, options: .literal, range: nil)
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"folder": (wrappedValue: folder?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"recursive": (wrappedValue: recursive?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<FileList>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Health reports whether this deployment can serve spaces, drives and files.
- parameter apiConfiguration: The configuration for the http request.
- returns: SpaceHealth
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getSpaceHealth(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> SpaceHealth {
return try await getSpaceHealthWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Health reports whether this deployment can serve spaces, drives and files.
- GET /v1/space/health
- Health reports whether this deployment can serve spaces, drives and files. It is a REAL probe rather than a constant: 200 when object-store credentials are present, so the store is reachable in principle, and 503 with the reason when they are not. It is deliberately NOT gated — liveness has to be probe-able without a token — so it is the one operation here that names no space and bills nothing.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<SpaceHealth>
*/
open class func getSpaceHealthWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<SpaceHealth> {
let localVariablePath = "/v1/space/health"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<SpaceHealth>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Lists the caller org's own spaces.
- parameter apiConfiguration: The configuration for the http request.
- returns: SpaceList
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getSpaceSpaces(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> SpaceList {
return try await getSpaceSpacesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Lists the caller org's own spaces.
- GET /v1/space/spaces
- Lists the caller org's own spaces. Only the caller's: every space is physically named under a per-org prefix and the listing strips that prefix, so another org's spaces are not in the answer at all. Another org's space is not refused but INVISIBLE, so this cannot be used to learn that a name is taken elsewhere. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing done, and the debit lands only once the work has succeeded.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<SpaceList>
*/
open class func getSpaceSpacesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<SpaceList> {
let localVariablePath = "/v1/space/spaces"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<SpaceList>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Makes a new drive in a space and answers 201 with it.
- parameter space: (path) Space is the space to create the drive in, from the path. It carries NO &#x60;url:\&quot;-\&quot;&#x60;, unlike the field below it, and the difference is the whole reason both tags are written out: zip&#39;s binder skips a field tagged \&quot;-\&quot; for EVERY URL source, path params included, so a path-borne value that carried it would arrive empty and the create would refuse a perfectly good address.
- parameter driveIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: DriveItem
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postSpaceBySpaceDrives(space: String, driveIn: DriveIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> DriveItem {
return try await postSpaceBySpaceDrivesWithRequestBuilder(space: space, driveIn: driveIn, apiConfiguration: apiConfiguration).execute().body
}
/**
Makes a new drive in a space and answers 201 with it.
- POST /v1/space/{space}/drives
- Makes a new drive in a space and answers 201 with it. A drive is a PREFIX and not a bucket, so making one writes a zero-byte marker at \"<name>/\" — which is what makes an empty drive visible to a listing that has no other key to find. A name already taken in the space is 409. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing created, and the debit lands only once the drive exists.
- Bearer Token:
- type: http
- name: bearer
- parameter space: (path) Space is the space to create the drive in, from the path. It carries NO &#x60;url:\&quot;-\&quot;&#x60;, unlike the field below it, and the difference is the whole reason both tags are written out: zip&#39;s binder skips a field tagged \&quot;-\&quot; for EVERY URL source, path params included, so a path-borne value that carried it would arrive empty and the create would refuse a perfectly good address.
- parameter driveIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<DriveItem>
*/
open class func postSpaceBySpaceDrivesWithRequestBuilder(space: String, driveIn: DriveIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<DriveItem> {
var localVariablePath = "/v1/space/{space}/drives"
let spacePreEscape = "\(APIHelper.mapValueToPathItem(space))"
let spacePostEscape = spacePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{space}", with: spacePostEscape, options: .literal, range: nil)
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: driveIn, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<DriveItem>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Makes a new space for the caller's org and answers 201 with it.
- parameter spaceIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: SpaceItem
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postSpaceSpaces(spaceIn: SpaceIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> SpaceItem {
return try await postSpaceSpacesWithRequestBuilder(spaceIn: spaceIn, apiConfiguration: apiConfiguration).execute().body
}
/**
Makes a new space for the caller's org and answers 201 with it.
- POST /v1/space/spaces
- Makes a new space for the caller's org and answers 201 with it. The one bucket a space's files live in is derived from the caller's VALIDATED org, so an org can only ever create inside its own namespace and no request field can redirect that. A name already taken in the org is 409. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing created, and the debit lands only once the space exists.
- Bearer Token:
- type: http
- name: bearer
- parameter spaceIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<SpaceItem>
*/
open class func postSpaceSpacesWithRequestBuilder(spaceIn: SpaceIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<SpaceItem> {
let localVariablePath = "/v1/space/spaces"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: spaceIn, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<SpaceItem>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
}