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

280 lines
18 KiB
Swift

//
// ReferenceAPI.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
open class ReferenceAPI {
/**
Removes one of your organisation's overrides.
- parameter _set: (path)
- parameter key: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: ClearReferenceOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func riskClearReference(_set: String, key: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ClearReferenceOut {
return try await riskClearReferenceWithRequestBuilder(_set: _set, key: key, apiConfiguration: apiConfiguration).execute().body
}
/**
Removes one of your organisation's overrides.
- DELETE /v1/reference/{set}
- Removes one of your organisation's overrides. It removes an entry your organisation wrote, never a baseline member: the published set is not writable from here, so a removal can only ever restore the baseline's own answer.
- Bearer Token:
- type: http
- name: bearer
- parameter _set: (path)
- parameter key: (query) (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<ClearReferenceOut>
*/
open class func riskClearReferenceWithRequestBuilder(_set: String, key: String? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ClearReferenceOut> {
var localVariablePath = "/v1/reference/{set}"
let _setPreEscape = "\(APIHelper.mapValueToPathItem(_set))"
let _setPostEscape = _setPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{set}", with: _setPostEscape, options: .literal, range: nil)
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"key": (wrappedValue: key?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<ClearReferenceOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Reference describes one set and lists your org's overrides in it.
- parameter _set: (path)
- parameter after: (query) After pages the override listing: the last key of the previous page. (optional)
- parameter limit: (query) Limit caps the override listing: default 200, maximum 1000. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: ReferenceOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func riskReference(_set: String, after: String? = nil, limit: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ReferenceOut {
return try await riskReferenceWithRequestBuilder(_set: _set, after: after, limit: limit, apiConfiguration: apiConfiguration).execute().body
}
/**
Reference describes one set and lists your org's overrides in it.
- GET /v1/reference/{set}
- Reference describes one set and lists your org's overrides in it. The set half is public data about a published list — its version, its publishers, their licences and how current each one is. The overrides half is yours alone: it is read from your organisation's own store, and no other organisation's entries can appear in it.
- Bearer Token:
- type: http
- name: bearer
- parameter _set: (path)
- parameter after: (query) After pages the override listing: the last key of the previous page. (optional)
- parameter limit: (query) Limit caps the override listing: default 200, maximum 1000. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<ReferenceOut>
*/
open class func riskReferenceWithRequestBuilder(_set: String, after: String? = nil, limit: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ReferenceOut> {
var localVariablePath = "/v1/reference/{set}"
let _setPreEscape = "\(APIHelper.mapValueToPathItem(_set))"
let _setPostEscape = _setPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{set}", with: _setPostEscape, options: .literal, range: nil)
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"after": (wrappedValue: after?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
"limit": (wrappedValue: limit?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
])
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<ReferenceOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Lists every set this plane publishes, with its version and how fresh it is.
- parameter apiConfiguration: The configuration for the http request.
- returns: ReferenceSetsOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func riskReferenceSets(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ReferenceSetsOut {
return try await riskReferenceSetsWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Lists every set this plane publishes, with its version and how fresh it is.
- GET /v1/reference
- Lists every set this plane publishes, with its version and how fresh it is. Read the Stale and Refused lists first: they are the two ways this plane can be quietly wrong, and they are reported rather than inferred. A set in Refused answers nothing — it has never loaded, it is held by another component, or it names a source we hold no licence for.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<ReferenceSetsOut>
*/
open class func riskReferenceSetsWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ReferenceSetsOut> {
let localVariablePath = "/v1/reference"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<ReferenceSetsOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Takes a new version of one set.
- parameter refreshReferenceIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RefreshReferenceOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func riskRefreshReference(refreshReferenceIn: RefreshReferenceIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> RefreshReferenceOut {
return try await riskRefreshReferenceWithRequestBuilder(refreshReferenceIn: refreshReferenceIn, apiConfiguration: apiConfiguration).execute().body
}
/**
Takes a new version of one set.
- POST /v1/reference/refresh
- Takes a new version of one set. SuperAdmin only. It is platform work, not tenant work: it writes the shared baseline every organisation reads, so it is gated to the platform's own identity. Nothing here can write an organisation's overrides, and nothing an organisation sends can reach this route. Idempotent. A version is the content digest of what was taken, so refreshing an unchanged publisher writes no rows and reports unchanged. Resumable: a run that died half-way is continued from where it stopped rather than restarted. A set whose source needs a licence we do not hold is refused with the reason, rather than being quietly skipped.
- Bearer Token:
- type: http
- name: bearer
- parameter refreshReferenceIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<RefreshReferenceOut>
*/
open class func riskRefreshReferenceWithRequestBuilder(refreshReferenceIn: RefreshReferenceIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<RefreshReferenceOut> {
let localVariablePath = "/v1/reference/refresh"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: refreshReferenceIn, 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<RefreshReferenceOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Looks keys up against the reference plane.
- parameter resolveReferenceIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: ResolveReferenceOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func riskResolveReference(resolveReferenceIn: ResolveReferenceIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ResolveReferenceOut {
return try await riskResolveReferenceWithRequestBuilder(resolveReferenceIn: resolveReferenceIn, apiConfiguration: apiConfiguration).execute().body
}
/**
Looks keys up against the reference plane.
- POST /v1/reference/resolve
- Looks keys up against the reference plane. Your organisation's own overrides are consulted FIRST and win outright; the shared baseline answers everything they do not cover. Every answer names the version that produced it, when that version was current and whether it is stale, so a decision can record exactly what it consulted. Read Refusal before reading Hit. A set that has never loaded, one held by the component that screens against it, and one whose source needs a licence we do not hold all answer with a refusal — and a miss on a refusing set means nothing is known, not that the key is clean.
- Bearer Token:
- type: http
- name: bearer
- parameter resolveReferenceIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<ResolveReferenceOut>
*/
open class func riskResolveReferenceWithRequestBuilder(resolveReferenceIn: ResolveReferenceIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ResolveReferenceOut> {
let localVariablePath = "/v1/reference/resolve"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: resolveReferenceIn, 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<ResolveReferenceOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Writes your organisation's own allow and deny entries over a set.
- parameter _set: (path)
- parameter setReferenceIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: SetReferenceOut
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func riskSetReference(_set: String, setReferenceIn: SetReferenceIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> SetReferenceOut {
return try await riskSetReferenceWithRequestBuilder(_set: _set, setReferenceIn: setReferenceIn, apiConfiguration: apiConfiguration).execute().body
}
/**
Writes your organisation's own allow and deny entries over a set.
- PUT /v1/reference/{set}
- Writes your organisation's own allow and deny entries over a set. Idempotent on the key: writing the same entry twice is one entry, and writing it again replaces the verdict and the note. The whole batch is one transaction, so a batch that would cross the per-set bound writes nothing rather than half of itself — a half-applied deny list is worse than a refused one, because nobody can tell which half applied. Your entries are held in your organisation's own store and are never visible to another organisation, and they never change what any other organisation sees. The shared baseline is not writable from here at all.
- Bearer Token:
- type: http
- name: bearer
- parameter _set: (path)
- parameter setReferenceIn: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<SetReferenceOut>
*/
open class func riskSetReferenceWithRequestBuilder(_set: String, setReferenceIn: SetReferenceIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<SetReferenceOut> {
var localVariablePath = "/v1/reference/{set}"
let _setPreEscape = "\(APIHelper.mapValueToPathItem(_set))"
let _setPostEscape = _setPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{set}", with: _setPostEscape, options: .literal, range: nil)
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: setReferenceIn, 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<SetReferenceOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
}