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

183 lines
12 KiB
Swift

//
// HelpAPI.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
open class HelpAPI {
/**
Returns the public knowledge base: the help center's Published, publicly-visible articles as cards.
- parameter category: (query) Category narrows the list to one knowledge-base section, matched against the article's category by exact name. Empty lists every section. (optional)
- parameter limit: (query) Limit caps how many articles are returned. Anything that is not a positive integer uses 50, and values above 200 are clamped to 200. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: HelpArticleList
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getHelpArticles(category: String? = nil, limit: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> HelpArticleList {
return try await getHelpArticlesWithRequestBuilder(category: category, limit: limit, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the public knowledge base: the help center's Published, publicly-visible articles as cards.
- GET /v1/help/articles
- Returns the public knowledge base: the help center's Published, publicly-visible articles as cards. The org is server-fixed and the status/is_public filter is server-set, so neither the tenant nor the visibility can be widened by the caller. A deployment with no help center answers 404.
- Bearer Token:
- type: http
- name: bearer
- parameter category: (query) Category narrows the list to one knowledge-base section, matched against the article's category by exact name. Empty lists every section. (optional)
- parameter limit: (query) Limit caps how many articles are returned. Anything that is not a positive integer uses 50, and values above 200 are clamped to 200. (optional)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<HelpArticleList>
*/
open class func getHelpArticlesWithRequestBuilder(category: String? = nil, limit: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<HelpArticleList> {
let localVariablePath = "/v1/help/articles"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
"category": (wrappedValue: category?.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<HelpArticleList>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns one public article by slug, with its body.
- parameter slug: (path) Slug is the article&#39;s public identifier, from the path. It IS the document name in the help center&#39;s store.
- parameter apiConfiguration: The configuration for the http request.
- returns: HelpArticle
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getHelpArticlesBySlug(slug: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> HelpArticle {
return try await getHelpArticlesBySlugWithRequestBuilder(slug: slug, apiConfiguration: apiConfiguration).execute().body
}
/**
Returns one public article by slug, with its body.
- GET /v1/help/articles/{slug}
- Returns one public article by slug, with its body. A missing, Draft, or internal (non-public) article is 404 — fail-closed, so this route is no existence oracle for anything beyond \"published and public\".
- Bearer Token:
- type: http
- name: bearer
- parameter slug: (path) Slug is the article&#39;s public identifier, from the path. It IS the document name in the help center&#39;s store.
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<HelpArticle>
*/
open class func getHelpArticlesBySlugWithRequestBuilder(slug: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<HelpArticle> {
var localVariablePath = "/v1/help/articles/{slug}"
let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))"
let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, 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<HelpArticle>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Returns the knowledge-base sections for the public center's navigation — but ONLY the sections that front at least one Published, public article, so an internal (agent-only) category name or description never leaks.
- parameter apiConfiguration: The configuration for the http request.
- returns: HelpCategoryList
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func getHelpCategories(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> HelpCategoryList {
return try await getHelpCategoriesWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
}
/**
Returns the knowledge-base sections for the public center's navigation — but ONLY the sections that front at least one Published, public article, so an internal (agent-only) category name or description never leaks.
- GET /v1/help/categories
- Returns the knowledge-base sections for the public center's navigation — but ONLY the sections that front at least one Published, public article, so an internal (agent-only) category name or description never leaks. A section with no public article is invisible; a center with no public articles has no sections, which is an empty list rather than an error.
- Bearer Token:
- type: http
- name: bearer
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<HelpCategoryList>
*/
open class func getHelpCategoriesWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<HelpCategoryList> {
let localVariablePath = "/v1/help/categories"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters: [String: any Sendable]? = nil
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
let localVariableNillableHeaders: [String: (any Sendable)?] = [
:
]
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
let localVariableRequestBuilder: RequestBuilder<HelpCategoryList>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
/**
Files a customer support ticket into the public help center.
- parameter helpTicketIntake: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: HelpTicketFiled
*/
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
open class func postHelpTickets(helpTicketIntake: HelpTicketIntake, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> HelpTicketFiled {
return try await postHelpTicketsWithRequestBuilder(helpTicketIntake: helpTicketIntake, apiConfiguration: apiConfiguration).execute().body
}
/**
Files a customer support ticket into the public help center.
- POST /v1/help/tickets
- Files a customer support ticket into the public help center. It creates the ticket (status Open, source portal) with the customer's message on the description, then records that same message as the opening entry of the ticket's conversation thread; the description carries it regardless, so failing to write that entry loses nothing. Answers 201 with an opaque reference. A deployment with no help center answers 404, one whose center has not installed the Help model answers 503, and a body over 64 KiB answers 413 — in that order, which is the order the route has always decided them in.
- Bearer Token:
- type: http
- name: bearer
- parameter helpTicketIntake: (body)
- parameter apiConfiguration: The configuration for the http request.
- returns: RequestBuilder<HelpTicketFiled>
*/
open class func postHelpTicketsWithRequestBuilder(helpTicketIntake: HelpTicketIntake, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<HelpTicketFiled> {
let localVariablePath = "/v1/help/tickets"
let localVariableURLString = apiConfiguration.basePath + localVariablePath
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: helpTicketIntake, 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<HelpTicketFiled>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
}
}