Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
The projection these were generated from predated the compute migration, so
they described /v1/visor — which the API serves at zero paths now.

No /v1/visor path survives here.
2026-09-05 18:55:38 -07:00

6904 lines
431 KiB
Swift

//
// IamAPI.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
open class IamAPI {
/**
Adds an identity provider your people can sign in with, or a service your applications send through — a social or enterprise login, an email or SMS sender, a storage or payment connector.
- parameter iamProvider: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamProviderResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func addProvider(iamProvider: IamProvider, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamProviderResult {
return try await addProviderWithRequestBuilder(iamProvider: iamProvider, apiConfiguration: apiConfiguration).execute().body
}
/**
Adds an identity provider your people can sign in with, or a service your applications send through — a social or enterprise login, an email or SMS sender, a storage or payment connector.
- POST /v1/iam/providers
- Adds an identity provider your people can sign in with, or a service your applications send through — a social or enterprise login, an email or SMS sender, a storage or payment connector. A provider is configured once and then switched on per application, so several applications can share one set of credentials.
- Bearer Token:
- type: http
- name: bearer
- parameter iamProvider: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamProviderResult>
*/
open class func addProviderWithRequestBuilder(iamProvider: IamProvider, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamProviderResult> {
let localVariablePath = "/v1/iam/providers"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamProvider, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamProviderResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Records an access token — the credential an application or integration presents on a caller's behalf.
- parameter iamToken: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTokenResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func addToken(iamToken: IamToken, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTokenResult {
return try await addTokenWithRequestBuilder(iamToken: iamToken, apiConfiguration: apiConfiguration).execute().body
}
/**
Records an access token — the credential an application or integration presents on a caller's behalf.
- POST /v1/iam/tokens
- Records an access token — the credential an application or integration presents on a caller's behalf.
- Bearer Token:
- type: http
- name: bearer
- parameter iamToken: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTokenResult>
*/
open class func addTokenWithRequestBuilder(iamToken: IamToken, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTokenResult> {
let localVariablePath = "/v1/iam/tokens"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamToken, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamTokenResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Registers a passkey or security key for a person, so they can sign in with their device instead of a password.
- parameter iamWebauthnCredential: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWebauthnCredentialResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func addWebauthnCredential(iamWebauthnCredential: IamWebauthnCredential, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWebauthnCredentialResult {
return try await addWebauthnCredentialWithRequestBuilder(iamWebauthnCredential: iamWebauthnCredential, apiConfiguration: apiConfiguration).execute().body
}
/**
Registers a passkey or security key for a person, so they can sign in with their device instead of a password.
- POST /v1/iam/webauthn-credentials
- Registers a passkey or security key for a person, so they can sign in with their device instead of a password.
- Bearer Token:
- type: http
- name: bearer
- parameter iamWebauthnCredential: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWebauthnCredentialResult>
*/
open class func addWebauthnCredentialWithRequestBuilder(iamWebauthnCredential: IamWebauthnCredential, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWebauthnCredentialResult> {
let localVariablePath = "/v1/iam/webauthn-credentials"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamWebauthnCredential, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamWebauthnCredentialResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Makes a new organization — the account your users, applications, roles, projects and workspaces are all named inside.
- parameter iamCreateOrganizationInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamOrganization
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func createOrganization(iamCreateOrganizationInput: IamCreateOrganizationInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamOrganization {
return try await createOrganizationWithRequestBuilder(iamCreateOrganizationInput: iamCreateOrganizationInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Makes a new organization — the account your users, applications, roles, projects and workspaces are all named inside.
- POST /v1/iam/organizations
- Makes a new organization — the account your users, applications, roles, projects and workspaces are all named inside. It is the first write in a new tenant, and a name already in use is refused rather than taken over.
- Bearer Token:
- type: http
- name: bearer
- parameter iamCreateOrganizationInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamOrganization>
*/
open class func createOrganizationWithRequestBuilder(iamCreateOrganizationInput: IamCreateOrganizationInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamOrganization> {
let localVariablePath = "/v1/iam/organizations"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamCreateOrganizationInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamOrganization>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Records a sign-in and answers with the cookie id it minted.
- parameter iamCreateSessionIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamSession
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func createSession(iamCreateSessionIn: IamCreateSessionIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamSession {
return try await createSessionWithRequestBuilder(iamCreateSessionIn: iamCreateSessionIn, apiConfiguration: apiConfiguration).execute().body
}
/**
Records a sign-in and answers with the cookie id it minted.
- POST /v1/iam/sessions
- Records a sign-in and answers with the cookie id it minted. Signing in again from another browser adds to the session rather than replacing it, so one person can be signed in from a laptop and a phone at once. Ask for an exclusive sign-in and the opposite holds: the new sign-in is the only one left and every other browser is signed out. That is the setting to use when one person may hold only one live session at a time.
- Bearer Token:
- type: http
- name: bearer
- parameter iamCreateSessionIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamSession>
*/
open class func createSessionWithRequestBuilder(iamCreateSessionIn: IamCreateSessionIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamSession> {
let localVariablePath = "/v1/iam/sessions"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamCreateSessionIn, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamSession>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes an application.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamDeleteResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamApplicationsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamDeleteResult {
return try await deleteIamApplicationsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes an application.
- DELETE /v1/iam/applications/{owner}/{name}
- Removes an application. Anyone mid-sign-in through it is turned away and its client credentials stop working, so retire the integration before deleting it.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamDeleteResult>
*/
open class func deleteIamApplicationsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamDeleteResult> {
var localVariablePath = "/v1/iam/applications/{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<IamDeleteResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes an audit entry.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamDeleteOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamAuditLogsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamDeleteOutput {
return try await deleteIamAuditLogsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes an audit entry.
- DELETE /v1/iam/audit-logs/{owner}/{name}
- Removes an audit entry. Retention policy is normally what should expire a trail; deleting by hand leaves a gap a reviewer will notice.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamDeleteOutput>
*/
open class func deleteIamAuditLogsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamDeleteOutput> {
var localVariablePath = "/v1/iam/audit-logs/{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<IamDeleteOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes a signing certificate.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamCertsDeleteOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamCertsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamCertsDeleteOutput {
return try await deleteIamCertsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes a signing certificate.
- DELETE /v1/iam/certs/{owner}/{name}
- Removes a signing certificate. Tokens signed with it can no longer be verified, so retire it only once nothing is still presenting them.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamCertsDeleteOutput>
*/
open class func deleteIamCertsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamCertsDeleteOutput> {
var localVariablePath = "/v1/iam/certs/{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<IamCertsDeleteOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Withdraws an invitation.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamInvitationsDeleteOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamInvitationsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamInvitationsDeleteOutput {
return try await deleteIamInvitationsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Withdraws an invitation.
- DELETE /v1/iam/invitations/{owner}/{name}
- Withdraws an invitation. It stops being redeemable at once; anyone who already joined through it keeps their account.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamInvitationsDeleteOutput>
*/
open class func deleteIamInvitationsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamInvitationsDeleteOutput> {
var localVariablePath = "/v1/iam/invitations/{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<IamInvitationsDeleteOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Revokes an API key.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamDeleteResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamKeysByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamDeleteResponse {
return try await deleteIamKeysByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Revokes an API key.
- DELETE /v1/iam/keys/{owner}/{name}
- Revokes an API key. Anything still presenting it stops being authorized at once, so roll the replacement out before you revoke.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamDeleteResponse>
*/
open class func deleteIamKeysByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamDeleteResponse> {
var localVariablePath = "/v1/iam/keys/{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<IamDeleteResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Turns a factor off, so sign-in stops asking for it.
- 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 deleteIamMfa(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await deleteIamMfaWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Turns a factor off, so sign-in stops asking for it.
- DELETE /v1/iam/mfa
- Turns a factor off, so sign-in stops asking for it. Naming no factor turns off ALL of them — the reset path. People may do this for themselves; doing it for somebody else takes an administrator, which is what makes it the way back in when a phone is lost. The recovery codes go with the last factor: they are the way past a challenge, so keeping them alive for an account with nothing to challenge would leave a standing credential behind.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func deleteIamMfaWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/mfa"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Revokes a permission.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamPermissionDeleteResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamPermissionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamPermissionDeleteResponse {
return try await deleteIamPermissionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Revokes a permission.
- DELETE /v1/iam/permissions/{owner}/{name}
- Revokes a permission. Everyone who held access only through it loses that access immediately; grants they hold by another route are untouched.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamPermissionDeleteResponse>
*/
open class func deleteIamPermissionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamPermissionDeleteResponse> {
var localVariablePath = "/v1/iam/permissions/{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<IamPermissionDeleteResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes a project.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamProjectsDeleteOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamProjectsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamProjectsDeleteOutput {
return try await deleteIamProjectsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes a project.
- DELETE /v1/iam/projects/{owner}/{name}
- Removes a project. The people and roles in your organization are unchanged; what goes is the scope itself, so move anything addressed by it first.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamProjectsDeleteOutput>
*/
open class func deleteIamProjectsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamProjectsDeleteOutput> {
var localVariablePath = "/v1/iam/projects/{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<IamProjectsDeleteOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes a role.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamRolesDeleteOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamRolesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamRolesDeleteOutput {
return try await deleteIamRolesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes a role.
- DELETE /v1/iam/roles/{owner}/{name}
- Removes a role. Everyone in it loses the access it carried; their accounts, and any other role they hold, are untouched.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamRolesDeleteOutput>
*/
open class func deleteIamRolesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamRolesDeleteOutput> {
var localVariablePath = "/v1/iam/roles/{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<IamRolesDeleteOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Deprovisions a person — how removing someone in your identity provider removes their access here.
- parameter owner: (path)
- parameter name: (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 deleteIamScimV2UsersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await deleteIamScimV2UsersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Deprovisions a person — how removing someone in your identity provider removes their access here.
- DELETE /v1/iam/scim/v2/Users/{owner}/{name}
- Deprovisions a person — how removing someone in your identity provider removes their access here. Their sessions stop working immediately. Takes an administrator.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func deleteIamScimV2UsersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/iam/scim/v2/Users/{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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Serves DELETE /v1/iam/service-accounts/:name.
- parameter name: (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 deleteIamServiceAccountsByName(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await deleteIamServiceAccountsByNameWithRequestBuilder(name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Serves DELETE /v1/iam/service-accounts/:name.
- DELETE /v1/iam/service-accounts/{name}
- Serves DELETE /v1/iam/service-accounts/:name.
- Bearer Token:
- type: http
- name: bearer
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func deleteIamServiceAccountsByNameWithRequestBuilder(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/iam/service-accounts/{name}"
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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes a team.
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTeamsDeleteOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamTeamsByName(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTeamsDeleteOutput {
return try await deleteIamTeamsByNameWithRequestBuilder(name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes a team.
- DELETE /v1/iam/teams/{name}
- Removes a team. Everyone in it loses the access it carried; their accounts, and any other team they are in, are untouched.
- Bearer Token:
- type: http
- name: bearer
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTeamsDeleteOutput>
*/
open class func deleteIamTeamsByNameWithRequestBuilder(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTeamsDeleteOutput> {
var localVariablePath = "/v1/iam/teams/{name}"
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<IamTeamsDeleteOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes a person from your organization.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamUsersDeleteOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamUsersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamUsersDeleteOutput {
return try await deleteIamUsersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes a person from your organization.
- DELETE /v1/iam/users/{owner}/{name}
- Removes a person from your organization. Their sessions stop working immediately and the account is gone rather than suspended — to keep the record and only stop sign-in, update the user instead.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamUsersDeleteOutput>
*/
open class func deleteIamUsersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamUsersDeleteOutput> {
var localVariablePath = "/v1/iam/users/{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<IamUsersDeleteOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Clears the target user's key of the requested TYPE (immediate revoke).
- parameter owner: (path)
- parameter name: (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 deleteIamUsersByOwnerByNameKeys(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await deleteIamUsersByOwnerByNameKeysWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Clears the target user's key of the requested TYPE (immediate revoke).
- DELETE /v1/iam/users/{owner}/{name}/keys
- Clears the target user's key of the requested TYPE (immediate revoke). Scoped by the same `?type` field mint takes, so revoking the browser key leaves the server key working. A secret key's stored value is the sk- in its schema.Key row.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func deleteIamUsersByOwnerByNameKeysWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/iam/users/{owner}/{name}/keys"
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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes a workspace.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWorkspacesDeleteOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteIamWorkspacesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWorkspacesDeleteOutput {
return try await deleteIamWorkspacesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes a workspace.
- DELETE /v1/iam/workspaces/{owner}/{name}
- Removes a workspace. The people and roles in your organization are unchanged; what goes is the scope itself.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWorkspacesDeleteOutput>
*/
open class func deleteIamWorkspacesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWorkspacesDeleteOutput> {
var localVariablePath = "/v1/iam/workspaces/{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<IamWorkspacesDeleteOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes an organization and everything named inside it.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamDeleteOrganizationOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteOrganization(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamDeleteOrganizationOutput {
return try await deleteOrganizationWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes an organization and everything named inside it.
- DELETE /v1/iam/organizations/{owner}/{name}
- Removes an organization and everything named inside it. There is no undo, and every session issued under it stops working. The built-in admin organization cannot be deleted — losing it would leave the account with no way back in.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamDeleteOrganizationOutput>
*/
open class func deleteOrganizationWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamDeleteOrganizationOutput> {
var localVariablePath = "/v1/iam/organizations/{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<IamDeleteOrganizationOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes a provider.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamMutationResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteProvider(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamMutationResult {
return try await deleteProviderWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes a provider.
- DELETE /v1/iam/providers/{owner}/{name}
- Removes a provider. Sign-in through it stops for every application that used it, so give those applications another method first. A provider that is already gone answers \"nothing changed\" rather than an error, so the call is safe to repeat.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamMutationResult>
*/
open class func deleteProviderWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamMutationResult> {
var localVariablePath = "/v1/iam/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<IamMutationResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Signs a person out of one application — the session ends and every browser carrying it stops being authenticated.
- parameter owner: (path)
- parameter name: (path)
- parameter application: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamDeleteSessionOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteSession(owner: String, name: String, application: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamDeleteSessionOut {
return try await deleteSessionWithRequestBuilder(owner: owner, name: name, application: application, apiConfiguration: apiConfiguration).execute().body
}
/**
Signs a person out of one application — the session ends and every browser carrying it stops being authenticated.
- DELETE /v1/iam/sessions/{owner}/{name}/{application}
- Signs a person out of one application — the session ends and every browser carrying it stops being authenticated. A session that is already gone reports that nothing was deleted rather than an error, so the call is safe to repeat.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter application: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamDeleteSessionOut>
*/
open class func deleteSessionWithRequestBuilder(owner: String, name: String, application: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamDeleteSessionOut> {
var localVariablePath = "/v1/iam/sessions/{owner}/{name}/{application}"
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 applicationPreEscape = "\(APIHelper.mapValueToPathItem(application))"
let applicationPostEscape = applicationPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{application}", with: applicationPostEscape, 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<IamDeleteSessionOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Revokes an access token.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTokenMutation
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteToken(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTokenMutation {
return try await deleteTokenWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Revokes an access token.
- DELETE /v1/iam/tokens/{owner}/{name}
- Revokes an access token. Whatever was using it stops being authorized at once. A token that is already gone answers \"nothing changed\" rather than an error, so the call is safe to repeat.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTokenMutation>
*/
open class func deleteTokenWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTokenMutation> {
var localVariablePath = "/v1/iam/tokens/{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<IamTokenMutation>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Removes a passkey or security key — what you call when a device is lost.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWebauthnCredentialMutationResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func deleteWebauthnCredential(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWebauthnCredentialMutationResult {
return try await deleteWebauthnCredentialWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes a passkey or security key — what you call when a device is lost.
- DELETE /v1/iam/webauthn-credentials/{owner}/{name}
- Removes a passkey or security key — what you call when a device is lost. Make sure the person has another way to sign in first. A credential that is already gone answers \"nothing changed\" rather than an error, so the call is safe to repeat.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWebauthnCredentialMutationResult>
*/
open class func deleteWebauthnCredentialWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWebauthnCredentialMutationResult> {
var localVariablePath = "/v1/iam/webauthn-credentials/{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<IamWebauthnCredentialMutationResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the signed-in person's own account and the organization they belong to — what a console reads to draw the account menu.
- 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 getIamAccount(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamAccountWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the signed-in person's own account and the organization they belong to — what a console reads to draw the account menu.
- GET /v1/iam/account
- Returns the signed-in person's own account and the organization they belong to — what a console reads to draw the account menu. Passwords, API secrets and MFA material are stripped. It answers for a session cookie or a bearer token alike.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamAccountWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the applications in one organization, newest first — each product or site your people sign in to, with the sign-in methods and redirect URIs it allows.
- parameter owner: (query)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamApplicationListResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamApplications(owner: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamApplicationListResult {
return try await getIamApplicationsWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the applications in one organization, newest first — each product or site your people sign in to, with the sign-in methods and redirect URIs it allows.
- GET /v1/iam/applications
- Returns the applications in one organization, newest first — each product or site your people sign in to, with the sign-in methods and redirect URIs it allows.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamApplicationListResult>
*/
open class func getIamApplicationsWithRequestBuilder(owner: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamApplicationListResult> {
let localVariablePath = "/v1/iam/applications"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamApplicationListResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one application: its sign-in methods, its allowed redirect URIs and the client credentials your integration authenticates with.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamApplication
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamApplicationsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamApplication {
return try await getIamApplicationsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one application: its sign-in methods, its allowed redirect URIs and the client credentials your integration authenticates with.
- GET /v1/iam/applications/{owner}/{name}
- Returns one application: its sign-in methods, its allowed redirect URIs and the client credentials your integration authenticates with.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamApplication>
*/
open class func getIamApplicationsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamApplication> {
var localVariablePath = "/v1/iam/applications/{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<IamApplication>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns your organization's audit trail, newest first — who did what, when, and from where.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamAuditLogs(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListOutput {
return try await getIamAuditLogsWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's audit trail, newest first — who did what, when, and from where.
- GET /v1/iam/audit-logs
- Returns your organization's audit trail, newest first — who did what, when, and from where. It is the record you reach for during a security review or an incident. You see your own organization's audit trail and no one else's; which organization that is comes from your credentials, not from the request.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListOutput>
*/
open class func getIamAuditLogsWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListOutput> {
let localVariablePath = "/v1/iam/audit-logs"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one audit entry in full: the action, the person or key behind it, and the request it came in on.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAuditLog
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamAuditLogsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAuditLog {
return try await getIamAuditLogsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one audit entry in full: the action, the person or key behind it, and the request it came in on.
- GET /v1/iam/audit-logs/{owner}/{name}
- Returns one audit entry in full: the action, the person or key behind it, and the request it came in on.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAuditLog>
*/
open class func getIamAuditLogsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAuditLog> {
var localVariablePath = "/v1/iam/audit-logs/{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<IamAuditLog>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns everything a login screen needs to draw itself for one application: its branding, and each sign-in method it offers with the provider details that method needs.
- parameter clientId: (query) ClientId is the application&#39;s OAuth client id — the one field that selects which login screen this is. (optional)
- parameter responseType: (query) ResponseType is the OAuth response type the screen will ask for. Only \&quot;code\&quot; is served; anything else is refused here rather than at the authorize leg, where the person has already typed a password. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAnswer
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamAuthApplication(clientId: String? = nil, responseType: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAnswer {
return try await getIamAuthApplicationWithRequestBuilder(clientId: clientId, responseType: responseType, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns everything a login screen needs to draw itself for one application: its branding, and each sign-in method it offers with the provider details that method needs.
- GET /v1/iam/auth/application
- Returns everything a login screen needs to draw itself for one application: its branding, and each sign-in method it offers with the provider details that method needs. The client secret is masked. Read before anyone has signed in, so it carries only what is safe for a browser to see.
- Bearer Token:
- type: http
- name: bearer
- parameter clientId: (query) ClientId is the application&#39;s OAuth client id — the one field that selects which login screen this is. (optional)
- parameter responseType: (query) ResponseType is the OAuth response type the screen will ask for. Only \&quot;code\&quot; is served; anything else is refused here rather than at the authorize leg, where the person has already typed a password. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAnswer>
*/
open class func getIamAuthApplicationWithRequestBuilder(clientId: String? = nil, responseType: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAnswer> {
let localVariablePath = "/v1/iam/auth/application"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"clientId": (wrappedValue: clientId?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"responseType": (wrappedValue: responseType?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAnswer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the sign-in methods one application actually has switched on, so a login screen can render the right buttons for it without you hard-coding a list that drifts the moment you add a provider.
- parameter clientId: (query) ClientId is the application&#39;s OAuth client id. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAnswer
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamAuthMethods(clientId: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAnswer {
return try await getIamAuthMethodsWithRequestBuilder(clientId: clientId, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the sign-in methods one application actually has switched on, so a login screen can render the right buttons for it without you hard-coding a list that drifts the moment you add a provider.
- GET /v1/iam/auth/methods
- Returns the sign-in methods one application actually has switched on, so a login screen can render the right buttons for it without you hard-coding a list that drifts the moment you add a provider. Public by design: it is read before anyone has signed in, and it exposes only which methods exist, never their credentials.
- Bearer Token:
- type: http
- name: bearer
- parameter clientId: (query) ClientId is the application&#39;s OAuth client id. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAnswer>
*/
open class func getIamAuthMethodsWithRequestBuilder(clientId: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAnswer> {
let localVariablePath = "/v1/iam/auth/methods"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"clientId": (wrappedValue: clientId?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAnswer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns your organization's signing certificates, newest first — the keys the tokens your applications verify are signed with.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamCertsListOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamCerts(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamCertsListOutput {
return try await getIamCertsWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's signing certificates, newest first — the keys the tokens your applications verify are signed with.
- GET /v1/iam/certs
- Returns your organization's signing certificates, newest first — the keys the tokens your applications verify are signed with. Private key material is masked. You see your own organization's certificates and no one else's; which organization that is comes from your credentials, not from the request, so a query parameter can never widen the listing.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamCertsListOutput>
*/
open class func getIamCertsWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamCertsListOutput> {
let localVariablePath = "/v1/iam/certs"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamCertsListOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one signing certificate — its algorithm, its validity window and its public half.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamCert
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamCertsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamCert {
return try await getIamCertsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one signing certificate — its algorithm, its validity window and its public half.
- GET /v1/iam/certs/{owner}/{name}
- Returns one signing certificate — its algorithm, its validity window and its public half. The private key is masked.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamCert>
*/
open class func getIamCertsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamCert> {
var localVariablePath = "/v1/iam/certs/{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<IamCert>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the calling person's own privacy and communication choices.
- 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 getIamConsent(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamConsentWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the calling person's own privacy and communication choices.
- GET /v1/iam/consent
- Returns the calling person's own privacy and communication choices. Somebody who has never set them gets the defaults rather than nothing, so a consent screen always has something to show — insights on, and training UNANSWERED, which is the state that means the screen still has to ask.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamConsentWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/consent"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns your organization's invitations, newest first — who has been asked to join, on what terms, and how many seats each invitation still has left.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamInvitationsListOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamInvitations(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamInvitationsListOutput {
return try await getIamInvitationsWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's invitations, newest first — who has been asked to join, on what terms, and how many seats each invitation still has left.
- GET /v1/iam/invitations
- Returns your organization's invitations, newest first — who has been asked to join, on what terms, and how many seats each invitation still has left. You see your own organization's invitations and no one else's; which organization that is comes from your credentials, not from the request.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamInvitationsListOutput>
*/
open class func getIamInvitationsWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamInvitationsListOutput> {
let localVariablePath = "/v1/iam/invitations"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamInvitationsListOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one invitation: who it is for, what it grants on acceptance, and when it expires.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamInvitation
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamInvitationsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamInvitation {
return try await getIamInvitationsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one invitation: who it is for, what it grants on acceptance, and when it expires.
- GET /v1/iam/invitations/{owner}/{name}
- Returns one invitation: who it is for, what it grants on acceptance, and when it expires.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamInvitation>
*/
open class func getIamInvitationsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamInvitation> {
var localVariablePath = "/v1/iam/invitations/{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<IamInvitation>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns an organization's API keys, newest first — what each is called, what it may reach, and its publishable half.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamKeys(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListResponse {
return try await getIamKeysWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns an organization's API keys, newest first — what each is called, what it may reach, and its publishable half.
- GET /v1/iam/keys
- Returns an organization's API keys, newest first — what each is called, what it may reach, and its publishable half. Secret halves are never listed. Which organization comes from your credentials, not from the request: you read your own and no one else's. The capability that admits a confidential client to this collection does not itself name a tenant, so the tenant is decided here.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListResponse>
*/
open class func getIamKeysWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListResponse> {
let localVariablePath = "/v1/iam/keys"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one API key: what it is called, what it may reach, and when it was issued.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamKey
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamKeysByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamKey {
return try await getIamKeysByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one API key: what it is called, what it may reach, and when it was issued.
- GET /v1/iam/keys/{owner}/{name}
- Returns one API key: what it is called, what it may reach, and when it was issued.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamKey>
*/
open class func getIamKeysByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamKey> {
var localVariablePath = "/v1/iam/keys/{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<IamKey>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Resolve a PUBLISHABLE key to the organization that owns it
- 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 getIamKeysOrg(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamKeysOrgWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Resolve a PUBLISHABLE key to the organization that owns it
- GET /v1/iam/keys/org
- Answers which organization a publishable key belongs to — what a service calls to attribute a request that arrived carrying a key shipped in a browser. This is the noun spelling of `/v1/iam/resolve-key`, the same handler at the address that replaces it; both answer while callers migrate. It names an ORGANIZATION and never a person. No path through it loads or returns a user, so a key placed in client code cannot become a way to learn who anyone is — which is the whole reason this is a separate endpoint from the one below. A key that is expired, secret rather than publishable, or simply unknown all answer with the same sentence and a `code` saying which it was. Only a confidential service that has already proved it may resolve keys reads that code — there is no anonymous caller here to probe which keys exist — and telling those apart is what lets a holder be told to re-mint an expired key instead of hunting a configuration error.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamKeysOrgWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/keys/org"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Resolve a SECRET key to the principal it authenticates
- 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 getIamKeysPrincipal(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamKeysPrincipalWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Resolve a SECRET key to the principal it authenticates
- GET /v1/iam/keys/principal
- Answers who a secret key belongs to — the owner and name a gateway needs to attribute and bill a request that arrived carrying an `sk-`. This is the noun spelling of `/v1/iam/get-user?accessKey=`, the same handler at the address that replaces it; both answer while callers migrate. It resolves a KEY and nothing else. The verb it replaces also reads a user by `?id=`, and carrying that here would make this a second address for the user read — the exact thing being retired. Ask for a person by name at the user read; ask here only what a credential resolves to. Requires a confidential caller: the resolver authenticates as an app, so a request without that credential resolves nothing rather than falling back to an anonymous lookup. An unresolvable key answers with a `code` distinguishing expired from wrong-endpoint from unknown, so the holder can be told which one cure applies.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamKeysPrincipalWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/keys/principal"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns the sign-in identities linked to the calling person's account — every provider they can currently sign in with.
- 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 getIamLinkedAccounts(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamLinkedAccountsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the sign-in identities linked to the calling person's account — every provider they can currently sign in with.
- GET /v1/iam/linked-accounts
- Returns the sign-in identities linked to the calling person's account — every provider they can currently sign in with. It is what a security page lists next to the option to disconnect one.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamLinkedAccountsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/linked-accounts"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Answers either question about who belongs where: which organizations one person can act in, or who can act in one organization.
- parameter user: (query) User is \&quot;&lt;homeOrg&gt;/&lt;username&gt;\&quot; — which organizations that identity may act in. (optional)
- parameter org: (query) Org is an organization — who may act in it. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAnswer
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamMemberships(user: String? = nil, org: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAnswer {
return try await getIamMembershipsWithRequestBuilder(user: user, org: org, apiConfiguration: apiConfiguration).execute().body
}
/**
Answers either question about who belongs where: which organizations one person can act in, or who can act in one organization.
- GET /v1/iam/memberships
- Answers either question about who belongs where: which organizations one person can act in, or who can act in one organization. Both are org-scoped: a non-SuperAdmin may ask about ITS OWN org's roster, or about a user whose home org is its own, and nothing else. The bound comes from the verified credential via principal.Scope, so a request parameter can never widen it — a membership row names who may act and spend in an org, so a cross-tenant read is a customer roster leak.
- Bearer Token:
- type: http
- name: bearer
- parameter user: (query) User is \&quot;&lt;homeOrg&gt;/&lt;username&gt;\&quot; — which organizations that identity may act in. (optional)
- parameter org: (query) Org is an organization — who may act in it. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAnswer>
*/
open class func getIamMembershipsWithRequestBuilder(user: String? = nil, org: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAnswer> {
let localVariablePath = "/v1/iam/memberships"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"user": (wrappedValue: user?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"org": (wrappedValue: org?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAnswer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Starts a sign-in — the address you send a browser to, and the beginning of every OAuth and OpenID Connect flow.
- 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 getIamOauthAuthorize(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamOauthAuthorizeWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Starts a sign-in — the address you send a browser to, and the beginning of every OAuth and OpenID Connect flow.
- GET /v1/iam/oauth/authorize
- Starts a sign-in — the address you send a browser to, and the beginning of every OAuth and OpenID Connect flow. If the person is ALREADY signed in here, it does not ask them again: it returns them to the application with a one-time code and they never see this page. Otherwise it shows the right way to sign in for the application they are signing in to, or hands off to another identity provider if that is what they pick. A client can say what it wants with `prompt`: `none` means answer without any screen at all — with the code if a session exists, with an error if not, but never with a page; `login` means ask for the password again even if a session exists; `select_account` means let the person choose which identity to use. It returns only to an address the application has registered. That check happens before anything else, so a request naming an unregistered address is refused where the person can see it rather than being bounced onwards.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamOauthAuthorizeWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/authorize"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Completes the round-trip: it resolves and burns the single-use transaction (checking expiry + browser binding), exchanges and verifies the IdP response, links or provisions the local user, and mints the iam authorization code the relying party expects — then redirects to the original redirect_uri with code + state.
- 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 getIamOauthCallback(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamOauthCallbackWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Completes the round-trip: it resolves and burns the single-use transaction (checking expiry + browser binding), exchanges and verifies the IdP response, links or provisions the local user, and mints the iam authorization code the relying party expects — then redirects to the original redirect_uri with code + state.
- GET /v1/iam/oauth/callback
- Completes the round-trip: it resolves and burns the single-use transaction (checking expiry + browser binding), exchanges and verifies the IdP response, links or provisions the local user, and mints the iam authorization code the relying party expects — then redirects to the original redirect_uri with code + state.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamOauthCallbackWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/callback"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Ends a sign-in and sends the browser somewhere sensible.
- 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 getIamOauthLogout(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamOauthLogoutWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Ends a sign-in and sends the browser somewhere sensible.
- GET /v1/iam/oauth/logout
- Ends a sign-in and sends the browser somewhere sensible. Accepts GET or POST, so it works as a plain link. It ACTUALLY signs you out — worth stating, because a logout that computes a redirect and answers {\"status\":\"ok\"} while ending no session and revoking no token is worse than none: the person on the shared machine believes it worked. Three things happen here, in this order: 1. The browser session dies — sid revoked server-side AND the cookie expired (sessions.Clear). Server-side revocation is the load-bearing half: a copy of the cookie taken before logout must not still resolve. 2. The relying party's tokens are revoked when an id_token_hint names it, so the refresh token cannot mint a fresh access token after the human left. Revocation state is authoritative — a JWT's `exp` still reads valid for days, so expiry is necessary but never sufficient. 3. Only then is a redirect considered, and only to a REGISTERED uri. The open-redirect guard is unchanged: a redirect happens only when a VERIFIED id_token_hint identifies the application and that application has registered the target. Anything else refuses to redirect — nobody can turn your logout link into a redirect to a site of their choosing.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamOauthLogoutWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/logout"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns the profile claims for whoever the access token belongs to — the standard OpenID Connect way to find out who is calling you without your application storing anything itself.
- 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 getIamOauthUserinfo(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamOauthUserinfoWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the profile claims for whoever the access token belongs to — the standard OpenID Connect way to find out who is calling you without your application storing anything itself.
- GET /v1/iam/oauth/userinfo
- Returns the profile claims for whoever the access token belongs to — the standard OpenID Connect way to find out who is calling you without your application storing anything itself. The token must still be live: revoke it and this stops answering.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamOauthUserinfoWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/userinfo"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns the permissions in one organization, newest first — each one a grant saying which people or roles may do what, and to which resources.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamPermissionListResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamPermissions(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamPermissionListResponse {
return try await getIamPermissionsWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the permissions in one organization, newest first — each one a grant saying which people or roles may do what, and to which resources.
- GET /v1/iam/permissions
- Returns the permissions in one organization, newest first — each one a grant saying which people or roles may do what, and to which resources.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamPermissionListResponse>
*/
open class func getIamPermissionsWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamPermissionListResponse> {
let localVariablePath = "/v1/iam/permissions"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamPermissionListResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one permission: who it grants to, what it allows, and the resources it covers.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamPermission
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamPermissionsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamPermission {
return try await getIamPermissionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one permission: who it grants to, what it allows, and the resources it covers.
- GET /v1/iam/permissions/{owner}/{name}
- Returns one permission: who it grants to, what it allows, and the resources it covers.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamPermission>
*/
open class func getIamPermissionsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamPermission> {
var localVariablePath = "/v1/iam/permissions/{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<IamPermission>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns your organization's projects, newest first — the scope people pick between when their work is separated by product or client rather than by team.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamProjectsListOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamProjects(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamProjectsListOutput {
return try await getIamProjectsWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's projects, newest first — the scope people pick between when their work is separated by product or client rather than by team.
- GET /v1/iam/projects
- Returns your organization's projects, newest first — the scope people pick between when their work is separated by product or client rather than by team. You see your own organization's projects and no one else's; which organization that is comes from your credentials, not from the request.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamProjectsListOutput>
*/
open class func getIamProjectsWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamProjectsListOutput> {
let localVariablePath = "/v1/iam/projects"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamProjectsListOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one project: what it is called and how it is set up.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamProject
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamProjectsByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamProject {
return try await getIamProjectsByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one project: what it is called and how it is set up.
- GET /v1/iam/projects/{owner}/{name}
- Returns one project: what it is called and how it is set up.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamProject>
*/
open class func getIamProjectsByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamProject> {
var localVariablePath = "/v1/iam/projects/{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<IamProject>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Publishes the public key your registry uses to verify the tokens issued above — the one URL to configure so the registry trusts logins without holding any secret of its own.
- 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 getIamRegistryJwks(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamRegistryJwksWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Publishes the public key your registry uses to verify the tokens issued above — the one URL to configure so the registry trusts logins without holding any secret of its own.
- GET /v1/iam/registry/jwks
- Publishes the public key your registry uses to verify the tokens issued above — the one URL to configure so the registry trusts logins without holding any secret of its own. If no signing key is available it refuses rather than publishing an empty set, because a registry that trusts nothing looks identical to one that trusts everything until somebody tries to push.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamRegistryJwksWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/registry/jwks"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Signs a container client in to your registry.
- 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 getIamRegistryToken(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamRegistryTokenWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Signs a container client in to your registry.
- GET /v1/iam/registry/token
- Signs a container client in to your registry. `docker login`, and every build tool that pushes or pulls images, lands here: it exchanges the credential for a short-lived token scoped to exactly the repositories that credential may touch. Both of the shapes container tooling uses are accepted, so the same login works whichever client your pipeline runs.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamRegistryTokenWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/registry/token"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns your organization's roles, newest first — each a named group of people that permissions are granted to.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamRolesListOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamRoles(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamRolesListOutput {
return try await getIamRolesWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's roles, newest first — each a named group of people that permissions are granted to.
- GET /v1/iam/roles
- Returns your organization's roles, newest first — each a named group of people that permissions are granted to. You see your own organization's roles and no one else's; which organization that is comes from your credentials, not from the request.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamRolesListOutput>
*/
open class func getIamRolesWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamRolesListOutput> {
let localVariablePath = "/v1/iam/roles"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamRolesListOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one role: who is in it, and the roles it includes.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamRole
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamRolesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamRole {
return try await getIamRolesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one role: who is in it, and the roles it includes.
- GET /v1/iam/roles/{owner}/{name}
- Returns one role: who is in it, and the roles it includes.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamRole>
*/
open class func getIamRolesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamRole> {
var localVariablePath = "/v1/iam/roles/{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<IamRole>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the kinds of record this directory provisions and the address of each, so your identity provider discovers them rather than having them configured by hand.
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamScimV2Resourcetypes(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListResponse {
return try await getIamScimV2ResourcetypesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the kinds of record this directory provisions and the address of each, so your identity provider discovers them rather than having them configured by hand.
- GET /v1/iam/scim/v2/ResourceTypes
- Returns the kinds of record this directory provisions and the address of each, so your identity provider discovers them rather than having them configured by hand.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListResponse>
*/
open class func getIamScimV2ResourcetypesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListResponse> {
let localVariablePath = "/v1/iam/scim/v2/ResourceTypes"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one provisionable record kind in full.
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: JSONValue
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamScimV2ResourcetypesByName(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> JSONValue {
return try await getIamScimV2ResourcetypesByNameWithRequestBuilder(name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one provisionable record kind in full.
- GET /v1/iam/scim/v2/ResourceTypes/{name}
- Returns one provisionable record kind in full.
- Bearer Token:
- type: http
- name: bearer
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<JSONValue>
*/
open class func getIamScimV2ResourcetypesByNameWithRequestBuilder(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<JSONValue> {
var localVariablePath = "/v1/iam/scim/v2/ResourceTypes/{name}"
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<JSONValue>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the attribute definitions this directory understands, so your identity provider knows which fields it may send and what they mean before it sends any.
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListResponse
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamScimV2Schemas(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListResponse {
return try await getIamScimV2SchemasWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the attribute definitions this directory understands, so your identity provider knows which fields it may send and what they mean before it sends any.
- GET /v1/iam/scim/v2/Schemas
- Returns the attribute definitions this directory understands, so your identity provider knows which fields it may send and what they mean before it sends any.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListResponse>
*/
open class func getIamScimV2SchemasWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListResponse> {
let localVariablePath = "/v1/iam/scim/v2/Schemas"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListResponse>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one attribute definition in full.
- parameter id: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: JSONValue
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamScimV2SchemasById(id: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> JSONValue {
return try await getIamScimV2SchemasByIdWithRequestBuilder(id: id, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one attribute definition in full.
- GET /v1/iam/scim/v2/Schemas/{id}
- Returns one attribute definition in full.
- Bearer Token:
- type: http
- name: bearer
- parameter id: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<JSONValue>
*/
open class func getIamScimV2SchemasByIdWithRequestBuilder(id: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<JSONValue> {
var localVariablePath = "/v1/iam/scim/v2/Schemas/{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<JSONValue>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Tells your identity provider which parts of SCIM this directory supports, so it configures itself instead of you filling in a form.
- parameter apiConfiguration: The configuration for the http request.
- returns: IamConfig
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamScimV2Serviceproviderconfig(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamConfig {
return try await getIamScimV2ServiceproviderconfigWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Tells your identity provider which parts of SCIM this directory supports, so it configures itself instead of you filling in a form.
- GET /v1/iam/scim/v2/ServiceProviderConfig
- Tells your identity provider which parts of SCIM this directory supports, so it configures itself instead of you filling in a form. Filtering and partial updates are supported. Bulk operations, sorting and entity tags are not — an IdP that reads this will not attempt them.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamConfig>
*/
open class func getIamScimV2ServiceproviderconfigWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamConfig> {
let localVariablePath = "/v1/iam/scim/v2/ServiceProviderConfig"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamConfig>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the people in your organization to your identity provider, in the standard SCIM shape, so an IdP can reconcile its directory against ours.
- 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 getIamScimV2Users(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamScimV2UsersWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the people in your organization to your identity provider, in the standard SCIM shape, so an IdP can reconcile its directory against ours.
- GET /v1/iam/scim/v2/Users
- Returns the people in your organization to your identity provider, in the standard SCIM shape, so an IdP can reconcile its directory against ours. Searchable by username or email address, and paged. Reading the whole list takes an administrator; an ordinary person is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamScimV2UsersWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/scim/v2/Users"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns one person in the standard SCIM shape.
- parameter owner: (path)
- parameter name: (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 getIamScimV2UsersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamScimV2UsersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one person in the standard SCIM shape.
- GET /v1/iam/scim/v2/Users/{owner}/{name}
- Returns one person in the standard SCIM shape. An administrator may read anyone in the organization; everyone else may read only themselves.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamScimV2UsersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/iam/scim/v2/Users/{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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns your organization's service accounts — what each is called and when it was created.
- parameter organization: (query) Organization is the organization whose service accounts to list. Required. (optional)
- parameter p: (query) P is the 1-indexed page to return. Paging takes both p and pageSize — leave either out, or send something that is not a number, and the whole list comes back. (optional)
- parameter pageSize: (query) Size is how many accounts a page holds. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAnswer
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamServiceAccounts(organization: String? = nil, p: Int64? = nil, pageSize: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAnswer {
return try await getIamServiceAccountsWithRequestBuilder(organization: organization, p: p, pageSize: pageSize, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's service accounts — what each is called and when it was created.
- GET /v1/iam/service-accounts
- Returns your organization's service accounts — what each is called and when it was created. Never their secrets: a key's secret half exists in a response exactly once, when it is minted. Paginated in memory over the already org-scoped slice — the set per org is small, so a dedicated count query is overkill (v1 service_account.go:296-307).
- Bearer Token:
- type: http
- name: bearer
- parameter organization: (query) Organization is the organization whose service accounts to list. Required. (optional)
- parameter p: (query) P is the 1-indexed page to return. Paging takes both p and pageSize — leave either out, or send something that is not a number, and the whole list comes back. (optional)
- parameter pageSize: (query) Size is how many accounts a page holds. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAnswer>
*/
open class func getIamServiceAccountsWithRequestBuilder(organization: String? = nil, p: Int64? = nil, pageSize: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAnswer> {
let localVariablePath = "/v1/iam/service-accounts"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"organization": (wrappedValue: organization?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"p": (wrappedValue: p?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"pageSize": (wrappedValue: pageSize?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAnswer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns your organization's teams, newest first — each a named set of people that roles and permissions are granted to.
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTeamsListOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamTeams(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTeamsListOutput {
return try await getIamTeamsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's teams, newest first — each a named set of people that roles and permissions are granted to.
- GET /v1/iam/teams
- Returns your organization's teams, newest first — each a named set of people that roles and permissions are granted to. You see your own organization's teams and no one else's; which organization that is comes from your credentials, not from the request.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTeamsListOutput>
*/
open class func getIamTeamsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTeamsListOutput> {
let localVariablePath = "/v1/iam/teams"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamTeamsListOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one team: who is in it.
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTeam
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamTeamsByName(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTeam {
return try await getIamTeamsByNameWithRequestBuilder(name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one team: who is in it.
- GET /v1/iam/teams/{name}
- Returns one team: who is in it.
- Bearer Token:
- type: http
- name: bearer
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTeam>
*/
open class func getIamTeamsByNameWithRequestBuilder(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTeam> {
var localVariablePath = "/v1/iam/teams/{name}"
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<IamTeam>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns a page of the people in an organization, with the total so you can page through the rest.
- parameter owner: (query) (optional)
- parameter email: (query) Email narrows the page to the accounts carrying one address. Looking a person up by their address is a QUERY over the collection, not an item read: an address is not the natural key, two rows in one org can carry one, and a caller that gets a page SEES both — where a single-item read would have to choose, and choosing is how somebody joins a team under a colleague&#39;s identity. (optional)
- parameter limit: (query) (optional)
- parameter offset: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamUsersListOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamUsers(owner: String? = nil, email: String? = nil, limit: Int64? = nil, offset: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamUsersListOutput {
return try await getIamUsersWithRequestBuilder(owner: owner, email: email, limit: limit, offset: offset, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns a page of the people in an organization, with the total so you can page through the rest.
- GET /v1/iam/users
- Returns a page of the people in an organization, with the total so you can page through the rest. Passwords, API secrets and MFA material are stripped from every entry. Which organization comes from your credentials, not from the request: you read your own and no one else's, and a credential whose scope spans tenants reads the tenant it names — or, naming none, every one of them.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter email: (query) Email narrows the page to the accounts carrying one address. Looking a person up by their address is a QUERY over the collection, not an item read: an address is not the natural key, two rows in one org can carry one, and a caller that gets a page SEES both — where a single-item read would have to choose, and choosing is how somebody joins a team under a colleague&#39;s identity. (optional)
- parameter limit: (query) (optional)
- parameter offset: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamUsersListOutput>
*/
open class func getIamUsersWithRequestBuilder(owner: String? = nil, email: String? = nil, limit: Int64? = nil, offset: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamUsersListOutput> {
let localVariablePath = "/v1/iam/users"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"email": (wrappedValue: email?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"limit": (wrappedValue: limit?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"offset": (wrappedValue: offset?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamUsersListOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one person in your organization, addressed by their username or by their email address.
- parameter owner: (path)
- parameter name: (path)
- parameter email: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamUser
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamUsersByOwnerByName(owner: String, name: String, email: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamUser {
return try await getIamUsersByOwnerByNameWithRequestBuilder(owner: owner, name: name, email: email, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one person in your organization, addressed by their username or by their email address.
- GET /v1/iam/users/{owner}/{name}
- Returns one person in your organization, addressed by their username or by their email address. Passwords, API secrets and MFA material are stripped from the response. An address that names two accounts names none: the read refuses rather than picking one, and says so instead of reporting \"no such user\". Handing back an arbitrary one of two rows is how somebody gets added to a team under a colleague's identity.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter email: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamUser>
*/
open class func getIamUsersByOwnerByNameWithRequestBuilder(owner: String, name: String, email: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamUser> {
var localVariablePath = "/v1/iam/users/{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
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"email": (wrappedValue: email?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamUser>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Starts a wallet sign-in: it returns a one-time challenge for the wallet to sign.
- 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 getIamWeb3Nonce(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamWeb3NonceWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Starts a wallet sign-in: it returns a one-time challenge for the wallet to sign.
- GET /v1/iam/web3/nonce
- Starts a wallet sign-in: it returns a one-time challenge for the wallet to sign. The challenge is good once and is tied to the site that asked for it, so a signature collected elsewhere cannot be replayed here.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamWeb3NonceWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/web3/nonce"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Starts a passkey sign-in: it returns the challenge the person's authenticator signs.
- 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 getIamWebauthnSigninBegin(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamWebauthnSigninBeginWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Starts a passkey sign-in: it returns the challenge the person's authenticator signs.
- GET /v1/iam/webauthn/signin/begin
- Starts a passkey sign-in: it returns the challenge the person's authenticator signs. The account is named in the query, and the challenge is bound to it, so what may answer is decided here — by the server, from the row — and the finish checks the answer against that decision rather than recomputing it.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamWebauthnSigninBeginWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/webauthn/signin/begin"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Starts enrolling a passkey for the signed-in person: it returns the options their browser hands to the authenticator.
- 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 getIamWebauthnSignupBegin(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamWebauthnSignupBeginWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Starts enrolling a passkey for the signed-in person: it returns the options their browser hands to the authenticator.
- GET /v1/iam/webauthn/signup/begin
- Starts enrolling a passkey for the signed-in person: it returns the options their browser hands to the authenticator. Passkeys already on the account are EXCLUDED, so a second enrollment on a device that already holds one is refused by the authenticator itself rather than silently producing a duplicate the person cannot tell apart.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamWebauthnSignupBeginWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/webauthn/signup/begin"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Publishes the public keys that verify the tokens issued here — the one URL you point a service at so it can check a token itself, offline, without calling back and without holding any secret of ours.
- 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 getIamWellKnownJwks(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamWellKnownJwksWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Publishes the public keys that verify the tokens issued here — the one URL you point a service at so it can check a token itself, offline, without calling back and without holding any secret of ours.
- GET /v1/iam/.well-known/jwks
- Publishes the public keys that verify the tokens issued here — the one URL you point a service at so it can check a token itself, offline, without calling back and without holding any secret of ours. Keys appear here before they start signing and stay after they stop, so a rotation never leaves a live token unverifiable. Nothing private is ever published.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamWellKnownJwksWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/.well-known/jwks"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns the OpenID Connect discovery document — the one URL you point a standards-compliant client at so it can find every other endpoint on its own, instead of you configuring them by hand.
- 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 getIamWellKnownOauthAuthorizationServer(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamWellKnownOauthAuthorizationServerWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the OpenID Connect discovery document — the one URL you point a standards-compliant client at so it can find every other endpoint on its own, instead of you configuring them by hand.
- GET /v1/iam/.well-known/oauth-authorization-server
- Returns the OpenID Connect discovery document — the one URL you point a standards-compliant client at so it can find every other endpoint on its own, instead of you configuring them by hand. It advertises only what is actually implemented, so a client that reads it cannot ask for a flow that will fail: the authorization-code flow, PKCE with S256, the supported grants, and the signing algorithms whose public keys the JWKS really publishes. The issuer is derived from the host you asked on and is the same value the tokens carry, so a client that pins the issuer never sees it change.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamWellKnownOauthAuthorizationServerWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/.well-known/oauth-authorization-server"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns the OpenID Connect discovery document — the one URL you point a standards-compliant client at so it can find every other endpoint on its own, instead of you configuring them by hand.
- 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 getIamWellKnownOpenidConfiguration(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamWellKnownOpenidConfigurationWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the OpenID Connect discovery document — the one URL you point a standards-compliant client at so it can find every other endpoint on its own, instead of you configuring them by hand.
- GET /v1/iam/.well-known/openid-configuration
- Returns the OpenID Connect discovery document — the one URL you point a standards-compliant client at so it can find every other endpoint on its own, instead of you configuring them by hand. It advertises only what is actually implemented, so a client that reads it cannot ask for a flow that will fail: the authorization-code flow, PKCE with S256, the supported grants, and the signing algorithms whose public keys the JWKS really publishes. The issuer is derived from the host you asked on and is the same value the tokens carry, so a client that pins the issuer never sees it change.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamWellKnownOpenidConfigurationWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/.well-known/openid-configuration"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Tells you who the current caller is — the lightweight check a page makes on load to decide whether to render signed-in or signed-out.
- 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 getIamWhoami(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await getIamWhoamiWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Tells you who the current caller is — the lightweight check a page makes on load to decide whether to render signed-in or signed-out.
- GET /v1/iam/whoami
- Tells you who the current caller is — the lightweight check a page makes on load to decide whether to render signed-in or signed-out. It answers for a session cookie or a bearer token alike, and says plainly when nobody is signed in rather than failing.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func getIamWhoamiWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/whoami"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns your organization's workspaces, newest first — the scope a team works in, alongside projects rather than instead of them.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWorkspacesListOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamWorkspaces(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWorkspacesListOutput {
return try await getIamWorkspacesWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's workspaces, newest first — the scope a team works in, alongside projects rather than instead of them.
- GET /v1/iam/workspaces
- Returns your organization's workspaces, newest first — the scope a team works in, alongside projects rather than instead of them. You see your own organization's workspaces and no one else's; which organization that is comes from your credentials, not from the request.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWorkspacesListOutput>
*/
open class func getIamWorkspacesWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWorkspacesListOutput> {
let localVariablePath = "/v1/iam/workspaces"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamWorkspacesListOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one workspace: what it is called and how it is set up.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWorkspace
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getIamWorkspacesByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWorkspace {
return try await getIamWorkspacesByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one workspace: what it is called and how it is set up.
- GET /v1/iam/workspaces/{owner}/{name}
- Returns one workspace: what it is called and how it is set up.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWorkspace>
*/
open class func getIamWorkspacesByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWorkspace> {
var localVariablePath = "/v1/iam/workspaces/{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<IamWorkspace>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one organization: its display, its defaults and the sign-in rules everyone in it inherits.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamOrganization
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getOrganization(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamOrganization {
return try await getOrganizationWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one organization: its display, its defaults and the sign-in rules everyone in it inherits.
- GET /v1/iam/organizations/{owner}/{name}
- Returns one organization: its display, its defaults and the sign-in rules everyone in it inherits.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamOrganization>
*/
open class func getOrganizationWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamOrganization> {
var localVariablePath = "/v1/iam/organizations/{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<IamOrganization>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one provider: what it connects to and how it is configured.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamProviderResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getProvider(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamProviderResult {
return try await getProviderWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one provider: what it connects to and how it is configured.
- GET /v1/iam/providers/{owner}/{name}
- Returns one provider: what it connects to and how it is configured. Its credentials come back masked.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamProviderResult>
*/
open class func getProviderWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamProviderResult> {
var localVariablePath = "/v1/iam/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<IamProviderResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one person's session in one application — when it began and which browsers or devices are still carrying it.
- parameter owner: (path)
- parameter name: (path)
- parameter application: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamSession
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getSession(owner: String, name: String, application: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamSession {
return try await getSessionWithRequestBuilder(owner: owner, name: name, application: application, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one person's session in one application — when it began and which browsers or devices are still carrying it.
- GET /v1/iam/sessions/{owner}/{name}/{application}
- Returns one person's session in one application — when it began and which browsers or devices are still carrying it.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter application: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamSession>
*/
open class func getSessionWithRequestBuilder(owner: String, name: String, application: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamSession> {
var localVariablePath = "/v1/iam/sessions/{owner}/{name}/{application}"
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 applicationPreEscape = "\(APIHelper.mapValueToPathItem(application))"
let applicationPostEscape = applicationPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{application}", with: applicationPostEscape, 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<IamSession>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one access token: who and what it was issued to, and when it expires.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTokenResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getToken(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTokenResult {
return try await getTokenWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one access token: who and what it was issued to, and when it expires.
- GET /v1/iam/tokens/{owner}/{name}
- Returns one access token: who and what it was issued to, and when it expires.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTokenResult>
*/
open class func getTokenWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTokenResult> {
var localVariablePath = "/v1/iam/tokens/{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<IamTokenResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one passkey or security key: whose it is, what device it lives on, and when it was registered.
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWebauthnCredentialResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getWebauthnCredential(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWebauthnCredentialResult {
return try await getWebauthnCredentialWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one passkey or security key: whose it is, what device it lives on, and when it was registered.
- GET /v1/iam/webauthn-credentials/{owner}/{name}
- Returns one passkey or security key: whose it is, what device it lives on, and when it was registered.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWebauthnCredentialResult>
*/
open class func getWebauthnCredentialWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWebauthnCredentialResult> {
var localVariablePath = "/v1/iam/webauthn-credentials/{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<IamWebauthnCredentialResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the organizations you can act in, the ones you belong to first and the rest after, newest first, narrowed by an optional query against the name or the display name.
- parameter xForwardedFor: (header) (optional)
- parameter q: (query) (optional)
- parameter limit: (query) (optional)
- parameter cursor: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListOrganizationsOutput
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func listOrganizations(xForwardedFor: String? = nil, q: String? = nil, limit: Int64? = nil, cursor: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListOrganizationsOutput {
return try await listOrganizationsWithRequestBuilder(xForwardedFor: xForwardedFor, q: q, limit: limit, cursor: cursor, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the organizations you can act in, the ones you belong to first and the rest after, newest first, narrowed by an optional query against the name or the display name.
- GET /v1/iam/organizations
- Returns the organizations you can act in, the ones you belong to first and the rest after, newest first, narrowed by an optional query against the name or the display name. Platform operators see every organization; everyone else sees their own. Pass the cursor from the previous page to continue; an empty cursor in the answer means there is nothing more. THE SCOPE IS THE HANDLER'S OWN, so it holds at every endpoint. The Guard refuses a bearerless request before this runs, but the MCP server carries a typed op to its handler with no middleware in front of it — a handler that read no principal would answer such a caller with the whole registry. Reading the principal here is what makes the answer the same one over both.
- Bearer Token:
- type: http
- name: bearer
- parameter xForwardedFor: (header) (optional)
- parameter q: (query) (optional)
- parameter limit: (query) (optional)
- parameter cursor: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListOrganizationsOutput>
*/
open class func listOrganizationsWithRequestBuilder(xForwardedFor: String? = nil, q: String? = nil, limit: Int64? = nil, cursor: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListOrganizationsOutput> {
let localVariablePath = "/v1/iam/organizations"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"q": (wrappedValue: q?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"limit": (wrappedValue: limit?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"cursor": (wrappedValue: cursor?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"X-Forwarded-For": xForwardedFor?.asParameter(codableHelper: apiConfiguration.codableHelper),
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListOrganizationsOutput>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns your organization's providers, newest first — the identity providers your people sign in with, and the senders and connectors your applications go through.
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListProvidersOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func listProviders(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListProvidersOut {
return try await listProvidersWithRequestBuilder(owner: owner, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns your organization's providers, newest first — the identity providers your people sign in with, and the senders and connectors your applications go through.
- GET /v1/iam/providers
- Returns your organization's providers, newest first — the identity providers your people sign in with, and the senders and connectors your applications go through. You see your own organization's providers and no one else's; which organization that is comes from your credentials, not from the request.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListProvidersOut>
*/
open class func listProvidersWithRequestBuilder(owner: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListProvidersOut> {
let localVariablePath = "/v1/iam/providers"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListProvidersOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns who is currently signed in to an organization, newest first, and can be narrowed to one person or one application.
- parameter owner: (query) (optional)
- parameter name: (query) (optional)
- parameter application: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListSessionsOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func listSessions(owner: String? = nil, name: String? = nil, application: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListSessionsOut {
return try await listSessionsWithRequestBuilder(owner: owner, name: name, application: application, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns who is currently signed in to an organization, newest first, and can be narrowed to one person or one application.
- GET /v1/iam/sessions
- Returns who is currently signed in to an organization, newest first, and can be narrowed to one person or one application. It is what you read before signing someone out. Which organization comes from your credentials, not from the request: you read your own and no one else's. A session row names a live account and the applications it is signed in to, so the tenant is decided here rather than taken from the query.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter name: (query) (optional)
- parameter application: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListSessionsOut>
*/
open class func listSessionsWithRequestBuilder(owner: String? = nil, name: String? = nil, application: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListSessionsOut> {
let localVariablePath = "/v1/iam/sessions"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"name": (wrappedValue: name?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"application": (wrappedValue: application?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListSessionsOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the access tokens issued in your organization, newest first, and can be narrowed to one organization.
- parameter owner: (query) (optional)
- parameter organization: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListTokensOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func listTokens(owner: String? = nil, organization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListTokensOut {
return try await listTokensWithRequestBuilder(owner: owner, organization: organization, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the access tokens issued in your organization, newest first, and can be narrowed to one organization.
- GET /v1/iam/tokens
- Returns the access tokens issued in your organization, newest first, and can be narrowed to one organization. Use it to see what is currently authorized before revoking anything.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (query) (optional)
- parameter organization: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListTokensOut>
*/
open class func listTokensWithRequestBuilder(owner: String? = nil, organization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListTokensOut> {
let localVariablePath = "/v1/iam/tokens"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"owner": (wrappedValue: owner?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"organization": (wrappedValue: organization?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListTokensOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the passkeys and security keys registered to one person, newest first — which device each lives on and when it was registered.
- parameter user: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamListWebauthnCredentialsOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func listWebauthnCredentials(user: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamListWebauthnCredentialsOut {
return try await listWebauthnCredentialsWithRequestBuilder(user: user, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the passkeys and security keys registered to one person, newest first — which device each lives on and when it was registered.
- GET /v1/iam/webauthn-credentials
- Returns the passkeys and security keys registered to one person, newest first — which device each lives on and when it was registered. Yours by default. Name somebody else and you get them only if you already administer their account, which is the same authority that governs reading their user record — so this list can never show more people than the surface beside it already does. There is no organization-wide list, by design. Scoping to the ORG would hand an org admin every member's credential rows in one answer and a SuperAdmin every tenant's, while a plain member could not read even their own (an unnamed target fails the Guard's tenant rule). One scope answers both halves cleanly: the answer is a person's, and the caller is that person unless they say otherwise and may.
- Bearer Token:
- type: http
- name: bearer
- parameter user: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamListWebauthnCredentialsOut>
*/
open class func listWebauthnCredentialsWithRequestBuilder(user: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamListWebauthnCredentialsOut> {
let localVariablePath = "/v1/iam/webauthn-credentials"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"user": (wrappedValue: user?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamListWebauthnCredentialsOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Applies a partial change from your identity provider — one attribute moved, not the whole record resent.
- parameter owner: (path)
- parameter name: (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 patchIamScimV2UsersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await patchIamScimV2UsersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Applies a partial change from your identity provider — one attribute moved, not the whole record resent.
- PATCH /v1/iam/scim/v2/Users/{owner}/{name}
- Applies a partial change from your identity provider — one attribute moved, not the whole record resent. The change is applied onto the person as they currently are, so everything you did not mention keeps its value, including the parts SCIM does not describe.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func patchIamScimV2UsersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/iam/scim/v2/Users/{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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Sets up an account on someone's behalf — the same onboarding a person gets themselves, driven by one of your own services instead of by them.
- 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 postIamAdminProvision(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamAdminProvisionWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Sets up an account on someone's behalf — the same onboarding a person gets themselves, driven by one of your own services instead of by them.
- POST /v1/iam/admin/provision
- Sets up an account on someone's behalf — the same onboarding a person gets themselves, driven by one of your own services instead of by them. It authenticates as your service rather than as a person, which is why the person to provision is named in the request. The setup it performs is identical to self-service onboarding; there is one provisioning path, not two that can drift.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamAdminProvisionWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/admin/provision"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Registers an application in your organization — one product or site your people sign in to, with its own client credentials, sign-in methods and allowed redirect URIs.
- parameter iamApplication: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamApplication
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamApplications(iamApplication: IamApplication, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamApplication {
return try await postIamApplicationsWithRequestBuilder(iamApplication: iamApplication, apiConfiguration: apiConfiguration).execute().body
}
/**
Registers an application in your organization — one product or site your people sign in to, with its own client credentials, sign-in methods and allowed redirect URIs.
- POST /v1/iam/applications
- Registers an application in your organization — one product or site your people sign in to, with its own client credentials, sign-in methods and allowed redirect URIs. A name already used in the organization is refused rather than overwritten. Exported so the legacy add-application alias reuses this exact path — one create, two spellings.
- Bearer Token:
- type: http
- name: bearer
- parameter iamApplication: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamApplication>
*/
open class func postIamApplicationsWithRequestBuilder(iamApplication: IamApplication, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamApplication> {
let localVariablePath = "/v1/iam/applications"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamApplication, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamApplication>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Steps a platform operator into an organization: it returns their own access token re-scoped to that tenant, so they see what the tenant sees.
- parameter iamAssumeBody: (body)
- parameter authorization: (header) (optional)
- parameter xForwardedFor: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAnswer
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamAssume(iamAssumeBody: IamAssumeBody, authorization: String? = nil, xForwardedFor: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAnswer {
return try await postIamAssumeWithRequestBuilder(iamAssumeBody: iamAssumeBody, authorization: authorization, xForwardedFor: xForwardedFor, apiConfiguration: apiConfiguration).execute().body
}
/**
Steps a platform operator into an organization: it returns their own access token re-scoped to that tenant, so they see what the tenant sees.
- POST /v1/iam/assume
- Steps a platform operator into an organization: it returns their own access token re-scoped to that tenant, so they see what the tenant sees. The token still names the operator — stepping in is not becoming somebody else — and records the organization it was scoped to, so everything done with it is attributed to the person who did it. Only a platform operator may, and the attempt is recorded whether or not it succeeds.
- Bearer Token:
- type: http
- name: bearer
- parameter iamAssumeBody: (body)
- parameter authorization: (header) (optional)
- parameter xForwardedFor: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAnswer>
*/
open class func postIamAssumeWithRequestBuilder(iamAssumeBody: IamAssumeBody, authorization: String? = nil, xForwardedFor: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAnswer> {
let localVariablePath = "/v1/iam/assume"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamAssumeBody, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
"Authorization": authorization?.asParameter(codableHelper: apiConfiguration.codableHelper),
"X-Forwarded-For": xForwardedFor?.asParameter(codableHelper: apiConfiguration.codableHelper),
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAnswer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Records an audit entry, so activity from your own systems lands in the same trail as everything the Hanzo Cloud records for you.
- parameter iamInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAuditLog
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamAuditLogs(iamInput: IamInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAuditLog {
return try await postIamAuditLogsWithRequestBuilder(iamInput: iamInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Records an audit entry, so activity from your own systems lands in the same trail as everything the Hanzo Cloud records for you.
- POST /v1/iam/audit-logs
- Records an audit entry, so activity from your own systems lands in the same trail as everything the Hanzo Cloud records for you.
- Bearer Token:
- type: http
- name: bearer
- parameter iamInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAuditLog>
*/
open class func postIamAuditLogsWithRequestBuilder(iamInput: IamInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAuditLog> {
let localVariablePath = "/v1/iam/audit-logs"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAuditLog>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Adds a signing certificate your applications can verify tokens against — the call you make to stage the next one before a rotation.
- parameter iamCert: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamCert
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamCerts(iamCert: IamCert, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamCert {
return try await postIamCertsWithRequestBuilder(iamCert: iamCert, apiConfiguration: apiConfiguration).execute().body
}
/**
Adds a signing certificate your applications can verify tokens against — the call you make to stage the next one before a rotation.
- POST /v1/iam/certs
- Adds a signing certificate your applications can verify tokens against — the call you make to stage the next one before a rotation. A name already used in your organization is refused. It registers the certificate's IDENTITY: its name (which is the JWKS `kid`), its algorithm, its expiry. Key material does not travel this way and cannot: the private key is not part of the Cert's JSON, so it is neither served here nor accepted here. It is supplied to the process by the deployment, under the name registered here (internal/keyring). Staging a rotation is therefore two halves — this call names the key, and the deployment provides it.
- Bearer Token:
- type: http
- name: bearer
- parameter iamCert: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamCert>
*/
open class func postIamCertsWithRequestBuilder(iamCert: IamCert, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamCert> {
let localVariablePath = "/v1/iam/certs"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamCert, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamCert>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Takes away a person's or an application's right to act in an organization.
- 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 postIamDeleteMembership(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamDeleteMembershipWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Takes away a person's or an application's right to act in an organization.
- POST /v1/iam/delete-membership
- Takes away a person's or an application's right to act in an organization. Their account survives; what ends is their access to that organization. Revoking a membership that is already gone reports that nothing was removed rather than failing, so a retry is safe. It is the mirror of ensure and takes the SAME gate: revoking membership is the org's authority to give or take, so a SuperAdmin, an admin of the org itself, or an org-admin-capable confidential client. Idempotent through the store — deleting an absent membership reports removed=false, never an error — so a retried revoke is safe.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamDeleteMembershipWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/delete-membership"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Issues an invitation to join your organization — the code or link a new member redeems, with the role they arrive holding and the date it stops working.
- parameter iamInvitationsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamInvitation
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamInvitations(iamInvitationsInput: IamInvitationsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamInvitation {
return try await postIamInvitationsWithRequestBuilder(iamInvitationsInput: iamInvitationsInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Issues an invitation to join your organization — the code or link a new member redeems, with the role they arrive holding and the date it stops working.
- POST /v1/iam/invitations
- Issues an invitation to join your organization — the code or link a new member redeems, with the role they arrive holding and the date it stops working. A name already used in the organization is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter iamInvitationsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamInvitation>
*/
open class func postIamInvitationsWithRequestBuilder(iamInvitationsInput: IamInvitationsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamInvitation> {
let localVariablePath = "/v1/iam/invitations"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamInvitationsInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamInvitation>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Issues an API key.
- parameter iamKey: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamKey
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamKeys(iamKey: IamKey, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamKey {
return try await postIamKeysWithRequestBuilder(iamKey: iamKey, apiConfiguration: apiConfiguration).execute().body
}
/**
Issues an API key.
- POST /v1/iam/keys
- Issues an API key. A standard key comes back as a publishable half you may ship in client code and a secret half you must not — the secret is shown once, at creation, and cannot be retrieved afterwards. A publish-scoped key is issued with the publishable half only, so there is no secret to leak. A name already used in your organization is refused rather than reissued, so creating twice never silently invalidates a key that is in production.
- Bearer Token:
- type: http
- name: bearer
- parameter iamKey: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamKey>
*/
open class func postIamKeysWithRequestBuilder(iamKey: IamKey, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamKey> {
let localVariablePath = "/v1/iam/keys"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamKey, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamKey>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Starts connecting another sign-in identity to the account you are already signed in as.
- 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 postIamLink(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamLinkWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Starts connecting another sign-in identity to the account you are already signed in as.
- POST /v1/iam/link
- Starts connecting another sign-in identity to the account you are already signed in as. It answers with the provider's URL for the browser to follow; when the provider returns, that identity is attached and you come back to returnUri. Your account is fixed here, from the credential you are already holding, and is carried server-side for the rest of the round-trip — so nothing that happens at the provider can point the link at somebody else.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamLinkWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/link"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Signs a person in with the credential they typed, and — when the request is part of an OAuth flow — hands back the one-time code that finishes it.
- 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 postIamLogin(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamLoginWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Signs a person in with the credential they typed, and — when the request is part of an OAuth flow — hands back the one-time code that finishes it.
- POST /v1/iam/login
- Signs a person in with the credential they typed, and — when the request is part of an OAuth flow — hands back the one-time code that finishes it. A second factor, if the account has one, is asked for and required here. The password is compared against a stored one-way hash and is never logged, echoed or stored as typed.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamLoginWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/login"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Lets a person or an application act in an organization.
- 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 postIamMemberships(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamMembershipsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Lets a person or an application act in an organization.
- POST /v1/iam/memberships
- Lets a person or an application act in an organization. It is the grant behind \"add someone to the team\", and it is safe to repeat — granting a membership that already exists changes nothing. Granting membership IS the org's authority to give, so it takes the same gate a write to that org's own registry row takes: a SuperAdmin, an admin of the org itself, or an org-admin-capable confidential client. One rule, one place (internal/authz).
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamMembershipsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/memberships"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Picks which second factor an account is asked for first when it has more than one.
- 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 postIamMfaPreferred(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamMfaPreferredWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Picks which second factor an account is asked for first when it has more than one.
- POST /v1/iam/mfa/preferred
- Picks which second factor an account is asked for first when it has more than one. Only a factor the account actually holds: storing an unheld one told the login gate \"MFA is on\" — factor.Enabled reads that column — while leaving it nothing to ask for, so the sign-in required the password alone.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamMfaPreferredWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/mfa/preferred"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Finishes the enrolment: from here the account's sign-ins ask for this factor.
- 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 postIamMfaSetupEnable(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamMfaSetupEnableWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Finishes the enrolment: from here the account's sign-ins ask for this factor.
- POST /v1/iam/mfa/setup/enable
- Finishes the enrolment: from here the account's sign-ins ask for this factor. It requires the proof initiate handed out — a passcode from the authenticator, or the code that was sent — and verifies it BEFORE writing anything. Verifying BEFORE writing is what keeps a client that never completed the proof — a skipped verify step, a QR scanned into the wrong app, a bug — from switching on a factor no code can satisfy. That would lock the account out with no self-service way back: the gate holds the sign-in before minting, so the person could not obtain the bearer that disable requires. The recovery codes are minted here and returned ONCE, on the first factor the account adds. Answering with them is the way back in when no factor can be produced, so they are the same value the row's digests were made from — by construction, not by a client echoing them back.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamMfaSetupEnableWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/mfa/setup/enable"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Starts enrolling a factor and hands over whatever the person needs to prove they hold it: app a fresh secret and the otpauth:// URL to render as a QR code sms a code texted to the number on the account email a code mailed to the address on the account Nothing is switched on yet, so abandoning this step leaves the account exactly as it was.
- 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 postIamMfaSetupInitiate(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamMfaSetupInitiateWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Starts enrolling a factor and hands over whatever the person needs to prove they hold it: app a fresh secret and the otpauth:// URL to render as a QR code sms a code texted to the number on the account email a code mailed to the address on the account Nothing is switched on yet, so abandoning this step leaves the account exactly as it was.
- POST /v1/iam/mfa/setup/initiate
- Starts enrolling a factor and hands over whatever the person needs to prove they hold it: app a fresh secret and the otpauth:// URL to render as a QR code sms a code texted to the number on the account email a code mailed to the address on the account Nothing is switched on yet, so abandoning this step leaves the account exactly as it was. Response: {status:\"ok\", data:{mfaType, secret, url}} — secret and url only for the authenticator.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamMfaSetupInitiateWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/mfa/setup/initiate"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Starts a sign-in — the address you send a browser to, and the beginning of every OAuth and OpenID Connect flow.
- 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 postIamOauthAuthorize(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthAuthorizeWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Starts a sign-in — the address you send a browser to, and the beginning of every OAuth and OpenID Connect flow.
- POST /v1/iam/oauth/authorize
- Starts a sign-in — the address you send a browser to, and the beginning of every OAuth and OpenID Connect flow. If the person is ALREADY signed in here, it does not ask them again: it returns them to the application with a one-time code and they never see this page. Otherwise it shows the right way to sign in for the application they are signing in to, or hands off to another identity provider if that is what they pick. A client can say what it wants with `prompt`: `none` means answer without any screen at all — with the code if a session exists, with an error if not, but never with a page; `login` means ask for the password again even if a session exists; `select_account` means let the person choose which identity to use. It returns only to an address the application has registered. That check happens before anything else, so a request naming an unregistered address is refused where the person can see it rather than being bounced onwards.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthAuthorizeWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/authorize"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Starts a sign-in on a device with no browser and no keyboard — a TV, a CLI, a headless box.
- 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 postIamOauthDevice(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthDeviceWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Starts a sign-in on a device with no browser and no keyboard — a TV, a CLI, a headless box.
- POST /v1/iam/oauth/device
- Starts a sign-in on a device with no browser and no keyboard — a TV, a CLI, a headless box. It returns a short code to show the person and the address to send them to on a phone or laptop. Nothing is granted until a human approves it there; until then the code is just a pending request.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthDeviceWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/device"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Answers \"what am I approving?\" for a pending device code.
- 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 postIamOauthDeviceInfo(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthDeviceInfoWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Answers \"what am I approving?\" for a pending device code.
- POST /v1/iam/oauth/device/info
- Answers \"what am I approving?\" for a pending device code. The approval page exists to tell a human WHICH application they are authorizing; a page that names any other one defeats the control it implements. The client is a property of the CODE, not of the page or of whatever app the browser happens to be signed in to, so it is read from the code's row here and nowhere else. Requires a signed-in session, and answers with the same ONE opaque refusal approveDevice uses. That is deliberate: the user_code is only 40 bits and is the one secret in this flow, so an unauthenticated lookup — or one that distinguished unknown from expired from already-approved — would be an oracle for hunting live codes. Gated and opaque, it reveals strictly less than the approval the same caller could already attempt.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthDeviceInfoWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/device/info"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Completes a sign-in that came in through another identity provider and still owes a second factor.
- 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 postIamOauthFederationMfa(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthFederationMfaWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Completes a sign-in that came in through another identity provider and still owes a second factor.
- POST /v1/iam/oauth/federation/mfa
- Completes a sign-in that came in through another identity provider and still owes a second factor. The person supplies the factor here and the login finishes. The account is fixed when the challenge is issued, not by the request, so no one can redirect a half-finished login onto somebody else's account. A wrong factor uses the challenge up: retrying means starting the sign-in again, the same as a mistyped password.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthFederationMfaWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/federation/mfa"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Answers whether an access token is still good, and what it is good for — the check a resource server of yours makes before honouring a token it did not mint.
- 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 postIamOauthIntrospect(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthIntrospectWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Answers whether an access token is still good, and what it is good for — the check a resource server of yours makes before honouring a token it did not mint.
- POST /v1/iam/oauth/introspect
- Answers whether an access token is still good, and what it is good for — the check a resource server of yours makes before honouring a token it did not mint. A token counts as active only if it verifies AND has not been revoked, so a revoked token reads as dead here immediately rather than until it expires. A token that is unknown, expired or revoked answers simply that it is not active, and nothing more — the endpoint is not a way to learn about tokens you were not given.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthIntrospectWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/introspect"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Ends a sign-in and sends the browser somewhere sensible.
- 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 postIamOauthLogout(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthLogoutWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Ends a sign-in and sends the browser somewhere sensible.
- POST /v1/iam/oauth/logout
- Ends a sign-in and sends the browser somewhere sensible. Accepts GET or POST, so it works as a plain link. It ACTUALLY signs you out — worth stating, because a logout that computes a redirect and answers {\"status\":\"ok\"} while ending no session and revoking no token is worse than none: the person on the shared machine believes it worked. Three things happen here, in this order: 1. The browser session dies — sid revoked server-side AND the cookie expired (sessions.Clear). Server-side revocation is the load-bearing half: a copy of the cookie taken before logout must not still resolve. 2. The relying party's tokens are revoked when an id_token_hint names it, so the refresh token cannot mint a fresh access token after the human left. Revocation state is authoritative — a JWT's `exp` still reads valid for days, so expiry is necessary but never sufficient. 3. Only then is a redirect considered, and only to a REGISTERED uri. The open-redirect guard is unchanged: a redirect happens only when a VERIFIED id_token_hint identifies the application and that application has registered the target. Anything else refuses to redirect — nobody can turn your logout link into a redirect to a site of their choosing.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthLogoutWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/logout"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Retires a token before it expires — what you call when someone signs out or a credential may have leaked.
- 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 postIamOauthRevoke(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthRevokeWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Retires a token before it expires — what you call when someone signs out or a credential may have leaked.
- POST /v1/iam/oauth/revoke
- Retires a token before it expires — what you call when someone signs out or a credential may have leaked. Revoking an access token kills that token. Revoking a REFRESH token kills the whole chain it belongs to, so no further access tokens can be minted from it and every token already minted from it dies with it. A token that is not yours, or that never existed, answers success and does nothing — so the endpoint cannot be used to discover which tokens are real. PUBLIC clients revoke too, and must: sign-out is the only control a long-lived refresh token has. A native app or CLI is a public PKCE client and holds no secret, so requiring one here would leave signing out as a local delete — forgetting a credential that stays spendable for the rest of its lifetime. Widening authentication does not widen authority. The caller must still POSSESS the token — and possession already permits USE, of which revocation is the strict opposite — and the row must belong to the client that presents it, so a public client_id buys the ability to destroy exactly what its holder could otherwise spend. RFC 6749 §3.2.1 is the same reading: a client with no credentials identifies itself with client_id.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthRevokeWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/revoke"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Exchanges what your application is holding for the tokens it needs — the one-time code from a finished sign-in, a refresh token, or your own client credentials when the caller is a program rather than a person.
- 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 postIamOauthToken(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthTokenWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Exchanges what your application is holding for the tokens it needs — the one-time code from a finished sign-in, a refresh token, or your own client credentials when the caller is a program rather than a person.
- POST /v1/iam/oauth/token
- Exchanges what your application is holding for the tokens it needs — the one-time code from a finished sign-in, a refresh token, or your own client credentials when the caller is a program rather than a person. A refresh returns a NEW refresh token and retires the one you sent. If a retired one is ever presented again the whole chain is revoked, on the assumption that a token which came back from the dead was copied — so a stolen refresh token buys an attacker one use and costs them the session. Responses are never cached, by any hop.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthTokenWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/token"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Returns the profile claims for whoever the access token belongs to — the standard OpenID Connect way to find out who is calling you without your application storing anything itself.
- 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 postIamOauthUserinfo(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOauthUserinfoWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the profile claims for whoever the access token belongs to — the standard OpenID Connect way to find out who is calling you without your application storing anything itself.
- POST /v1/iam/oauth/userinfo
- Returns the profile claims for whoever the access token belongs to — the standard OpenID Connect way to find out who is calling you without your application storing anything itself. The token must still be live: revoke it and this stops answering.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOauthUserinfoWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/oauth/userinfo"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Finishes setting up the account of whoever is calling — it creates their organization if they have none and puts them in it, so a person who has just signed up lands somewhere they can work.
- 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 postIamOnboard(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamOnboardWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Finishes setting up the account of whoever is calling — it creates their organization if they have none and puts them in it, so a person who has just signed up lands somewhere they can work.
- POST /v1/iam/onboard
- Finishes setting up the account of whoever is calling — it creates their organization if they have none and puts them in it, so a person who has just signed up lands somewhere they can work. It always acts on the caller and never on somebody named in the request, so there is no way to onboard another person's account through it.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamOnboardWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/onboard"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Grants a permission — the call that gives a person or a role the ability to do something.
- parameter iamPermission: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamPermission
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamPermissions(iamPermission: IamPermission, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamPermission {
return try await postIamPermissionsWithRequestBuilder(iamPermission: iamPermission, apiConfiguration: apiConfiguration).execute().body
}
/**
Grants a permission — the call that gives a person or a role the ability to do something.
- POST /v1/iam/permissions
- Grants a permission — the call that gives a person or a role the ability to do something. Adding refuses to overwrite a grant that already exists, so widening an existing one is an update, never an accident.
- Bearer Token:
- type: http
- name: bearer
- parameter iamPermission: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamPermission>
*/
open class func postIamPermissionsWithRequestBuilder(iamPermission: IamPermission, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamPermission> {
let localVariablePath = "/v1/iam/permissions"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamPermission, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamPermission>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Saves the calling person's own settings and returns the full set afterwards.
- 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 postIamPreferences(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamPreferencesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Saves the calling person's own settings and returns the full set afterwards.
- POST /v1/iam/preferences
- Saves the calling person's own settings and returns the full set afterwards. Send only the settings you are changing — the rest are kept, so two screens can save at once without one undoing the other.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamPreferencesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Makes a project inside your organization — the scope people pick between when their work is separated by product or client rather than by team.
- parameter iamProjectsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamProject
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamProjects(iamProjectsInput: IamProjectsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamProject {
return try await postIamProjectsWithRequestBuilder(iamProjectsInput: iamProjectsInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Makes a project inside your organization — the scope people pick between when their work is separated by product or client rather than by team.
- POST /v1/iam/projects
- Makes a project inside your organization — the scope people pick between when their work is separated by product or client rather than by team. A name already used in the organization is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter iamProjectsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamProject>
*/
open class func postIamProjectsWithRequestBuilder(iamProjectsInput: IamProjectsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamProject> {
let localVariablePath = "/v1/iam/projects"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamProjectsInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamProject>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Signs a container client in to your registry.
- 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 postIamRegistryToken(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamRegistryTokenWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Signs a container client in to your registry.
- POST /v1/iam/registry/token
- Signs a container client in to your registry. `docker login`, and every build tool that pushes or pulls images, lands here: it exchanges the credential for a short-lived token scoped to exactly the repositories that credential may touch. Both of the shapes container tooling uses are accepted, so the same login works whichever client your pipeline runs.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamRegistryTokenWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/registry/token"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Steps a platform operator back out: it returns their own access token with no organization assumed, which is the credential they had before they stepped in.
- parameter iamAssumeBody: (body)
- parameter authorization: (header) (optional)
- parameter xForwardedFor: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAnswer
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamRelease(iamAssumeBody: IamAssumeBody, authorization: String? = nil, xForwardedFor: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAnswer {
return try await postIamReleaseWithRequestBuilder(iamAssumeBody: iamAssumeBody, authorization: authorization, xForwardedFor: xForwardedFor, apiConfiguration: apiConfiguration).execute().body
}
/**
Steps a platform operator back out: it returns their own access token with no organization assumed, which is the credential they had before they stepped in.
- POST /v1/iam/release
- Steps a platform operator back out: it returns their own access token with no organization assumed, which is the credential they had before they stepped in. Recorded like the step in.
- Bearer Token:
- type: http
- name: bearer
- parameter iamAssumeBody: (body)
- parameter authorization: (header) (optional)
- parameter xForwardedFor: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAnswer>
*/
open class func postIamReleaseWithRequestBuilder(iamAssumeBody: IamAssumeBody, authorization: String? = nil, xForwardedFor: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAnswer> {
let localVariablePath = "/v1/iam/release"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamAssumeBody, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
"Authorization": authorization?.asParameter(codableHelper: apiConfiguration.codableHelper),
"X-Forwarded-For": xForwardedFor?.asParameter(codableHelper: apiConfiguration.codableHelper),
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAnswer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Makes a role — a named group of people that permissions are granted to.
- parameter iamRolesInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamRole
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamRoles(iamRolesInput: IamRolesInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamRole {
return try await postIamRolesWithRequestBuilder(iamRolesInput: iamRolesInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Makes a role — a named group of people that permissions are granted to.
- POST /v1/iam/roles
- Makes a role — a named group of people that permissions are granted to. Granting to a role rather than to each person is what keeps access correct as your team changes: add someone to the role and they inherit everything it can do. A name already used in your organization is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter iamRolesInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamRole>
*/
open class func postIamRolesWithRequestBuilder(iamRolesInput: IamRolesInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamRole> {
let localVariablePath = "/v1/iam/roles"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamRolesInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamRole>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Provisions a person from your identity provider — how a new hire gets an account here automatically when they are added over there.
- 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 postIamScimV2Users(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamScimV2UsersWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Provisions a person from your identity provider — how a new hire gets an account here automatically when they are added over there.
- POST /v1/iam/scim/v2/Users
- Provisions a person from your identity provider — how a new hire gets an account here automatically when they are added over there. Takes an administrator. Making someone an administrator takes more than that, so an IdP integration cannot escalate anyone by setting a flag.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamScimV2UsersWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/scim/v2/Users"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Makes a service account — an identity for a program rather than a person, for a script, a bot or a deployment that has to authenticate on its own.
- 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 postIamServiceAccounts(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamServiceAccountsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Makes a service account — an identity for a program rather than a person, for a script, a bot or a deployment that has to authenticate on its own.
- POST /v1/iam/service-accounts
- Makes a service account — an identity for a program rather than a person, for a script, a bot or a deployment that has to authenticate on its own. It comes back with its first key, and the secret half is shown ONCE, here. There is no way to read it again; if you lose it, rotate.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamServiceAccountsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/service-accounts"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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 POST /v1/iam/service-accounts/:name/keys: mint a fresh key, invalidating the prior one, and return the new raw secret exactly once.
- parameter name: (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 postIamServiceAccountsByNameKeys(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamServiceAccountsByNameKeysWithRequestBuilder(name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Serves POST /v1/iam/service-accounts/:name/keys: mint a fresh key, invalidating the prior one, and return the new raw secret exactly once.
- POST /v1/iam/service-accounts/{name}/keys
- Serves POST /v1/iam/service-accounts/:name/keys: mint a fresh key, invalidating the prior one, and return the new raw secret exactly once.
- Bearer Token:
- type: http
- name: bearer
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamServiceAccountsByNameKeysWithRequestBuilder(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/iam/service-accounts/{name}/keys"
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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Completes a sign-in: it exchanges the one-time code your application was handed at the end of the login flow for a live session, and returns the signed-in account.
- 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 postIamSignin(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamSigninWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Completes a sign-in: it exchanges the one-time code your application was handed at the end of the login flow for a live session, and returns the signed-in account.
- POST /v1/iam/signin
- Completes a sign-in: it exchanges the one-time code your application was handed at the end of the login flow for a live session, and returns the signed-in account. The code works once. This is the call that turns a finished login into something your application can act on.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamSigninWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Creates an account from the sign-up form and applies the application's own sign-up rules — whether self-service registration is open at all, and which fields it requires.
- 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 postIamSignup(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamSignupWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Creates an account from the sign-up form and applies the application's own sign-up rules — whether self-service registration is open at all, and which fields it requires.
- POST /v1/iam/signup
- Creates an account from the sign-up form and applies the application's own sign-up rules — whether self-service registration is open at all, and which fields it requires. The password is hashed before it is stored and is never returned.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamSignupWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/signup"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Makes a team — a named set of people that roles and permissions grant to.
- parameter iamTeamsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTeam
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamTeams(iamTeamsInput: IamTeamsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTeam {
return try await postIamTeamsWithRequestBuilder(iamTeamsInput: iamTeamsInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Makes a team — a named set of people that roles and permissions grant to.
- POST /v1/iam/teams
- Makes a team — a named set of people that roles and permissions grant to. Granting to a team rather than to each person keeps access correct as people come and go: add someone and they inherit what the team can do. A name already used in your organization is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter iamTeamsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTeam>
*/
open class func postIamTeamsWithRequestBuilder(iamTeamsInput: IamTeamsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTeam> {
let localVariablePath = "/v1/iam/teams"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamTeamsInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamTeam>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Mints an access token for the `?id=<owner>/<name>` target user (optional `?aud=` resource, RFC 8707), issued by the authenticated + allow-listed confidential client.
- 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 postIamTokensIssue(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamTokensIssueWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Mints an access token for the `?id=<owner>/<name>` target user (optional `?aud=` resource, RFC 8707), issued by the authenticated + allow-listed confidential client.
- POST /v1/iam/tokens/issue
- Mints an access token for the `?id=<owner>/<name>` target user (optional `?aud=` resource, RFC 8707), issued by the authenticated + allow-listed confidential client. The token's subject + owner are the TARGET USER's, so a resource server scopes on the validated owner claim to the user's tenant — indistinguishable from a token the user obtained directly. Response is the camelCase `{accessToken, expiresIn}` body identity.ts consumes. Equivalent to the RFC 8693 token-exchange grant, minus the subject_token proof (the console has the user's id, not a token) — the reason this compat shim exists.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamTokensIssueWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/tokens/issue"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Disconnects one sign-in identity from an account, so that provider can no longer be used to sign in as that person.
- 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 postIamUnlink(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamUnlinkWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Disconnects one sign-in identity from an account, so that provider can no longer be used to sign in as that person.
- POST /v1/iam/unlink
- Disconnects one sign-in identity from an account, so that provider can no longer be used to sign in as that person. Their account and every other way they sign in are untouched. Two principals may do it, and only two: the account holder itself, and a SuperAdmin (a member of the reserved admin org, the one predicate). An ORG ADMIN deliberately may NOT — unlinking is not tenant administration, it is unpicking someone's own sign-in method, so the generic org-admin rule is the wrong answer here. A holder unlinking itself must also be permitted by the application — the provider link's CanUnlink flag — so an organization that mandates federated sign-in cannot have its users strand themselves. A SuperAdmin is not bound by that flag; it is the platform's own recovery path. Fail-closed throughout.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamUnlinkWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/unlink"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Adds a person to your organization.
- parameter iamCreateInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamUser
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamUsers(iamCreateInput: IamCreateInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamUser {
return try await postIamUsersWithRequestBuilder(iamCreateInput: iamCreateInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Adds a person to your organization.
- POST /v1/iam/users
- Adds a person to your organization. Send a password and it becomes the one they sign in with; it is hashed before it is stored and never comes back in any response. The username is checked against the same rule every account in the Hanzo Cloud is held to, whichever way it was created — this call, password signup, a social sign-in, or SCIM — so a name accepted here works everywhere. A name already taken in your organization is refused rather than overwritten.
- Bearer Token:
- type: http
- name: bearer
- parameter iamCreateInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamUser>
*/
open class func postIamUsersWithRequestBuilder(iamCreateInput: IamCreateInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamUser> {
let localVariablePath = "/v1/iam/users"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamCreateInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamUser>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
(re)generates the target user's key of the requested TYPE and returns it once, over the shared authorizeMinter + mintTarget seam.
- parameter owner: (path)
- parameter name: (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 postIamUsersByOwnerByNameKeys(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamUsersByOwnerByNameKeysWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
(re)generates the target user's key of the requested TYPE and returns it once, over the shared authorizeMinter + mintTarget seam.
- POST /v1/iam/users/{owner}/{name}/keys
- (re)generates the target user's key of the requested TYPE and returns it once, over the shared authorizeMinter + mintTarget seam. `?type=secret` (the default) yields the confidential sk-; `?type=publishable` yields the pk- that is safe to ship in client JS and resolves to an org, never a principal. It writes the schema.Key row that the resolvers actually read. schema.User.AccessKey is not a credential and nothing resolves it, so a key stamped there would authenticate nobody.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamUsersByOwnerByNameKeysWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/iam/users/{owner}/{name}/keys"
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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Validates the request and asks otp to get a code to the person.
- 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 postIamVerificationCodes(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamVerificationCodesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Validates the request and asks otp to get a code to the person.
- POST /v1/iam/verification-codes
- Validates the request and asks otp to get a code to the person. The request fields are read via fiber's FormValue — the escape hatch zip exposes for form bodies (multipart or urlencoded) — since the typed JSON Bind does not apply here. v1 also accepts countryCode/method/checkUser/captchaType; iam ignores them (the captcha/forget/MFA flows those drive are not ported), and CAPTCHA verification is likewise not enforced — iam models no captcha provider — so the code is issued once the destination and application validate.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamVerificationCodesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/verification-codes"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Completes a wallet sign-in: it verifies the signed challenge and, if it holds, signs the wallet's owner in.
- 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 postIamWeb3Verify(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamWeb3VerifyWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Completes a wallet sign-in: it verifies the signed challenge and, if it holds, signs the wallet's owner in.
- POST /v1/iam/web3/verify
- Completes a wallet sign-in: it verifies the signed challenge and, if it holds, signs the wallet's owner in. This IS the login — it answers exactly as a password sign-in does, so the rest of your flow does not branch on how somebody arrived.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamWeb3VerifyWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/web3/verify"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Verifies the signed challenge and signs the person in.
- 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 postIamWebauthnSigninFinish(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamWebauthnSigninFinishWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Verifies the signed challenge and signs the person in.
- POST /v1/iam/webauthn/signin/finish
- Verifies the signed challenge and signs the person in. It answers exactly as a password sign-in does — the same envelope, through the same grant — so nothing downstream branches on how somebody arrived.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamWebauthnSigninFinishWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/webauthn/signin/finish"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Verifies the newly created passkey and stores it, so the person can sign in with their device from then on.
- 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 postIamWebauthnSignupFinish(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await postIamWebauthnSignupFinishWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Verifies the newly created passkey and stores it, so the person can sign in with their device from then on.
- POST /v1/iam/webauthn/signup/finish
- Verifies the newly created passkey and stores it, so the person can sign in with their device from then on.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func postIamWebauthnSignupFinishWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/webauthn/signup/finish"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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)
}
/**
Makes a workspace inside your organization — the scope a team works in, alongside projects rather than instead of them.
- parameter iamWorkspacesInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWorkspace
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postIamWorkspaces(iamWorkspacesInput: IamWorkspacesInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWorkspace {
return try await postIamWorkspacesWithRequestBuilder(iamWorkspacesInput: iamWorkspacesInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Makes a workspace inside your organization — the scope a team works in, alongside projects rather than instead of them.
- POST /v1/iam/workspaces
- Makes a workspace inside your organization — the scope a team works in, alongside projects rather than instead of them. A name already used in the organization is refused.
- Bearer Token:
- type: http
- name: bearer
- parameter iamWorkspacesInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWorkspace>
*/
open class func postIamWorkspacesWithRequestBuilder(iamWorkspacesInput: IamWorkspacesInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWorkspace> {
let localVariablePath = "/v1/iam/workspaces"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamWorkspacesInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamWorkspace>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Saves the calling person's own profile — the name they are shown by, their picture, a line about themselves and a link.
- parameter iamAccountBody: (body)
- parameter cookie: (header) (optional)
- parameter authorization: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAnswer
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamAccount(iamAccountBody: IamAccountBody, cookie: String? = nil, authorization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAnswer {
return try await putIamAccountWithRequestBuilder(iamAccountBody: iamAccountBody, cookie: cookie, authorization: authorization, apiConfiguration: apiConfiguration).execute().body
}
/**
Saves the calling person's own profile — the name they are shown by, their picture, a line about themselves and a link.
- PUT /v1/iam/account
- Saves the calling person's own profile — the name they are shown by, their picture, a line about themselves and a link. Only their own: the request names nobody, so it cannot reach another account. Send only what you are changing; a field you leave out keeps the value it had, and a field you send empty is cleared. A picture is an https link or an inline image up to 96 KiB, the same value an organization's mark is (schema.AvatarRef) — one rule for how a subject appears, whether the subject is a person or an organization.
- Bearer Token:
- type: http
- name: bearer
- parameter iamAccountBody: (body)
- parameter cookie: (header) (optional)
- parameter authorization: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAnswer>
*/
open class func putIamAccountWithRequestBuilder(iamAccountBody: IamAccountBody, cookie: String? = nil, authorization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAnswer> {
let localVariablePath = "/v1/iam/account"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamAccountBody, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
"Cookie": cookie?.asParameter(codableHelper: apiConfiguration.codableHelper),
"Authorization": authorization?.asParameter(codableHelper: apiConfiguration.codableHelper),
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAnswer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes an application's display, its sign-in methods and the redirect URIs it may return to — the call that makes login work from a new host.
- parameter owner: (path)
- parameter name: (path)
- parameter iamApplication: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamApplication
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamApplicationsByOwnerByName(owner: String, name: String, iamApplication: IamApplication, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamApplication {
return try await putIamApplicationsByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamApplication: iamApplication, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes an application's display, its sign-in methods and the redirect URIs it may return to — the call that makes login work from a new host.
- PUT /v1/iam/applications/{owner}/{name}
- Changes an application's display, its sign-in methods and the redirect URIs it may return to — the call that makes login work from a new host. Which organization it belongs to and what it is named are fixed when it is created and are not editable here. Exported so the legacy update-application alias reuses this exact path — one update, two spellings.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamApplication: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamApplication>
*/
open class func putIamApplicationsByOwnerByNameWithRequestBuilder(owner: String, name: String, iamApplication: IamApplication, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamApplication> {
var localVariablePath = "/v1/iam/applications/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamApplication, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamApplication>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Corrects an audit entry.
- parameter owner: (path)
- parameter name: (path)
- parameter iamInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAuditLog
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamAuditLogsByOwnerByName(owner: String, name: String, iamInput: IamInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAuditLog {
return try await putIamAuditLogsByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamInput: iamInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Corrects an audit entry.
- PUT /v1/iam/audit-logs/{owner}/{name}
- Corrects an audit entry. The trail is append-only in normal operation and nothing in the Hanzo Cloud rewrites it — this exists for an administrator to correct an entry their own systems recorded wrongly.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAuditLog>
*/
open class func putIamAuditLogsByOwnerByNameWithRequestBuilder(owner: String, name: String, iamInput: IamInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAuditLog> {
var localVariablePath = "/v1/iam/audit-logs/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAuditLog>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes a signing certificate's settings.
- parameter owner: (path)
- parameter name: (path)
- parameter iamCert: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamCert
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamCertsByOwnerByName(owner: String, name: String, iamCert: IamCert, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamCert {
return try await putIamCertsByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamCert: iamCert, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes a signing certificate's settings.
- PUT /v1/iam/certs/{owner}/{name}
- Changes a signing certificate's settings. What it is called does not change, and neither does when it was added. A PUT here is a METADATA edit — display name, expiry, provider. It overlays only the fields the request actually SET onto the loaded row: a field the JSON omits (or leaves at its zero value) keeps what the row holds, rather than blanking it. That is load-bearing, not a nicety. A read serves the public Certificate (Mask hides only PrivateKey and AccessSecret), so a client that reads a cert, changes one field, and writes it back sends the masked halves empty and every other field it did not touch at its zero value — and the old full-struct overlay wrote all of those blanks back. Blanking CryptoAlgorithm alone drops the cert from the JWKS (oidc.Publishes turns false), so every token under its `kid` stops verifying; blanking Provider/Account/ExpireTime breaks ACME renewal and expiry — all from a request that only meant to rename it. Absent-or-zero means \"unchanged\", so the deployment (key) and a rotation (cert) remain the only way key or published material changes; the metadata API cannot clear it. The overlay is generic — it copies every set field, so a field nobody has added yet is carried without a line here — and leaves three things the request may not move: the bound Model (id, createdAt, key, snapshot), the natural key (owner/name address the row, they do not mutate it), and the creation stamp.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamCert: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamCert>
*/
open class func putIamCertsByOwnerByNameWithRequestBuilder(owner: String, name: String, iamCert: IamCert, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamCert> {
var localVariablePath = "/v1/iam/certs/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamCert, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamCert>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Records the calling person's privacy and communication choices.
- 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 putIamConsent(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await putIamConsentWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Records the calling person's privacy and communication choices.
- PUT /v1/iam/consent
- Records the calling person's privacy and communication choices. Only their own — there is no way to set consent for somebody else. Send only the answers you are changing. A question you leave out keeps the answer it already had, so a screen that saves one switch never revokes the other, and two screens saving at once do not undo each other. An answer this version does not recognize is refused here rather than stored, so nothing is ever persisted for a later reader to have to interpret.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func putIamConsentWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
let localVariablePath = "/v1/iam/consent"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
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: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes an invitation's terms — the role it grants, how many may redeem it, or when it expires.
- parameter owner: (path)
- parameter name: (path)
- parameter iamInvitationsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamInvitation
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamInvitationsByOwnerByName(owner: String, name: String, iamInvitationsInput: IamInvitationsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamInvitation {
return try await putIamInvitationsByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamInvitationsInput: iamInvitationsInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes an invitation's terms — the role it grants, how many may redeem it, or when it expires.
- PUT /v1/iam/invitations/{owner}/{name}
- Changes an invitation's terms — the role it grants, how many may redeem it, or when it expires. What it is called does not change.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamInvitationsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamInvitation>
*/
open class func putIamInvitationsByOwnerByNameWithRequestBuilder(owner: String, name: String, iamInvitationsInput: IamInvitationsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamInvitation> {
var localVariablePath = "/v1/iam/invitations/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamInvitationsInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamInvitation>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes what a key is called or what it may reach.
- parameter owner: (path) Owner is the tenant that holds the key; Name is unique within Owner.
- parameter name: (path)
- parameter iamKey: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamKey
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamKeysByOwnerByName(owner: String, name: String, iamKey: IamKey, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamKey {
return try await putIamKeysByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamKey: iamKey, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes what a key is called or what it may reach.
- PUT /v1/iam/keys/{owner}/{name}
- Changes what a key is called or what it may reach. The credential itself is not reissued — the key in your deployment keeps working.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path) Owner is the tenant that holds the key; Name is unique within Owner.
- parameter name: (path)
- parameter iamKey: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamKey>
*/
open class func putIamKeysByOwnerByNameWithRequestBuilder(owner: String, name: String, iamKey: IamKey, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamKey> {
var localVariablePath = "/v1/iam/keys/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamKey, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamKey>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Replaces the calling person's password.
- parameter iamPasswordBody: (body)
- parameter cookie: (header) (optional)
- parameter authorization: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamAnswer
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamPassword(iamPasswordBody: IamPasswordBody, cookie: String? = nil, authorization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamAnswer {
return try await putIamPasswordWithRequestBuilder(iamPasswordBody: iamPasswordBody, cookie: cookie, authorization: authorization, apiConfiguration: apiConfiguration).execute().body
}
/**
Replaces the calling person's password.
- PUT /v1/iam/password
- Replaces the calling person's password. Only their own — there is no shape of this request that writes somebody else's. Prove who you are with the password you are replacing, or — when you cannot sign in at all — with a code sent to the address the account already holds. Exactly one of the two: a request carrying both proves nothing more than either, and answering it would mean deciding which one mattered. A reset also clears the account lockout, in the SAME transaction as the digest. Replacing a credential retires the run of guesses against the old one, and without this a person who reset a forgotten password was still refused for up to fifteen more minutes — with the brand-new password they had just chosen.
- Bearer Token:
- type: http
- name: bearer
- parameter iamPasswordBody: (body)
- parameter cookie: (header) (optional)
- parameter authorization: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamAnswer>
*/
open class func putIamPasswordWithRequestBuilder(iamPasswordBody: IamPasswordBody, cookie: String? = nil, authorization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamAnswer> {
let localVariablePath = "/v1/iam/password"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamPasswordBody, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
"Cookie": cookie?.asParameter(codableHelper: apiConfiguration.codableHelper),
"Authorization": authorization?.asParameter(codableHelper: apiConfiguration.codableHelper),
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamAnswer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes who a permission grants to, what it allows, or the resources it covers.
- parameter owner: (path) Identity — the (owner, name) natural key.
- parameter name: (path)
- parameter iamPermission: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamPermission
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamPermissionsByOwnerByName(owner: String, name: String, iamPermission: IamPermission, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamPermission {
return try await putIamPermissionsByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamPermission: iamPermission, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes who a permission grants to, what it allows, or the resources it covers.
- PUT /v1/iam/permissions/{owner}/{name}
- Changes who a permission grants to, what it allows, or the resources it covers. Access changes as soon as the write lands. What the permission is called does not change, and neither does when it was created.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path) Identity — the (owner, name) natural key.
- parameter name: (path)
- parameter iamPermission: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamPermission>
*/
open class func putIamPermissionsByOwnerByNameWithRequestBuilder(owner: String, name: String, iamPermission: IamPermission, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamPermission> {
var localVariablePath = "/v1/iam/permissions/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamPermission, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamPermission>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes a project's settings.
- parameter owner: (path)
- parameter name: (path)
- parameter iamProjectsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamProject
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamProjectsByOwnerByName(owner: String, name: String, iamProjectsInput: IamProjectsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamProject {
return try await putIamProjectsByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamProjectsInput: iamProjectsInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes a project's settings.
- PUT /v1/iam/projects/{owner}/{name}
- Changes a project's settings. What it is called does not change, and neither does when it was created.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamProjectsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamProject>
*/
open class func putIamProjectsByOwnerByNameWithRequestBuilder(owner: String, name: String, iamProjectsInput: IamProjectsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamProject> {
var localVariablePath = "/v1/iam/projects/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamProjectsInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamProject>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes who is in a role, or which roles it includes.
- parameter owner: (path)
- parameter name: (path)
- parameter iamRolesInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamRole
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamRolesByOwnerByName(owner: String, name: String, iamRolesInput: IamRolesInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamRole {
return try await putIamRolesByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamRolesInput: iamRolesInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes who is in a role, or which roles it includes.
- PUT /v1/iam/roles/{owner}/{name}
- Changes who is in a role, or which roles it includes. Access changes for everyone in it as soon as the write lands. What the role is called does not change, and neither does when it was created.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamRolesInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamRole>
*/
open class func putIamRolesByOwnerByNameWithRequestBuilder(owner: String, name: String, iamRolesInput: IamRolesInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamRole> {
var localVariablePath = "/v1/iam/roles/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamRolesInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamRole>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Overwrites a person's SCIM attributes with what your identity provider sends — how a change made there lands here.
- parameter owner: (path)
- parameter name: (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 putIamScimV2UsersByOwnerByName(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
return try await putIamScimV2UsersByOwnerByNameWithRequestBuilder(owner: owner, name: name, apiConfiguration: apiConfiguration).execute().body
}
/**
Overwrites a person's SCIM attributes with what your identity provider sends — how a change made there lands here.
- PUT /v1/iam/scim/v2/Users/{owner}/{name}
- Overwrites a person's SCIM attributes with what your identity provider sends — how a change made there lands here. Only the attributes SCIM describes are replaced. Anything the standard does not cover — their multi-factor enrolment above all — survives untouched, so a routine sync from your IdP can never quietly strip someone's second factor or bring a deleted account back.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<Void>
*/
open class func putIamScimV2UsersByOwnerByNameWithRequestBuilder(owner: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
var localVariablePath = "/v1/iam/scim/v2/Users/{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<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes who is in a team.
- parameter name: (path) Name addresses the team on update and names it on create; every other field is content and binds from the BODY, never the URL.
- parameter iamTeamsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTeam
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamTeamsByName(name: String, iamTeamsInput: IamTeamsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTeam {
return try await putIamTeamsByNameWithRequestBuilder(name: name, iamTeamsInput: iamTeamsInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes who is in a team.
- PUT /v1/iam/teams/{name}
- Changes who is in a team. Access changes for everyone in it as soon as the write lands. The name and the created stamp do not change.
- Bearer Token:
- type: http
- name: bearer
- parameter name: (path) Name addresses the team on update and names it on create; every other field is content and binds from the BODY, never the URL.
- parameter iamTeamsInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTeam>
*/
open class func putIamTeamsByNameWithRequestBuilder(name: String, iamTeamsInput: IamTeamsInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTeam> {
var localVariablePath = "/v1/iam/teams/{name}"
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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamTeamsInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamTeam>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes a person's profile, their roles, or the credentials they sign in with.
- parameter owner: (path)
- parameter name: (path)
- parameter iamUpdateInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamUser
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamUsersByOwnerByName(owner: String, name: String, iamUpdateInput: IamUpdateInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamUser {
return try await putIamUsersByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamUpdateInput: iamUpdateInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes a person's profile, their roles, or the credentials they sign in with.
- PUT /v1/iam/users/{owner}/{name}
- Changes a person's profile, their roles, or the credentials they sign in with. Send a password to reset it; leave it out and their current one keeps working. Who they are does not change: their organization, username and the identifier their existing sessions are keyed on all survive the write, so an update never signs anyone out.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamUpdateInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamUser>
*/
open class func putIamUsersByOwnerByNameWithRequestBuilder(owner: String, name: String, iamUpdateInput: IamUpdateInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamUser> {
var localVariablePath = "/v1/iam/users/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamUpdateInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamUser>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes a workspace's settings.
- parameter owner: (path)
- parameter name: (path)
- parameter iamWorkspacesInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWorkspace
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func putIamWorkspacesByOwnerByName(owner: String, name: String, iamWorkspacesInput: IamWorkspacesInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWorkspace {
return try await putIamWorkspacesByOwnerByNameWithRequestBuilder(owner: owner, name: name, iamWorkspacesInput: iamWorkspacesInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes a workspace's settings.
- PUT /v1/iam/workspaces/{owner}/{name}
- Changes a workspace's settings. What it is called does not change, and neither does when it was created.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamWorkspacesInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWorkspace>
*/
open class func putIamWorkspacesByOwnerByNameWithRequestBuilder(owner: String, name: String, iamWorkspacesInput: IamWorkspacesInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWorkspace> {
var localVariablePath = "/v1/iam/workspaces/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamWorkspacesInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamWorkspace>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes how an organization appears across Hanzo: the square mark beside its name, as an uploaded image or as a single emoji.
- parameter iamSetAvatarInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamOrganization
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func setOrganizationAvatar(iamSetAvatarInput: IamSetAvatarInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamOrganization {
return try await setOrganizationAvatarWithRequestBuilder(iamSetAvatarInput: iamSetAvatarInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes how an organization appears across Hanzo: the square mark beside its name, as an uploaded image or as a single emoji.
- POST /v1/iam/organizations/avatar
- Changes how an organization appears across Hanzo: the square mark beside its name, as an uploaded image or as a single emoji. Sending an image clears the emoji and sending an emoji clears the image — an organization has one mark, not a preference order — and sending neither clears both, which is how it goes back to being drawn as its initial. An image is an https link or the bytes inline as a data URL, up to 96 KiB. Anyone who administers the organization may set this; it is not reserved to the platform. It writes the two fields onto the stored row and touches nothing else, which update cannot do: update replaces the whole record, and a record read back first arrives masked, so a read-modify-write through it would persist the mask over the organization's own credential settings.
- Bearer Token:
- type: http
- name: bearer
- parameter iamSetAvatarInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamOrganization>
*/
open class func setOrganizationAvatarWithRequestBuilder(iamSetAvatarInput: IamSetAvatarInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamOrganization> {
let localVariablePath = "/v1/iam/organizations/avatar"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamSetAvatarInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamOrganization>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes how an organization reads: its display name, its website and its favicon.
- parameter iamSetProfileInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamOrganization
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func setOrganizationProfile(iamSetProfileInput: IamSetProfileInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamOrganization {
return try await setOrganizationProfileWithRequestBuilder(iamSetProfileInput: iamSetProfileInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes how an organization reads: its display name, its website and its favicon.
- POST /v1/iam/organizations/profile
- Changes how an organization reads: its display name, its website and its favicon. IT EXISTS FOR THE REASON SetAvatar DOES, and the reason is worth stating because the obvious alternative is a trap. Update REPLACES the whole record, so a caller that wants to change one field has to send every other field back — and a record read back first arrives MASKED, so the read half of that read-modify-write hands you \"***\" for the master password and the salt, and the write half stores it. Renaming an organization through Update therefore costs it its credential settings; sending only the new name costs it everything else. Neither is a rename. So this writes the fields it names and touches nothing else. A nil pointer is not sent and not changed; an empty string is sent and clears the field.
- Bearer Token:
- type: http
- name: bearer
- parameter iamSetProfileInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamOrganization>
*/
open class func setOrganizationProfileWithRequestBuilder(iamSetProfileInput: IamSetProfileInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamOrganization> {
let localVariablePath = "/v1/iam/organizations/profile"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamSetProfileInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamOrganization>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes an organization's display, its defaults and the sign-in rules everyone in it inherits.
- parameter owner: (path)
- parameter name: (path)
- parameter iamUpdateOrganizationInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamOrganization
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func updateOrganization(owner: String, name: String, iamUpdateOrganizationInput: IamUpdateOrganizationInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamOrganization {
return try await updateOrganizationWithRequestBuilder(owner: owner, name: name, iamUpdateOrganizationInput: iamUpdateOrganizationInput, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes an organization's display, its defaults and the sign-in rules everyone in it inherits.
- PUT /v1/iam/organizations/{owner}/{name}
- Changes an organization's display, its defaults and the sign-in rules everyone in it inherits. Which organization it is does not change, and neither does when it was created.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamUpdateOrganizationInput: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamOrganization>
*/
open class func updateOrganizationWithRequestBuilder(owner: String, name: String, iamUpdateOrganizationInput: IamUpdateOrganizationInput, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamOrganization> {
var localVariablePath = "/v1/iam/organizations/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamUpdateOrganizationInput, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamOrganization>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes a provider's settings or rotates the credentials it holds.
- parameter owner: (path)
- parameter name: (path)
- parameter iamProvider: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamMutationResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func updateProvider(owner: String, name: String, iamProvider: IamProvider, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamMutationResult {
return try await updateProviderWithRequestBuilder(owner: owner, name: name, iamProvider: iamProvider, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes a provider's settings or rotates the credentials it holds.
- PUT /v1/iam/providers/{owner}/{name}
- Changes a provider's settings or rotates the credentials it holds. The change takes effect on the next sign-in through it — sessions already issued are unaffected. A provider that is not there answers \"nothing changed\" rather than an error, so the call is safe to repeat.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamProvider: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamMutationResult>
*/
open class func updateProviderWithRequestBuilder(owner: String, name: String, iamProvider: IamProvider, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamMutationResult> {
var localVariablePath = "/v1/iam/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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamProvider, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamMutationResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Names the browsers a session keeps — signing out the ones you leave off while the session itself stays live.
- parameter owner: (path)
- parameter name: (path)
- parameter application: (path)
- parameter iamUpdateSessionIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamSession
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func updateSession(owner: String, name: String, application: String, iamUpdateSessionIn: IamUpdateSessionIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamSession {
return try await updateSessionWithRequestBuilder(owner: owner, name: name, application: application, iamUpdateSessionIn: iamUpdateSessionIn, apiConfiguration: apiConfiguration).execute().body
}
/**
Names the browsers a session keeps — signing out the ones you leave off while the session itself stays live.
- PUT /v1/iam/sessions/{owner}/{name}/{application}
- Names the browsers a session keeps — signing out the ones you leave off while the session itself stays live. A session that does not exist is reported as missing rather than created.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter application: (path)
- parameter iamUpdateSessionIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamSession>
*/
open class func updateSessionWithRequestBuilder(owner: String, name: String, application: String, iamUpdateSessionIn: IamUpdateSessionIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamSession> {
var localVariablePath = "/v1/iam/sessions/{owner}/{name}/{application}"
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 applicationPreEscape = "\(APIHelper.mapValueToPathItem(application))"
let applicationPostEscape = applicationPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{application}", with: applicationPostEscape, options: .literal, range: nil)
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamUpdateSessionIn, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamSession>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Changes an access token's scope or expiry.
- parameter owner: (path)
- parameter name: (path)
- parameter iamToken: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamTokenMutation
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func updateToken(owner: String, name: String, iamToken: IamToken, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamTokenMutation {
return try await updateTokenWithRequestBuilder(owner: owner, name: name, iamToken: iamToken, apiConfiguration: apiConfiguration).execute().body
}
/**
Changes an access token's scope or expiry.
- PUT /v1/iam/tokens/{owner}/{name}
- Changes an access token's scope or expiry. A token that is not there answers \"nothing changed\" rather than an error, so the call is safe to repeat.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamToken: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamTokenMutation>
*/
open class func updateTokenWithRequestBuilder(owner: String, name: String, iamToken: IamToken, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamTokenMutation> {
var localVariablePath = "/v1/iam/tokens/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamToken, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamTokenMutation>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Renames a registered passkey or security key, so a person can tell their devices apart.
- parameter owner: (path)
- parameter name: (path)
- parameter iamWebauthnCredential: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamWebauthnCredentialMutationResult
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func updateWebauthnCredential(owner: String, name: String, iamWebauthnCredential: IamWebauthnCredential, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamWebauthnCredentialMutationResult {
return try await updateWebauthnCredentialWithRequestBuilder(owner: owner, name: name, iamWebauthnCredential: iamWebauthnCredential, apiConfiguration: apiConfiguration).execute().body
}
/**
Renames a registered passkey or security key, so a person can tell their devices apart.
- PUT /v1/iam/webauthn-credentials/{owner}/{name}
- Renames a registered passkey or security key, so a person can tell their devices apart. A credential that is not there answers \"nothing changed\" rather than an error, so the call is safe to repeat.
- Bearer Token:
- type: http
- name: bearer
- parameter owner: (path)
- parameter name: (path)
- parameter iamWebauthnCredential: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamWebauthnCredentialMutationResult>
*/
open class func updateWebauthnCredentialWithRequestBuilder(owner: String, name: String, iamWebauthnCredential: IamWebauthnCredential, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamWebauthnCredentialMutationResult> {
var localVariablePath = "/v1/iam/webauthn-credentials/{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 = JSONEncodingHelper.encodingParameters(forEncodableObject: iamWebauthnCredential, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamWebauthnCredentialMutationResult>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Creates an application or updates it in place, so a deployment can declare the applications it needs and run the same declaration on every environment and on every redeploy.
- parameter iamRegistration: (body)
- parameter authorization: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamReply
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func upsertApplication(iamRegistration: IamRegistration, authorization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamReply {
return try await upsertApplicationWithRequestBuilder(iamRegistration: iamRegistration, authorization: authorization, apiConfiguration: apiConfiguration).execute().body
}
/**
Creates an application or updates it in place, so a deployment can declare the applications it needs and run the same declaration on every environment and on every redeploy.
- POST /v1/iam/admin/applications/upsert
- Creates an application or updates it in place, so a deployment can declare the applications it needs and run the same declaration on every environment and on every redeploy. It says which of the two it did. Leave the client secret out and the existing one is kept — so re-running your deployment does not rotate a credential your running services are holding.
- Bearer Token:
- type: http
- name: bearer
- parameter iamRegistration: (body)
- parameter authorization: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamReply>
*/
open class func upsertApplicationWithRequestBuilder(iamRegistration: IamRegistration, authorization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamReply> {
let localVariablePath = "/v1/iam/admin/applications/upsert"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamRegistration, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
"Authorization": authorization?.asParameter(codableHelper: apiConfiguration.codableHelper),
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamReply>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Creates a person or updates them in place, so a deployment can declare the accounts it needs and re-run that declaration safely.
- parameter iamPerson: (body)
- parameter authorization: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: IamReply
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func upsertUser(iamPerson: IamPerson, authorization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> IamReply {
return try await upsertUserWithRequestBuilder(iamPerson: iamPerson, authorization: authorization, apiConfiguration: apiConfiguration).execute().body
}
/**
Creates a person or updates them in place, so a deployment can declare the accounts it needs and re-run that declaration safely.
- POST /v1/iam/admin/users/upsert
- Creates a person or updates them in place, so a deployment can declare the accounts it needs and re-run that declaration safely. It DESCRIBES an account it meets and GRANTS only to one it creates: org-admin is never raised on a row that already exists, and a machine identity is answered by name rather than adopted. Both are properties of the update itself, so a steady-state reconcile — which changes neither — is unaffected. Passwords are hashed before they are stored. Leave the password out and their current one is kept, so a redeploy never locks somebody out; send the same one again and it is kept too, so a steady-state re-run is not a rotation.
- Bearer Token:
- type: http
- name: bearer
- parameter iamPerson: (body)
- parameter authorization: (header) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<IamReply>
*/
open class func upsertUserWithRequestBuilder(iamPerson: IamPerson, authorization: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<IamReply> {
let localVariablePath = "/v1/iam/admin/users/upsert"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: iamPerson, codableHelper: apiConfiguration.codableHelper)
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
"Content-Type": "application/json",
"Authorization": authorization?.asParameter(codableHelper: apiConfiguration.codableHelper),
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<IamReply>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
}