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

12468 lines
720 KiB
Swift

//
// AiAPI.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
open class AiAPI {
/**
Tools reports what THIS PROCESS's MCP server carries: how many tools its own registry projects, optionally their names, and which subsystems this process composed.
- parameter names: (query) Names asks for this process's tool NAMES and not only how many there are. Off by default: a list of names is a page, and the question this op exists to answer (\"is the MCP server up and does it have anything behind it\") is answered by the count. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: AiMCPSurface
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func aiMCPTools(names: Bool? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiMCPSurface {
return try await aiMCPToolsWithRequestBuilder(names: names, apiConfiguration: apiConfiguration).execute().body
}
/**
Tools reports what THIS PROCESS's MCP server carries: how many tools its own registry projects, optionally their names, and which subsystems this process composed.
- GET /v1/ai/mcp/tools
- Tools reports what THIS PROCESS's MCP server carries: how many tools its own registry projects, optionally their names, and which subsystems this process composed. It is the answer to \"is this MCP server up and does it have anything behind it\" — a question a status code cannot answer, since an empty server and a full one are both 200. What the FLEET's server carries is the fleet server's own answer: POST /v1/mcp, tools/list, which asks every subsystem and names the ones that did not reply.
- Bearer Token:
- type: http
- name: bearer
- parameter names: (query) Names asks for this process's tool NAMES and not only how many there are. Off by default: a list of names is a page, and the question this op exists to answer (\"is the MCP server up and does it have anything behind it\") is answered by the count. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiMCPSurface>
*/
open class func aiMCPToolsWithRequestBuilder(names: Bool? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiMCPSurface> {
let localVariablePath = "/v1/ai/mcp/tools"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"names": (wrappedValue: names?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<AiMCPSurface>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a article
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiArticles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiArticlesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiArticles200Response {
return try await deleteAiArticlesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a article
- DELETE /v1/ai/articles/{owner}/{name}
- Delete one article.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiArticles200Response>
*/
open class func deleteAiArticlesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiArticles200Response> {
var localVariablePath = "/v1/ai/articles/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiArticles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a asset
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiAssets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiAssetsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiAssets200Response {
return try await deleteAiAssetsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a asset
- DELETE /v1/ai/assets/{owner}/{name}
- Delete one asset.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiAssets200Response>
*/
open class func deleteAiAssetsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiAssets200Response> {
var localVariablePath = "/v1/ai/assets/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiAssets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a chat
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiChats200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiChatsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiChats200Response {
return try await deleteAiChatsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a chat
- DELETE /v1/ai/chats/{owner}/{name}
- Delete one chat.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiChats200Response>
*/
open class func deleteAiChatsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiChats200Response> {
var localVariablePath = "/v1/ai/chats/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiChats200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Disconnects a third-party AI account: it deactivates the org's row so completion resolution falls back to the global Hanzo account (no BYO), and best-effort tombstones the sealed secret.
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiConnectionsByProvider(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiConnections200Response {
return try await deleteAiConnectionsByProviderWithRequestBuilder(provider: provider, apiConfiguration: apiConfiguration).execute().body
}
/**
Disconnects a third-party AI account: it deactivates the org's row so completion resolution falls back to the global Hanzo account (no BYO), and best-effort tombstones the sealed secret.
- DELETE /v1/ai/connections/{provider}
- Disconnects a third-party AI account: it deactivates the org's row so completion resolution falls back to the global Hanzo account (no BYO), and best-effort tombstones the sealed secret. Idempotent.
- Bearer Token:
- type: http
- name: bearer
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiConnections200Response>
*/
open class func deleteAiConnectionsByProviderWithRequestBuilder(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiConnections200Response> {
var localVariablePath = "/v1/ai/connections/{provider}"
let providerPreEscape = "\(APIHelper.mapValueToPathItem(provider))"
let providerPostEscape = providerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{provider}", with: providerPostEscape, 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<PostAiConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a application
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiDeployments200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiDeploymentsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiDeployments200Response {
return try await deleteAiDeploymentsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a application
- DELETE /v1/ai/deployments/{owner}/{name}
- Delete one application.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiDeployments200Response>
*/
open class func deleteAiDeploymentsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiDeployments200Response> {
var localVariablePath = "/v1/ai/deployments/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiDeployments200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a file
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiFilesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFiles200Response {
return try await deleteAiFilesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a file
- DELETE /v1/ai/files/{owner}/{name}
- Delete one file.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFiles200Response>
*/
open class func deleteAiFilesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFiles200Response> {
var localVariablePath = "/v1/ai/files/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a form
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiForms200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiFormsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiForms200Response {
return try await deleteAiFormsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a form
- DELETE /v1/ai/forms/{owner}/{name}
- Delete one form.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiForms200Response>
*/
open class func deleteAiFormsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiForms200Response> {
var localVariablePath = "/v1/ai/forms/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiForms200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a graph
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiGraphs200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiGraphsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiGraphs200Response {
return try await deleteAiGraphsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a graph
- DELETE /v1/ai/graphs/{owner}/{name}
- Delete one graph.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiGraphs200Response>
*/
open class func deleteAiGraphsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiGraphs200Response> {
var localVariablePath = "/v1/ai/graphs/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiGraphs200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a message
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiMessages200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiMessagesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiMessages200Response {
return try await deleteAiMessagesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a message
- DELETE /v1/ai/messages/{owner}/{name}
- Delete one message.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiMessages200Response>
*/
open class func deleteAiMessagesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiMessages200Response> {
var localVariablePath = "/v1/ai/messages/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiMessages200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Welcome (message)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiMessagesWelcome(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await deleteAiMessagesWelcomeWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Welcome (message)
- DELETE /v1/ai/messages/welcome
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func deleteAiMessagesWelcomeWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/messages/welcome"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a node
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiNodes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiNodesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiNodes200Response {
return try await deleteAiNodesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a node
- DELETE /v1/ai/nodes/{owner}/{name}
- Delete one node.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiNodes200Response>
*/
open class func deleteAiNodesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiNodes200Response> {
var localVariablePath = "/v1/ai/nodes/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiNodes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiOrgSettings(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await deleteAiOrgSettingsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- DELETE /v1/ai/org/settings
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func deleteAiOrgSettingsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiOrgSettingsList(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await deleteAiOrgSettingsListWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- DELETE /v1/ai/org/settings/list
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func deleteAiOrgSettingsListWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings/list"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a provider
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiProviders200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiProvidersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiProviders200Response {
return try await deleteAiProvidersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a provider
- DELETE /v1/ai/providers/{owner}/{name}
- Delete one provider.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiProviders200Response>
*/
open class func deleteAiProvidersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiProviders200Response> {
var localVariablePath = "/v1/ai/providers/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiProviders200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a record
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRecords200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRecordsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRecords200Response {
return try await deleteAiRecordsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a record
- DELETE /v1/ai/records/{owner}/{name}
- Delete one record.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRecords200Response>
*/
open class func deleteAiRecordsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRecords200Response> {
var localVariablePath = "/v1/ai/records/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRecords200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a connection
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRemoteConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRemoteConnectionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRemoteConnections200Response {
return try await deleteAiRemoteConnectionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a connection
- DELETE /v1/ai/remote-connections/{owner}/{name}
- Delete one connection.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRemoteConnections200Response>
*/
open class func deleteAiRemoteConnectionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRemoteConnections200Response> {
var localVariablePath = "/v1/ai/remote-connections/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRemoteConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRouterArtifactMeta(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await deleteAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- DELETE /v1/ai/router/artifact-meta
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func deleteAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/artifact-meta"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Router Data
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRouterData(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await deleteAiRouterDataWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Router Data
- DELETE /v1/ai/router/data
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func deleteAiRouterDataWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/router/data"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRouterDefaults(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await deleteAiRouterDefaultsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- DELETE /v1/ai/router/defaults
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func deleteAiRouterDefaultsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/defaults"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRouterLedger(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await deleteAiRouterLedgerWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- DELETE /v1/ai/router/ledger
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func deleteAiRouterLedgerWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/ledger"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRouterPolicy(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await deleteAiRouterPolicyWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- DELETE /v1/ai/router/policy
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func deleteAiRouterPolicyWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/policy"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRouterRewards(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await deleteAiRouterRewardsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- DELETE /v1/ai/router/rewards
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func deleteAiRouterRewardsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/rewards"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a model-route
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRoutes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiRoutesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRoutes200Response {
return try await deleteAiRoutesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a model-route
- DELETE /v1/ai/routes/{owner}/{name}
- Delete one model-route.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRoutes200Response>
*/
open class func deleteAiRoutesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRoutes200Response> {
var localVariablePath = "/v1/ai/routes/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRoutes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a scale
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScales200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiScalesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScales200Response {
return try await deleteAiScalesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a scale
- DELETE /v1/ai/scales/{owner}/{name}
- Delete one scale.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScales200Response>
*/
open class func deleteAiScalesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScales200Response> {
var localVariablePath = "/v1/ai/scales/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiScales200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a scan
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScans200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiScansByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScans200Response {
return try await deleteAiScansByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a scan
- DELETE /v1/ai/scans/{owner}/{name}
- Delete one scan.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScans200Response>
*/
open class func deleteAiScansByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScans200Response> {
var localVariablePath = "/v1/ai/scans/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiScans200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a session
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiSigninSessions200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiSigninSessionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiSigninSessions200Response {
return try await deleteAiSigninSessionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a session
- DELETE /v1/ai/signin-sessions/{owner}/{name}
- Delete one session.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiSigninSessions200Response>
*/
open class func deleteAiSigninSessionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiSigninSessions200Response> {
var localVariablePath = "/v1/ai/signin-sessions/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiSigninSessions200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a store
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiStores200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiStoresByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiStores200Response {
return try await deleteAiStoresByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a store
- DELETE /v1/ai/stores/{owner}/{name}
- Delete one store.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiStores200Response>
*/
open class func deleteAiStoresByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiStores200Response> {
var localVariablePath = "/v1/ai/stores/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiStores200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a task
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTasks200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiTasksByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTasks200Response {
return try await deleteAiTasksByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a task
- DELETE /v1/ai/tasks/{owner}/{name}
- Delete one task.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTasks200Response>
*/
open class func deleteAiTasksByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTasks200Response> {
var localVariablePath = "/v1/ai/tasks/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTasks200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a template
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTemplates200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiTemplatesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTemplates200Response {
return try await deleteAiTemplatesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a template
- DELETE /v1/ai/templates/{owner}/{name}
- Delete one template.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTemplates200Response>
*/
open class func deleteAiTemplatesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTemplates200Response> {
var localVariablePath = "/v1/ai/templates/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTemplates200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a tree-file
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTreeFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiTreeFilesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTreeFiles200Response {
return try await deleteAiTreeFilesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a tree-file
- DELETE /v1/ai/tree-files/{owner}/{name}
- Delete one tree-file.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTreeFiles200Response>
*/
open class func deleteAiTreeFilesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTreeFiles200Response> {
var localVariablePath = "/v1/ai/tree-files/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTreeFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
All (vector)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiVectorsAll(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await deleteAiVectorsAllWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
All (vector)
- DELETE /v1/ai/vectors/all
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func deleteAiVectorsAllWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/vectors/all"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a vector
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVectors200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiVectorsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVectors200Response {
return try await deleteAiVectorsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a vector
- DELETE /v1/ai/vectors/{owner}/{name}
- Delete one vector.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVectors200Response>
*/
open class func deleteAiVectorsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVectors200Response> {
var localVariablePath = "/v1/ai/vectors/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiVectors200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a video
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVideos200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiVideosByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVideos200Response {
return try await deleteAiVideosByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a video
- DELETE /v1/ai/videos/{owner}/{name}
- Delete one video.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVideos200Response>
*/
open class func deleteAiVideosByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVideos200Response> {
var localVariablePath = "/v1/ai/videos/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiVideos200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete a workflow
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiWorkflows200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteAiWorkflowsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiWorkflows200Response {
return try await deleteAiWorkflowsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Delete a workflow
- DELETE /v1/ai/workflows/{owner}/{name}
- Delete one workflow.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiWorkflows200Response>
*/
open class func deleteAiWorkflowsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiWorkflows200Response> {
var localVariablePath = "/v1/ai/workflows/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiWorkflows200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Account
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiAccount(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiAccountWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Account
- GET /v1/ai/account
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiAccountWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/account"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List activities
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiActivities200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiActivities(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiActivities200Response {
return try await getAiActivitiesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List activities
- GET /v1/ai/activities
- List the caller's activities.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiActivities200Response>
*/
open class func getAiActivitiesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiActivities200Response> {
let localVariablePath = "/v1/ai/activities"
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<GetAiActivities200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Answer
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiAnswer(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiAnswerWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Answer
- GET /v1/ai/answer
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiAnswerWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/answer"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List articles
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiArticles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiArticles(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiArticles200Response {
return try await getAiArticlesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List articles
- GET /v1/ai/articles
- List the caller's articles.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiArticles200Response>
*/
open class func getAiArticlesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiArticles200Response> {
let localVariablePath = "/v1/ai/articles"
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<GetAiArticles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a article
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiArticles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiArticlesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiArticles200Response {
return try await getAiArticlesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a article
- GET /v1/ai/articles/{owner}/{name}
- Read one article by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiArticles200Response>
*/
open class func getAiArticlesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiArticles200Response> {
var localVariablePath = "/v1/ai/articles/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiArticles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List articles across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiArticles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiArticlesGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiArticles200Response {
return try await getAiArticlesGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List articles across tenants
- GET /v1/ai/articles/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiArticles200Response>
*/
open class func getAiArticlesGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiArticles200Response> {
let localVariablePath = "/v1/ai/articles/global"
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<GetAiArticles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List assets
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiAssets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiAssets(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiAssets200Response {
return try await getAiAssetsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List assets
- GET /v1/ai/assets
- List the caller's assets.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiAssets200Response>
*/
open class func getAiAssetsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiAssets200Response> {
let localVariablePath = "/v1/ai/assets"
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<GetAiAssets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a asset
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiAssets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiAssetsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiAssets200Response {
return try await getAiAssetsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a asset
- GET /v1/ai/assets/{owner}/{name}
- Read one asset by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiAssets200Response>
*/
open class func getAiAssetsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiAssets200Response> {
var localVariablePath = "/v1/ai/assets/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiAssets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List chats
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiChats200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiChats(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiChats200Response {
return try await getAiChatsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List chats
- GET /v1/ai/chats
- List the caller's chats.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiChats200Response>
*/
open class func getAiChatsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiChats200Response> {
let localVariablePath = "/v1/ai/chats"
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<GetAiChats200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a chat
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiChats200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiChatsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiChats200Response {
return try await getAiChatsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a chat
- GET /v1/ai/chats/{owner}/{name}
- Read one chat by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiChats200Response>
*/
open class func getAiChatsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiChats200Response> {
var localVariablePath = "/v1/ai/chats/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiChats200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List chats across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiChats200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiChatsGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiChats200Response {
return try await getAiChatsGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List chats across tenants
- GET /v1/ai/chats/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiChats200Response>
*/
open class func getAiChatsGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiChats200Response> {
let localVariablePath = "/v1/ai/chats/global"
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<GetAiChats200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Lists the org's connectable AI accounts and whether each is currently connected.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiConnections(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiConnections200Response {
return try await getAiConnectionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Lists the org's connectable AI accounts and whether each is currently connected.
- GET /v1/ai/connections
- Lists the org's connectable AI accounts and whether each is currently connected. Never returns a key or a kms:// reference.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiConnections200Response>
*/
open class func getAiConnectionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiConnections200Response> {
let localVariablePath = "/v1/ai/connections"
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<GetAiConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Begins an OAuth connection for the caller's org: it binds the org into a signed state and sends the caller to the provider's authorize URL.
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiConnectionsByProviderAuthorize200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiConnectionsByProviderAuthorize(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiConnectionsByProviderAuthorize200Response {
return try await getAiConnectionsByProviderAuthorizeWithRequestBuilder(provider: provider, apiConfiguration: apiConfiguration).execute().body
}
/**
Begins an OAuth connection for the caller's org: it binds the org into a signed state and sends the caller to the provider's authorize URL.
- GET /v1/ai/connections/{provider}/authorize
- Begins an OAuth connection for the caller's org: it binds the org into a signed state and sends the caller to the provider's authorize URL. By default it 302-redirects (a top-level browser \"connect your login\" click); a SPA/BFF that needs to drive the redirect itself passes ?format=json and gets {authorizeUrl} in the standard envelope. The org is the VERIFIED principal, so only the caller's own connection can result.
- Bearer Token:
- type: http
- name: bearer
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiConnectionsByProviderAuthorize200Response>
*/
open class func getAiConnectionsByProviderAuthorizeWithRequestBuilder(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiConnectionsByProviderAuthorize200Response> {
var localVariablePath = "/v1/ai/connections/{provider}/authorize"
let providerPreEscape = "\(APIHelper.mapValueToPathItem(provider))"
let providerPostEscape = providerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{provider}", with: providerPostEscape, 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<GetAiConnectionsByProviderAuthorize200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Completes OAuth: the org is recovered from the SIGNED state (not a header), the code is exchanged for a token, the token is SEALED into KMS (never the row/logs) through the same path as a BYOK key, and the org's provider row is upserted to \"connected\".
- parameter provider: (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 getAiConnectionsByProviderCallback(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getAiConnectionsByProviderCallbackWithRequestBuilder(provider: provider, apiConfiguration: apiConfiguration).execute().body
}
/**
Completes OAuth: the org is recovered from the SIGNED state (not a header), the code is exchanged for a token, the token is SEALED into KMS (never the row/logs) through the same path as a BYOK key, and the org's provider row is upserted to \"connected\".
- GET /v1/ai/connections/{provider}/callback
- Completes OAuth: the org is recovered from the SIGNED state (not a header), the code is exchanged for a token, the token is SEALED into KMS (never the row/logs) through the same path as a BYOK key, and the org's provider row is upserted to \"connected\". The browser is then redirected back to the console with ?ai_connected=<provider> (or ?ai_connect_error=<provider> on failure). Because the org comes from the state THIS server signed, an attacker cannot land their token in a victim org — which is why this endpoint is state-authenticated rather than credential-gated.
- Bearer Token:
- type: http
- name: bearer
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getAiConnectionsByProviderCallbackWithRequestBuilder(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/ai/connections/{provider}/callback"
let providerPreEscape = "\(APIHelper.mapValueToPathItem(provider))"
let providerPostEscape = providerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{provider}", with: providerPostEscape, 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: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Imports the caller org's usage for a connected third-party account.
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiConnectionsByProviderUsage200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiConnectionsByProviderUsage(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiConnectionsByProviderUsage200Response {
return try await getAiConnectionsByProviderUsageWithRequestBuilder(provider: provider, apiConfiguration: apiConfiguration).execute().body
}
/**
Imports the caller org's usage for a connected third-party account.
- GET /v1/ai/connections/{provider}/usage
- Imports the caller org's usage for a connected third-party account. The org is resolved from the VERIFIED principal (requireConnectionOrg), so a tenant reads only its own connection. The key is unsealed SERVER-SIDE and never returned. An unconnected account, a missing importer, or a scope-denied provider all return a 200 ProviderUsage with connected/available flags + a human note — the UI's honest-empty states — never a fabricated figure.
- Bearer Token:
- type: http
- name: bearer
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiConnectionsByProviderUsage200Response>
*/
open class func getAiConnectionsByProviderUsageWithRequestBuilder(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiConnectionsByProviderUsage200Response> {
var localVariablePath = "/v1/ai/connections/{provider}/usage"
let providerPreEscape = "\(APIHelper.mapValueToPathItem(provider))"
let providerPostEscape = providerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{provider}", with: providerPostEscape, 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<GetAiConnectionsByProviderUsage200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Dashboards Agents
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiDashboardsAgents(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiDashboardsAgentsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Dashboards Agents
- GET /v1/ai/dashboards/agents
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiDashboardsAgentsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/dashboards/agents"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Dashboards Vm
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiDashboardsVm(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiDashboardsVmWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Dashboards Vm
- GET /v1/ai/dashboards/vm
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiDashboardsVmWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/dashboards/vm"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List deployments
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiDeployments200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiDeployments(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiDeployments200Response {
return try await getAiDeploymentsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List deployments
- GET /v1/ai/deployments
- List the caller's deployments.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiDeployments200Response>
*/
open class func getAiDeploymentsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiDeployments200Response> {
let localVariablePath = "/v1/ai/deployments"
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<GetAiDeployments200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a application
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiDeployments200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiDeploymentsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiDeployments200Response {
return try await getAiDeploymentsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a application
- GET /v1/ai/deployments/{owner}/{name}
- Read one application by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiDeployments200Response>
*/
open class func getAiDeploymentsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiDeployments200Response> {
var localVariablePath = "/v1/ai/deployments/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiDeployments200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List files
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFiles(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiFiles200Response {
return try await getAiFilesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List files
- GET /v1/ai/files
- List the caller's files.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiFiles200Response>
*/
open class func getAiFilesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiFiles200Response> {
let localVariablePath = "/v1/ai/files"
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<GetAiFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Active (file)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFilesActive(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiFilesActiveWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Active (file)
- GET /v1/ai/files/active
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiFilesActiveWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/files/active"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a file
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFilesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFiles200Response {
return try await getAiFilesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a file
- GET /v1/ai/files/{owner}/{name}
- Read one file by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFiles200Response>
*/
open class func getAiFilesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFiles200Response> {
var localVariablePath = "/v1/ai/files/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List files across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFilesGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiFiles200Response {
return try await getAiFilesGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List files across tenants
- GET /v1/ai/files/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiFiles200Response>
*/
open class func getAiFilesGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiFiles200Response> {
let localVariablePath = "/v1/ai/files/global"
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<GetAiFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Proxies a HuggingFace dataset search (dataset picker).
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiFinetuneHfDatasets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFinetuneHfDatasets(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiFinetuneHfDatasets200Response {
return try await getAiFinetuneHfDatasetsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Proxies a HuggingFace dataset search (dataset picker).
- GET /v1/ai/finetune/hf/datasets
- Proxies a HuggingFace dataset search (dataset picker).
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiFinetuneHfDatasets200Response>
*/
open class func getAiFinetuneHfDatasetsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiFinetuneHfDatasets200Response> {
let localVariablePath = "/v1/ai/finetune/hf/datasets"
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<GetAiFinetuneHfDatasets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Proxies a HuggingFace model search (base-model picker).
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiFinetuneHfModels200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFinetuneHfModels(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiFinetuneHfModels200Response {
return try await getAiFinetuneHfModelsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Proxies a HuggingFace model search (base-model picker).
- GET /v1/ai/finetune/hf/models
- Proxies a HuggingFace model search (base-model picker).
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiFinetuneHfModels200Response>
*/
open class func getAiFinetuneHfModelsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiFinetuneHfModels200Response> {
let localVariablePath = "/v1/ai/finetune/hf/models"
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<GetAiFinetuneHfModels200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns a repo's detail (files, gated/private state).
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiFinetuneHfRepo200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFinetuneHfRepo(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiFinetuneHfRepo200Response {
return try await getAiFinetuneHfRepoWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns a repo's detail (files, gated/private state).
- GET /v1/ai/finetune/hf/repo
- Returns a repo's detail (files, gated/private state). ?id=&kind=model|dataset
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiFinetuneHfRepo200Response>
*/
open class func getAiFinetuneHfRepoWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiFinetuneHfRepo200Response> {
let localVariablePath = "/v1/ai/finetune/hf/repo"
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<GetAiFinetuneHfRepo200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one job with refreshed live status.
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFinetuneCancel200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFinetuneJob(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFinetuneCancel200Response {
return try await getAiFinetuneJobWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one job with refreshed live status.
- GET /v1/ai/finetune/job
- Returns one job with refreshed live status. ?id=owner/name or ?name=
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFinetuneCancel200Response>
*/
open class func getAiFinetuneJobWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFinetuneCancel200Response> {
let localVariablePath = "/v1/ai/finetune/job"
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<PostAiFinetuneCancel200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the org's jobs, refreshing live status for active ones.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiFinetuneJobs200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFinetuneJobs(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiFinetuneJobs200Response {
return try await getAiFinetuneJobsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the org's jobs, refreshing live status for active ones.
- GET /v1/ai/finetune/jobs
- Returns the org's jobs, refreshing live status for active ones.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiFinetuneJobs200Response>
*/
open class func getAiFinetuneJobsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiFinetuneJobs200Response> {
let localVariablePath = "/v1/ai/finetune/jobs"
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<GetAiFinetuneJobs200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the new-job catalog plus, when a selection is passed (?baseModel&method&task&preset[&datasetExamples]), the recommended config so the console can render \"Recommended\" as a one-click, ready-to-run default.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiFinetunePresets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFinetunePresets(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiFinetunePresets200Response {
return try await getAiFinetunePresetsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the new-job catalog plus, when a selection is passed (?baseModel&method&task&preset[&datasetExamples]), the recommended config so the console can render \"Recommended\" as a one-click, ready-to-run default.
- GET /v1/ai/finetune/presets
- Returns the new-job catalog plus, when a selection is passed (?baseModel&method&task&preset[&datasetExamples]), the recommended config so the console can render \"Recommended\" as a one-click, ready-to-run default.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiFinetunePresets200Response>
*/
open class func getAiFinetunePresetsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiFinetunePresets200Response> {
let localVariablePath = "/v1/ai/finetune/presets"
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<GetAiFinetunePresets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List forms
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiForms200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiForms(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiForms200Response {
return try await getAiFormsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List forms
- GET /v1/ai/forms
- List the caller's forms.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiForms200Response>
*/
open class func getAiFormsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiForms200Response> {
let localVariablePath = "/v1/ai/forms"
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<GetAiForms200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a form
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiForms200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFormsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiForms200Response {
return try await getAiFormsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a form
- GET /v1/ai/forms/{owner}/{name}
- Read one form by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiForms200Response>
*/
open class func getAiFormsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiForms200Response> {
var localVariablePath = "/v1/ai/forms/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiForms200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Data (form)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFormsData(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiFormsDataWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Data (form)
- GET /v1/ai/forms/data
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiFormsDataWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/forms/data"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List forms across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiForms200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiFormsGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiForms200Response {
return try await getAiFormsGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List forms across tenants
- GET /v1/ai/forms/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiForms200Response>
*/
open class func getAiFormsGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiForms200Response> {
let localVariablePath = "/v1/ai/forms/global"
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<GetAiForms200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List graphs
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiGraphs200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiGraphs(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiGraphs200Response {
return try await getAiGraphsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List graphs
- GET /v1/ai/graphs
- List the caller's graphs.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiGraphs200Response>
*/
open class func getAiGraphsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiGraphs200Response> {
let localVariablePath = "/v1/ai/graphs"
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<GetAiGraphs200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a graph
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiGraphs200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiGraphsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiGraphs200Response {
return try await getAiGraphsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a graph
- GET /v1/ai/graphs/{owner}/{name}
- Read one graph by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiGraphs200Response>
*/
open class func getAiGraphsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiGraphs200Response> {
var localVariablePath = "/v1/ai/graphs/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiGraphs200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List graphs across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiGraphs200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiGraphsGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiGraphs200Response {
return try await getAiGraphsGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List graphs across tenants
- GET /v1/ai/graphs/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiGraphs200Response>
*/
open class func getAiGraphsGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiGraphs200Response> {
let localVariablePath = "/v1/ai/graphs/global"
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<GetAiGraphs200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
K8s Status
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiK8sStatus(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiK8sStatusWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
K8s Status
- GET /v1/ai/k8s-status
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiK8sStatusWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/k8s-status"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List the authenticated user's stored facts
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiMemoryFacts200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiMemoryFacts(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiMemoryFacts200Response {
return try await getAiMemoryFactsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List the authenticated user's stored facts
- GET /v1/ai/memory/facts
- List the authenticated user's stored facts
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiMemoryFacts200Response>
*/
open class func getAiMemoryFactsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiMemoryFacts200Response> {
let localVariablePath = "/v1/ai/memory/facts"
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<GetAiMemoryFacts200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List the authenticated user's memories, newest first
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiMemoryFacts200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiMemoryList(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiMemoryFacts200Response {
return try await getAiMemoryListWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List the authenticated user's memories, newest first
- GET /v1/ai/memory/list
- List the authenticated user's memories, newest first
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiMemoryFacts200Response>
*/
open class func getAiMemoryListWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiMemoryFacts200Response> {
let localVariablePath = "/v1/ai/memory/list"
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<GetAiMemoryFacts200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Recall recent/relevant memories for context injection; with q it
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiMemoryFacts200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiMemoryRecall(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiMemoryFacts200Response {
return try await getAiMemoryRecallWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Recall recent/relevant memories for context injection; with q it
- GET /v1/ai/memory/recall
- Recall recent/relevant memories for context injection; with q it ranks semantically, without q it returns the most recent
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiMemoryFacts200Response>
*/
open class func getAiMemoryRecallWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiMemoryFacts200Response> {
let localVariablePath = "/v1/ai/memory/recall"
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<GetAiMemoryFacts200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Search the authenticated user's memories (semantic, text fallback)
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiMemoryFacts200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiMemorySearch(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiMemoryFacts200Response {
return try await getAiMemorySearchWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Search the authenticated user's memories (semantic, text fallback)
- GET /v1/ai/memory/search
- Search the authenticated user's memories (semantic, text fallback)
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiMemoryFacts200Response>
*/
open class func getAiMemorySearchWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiMemoryFacts200Response> {
let localVariablePath = "/v1/ai/memory/search"
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<GetAiMemoryFacts200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List messages
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiMessages200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiMessages(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiMessages200Response {
return try await getAiMessagesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List messages
- GET /v1/ai/messages
- List the caller's messages.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiMessages200Response>
*/
open class func getAiMessagesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiMessages200Response> {
let localVariablePath = "/v1/ai/messages"
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<GetAiMessages200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a message
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiMessages200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiMessagesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiMessages200Response {
return try await getAiMessagesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a message
- GET /v1/ai/messages/{owner}/{name}
- Read one message by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiMessages200Response>
*/
open class func getAiMessagesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiMessages200Response> {
var localVariablePath = "/v1/ai/messages/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiMessages200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Answer (message)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiMessagesByOwnerByNameAnswer(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiMessagesByOwnerByNameAnswerWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Answer (message)
- GET /v1/ai/messages/{owner}/{name}/answer
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiMessagesByOwnerByNameAnswerWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/messages/{owner}/{name}/answer"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List nodes
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiNodes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiNodes(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiNodes200Response {
return try await getAiNodesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List nodes
- GET /v1/ai/nodes
- List the caller's nodes.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiNodes200Response>
*/
open class func getAiNodesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiNodes200Response> {
let localVariablePath = "/v1/ai/nodes"
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<GetAiNodes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a node
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiNodes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiNodesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiNodes200Response {
return try await getAiNodesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a node
- GET /v1/ai/nodes/{owner}/{name}
- Read one node by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiNodes200Response>
*/
open class func getAiNodesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiNodes200Response> {
var localVariablePath = "/v1/ai/nodes/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiNodes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Tunnel (node)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiNodesByOwnerByNameTunnel(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiNodesByOwnerByNameTunnelWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Tunnel (node)
- GET /v1/ai/nodes/{owner}/{name}/tunnel
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiNodesByOwnerByNameTunnelWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/nodes/{owner}/{name}/tunnel"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiOrgSettings(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await getAiOrgSettingsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- GET /v1/ai/org/settings
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func getAiOrgSettingsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiOrgSettingsList(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await getAiOrgSettingsListWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- GET /v1/ai/org/settings/list
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func getAiOrgSettingsListWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings/list"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Prometheus
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiPrometheus(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiPrometheusWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Prometheus
- GET /v1/ai/prometheus
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiPrometheusWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/prometheus"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List providers
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiProviders200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiProviders(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiProviders200Response {
return try await getAiProvidersWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List providers
- GET /v1/ai/providers
- List the caller's providers.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiProviders200Response>
*/
open class func getAiProvidersWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiProviders200Response> {
let localVariablePath = "/v1/ai/providers"
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<GetAiProviders200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a provider
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiProviders200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiProvidersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiProviders200Response {
return try await getAiProvidersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a provider
- GET /v1/ai/providers/{owner}/{name}
- Read one provider by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiProviders200Response>
*/
open class func getAiProvidersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiProviders200Response> {
var localVariablePath = "/v1/ai/providers/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiProviders200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List providers across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiProviders200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiProvidersGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiProviders200Response {
return try await getAiProvidersGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List providers across tenants
- GET /v1/ai/providers/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiProviders200Response>
*/
open class func getAiProvidersGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiProviders200Response> {
let localVariablePath = "/v1/ai/providers/global"
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<GetAiProviders200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Return every stored chunk of one file_id (full document context).
- parameter apiConfiguration: The configuration for the http request.
- returns: [DocSearchResult]
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRagContext(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> [DocSearchResult] {
return try await getAiRagContextWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Return every stored chunk of one file_id (full document context).
- GET /v1/ai/rag/context
- Return every stored chunk of one file_id (full document context). Consolidates the retired chat-rag-api GET /documents/{id}/context.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<[DocSearchResult]>
*/
open class func getAiRagContextWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<[DocSearchResult]> {
let localVariablePath = "/v1/ai/rag/context"
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<[DocSearchResult]>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List records
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiRecords200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRecords(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiRecords200Response {
return try await getAiRecordsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List records
- GET /v1/ai/records
- List the caller's records.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiRecords200Response>
*/
open class func getAiRecordsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiRecords200Response> {
let localVariablePath = "/v1/ai/records"
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<GetAiRecords200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a record
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRecords200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRecordsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRecords200Response {
return try await getAiRecordsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a record
- GET /v1/ai/records/{owner}/{name}
- Read one record by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRecords200Response>
*/
open class func getAiRecordsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRecords200Response> {
var localVariablePath = "/v1/ai/records/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRecords200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Query (record)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRecordsQuery(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiRecordsQueryWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Query (record)
- GET /v1/ai/records/query
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiRecordsQueryWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/records/query"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Query Second (record)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRecordsQuerySecond(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiRecordsQuerySecondWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Query Second (record)
- GET /v1/ai/records/query-second
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiRecordsQuerySecondWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/records/query-second"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List remote-connections
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiRemoteConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRemoteConnections(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiRemoteConnections200Response {
return try await getAiRemoteConnectionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List remote-connections
- GET /v1/ai/remote-connections
- List the caller's remote-connections.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiRemoteConnections200Response>
*/
open class func getAiRemoteConnectionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiRemoteConnections200Response> {
let localVariablePath = "/v1/ai/remote-connections"
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<GetAiRemoteConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a connection
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRemoteConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRemoteConnectionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRemoteConnections200Response {
return try await getAiRemoteConnectionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a connection
- GET /v1/ai/remote-connections/{owner}/{name}
- Read one connection by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRemoteConnections200Response>
*/
open class func getAiRemoteConnectionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRemoteConnections200Response> {
var localVariablePath = "/v1/ai/remote-connections/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRemoteConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterArtifactMeta(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await getAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- GET /v1/ai/router/artifact-meta
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func getAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/artifact-meta"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Router Data
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterData(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiRouterDataWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Router Data
- GET /v1/ai/router/data
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiRouterDataWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/router/data"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterDefaults(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await getAiRouterDefaultsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- GET /v1/ai/router/defaults
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func getAiRouterDefaultsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/defaults"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the router-improvement time-series.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiRouterHistory200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterHistory(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiRouterHistory200Response {
return try await getAiRouterHistoryWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the router-improvement time-series.
- GET /v1/ai/router/history
- Returns the router-improvement time-series. Two scopes, one route, mirroring /v1/ai/router/stats: - ?scope=platform — PUBLIC-safe aggregate over ALL orgs, no authentication. Emits the daily reward/cost-saved/adoption series (task mix included, model ids NOT) and the retrain timeline. This is what world.hanzo.ai polls. - default (org scope) — requires a signed-in principal, scoped to the caller's OWN org (a super admin may pass ?org= to target another or \"\" for all). Window: ?days=N (default 30, capped at 90). Aggregates only.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiRouterHistory200Response>
*/
open class func getAiRouterHistoryWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiRouterHistory200Response> {
let localVariablePath = "/v1/ai/router/history"
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<GetAiRouterHistory200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the LIVE Mean-Field Judge Panel state: the configured panel + dynamic judge posture (enabled/sample) resolved from the \"*\" GlobalDefaultOwner row, the live in-process per-judge calibration (weight/mean/n), and the static published benchmark.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiRouterJudgePanel200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterJudgePanel(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiRouterJudgePanel200Response {
return try await getAiRouterJudgePanelWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the LIVE Mean-Field Judge Panel state: the configured panel + dynamic judge posture (enabled/sample) resolved from the \"*\" GlobalDefaultOwner row, the live in-process per-judge calibration (weight/mean/n), and the static published benchmark.
- GET /v1/ai/router/judge-panel
- Returns the LIVE Mean-Field Judge Panel state: the configured panel + dynamic judge posture (enabled/sample) resolved from the \"*\" GlobalDefaultOwner row, the live in-process per-judge calibration (weight/mean/n), and the static published benchmark. PUBLIC-safe and platform-global (model ids + scalars only), so it rides the same unauthenticated, balance-exempt class as /v1/ai/router/stats?scope=platform — the world widget polls it with no auth. The judge state is a single in-process population (not per-org), so there is nothing to scope; ?scope=platform is accepted for symmetry with router-stats.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiRouterJudgePanel200Response>
*/
open class func getAiRouterJudgePanelWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiRouterJudgePanel200Response> {
let localVariablePath = "/v1/ai/router/judge-panel"
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<GetAiRouterJudgePanel200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterLedger(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await getAiRouterLedgerWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- GET /v1/ai/router/ledger
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func getAiRouterLedgerWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/ledger"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterPolicy(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await getAiRouterPolicyWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- GET /v1/ai/router/policy
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func getAiRouterPolicyWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/policy"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterRewards(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await getAiRouterRewardsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- GET /v1/ai/router/rewards
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func getAiRouterRewardsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/rewards"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the router observability aggregate.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiRouterStats200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRouterStats(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiRouterStats200Response {
return try await getAiRouterStatsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the router observability aggregate.
- GET /v1/ai/router/stats
- Returns the router observability aggregate. Two scopes, one route: - ?scope=platform — PUBLIC-safe aggregate over ALL orgs, no authentication. Emits rates, shares, per-task/per-model counts, throughput, and the cost RATIO (saved_pct) + counterfactual model id, but NEVER absolute $ levels, org identity, raw events, or feature vectors. This is what world.hanzo.ai polls. - default (org scope) — requires a signed-in principal; scoped to the caller's OWN org (a super admin may pass ?org= to target another org or \"\" for all). Carries the absolute $/MTok indices for the admin savings panel. Window: ?since= (RFC3339) or ?hours= (default 24, capped). Aggregates only.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiRouterStats200Response>
*/
open class func getAiRouterStatsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiRouterStats200Response> {
let localVariablePath = "/v1/ai/router/stats"
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<GetAiRouterStats200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List routes
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiRoutes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRoutes(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiRoutes200Response {
return try await getAiRoutesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List routes
- GET /v1/ai/routes
- List the caller's routes.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiRoutes200Response>
*/
open class func getAiRoutesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiRoutes200Response> {
let localVariablePath = "/v1/ai/routes"
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<GetAiRoutes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a model-route
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRoutes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiRoutesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRoutes200Response {
return try await getAiRoutesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a model-route
- GET /v1/ai/routes/{owner}/{name}
- Read one model-route by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRoutes200Response>
*/
open class func getAiRoutesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRoutes200Response> {
var localVariablePath = "/v1/ai/routes/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRoutes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List scales
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiScales200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiScales(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiScales200Response {
return try await getAiScalesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List scales
- GET /v1/ai/scales
- List the caller's scales.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiScales200Response>
*/
open class func getAiScalesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiScales200Response> {
let localVariablePath = "/v1/ai/scales"
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<GetAiScales200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a scale
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScales200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiScalesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScales200Response {
return try await getAiScalesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a scale
- GET /v1/ai/scales/{owner}/{name}
- Read one scale by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScales200Response>
*/
open class func getAiScalesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScales200Response> {
var localVariablePath = "/v1/ai/scales/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiScales200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List scales across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiScales200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiScalesGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiScales200Response {
return try await getAiScalesGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List scales across tenants
- GET /v1/ai/scales/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiScales200Response>
*/
open class func getAiScalesGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiScales200Response> {
let localVariablePath = "/v1/ai/scales/global"
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<GetAiScales200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Public (scale)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiScalesPublic(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiScalesPublicWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Public (scale)
- GET /v1/ai/scales/public
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiScalesPublicWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/scales/public"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List scans
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiScans200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiScans(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiScans200Response {
return try await getAiScansWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List scans
- GET /v1/ai/scans
- List the caller's scans.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiScans200Response>
*/
open class func getAiScansWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiScans200Response> {
let localVariablePath = "/v1/ai/scans"
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<GetAiScans200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a scan
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScans200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiScansByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScans200Response {
return try await getAiScansByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a scan
- GET /v1/ai/scans/{owner}/{name}
- Read one scan by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScans200Response>
*/
open class func getAiScansByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScans200Response> {
var localVariablePath = "/v1/ai/scans/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiScans200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List signin-sessions
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiSigninSessions200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiSigninSessions(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiSigninSessions200Response {
return try await getAiSigninSessionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List signin-sessions
- GET /v1/ai/signin-sessions
- List the caller's signin-sessions.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiSigninSessions200Response>
*/
open class func getAiSigninSessionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiSigninSessions200Response> {
let localVariablePath = "/v1/ai/signin-sessions"
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<GetAiSigninSessions200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a session
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiSigninSessions200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiSigninSessionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiSigninSessions200Response {
return try await getAiSigninSessionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a session
- GET /v1/ai/signin-sessions/{owner}/{name}
- Read one session by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiSigninSessions200Response>
*/
open class func getAiSigninSessionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiSigninSessions200Response> {
var localVariablePath = "/v1/ai/signin-sessions/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiSigninSessions200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Duplicated (session)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiSigninSessionsDuplicated(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiSigninSessionsDuplicatedWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Duplicated (session)
- GET /v1/ai/signin-sessions/duplicated
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiSigninSessionsDuplicatedWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/signin-sessions/duplicated"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List stores
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiStores200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiStores(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiStores200Response {
return try await getAiStoresWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List stores
- GET /v1/ai/stores
- List the caller's stores.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiStores200Response>
*/
open class func getAiStoresWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiStores200Response> {
let localVariablePath = "/v1/ai/stores"
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<GetAiStores200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a store
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiStores200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiStoresByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiStores200Response {
return try await getAiStoresByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a store
- GET /v1/ai/stores/{owner}/{name}
- Read one store by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiStores200Response>
*/
open class func getAiStoresByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiStores200Response> {
var localVariablePath = "/v1/ai/stores/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiStores200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List stores across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiStores200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiStoresGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiStores200Response {
return try await getAiStoresGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List stores across tenants
- GET /v1/ai/stores/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiStores200Response>
*/
open class func getAiStoresGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiStores200Response> {
let localVariablePath = "/v1/ai/stores/global"
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<GetAiStores200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Names (store)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiStoresNames(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiStoresNamesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Names (store)
- GET /v1/ai/stores/names
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiStoresNamesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/stores/names"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Providers (store)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiStoresProviders(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiStoresProvidersWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Providers (store)
- GET /v1/ai/stores/providers
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiStoresProvidersWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/stores/providers"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
System
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiSystem(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiSystemWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
System
- GET /v1/ai/system
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiSystemWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/system"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List tasks
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiTasks200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiTasks(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiTasks200Response {
return try await getAiTasksWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List tasks
- GET /v1/ai/tasks
- List the caller's tasks.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiTasks200Response>
*/
open class func getAiTasksWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiTasks200Response> {
let localVariablePath = "/v1/ai/tasks"
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<GetAiTasks200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a task
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTasks200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiTasksByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTasks200Response {
return try await getAiTasksByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a task
- GET /v1/ai/tasks/{owner}/{name}
- Read one task by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTasks200Response>
*/
open class func getAiTasksByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTasks200Response> {
var localVariablePath = "/v1/ai/tasks/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTasks200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List tasks across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiTasks200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiTasksGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiTasks200Response {
return try await getAiTasksGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List tasks across tenants
- GET /v1/ai/tasks/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiTasks200Response>
*/
open class func getAiTasksGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiTasks200Response> {
let localVariablePath = "/v1/ai/tasks/global"
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<GetAiTasks200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List templates
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiTemplates200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiTemplates(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiTemplates200Response {
return try await getAiTemplatesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List templates
- GET /v1/ai/templates
- List the caller's templates.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiTemplates200Response>
*/
open class func getAiTemplatesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiTemplates200Response> {
let localVariablePath = "/v1/ai/templates"
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<GetAiTemplates200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a template
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTemplates200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiTemplatesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTemplates200Response {
return try await getAiTemplatesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a template
- GET /v1/ai/templates/{owner}/{name}
- Read one template by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTemplates200Response>
*/
open class func getAiTemplatesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTemplates200Response> {
var localVariablePath = "/v1/ai/templates/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTemplates200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the PUBLIC live request-geo aggregate for the world.hanzo.ai \"Hanzo mode\" globe: WHERE requests to api.hanzo.ai are coming from, as country/region points with per-service-class counts, plus headline throughput rates.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiTrafficGlobe200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiTrafficGlobe(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiTrafficGlobe200Response {
return try await getAiTrafficGlobeWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the PUBLIC live request-geo aggregate for the world.hanzo.ai \"Hanzo mode\" globe: WHERE requests to api.hanzo.ai are coming from, as country/region points with per-service-class counts, plus headline throughput rates.
- GET /v1/ai/traffic/globe
- Returns the PUBLIC live request-geo aggregate for the world.hanzo.ai \"Hanzo mode\" globe: WHERE requests to api.hanzo.ai are coming from, as country/region points with per-service-class counts, plus headline throughput rates. It is AUTH-exempt and BALANCE-exempt exactly like /v1/ai/router/stats?scope=platform: - auth: the controller name \"traffic/globe\" is neither a get-/update- CRUD name nor a super-admin/present-credential endpoint, so the authz filter passes it through, and this handler requires no principal. - balance: isBalanceExempt(\"/v1/ai/traffic/...\") returns true. It exposes ONLY aggregates — counts, rates, and country/region centroids — and NEVER any IP, per-request row, org, or user dimension (see object/traffic.go). Marketing telemetry; nothing sensitive.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiTrafficGlobe200Response>
*/
open class func getAiTrafficGlobeWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiTrafficGlobe200Response> {
let localVariablePath = "/v1/ai/traffic/globe"
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<GetAiTrafficGlobe200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Training Contribution
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiTrainingContribution(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiTrainingContributionWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Training Contribution
- GET /v1/ai/training-contribution
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiTrainingContributionWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/training-contribution"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List usages
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiUsages200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiUsages(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiUsages200Response {
return try await getAiUsagesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List usages
- GET /v1/ai/usages
- List the caller's usages.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiUsages200Response>
*/
open class func getAiUsagesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiUsages200Response> {
let localVariablePath = "/v1/ai/usages"
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<GetAiUsages200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
By User (usage)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiUsagesByUser(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiUsagesByUserWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
By User (usage)
- GET /v1/ai/usages/by-user
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiUsagesByUserWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/usages/by-user"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Cloud (usage)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiUsagesCloud(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiUsagesCloudWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Cloud (usage)
- GET /v1/ai/usages/cloud
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiUsagesCloudWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/usages/cloud"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Range (usage)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiUsagesRange(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiUsagesRangeWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Range (usage)
- GET /v1/ai/usages/range
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiUsagesRangeWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/usages/range"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
User Names (usage)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiUsagesUserNames(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiUsagesUserNamesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
User Names (usage)
- GET /v1/ai/usages/user-names
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiUsagesUserNamesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/usages/user-names"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List vectors
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiVectors200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiVectors(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiVectors200Response {
return try await getAiVectorsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List vectors
- GET /v1/ai/vectors
- List the caller's vectors.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiVectors200Response>
*/
open class func getAiVectorsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiVectors200Response> {
let localVariablePath = "/v1/ai/vectors"
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<GetAiVectors200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a vector
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVectors200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiVectorsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVectors200Response {
return try await getAiVectorsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a vector
- GET /v1/ai/vectors/{owner}/{name}
- Read one vector by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVectors200Response>
*/
open class func getAiVectorsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVectors200Response> {
var localVariablePath = "/v1/ai/vectors/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiVectors200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List vectors across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiVectors200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiVectorsGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiVectors200Response {
return try await getAiVectorsGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List vectors across tenants
- GET /v1/ai/vectors/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiVectors200Response>
*/
open class func getAiVectorsGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiVectors200Response> {
let localVariablePath = "/v1/ai/vectors/global"
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<GetAiVectors200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Version
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiVersion(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await getAiVersionWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Version
- GET /v1/ai/version
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func getAiVersionWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/version"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List videos
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiVideos200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiVideos(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiVideos200Response {
return try await getAiVideosWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List videos
- GET /v1/ai/videos
- List the caller's videos.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiVideos200Response>
*/
open class func getAiVideosWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiVideos200Response> {
let localVariablePath = "/v1/ai/videos"
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<GetAiVideos200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a video
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVideos200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiVideosByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVideos200Response {
return try await getAiVideosByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a video
- GET /v1/ai/videos/{owner}/{name}
- Read one video by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVideos200Response>
*/
open class func getAiVideosByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVideos200Response> {
var localVariablePath = "/v1/ai/videos/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiVideos200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List videos across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiVideos200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiVideosGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiVideos200Response {
return try await getAiVideosGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List videos across tenants
- GET /v1/ai/videos/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiVideos200Response>
*/
open class func getAiVideosGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiVideos200Response> {
let localVariablePath = "/v1/ai/videos/global"
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<GetAiVideos200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List workflows
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiWorkflows200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiWorkflows(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiWorkflows200Response {
return try await getAiWorkflowsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List workflows
- GET /v1/ai/workflows
- List the caller's workflows.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiWorkflows200Response>
*/
open class func getAiWorkflowsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiWorkflows200Response> {
let localVariablePath = "/v1/ai/workflows"
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<GetAiWorkflows200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve a workflow
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiWorkflows200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiWorkflowsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiWorkflows200Response {
return try await getAiWorkflowsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve a workflow
- GET /v1/ai/workflows/{owner}/{name}
- Read one workflow by its (owner, name) key.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiWorkflows200Response>
*/
open class func getAiWorkflowsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiWorkflows200Response> {
var localVariablePath = "/v1/ai/workflows/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiWorkflows200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
List workflows across tenants
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiWorkflows200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getAiWorkflowsGlobal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiWorkflows200Response {
return try await getAiWorkflowsGlobalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
List workflows across tenants
- GET /v1/ai/workflows/global
- Cross-tenant listing. Admin-only; a tenant caller is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiWorkflows200Response>
*/
open class func getAiWorkflowsGlobalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiWorkflows200Response> {
let localVariablePath = "/v1/ai/workflows/global"
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<GetAiWorkflows200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the list of available models from the routing table.
- parameter apiConfiguration: The configuration for the http request.
- returns: AiModelList
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getModels(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiModelList {
return try await getModelsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the list of available models from the routing table.
- GET /v1/models
- Returns the list of available models from the routing table. PUBLIC BY DESIGN, AND IT DOES NOT AUTHENTICATE — that is the whole contract, so it is stated here rather than left to be inferred. The catalogue is the same for everyone (listAvailableModels takes no principal), docs.hanzo.ai fetches it from the browser, and every policy layer around it already says so out loud: the authz filter lists \"models\" as public, filter_balance refuses to gate it (a 402 here was a console-wide outage), the rate limiter excludes it, and cloud's spend.Reachable carries /v1/models/ as \"the model catalog the shell reads for discovery\". SO THE Authorization HEADER IS NOT AN ADMISSION CHECK HERE. It is read for ONE thing — annotating gated SKUs with the caller's own access standing — and annotation degrades to nothing when there is no verified principal. It used to hold a \"require authentication\" gate that authenticated nobody: it rejected an ABSENT credential and a MALFORMED one, then accepted any string that merely looked like a key. `Bearer sk-` followed by 36 zeroes returned 200 in production; so did a JWT three days expired. It was a shape check wearing an auth check's clothes, and its cost was diagnostic: /v1/models is the natural \"is my auth working?\" probe, and answering 200 to a dead credential sent people debugging the wrong system. A public endpoint must not appear to validate. Either check the credential or ignore it — this one ignores it, deliberately and visibly. Removing that gate discloses nothing new: the catalogue was already reachable by anyone willing to type three characters, so there is no confidentiality delta, only an honesty one.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiModelList>
*/
open class func getModelsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiModelList> {
let localVariablePath = "/v1/models"
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<AiModelList>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the caller's own standing for a gated model: \"granted\", \"requested\", or empty when they have never asked.
- parameter model: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiConnectionsByProviderAuthorize200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getModelsByModelAccess(model: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiConnectionsByProviderAuthorize200Response {
return try await getModelsByModelAccessWithRequestBuilder(model: model, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the caller's own standing for a gated model: \"granted\", \"requested\", or empty when they have never asked.
- GET /v1/models/{model}/access
- Returns the caller's own standing for a gated model: \"granted\", \"requested\", or empty when they have never asked.
- Bearer Token:
- type: http
- name: bearer
- parameter model: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiConnectionsByProviderAuthorize200Response>
*/
open class func getModelsByModelAccessWithRequestBuilder(model: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiConnectionsByProviderAuthorize200Response> {
var localVariablePath = "/v1/models/{model}/access"
let modelPreEscape = "\(APIHelper.mapValueToPathItem(model))"
let modelPostEscape = modelPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{model}", with: modelPostEscape, 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<GetAiConnectionsByProviderAuthorize200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Public, secret-free list of the providers serving the models that GET /v1/models lists — the same source, projected.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetModelsProviders200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getModelsProviders(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetModelsProviders200Response {
return try await getModelsProvidersWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Public, secret-free list of the providers serving the models that GET /v1/models lists — the same source, projected.
- GET /v1/models/providers
- Public, secret-free list of the providers serving the models that GET /v1/models lists — the same source, projected. Safe unauthenticated: no keys, URLs, or config are returned, and it reports a SET of names, never which provider serves which model.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetModelsProviders200Response>
*/
open class func getModelsProvidersWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetModelsProviders200Response> {
let localVariablePath = "/v1/models/providers"
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<GetModelsProviders200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements GET /v1/videos/{id} — poll a job's status.
- parameter id: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: AiVideoStatus
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getVideosById(id: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiVideoStatus {
return try await getVideosByIdWithRequestBuilder(id: id, apiConfiguration: apiConfiguration).execute().body
}
/**
Implements GET /v1/videos/{id} — poll a job's status.
- GET /v1/videos/{id}
- Implements GET /v1/videos/{id} — poll a job's status. It authenticates the caller, verifies they OWN the job (the caller's billing subject must equal the job's), performs ONE upstream status poll, and — the first time the job is observed completed — settles the reservation with the actual cost and records the billable usage event (exactly once). Returns the OpenAI-shaped video object.
- Bearer Token:
- type: http
- name: bearer
- parameter id: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiVideoStatus>
*/
open class func getVideosByIdWithRequestBuilder(id: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiVideoStatus> {
var localVariablePath = "/v1/videos/{id}"
let idPreEscape = "\(APIHelper.mapValueToPathItem(id))"
let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, 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<AiVideoStatus>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements GET /v1/videos/{id}/content — download the finished MP4.
- parameter id: (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 getVideosByIdContent(id: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getVideosByIdContentWithRequestBuilder(id: id, apiConfiguration: apiConfiguration).execute().body
}
/**
Implements GET /v1/videos/{id}/content — download the finished MP4.
- GET /v1/videos/{id}/content
- Implements GET /v1/videos/{id}/content — download the finished MP4. It authenticates + ownership-checks the caller, then proxies the upstream /content endpoint (bounded by the download concurrency ceiling) and streams the raw video bytes back inline. A successful download also bills the job once (for the client that downloads without first polling to completion) — idempotent with the poll path via job.markCompleted.
- Bearer Token:
- type: http
- name: bearer
- parameter id: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getVideosByIdContentWithRequestBuilder(id: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/videos/{id}/content"
let idPreEscape = "\(APIHelper.mapValueToPathItem(id))"
let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, 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: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a article
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiArticles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiArticlesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiArticles200Response {
return try await patchAiArticlesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a article
- PATCH /v1/ai/articles/{owner}/{name}
- Update one article. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiArticles200Response>
*/
open class func patchAiArticlesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiArticles200Response> {
var localVariablePath = "/v1/ai/articles/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiArticles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a asset
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiAssets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiAssetsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiAssets200Response {
return try await patchAiAssetsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a asset
- PATCH /v1/ai/assets/{owner}/{name}
- Update one asset. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiAssets200Response>
*/
open class func patchAiAssetsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiAssets200Response> {
var localVariablePath = "/v1/ai/assets/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiAssets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a chat
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiChats200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiChatsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiChats200Response {
return try await patchAiChatsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a chat
- PATCH /v1/ai/chats/{owner}/{name}
- Update one chat. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiChats200Response>
*/
open class func patchAiChatsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiChats200Response> {
var localVariablePath = "/v1/ai/chats/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiChats200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a application
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiDeployments200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiDeploymentsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiDeployments200Response {
return try await patchAiDeploymentsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a application
- PATCH /v1/ai/deployments/{owner}/{name}
- Update one application. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiDeployments200Response>
*/
open class func patchAiDeploymentsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiDeployments200Response> {
var localVariablePath = "/v1/ai/deployments/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiDeployments200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a file
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiFilesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFiles200Response {
return try await patchAiFilesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a file
- PATCH /v1/ai/files/{owner}/{name}
- Update one file. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFiles200Response>
*/
open class func patchAiFilesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFiles200Response> {
var localVariablePath = "/v1/ai/files/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a form
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiForms200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiFormsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiForms200Response {
return try await patchAiFormsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a form
- PATCH /v1/ai/forms/{owner}/{name}
- Update one form. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiForms200Response>
*/
open class func patchAiFormsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiForms200Response> {
var localVariablePath = "/v1/ai/forms/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiForms200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a graph
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiGraphs200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiGraphsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiGraphs200Response {
return try await patchAiGraphsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a graph
- PATCH /v1/ai/graphs/{owner}/{name}
- Update one graph. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiGraphs200Response>
*/
open class func patchAiGraphsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiGraphs200Response> {
var localVariablePath = "/v1/ai/graphs/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiGraphs200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a message
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiMessages200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiMessagesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiMessages200Response {
return try await patchAiMessagesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a message
- PATCH /v1/ai/messages/{owner}/{name}
- Update one message. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiMessages200Response>
*/
open class func patchAiMessagesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiMessages200Response> {
var localVariablePath = "/v1/ai/messages/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiMessages200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a node
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiNodes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiNodesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiNodes200Response {
return try await patchAiNodesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a node
- PATCH /v1/ai/nodes/{owner}/{name}
- Update one node. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiNodes200Response>
*/
open class func patchAiNodesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiNodes200Response> {
var localVariablePath = "/v1/ai/nodes/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiNodes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiOrgSettings(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await patchAiOrgSettingsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PATCH /v1/ai/org/settings
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func patchAiOrgSettingsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiOrgSettingsList(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await patchAiOrgSettingsListWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PATCH /v1/ai/org/settings/list
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func patchAiOrgSettingsListWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings/list"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Preferences
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiPreferences(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await patchAiPreferencesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Preferences
- PATCH /v1/ai/preferences
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func patchAiPreferencesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/preferences"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a provider
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiProviders200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiProvidersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiProviders200Response {
return try await patchAiProvidersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a provider
- PATCH /v1/ai/providers/{owner}/{name}
- Update one provider. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiProviders200Response>
*/
open class func patchAiProvidersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiProviders200Response> {
var localVariablePath = "/v1/ai/providers/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiProviders200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a record
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRecords200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiRecordsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRecords200Response {
return try await patchAiRecordsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a record
- PATCH /v1/ai/records/{owner}/{name}
- Update one record. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRecords200Response>
*/
open class func patchAiRecordsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRecords200Response> {
var localVariablePath = "/v1/ai/records/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRecords200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a connection
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRemoteConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiRemoteConnectionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRemoteConnections200Response {
return try await patchAiRemoteConnectionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a connection
- PATCH /v1/ai/remote-connections/{owner}/{name}
- Update one connection. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRemoteConnections200Response>
*/
open class func patchAiRemoteConnectionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRemoteConnections200Response> {
var localVariablePath = "/v1/ai/remote-connections/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRemoteConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiRouterArtifactMeta(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await patchAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PATCH /v1/ai/router/artifact-meta
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func patchAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/artifact-meta"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiRouterDefaults(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await patchAiRouterDefaultsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PATCH /v1/ai/router/defaults
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func patchAiRouterDefaultsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/defaults"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiRouterLedger(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await patchAiRouterLedgerWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PATCH /v1/ai/router/ledger
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func patchAiRouterLedgerWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/ledger"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiRouterPolicy(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await patchAiRouterPolicyWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PATCH /v1/ai/router/policy
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func patchAiRouterPolicyWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/policy"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiRouterRewards(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await patchAiRouterRewardsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PATCH /v1/ai/router/rewards
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func patchAiRouterRewardsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/rewards"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a model-route
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRoutes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiRoutesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRoutes200Response {
return try await patchAiRoutesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a model-route
- PATCH /v1/ai/routes/{owner}/{name}
- Update one model-route. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRoutes200Response>
*/
open class func patchAiRoutesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRoutes200Response> {
var localVariablePath = "/v1/ai/routes/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRoutes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a scale
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScales200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiScalesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScales200Response {
return try await patchAiScalesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a scale
- PATCH /v1/ai/scales/{owner}/{name}
- Update one scale. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScales200Response>
*/
open class func patchAiScalesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScales200Response> {
var localVariablePath = "/v1/ai/scales/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiScales200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a scan
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScans200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiScansByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScans200Response {
return try await patchAiScansByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a scan
- PATCH /v1/ai/scans/{owner}/{name}
- Update one scan. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScans200Response>
*/
open class func patchAiScansByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScans200Response> {
var localVariablePath = "/v1/ai/scans/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiScans200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a session
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiSigninSessions200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiSigninSessionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiSigninSessions200Response {
return try await patchAiSigninSessionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a session
- PATCH /v1/ai/signin-sessions/{owner}/{name}
- Update one session. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiSigninSessions200Response>
*/
open class func patchAiSigninSessionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiSigninSessions200Response> {
var localVariablePath = "/v1/ai/signin-sessions/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiSigninSessions200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a store
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiStores200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiStoresByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiStores200Response {
return try await patchAiStoresByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a store
- PATCH /v1/ai/stores/{owner}/{name}
- Update one store. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiStores200Response>
*/
open class func patchAiStoresByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiStores200Response> {
var localVariablePath = "/v1/ai/stores/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiStores200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a task
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTasks200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiTasksByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTasks200Response {
return try await patchAiTasksByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a task
- PATCH /v1/ai/tasks/{owner}/{name}
- Update one task. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTasks200Response>
*/
open class func patchAiTasksByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTasks200Response> {
var localVariablePath = "/v1/ai/tasks/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTasks200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a template
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTemplates200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiTemplatesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTemplates200Response {
return try await patchAiTemplatesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a template
- PATCH /v1/ai/templates/{owner}/{name}
- Update one template. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTemplates200Response>
*/
open class func patchAiTemplatesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTemplates200Response> {
var localVariablePath = "/v1/ai/templates/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTemplates200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Training Contribution
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiTrainingContribution(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await patchAiTrainingContributionWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Training Contribution
- PATCH /v1/ai/training-contribution
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func patchAiTrainingContributionWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/training-contribution"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a tree-file
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTreeFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiTreeFilesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTreeFiles200Response {
return try await patchAiTreeFilesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a tree-file
- PATCH /v1/ai/tree-files/{owner}/{name}
- Update one tree-file. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTreeFiles200Response>
*/
open class func patchAiTreeFilesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTreeFiles200Response> {
var localVariablePath = "/v1/ai/tree-files/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTreeFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a vector
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVectors200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiVectorsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVectors200Response {
return try await patchAiVectorsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a vector
- PATCH /v1/ai/vectors/{owner}/{name}
- Update one vector. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVectors200Response>
*/
open class func patchAiVectorsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVectors200Response> {
var localVariablePath = "/v1/ai/vectors/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiVectors200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a video
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVideos200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiVideosByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVideos200Response {
return try await patchAiVideosByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a video
- PATCH /v1/ai/videos/{owner}/{name}
- Update one video. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVideos200Response>
*/
open class func patchAiVideosByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVideos200Response> {
var localVariablePath = "/v1/ai/videos/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiVideos200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update a workflow
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiWorkflows200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func patchAiWorkflowsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiWorkflows200Response {
return try await patchAiWorkflowsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Update a workflow
- PATCH /v1/ai/workflows/{owner}/{name}
- Update one workflow. PATCH and PUT reach the same handler, which has always taken a whole object.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiWorkflows200Response>
*/
open class func patchAiWorkflowsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiWorkflows200Response> {
var localVariablePath = "/v1/ai/workflows/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiWorkflows200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a article
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiArticles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiArticles(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiArticles200Response {
return try await postAiArticlesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a article
- POST /v1/ai/articles
- Create one article.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiArticles200Response>
*/
open class func postAiArticlesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiArticles200Response> {
let localVariablePath = "/v1/ai/articles"
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<PostAiArticles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a asset
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiAssets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiAssets(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiAssets200Response {
return try await postAiAssetsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a asset
- POST /v1/ai/assets
- Create one asset.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiAssets200Response>
*/
open class func postAiAssetsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiAssets200Response> {
let localVariablePath = "/v1/ai/assets"
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<PostAiAssets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Scan (asset)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiAssetsByOwnerByNameScan(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiAssetsByOwnerByNameScanWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Scan (asset)
- POST /v1/ai/assets/{owner}/{name}/scan
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiAssetsByOwnerByNameScanWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/assets/{owner}/{name}/scan"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Scan (asset)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiAssetsScan(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiAssetsScanWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Scan (asset)
- POST /v1/ai/assets/scan
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiAssetsScanWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/assets/scan"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a chat
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiChats200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiChats(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiChats200Response {
return try await postAiChatsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a chat
- POST /v1/ai/chats
- Create one chat.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiChats200Response>
*/
open class func postAiChatsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiChats200Response> {
let localVariablePath = "/v1/ai/chats"
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<PostAiChats200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Connects (or reconnects) a third-party AI account for the org by sealing the supplied key into KMS and upserting the org's provider row.
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiConnections(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiConnections200Response {
return try await postAiConnectionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Connects (or reconnects) a third-party AI account for the org by sealing the supplied key into KMS and upserting the org's provider row.
- POST /v1/ai/connections
- Connects (or reconnects) a third-party AI account for the org by sealing the supplied key into KMS and upserting the org's provider row. The raw key is sealed BEFORE the row is built and is never persisted or echoed.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiConnections200Response>
*/
open class func postAiConnectionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiConnections200Response> {
let localVariablePath = "/v1/ai/connections"
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<PostAiConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Disconnects a third-party AI account: it deactivates the org's row so completion resolution falls back to the global Hanzo account (no BYO), and best-effort tombstones the sealed secret.
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiConnectionsByProvider(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiConnections200Response {
return try await postAiConnectionsByProviderWithRequestBuilder(provider: provider, apiConfiguration: apiConfiguration).execute().body
}
/**
Disconnects a third-party AI account: it deactivates the org's row so completion resolution falls back to the global Hanzo account (no BYO), and best-effort tombstones the sealed secret.
- POST /v1/ai/connections/{provider}
- Disconnects a third-party AI account: it deactivates the org's row so completion resolution falls back to the global Hanzo account (no BYO), and best-effort tombstones the sealed secret. Idempotent.
- Bearer Token:
- type: http
- name: bearer
- parameter provider: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiConnections200Response>
*/
open class func postAiConnectionsByProviderWithRequestBuilder(provider: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiConnections200Response> {
var localVariablePath = "/v1/ai/connections/{provider}"
let providerPreEscape = "\(APIHelper.mapValueToPathItem(provider))"
let providerPostEscape = providerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{provider}", with: providerPostEscape, 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<PostAiConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a application
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiDeployments200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiDeployments(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiDeployments200Response {
return try await postAiDeploymentsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a application
- POST /v1/ai/deployments
- Create one application.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiDeployments200Response>
*/
open class func postAiDeploymentsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiDeployments200Response> {
let localVariablePath = "/v1/ai/deployments"
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<PostAiDeployments200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Deploy (application)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiDeploymentsByOwnerByNameDeploy(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiDeploymentsByOwnerByNameDeployWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Deploy (application)
- POST /v1/ai/deployments/{owner}/{name}/deploy
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiDeploymentsByOwnerByNameDeployWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/deployments/{owner}/{name}/deploy"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Undeploy (application)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiDeploymentsByOwnerByNameUndeploy(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiDeploymentsByOwnerByNameUndeployWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Undeploy (application)
- POST /v1/ai/deployments/{owner}/{name}/undeploy
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiDeploymentsByOwnerByNameUndeployWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/deployments/{owner}/{name}/undeploy"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop's quality signal.
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFeedback200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiFeedback(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFeedback200Response {
return try await postAiFeedbackWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop's quality signal.
- POST /v1/ai/feedback
- Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop's quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller's OWN org's event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFeedback200Response>
*/
open class func postAiFeedbackWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFeedback200Response> {
let localVariablePath = "/v1/ai/feedback"
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<PostAiFeedback200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a file
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiFiles(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFiles200Response {
return try await postAiFilesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a file
- POST /v1/ai/files
- Create one file.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFiles200Response>
*/
open class func postAiFilesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFiles200Response> {
let localVariablePath = "/v1/ai/files"
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<PostAiFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Activate (file)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiFilesActivate(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiFilesActivateWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Activate (file)
- POST /v1/ai/files/activate
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiFilesActivateWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/files/activate"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Vectors (file)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiFilesByOwnerByNameVectors(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiFilesByOwnerByNameVectorsWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Vectors (file)
- POST /v1/ai/files/{owner}/{name}/vectors
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiFilesByOwnerByNameVectorsWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/files/{owner}/{name}/vectors"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Upload (file)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiFilesUpload(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiFilesUploadWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Upload (file)
- POST /v1/ai/files/upload
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiFilesUploadWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/files/upload"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Deletes the TrainJob CR, meters the GPU-hours used so far, and marks the job cancelled.
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFinetuneCancel200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiFinetuneCancel(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFinetuneCancel200Response {
return try await postAiFinetuneCancelWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Deletes the TrainJob CR, meters the GPU-hours used so far, and marks the job cancelled.
- POST /v1/ai/finetune/cancel
- Deletes the TrainJob CR, meters the GPU-hours used so far, and marks the job cancelled. ?id= or ?name=
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFinetuneCancel200Response>
*/
open class func postAiFinetuneCancelWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFinetuneCancel200Response> {
let localVariablePath = "/v1/ai/finetune/cancel"
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<PostAiFinetuneCancel200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Serves a completed job's checkpoints and registers the result as a routable model on api.hanzo.ai.
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFinetuneDeploy200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiFinetuneDeploy(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFinetuneDeploy200Response {
return try await postAiFinetuneDeployWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Serves a completed job's checkpoints and registers the result as a routable model on api.hanzo.ai.
- POST /v1/ai/finetune/deploy
- Serves a completed job's checkpoints and registers the result as a routable model on api.hanzo.ai. ?id= or ?name=
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFinetuneDeploy200Response>
*/
open class func postAiFinetuneDeployWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFinetuneDeploy200Response> {
let localVariablePath = "/v1/ai/finetune/deploy"
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<PostAiFinetuneDeploy200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Validates the request, resolves efficient defaults, persists the job, and submits a real TrainJob CR.
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFinetuneCancel200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiFinetuneJobs(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFinetuneCancel200Response {
return try await postAiFinetuneJobsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Validates the request, resolves efficient defaults, persists the job, and submits a real TrainJob CR.
- POST /v1/ai/finetune/jobs
- Validates the request, resolves efficient defaults, persists the job, and submits a real TrainJob CR. A submit failure (e.g. no cluster wired) is surfaced honestly: the job is saved with status \"failed\" + the reason, never faked.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFinetuneCancel200Response>
*/
open class func postAiFinetuneJobsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFinetuneCancel200Response> {
let localVariablePath = "/v1/ai/finetune/jobs"
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<PostAiFinetuneCancel200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a form
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiForms200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiForms(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiForms200Response {
return try await postAiFormsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a form
- POST /v1/ai/forms
- Create one form.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiForms200Response>
*/
open class func postAiFormsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiForms200Response> {
let localVariablePath = "/v1/ai/forms"
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<PostAiForms200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a graph
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiGraphs200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiGraphs(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiGraphs200Response {
return try await postAiGraphsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a graph
- POST /v1/ai/graphs
- Create one graph.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiGraphs200Response>
*/
open class func postAiGraphsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiGraphs200Response> {
let localVariablePath = "/v1/ai/graphs"
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<PostAiGraphs200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete one of the authenticated user's memories
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiMemoryDelete200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiMemoryDelete(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiMemoryDelete200Response {
return try await postAiMemoryDeleteWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Delete one of the authenticated user's memories
- POST /v1/ai/memory/delete
- Delete one of the authenticated user's memories
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiMemoryDelete200Response>
*/
open class func postAiMemoryDeleteWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiMemoryDelete200Response> {
let localVariablePath = "/v1/ai/memory/delete"
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<PostAiMemoryDelete200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Store a memory for the authenticated user
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiMemoryRemember200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiMemoryRemember(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiMemoryRemember200Response {
return try await postAiMemoryRememberWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Store a memory for the authenticated user
- POST /v1/ai/memory/remember
- Store a memory for the authenticated user
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiMemoryRemember200Response>
*/
open class func postAiMemoryRememberWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiMemoryRemember200Response> {
let localVariablePath = "/v1/ai/memory/remember"
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<PostAiMemoryRemember200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Update one of the authenticated user's memories
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiMemoryDelete200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiMemoryUpdate(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiMemoryDelete200Response {
return try await postAiMemoryUpdateWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Update one of the authenticated user's memories
- POST /v1/ai/memory/update
- Update one of the authenticated user's memories
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiMemoryDelete200Response>
*/
open class func postAiMemoryUpdateWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiMemoryDelete200Response> {
let localVariablePath = "/v1/ai/memory/update"
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<PostAiMemoryDelete200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a message
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiMessages200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiMessages(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiMessages200Response {
return try await postAiMessagesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a message
- POST /v1/ai/messages
- Create one message.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiMessages200Response>
*/
open class func postAiMessagesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiMessages200Response> {
let localVariablePath = "/v1/ai/messages"
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<PostAiMessages200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a node
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiNodes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiNodes(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiNodes200Response {
return try await postAiNodesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a node
- POST /v1/ai/nodes
- Create one node.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiNodes200Response>
*/
open class func postAiNodesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiNodes200Response> {
let localVariablePath = "/v1/ai/nodes"
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<PostAiNodes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Tunnel (node)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiNodesByOwnerByNameTunnel(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiNodesByOwnerByNameTunnelWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Tunnel (node)
- POST /v1/ai/nodes/{owner}/{name}/tunnel
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiNodesByOwnerByNameTunnelWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/nodes/{owner}/{name}/tunnel"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiOrgSettings(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await postAiOrgSettingsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- POST /v1/ai/org/settings
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func postAiOrgSettingsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiOrgSettingsList(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await postAiOrgSettingsListWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- POST /v1/ai/org/settings/list
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func postAiOrgSettingsListWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings/list"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a provider
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiProviders200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiProviders(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiProviders200Response {
return try await postAiProvidersWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a provider
- POST /v1/ai/providers
- Create one provider.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiProviders200Response>
*/
open class func postAiProvidersWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiProviders200Response> {
let localVariablePath = "/v1/ai/providers"
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<PostAiProviders200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Mcp Tools (provider)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiProvidersMcpTools(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiProvidersMcpToolsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Mcp Tools (provider)
- POST /v1/ai/providers/mcp-tools
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiProvidersMcpToolsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/providers/mcp-tools"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Delete all chunks of one or more uploaded files (by file_id) from the owner's Search+Vector index.
- parameter apiConfiguration: The configuration for the http request.
- returns: GetAiFinetunePresets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRagDelete(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> GetAiFinetunePresets200Response {
return try await postAiRagDeleteWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Delete all chunks of one or more uploaded files (by file_id) from the owner's Search+Vector index.
- POST /v1/ai/rag/delete
- Delete all chunks of one or more uploaded files (by file_id) from the owner's Search+Vector index. Consolidates the retired chat-rag-api DELETE /documents.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<GetAiFinetunePresets200Response>
*/
open class func postAiRagDeleteWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<GetAiFinetunePresets200Response> {
let localVariablePath = "/v1/ai/rag/delete"
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<GetAiFinetunePresets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Parse, chunk, and embed one uploaded file under its file_id into the unified Search+Vector index, scoped to the authenticated owner.
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRagEmbed200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRagEmbed(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRagEmbed200Response {
return try await postAiRagEmbedWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Parse, chunk, and embed one uploaded file under its file_id into the unified Search+Vector index, scoped to the authenticated owner.
- POST /v1/ai/rag/embed
- Parse, chunk, and embed one uploaded file under its file_id into the unified Search+Vector index, scoped to the authenticated owner. Provide inline `content` or a `url` to fetch+parse (PDF/CSV/XLSX/PPTX/…). Re-embedding the same file_id replaces its chunks. Consolidates the retired chat-rag-api POST /embed and /local/embed.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRagEmbed200Response>
*/
open class func postAiRagEmbedWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRagEmbed200Response> {
let localVariablePath = "/v1/ai/rag/embed"
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<PostAiRagEmbed200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Unified RAG ingest: parse + chunk + embed documents and pipe them to BOTH Hanzo Vector (semantic) AND Hanzo Search (keyword) under the tenant index {owner}-{store}-docs — the same index /v1/chat retrieval reads.
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRagIngest200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRagIngest(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRagIngest200Response {
return try await postAiRagIngestWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Unified RAG ingest: parse + chunk + embed documents and pipe them to BOTH Hanzo Vector (semantic) AND Hanzo Search (keyword) under the tenant index {owner}-{store}-docs — the same index /v1/chat retrieval reads.
- POST /v1/ai/rag/ingest
- Unified RAG ingest: parse + chunk + embed documents and pipe them to BOTH Hanzo Vector (semantic) AND Hanzo Search (keyword) under the tenant index {owner}-{store}-docs — the same index /v1/chat retrieval reads. The source is pluggable: \"upload\" (inline files/documents), \"github\" (index a repo), \"crawl\" (web), or \"s3\" (the store's object-storage space). The owner is bound to the authenticated principal; the client-supplied owner is never trusted.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRagIngest200Response>
*/
open class func postAiRagIngestWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRagIngest200Response> {
let localVariablePath = "/v1/ai/rag/ingest"
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<PostAiRagIngest200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve the top-K chunks relevant to a query, scoped to a single uploaded file (`file_id`).
- parameter apiConfiguration: The configuration for the http request.
- returns: [DocSearchResult]
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRagQuery(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> [DocSearchResult] {
return try await postAiRagQueryWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve the top-K chunks relevant to a query, scoped to a single uploaded file (`file_id`).
- POST /v1/ai/rag/query
- Retrieve the top-K chunks relevant to a query, scoped to a single uploaded file (`file_id`). Hybrid keyword+vector retrieval over the same index. Consolidates the retired chat-rag-api POST /query.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<[DocSearchResult]>
*/
open class func postAiRagQueryWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<[DocSearchResult]> {
let localVariablePath = "/v1/ai/rag/query"
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<[DocSearchResult]>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Retrieve the top-K chunks relevant to a query, scoped to a SET of uploaded files (`file_ids`).
- parameter apiConfiguration: The configuration for the http request.
- returns: [DocSearchResult]
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRagQueryMultiple(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> [DocSearchResult] {
return try await postAiRagQueryMultipleWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Retrieve the top-K chunks relevant to a query, scoped to a SET of uploaded files (`file_ids`).
- POST /v1/ai/rag/query-multiple
- Retrieve the top-K chunks relevant to a query, scoped to a SET of uploaded files (`file_ids`). Consolidates the retired chat-rag-api POST /query_multiple. Shares one retrieval path with /rag/query.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<[DocSearchResult]>
*/
open class func postAiRagQueryMultipleWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<[DocSearchResult]> {
let localVariablePath = "/v1/ai/rag/query-multiple"
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<[DocSearchResult]>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a record
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRecords200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRecords(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRecords200Response {
return try await postAiRecordsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a record
- POST /v1/ai/records
- Create one record.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRecords200Response>
*/
open class func postAiRecordsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRecords200Response> {
let localVariablePath = "/v1/ai/records"
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<PostAiRecords200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Batch (record)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRecordsBatch(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiRecordsBatchWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Batch (record)
- POST /v1/ai/records/batch
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiRecordsBatchWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/records/batch"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Commit (record)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRecordsCommit(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiRecordsCommitWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Commit (record)
- POST /v1/ai/records/commit
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiRecordsCommitWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/records/commit"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Commit Second (record)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRecordsCommitSecond(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiRecordsCommitSecondWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Commit Second (record)
- POST /v1/ai/records/commit-second
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiRecordsCommitSecondWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/records/commit-second"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a connection
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRemoteConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRemoteConnections(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRemoteConnections200Response {
return try await postAiRemoteConnectionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a connection
- POST /v1/ai/remote-connections
- Create one connection.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRemoteConnections200Response>
*/
open class func postAiRemoteConnectionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRemoteConnections200Response> {
let localVariablePath = "/v1/ai/remote-connections"
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<PostAiRemoteConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Start (connection)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRemoteConnectionsByOwnerByNameStart(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiRemoteConnectionsByOwnerByNameStartWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Start (connection)
- POST /v1/ai/remote-connections/{owner}/{name}/start
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiRemoteConnectionsByOwnerByNameStartWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/remote-connections/{owner}/{name}/start"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Stop (connection)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRemoteConnectionsByOwnerByNameStop(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiRemoteConnectionsByOwnerByNameStopWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Stop (connection)
- POST /v1/ai/remote-connections/{owner}/{name}/stop
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiRemoteConnectionsByOwnerByNameStopWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/remote-connections/{owner}/{name}/stop"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRouterArtifactMeta(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await postAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- POST /v1/ai/router/artifact-meta
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func postAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/artifact-meta"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRouterDefaults(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await postAiRouterDefaultsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- POST /v1/ai/router/defaults
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func postAiRouterDefaultsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/defaults"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRouterLedger(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await postAiRouterLedgerWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- POST /v1/ai/router/ledger
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func postAiRouterLedgerWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/ledger"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRouterPolicy(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await postAiRouterPolicyWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- POST /v1/ai/router/policy
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func postAiRouterPolicyWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/policy"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRouterRewards(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await postAiRouterRewardsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- POST /v1/ai/router/rewards
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func postAiRouterRewardsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/rewards"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a model-route
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRoutes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiRoutes(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRoutes200Response {
return try await postAiRoutesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a model-route
- POST /v1/ai/routes
- Create one model-route.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRoutes200Response>
*/
open class func postAiRoutesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRoutes200Response> {
let localVariablePath = "/v1/ai/routes"
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<PostAiRoutes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a scale
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScales200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiScales(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScales200Response {
return try await postAiScalesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a scale
- POST /v1/ai/scales
- Create one scale.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScales200Response>
*/
open class func postAiScalesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScales200Response> {
let localVariablePath = "/v1/ai/scales"
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<PostAiScales200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a scan
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScans200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiScans(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScans200Response {
return try await postAiScansWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a scan
- POST /v1/ai/scans
- Create one scan.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScans200Response>
*/
open class func postAiScansWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScans200Response> {
let localVariablePath = "/v1/ai/scans"
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<PostAiScans200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Signin
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiSignin(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiSigninWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Signin
- POST /v1/ai/signin
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiSigninWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/signin"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a session
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiSigninSessions200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiSigninSessions(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiSigninSessions200Response {
return try await postAiSigninSessionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a session
- POST /v1/ai/signin-sessions
- Create one session.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiSigninSessions200Response>
*/
open class func postAiSigninSessionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiSigninSessions200Response> {
let localVariablePath = "/v1/ai/signin-sessions"
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<PostAiSigninSessions200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Signout
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiSignout(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiSignoutWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Signout
- POST /v1/ai/signout
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiSignoutWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/signout"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a store
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiStores200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiStores(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiStores200Response {
return try await postAiStoresWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a store
- POST /v1/ai/stores
- Create one store.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiStores200Response>
*/
open class func postAiStoresWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiStores200Response> {
let localVariablePath = "/v1/ai/stores"
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<PostAiStores200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Vectors (store)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiStoresByOwnerByNameVectors(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiStoresByOwnerByNameVectorsWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Vectors (store)
- POST /v1/ai/stores/{owner}/{name}/vectors
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiStoresByOwnerByNameVectorsWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/stores/{owner}/{name}/vectors"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a task
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTasks200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiTasks(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTasks200Response {
return try await postAiTasksWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a task
- POST /v1/ai/tasks
- Create one task.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTasks200Response>
*/
open class func postAiTasksWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTasks200Response> {
let localVariablePath = "/v1/ai/tasks"
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<PostAiTasks200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Analyze (task)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiTasksByOwnerByNameAnalyze(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiTasksByOwnerByNameAnalyzeWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Analyze (task)
- POST /v1/ai/tasks/{owner}/{name}/analyze
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiTasksByOwnerByNameAnalyzeWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/tasks/{owner}/{name}/analyze"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Document (task)
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiTasksByOwnerByNameDocument(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiTasksByOwnerByNameDocumentWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Document (task)
- POST /v1/ai/tasks/{owner}/{name}/document
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiTasksByOwnerByNameDocumentWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
var localVariablePath = "/v1/ai/tasks/{owner}/{name}/document"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a template
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTemplates200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiTemplates(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTemplates200Response {
return try await postAiTemplatesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a template
- POST /v1/ai/templates
- Create one template.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTemplates200Response>
*/
open class func postAiTemplatesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTemplates200Response> {
let localVariablePath = "/v1/ai/templates"
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<PostAiTemplates200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a tree-file
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTreeFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiTreeFiles(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTreeFiles200Response {
return try await postAiTreeFilesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a tree-file
- POST /v1/ai/tree-files
- Create one tree-file.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTreeFiles200Response>
*/
open class func postAiTreeFilesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTreeFiles200Response> {
let localVariablePath = "/v1/ai/tree-files"
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<PostAiTreeFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a vector
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVectors200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiVectors(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVectors200Response {
return try await postAiVectorsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a vector
- POST /v1/ai/vectors
- Create one vector.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVectors200Response>
*/
open class func postAiVectorsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVectors200Response> {
let localVariablePath = "/v1/ai/vectors"
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<PostAiVectors200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a video
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVideos200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiVideos(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVideos200Response {
return try await postAiVideosWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a video
- POST /v1/ai/videos
- Create one video.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVideos200Response>
*/
open class func postAiVideosWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVideos200Response> {
let localVariablePath = "/v1/ai/videos"
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<PostAiVideos200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Upload (video)
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiVideosUpload(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await postAiVideosUploadWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Upload (video)
- POST /v1/ai/videos/upload
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func postAiVideosUploadWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/videos/upload"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Create a workflow
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiWorkflows200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAiWorkflows(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiWorkflows200Response {
return try await postAiWorkflowsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Create a workflow
- POST /v1/ai/workflows
- Create one workflow.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiWorkflows200Response>
*/
open class func postAiWorkflowsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiWorkflows200Response> {
let localVariablePath = "/v1/ai/workflows"
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<PostAiWorkflows200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively.
- 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 postAudioFoley(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postAudioFoleyWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively.
- POST /v1/audio/foley
- Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively. It resolves the SKU and, for a Zen model, forwards to zen's matching verb billed per call at the discovered price. These verbs are Zen-native; a non-Zen model is rejected.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postAudioFoleyWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/audio/foley"
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: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively.
- 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 postAudioMusic(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postAudioMusicWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively.
- POST /v1/audio/music
- Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively. It resolves the SKU and, for a Zen model, forwards to zen's matching verb billed per call at the discovered price. These verbs are Zen-native; a non-Zen model is rejected.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postAudioMusicWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/audio/music"
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: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The OpenAI-compatible TTS endpoint (POST /v1/audio/speech).
- 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 postAudioSpeech(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postAudioSpeechWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The OpenAI-compatible TTS endpoint (POST /v1/audio/speech).
- POST /v1/audio/speech
- The OpenAI-compatible TTS endpoint (POST /v1/audio/speech). It authenticates the caller, resolves `model` to its TTS provider (the SAME model-route resolution the chat/images/video endpoints use — so a BYO node registered as a TTS provider works transparently), synthesizes the audio, and streams the bytes back. This is the ONE way to synthesize speech: OpenAI-shaped, with no store or message coupling, so a caller needs no chat to speak.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postAudioSpeechWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/audio/speech"
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: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The OpenAI-compatible STT endpoint (POST /v1/audio/transcriptions, multipart: file + model [+ language + response_format]).
- parameter apiConfiguration: The configuration for the http request.
- returns: OpenaiAudioResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postAudioTranscriptions(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> OpenaiAudioResponse {
return try await postAudioTranscriptionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The OpenAI-compatible STT endpoint (POST /v1/audio/transcriptions, multipart: file + model [+ language + response_format]).
- POST /v1/audio/transcriptions
- The OpenAI-compatible STT endpoint (POST /v1/audio/transcriptions, multipart: file + model [+ language + response_format]). It mirrors AudioSpeech exactly: authenticate the caller, resolve `model` to its STT provider through the SAME model-route resolution (so the in-cluster speech service — or any BYO node registered as an STT provider — works transparently), transcribe, and return the OpenAI body. This is the ONE way to transcribe: OpenAI-shaped, with no store coupling, so a caller needs no chat to be heard.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<OpenaiAudioResponse>
*/
open class func postAudioTranscriptionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<OpenaiAudioResponse> {
let localVariablePath = "/v1/audio/transcriptions"
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<OpenaiAudioResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively.
- 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 postAudioVoice(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postAudioVoiceWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively.
- POST /v1/audio/voice
- Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively. It resolves the SKU and, for a Zen model, forwards to zen's matching verb billed per call at the discovered price. These verbs are Zen-native; a non-Zen model is rejected.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postAudioVoiceWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/audio/voice"
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: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements the OpenAI-compatible chat completions API
- parameter apiConfiguration: The configuration for the http request.
- returns: OpenaiChatCompletionResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postChat(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> OpenaiChatCompletionResponse {
return try await postChatWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements the OpenAI-compatible chat completions API
- POST /v1/chat
- Implements the OpenAI-compatible chat completions API
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<OpenaiChatCompletionResponse>
*/
open class func postChatWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<OpenaiChatCompletionResponse> {
let localVariablePath = "/v1/chat"
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<OpenaiChatCompletionResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements the OpenAI-compatible chat completions API
- parameter apiConfiguration: The configuration for the http request.
- returns: OpenaiChatCompletionResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postChatCompletions(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> OpenaiChatCompletionResponse {
return try await postChatCompletionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements the OpenAI-compatible chat completions API
- POST /v1/chat/completions
- Implements the OpenAI-compatible chat completions API
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<OpenaiChatCompletionResponse>
*/
open class func postChatCompletionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<OpenaiChatCompletionResponse> {
let localVariablePath = "/v1/chat/completions"
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<OpenaiChatCompletionResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Serves one completion to a caller with no account.
- parameter apiConfiguration: The configuration for the http request.
- returns: OpenaiChatCompletionResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postChatPublic(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> OpenaiChatCompletionResponse {
return try await postChatPublicWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Serves one completion to a caller with no account.
- POST /v1/chat/public
- Serves one completion to a caller with no account.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<OpenaiChatCompletionResponse>
*/
open class func postChatPublicWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<OpenaiChatCompletionResponse> {
let localVariablePath = "/v1/chat/public"
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<OpenaiChatCompletionResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements the OpenAI-compatible chat completions API
- parameter apiConfiguration: The configuration for the http request.
- returns: OpenaiChatCompletionResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postCompletions(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> OpenaiChatCompletionResponse {
return try await postCompletionsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements the OpenAI-compatible chat completions API
- POST /v1/completions
- Implements the OpenAI-compatible chat completions API
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<OpenaiChatCompletionResponse>
*/
open class func postCompletionsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<OpenaiChatCompletionResponse> {
let localVariablePath = "/v1/completions"
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<OpenaiChatCompletionResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements POST /v1/embeddings (OpenAI-compatible).
- parameter apiConfiguration: The configuration for the http request.
- returns: OpenaiEmbeddingResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postEmbeddings(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> OpenaiEmbeddingResponse {
return try await postEmbeddingsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements POST /v1/embeddings (OpenAI-compatible).
- POST /v1/embeddings
- Implements POST /v1/embeddings (OpenAI-compatible). Body: {\"model\": \"...\", \"input\": \"...\"|[\"...\", ...], \"encoding_format\"?, \"dimensions\"?} It authenticates the caller, resolves the model to its upstream provider via the shared routing table, rewrites the user-facing model name to the upstream id, and proxies the request to the provider's /embeddings endpoint verbatim.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<OpenaiEmbeddingResponse>
*/
open class func postEmbeddingsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<OpenaiEmbeddingResponse> {
let localVariablePath = "/v1/embeddings"
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<OpenaiEmbeddingResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements POST /v1/images/generations (OpenAI-compatible).
- parameter apiConfiguration: The configuration for the http request.
- returns: OpenaiImageResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postImagesGenerations(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> OpenaiImageResponse {
return try await postImagesGenerationsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements POST /v1/images/generations (OpenAI-compatible).
- POST /v1/images/generations
- Implements POST /v1/images/generations (OpenAI-compatible). Body: {\"model\": \"...\", \"prompt\": \"...\", \"n\"?: int, \"size\"?: \"1024x1024\", \"response_format\"?: \"url\"|\"b64_json\"} It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-image* → do-ai fal diffusion), reserves the per-image budget, generates the image(s) through the do-ai async image client, records usage for billing, and returns the OpenAI images response.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<OpenaiImageResponse>
*/
open class func postImagesGenerationsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<OpenaiImageResponse> {
let localVariablePath = "/v1/images/generations"
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<OpenaiImageResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements the Anthropic Messages API.
- parameter apiConfiguration: The configuration for the http request.
- returns: AiAnthropicResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postMessages(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiAnthropicResponse {
return try await postMessagesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements the Anthropic Messages API.
- POST /v1/messages
- Implements the Anthropic Messages API.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiAnthropicResponse>
*/
open class func postMessagesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiAnthropicResponse> {
let localVariablePath = "/v1/messages"
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<AiAnthropicResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements POST /v1/messages/count_tokens.
- parameter apiConfiguration: The configuration for the http request.
- returns: AiTokenCount
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postMessagesCountTokens(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiTokenCount {
return try await postMessagesCountTokensWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements POST /v1/messages/count_tokens.
- POST /v1/messages/count_tokens
- Implements POST /v1/messages/count_tokens. Claude Code calls it before a request; it returns {\"input_tokens\": N} for the given model + messages + tools.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiTokenCount>
*/
open class func postMessagesCountTokensWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiTokenCount> {
let localVariablePath = "/v1/messages/count_tokens"
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<AiTokenCount>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Records the caller's waitlist request for a gated model and answers their new standing.
- parameter model: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostModelsByModelAccess200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postModelsByModelAccess(model: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostModelsByModelAccess200Response {
return try await postModelsByModelAccessWithRequestBuilder(model: model, apiConfiguration: apiConfiguration).execute().body
}
/**
Records the caller's waitlist request for a gated model and answers their new standing.
- POST /v1/models/{model}/access
- Records the caller's waitlist request for a gated model and answers their new standing. Authed, idempotent, and self-scoped: the row is keyed to the caller's own org and identity, never to a body-supplied owner.
- Bearer Token:
- type: http
- name: bearer
- parameter model: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostModelsByModelAccess200Response>
*/
open class func postModelsByModelAccessWithRequestBuilder(model: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostModelsByModelAccess200Response> {
var localVariablePath = "/v1/models/{model}/access"
let modelPreEscape = "\(APIHelper.mapValueToPathItem(model))"
let modelPostEscape = modelPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{model}", with: modelPostEscape, 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<PostModelsByModelAccess200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements POST /v1/rerank (Cohere/Jina-compatible).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiRanking
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postRerank(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiRanking {
return try await postRerankWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements POST /v1/rerank (Cohere/Jina-compatible).
- POST /v1/rerank
- Implements POST /v1/rerank (Cohere/Jina-compatible). Body: {\"model\": \"...\", \"query\": \"...\", \"documents\": [\"...\", ...]|[{\"text\":\"...\"}], \"top_n\"?: int, \"return_documents\"?: bool} Response: {\"object\":\"list\",\"model\":...,\"results\":[{\"index\",\"relevance_score\",\"document\"?}],\"usage\":{...}} Backend selection is provider-driven (one endpoint, one contract): - If the model routes to a native rerank provider (Jina/Cohere/Voyage) the request is proxied to that provider's /rerank endpoint. - Otherwise scores are computed as a real bi-encoder ranking: embed the query and documents through the resolved embedding model and rank by cosine similarity. No rerank-specific key required.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiRanking>
*/
open class func postRerankWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiRanking> {
let localVariablePath = "/v1/rerank"
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<AiRanking>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements POST /v1/responses.
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponsesResource
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postResponses(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponsesResource {
return try await postResponsesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements POST /v1/responses.
- POST /v1/responses
- Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponsesResource>
*/
open class func postResponsesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponsesResource> {
let localVariablePath = "/v1/responses"
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<AiResponsesResource>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Implements POST /v1/videos/generations — the ASYNC create.
- parameter apiConfiguration: The configuration for the http request.
- returns: AiVideoStatus
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postVideosGenerations(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiVideoStatus {
return try await postVideosGenerationsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Implements POST /v1/videos/generations — the ASYNC create.
- POST /v1/videos/generations
- Implements POST /v1/videos/generations — the ASYNC create. Body: {\"model\": \"...\", \"prompt\": \"...\", \"size\"?: \"1280x720\", \"seconds\"?: int} It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-video* / wan2-2-t2v-a14b → the spark-video backend), reserves the per-video budget (the balance gate), creates ONE upstream job, registers it in the in-pod store, and returns the OpenAI-shaped video object with status \"queued\" IMMEDIATELY. The client then polls GET /v1/videos/{id} and downloads GET /v1/videos/{id}/content. Nothing is billed here — the debit lands on completion.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiVideoStatus>
*/
open class func postVideosGenerationsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiVideoStatus> {
let localVariablePath = "/v1/videos/generations"
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<AiVideoStatus>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a article
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiArticles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiArticlesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiArticles200Response {
return try await putAiArticlesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a article
- PUT /v1/ai/articles/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiArticles200Response>
*/
open class func putAiArticlesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiArticles200Response> {
var localVariablePath = "/v1/ai/articles/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiArticles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a asset
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiAssets200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiAssetsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiAssets200Response {
return try await putAiAssetsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a asset
- PUT /v1/ai/assets/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiAssets200Response>
*/
open class func putAiAssetsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiAssets200Response> {
var localVariablePath = "/v1/ai/assets/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiAssets200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a chat
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiChats200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiChatsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiChats200Response {
return try await putAiChatsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a chat
- PUT /v1/ai/chats/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiChats200Response>
*/
open class func putAiChatsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiChats200Response> {
var localVariablePath = "/v1/ai/chats/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiChats200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a application
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiDeployments200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiDeploymentsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiDeployments200Response {
return try await putAiDeploymentsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a application
- PUT /v1/ai/deployments/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiDeployments200Response>
*/
open class func putAiDeploymentsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiDeployments200Response> {
var localVariablePath = "/v1/ai/deployments/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiDeployments200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a file
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiFilesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiFiles200Response {
return try await putAiFilesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a file
- PUT /v1/ai/files/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiFiles200Response>
*/
open class func putAiFilesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiFiles200Response> {
var localVariablePath = "/v1/ai/files/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a form
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiForms200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiFormsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiForms200Response {
return try await putAiFormsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a form
- PUT /v1/ai/forms/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiForms200Response>
*/
open class func putAiFormsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiForms200Response> {
var localVariablePath = "/v1/ai/forms/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiForms200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a graph
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiGraphs200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiGraphsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiGraphs200Response {
return try await putAiGraphsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a graph
- PUT /v1/ai/graphs/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiGraphs200Response>
*/
open class func putAiGraphsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiGraphs200Response> {
var localVariablePath = "/v1/ai/graphs/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiGraphs200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a message
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiMessages200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiMessagesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiMessages200Response {
return try await putAiMessagesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a message
- PUT /v1/ai/messages/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiMessages200Response>
*/
open class func putAiMessagesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiMessages200Response> {
var localVariablePath = "/v1/ai/messages/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiMessages200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a node
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiNodes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiNodesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiNodes200Response {
return try await putAiNodesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a node
- PUT /v1/ai/nodes/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiNodes200Response>
*/
open class func putAiNodesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiNodes200Response> {
var localVariablePath = "/v1/ai/nodes/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiNodes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiOrgSettings(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await putAiOrgSettingsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PUT /v1/ai/org/settings
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func putAiOrgSettingsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiOrgSettingsList(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await putAiOrgSettingsListWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PUT /v1/ai/org/settings/list
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func putAiOrgSettingsListWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/org/settings/list"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Preferences
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiPreferences(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await putAiPreferencesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Preferences
- PUT /v1/ai/preferences
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func putAiPreferencesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/preferences"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a provider
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiProviders200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiProvidersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiProviders200Response {
return try await putAiProvidersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a provider
- PUT /v1/ai/providers/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiProviders200Response>
*/
open class func putAiProvidersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiProviders200Response> {
var localVariablePath = "/v1/ai/providers/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiProviders200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a record
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRecords200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiRecordsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRecords200Response {
return try await putAiRecordsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a record
- PUT /v1/ai/records/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRecords200Response>
*/
open class func putAiRecordsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRecords200Response> {
var localVariablePath = "/v1/ai/records/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRecords200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a connection
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRemoteConnections200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiRemoteConnectionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRemoteConnections200Response {
return try await putAiRemoteConnectionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a connection
- PUT /v1/ai/remote-connections/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRemoteConnections200Response>
*/
open class func putAiRemoteConnectionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRemoteConnections200Response> {
var localVariablePath = "/v1/ai/remote-connections/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRemoteConnections200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiRouterArtifactMeta(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await putAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PUT /v1/ai/router/artifact-meta
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func putAiRouterArtifactMetaWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/artifact-meta"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiRouterDefaults(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await putAiRouterDefaultsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PUT /v1/ai/router/defaults
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func putAiRouterDefaultsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/defaults"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiRouterLedger(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await putAiRouterLedgerWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PUT /v1/ai/router/ledger
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func putAiRouterLedgerWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/ledger"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiRouterPolicy(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await putAiRouterPolicyWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PUT /v1/ai/router/policy
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func putAiRouterPolicyWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/policy"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- parameter apiConfiguration: The configuration for the http request.
- returns: AiResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiRouterRewards(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> AiResponse {
return try await putAiRouterRewardsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]).
- PUT /v1/ai/router/rewards
- The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed. Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth. Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<AiResponse>
*/
open class func putAiRouterRewardsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<AiResponse> {
let localVariablePath = "/v1/ai/router/rewards"
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<AiResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a model-route
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiRoutes200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiRoutesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiRoutes200Response {
return try await putAiRoutesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a model-route
- PUT /v1/ai/routes/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiRoutes200Response>
*/
open class func putAiRoutesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiRoutes200Response> {
var localVariablePath = "/v1/ai/routes/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiRoutes200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a scale
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScales200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiScalesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScales200Response {
return try await putAiScalesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a scale
- PUT /v1/ai/scales/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScales200Response>
*/
open class func putAiScalesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScales200Response> {
var localVariablePath = "/v1/ai/scales/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiScales200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a scan
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiScans200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiScansByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiScans200Response {
return try await putAiScansByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a scan
- PUT /v1/ai/scans/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiScans200Response>
*/
open class func putAiScansByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiScans200Response> {
var localVariablePath = "/v1/ai/scans/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiScans200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a session
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiSigninSessions200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiSigninSessionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiSigninSessions200Response {
return try await putAiSigninSessionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a session
- PUT /v1/ai/signin-sessions/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiSigninSessions200Response>
*/
open class func putAiSigninSessionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiSigninSessions200Response> {
var localVariablePath = "/v1/ai/signin-sessions/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiSigninSessions200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a store
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiStores200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiStoresByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiStores200Response {
return try await putAiStoresByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a store
- PUT /v1/ai/stores/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiStores200Response>
*/
open class func putAiStoresByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiStores200Response> {
var localVariablePath = "/v1/ai/stores/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiStores200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a task
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTasks200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiTasksByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTasks200Response {
return try await putAiTasksByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a task
- PUT /v1/ai/tasks/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTasks200Response>
*/
open class func putAiTasksByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTasks200Response> {
var localVariablePath = "/v1/ai/tasks/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTasks200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a template
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTemplates200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiTemplatesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTemplates200Response {
return try await putAiTemplatesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a template
- PUT /v1/ai/templates/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTemplates200Response>
*/
open class func putAiTemplatesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTemplates200Response> {
var localVariablePath = "/v1/ai/templates/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTemplates200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Training Contribution
- parameter apiConfiguration: The configuration for the http request.
- returns: Envelope
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiTrainingContribution(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Envelope {
return try await putAiTrainingContributionWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Training Contribution
- PUT /v1/ai/training-contribution
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Envelope>
*/
open class func putAiTrainingContributionWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Envelope> {
let localVariablePath = "/v1/ai/training-contribution"
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<Envelope>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a tree-file
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiTreeFiles200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiTreeFilesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiTreeFiles200Response {
return try await putAiTreeFilesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a tree-file
- PUT /v1/ai/tree-files/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiTreeFiles200Response>
*/
open class func putAiTreeFilesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiTreeFiles200Response> {
var localVariablePath = "/v1/ai/tree-files/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiTreeFiles200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a vector
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVectors200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiVectorsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVectors200Response {
return try await putAiVectorsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a vector
- PUT /v1/ai/vectors/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVectors200Response>
*/
open class func putAiVectorsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVectors200Response> {
var localVariablePath = "/v1/ai/vectors/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiVectors200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a video
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiVideos200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiVideosByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiVideos200Response {
return try await putAiVideosByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a video
- PUT /v1/ai/videos/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiVideos200Response>
*/
open class func putAiVideosByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiVideos200Response> {
var localVariablePath = "/v1/ai/videos/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiVideos200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replace a workflow
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: PostAiWorkflows200Response
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putAiWorkflowsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PostAiWorkflows200Response {
return try await putAiWorkflowsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Replace a workflow
- PUT /v1/ai/workflows/{owner}/{name}
- Identical to PATCH — the handler takes a whole object either way.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<PostAiWorkflows200Response>
*/
open class func putAiWorkflowsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PostAiWorkflows200Response> {
var localVariablePath = "/v1/ai/workflows/{owner}/{name}"
let ownerPreEscape = "\(APIHelper.mapValueToPathItem(owner))"
let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil)
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, 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<PostAiWorkflows200Response>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
}