diff --git a/.github/workflows/build-test-ci.yml b/.github/workflows/build-test-ci.yml index 5da6536..5fb9ed8 100644 --- a/.github/workflows/build-test-ci.yml +++ b/.github/workflows/build-test-ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - uses: actions/checkout@v6 - uses: pnpm/action-setup@v3 diff --git a/lib/api/callbacks-compat.d.ts b/lib/api/callbacks-compat.d.ts index 5ea866c..69f2b0a 100644 --- a/lib/api/callbacks-compat.d.ts +++ b/lib/api/callbacks-compat.d.ts @@ -1,24 +1,16 @@ // TypeScript declaration file for Callbacks deprecated methods // This file provides type information for the deprecated methods added at runtime -import type { CancelablePromise } from "./core/CancelablePromise"; +import type { Options } from "./client"; import type { GetCallbackUrlsData, - GetCallbackUrlsResponse, AddRedirectCallbackUrlsData, - AddRedirectCallbackUrlsResponse, ReplaceRedirectCallbackUrlsData, - ReplaceRedirectCallbackUrlsResponse, DeleteCallbackUrlsData, - DeleteCallbackUrlsResponse, GetLogoutUrlsData, - GetLogoutUrlsResponse, AddLogoutRedirectUrlsData, - AddLogoutRedirectUrlsResponse, ReplaceLogoutRedirectUrlsData, - ReplaceLogoutRedirectUrlsResponse, DeleteLogoutUrlsData, - DeleteLogoutUrlsResponse, } from "./types.gen"; // Import the Callbacks class type to extend it @@ -26,63 +18,66 @@ import type { Callbacks as CallbacksClass } from "./sdk.gen"; declare module "./sdk.gen" { // Extend the Callbacks class constructor with deprecated static methods - // Using type augmentation for static methods interface CallbacksStatic { /** * @deprecated Use `getCallbackUrls` instead. This method will be removed in a future version. */ - getCallbackUrLs( - data: GetCallbackUrlsData, - ): CancelablePromise; + getCallbackUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `addRedirectCallbackUrls` instead. This method will be removed in a future version. */ - addRedirectCallbackUrLs( - data: AddRedirectCallbackUrlsData, - ): CancelablePromise; + addRedirectCallbackUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `replaceRedirectCallbackUrls` instead. This method will be removed in a future version. */ - replaceRedirectCallbackUrLs( - data: ReplaceRedirectCallbackUrlsData, - ): CancelablePromise; + replaceRedirectCallbackUrLs( + options: Options, + ): ReturnType< + typeof CallbacksClass.replaceRedirectCallbackUrls + >; /** * @deprecated Use `deleteCallbackUrls` instead. This method will be removed in a future version. */ - deleteCallbackUrLs( - data: DeleteCallbackUrlsData, - ): CancelablePromise; + deleteCallbackUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `getLogoutUrls` instead. This method will be removed in a future version. */ - getLogoutUrLs( - data: GetLogoutUrlsData, - ): CancelablePromise; + getLogoutUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `addLogoutRedirectUrls` instead. This method will be removed in a future version. */ - addLogoutRedirectUrLs( - data: AddLogoutRedirectUrlsData, - ): CancelablePromise; + addLogoutRedirectUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `replaceLogoutRedirectUrls` instead. This method will be removed in a future version. */ - replaceLogoutRedirectUrLs( - data: ReplaceLogoutRedirectUrlsData, - ): CancelablePromise; + replaceLogoutRedirectUrLs( + options: Options, + ): ReturnType< + typeof CallbacksClass.replaceLogoutRedirectUrls + >; /** * @deprecated Use `deleteLogoutUrls` instead. This method will be removed in a future version. */ - deleteLogoutUrLs( - data: DeleteLogoutUrlsData, - ): CancelablePromise; + deleteLogoutUrLs( + options: Options, + ): ReturnType>; } // Merge the static methods with the class constructor diff --git a/lib/api/callbacks-compat.ts b/lib/api/callbacks-compat.ts index 4cf7ca9..74bc50c 100644 --- a/lib/api/callbacks-compat.ts +++ b/lib/api/callbacks-compat.ts @@ -3,24 +3,16 @@ // This file should NOT be auto-generated and will persist across regenerations import { Callbacks as CallbacksOriginal } from "./sdk.gen"; -import type { CancelablePromise } from "./core/CancelablePromise"; +import type { Options } from "./client"; import type { GetCallbackUrlsData, - GetCallbackUrlsResponse, AddRedirectCallbackUrlsData, - AddRedirectCallbackUrlsResponse, ReplaceRedirectCallbackUrlsData, - ReplaceRedirectCallbackUrlsResponse, DeleteCallbackUrlsData, - DeleteCallbackUrlsResponse, GetLogoutUrlsData, - GetLogoutUrlsResponse, AddLogoutRedirectUrlsData, - AddLogoutRedirectUrlsResponse, ReplaceLogoutRedirectUrlsData, - ReplaceLogoutRedirectUrlsResponse, DeleteLogoutUrlsData, - DeleteLogoutUrlsResponse, } from "./types.gen"; // Type definition for deprecated methods @@ -28,58 +20,62 @@ interface DeprecatedCallbacksMethods { /** * @deprecated Use `getCallbackUrls` instead. This method will be removed in a future version. */ - getCallbackUrLs( - data: GetCallbackUrlsData, - ): CancelablePromise; + getCallbackUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `addRedirectCallbackUrls` instead. This method will be removed in a future version. */ - addRedirectCallbackUrLs( - data: AddRedirectCallbackUrlsData, - ): CancelablePromise; + addRedirectCallbackUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `replaceRedirectCallbackUrls` instead. This method will be removed in a future version. */ - replaceRedirectCallbackUrLs( - data: ReplaceRedirectCallbackUrlsData, - ): CancelablePromise; + replaceRedirectCallbackUrLs( + options: Options, + ): ReturnType< + typeof CallbacksOriginal.replaceRedirectCallbackUrls + >; /** * @deprecated Use `deleteCallbackUrls` instead. This method will be removed in a future version. */ - deleteCallbackUrLs( - data: DeleteCallbackUrlsData, - ): CancelablePromise; + deleteCallbackUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `getLogoutUrls` instead. This method will be removed in a future version. */ - getLogoutUrLs( - data: GetLogoutUrlsData, - ): CancelablePromise; + getLogoutUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `addLogoutRedirectUrls` instead. This method will be removed in a future version. */ - addLogoutRedirectUrLs( - data: AddLogoutRedirectUrlsData, - ): CancelablePromise; + addLogoutRedirectUrLs( + options: Options, + ): ReturnType>; /** * @deprecated Use `replaceLogoutRedirectUrls` instead. This method will be removed in a future version. */ - replaceLogoutRedirectUrLs( - data: ReplaceLogoutRedirectUrlsData, - ): CancelablePromise; + replaceLogoutRedirectUrLs( + options: Options, + ): ReturnType< + typeof CallbacksOriginal.replaceLogoutRedirectUrls + >; /** * @deprecated Use `deleteLogoutUrls` instead. This method will be removed in a future version. */ - deleteLogoutUrLs( - data: DeleteLogoutUrlsData, - ): CancelablePromise; + deleteLogoutUrLs( + options: Options, + ): ReturnType>; } // Add deprecated method aliases to the Callbacks class @@ -88,73 +84,73 @@ Object.assign(CallbacksOriginal, { /** * @deprecated Use `getCallbackUrls` instead. This method will be removed in a future version. */ - getCallbackUrLs( - data: GetCallbackUrlsData, - ): CancelablePromise { - return CallbacksOriginal.getCallbackUrls(data); + getCallbackUrLs( + options: Options, + ) { + return CallbacksOriginal.getCallbackUrls(options); }, /** * @deprecated Use `addRedirectCallbackUrls` instead. This method will be removed in a future version. */ - addRedirectCallbackUrLs( - data: AddRedirectCallbackUrlsData, - ): CancelablePromise { - return CallbacksOriginal.addRedirectCallbackUrls(data); + addRedirectCallbackUrLs( + options: Options, + ) { + return CallbacksOriginal.addRedirectCallbackUrls(options); }, /** * @deprecated Use `replaceRedirectCallbackUrls` instead. This method will be removed in a future version. */ - replaceRedirectCallbackUrLs( - data: ReplaceRedirectCallbackUrlsData, - ): CancelablePromise { - return CallbacksOriginal.replaceRedirectCallbackUrls(data); + replaceRedirectCallbackUrLs( + options: Options, + ) { + return CallbacksOriginal.replaceRedirectCallbackUrls(options); }, /** * @deprecated Use `deleteCallbackUrls` instead. This method will be removed in a future version. */ - deleteCallbackUrLs( - data: DeleteCallbackUrlsData, - ): CancelablePromise { - return CallbacksOriginal.deleteCallbackUrls(data); + deleteCallbackUrLs( + options: Options, + ) { + return CallbacksOriginal.deleteCallbackUrls(options); }, /** * @deprecated Use `getLogoutUrls` instead. This method will be removed in a future version. */ - getLogoutUrLs( - data: GetLogoutUrlsData, - ): CancelablePromise { - return CallbacksOriginal.getLogoutUrls(data); + getLogoutUrLs( + options: Options, + ) { + return CallbacksOriginal.getLogoutUrls(options); }, /** * @deprecated Use `addLogoutRedirectUrls` instead. This method will be removed in a future version. */ - addLogoutRedirectUrLs( - data: AddLogoutRedirectUrlsData, - ): CancelablePromise { - return CallbacksOriginal.addLogoutRedirectUrls(data); + addLogoutRedirectUrLs( + options: Options, + ) { + return CallbacksOriginal.addLogoutRedirectUrls(options); }, /** * @deprecated Use `replaceLogoutRedirectUrls` instead. This method will be removed in a future version. */ - replaceLogoutRedirectUrLs( - data: ReplaceLogoutRedirectUrlsData, - ): CancelablePromise { - return CallbacksOriginal.replaceLogoutRedirectUrls(data); + replaceLogoutRedirectUrLs( + options: Options, + ) { + return CallbacksOriginal.replaceLogoutRedirectUrls(options); }, /** * @deprecated Use `deleteLogoutUrls` instead. This method will be removed in a future version. */ - deleteLogoutUrLs( - data: DeleteLogoutUrlsData, - ): CancelablePromise { - return CallbacksOriginal.deleteLogoutUrls(data); + deleteLogoutUrLs( + options: Options, + ) { + return CallbacksOriginal.deleteLogoutUrls(options); }, }); diff --git a/lib/api/client.gen.ts b/lib/api/client.gen.ts new file mode 100644 index 0000000..9c88abf --- /dev/null +++ b/lib/api/client.gen.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { + type ClientOptions, + type Config, + createClient, + createConfig, +} from "./client"; +import type { ClientOptions as ClientOptions2 } from "./types.gen"; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T>; + +export const client = createClient( + createConfig({ + baseUrl: "https://your_kinde_subdomain.kinde.com", + }), +); diff --git a/lib/api/client/client.gen.ts b/lib/api/client/client.gen.ts new file mode 100644 index 0000000..303fab6 --- /dev/null +++ b/lib/api/client/client.gen.ts @@ -0,0 +1,324 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { createSseClient } from "../core/serverSentEvents.gen"; +import type { HttpMethod } from "../core/types.gen"; +import { getValidRequestBody } from "../core/utils.gen"; +import type { + Client, + Config, + RequestOptions, + ResolvedRequestOptions, +} from "./types.gen"; +import { + buildUrl, + createConfig, + createInterceptors, + getParseAs, + mergeConfigs, + mergeHeaders, + setAuthParams, +} from "./utils.gen"; + +type ReqInit = Omit & { + body?: any; + headers: ReturnType; +}; + +export const createClient = (config: Config = {}): Client => { + let _config = mergeConfigs(createConfig(), config); + + const getConfig = (): Config => ({ ..._config }); + + const setConfig = (config: Config): Config => { + _config = mergeConfigs(_config, config); + return getConfig(); + }; + + const interceptors = createInterceptors< + Request, + Response, + unknown, + ResolvedRequestOptions + >(); + + const beforeRequest = async < + TData = unknown, + TResponseStyle extends "data" | "fields" = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, + >( + options: RequestOptions, + ) => { + const opts = { + ..._config, + ...options, + fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, + headers: mergeHeaders(_config.headers, options.headers), + serializedBody: undefined as string | undefined, + }; + + if (opts.security) { + await setAuthParams({ + ...opts, + security: opts.security, + }); + } + + if (opts.requestValidator) { + await opts.requestValidator(opts); + } + + if (opts.body !== undefined && opts.bodySerializer) { + opts.serializedBody = opts.bodySerializer(opts.body) as + | string + | undefined; + } + + // remove Content-Type header if body is empty to avoid sending invalid requests + if (opts.body === undefined || opts.serializedBody === "") { + opts.headers.delete("Content-Type"); + } + + const resolvedOpts = opts as typeof opts & + ResolvedRequestOptions; + const url = buildUrl(resolvedOpts); + + return { opts: resolvedOpts, url }; + }; + + const request: Client["request"] = async (options) => { + const { opts, url } = await beforeRequest(options); + const requestInit: ReqInit = { + redirect: "follow", + ...opts, + body: getValidRequestBody(opts), + }; + + let request = new Request(url, requestInit); + + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } + } + + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = opts.fetch!; + let response: Response; + + try { + response = await _fetch(request); + } catch (error) { + // Handle fetch exceptions (AbortError, network errors, etc.) + let finalError = error; + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = (await fn( + error, + undefined as any, + request, + opts, + )) as unknown; + } + } + + finalError = finalError || ({} as unknown); + + if (opts.throwOnError) { + throw finalError; + } + + // Return error response + return opts.responseStyle === "data" + ? undefined + : { + error: finalError, + request, + response: undefined as any, + }; + } + + for (const fn of interceptors.response.fns) { + if (fn) { + response = await fn(response, request, opts); + } + } + + const result = { + request, + response, + }; + + if (response.ok) { + const parseAs = + (opts.parseAs === "auto" + ? getParseAs(response.headers.get("Content-Type")) + : opts.parseAs) ?? "json"; + + if ( + response.status === 204 || + response.headers.get("Content-Length") === "0" + ) { + let emptyData: any; + switch (parseAs) { + case "arrayBuffer": + case "blob": + case "text": + emptyData = await response[parseAs](); + break; + case "formData": + emptyData = new FormData(); + break; + case "stream": + emptyData = response.body; + break; + case "json": + default: + emptyData = {}; + break; + } + return opts.responseStyle === "data" + ? emptyData + : { + data: emptyData, + ...result, + }; + } + + let data: any; + switch (parseAs) { + case "arrayBuffer": + case "blob": + case "formData": + case "text": + data = await response[parseAs](); + break; + case "json": { + // Some servers return 200 with no Content-Length and empty body. + // response.json() would throw; read as text and parse if non-empty. + const text = await response.text(); + data = text ? JSON.parse(text) : {}; + break; + } + case "stream": + return opts.responseStyle === "data" + ? response.body + : { + data: response.body, + ...result, + }; + } + + if (parseAs === "json") { + if (opts.responseValidator) { + await opts.responseValidator(data); + } + + if (opts.responseTransformer) { + data = await opts.responseTransformer(data); + } + } + + return opts.responseStyle === "data" + ? data + : { + data, + ...result, + }; + } + + const textError = await response.text(); + let jsonError: unknown; + + try { + jsonError = JSON.parse(textError); + } catch { + // noop + } + + const error = jsonError ?? textError; + let finalError = error; + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = (await fn(error, response, request, opts)) as string; + } + } + + finalError = finalError || ({} as string); + + if (opts.throwOnError) { + throw finalError; + } + + // TODO: we probably want to return error and improve types + return opts.responseStyle === "data" + ? undefined + : { + error: finalError, + ...result, + }; + }; + + const makeMethodFn = + (method: Uppercase) => (options: RequestOptions) => + request({ ...options, method }); + + const makeSseFn = + (method: Uppercase) => async (options: RequestOptions) => { + const { opts, url } = await beforeRequest(options); + return createSseClient({ + ...opts, + body: opts.body as BodyInit | null | undefined, + headers: opts.headers as unknown as Record, + method, + onRequest: async (url, init) => { + let request = new Request(url, init); + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } + } + return request; + }, + serializedBody: getValidRequestBody(opts) as + | BodyInit + | null + | undefined, + url, + }); + }; + + const _buildUrl: Client["buildUrl"] = (options) => + buildUrl({ ..._config, ...options }); + + return { + buildUrl: _buildUrl, + connect: makeMethodFn("CONNECT"), + delete: makeMethodFn("DELETE"), + get: makeMethodFn("GET"), + getConfig, + head: makeMethodFn("HEAD"), + interceptors, + options: makeMethodFn("OPTIONS"), + patch: makeMethodFn("PATCH"), + post: makeMethodFn("POST"), + put: makeMethodFn("PUT"), + request, + setConfig, + sse: { + connect: makeSseFn("CONNECT"), + delete: makeSseFn("DELETE"), + get: makeSseFn("GET"), + head: makeSseFn("HEAD"), + options: makeSseFn("OPTIONS"), + patch: makeSseFn("PATCH"), + post: makeSseFn("POST"), + put: makeSseFn("PUT"), + trace: makeSseFn("TRACE"), + }, + trace: makeMethodFn("TRACE"), + } as Client; +}; diff --git a/lib/api/client/index.ts b/lib/api/client/index.ts new file mode 100644 index 0000000..4602312 --- /dev/null +++ b/lib/api/client/index.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type { Auth } from "../core/auth.gen"; +export type { QuerySerializerOptions } from "../core/bodySerializer.gen"; +export { + formDataBodySerializer, + jsonBodySerializer, + urlSearchParamsBodySerializer, +} from "../core/bodySerializer.gen"; +export { buildClientParams } from "../core/params.gen"; +export { serializeQueryKeyValue } from "../core/queryKeySerializer.gen"; +export { createClient } from "./client.gen"; +export type { + Client, + ClientOptions, + Config, + CreateClientConfig, + Options, + RequestOptions, + RequestResult, + ResolvedRequestOptions, + ResponseStyle, + TDataShape, +} from "./types.gen"; +export { createConfig, mergeHeaders } from "./utils.gen"; diff --git a/lib/api/client/types.gen.ts b/lib/api/client/types.gen.ts new file mode 100644 index 0000000..d84e919 --- /dev/null +++ b/lib/api/client/types.gen.ts @@ -0,0 +1,244 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth } from "../core/auth.gen"; +import type { + ServerSentEventsOptions, + ServerSentEventsResult, +} from "../core/serverSentEvents.gen"; +import type { + Client as CoreClient, + Config as CoreConfig, +} from "../core/types.gen"; +import type { Middleware } from "./utils.gen"; + +export type ResponseStyle = "data" | "fields"; + +export interface Config + extends Omit, CoreConfig { + /** + * Base URL for all requests made by this client. + */ + baseUrl?: T["baseUrl"]; + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch; + /** + * Please don't use the Fetch client for Next.js applications. The `next` + * options won't have any effect. + * + * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. + */ + next?: never; + /** + * Return the response data parsed in a specified format. By default, `auto` + * will infer the appropriate method from the `Content-Type` response header. + * You can override this behavior with any of the {@link Body} methods. + * Select `stream` if you don't want to parse response data at all. + * + * @default 'auto' + */ + parseAs?: + | "arrayBuffer" + | "auto" + | "blob" + | "formData" + | "json" + | "stream" + | "text"; + /** + * Should we return only data or multiple fields (data, error, response, etc.)? + * + * @default 'fields' + */ + responseStyle?: ResponseStyle; + /** + * Throw an error instead of returning it in the response? + * + * @default false + */ + throwOnError?: T["throwOnError"]; +} + +export interface RequestOptions< + TData = unknown, + TResponseStyle extends ResponseStyle = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, +> + extends + Config<{ + responseStyle: TResponseStyle; + throwOnError: ThrowOnError; + }>, + Pick< + ServerSentEventsOptions, + | "onRequest" + | "onSseError" + | "onSseEvent" + | "sseDefaultRetryDelay" + | "sseMaxRetryAttempts" + | "sseMaxRetryDelay" + > { + /** + * Any body that you want to add to your request. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} + */ + body?: unknown; + path?: Record; + query?: Record; + /** + * Security mechanism(s) to use for the request. + */ + security?: ReadonlyArray; + url: Url; +} + +export interface ResolvedRequestOptions< + TResponseStyle extends ResponseStyle = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends RequestOptions { + headers: Headers; + serializedBody?: string; +} + +export type RequestResult< + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = boolean, + TResponseStyle extends ResponseStyle = "fields", +> = ThrowOnError extends true + ? Promise< + TResponseStyle extends "data" + ? TData extends Record + ? TData[keyof TData] + : TData + : { + data: TData extends Record + ? TData[keyof TData] + : TData; + request: Request; + response: Response; + } + > + : Promise< + TResponseStyle extends "data" + ? + | (TData extends Record + ? TData[keyof TData] + : TData) + | undefined + : ( + | { + data: TData extends Record + ? TData[keyof TData] + : TData; + error: undefined; + } + | { + data: undefined; + error: TError extends Record + ? TError[keyof TError] + : TError; + } + ) & { + request: Request; + response: Response; + } + >; + +export interface ClientOptions { + baseUrl?: string; + responseStyle?: ResponseStyle; + throwOnError?: boolean; +} + +type MethodFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method">, +) => RequestResult; + +type SseFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method">, +) => Promise>; + +type RequestFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method"> & + Pick< + Required>, + "method" + >, +) => RequestResult; + +type BuildUrlFn = < + TData extends { + body?: unknown; + path?: Record; + query?: Record; + url: string; + }, +>( + options: TData & Options, +) => string; + +export type Client = CoreClient< + RequestFn, + Config, + MethodFn, + BuildUrlFn, + SseFn +> & { + interceptors: Middleware; +}; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T>; + +export interface TDataShape { + body?: unknown; + headers?: unknown; + path?: unknown; + query?: unknown; + url: string; +} + +type OmitKeys = Pick>; + +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, + TResponseStyle extends ResponseStyle = "fields", +> = OmitKeys< + RequestOptions, + "body" | "path" | "query" | "url" +> & + ([TData] extends [never] ? unknown : Omit); diff --git a/lib/api/client/utils.gen.ts b/lib/api/client/utils.gen.ts new file mode 100644 index 0000000..8df9544 --- /dev/null +++ b/lib/api/client/utils.gen.ts @@ -0,0 +1,337 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { getAuthToken } from "../core/auth.gen"; +import type { QuerySerializerOptions } from "../core/bodySerializer.gen"; +import { jsonBodySerializer } from "../core/bodySerializer.gen"; +import { + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from "../core/pathSerializer.gen"; +import { getUrl } from "../core/utils.gen"; +import type { + Client, + ClientOptions, + Config, + RequestOptions, +} from "./types.gen"; + +export const createQuerySerializer = ({ + parameters = {}, + ...args +}: QuerySerializerOptions = {}) => { + const querySerializer = (queryParams: T) => { + const search: string[] = []; + if (queryParams && typeof queryParams === "object") { + for (const name in queryParams) { + const value = queryParams[name]; + + if (value === undefined || value === null) { + continue; + } + + const options = parameters[name] || args; + + if (Array.isArray(value)) { + const serializedArray = serializeArrayParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: "form", + value, + ...options.array, + }); + if (serializedArray) search.push(serializedArray); + } else if (typeof value === "object") { + const serializedObject = serializeObjectParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: "deepObject", + value: value as Record, + ...options.object, + }); + if (serializedObject) search.push(serializedObject); + } else { + const serializedPrimitive = serializePrimitiveParam({ + allowReserved: options.allowReserved, + name, + value: value as string, + }); + if (serializedPrimitive) search.push(serializedPrimitive); + } + } + } + return search.join("&"); + }; + return querySerializer; +}; + +/** + * Infers parseAs value from provided Content-Type header. + */ +export const getParseAs = ( + contentType: string | null, +): Exclude => { + if (!contentType) { + // If no Content-Type header is provided, the best we can do is return the raw response body, + // which is effectively the same as the 'stream' option. + return "stream"; + } + + const cleanContent = contentType.split(";")[0]?.trim(); + + if (!cleanContent) { + return; + } + + if ( + cleanContent.startsWith("application/json") || + cleanContent.endsWith("+json") + ) { + return "json"; + } + + if (cleanContent === "multipart/form-data") { + return "formData"; + } + + if ( + ["application/", "audio/", "image/", "video/"].some((type) => + cleanContent.startsWith(type), + ) + ) { + return "blob"; + } + + if (cleanContent.startsWith("text/")) { + return "text"; + } + + return; +}; + +const checkForExistence = ( + options: Pick & { + headers: Headers; + }, + name?: string, +): boolean => { + if (!name) { + return false; + } + if ( + options.headers.has(name) || + options.query?.[name] || + options.headers.get("Cookie")?.includes(`${name}=`) + ) { + return true; + } + return false; +}; + +export const setAuthParams = async ({ + security, + ...options +}: Pick, "security"> & + Pick & { + headers: Headers; + }) => { + for (const auth of security) { + if (checkForExistence(options, auth.name)) { + continue; + } + + const token = await getAuthToken(auth, options.auth); + + if (!token) { + continue; + } + + const name = auth.name ?? "Authorization"; + + switch (auth.in) { + case "query": + if (!options.query) { + options.query = {}; + } + options.query[name] = token; + break; + case "cookie": + options.headers.append("Cookie", `${name}=${token}`); + break; + case "header": + default: + options.headers.set(name, token); + break; + } + } +}; + +export const buildUrl: Client["buildUrl"] = (options) => + getUrl({ + baseUrl: options.baseUrl as string, + path: options.path, + query: options.query, + querySerializer: + typeof options.querySerializer === "function" + ? options.querySerializer + : createQuerySerializer(options.querySerializer), + url: options.url, + }); + +export const mergeConfigs = (a: Config, b: Config): Config => { + const config = { ...a, ...b }; + if (config.baseUrl?.endsWith("/")) { + config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); + } + config.headers = mergeHeaders(a.headers, b.headers); + return config; +}; + +const headersEntries = (headers: Headers): Array<[string, string]> => { + const entries: Array<[string, string]> = []; + headers.forEach((value, key) => { + entries.push([key, value]); + }); + return entries; +}; + +export const mergeHeaders = ( + ...headers: Array["headers"] | undefined> +): Headers => { + const mergedHeaders = new Headers(); + for (const header of headers) { + if (!header) { + continue; + } + + const iterator = + header instanceof Headers + ? headersEntries(header) + : Object.entries(header); + + for (const [key, value] of iterator) { + if (value === null) { + mergedHeaders.delete(key); + } else if (Array.isArray(value)) { + for (const v of value) { + mergedHeaders.append(key, v as string); + } + } else if (value !== undefined) { + // assume object headers are meant to be JSON stringified, i.e., their + // content value in OpenAPI specification is 'application/json' + mergedHeaders.set( + key, + typeof value === "object" ? JSON.stringify(value) : (value as string), + ); + } + } + } + return mergedHeaders; +}; + +type ErrInterceptor = ( + error: Err, + response: Res, + request: Req, + options: Options, +) => Err | Promise; + +type ReqInterceptor = ( + request: Req, + options: Options, +) => Req | Promise; + +type ResInterceptor = ( + response: Res, + request: Req, + options: Options, +) => Res | Promise; + +class Interceptors { + fns: Array = []; + + clear(): void { + this.fns = []; + } + + eject(id: number | Interceptor): void { + const index = this.getInterceptorIndex(id); + if (this.fns[index]) { + this.fns[index] = null; + } + } + + exists(id: number | Interceptor): boolean { + const index = this.getInterceptorIndex(id); + return Boolean(this.fns[index]); + } + + getInterceptorIndex(id: number | Interceptor): number { + if (typeof id === "number") { + return this.fns[id] ? id : -1; + } + return this.fns.indexOf(id); + } + + update( + id: number | Interceptor, + fn: Interceptor, + ): number | Interceptor | false { + const index = this.getInterceptorIndex(id); + if (this.fns[index]) { + this.fns[index] = fn; + return id; + } + return false; + } + + use(fn: Interceptor): number { + this.fns.push(fn); + return this.fns.length - 1; + } +} + +export interface Middleware { + error: Interceptors>; + request: Interceptors>; + response: Interceptors>; +} + +export const createInterceptors = (): Middleware< + Req, + Res, + Err, + Options +> => ({ + error: new Interceptors>(), + request: new Interceptors>(), + response: new Interceptors>(), +}); + +const defaultQuerySerializer = createQuerySerializer({ + allowReserved: false, + array: { + explode: true, + style: "form", + }, + object: { + explode: true, + style: "deepObject", + }, +}); + +const defaultHeaders = { + "Content-Type": "application/json", +}; + +export const createConfig = ( + override: Config & T> = {}, +): Config & T> => ({ + ...jsonBodySerializer, + headers: defaultHeaders, + parseAs: "auto", + querySerializer: defaultQuerySerializer, + ...override, +}); diff --git a/lib/api/core/ApiError.ts b/lib/api/core/ApiError.ts deleted file mode 100644 index 1d07bb3..0000000 --- a/lib/api/core/ApiError.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; - -export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; - - constructor( - request: ApiRequestOptions, - response: ApiResult, - message: string, - ) { - super(message); - - this.name = "ApiError"; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } -} diff --git a/lib/api/core/ApiRequestOptions.ts b/lib/api/core/ApiRequestOptions.ts deleted file mode 100644 index 45e204f..0000000 --- a/lib/api/core/ApiRequestOptions.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type ApiRequestOptions = { - readonly body?: any; - readonly cookies?: Record; - readonly errors?: Record; - readonly formData?: Record | any[] | Blob | File; - readonly headers?: Record; - readonly mediaType?: string; - readonly method: - | "DELETE" - | "GET" - | "HEAD" - | "OPTIONS" - | "PATCH" - | "POST" - | "PUT"; - readonly path?: Record; - readonly query?: Record; - readonly responseHeader?: string; - readonly responseTransformer?: (data: unknown) => Promise; - readonly url: string; -}; diff --git a/lib/api/core/ApiResult.ts b/lib/api/core/ApiResult.ts deleted file mode 100644 index 05040ba..0000000 --- a/lib/api/core/ApiResult.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; -}; diff --git a/lib/api/core/CancelablePromise.ts b/lib/api/core/CancelablePromise.ts deleted file mode 100644 index 0640e98..0000000 --- a/lib/api/core/CancelablePromise.ts +++ /dev/null @@ -1,126 +0,0 @@ -export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = "CancelError"; - } - - public get isCancelled(): boolean { - return true; - } -} - -export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; - - (cancelHandler: () => void): void; -} - -export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel, - ) => void, - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isResolved = true; - if (this._resolve) this._resolve(value); - }; - - const onReject = (reason?: unknown): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isRejected = true; - if (this._reject) this._reject(reason); - }; - - const onCancel = (cancelHandler: () => void): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this.cancelHandlers.push(cancelHandler); - }; - - Object.defineProperty(onCancel, "isResolved", { - get: (): boolean => this._isResolved, - }); - - Object.defineProperty(onCancel, "isRejected", { - get: (): boolean => this._isRejected, - }); - - Object.defineProperty(onCancel, "isCancelled", { - get: (): boolean => this._isCancelled, - }); - - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, - ): Promise { - return this.promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } - - public cancel(): void { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isCancelled = true; - if (this.cancelHandlers.length) { - try { - for (const cancelHandler of this.cancelHandlers) { - cancelHandler(); - } - } catch (error) { - console.warn("Cancellation threw an error", error); - return; - } - } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError("Request aborted")); - } - - public get isCancelled(): boolean { - return this._isCancelled; - } -} diff --git a/lib/api/core/OpenAPI.ts b/lib/api/core/OpenAPI.ts deleted file mode 100644 index 0defc0c..0000000 --- a/lib/api/core/OpenAPI.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { ApiRequestOptions } from "./ApiRequestOptions"; - -type Headers = Record; -type Middleware = (value: T) => T | Promise; -type Resolver = (options: ApiRequestOptions) => Promise; - -export class Interceptors { - _fns: Middleware[]; - - constructor() { - this._fns = []; - } - - eject(fn: Middleware): void { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } - } - - use(fn: Middleware): void { - this._fns = [...this._fns, fn]; - } -} - -export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: "include" | "omit" | "same-origin"; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { - request: Interceptors; - response: Interceptors; - }; -}; - -export const OpenAPI: OpenAPIConfig = { - BASE: "https://your_kinde_subdomain.kinde.com", - CREDENTIALS: "include", - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: "1", - WITH_CREDENTIALS: false, - interceptors: { - request: new Interceptors(), - response: new Interceptors(), - }, -}; diff --git a/lib/api/core/auth.gen.ts b/lib/api/core/auth.gen.ts new file mode 100644 index 0000000..3d74115 --- /dev/null +++ b/lib/api/core/auth.gen.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type AuthToken = string | undefined; + +export interface Auth { + /** + * Which part of the request do we use to send the auth? + * + * @default 'header' + */ + in?: "header" | "query" | "cookie"; + /** + * Header or query parameter name. + * + * @default 'Authorization' + */ + name?: string; + scheme?: "basic" | "bearer"; + type: "apiKey" | "http"; +} + +export const getAuthToken = async ( + auth: Auth, + callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, +): Promise => { + const token = + typeof callback === "function" ? await callback(auth) : callback; + + if (!token) { + return; + } + + if (auth.scheme === "bearer") { + return `Bearer ${token}`; + } + + if (auth.scheme === "basic") { + return `Basic ${btoa(token)}`; + } + + return token; +}; diff --git a/lib/api/core/bodySerializer.gen.ts b/lib/api/core/bodySerializer.gen.ts new file mode 100644 index 0000000..6aadfde --- /dev/null +++ b/lib/api/core/bodySerializer.gen.ts @@ -0,0 +1,96 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { + ArrayStyle, + ObjectStyle, + SerializerOptions, +} from "./pathSerializer.gen"; + +export type QuerySerializer = (query: Record) => string; + +export type BodySerializer = (body: unknown) => unknown; + +type QuerySerializerOptionsObject = { + allowReserved?: boolean; + array?: Partial>; + object?: Partial>; +}; + +export type QuerySerializerOptions = QuerySerializerOptionsObject & { + /** + * Per-parameter serialization overrides. When provided, these settings + * override the global array/object settings for specific parameter names. + */ + parameters?: Record; +}; + +const serializeFormDataPair = ( + data: FormData, + key: string, + value: unknown, +): void => { + if (typeof value === "string" || value instanceof Blob) { + data.append(key, value); + } else if (value instanceof Date) { + data.append(key, value.toISOString()); + } else { + data.append(key, JSON.stringify(value)); + } +}; + +const serializeUrlSearchParamsPair = ( + data: URLSearchParams, + key: string, + value: unknown, +): void => { + if (typeof value === "string") { + data.append(key, value); + } else { + data.append(key, JSON.stringify(value)); + } +}; + +export const formDataBodySerializer = { + bodySerializer: (body: unknown): FormData => { + const data = new FormData(); + + Object.entries(body as Record).forEach(([key, value]) => { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + value.forEach((v) => serializeFormDataPair(data, key, v)); + } else { + serializeFormDataPair(data, key, value); + } + }); + + return data; + }, +}; + +export const jsonBodySerializer = { + bodySerializer: (body: unknown): string => + JSON.stringify(body, (_key, value) => + typeof value === "bigint" ? value.toString() : value, + ), +}; + +export const urlSearchParamsBodySerializer = { + bodySerializer: (body: unknown): string => { + const data = new URLSearchParams(); + + Object.entries(body as Record).forEach(([key, value]) => { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); + } else { + serializeUrlSearchParamsPair(data, key, value); + } + }); + + return data.toString(); + }, +}; diff --git a/lib/api/core/params.gen.ts b/lib/api/core/params.gen.ts new file mode 100644 index 0000000..28764e7 --- /dev/null +++ b/lib/api/core/params.gen.ts @@ -0,0 +1,181 @@ +// This file is auto-generated by @hey-api/openapi-ts + +type Slot = "body" | "headers" | "path" | "query"; + +export type Field = + | { + in: Exclude; + /** + * Field name. This is the name we want the user to see and use. + */ + key: string; + /** + * Field mapped name. This is the name we want to use in the request. + * If omitted, we use the same value as `key`. + */ + map?: string; + } + | { + in: Extract; + /** + * Key isn't required for bodies. + */ + key?: string; + map?: string; + } + | { + /** + * Field name. This is the name we want the user to see and use. + */ + key: string; + /** + * Field mapped name. This is the name we want to use in the request. + * If `in` is omitted, `map` aliases `key` to the transport layer. + */ + map: Slot; + }; + +export interface Fields { + allowExtra?: Partial>; + args?: ReadonlyArray; +} + +export type FieldsConfig = ReadonlyArray; + +const extraPrefixesMap: Record = { + $body_: "body", + $headers_: "headers", + $path_: "path", + $query_: "query", +}; +const extraPrefixes = Object.entries(extraPrefixesMap); + +type KeyMap = Map< + string, + | { + in: Slot; + map?: string; + } + | { + in?: never; + map: Slot; + } +>; + +const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { + if (!map) { + map = new Map(); + } + + for (const config of fields) { + if ("in" in config) { + if (config.key) { + map.set(config.key, { + in: config.in, + map: config.map, + }); + } + } else if ("key" in config) { + map.set(config.key, { + map: config.map, + }); + } else if (config.args) { + buildKeyMap(config.args, map); + } + } + + return map; +}; + +interface Params { + body: unknown; + headers: Record; + path: Record; + query: Record; +} + +const stripEmptySlots = (params: Params) => { + for (const [slot, value] of Object.entries(params)) { + if ( + value && + typeof value === "object" && + !Array.isArray(value) && + !Object.keys(value).length + ) { + delete params[slot as Slot]; + } + } +}; + +export const buildClientParams = ( + args: ReadonlyArray, + fields: FieldsConfig, +) => { + const params: Params = { + body: {}, + headers: {}, + path: {}, + query: {}, + }; + + const map = buildKeyMap(fields); + + let config: FieldsConfig[number] | undefined; + + for (const [index, arg] of args.entries()) { + if (fields[index]) { + config = fields[index]; + } + + if (!config) { + continue; + } + + if ("in" in config) { + if (config.key) { + const field = map.get(config.key)!; + const name = field.map || config.key; + if (field.in) { + (params[field.in] as Record)[name] = arg; + } + } else { + params.body = arg; + } + } else { + for (const [key, value] of Object.entries(arg ?? {})) { + const field = map.get(key); + + if (field) { + if (field.in) { + const name = field.map || key; + (params[field.in] as Record)[name] = value; + } else { + params[field.map] = value; + } + } else { + const extra = extraPrefixes.find(([prefix]) => + key.startsWith(prefix), + ); + + if (extra) { + const [prefix, slot] = extra; + (params[slot] as Record)[ + key.slice(prefix.length) + ] = value; + } else if ("allowExtra" in config && config.allowExtra) { + for (const [slot, allowed] of Object.entries(config.allowExtra)) { + if (allowed) { + (params[slot as Slot] as Record)[key] = value; + break; + } + } + } + } + } + } + } + + stripEmptySlots(params); + + return params; +}; diff --git a/lib/api/core/pathSerializer.gen.ts b/lib/api/core/pathSerializer.gen.ts new file mode 100644 index 0000000..52457e0 --- /dev/null +++ b/lib/api/core/pathSerializer.gen.ts @@ -0,0 +1,180 @@ +// This file is auto-generated by @hey-api/openapi-ts + +interface SerializeOptions + extends SerializePrimitiveOptions, SerializerOptions {} + +interface SerializePrimitiveOptions { + allowReserved?: boolean; + name: string; +} + +export interface SerializerOptions { + /** + * @default true + */ + explode: boolean; + style: T; +} + +export type ArrayStyle = "form" | "spaceDelimited" | "pipeDelimited"; +export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; +type MatrixStyle = "label" | "matrix" | "simple"; +export type ObjectStyle = "form" | "deepObject"; +type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; + +interface SerializePrimitiveParam extends SerializePrimitiveOptions { + value: string; +} + +export const separatorArrayExplode = (style: ArraySeparatorStyle) => { + switch (style) { + case "label": + return "."; + case "matrix": + return ";"; + case "simple": + return ","; + default: + return "&"; + } +}; + +export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { + switch (style) { + case "form": + return ","; + case "pipeDelimited": + return "|"; + case "spaceDelimited": + return "%20"; + default: + return ","; + } +}; + +export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { + switch (style) { + case "label": + return "."; + case "matrix": + return ";"; + case "simple": + return ","; + default: + return "&"; + } +}; + +export const serializeArrayParam = ({ + allowReserved, + explode, + name, + style, + value, +}: SerializeOptions & { + value: unknown[]; +}) => { + if (!explode) { + const joinedValues = ( + allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) + ).join(separatorArrayNoExplode(style)); + switch (style) { + case "label": + return `.${joinedValues}`; + case "matrix": + return `;${name}=${joinedValues}`; + case "simple": + return joinedValues; + default: + return `${name}=${joinedValues}`; + } + } + + const separator = separatorArrayExplode(style); + const joinedValues = value + .map((v) => { + if (style === "label" || style === "simple") { + return allowReserved ? v : encodeURIComponent(v as string); + } + + return serializePrimitiveParam({ + allowReserved, + name, + value: v as string, + }); + }) + .join(separator); + return style === "label" || style === "matrix" + ? separator + joinedValues + : joinedValues; +}; + +export const serializePrimitiveParam = ({ + allowReserved, + name, + value, +}: SerializePrimitiveParam) => { + if (value === undefined || value === null) { + return ""; + } + + if (typeof value === "object") { + throw new Error( + "Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.", + ); + } + + return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; +}; + +export const serializeObjectParam = ({ + allowReserved, + explode, + name, + style, + value, + valueOnly, +}: SerializeOptions & { + value: Record | Date; + valueOnly?: boolean; +}) => { + if (value instanceof Date) { + return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; + } + + if (style !== "deepObject" && !explode) { + let values: string[] = []; + Object.entries(value).forEach(([key, v]) => { + values = [ + ...values, + key, + allowReserved ? (v as string) : encodeURIComponent(v as string), + ]; + }); + const joinedValues = values.join(","); + switch (style) { + case "form": + return `${name}=${joinedValues}`; + case "label": + return `.${joinedValues}`; + case "matrix": + return `;${name}=${joinedValues}`; + default: + return joinedValues; + } + } + + const separator = separatorObjectExplode(style); + const joinedValues = Object.entries(value) + .map(([key, v]) => + serializePrimitiveParam({ + allowReserved, + name: style === "deepObject" ? `${name}[${key}]` : key, + value: v as string, + }), + ) + .join(separator); + return style === "label" || style === "matrix" + ? separator + joinedValues + : joinedValues; +}; diff --git a/lib/api/core/queryKeySerializer.gen.ts b/lib/api/core/queryKeySerializer.gen.ts new file mode 100644 index 0000000..0713164 --- /dev/null +++ b/lib/api/core/queryKeySerializer.gen.ts @@ -0,0 +1,136 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * JSON-friendly union that mirrors what Pinia Colada can hash. + */ +export type JsonValue = + | null + | string + | number + | boolean + | JsonValue[] + | { [key: string]: JsonValue }; + +/** + * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. + */ +export const queryKeyJsonReplacer = (_key: string, value: unknown) => { + if ( + value === undefined || + typeof value === "function" || + typeof value === "symbol" + ) { + return undefined; + } + if (typeof value === "bigint") { + return value.toString(); + } + if (value instanceof Date) { + return value.toISOString(); + } + return value; +}; + +/** + * Safely stringifies a value and parses it back into a JsonValue. + */ +export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { + try { + const json = JSON.stringify(input, queryKeyJsonReplacer); + if (json === undefined) { + return undefined; + } + return JSON.parse(json) as JsonValue; + } catch { + return undefined; + } +}; + +/** + * Detects plain objects (including objects with a null prototype). + */ +const isPlainObject = (value: unknown): value is Record => { + if (value === null || typeof value !== "object") { + return false; + } + const prototype = Object.getPrototypeOf(value as object); + return prototype === Object.prototype || prototype === null; +}; + +/** + * Turns URLSearchParams into a sorted JSON object for deterministic keys. + */ +const serializeSearchParams = (params: URLSearchParams): JsonValue => { + const entries = Array.from(params.entries()).sort(([a], [b]) => + a.localeCompare(b), + ); + const result: Record = {}; + + for (const [key, value] of entries) { + const existing = result[key]; + if (existing === undefined) { + result[key] = value; + continue; + } + + if (Array.isArray(existing)) { + (existing as string[]).push(value); + } else { + result[key] = [existing, value]; + } + } + + return result; +}; + +/** + * Normalizes any accepted value into a JSON-friendly shape for query keys. + */ +export const serializeQueryKeyValue = ( + value: unknown, +): JsonValue | undefined => { + if (value === null) { + return null; + } + + if ( + typeof value === "string" || + typeof value === "number" || + typeof value === "boolean" + ) { + return value; + } + + if ( + value === undefined || + typeof value === "function" || + typeof value === "symbol" + ) { + return undefined; + } + + if (typeof value === "bigint") { + return value.toString(); + } + + if (value instanceof Date) { + return value.toISOString(); + } + + if (Array.isArray(value)) { + return stringifyToJsonValue(value); + } + + if ( + typeof URLSearchParams !== "undefined" && + value instanceof URLSearchParams + ) { + return serializeSearchParams(value); + } + + if (isPlainObject(value)) { + return stringifyToJsonValue(value); + } + + return undefined; +}; diff --git a/lib/api/core/request.ts b/lib/api/core/request.ts deleted file mode 100644 index 870c3c1..0000000 --- a/lib/api/core/request.ts +++ /dev/null @@ -1,400 +0,0 @@ -import { ApiError } from "./ApiError"; -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; -import { CancelablePromise } from "./CancelablePromise"; -import type { OnCancel } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; - -export const isString = (value: unknown): value is string => { - return typeof value === "string"; -}; - -export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ""; -}; - -export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; -}; - -export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; -}; - -export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString("base64"); - } -}; - -export const getQueryString = (params: Record): string => { - const qs: string[] = []; - - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; - - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } - - if (value instanceof Date) { - append(key, value.toISOString()); - } else if (Array.isArray(value)) { - value.forEach((v) => encodePair(key, v)); - } else if (typeof value === "object") { - Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v)); - } else { - append(key, value); - } - }; - - Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - - return qs.length ? `?${qs.join("&")}` : ""; -}; - -const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace("{api-version}", config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; -}; - -export const getFormData = ( - options: ApiRequestOptions, -): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); - - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; - - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach((v) => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; -}; - -type Resolver = (options: ApiRequestOptions) => Promise; - -export const resolve = async ( - options: ApiRequestOptions, - resolver?: T | Resolver, -): Promise => { - if (typeof resolver === "function") { - return (resolver as Resolver)(options); - } - return resolver; -}; - -export const getHeaders = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, -): Promise => { - const [token, username, password, additionalHeaders] = await Promise.all([ - // @ts-ignore - resolve(options, config.TOKEN), - // @ts-ignore - resolve(options, config.USERNAME), - // @ts-ignore - resolve(options, config.PASSWORD), - // @ts-ignore - resolve(options, config.HEADERS), - ]); - - const headers = Object.entries({ - Accept: "application/json", - ...additionalHeaders, - ...options.headers, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record, - ); - - if (isStringWithValue(token)) { - headers["Authorization"] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers["Authorization"] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers["Content-Type"] = options.mediaType; - } else if (isBlob(options.body)) { - headers["Content-Type"] = options.body.type || "application/octet-stream"; - } else if (isString(options.body)) { - headers["Content-Type"] = "text/plain"; - } else if (!isFormData(options.body)) { - headers["Content-Type"] = "application/json"; - } - } - - return new Headers(headers); -}; - -export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if ( - options.mediaType?.includes("application/json") || - options.mediaType?.includes("+json") - ) { - return JSON.stringify(options.body); - } else if ( - isString(options.body) || - isBlob(options.body) || - isFormData(options.body) - ) { - return options.body; - } else { - return JSON.stringify(options.body); - } - } - return undefined; -}; - -export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel, -): Promise => { - const controller = new AbortController(); - - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; - - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } - - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } - - onCancel(() => controller.abort()); - - return await fetch(url, request); -}; - -export const getResponseHeader = ( - response: Response, - responseHeader?: string, -): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } - } - return undefined; -}; - -export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get("Content-Type"); - if (contentType) { - const binaryTypes = [ - "application/octet-stream", - "application/pdf", - "application/zip", - "audio/", - "image/", - "video/", - ]; - if ( - contentType.includes("application/json") || - contentType.includes("+json") - ) { - return await response.json(); - } else if (binaryTypes.some((type) => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes("multipart/form-data")) { - return await response.formData(); - } else if (contentType.includes("text/")) { - return await response.text(); - } - } - } catch (error) { - console.error(error); - } - } - return undefined; -}; - -export const catchErrorCodes = ( - options: ApiRequestOptions, - result: ApiResult, -): void => { - const errors: Record = { - 400: "Bad Request", - 401: "Unauthorized", - 402: "Payment Required", - 403: "Forbidden", - 404: "Not Found", - 405: "Method Not Allowed", - 406: "Not Acceptable", - 407: "Proxy Authentication Required", - 408: "Request Timeout", - 409: "Conflict", - 410: "Gone", - 411: "Length Required", - 412: "Precondition Failed", - 413: "Payload Too Large", - 414: "URI Too Long", - 415: "Unsupported Media Type", - 416: "Range Not Satisfiable", - 417: "Expectation Failed", - 418: "Im a teapot", - 421: "Misdirected Request", - 422: "Unprocessable Content", - 423: "Locked", - 424: "Failed Dependency", - 425: "Too Early", - 426: "Upgrade Required", - 428: "Precondition Required", - 429: "Too Many Requests", - 431: "Request Header Fields Too Large", - 451: "Unavailable For Legal Reasons", - 500: "Internal Server Error", - 501: "Not Implemented", - 502: "Bad Gateway", - 503: "Service Unavailable", - 504: "Gateway Timeout", - 505: "HTTP Version Not Supported", - 506: "Variant Also Negotiates", - 507: "Insufficient Storage", - 508: "Loop Detected", - 510: "Not Extended", - 511: "Network Authentication Required", - ...options.errors, - }; - - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - const errorStatus = result.status ?? "unknown"; - const errorStatusText = result.statusText ?? "unknown"; - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2); - } catch (e) { - return undefined; - } - })(); - - throw new ApiError( - options, - result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`, - ); - } -}; - -/** - * Request method - * @param config The OpenAPI configuration object - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ -export const request = ( - config: OpenAPIConfig, - options: ApiRequestOptions, -): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest( - config, - options, - url, - body, - formData, - headers, - onCancel, - ); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader( - response, - options.responseHeader, - ); - - let transformedBody = responseBody; - if (options.responseTransformer && response.ok) { - transformedBody = await options.responseTransformer(responseBody); - } - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? transformedBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); -}; diff --git a/lib/api/core/serverSentEvents.gen.ts b/lib/api/core/serverSentEvents.gen.ts new file mode 100644 index 0000000..acbc7cf --- /dev/null +++ b/lib/api/core/serverSentEvents.gen.ts @@ -0,0 +1,265 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Config } from "./types.gen"; + +export type ServerSentEventsOptions = Omit< + RequestInit, + "method" +> & + Pick & { + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch; + /** + * Implementing clients can call request interceptors inside this hook. + */ + onRequest?: (url: string, init: RequestInit) => Promise; + /** + * Callback invoked when a network or parsing error occurs during streaming. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param error The error that occurred. + */ + onSseError?: (error: unknown) => void; + /** + * Callback invoked when an event is streamed from the server. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param event Event streamed from the server. + * @returns Nothing (void). + */ + onSseEvent?: (event: StreamEvent) => void; + serializedBody?: RequestInit["body"]; + /** + * Default retry delay in milliseconds. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 3000 + */ + sseDefaultRetryDelay?: number; + /** + * Maximum number of retry attempts before giving up. + */ + sseMaxRetryAttempts?: number; + /** + * Maximum retry delay in milliseconds. + * + * Applies only when exponential backoff is used. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 30000 + */ + sseMaxRetryDelay?: number; + /** + * Optional sleep function for retry backoff. + * + * Defaults to using `setTimeout`. + */ + sseSleepFn?: (ms: number) => Promise; + url: string; + }; + +export interface StreamEvent { + data: TData; + event?: string; + id?: string; + retry?: number; +} + +export type ServerSentEventsResult< + TData = unknown, + TReturn = void, + TNext = unknown, +> = { + stream: AsyncGenerator< + TData extends Record ? TData[keyof TData] : TData, + TReturn, + TNext + >; +}; + +export function createSseClient({ + onRequest, + onSseError, + onSseEvent, + responseTransformer, + responseValidator, + sseDefaultRetryDelay, + sseMaxRetryAttempts, + sseMaxRetryDelay, + sseSleepFn, + url, + ...options +}: ServerSentEventsOptions): ServerSentEventsResult { + let lastEventId: string | undefined; + + const sleep = + sseSleepFn ?? + ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))); + + const createStream = async function* () { + let retryDelay: number = sseDefaultRetryDelay ?? 3000; + let attempt = 0; + const signal = options.signal ?? new AbortController().signal; + + while (true) { + if (signal.aborted) break; + + attempt++; + + const headers = + options.headers instanceof Headers + ? options.headers + : new Headers(options.headers as Record | undefined); + + if (lastEventId !== undefined) { + headers.set("Last-Event-ID", lastEventId); + } + + try { + const requestInit: RequestInit = { + redirect: "follow", + ...options, + body: options.serializedBody, + headers, + signal, + }; + let request = new Request(url, requestInit); + if (onRequest) { + request = await onRequest(url, requestInit); + } + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = options.fetch ?? globalThis.fetch; + const response = await _fetch(request); + + if (!response.ok) + throw new Error( + `SSE failed: ${response.status} ${response.statusText}`, + ); + + if (!response.body) throw new Error("No body in SSE response"); + + const reader = response.body + .pipeThrough(new TextDecoderStream()) + .getReader(); + + let buffer = ""; + + const abortHandler = () => { + try { + reader.cancel(); + } catch { + // noop + } + }; + + signal.addEventListener("abort", abortHandler); + + try { + while (true) { + const { done, value } = await reader.read(); + if (done) break; + buffer += value; + buffer = buffer.replace(/\r\n?/g, "\n"); // normalize line endings + + const chunks = buffer.split("\n\n"); + buffer = chunks.pop() ?? ""; + + for (const chunk of chunks) { + const lines = chunk.split("\n"); + const dataLines: Array = []; + let eventName: string | undefined; + + for (const line of lines) { + if (line.startsWith("data:")) { + dataLines.push(line.replace(/^data:\s*/, "")); + } else if (line.startsWith("event:")) { + eventName = line.replace(/^event:\s*/, ""); + } else if (line.startsWith("id:")) { + lastEventId = line.replace(/^id:\s*/, ""); + } else if (line.startsWith("retry:")) { + const parsed = Number.parseInt( + line.replace(/^retry:\s*/, ""), + 10, + ); + if (!Number.isNaN(parsed)) { + retryDelay = parsed; + } + } + } + + let data: unknown; + let parsedJson = false; + + if (dataLines.length) { + const rawData = dataLines.join("\n"); + try { + data = JSON.parse(rawData); + parsedJson = true; + } catch { + data = rawData; + } + } + + if (parsedJson) { + if (responseValidator) { + await responseValidator(data); + } + + if (responseTransformer) { + data = await responseTransformer(data); + } + } + + onSseEvent?.({ + data, + event: eventName, + id: lastEventId, + retry: retryDelay, + }); + + if (dataLines.length) { + yield data as any; + } + } + } + } finally { + signal.removeEventListener("abort", abortHandler); + reader.releaseLock(); + } + + break; // exit loop on normal completion + } catch (error) { + // connection failed or aborted; retry after delay + onSseError?.(error); + + if ( + sseMaxRetryAttempts !== undefined && + attempt >= sseMaxRetryAttempts + ) { + break; // stop after firing error + } + + // exponential backoff: double retry each attempt, cap at 30s + const backoff = Math.min( + retryDelay * 2 ** (attempt - 1), + sseMaxRetryDelay ?? 30000, + ); + await sleep(backoff); + } + } + }; + + const stream = createStream(); + + return { stream }; +} diff --git a/lib/api/core/types.gen.ts b/lib/api/core/types.gen.ts new file mode 100644 index 0000000..2b11454 --- /dev/null +++ b/lib/api/core/types.gen.ts @@ -0,0 +1,118 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth, AuthToken } from "./auth.gen"; +import type { + BodySerializer, + QuerySerializer, + QuerySerializerOptions, +} from "./bodySerializer.gen"; + +export type HttpMethod = + | "connect" + | "delete" + | "get" + | "head" + | "options" + | "patch" + | "post" + | "put" + | "trace"; + +export type Client< + RequestFn = never, + Config = unknown, + MethodFn = never, + BuildUrlFn = never, + SseFn = never, +> = { + /** + * Returns the final request URL. + */ + buildUrl: BuildUrlFn; + getConfig: () => Config; + request: RequestFn; + setConfig: (config: Config) => Config; +} & { + [K in HttpMethod]: MethodFn; +} & ([SseFn] extends [never] + ? { sse?: never } + : { sse: { [K in HttpMethod]: SseFn } }); + +export interface Config { + /** + * Auth token or a function returning auth token. The resolved value will be + * added to the request payload as defined by its `security` array. + */ + auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; + /** + * A function for serializing request body parameter. By default, + * {@link JSON.stringify()} will be used. + */ + bodySerializer?: BodySerializer | null; + /** + * An object containing any HTTP headers that you want to pre-populate your + * `Headers` object with. + * + * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} + */ + headers?: + | RequestInit["headers"] + | Record< + string, + | string + | number + | boolean + | (string | number | boolean)[] + | null + | undefined + | unknown + >; + /** + * The request method. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} + */ + method?: Uppercase; + /** + * A function for serializing request query parameters. By default, arrays + * will be exploded in form style, objects will be exploded in deepObject + * style, and reserved characters are percent-encoded. + * + * This method will have no effect if the native `paramsSerializer()` Axios + * API function is used. + * + * {@link https://swagger.io/docs/specification/serialization/#query View examples} + */ + querySerializer?: QuerySerializer | QuerySerializerOptions; + /** + * A function validating request data. This is useful if you want to ensure + * the request conforms to the desired shape, so it can be safely sent to + * the server. + */ + requestValidator?: (data: unknown) => Promise; + /** + * A function transforming response data before it's returned. This is useful + * for post-processing data, e.g., converting ISO strings into Date objects. + */ + responseTransformer?: (data: unknown) => Promise; + /** + * A function validating response data. This is useful if you want to ensure + * the response conforms to the desired shape, so it can be safely passed to + * the transformers and returned to the user. + */ + responseValidator?: (data: unknown) => Promise; +} + +type IsExactlyNeverOrNeverUndefined = [T] extends [never] + ? true + : [T] extends [never | undefined] + ? [undefined] extends [T] + ? false + : true + : false; + +export type OmitNever> = { + [K in keyof T as IsExactlyNeverOrNeverUndefined extends true + ? never + : K]: T[K]; +}; diff --git a/lib/api/core/utils.gen.ts b/lib/api/core/utils.gen.ts new file mode 100644 index 0000000..fcabdf7 --- /dev/null +++ b/lib/api/core/utils.gen.ts @@ -0,0 +1,143 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { BodySerializer, QuerySerializer } from "./bodySerializer.gen"; +import { + type ArraySeparatorStyle, + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from "./pathSerializer.gen"; + +export interface PathSerializer { + path: Record; + url: string; +} + +export const PATH_PARAM_RE = /\{[^{}]+\}/g; + +export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { + let url = _url; + const matches = _url.match(PATH_PARAM_RE); + if (matches) { + for (const match of matches) { + let explode = false; + let name = match.substring(1, match.length - 1); + let style: ArraySeparatorStyle = "simple"; + + if (name.endsWith("*")) { + explode = true; + name = name.substring(0, name.length - 1); + } + + if (name.startsWith(".")) { + name = name.substring(1); + style = "label"; + } else if (name.startsWith(";")) { + name = name.substring(1); + style = "matrix"; + } + + const value = path[name]; + + if (value === undefined || value === null) { + continue; + } + + if (Array.isArray(value)) { + url = url.replace( + match, + serializeArrayParam({ explode, name, style, value }), + ); + continue; + } + + if (typeof value === "object") { + url = url.replace( + match, + serializeObjectParam({ + explode, + name, + style, + value: value as Record, + valueOnly: true, + }), + ); + continue; + } + + if (style === "matrix") { + url = url.replace( + match, + `;${serializePrimitiveParam({ + name, + value: value as string, + })}`, + ); + continue; + } + + const replaceValue = encodeURIComponent( + style === "label" ? `.${value as string}` : (value as string), + ); + url = url.replace(match, replaceValue); + } + } + return url; +}; + +export const getUrl = ({ + baseUrl, + path, + query, + querySerializer, + url: _url, +}: { + baseUrl?: string; + path?: Record; + query?: Record; + querySerializer: QuerySerializer; + url: string; +}) => { + const pathUrl = _url.startsWith("/") ? _url : `/${_url}`; + let url = (baseUrl ?? "") + pathUrl; + if (path) { + url = defaultPathSerializer({ path, url }); + } + let search = query ? querySerializer(query) : ""; + if (search.startsWith("?")) { + search = search.substring(1); + } + if (search) { + url += `?${search}`; + } + return url; +}; + +export function getValidRequestBody(options: { + body?: unknown; + bodySerializer?: BodySerializer | null; + serializedBody?: unknown; +}) { + const hasBody = options.body !== undefined; + const isSerializedBody = hasBody && options.bodySerializer; + + if (isSerializedBody) { + if ("serializedBody" in options) { + const hasSerializedBody = + options.serializedBody !== undefined && options.serializedBody !== ""; + + return hasSerializedBody ? options.serializedBody : null; + } + + // not all clients implement a serializedBody property (i.e., client-axios) + return options.body !== "" ? options.body : null; + } + + // plain/text body + if (hasBody) { + return options.body; + } + + // no body was provided + return undefined; +} diff --git a/lib/api/index.ts b/lib/api/index.ts index c665de0..776b552 100644 --- a/lib/api/index.ts +++ b/lib/api/index.ts @@ -1,7 +1,1107 @@ // This file is auto-generated by @hey-api/openapi-ts -export { ApiError } from "./core/ApiError"; -export { CancelablePromise, CancelError } from "./core/CancelablePromise"; -export { OpenAPI, type OpenAPIConfig } from "./core/OpenAPI"; -export * from "./schemas.gen"; -export * from "./sdk.gen"; -export * from "./types.gen"; + +export { + $add_organization_users_response, + $add_role_scope_response, + $api_result, + $applications, + $authorize_app_api_response, + $category, + $connected_apps_access_token, + $connected_apps_auth_url, + $connection, + $create_api_key_response, + $create_api_scopes_response, + $create_apis_response, + $create_application_response, + $create_category_response, + $create_connection_response, + $create_directory_response, + $create_environment_variable_response, + $create_identity_response, + $create_meter_usage_record_response, + $create_organization_invite_response, + $create_organization_response, + $create_property_response, + $create_roles_response, + $create_subscriber_success_response, + $create_user_response, + $create_webhook_response, + $delete_api_response, + $delete_directory_response, + $delete_environment_variable_response, + $delete_role_scope_response, + $delete_webhook_response, + $directory, + $environment_variable, + $error, + $error_response, + $event_type, + $get_api_key_response, + $get_api_keys_response, + $get_api_response, + $get_api_scope_response, + $get_api_scopes_response, + $get_apis_response, + $get_application_response, + $get_applications_response, + $get_billing_agreements_response, + $get_billing_entitlements_response, + $get_business_response, + $get_categories_response, + $get_connections_response, + $get_directories_response, + $get_directory_response, + $get_environment_feature_flags_response, + $get_environment_response, + $get_environment_variable_response, + $get_environment_variables_response, + $get_event_response, + $get_event_types_response, + $get_identities_response, + $get_industries_response, + $get_organization_feature_flags_response, + $get_organization_invite_response, + $get_organization_invites_response, + $get_organization_response, + $get_organization_users_response, + $get_organizations_response, + $get_organizations_user_permissions_response, + $get_organizations_user_roles_response, + $get_permissions_response, + $get_properties_response, + $get_property_values_response, + $get_redirect_callback_urls_response, + $get_role_response, + $get_roles_response, + $get_subscriber_response, + $get_subscribers_response, + $get_timezones_response, + $get_user_mfa_response, + $get_user_sessions_response, + $get_webhooks_response, + $identity, + $logout_redirect_urls, + $not_found_response, + $organization_invite, + $organization_item_schema, + $organization_user, + $organization_user_permission, + $organization_user_role, + $organization_user_role_permissions, + $organization_users, + $permissions, + $property, + $property_value, + $read_env_logo_response, + $read_logo_response, + $redirect_callback_urls, + $role, + $role_permissions_response, + $role_scopes_response, + $roles, + $rotate_api_key_response, + $scopes, + $search_users_response, + $subscriber, + $subscribers_subscriber, + $success_response, + $update_directory_response, + $update_environment_variable_response, + $update_organization_users_response, + $update_role_permissions_response, + $update_user_response, + $update_webhook_response, + $user, + $user_identity, + $users, + $users_response, + $verify_api_key_response, + $webhook, +} from "./schemas.gen"; +export { + ApiKeys, + Apis, + Applications as Applications2, + BillingAgreements, + BillingEntitlements, + BillingMeterUsage, + Business, + Callbacks, + ConnectedApps, + Connections, + Directories, + Environments, + EnvironmentVariables, + FeatureFlags, + Identities, + Industries, + Mfa, + type Options, + Organizations, + Permissions as Permissions2, + Properties, + PropertyCategories, + Roles as Roles2, + Search, + Subscribers, + Timezones, + Users as Users2, + Webhooks, +} from "./sdk.gen"; +export type { + AddApiApplicationScopeData, + AddApiApplicationScopeError, + AddApiApplicationScopeErrors, + AddApiApplicationScopeResponses, + AddApiScopeData, + AddApiScopeError, + AddApiScopeErrors, + AddApiScopeResponse, + AddApiScopeResponses, + AddApisData, + AddApisError, + AddApisErrors, + AddApisResponse, + AddApisResponses, + AddLogoData, + AddLogoError, + AddLogoErrors, + AddLogoResponse, + AddLogoResponses, + AddLogoutRedirectUrlsData, + AddLogoutRedirectUrlsError, + AddLogoutRedirectUrlsErrors, + AddLogoutRedirectUrlsResponse, + AddLogoutRedirectUrlsResponses, + AddOrganizationLogoData, + AddOrganizationLogoError, + AddOrganizationLogoErrors, + AddOrganizationLogoResponse, + AddOrganizationLogoResponses, + AddOrganizationUserApiScopeData, + AddOrganizationUserApiScopeError, + AddOrganizationUserApiScopeErrors, + AddOrganizationUserApiScopeResponses, + AddOrganizationUsersData, + AddOrganizationUsersError, + AddOrganizationUsersErrors, + AddOrganizationUsersResponse, + AddOrganizationUsersResponse2, + AddOrganizationUsersResponses, + AddRedirectCallbackUrlsData, + AddRedirectCallbackUrlsError, + AddRedirectCallbackUrlsErrors, + AddRedirectCallbackUrlsResponse, + AddRedirectCallbackUrlsResponses, + AddRoleScopeData, + AddRoleScopeError, + AddRoleScopeErrors, + AddRoleScopeResponse, + AddRoleScopeResponse2, + AddRoleScopeResponses, + ApiId, + ApiResult, + ApplicationId, + Applications, + AuthorizeAppApiResponse, + Category, + ClientOptions, + ConnectedAppsAccessToken, + ConnectedAppsAuthUrl, + Connection, + CreateApiKeyData, + CreateApiKeyError, + CreateApiKeyErrors, + CreateApiKeyResponse, + CreateApiKeyResponse2, + CreateApiKeyResponses, + CreateApiScopesResponse, + CreateApisResponse, + CreateApplicationData, + CreateApplicationError, + CreateApplicationErrors, + CreateApplicationResponse, + CreateApplicationResponse2, + CreateApplicationResponses, + CreateBillingAgreementData, + CreateBillingAgreementError, + CreateBillingAgreementErrors, + CreateBillingAgreementResponse, + CreateBillingAgreementResponses, + CreateCategoryData, + CreateCategoryError, + CreateCategoryErrors, + CreateCategoryResponse, + CreateCategoryResponse2, + CreateCategoryResponses, + CreateConnectionData, + CreateConnectionError, + CreateConnectionErrors, + CreateConnectionResponse, + CreateConnectionResponse2, + CreateConnectionResponses, + CreateDirectoryData, + CreateDirectoryError, + CreateDirectoryErrors, + CreateDirectoryResponse, + CreateDirectoryResponse2, + CreateDirectoryResponses, + CreateEnvironmentVariableData, + CreateEnvironmentVariableError, + CreateEnvironmentVariableErrors, + CreateEnvironmentVariableResponse, + CreateEnvironmentVariableResponse2, + CreateEnvironmentVariableResponses, + CreateFeatureFlagData, + CreateFeatureFlagError, + CreateFeatureFlagErrors, + CreateFeatureFlagResponse, + CreateFeatureFlagResponses, + CreateIdentityResponse, + CreateMeterUsageRecordData, + CreateMeterUsageRecordError, + CreateMeterUsageRecordErrors, + CreateMeterUsageRecordResponse, + CreateMeterUsageRecordResponse2, + CreateMeterUsageRecordResponses, + CreateOrganizationData, + CreateOrganizationError, + CreateOrganizationErrors, + CreateOrganizationInviteData, + CreateOrganizationInviteError, + CreateOrganizationInviteErrors, + CreateOrganizationInviteResponse, + CreateOrganizationInviteResponse2, + CreateOrganizationInviteResponses, + CreateOrganizationResponse, + CreateOrganizationResponse2, + CreateOrganizationResponses, + CreateOrganizationUserPermissionData, + CreateOrganizationUserPermissionErrors, + CreateOrganizationUserPermissionResponse, + CreateOrganizationUserPermissionResponses, + CreateOrganizationUserRoleData, + CreateOrganizationUserRoleErrors, + CreateOrganizationUserRoleResponse, + CreateOrganizationUserRoleResponses, + CreatePermissionData, + CreatePermissionError, + CreatePermissionErrors, + CreatePermissionResponse, + CreatePermissionResponses, + CreatePropertyData, + CreatePropertyError, + CreatePropertyErrors, + CreatePropertyResponse, + CreatePropertyResponse2, + CreatePropertyResponses, + CreateRoleData, + CreateRoleError, + CreateRoleErrors, + CreateRoleResponse, + CreateRoleResponses, + CreateRolesResponse, + CreateSubscriberData, + CreateSubscriberError, + CreateSubscriberErrors, + CreateSubscriberResponse, + CreateSubscriberResponses, + CreateSubscriberSuccessResponse, + CreateUserData, + CreateUserError, + CreateUserErrors, + CreateUserIdentityData, + CreateUserIdentityError, + CreateUserIdentityErrors, + CreateUserIdentityResponse, + CreateUserIdentityResponses, + CreateUserResponse, + CreateUserResponse2, + CreateUserResponses, + CreateWebHookData, + CreateWebHookError, + CreateWebHookErrors, + CreateWebhookResponse, + CreateWebHookResponse, + CreateWebHookResponses, + DeleteApiApplicationScopeData, + DeleteApiApplicationScopeError, + DeleteApiApplicationScopeErrors, + DeleteApiApplicationScopeResponses, + DeleteApiData, + DeleteApiError, + DeleteApiErrors, + DeleteApiKeyData, + DeleteApiKeyError, + DeleteApiKeyErrors, + DeleteApiKeyResponse, + DeleteApiKeyResponses, + DeleteApiResponse, + DeleteApiResponse2, + DeleteApiResponses, + DeleteApiScopeData, + DeleteApiScopeError, + DeleteApiScopeErrors, + DeleteApiScopeResponses, + DeleteApplicationData, + DeleteApplicationError, + DeleteApplicationErrors, + DeleteApplicationResponse, + DeleteApplicationResponses, + DeleteCallbackUrlsData, + DeleteCallbackUrlsError, + DeleteCallbackUrlsErrors, + DeleteCallbackUrlsResponse, + DeleteCallbackUrlsResponses, + DeleteConnectionData, + DeleteConnectionError, + DeleteConnectionErrors, + DeleteConnectionResponse, + DeleteConnectionResponses, + DeleteDirectoryData, + DeleteDirectoryError, + DeleteDirectoryErrors, + DeleteDirectoryResponse, + DeleteDirectoryResponse2, + DeleteDirectoryResponses, + DeleteEnvironementFeatureFlagOverrideData, + DeleteEnvironementFeatureFlagOverrideError, + DeleteEnvironementFeatureFlagOverrideErrors, + DeleteEnvironementFeatureFlagOverrideResponse, + DeleteEnvironementFeatureFlagOverrideResponses, + DeleteEnvironementFeatureFlagOverridesData, + DeleteEnvironementFeatureFlagOverridesError, + DeleteEnvironementFeatureFlagOverridesErrors, + DeleteEnvironementFeatureFlagOverridesResponse, + DeleteEnvironementFeatureFlagOverridesResponses, + DeleteEnvironmentVariableData, + DeleteEnvironmentVariableError, + DeleteEnvironmentVariableErrors, + DeleteEnvironmentVariableResponse, + DeleteEnvironmentVariableResponse2, + DeleteEnvironmentVariableResponses, + DeleteFeatureFlagData, + DeleteFeatureFlagError, + DeleteFeatureFlagErrors, + DeleteFeatureFlagResponse, + DeleteFeatureFlagResponses, + DeleteIdentityData, + DeleteIdentityError, + DeleteIdentityErrors, + DeleteIdentityResponse, + DeleteIdentityResponses, + DeleteLogoData, + DeleteLogoError, + DeleteLogoErrors, + DeleteLogoResponse, + DeleteLogoResponses, + DeleteLogoutUrlsData, + DeleteLogoutUrlsError, + DeleteLogoutUrlsErrors, + DeleteLogoutUrlsResponse, + DeleteLogoutUrlsResponses, + DeleteOrganizationData, + DeleteOrganizationError, + DeleteOrganizationErrors, + DeleteOrganizationFeatureFlagOverrideData, + DeleteOrganizationFeatureFlagOverrideError, + DeleteOrganizationFeatureFlagOverrideErrors, + DeleteOrganizationFeatureFlagOverrideResponse, + DeleteOrganizationFeatureFlagOverrideResponses, + DeleteOrganizationFeatureFlagOverridesData, + DeleteOrganizationFeatureFlagOverridesError, + DeleteOrganizationFeatureFlagOverridesErrors, + DeleteOrganizationFeatureFlagOverridesResponse, + DeleteOrganizationFeatureFlagOverridesResponses, + DeleteOrganizationHandleData, + DeleteOrganizationHandleError, + DeleteOrganizationHandleErrors, + DeleteOrganizationHandleResponse, + DeleteOrganizationHandleResponses, + DeleteOrganizationInviteData, + DeleteOrganizationInviteError, + DeleteOrganizationInviteErrors, + DeleteOrganizationInviteResponse, + DeleteOrganizationInviteResponses, + DeleteOrganizationLogoData, + DeleteOrganizationLogoError, + DeleteOrganizationLogoErrors, + DeleteOrganizationLogoResponse, + DeleteOrganizationLogoResponses, + DeleteOrganizationResponse, + DeleteOrganizationResponses, + DeleteOrganizationUserApiScopeData, + DeleteOrganizationUserApiScopeError, + DeleteOrganizationUserApiScopeErrors, + DeleteOrganizationUserApiScopeResponses, + DeleteOrganizationUserPermissionData, + DeleteOrganizationUserPermissionError, + DeleteOrganizationUserPermissionErrors, + DeleteOrganizationUserPermissionResponse, + DeleteOrganizationUserPermissionResponses, + DeleteOrganizationUserRoleData, + DeleteOrganizationUserRoleError, + DeleteOrganizationUserRoleErrors, + DeleteOrganizationUserRoleResponse, + DeleteOrganizationUserRoleResponses, + DeletePermissionData, + DeletePermissionError, + DeletePermissionErrors, + DeletePermissionResponse, + DeletePermissionResponses, + DeletePropertyData, + DeletePropertyError, + DeletePropertyErrors, + DeletePropertyResponse, + DeletePropertyResponses, + DeleteRoleData, + DeleteRoleError, + DeleteRoleErrors, + DeleteRoleResponse, + DeleteRoleResponses, + DeleteRoleScopeData, + DeleteRoleScopeError, + DeleteRoleScopeErrors, + DeleteRoleScopeResponse, + DeleteRoleScopeResponse2, + DeleteRoleScopeResponses, + DeleteUserData, + DeleteUserError, + DeleteUserErrors, + DeleteUserResponse, + DeleteUserResponses, + DeleteUserSessionsData, + DeleteUserSessionsError, + DeleteUserSessionsErrors, + DeleteUserSessionsResponse, + DeleteUserSessionsResponses, + DeleteWebHookData, + DeleteWebHookError, + DeleteWebHookErrors, + DeleteWebhookResponse, + DeleteWebHookResponse, + DeleteWebHookResponses, + Directory, + EnableConnectionData, + EnableConnectionError, + EnableConnectionErrors, + EnableConnectionResponses, + EnableOrgConnectionData, + EnableOrgConnectionError, + EnableOrgConnectionErrors, + EnableOrgConnectionResponses, + EnvironmentVariable, + Error, + ErrorResponse, + EventType, + GetApiData, + GetApiError, + GetApiErrors, + GetApiKeyData, + GetApiKeyError, + GetApiKeyErrors, + GetApiKeyResponse, + GetApiKeyResponse2, + GetApiKeyResponses, + GetApiKeysData, + GetApiKeysError, + GetApiKeysErrors, + GetApiKeysResponse, + GetApiKeysResponse2, + GetApiKeysResponses, + GetApiResponse, + GetApiResponse2, + GetApiResponses, + GetApiScopeData, + GetApiScopeError, + GetApiScopeErrors, + GetApiScopeResponse, + GetApiScopeResponse2, + GetApiScopeResponses, + GetApiScopesData, + GetApiScopesError, + GetApiScopesErrors, + GetApiScopesResponse, + GetApiScopesResponse2, + GetApiScopesResponses, + GetApisData, + GetApisError, + GetApisErrors, + GetApisResponse, + GetApisResponse2, + GetApisResponses, + GetApplicationConnectionsData, + GetApplicationConnectionsError, + GetApplicationConnectionsErrors, + GetApplicationConnectionsResponse, + GetApplicationConnectionsResponses, + GetApplicationData, + GetApplicationError, + GetApplicationErrors, + GetApplicationPropertyValuesData, + GetApplicationPropertyValuesError, + GetApplicationPropertyValuesErrors, + GetApplicationPropertyValuesResponse, + GetApplicationPropertyValuesResponses, + GetApplicationResponse, + GetApplicationResponse2, + GetApplicationResponses, + GetApplicationsData, + GetApplicationsError, + GetApplicationsErrors, + GetApplicationsResponse, + GetApplicationsResponse2, + GetApplicationsResponses, + GetBillingAgreementsData, + GetBillingAgreementsError, + GetBillingAgreementsErrors, + GetBillingAgreementsResponse, + GetBillingAgreementsResponse2, + GetBillingAgreementsResponses, + GetBillingEntitlementsData, + GetBillingEntitlementsError, + GetBillingEntitlementsErrors, + GetBillingEntitlementsResponse, + GetBillingEntitlementsResponse2, + GetBillingEntitlementsResponses, + GetBusinessData, + GetBusinessError, + GetBusinessErrors, + GetBusinessResponse, + GetBusinessResponse2, + GetBusinessResponses, + GetCallbackUrlsData, + GetCallbackUrlsError, + GetCallbackUrlsErrors, + GetCallbackUrlsResponse, + GetCallbackUrlsResponses, + GetCategoriesData, + GetCategoriesError, + GetCategoriesErrors, + GetCategoriesResponse, + GetCategoriesResponse2, + GetCategoriesResponses, + GetConnectedAppAuthUrlData, + GetConnectedAppAuthUrlError, + GetConnectedAppAuthUrlErrors, + GetConnectedAppAuthUrlResponse, + GetConnectedAppAuthUrlResponses, + GetConnectedAppTokenData, + GetConnectedAppTokenError, + GetConnectedAppTokenErrors, + GetConnectedAppTokenResponse, + GetConnectedAppTokenResponses, + GetConnectionData, + GetConnectionError, + GetConnectionErrors, + GetConnectionResponse, + GetConnectionResponses, + GetConnectionsData, + GetConnectionsError, + GetConnectionsErrors, + GetConnectionsResponse, + GetConnectionsResponse2, + GetConnectionsResponses, + GetDirectoriesData, + GetDirectoriesError, + GetDirectoriesErrors, + GetDirectoriesResponse, + GetDirectoriesResponse2, + GetDirectoriesResponses, + GetDirectoryData, + GetDirectoryError, + GetDirectoryErrors, + GetDirectoryResponse, + GetDirectoryResponse2, + GetDirectoryResponses, + GetEnvironementFeatureFlagsData, + GetEnvironementFeatureFlagsError, + GetEnvironementFeatureFlagsErrors, + GetEnvironementFeatureFlagsResponse, + GetEnvironementFeatureFlagsResponses, + GetEnvironmentData, + GetEnvironmentError, + GetEnvironmentErrors, + GetEnvironmentFeatureFlagsResponse, + GetEnvironmentResponse, + GetEnvironmentResponse2, + GetEnvironmentResponses, + GetEnvironmentVariableData, + GetEnvironmentVariableError, + GetEnvironmentVariableErrors, + GetEnvironmentVariableResponse, + GetEnvironmentVariableResponse2, + GetEnvironmentVariableResponses, + GetEnvironmentVariablesData, + GetEnvironmentVariablesError, + GetEnvironmentVariablesErrors, + GetEnvironmentVariablesResponse, + GetEnvironmentVariablesResponse2, + GetEnvironmentVariablesResponses, + GetEventData, + GetEventError, + GetEventErrors, + GetEventResponse, + GetEventResponse2, + GetEventResponses, + GetEventTypesData, + GetEventTypesError, + GetEventTypesErrors, + GetEventTypesResponse, + GetEventTypesResponse2, + GetEventTypesResponses, + GetIdentitiesResponse, + GetIdentityData, + GetIdentityError, + GetIdentityErrors, + GetIdentityResponse, + GetIdentityResponses, + GetIndustriesData, + GetIndustriesError, + GetIndustriesErrors, + GetIndustriesResponse, + GetIndustriesResponse2, + GetIndustriesResponses, + GetLogoutUrlsData, + GetLogoutUrlsError, + GetLogoutUrlsErrors, + GetLogoutUrlsResponse, + GetLogoutUrlsResponses, + GetOrganizationConnectionsData, + GetOrganizationConnectionsError, + GetOrganizationConnectionsErrors, + GetOrganizationConnectionsResponse, + GetOrganizationConnectionsResponses, + GetOrganizationData, + GetOrganizationError, + GetOrganizationErrors, + GetOrganizationFeatureFlagsData, + GetOrganizationFeatureFlagsError, + GetOrganizationFeatureFlagsErrors, + GetOrganizationFeatureFlagsResponse, + GetOrganizationFeatureFlagsResponse2, + GetOrganizationFeatureFlagsResponses, + GetOrganizationInviteData, + GetOrganizationInviteError, + GetOrganizationInviteErrors, + GetOrganizationInviteResponse, + GetOrganizationInviteResponse2, + GetOrganizationInviteResponses, + GetOrganizationInvitesData, + GetOrganizationInvitesError, + GetOrganizationInvitesErrors, + GetOrganizationInvitesResponse, + GetOrganizationInvitesResponse2, + GetOrganizationInvitesResponses, + GetOrganizationPropertyValuesData, + GetOrganizationPropertyValuesError, + GetOrganizationPropertyValuesErrors, + GetOrganizationPropertyValuesResponse, + GetOrganizationPropertyValuesResponses, + GetOrganizationResponse, + GetOrganizationResponse2, + GetOrganizationResponses, + GetOrganizationsData, + GetOrganizationsError, + GetOrganizationsErrors, + GetOrganizationsResponse, + GetOrganizationsResponse2, + GetOrganizationsResponses, + GetOrganizationsUserPermissionsResponse, + GetOrganizationsUserRolesResponse, + GetOrganizationUserPermissionsData, + GetOrganizationUserPermissionsErrors, + GetOrganizationUserPermissionsResponse, + GetOrganizationUserPermissionsResponses, + GetOrganizationUserRolesData, + GetOrganizationUserRolesErrors, + GetOrganizationUserRolesResponse, + GetOrganizationUserRolesResponses, + GetOrganizationUsersData, + GetOrganizationUsersError, + GetOrganizationUsersErrors, + GetOrganizationUsersResponse, + GetOrganizationUsersResponse2, + GetOrganizationUsersResponses, + GetOrgUserMfaData, + GetOrgUserMfaError, + GetOrgUserMfaErrors, + GetOrgUserMfaResponse, + GetOrgUserMfaResponses, + GetPermissionsData, + GetPermissionsError, + GetPermissionsErrors, + GetPermissionsResponse, + GetPermissionsResponse2, + GetPermissionsResponses, + GetPropertiesData, + GetPropertiesError, + GetPropertiesErrors, + GetPropertiesResponse, + GetPropertiesResponse2, + GetPropertiesResponses, + GetPropertyValuesResponse, + GetRedirectCallbackUrlsResponse, + GetRoleData, + GetRoleError, + GetRoleErrors, + GetRolePermissionsData, + GetRolePermissionsError, + GetRolePermissionsErrors, + GetRolePermissionsResponse, + GetRolePermissionsResponses, + GetRoleResponse, + GetRoleResponse2, + GetRoleResponses, + GetRoleScopesData, + GetRoleScopesError, + GetRoleScopesErrors, + GetRoleScopesResponse, + GetRoleScopesResponses, + GetRolesData, + GetRolesError, + GetRolesErrors, + GetRolesResponse, + GetRolesResponse2, + GetRolesResponses, + GetSubscriberData, + GetSubscriberError, + GetSubscriberErrors, + GetSubscriberResponse, + GetSubscriberResponse2, + GetSubscriberResponses, + GetSubscribersData, + GetSubscribersError, + GetSubscribersErrors, + GetSubscribersResponse, + GetSubscribersResponse2, + GetSubscribersResponses, + GetTimezonesData, + GetTimezonesError, + GetTimezonesErrors, + GetTimezonesResponse, + GetTimezonesResponse2, + GetTimezonesResponses, + GetUserDataData, + GetUserDataError, + GetUserDataErrors, + GetUserDataResponse, + GetUserDataResponses, + GetUserIdentitiesData, + GetUserIdentitiesError, + GetUserIdentitiesErrors, + GetUserIdentitiesResponse, + GetUserIdentitiesResponses, + GetUserMfaResponse, + GetUserPropertyValuesData, + GetUserPropertyValuesError, + GetUserPropertyValuesErrors, + GetUserPropertyValuesResponse, + GetUserPropertyValuesResponses, + GetUsersData, + GetUsersError, + GetUsersErrors, + GetUserSessionsData, + GetUserSessionsError, + GetUserSessionsErrors, + GetUserSessionsResponse, + GetUserSessionsResponse2, + GetUserSessionsResponses, + GetUsersMfaData, + GetUsersMfaError, + GetUsersMfaErrors, + GetUsersMfaResponse, + GetUsersMfaResponses, + GetUsersResponse, + GetUsersResponses, + GetWebHooksData, + GetWebHooksError, + GetWebHooksErrors, + GetWebhooksResponse, + GetWebHooksResponse, + GetWebHooksResponses, + Identity, + LogoutRedirectUrls, + NotFoundResponse, + OrganizationInvite, + OrganizationItemSchema, + OrganizationUser, + OrganizationUserPermission, + OrganizationUserRole, + OrganizationUserRolePermissions, + OrganizationUsers, + Permissions, + Property, + PropertyKey, + PropertyValue, + ReadEnvLogoResponse, + ReadLogoData, + ReadLogoError, + ReadLogoErrors, + ReadLogoResponse, + ReadLogoResponse2, + ReadLogoResponses, + ReadOrganizationLogoData, + ReadOrganizationLogoError, + ReadOrganizationLogoErrors, + ReadOrganizationLogoResponse, + ReadOrganizationLogoResponses, + RedirectCallbackUrls, + RefreshUserClaimsData, + RefreshUserClaimsError, + RefreshUserClaimsErrors, + RefreshUserClaimsResponse, + RefreshUserClaimsResponses, + RemoveConnectionData, + RemoveConnectionError, + RemoveConnectionErrors, + RemoveConnectionResponse, + RemoveConnectionResponses, + RemoveOrganizationUserData, + RemoveOrganizationUserError, + RemoveOrganizationUserErrors, + RemoveOrganizationUserResponse, + RemoveOrganizationUserResponses, + RemoveOrgConnectionData, + RemoveOrgConnectionError, + RemoveOrgConnectionErrors, + RemoveOrgConnectionResponse, + RemoveOrgConnectionResponses, + RemoveRolePermissionData, + RemoveRolePermissionError, + RemoveRolePermissionErrors, + RemoveRolePermissionResponse, + RemoveRolePermissionResponses, + ReplaceConnectionData, + ReplaceConnectionError, + ReplaceConnectionErrors, + ReplaceConnectionResponse, + ReplaceConnectionResponses, + ReplaceLogoutRedirectUrlsData, + ReplaceLogoutRedirectUrlsError, + ReplaceLogoutRedirectUrlsErrors, + ReplaceLogoutRedirectUrlsResponse, + ReplaceLogoutRedirectUrlsResponses, + ReplaceMfaData, + ReplaceMfaError, + ReplaceMfaErrors, + ReplaceMfaResponse, + ReplaceMfaResponses, + ReplaceOrganizationMfaData, + ReplaceOrganizationMfaError, + ReplaceOrganizationMfaErrors, + ReplaceOrganizationMfaResponse, + ReplaceOrganizationMfaResponses, + ReplaceRedirectCallbackUrlsData, + ReplaceRedirectCallbackUrlsError, + ReplaceRedirectCallbackUrlsErrors, + ReplaceRedirectCallbackUrlsResponse, + ReplaceRedirectCallbackUrlsResponses, + ResetOrgUserMfaAllData, + ResetOrgUserMfaAllError, + ResetOrgUserMfaAllErrors, + ResetOrgUserMfaAllResponse, + ResetOrgUserMfaAllResponses, + ResetOrgUserMfaData, + ResetOrgUserMfaError, + ResetOrgUserMfaErrors, + ResetOrgUserMfaResponse, + ResetOrgUserMfaResponses, + ResetUsersMfaAllData, + ResetUsersMfaAllError, + ResetUsersMfaAllErrors, + ResetUsersMfaAllResponse, + ResetUsersMfaAllResponses, + ResetUsersMfaData, + ResetUsersMfaError, + ResetUsersMfaErrors, + ResetUsersMfaResponse, + ResetUsersMfaResponses, + RevokeConnectedAppTokenData, + RevokeConnectedAppTokenError, + RevokeConnectedAppTokenErrors, + RevokeConnectedAppTokenResponse, + RevokeConnectedAppTokenResponses, + Role, + RolePermissionsResponse, + Roles, + RoleScopesResponse, + RotateApiKeyData, + RotateApiKeyError, + RotateApiKeyErrors, + RotateApiKeyResponse, + RotateApiKeyResponse2, + RotateApiKeyResponses, + Scopes, + SearchUsersData, + SearchUsersError, + SearchUsersErrors, + SearchUsersResponse, + SearchUsersResponse2, + SearchUsersResponses, + SetUserPasswordData, + SetUserPasswordError, + SetUserPasswordErrors, + SetUserPasswordResponse, + SetUserPasswordResponses, + Subscriber, + SubscribersSubscriber, + SuccessResponse, + UpdateApiApplicationsData, + UpdateApiApplicationsError, + UpdateApiApplicationsErrors, + UpdateApiApplicationsResponse, + UpdateApiApplicationsResponses, + UpdateApiScopeData, + UpdateApiScopeError, + UpdateApiScopeErrors, + UpdateApiScopeResponses, + UpdateApplicationData, + UpdateApplicationError, + UpdateApplicationErrors, + UpdateApplicationResponses, + UpdateApplicationsPropertyData, + UpdateApplicationsPropertyError, + UpdateApplicationsPropertyErrors, + UpdateApplicationsPropertyResponse, + UpdateApplicationsPropertyResponses, + UpdateApplicationTokensData, + UpdateApplicationTokensError, + UpdateApplicationTokensErrors, + UpdateApplicationTokensResponse, + UpdateApplicationTokensResponses, + UpdateBusinessData, + UpdateBusinessError, + UpdateBusinessErrors, + UpdateBusinessResponse, + UpdateBusinessResponses, + UpdateCategoryData, + UpdateCategoryError, + UpdateCategoryErrors, + UpdateCategoryResponse, + UpdateCategoryResponses, + UpdateConnectionData, + UpdateConnectionError, + UpdateConnectionErrors, + UpdateConnectionResponse, + UpdateConnectionResponses, + UpdateDirectoryData, + UpdateDirectoryError, + UpdateDirectoryErrors, + UpdateDirectoryResponse, + UpdateDirectoryResponse2, + UpdateDirectoryResponses, + UpdateEnvironementFeatureFlagOverrideData, + UpdateEnvironementFeatureFlagOverrideError, + UpdateEnvironementFeatureFlagOverrideErrors, + UpdateEnvironementFeatureFlagOverrideResponse, + UpdateEnvironementFeatureFlagOverrideResponses, + UpdateEnvironmentVariableData, + UpdateEnvironmentVariableError, + UpdateEnvironmentVariableErrors, + UpdateEnvironmentVariableResponse, + UpdateEnvironmentVariableResponse2, + UpdateEnvironmentVariableResponses, + UpdateFeatureFlagData, + UpdateFeatureFlagError, + UpdateFeatureFlagErrors, + UpdateFeatureFlagResponse, + UpdateFeatureFlagResponses, + UpdateIdentityData, + UpdateIdentityError, + UpdateIdentityErrors, + UpdateIdentityResponse, + UpdateIdentityResponses, + UpdateOrganizationData, + UpdateOrganizationError, + UpdateOrganizationErrors, + UpdateOrganizationFeatureFlagOverrideData, + UpdateOrganizationFeatureFlagOverrideError, + UpdateOrganizationFeatureFlagOverrideErrors, + UpdateOrganizationFeatureFlagOverrideResponse, + UpdateOrganizationFeatureFlagOverrideResponses, + UpdateOrganizationPropertiesData, + UpdateOrganizationPropertiesError, + UpdateOrganizationPropertiesErrors, + UpdateOrganizationPropertiesResponse, + UpdateOrganizationPropertiesResponses, + UpdateOrganizationPropertyData, + UpdateOrganizationPropertyError, + UpdateOrganizationPropertyErrors, + UpdateOrganizationPropertyResponse, + UpdateOrganizationPropertyResponses, + UpdateOrganizationResponse, + UpdateOrganizationResponses, + UpdateOrganizationSessionsData, + UpdateOrganizationSessionsError, + UpdateOrganizationSessionsErrors, + UpdateOrganizationSessionsResponse, + UpdateOrganizationSessionsResponses, + UpdateOrganizationUsersData, + UpdateOrganizationUsersError, + UpdateOrganizationUsersErrors, + UpdateOrganizationUsersResponse, + UpdateOrganizationUsersResponse2, + UpdateOrganizationUsersResponses, + UpdatePermissionsData, + UpdatePermissionsError, + UpdatePermissionsErrors, + UpdatePermissionsResponse, + UpdatePermissionsResponses, + UpdatePropertyData, + UpdatePropertyError, + UpdatePropertyErrors, + UpdatePropertyResponse, + UpdatePropertyResponses, + UpdateRolePermissionsData, + UpdateRolePermissionsError, + UpdateRolePermissionsErrors, + UpdateRolePermissionsResponse, + UpdateRolePermissionsResponse2, + UpdateRolePermissionsResponses, + UpdateRolesData, + UpdateRolesError, + UpdateRolesErrors, + UpdateRolesResponse, + UpdateRolesResponses, + UpdateUserData, + UpdateUserError, + UpdateUserErrors, + UpdateUserFeatureFlagOverrideData, + UpdateUserFeatureFlagOverrideError, + UpdateUserFeatureFlagOverrideErrors, + UpdateUserFeatureFlagOverrideResponse, + UpdateUserFeatureFlagOverrideResponses, + UpdateUserPropertiesData, + UpdateUserPropertiesError, + UpdateUserPropertiesErrors, + UpdateUserPropertiesResponse, + UpdateUserPropertiesResponses, + UpdateUserPropertyData, + UpdateUserPropertyError, + UpdateUserPropertyErrors, + UpdateUserPropertyResponse, + UpdateUserPropertyResponses, + UpdateUserResponse, + UpdateUserResponse2, + UpdateUserResponses, + UpdateWebHookData, + UpdateWebHookError, + UpdateWebHookErrors, + UpdateWebhookResponse, + UpdateWebHookResponse, + UpdateWebHookResponses, + User, + UserIdentity, + Users, + UsersResponse, + VariableId, + VerifyApiKeyData, + VerifyApiKeyError, + VerifyApiKeyErrors, + VerifyApiKeyResponse, + VerifyApiKeyResponse2, + VerifyApiKeyResponses, + Webhook, +} from "./types.gen"; diff --git a/lib/api/sdk.gen.ts b/lib/api/sdk.gen.ts index 231201c..bbaeb28 100644 --- a/lib/api/sdk.gen.ts +++ b/lib/api/sdk.gen.ts @@ -1,523 +1,685 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { CancelablePromise } from "./core/CancelablePromise"; -import { OpenAPI } from "./core/OpenAPI"; -import { request as __request } from "./core/request"; +import { + type Client, + formDataBodySerializer, + type Options as Options2, + type TDataShape, +} from "./client"; +import { client } from "./client.gen"; import type { - GetApiKeysData, - GetApiKeysResponse, - CreateApiKeyData, - CreateApiKeyResponse, - GetApiKeyData, - GetApiKeyResponse, - DeleteApiKeyData, - DeleteApiKeyResponse, - RotateApiKeyData, - RotateApiKeyResponse, - VerifyApiKeyData, - VerifyApiKeyResponse, - GetApisData, - GetApisResponse, + AddApiApplicationScopeData, + AddApiApplicationScopeErrors, + AddApiApplicationScopeResponses, + AddApiScopeData, + AddApiScopeErrors, + AddApiScopeResponses, AddApisData, - AddApisResponse, - GetApiData, - GetApiResponse, + AddApisErrors, + AddApisResponses, + AddLogoData, + AddLogoErrors, + AddLogoResponses, + AddLogoutRedirectUrlsData, + AddLogoutRedirectUrlsErrors, + AddLogoutRedirectUrlsResponses, + AddOrganizationLogoData, + AddOrganizationLogoErrors, + AddOrganizationLogoResponses, + AddOrganizationUserApiScopeData, + AddOrganizationUserApiScopeErrors, + AddOrganizationUserApiScopeResponses, + AddOrganizationUsersData, + AddOrganizationUsersErrors, + AddOrganizationUsersResponses, + AddRedirectCallbackUrlsData, + AddRedirectCallbackUrlsErrors, + AddRedirectCallbackUrlsResponses, + AddRoleScopeData, + AddRoleScopeErrors, + AddRoleScopeResponses, + CreateApiKeyData, + CreateApiKeyErrors, + CreateApiKeyResponses, + CreateApplicationData, + CreateApplicationErrors, + CreateApplicationResponses, + CreateBillingAgreementData, + CreateBillingAgreementErrors, + CreateBillingAgreementResponses, + CreateCategoryData, + CreateCategoryErrors, + CreateCategoryResponses, + CreateConnectionData, + CreateConnectionErrors, + CreateConnectionResponses, + CreateDirectoryData, + CreateDirectoryErrors, + CreateDirectoryResponses, + CreateEnvironmentVariableData, + CreateEnvironmentVariableErrors, + CreateEnvironmentVariableResponses, + CreateFeatureFlagData, + CreateFeatureFlagErrors, + CreateFeatureFlagResponses, + CreateMeterUsageRecordData, + CreateMeterUsageRecordErrors, + CreateMeterUsageRecordResponses, + CreateOrganizationData, + CreateOrganizationErrors, + CreateOrganizationInviteData, + CreateOrganizationInviteErrors, + CreateOrganizationInviteResponses, + CreateOrganizationResponses, + CreateOrganizationUserPermissionData, + CreateOrganizationUserPermissionErrors, + CreateOrganizationUserPermissionResponses, + CreateOrganizationUserRoleData, + CreateOrganizationUserRoleErrors, + CreateOrganizationUserRoleResponses, + CreatePermissionData, + CreatePermissionErrors, + CreatePermissionResponses, + CreatePropertyData, + CreatePropertyErrors, + CreatePropertyResponses, + CreateRoleData, + CreateRoleErrors, + CreateRoleResponses, + CreateSubscriberData, + CreateSubscriberErrors, + CreateSubscriberResponses, + CreateUserData, + CreateUserErrors, + CreateUserIdentityData, + CreateUserIdentityErrors, + CreateUserIdentityResponses, + CreateUserResponses, + CreateWebHookData, + CreateWebHookErrors, + CreateWebHookResponses, + DeleteApiApplicationScopeData, + DeleteApiApplicationScopeErrors, + DeleteApiApplicationScopeResponses, DeleteApiData, - DeleteApiResponse, - GetApiScopesData, - GetApiScopesResponse, - AddApiScopeData, - AddApiScopeResponse, - GetApiScopeData, - GetApiScopeResponse, - UpdateApiScopeData, - UpdateApiScopeResponse, + DeleteApiErrors, + DeleteApiKeyData, + DeleteApiKeyErrors, + DeleteApiKeyResponses, + DeleteApiResponses, DeleteApiScopeData, - DeleteApiScopeResponse, - UpdateApiApplicationsData, - UpdateApiApplicationsResponse, - AddApiApplicationScopeData, - AddApiApplicationScopeResponse, - DeleteApiApplicationScopeData, - DeleteApiApplicationScopeResponse, - GetApplicationsData, - GetApplicationsResponse, - CreateApplicationData, - CreateApplicationResponse, - GetApplicationData, - GetApplicationResponse, - UpdateApplicationData, - UpdateApplicationResponse, + DeleteApiScopeErrors, + DeleteApiScopeResponses, DeleteApplicationData, - DeleteApplicationResponse, - GetApplicationConnectionsData, - GetApplicationConnectionsResponse, + DeleteApplicationErrors, + DeleteApplicationResponses, + DeleteCallbackUrlsData, + DeleteCallbackUrlsErrors, + DeleteCallbackUrlsResponses, + DeleteConnectionData, + DeleteConnectionErrors, + DeleteConnectionResponses, + DeleteDirectoryData, + DeleteDirectoryErrors, + DeleteDirectoryResponses, + DeleteEnvironementFeatureFlagOverrideData, + DeleteEnvironementFeatureFlagOverrideErrors, + DeleteEnvironementFeatureFlagOverrideResponses, + DeleteEnvironementFeatureFlagOverridesData, + DeleteEnvironementFeatureFlagOverridesErrors, + DeleteEnvironementFeatureFlagOverridesResponses, + DeleteEnvironmentVariableData, + DeleteEnvironmentVariableErrors, + DeleteEnvironmentVariableResponses, + DeleteFeatureFlagData, + DeleteFeatureFlagErrors, + DeleteFeatureFlagResponses, + DeleteIdentityData, + DeleteIdentityErrors, + DeleteIdentityResponses, + DeleteLogoData, + DeleteLogoErrors, + DeleteLogoResponses, + DeleteLogoutUrlsData, + DeleteLogoutUrlsErrors, + DeleteLogoutUrlsResponses, + DeleteOrganizationData, + DeleteOrganizationErrors, + DeleteOrganizationFeatureFlagOverrideData, + DeleteOrganizationFeatureFlagOverrideErrors, + DeleteOrganizationFeatureFlagOverrideResponses, + DeleteOrganizationFeatureFlagOverridesData, + DeleteOrganizationFeatureFlagOverridesErrors, + DeleteOrganizationFeatureFlagOverridesResponses, + DeleteOrganizationHandleData, + DeleteOrganizationHandleErrors, + DeleteOrganizationHandleResponses, + DeleteOrganizationInviteData, + DeleteOrganizationInviteErrors, + DeleteOrganizationInviteResponses, + DeleteOrganizationLogoData, + DeleteOrganizationLogoErrors, + DeleteOrganizationLogoResponses, + DeleteOrganizationResponses, + DeleteOrganizationUserApiScopeData, + DeleteOrganizationUserApiScopeErrors, + DeleteOrganizationUserApiScopeResponses, + DeleteOrganizationUserPermissionData, + DeleteOrganizationUserPermissionErrors, + DeleteOrganizationUserPermissionResponses, + DeleteOrganizationUserRoleData, + DeleteOrganizationUserRoleErrors, + DeleteOrganizationUserRoleResponses, + DeletePermissionData, + DeletePermissionErrors, + DeletePermissionResponses, + DeletePropertyData, + DeletePropertyErrors, + DeletePropertyResponses, + DeleteRoleData, + DeleteRoleErrors, + DeleteRoleResponses, + DeleteRoleScopeData, + DeleteRoleScopeErrors, + DeleteRoleScopeResponses, + DeleteUserData, + DeleteUserErrors, + DeleteUserResponses, + DeleteUserSessionsData, + DeleteUserSessionsErrors, + DeleteUserSessionsResponses, + DeleteWebHookData, + DeleteWebHookErrors, + DeleteWebHookResponses, EnableConnectionData, - EnableConnectionResponse, - RemoveConnectionData, - RemoveConnectionResponse, + EnableConnectionErrors, + EnableConnectionResponses, + EnableOrgConnectionData, + EnableOrgConnectionErrors, + EnableOrgConnectionResponses, + GetApiData, + GetApiErrors, + GetApiKeyData, + GetApiKeyErrors, + GetApiKeyResponses, + GetApiKeysData, + GetApiKeysErrors, + GetApiKeysResponses, + GetApiResponses, + GetApiScopeData, + GetApiScopeErrors, + GetApiScopeResponses, + GetApiScopesData, + GetApiScopesErrors, + GetApiScopesResponses, + GetApisData, + GetApisErrors, + GetApisResponses, + GetApplicationConnectionsData, + GetApplicationConnectionsErrors, + GetApplicationConnectionsResponses, + GetApplicationData, + GetApplicationErrors, GetApplicationPropertyValuesData, - GetApplicationPropertyValuesResponse, - UpdateApplicationsPropertyData, - UpdateApplicationsPropertyResponse, - UpdateApplicationTokensData, - UpdateApplicationTokensResponse, + GetApplicationPropertyValuesErrors, + GetApplicationPropertyValuesResponses, + GetApplicationResponses, + GetApplicationsData, + GetApplicationsErrors, + GetApplicationsResponses, GetBillingAgreementsData, - GetBillingAgreementsResponse, - CreateBillingAgreementData, - CreateBillingAgreementResponse, + GetBillingAgreementsErrors, + GetBillingAgreementsResponses, GetBillingEntitlementsData, - GetBillingEntitlementsResponse, - CreateMeterUsageRecordData, - CreateMeterUsageRecordResponse, - GetBusinessResponse, - UpdateBusinessData, - UpdateBusinessResponse, + GetBillingEntitlementsErrors, + GetBillingEntitlementsResponses, + GetBusinessData, + GetBusinessErrors, + GetBusinessResponses, GetCallbackUrlsData, - GetCallbackUrlsResponse, - AddRedirectCallbackUrlsData, - AddRedirectCallbackUrlsResponse, - ReplaceRedirectCallbackUrlsData, - ReplaceRedirectCallbackUrlsResponse, - DeleteCallbackUrlsData, - DeleteCallbackUrlsResponse, - GetLogoutUrlsData, - GetLogoutUrlsResponse, - AddLogoutRedirectUrlsData, - AddLogoutRedirectUrlsResponse, - ReplaceLogoutRedirectUrlsData, - ReplaceLogoutRedirectUrlsResponse, - DeleteLogoutUrlsData, - DeleteLogoutUrlsResponse, + GetCallbackUrlsErrors, + GetCallbackUrlsResponses, + GetCategoriesData, + GetCategoriesErrors, + GetCategoriesResponses, GetConnectedAppAuthUrlData, - GetConnectedAppAuthUrlResponse, + GetConnectedAppAuthUrlErrors, + GetConnectedAppAuthUrlResponses, GetConnectedAppTokenData, - GetConnectedAppTokenResponse, - RevokeConnectedAppTokenData, - RevokeConnectedAppTokenResponse, - GetConnectionsData, - GetConnectionsResponse, - CreateConnectionData, - CreateConnectionResponse, + GetConnectedAppTokenErrors, + GetConnectedAppTokenResponses, GetConnectionData, - GetConnectionResponse, - UpdateConnectionData, - UpdateConnectionResponse, - ReplaceConnectionData, - ReplaceConnectionResponse, - DeleteConnectionData, - DeleteConnectionResponse, + GetConnectionErrors, + GetConnectionResponses, + GetConnectionsData, + GetConnectionsErrors, + GetConnectionsResponses, GetDirectoriesData, - GetDirectoriesResponse, - CreateDirectoryData, - CreateDirectoryResponse, + GetDirectoriesErrors, + GetDirectoriesResponses, GetDirectoryData, - GetDirectoryResponse, - UpdateDirectoryData, - UpdateDirectoryResponse, - DeleteDirectoryData, - DeleteDirectoryResponse, - GetEnvironmentResponse, - DeleteEnvironementFeatureFlagOverridesResponse, - GetEnvironementFeatureFlagsResponse, - DeleteEnvironementFeatureFlagOverrideData, - DeleteEnvironementFeatureFlagOverrideResponse, - UpdateEnvironementFeatureFlagOverrideData, - UpdateEnvironementFeatureFlagOverrideResponse, - ReadLogoResponse, - AddLogoData, - AddLogoResponse, - DeleteLogoData, - DeleteLogoResponse, - GetEnvironmentVariablesResponse, - CreateEnvironmentVariableData, - CreateEnvironmentVariableResponse, + GetDirectoryErrors, + GetDirectoryResponses, + GetEnvironementFeatureFlagsData, + GetEnvironementFeatureFlagsErrors, + GetEnvironementFeatureFlagsResponses, + GetEnvironmentData, + GetEnvironmentErrors, + GetEnvironmentResponses, GetEnvironmentVariableData, - GetEnvironmentVariableResponse, - UpdateEnvironmentVariableData, - UpdateEnvironmentVariableResponse, - DeleteEnvironmentVariableData, - DeleteEnvironmentVariableResponse, - CreateFeatureFlagData, - CreateFeatureFlagResponse, - DeleteFeatureFlagData, - DeleteFeatureFlagResponse, - UpdateFeatureFlagData, - UpdateFeatureFlagResponse, + GetEnvironmentVariableErrors, + GetEnvironmentVariableResponses, + GetEnvironmentVariablesData, + GetEnvironmentVariablesErrors, + GetEnvironmentVariablesResponses, + GetEventData, + GetEventErrors, + GetEventResponses, + GetEventTypesData, + GetEventTypesErrors, + GetEventTypesResponses, GetIdentityData, - GetIdentityResponse, - UpdateIdentityData, - UpdateIdentityResponse, - DeleteIdentityData, - DeleteIdentityResponse, - GetIndustriesResponse, - ReplaceMfaData, - ReplaceMfaResponse, - GetOrganizationInvitesData, - GetOrganizationInvitesResponse, - CreateOrganizationInviteData, - CreateOrganizationInviteResponse, - GetOrganizationInviteData, - GetOrganizationInviteResponse, - DeleteOrganizationInviteData, - DeleteOrganizationInviteResponse, + GetIdentityErrors, + GetIdentityResponses, + GetIndustriesData, + GetIndustriesErrors, + GetIndustriesResponses, + GetLogoutUrlsData, + GetLogoutUrlsErrors, + GetLogoutUrlsResponses, + GetOrganizationConnectionsData, + GetOrganizationConnectionsErrors, + GetOrganizationConnectionsResponses, GetOrganizationData, - GetOrganizationResponse, - CreateOrganizationData, - CreateOrganizationResponse, + GetOrganizationErrors, + GetOrganizationFeatureFlagsData, + GetOrganizationFeatureFlagsErrors, + GetOrganizationFeatureFlagsResponses, + GetOrganizationInviteData, + GetOrganizationInviteErrors, + GetOrganizationInviteResponses, + GetOrganizationInvitesData, + GetOrganizationInvitesErrors, + GetOrganizationInvitesResponses, + GetOrganizationPropertyValuesData, + GetOrganizationPropertyValuesErrors, + GetOrganizationPropertyValuesResponses, + GetOrganizationResponses, GetOrganizationsData, - GetOrganizationsResponse, - UpdateOrganizationData, - UpdateOrganizationResponse, - DeleteOrganizationData, - DeleteOrganizationResponse, - GetOrganizationUsersData, - GetOrganizationUsersResponse, - AddOrganizationUsersData, - AddOrganizationUsersResponse, - UpdateOrganizationUsersData, - UpdateOrganizationUsersResponse, - GetOrganizationUserRolesData, - GetOrganizationUserRolesResponse, - CreateOrganizationUserRoleData, - CreateOrganizationUserRoleResponse, - DeleteOrganizationUserRoleData, - DeleteOrganizationUserRoleResponse, + GetOrganizationsErrors, + GetOrganizationsResponses, GetOrganizationUserPermissionsData, - GetOrganizationUserPermissionsResponse, - CreateOrganizationUserPermissionData, - CreateOrganizationUserPermissionResponse, - DeleteOrganizationUserPermissionData, - DeleteOrganizationUserPermissionResponse, - RemoveOrganizationUserData, - RemoveOrganizationUserResponse, - AddOrganizationUserApiScopeData, - AddOrganizationUserApiScopeResponse, - DeleteOrganizationUserApiScopeData, - DeleteOrganizationUserApiScopeResponse, + GetOrganizationUserPermissionsErrors, + GetOrganizationUserPermissionsResponses, + GetOrganizationUserRolesData, + GetOrganizationUserRolesErrors, + GetOrganizationUserRolesResponses, + GetOrganizationUsersData, + GetOrganizationUsersErrors, + GetOrganizationUsersResponses, GetOrgUserMfaData, - GetOrgUserMfaResponse, - ResetOrgUserMfaAllData, - ResetOrgUserMfaAllResponse, - ResetOrgUserMfaData, - ResetOrgUserMfaResponse, - GetOrganizationFeatureFlagsData, - GetOrganizationFeatureFlagsResponse, - DeleteOrganizationFeatureFlagOverridesData, - DeleteOrganizationFeatureFlagOverridesResponse, - DeleteOrganizationFeatureFlagOverrideData, - DeleteOrganizationFeatureFlagOverrideResponse, - UpdateOrganizationFeatureFlagOverrideData, - UpdateOrganizationFeatureFlagOverrideResponse, - UpdateOrganizationPropertyData, - UpdateOrganizationPropertyResponse, - GetOrganizationPropertyValuesData, - GetOrganizationPropertyValuesResponse, - UpdateOrganizationPropertiesData, - UpdateOrganizationPropertiesResponse, - ReplaceOrganizationMfaData, - ReplaceOrganizationMfaResponse, - DeleteOrganizationHandleData, - DeleteOrganizationHandleResponse, - ReadOrganizationLogoData, - ReadOrganizationLogoResponse, - AddOrganizationLogoData, - AddOrganizationLogoResponse, - DeleteOrganizationLogoData, - DeleteOrganizationLogoResponse, - GetOrganizationConnectionsData, - GetOrganizationConnectionsResponse, - EnableOrgConnectionData, - EnableOrgConnectionResponse, - RemoveOrgConnectionData, - RemoveOrgConnectionResponse, - UpdateOrganizationSessionsData, - UpdateOrganizationSessionsResponse, + GetOrgUserMfaErrors, + GetOrgUserMfaResponses, GetPermissionsData, - GetPermissionsResponse, - CreatePermissionData, - CreatePermissionResponse, - UpdatePermissionsData, - UpdatePermissionsResponse, - DeletePermissionData, - DeletePermissionResponse, + GetPermissionsErrors, + GetPermissionsResponses, GetPropertiesData, - GetPropertiesResponse, - CreatePropertyData, - CreatePropertyResponse, - UpdatePropertyData, - UpdatePropertyResponse, - DeletePropertyData, - DeletePropertyResponse, - GetCategoriesData, - GetCategoriesResponse, - CreateCategoryData, - CreateCategoryResponse, - UpdateCategoryData, - UpdateCategoryResponse, - GetRolesData, - GetRolesResponse, - CreateRoleData, - CreateRoleResponse, + GetPropertiesErrors, + GetPropertiesResponses, GetRoleData, - GetRoleResponse, - UpdateRolesData, - UpdateRolesResponse, - DeleteRoleData, - DeleteRoleResponse, - GetRoleScopesData, - GetRoleScopesResponse, - AddRoleScopeData, - AddRoleScopeResponse, - DeleteRoleScopeData, - DeleteRoleScopeResponse, + GetRoleErrors, GetRolePermissionsData, - GetRolePermissionsResponse, - UpdateRolePermissionsData, - UpdateRolePermissionsResponse, - RemoveRolePermissionData, - RemoveRolePermissionResponse, - SearchUsersData, - SearchUsersResponse, - GetSubscribersData, - GetSubscribersResponse, - CreateSubscriberData, - CreateSubscriberResponse, + GetRolePermissionsErrors, + GetRolePermissionsResponses, + GetRoleResponses, + GetRoleScopesData, + GetRoleScopesErrors, + GetRoleScopesResponses, + GetRolesData, + GetRolesErrors, + GetRolesResponses, GetSubscriberData, - GetSubscriberResponse, - GetTimezonesResponse, - GetUsersData, - GetUsersResponse, - RefreshUserClaimsData, - RefreshUserClaimsResponse, + GetSubscriberErrors, + GetSubscriberResponses, + GetSubscribersData, + GetSubscribersErrors, + GetSubscribersResponses, + GetTimezonesData, + GetTimezonesErrors, + GetTimezonesResponses, GetUserDataData, - GetUserDataResponse, - CreateUserData, - CreateUserResponse, - UpdateUserData, - UpdateUserResponse, - DeleteUserData, - DeleteUserResponse, - UpdateUserFeatureFlagOverrideData, - UpdateUserFeatureFlagOverrideResponse, - UpdateUserPropertyData, - UpdateUserPropertyResponse, - GetUserPropertyValuesData, - GetUserPropertyValuesResponse, - UpdateUserPropertiesData, - UpdateUserPropertiesResponse, - SetUserPasswordData, - SetUserPasswordResponse, + GetUserDataErrors, + GetUserDataResponses, GetUserIdentitiesData, - GetUserIdentitiesResponse, - CreateUserIdentityData, - CreateUserIdentityResponse, + GetUserIdentitiesErrors, + GetUserIdentitiesResponses, + GetUserPropertyValuesData, + GetUserPropertyValuesErrors, + GetUserPropertyValuesResponses, + GetUsersData, + GetUsersErrors, GetUserSessionsData, - GetUserSessionsResponse, - DeleteUserSessionsData, - DeleteUserSessionsResponse, + GetUserSessionsErrors, + GetUserSessionsResponses, GetUsersMfaData, - GetUsersMfaResponse, + GetUsersMfaErrors, + GetUsersMfaResponses, + GetUsersResponses, + GetWebHooksData, + GetWebHooksErrors, + GetWebHooksResponses, + ReadLogoData, + ReadLogoErrors, + ReadLogoResponses, + ReadOrganizationLogoData, + ReadOrganizationLogoErrors, + ReadOrganizationLogoResponses, + RefreshUserClaimsData, + RefreshUserClaimsErrors, + RefreshUserClaimsResponses, + RemoveConnectionData, + RemoveConnectionErrors, + RemoveConnectionResponses, + RemoveOrganizationUserData, + RemoveOrganizationUserErrors, + RemoveOrganizationUserResponses, + RemoveOrgConnectionData, + RemoveOrgConnectionErrors, + RemoveOrgConnectionResponses, + RemoveRolePermissionData, + RemoveRolePermissionErrors, + RemoveRolePermissionResponses, + ReplaceConnectionData, + ReplaceConnectionErrors, + ReplaceConnectionResponses, + ReplaceLogoutRedirectUrlsData, + ReplaceLogoutRedirectUrlsErrors, + ReplaceLogoutRedirectUrlsResponses, + ReplaceMfaData, + ReplaceMfaErrors, + ReplaceMfaResponses, + ReplaceOrganizationMfaData, + ReplaceOrganizationMfaErrors, + ReplaceOrganizationMfaResponses, + ReplaceRedirectCallbackUrlsData, + ReplaceRedirectCallbackUrlsErrors, + ReplaceRedirectCallbackUrlsResponses, + ResetOrgUserMfaAllData, + ResetOrgUserMfaAllErrors, + ResetOrgUserMfaAllResponses, + ResetOrgUserMfaData, + ResetOrgUserMfaErrors, + ResetOrgUserMfaResponses, ResetUsersMfaAllData, - ResetUsersMfaAllResponse, + ResetUsersMfaAllErrors, + ResetUsersMfaAllResponses, ResetUsersMfaData, - ResetUsersMfaResponse, - GetEventData, - GetEventResponse, - GetEventTypesResponse, - DeleteWebHookData, - DeleteWebHookResponse, + ResetUsersMfaErrors, + ResetUsersMfaResponses, + RevokeConnectedAppTokenData, + RevokeConnectedAppTokenErrors, + RevokeConnectedAppTokenResponses, + RotateApiKeyData, + RotateApiKeyErrors, + RotateApiKeyResponses, + SearchUsersData, + SearchUsersErrors, + SearchUsersResponses, + SetUserPasswordData, + SetUserPasswordErrors, + SetUserPasswordResponses, + UpdateApiApplicationsData, + UpdateApiApplicationsErrors, + UpdateApiApplicationsResponses, + UpdateApiScopeData, + UpdateApiScopeErrors, + UpdateApiScopeResponses, + UpdateApplicationData, + UpdateApplicationErrors, + UpdateApplicationResponses, + UpdateApplicationsPropertyData, + UpdateApplicationsPropertyErrors, + UpdateApplicationsPropertyResponses, + UpdateApplicationTokensData, + UpdateApplicationTokensErrors, + UpdateApplicationTokensResponses, + UpdateBusinessData, + UpdateBusinessErrors, + UpdateBusinessResponses, + UpdateCategoryData, + UpdateCategoryErrors, + UpdateCategoryResponses, + UpdateConnectionData, + UpdateConnectionErrors, + UpdateConnectionResponses, + UpdateDirectoryData, + UpdateDirectoryErrors, + UpdateDirectoryResponses, + UpdateEnvironementFeatureFlagOverrideData, + UpdateEnvironementFeatureFlagOverrideErrors, + UpdateEnvironementFeatureFlagOverrideResponses, + UpdateEnvironmentVariableData, + UpdateEnvironmentVariableErrors, + UpdateEnvironmentVariableResponses, + UpdateFeatureFlagData, + UpdateFeatureFlagErrors, + UpdateFeatureFlagResponses, + UpdateIdentityData, + UpdateIdentityErrors, + UpdateIdentityResponses, + UpdateOrganizationData, + UpdateOrganizationErrors, + UpdateOrganizationFeatureFlagOverrideData, + UpdateOrganizationFeatureFlagOverrideErrors, + UpdateOrganizationFeatureFlagOverrideResponses, + UpdateOrganizationPropertiesData, + UpdateOrganizationPropertiesErrors, + UpdateOrganizationPropertiesResponses, + UpdateOrganizationPropertyData, + UpdateOrganizationPropertyErrors, + UpdateOrganizationPropertyResponses, + UpdateOrganizationResponses, + UpdateOrganizationSessionsData, + UpdateOrganizationSessionsErrors, + UpdateOrganizationSessionsResponses, + UpdateOrganizationUsersData, + UpdateOrganizationUsersErrors, + UpdateOrganizationUsersResponses, + UpdatePermissionsData, + UpdatePermissionsErrors, + UpdatePermissionsResponses, + UpdatePropertyData, + UpdatePropertyErrors, + UpdatePropertyResponses, + UpdateRolePermissionsData, + UpdateRolePermissionsErrors, + UpdateRolePermissionsResponses, + UpdateRolesData, + UpdateRolesErrors, + UpdateRolesResponses, + UpdateUserData, + UpdateUserErrors, + UpdateUserFeatureFlagOverrideData, + UpdateUserFeatureFlagOverrideErrors, + UpdateUserFeatureFlagOverrideResponses, + UpdateUserPropertiesData, + UpdateUserPropertiesErrors, + UpdateUserPropertiesResponses, + UpdateUserPropertyData, + UpdateUserPropertyErrors, + UpdateUserPropertyResponses, + UpdateUserResponses, UpdateWebHookData, - UpdateWebHookResponse, - GetWebHooksResponse, - CreateWebHookData, - CreateWebHookResponse, + UpdateWebHookErrors, + UpdateWebHookResponses, + VerifyApiKeyData, + VerifyApiKeyErrors, + VerifyApiKeyResponses, } from "./types.gen"; +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, +> = Options2 & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + export class ApiKeys { /** * Get API keys + * * Returns a list of API keys. * *
* read:api_keys *
* - * @param data The data for the request. - * @param data.pageSize Number of results per page. Defaults to 50 if parameter not sent. - * @param data.startingAfter The ID of the API key to start after. - * @param data.keyType Filter by API key type (organization or user). - * @param data.status Filter by API key status (active, inactive, revoked). - * @param data.userId Filter by user ID to get API keys associated with a specific user. - * @param data.orgCode Filter by organization code to get API keys associated with a specific organization. - * @returns get_api_keys_response API keys successfully retrieved. - * @throws ApiError - */ - public static getApiKeys( - data: GetApiKeysData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + */ + public static getApiKeys( + options?: Options, + ) { + return (options?.client ?? client).get< + GetApiKeysResponses, + GetApiKeysErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/api_keys", - query: { - page_size: data.pageSize, - starting_after: data.startingAfter, - key_type: data.keyType, - status: data.status, - user_id: data.userId, - org_code: data.orgCode, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create API key + * * Create a new API key. * *
* create:api_keys *
* - * @param data The data for the request. - * @param data.requestBody API key details. - * @returns create_api_key_response API key successfully created. - * @throws ApiError */ - public static createApiKey( - data: CreateApiKeyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createApiKey( + options: Options, + ) { + return (options.client ?? client).post< + CreateApiKeyResponses, + CreateApiKeyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/api_keys", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get API key - * Retrieve API key details by ID. + * Delete API key + * + * Delete an API key. * *
- * read:api_keys + * delete:api_keys *
* - * @param data The data for the request. - * @param data.keyId The ID of the API key. - * @returns get_api_key_response API key successfully retrieved. - * @throws ApiError */ - public static getApiKey( - data: GetApiKeyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteApiKey( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteApiKeyResponses, + DeleteApiKeyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/api_keys/{key_id}", - path: { - key_id: data.keyId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete API key - * Delete an API key. + * Get API key + * + * Retrieve API key details by ID. * *
- * delete:api_keys + * read:api_keys *
* - * @param data The data for the request. - * @param data.keyId The ID of the API key. - * @returns success_response API key successfully deleted. - * @throws ApiError */ - public static deleteApiKey( - data: DeleteApiKeyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static getApiKey( + options: Options, + ) { + return (options.client ?? client).get< + GetApiKeyResponses, + GetApiKeyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/api_keys/{key_id}", - path: { - key_id: data.keyId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Rotate API key + * * Rotate an API key to generate a new key while maintaining the same permissions and associations. * *
* update:api_keys *
* - * @param data The data for the request. - * @param data.keyId The ID of the API key to rotate. - * @returns rotate_api_key_response API key successfully rotated. - * @throws ApiError */ - public static rotateApiKey( - data: RotateApiKeyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static rotateApiKey( + options: Options, + ) { + return (options.client ?? client).put< + RotateApiKeyResponses, + RotateApiKeyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/api_keys/{key_id}", - path: { - key_id: data.keyId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Verify API key + * * Verify an API key (public endpoint, no authentication required). * - * @param data The data for the request. - * @param data.requestBody API key verification details. - * @returns verify_api_key_response API key verification result. - * @throws ApiError */ - public static verifyApiKey( - data: VerifyApiKeyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static verifyApiKey( + options: Options, + ) { + return (options.client ?? client).post< + VerifyApiKeyResponses, + VerifyApiKeyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/api_keys/verify", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 401: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -526,379 +688,305 @@ export class ApiKeys { export class Apis { /** * Get APIs + * * Returns a list of your APIs. The APIs are returned sorted by name. * *
* read:apis *
* - * @param data The data for the request. - * @param data.expand Additional data to include in the response. Allowed value: "scopes". - * @returns get_apis_response A list of APIs. - * @throws ApiError */ - public static getApis( - data: GetApisData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getApis( + options?: Options, + ) { + return (options?.client ?? client).get< + GetApisResponses, + GetApisErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis", - query: { - expand: data.expand, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create API + * * Register a new API. For more information read [Register and manage APIs](https://docs.kinde.com/developer-tools/your-apis/register-manage-apis/). * *
* create:apis *
* - * @param data The data for the request. - * @param data.requestBody - * @returns create_apis_response APIs successfully updated - * @throws ApiError */ - public static addApis(data: AddApisData): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static addApis( + options: Options, + ) { + return (options.client ?? client).post< + AddApisResponses, + AddApisErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get API - * Retrieve API details by ID. + * Delete API + * + * Delete an API you previously created. * *
- * read:apis + * delete:apis *
* - * @param data The data for the request. - * @param data.apiId The API's ID. - * @returns get_api_response API successfully retrieved. - * @throws ApiError */ - public static getApi(data: GetApiData): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteApi( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteApiResponses, + DeleteApiErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}", - path: { - api_id: data.apiId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete API - * Delete an API you previously created. + * Get API + * + * Retrieve API details by ID. * *
- * delete:apis + * read:apis *
* - * @param data The data for the request. - * @param data.apiId The API's ID. - * @returns delete_api_response API successfully deleted. - * @throws ApiError */ - public static deleteApi( - data: DeleteApiData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static getApi( + options: Options, + ) { + return (options.client ?? client).get< + GetApiResponses, + GetApiErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}", - path: { - api_id: data.apiId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Get API scopes + * * Retrieve API scopes by API ID. * *
* read:api_scopes *
* - * @param data The data for the request. - * @param data.apiId API ID - * @returns get_api_scopes_response API scopes successfully retrieved. - * @throws ApiError */ - public static getApiScopes( - data: GetApiScopesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getApiScopes( + options: Options, + ) { + return (options.client ?? client).get< + GetApiScopesResponses, + GetApiScopesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}/scopes", - path: { - api_id: data.apiId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create API scope + * * Create a new API scope. * *
* create:api_scopes *
* - * @param data The data for the request. - * @param data.apiId API ID - * @param data.requestBody - * @returns create_api_scopes_response API scopes successfully created - * @throws ApiError */ - public static addApiScope( - data: AddApiScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static addApiScope( + options: Options, + ) { + return (options.client ?? client).post< + AddApiScopeResponses, + AddApiScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}/scopes", - path: { - api_id: data.apiId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get API scope - * Retrieve API scope by API ID. + * Delete API scope + * + * Delete an API scope you previously created. * *
- * read:api_scopes + * delete:apis_scopes *
* - * @param data The data for the request. - * @param data.apiId API ID - * @param data.scopeId Scope ID - * @returns get_api_scope_response API scope successfully retrieved. - * @throws ApiError */ - public static getApiScope( - data: GetApiScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteApiScope( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteApiScopeResponses, + DeleteApiScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}/scopes/{scope_id}", - path: { - api_id: data.apiId, - scope_id: data.scopeId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Update API scope - * Update an API scope. + * Get API scope + * + * Retrieve API scope by API ID. * *
- * update:api_scopes + * read:api_scopes *
* - * @param data The data for the request. - * @param data.apiId API ID - * @param data.scopeId Scope ID - * @param data.requestBody - * @returns unknown API scope successfully updated - * @throws ApiError */ - public static updateApiScope( - data: UpdateApiScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static getApiScope( + options: Options, + ) { + return (options.client ?? client).get< + GetApiScopeResponses, + GetApiScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}/scopes/{scope_id}", - path: { - api_id: data.apiId, - scope_id: data.scopeId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete API scope - * Delete an API scope you previously created. + * Update API scope + * + * Update an API scope. * *
- * delete:apis_scopes + * update:api_scopes *
* - * @param data The data for the request. - * @param data.apiId API ID - * @param data.scopeId Scope ID - * @returns unknown API scope successfully deleted. - * @throws ApiError */ - public static deleteApiScope( - data: DeleteApiScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static updateApiScope( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateApiScopeResponses, + UpdateApiScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}/scopes/{scope_id}", - path: { - api_id: data.apiId, - scope_id: data.scopeId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Authorize API applications + * * Authorize applications to be allowed to request access tokens for an API * *
* update:apis *
* - * @param data The data for the request. - * @param data.requestBody The applications you want to authorize. - * @param data.apiId The API's ID. - * @returns authorize_app_api_response Authorized applications updated. - * @throws ApiError */ - public static updateApiApplications( - data: UpdateApiApplicationsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateApiApplications( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateApiApplicationsResponses, + UpdateApiApplicationsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}/applications", - path: { - api_id: data.apiId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Add scope to API application - * Add a scope to an API application. + * Delete API application scope + * + * Delete an API application scope you previously created. * *
- * create:api_application_scopes + * delete:apis_application_scopes *
* - * @param data The data for the request. - * @param data.apiId API ID - * @param data.applicationId Application ID - * @param data.scopeId Scope ID - * @returns unknown API scope successfully added to API application - * @throws ApiError */ - public static addApiApplicationScope( - data: AddApiApplicationScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static deleteApiApplicationScope( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteApiApplicationScopeResponses, + DeleteApiApplicationScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}/applications/{application_id}/scopes/{scope_id}", - path: { - api_id: data.apiId, - application_id: data.applicationId, - scope_id: data.scopeId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete API application scope - * Delete an API application scope you previously created. + * Add scope to API application + * + * Add a scope to an API application. * *
- * delete:apis_application_scopes + * create:api_application_scopes *
* - * @param data The data for the request. - * @param data.apiId API ID - * @param data.applicationId Application ID - * @param data.scopeId Scope ID - * @returns unknown API scope successfully deleted. - * @throws ApiError */ - public static deleteApiApplicationScope( - data: DeleteApiApplicationScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static addApiApplicationScope( + options: Options, + ) { + return (options.client ?? client).post< + AddApiApplicationScopeResponses, + AddApiApplicationScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/apis/{api_id}/applications/{application_id}/scopes/{scope_id}", - path: { - api_id: data.apiId, - application_id: data.applicationId, - scope_id: data.scopeId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } } @@ -906,805 +994,705 @@ export class Apis { export class Applications { /** * Get applications + * * Get a list of applications / clients. * *
* read:applications *
* - * @param data The data for the request. - * @param data.sort Field and order to sort the result by. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.nextToken A string to get the next page of results if there are more results. - * @returns get_applications_response A successful response with a list of applications or an empty list. - * @throws ApiError */ - public static getApplications( - data: GetApplicationsData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getApplications( + options?: Options, + ) { + return (options?.client ?? client).get< + GetApplicationsResponses, + GetApplicationsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications", - query: { - sort: data.sort, - page_size: data.pageSize, - next_token: data.nextToken, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create application + * * Create a new client. * *
* create:applications *
* - * @param data The data for the request. - * @param data.requestBody - * @returns create_application_response Application successfully created. - * @throws ApiError */ - public static createApplication( - data: CreateApplicationData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createApplication( + options: Options, + ) { + return (options.client ?? client).post< + CreateApplicationResponses, + CreateApplicationErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get application - * Gets an application given the application's ID. + * Delete application + * + * Delete a client / application. * *
- * read:applications + * delete:applications *
* - * @param data The data for the request. - * @param data.applicationId The identifier for the application. - * @returns get_application_response Application successfully retrieved. - * @throws ApiError */ - public static getApplication( - data: GetApplicationData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteApplication( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteApplicationResponses, + DeleteApplicationErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}", - path: { - application_id: data.applicationId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Update Application - * Updates a client's settings. For more information, read [Applications in Kinde](https://docs.kinde.com/build/applications/about-applications) + * Get application + * + * Gets an application given the application's ID. * *
- * update:applications + * read:applications *
* - * @param data The data for the request. - * @param data.applicationId The identifier for the application. - * @param data.requestBody Application details. - * @returns unknown Application successfully updated. - * @throws ApiError */ - public static updateApplication( - data: UpdateApplicationData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static getApplication( + options: Options, + ) { + return (options.client ?? client).get< + GetApplicationResponses, + GetApplicationErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}", - path: { - application_id: data.applicationId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete application - * Delete a client / application. + * Update Application + * + * Updates a client's settings. For more information, read [Applications in Kinde](https://docs.kinde.com/build/applications/about-applications) * *
- * delete:applications + * update:applications *
* - * @param data The data for the request. - * @param data.applicationId The identifier for the application. - * @returns success_response Application successfully deleted. - * @throws ApiError */ - public static deleteApplication( - data: DeleteApplicationData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static updateApplication( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateApplicationResponses, + UpdateApplicationErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}", - path: { - application_id: data.applicationId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Get connections + * * Gets all connections for an application. * *
* read:application_connections *
* - * @param data The data for the request. - * @param data.applicationId The identifier/client ID for the application. - * @returns get_connections_response Application connections successfully retrieved. - * @throws ApiError */ - public static getApplicationConnections( - data: GetApplicationConnectionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getApplicationConnections( + options: Options, + ) { + return (options.client ?? client).get< + GetApplicationConnectionsResponses, + GetApplicationConnectionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}/connections", - path: { - application_id: data.applicationId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Enable connection - * Enable an auth connection for an application. + * Remove connection + * + * Turn off an auth connection for an application * *
- * create:application_connections + * delete:application_connections *
* - * @param data The data for the request. - * @param data.applicationId The identifier/client ID for the application. - * @param data.connectionId The identifier for the connection. - * @returns unknown Connection successfully enabled. - * @throws ApiError */ - public static enableConnection( - data: EnableConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static removeConnection( + options: Options, + ) { + return (options.client ?? client).delete< + RemoveConnectionResponses, + RemoveConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}/connections/{connection_id}", - path: { - application_id: data.applicationId, - connection_id: data.connectionId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Remove connection - * Turn off an auth connection for an application + * Enable connection + * + * Enable an auth connection for an application. * *
- * delete:application_connections + * create:application_connections *
* - * @param data The data for the request. - * @param data.applicationId The identifier/client ID for the application. - * @param data.connectionId The identifier for the connection. - * @returns success_response Connection successfully removed. - * @throws ApiError */ - public static removeConnection( - data: RemoveConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static enableConnection( + options: Options, + ) { + return (options.client ?? client).post< + EnableConnectionResponses, + EnableConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}/connections/{connection_id}", - path: { - application_id: data.applicationId, - connection_id: data.connectionId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Get property values + * * Gets properties for an application by client ID. * *
* read:application_properties *
* - * @param data The data for the request. - * @param data.applicationId The application's ID / client ID. - * @returns get_property_values_response Properties successfully retrieved. - * @throws ApiError */ - public static getApplicationPropertyValues( - data: GetApplicationPropertyValuesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getApplicationPropertyValues< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).get< + GetApplicationPropertyValuesResponses, + GetApplicationPropertyValuesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}/properties", - path: { - application_id: data.applicationId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Update property + * * Update application property value. * *
* update:application_properties *
* - * @param data The data for the request. - * @param data.requestBody - * @param data.applicationId The application's ID / client ID. - * @param data.propertyKey The property's key. - * @returns success_response Property successfully updated - * @throws ApiError */ - public static updateApplicationsProperty( - data: UpdateApplicationsPropertyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static updateApplicationsProperty< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).put< + UpdateApplicationsPropertyResponses, + UpdateApplicationsPropertyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}/properties/{property_key}", - path: { - application_id: data.applicationId, - property_key: data.propertyKey, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Update application tokens + * * Configure tokens for an application. *
* update:application_tokens *
* - * @param data The data for the request. - * @param data.applicationId The identifier/client ID for the application. - * @param data.requestBody Application tokens. - * @returns success_response Application tokens successfully updated. - * @throws ApiError */ - public static updateApplicationTokens( - data: UpdateApplicationTokensData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateApplicationTokens( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateApplicationTokensResponses, + UpdateApplicationTokensErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{application_id}/tokens", - path: { - application_id: data.applicationId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } } +export class BillingEntitlements { + /** + * Get billing entitlements + * + * Returns all the entitlements a billing customer currently has access to + * + *
+ * read:billing_entitlements + *
+ * + */ + public static getBillingEntitlements( + options: Options, + ) { + return (options.client ?? client).get< + GetBillingEntitlementsResponses, + GetBillingEntitlementsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/billing/entitlements", + ...options, + }); + } +} + export class BillingAgreements { /** * Get billing agreements + * * Returns all the agreements a billing customer currently has access to * *
* read:billing_agreements *
* - * @param data The data for the request. - * @param data.customerId The ID of the billing customer to retrieve agreements for - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.startingAfter The ID of the billing agreement to start after. - * @param data.endingBefore The ID of the billing agreement to end before. - * @param data.featureCode The feature code to filter by agreements only containing that feature - * @returns get_billing_agreements_response Billing agreements successfully retrieved. - * @throws ApiError - */ - public static getBillingAgreements( - data: GetBillingAgreementsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + */ + public static getBillingAgreements( + options: Options, + ) { + return (options.client ?? client).get< + GetBillingAgreementsResponses, + GetBillingAgreementsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/billing/agreements", - query: { - page_size: data.pageSize, - starting_after: data.startingAfter, - ending_before: data.endingBefore, - customer_id: data.customerId, - feature_code: data.featureCode, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Create billing agreement + * * Creates a new billing agreement based on the plan code passed, and cancels the customer's existing agreements * *
* create:billing_agreements *
* - * @param data The data for the request. - * @param data.requestBody New agreement request values - * @returns success_response Billing agreement successfully changed - * @throws ApiError */ - public static createBillingAgreement( - data: CreateBillingAgreementData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createBillingAgreement( + options: Options, + ) { + return (options.client ?? client).post< + CreateBillingAgreementResponses, + CreateBillingAgreementErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/billing/agreements", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } } -export class BillingEntitlements { +export class BillingMeterUsage { /** - * Get billing entitlements - * Returns all the entitlements a billing customer currently has access to + * Create meter usage record + * + * Create a new meter usage record + * + *
+ * create:meter_usage + *
+ * + */ + public static createMeterUsageRecord( + options: Options, + ) { + return (options.client ?? client).post< + CreateMeterUsageRecordResponses, + CreateMeterUsageRecordErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/billing/meter_usage", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); + } +} + +export class Business { + /** + * Get business + * + * Get your business details. + * + *
+ * read:businesses + *
+ * + */ + public static getBusiness( + options?: Options, + ) { + return (options?.client ?? client).get< + GetBusinessResponses, + GetBusinessErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/business", + ...options, + }); + } + + /** + * Update business + * + * Update your business details. * *
- * read:billing_entitlements + * update:businesses *
* - * @param data The data for the request. - * @param data.customerId The ID of the billing customer to retrieve entitlements for - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.startingAfter The ID of the billing entitlement to start after. - * @param data.endingBefore The ID of the billing entitlement to end before. - * @param data.maxValue When the maximum limit of an entitlement is null, this value is returned as the maximum limit - * @param data.expand Additional plan data to include in the response. Allowed value: "plans". - * @returns get_billing_entitlements_response Billing entitlements successfully retrieved. - * @throws ApiError - */ - public static getBillingEntitlements( - data: GetBillingEntitlementsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/v1/billing/entitlements", - query: { - page_size: data.pageSize, - starting_after: data.startingAfter, - ending_before: data.endingBefore, - customer_id: data.customerId, - max_value: data.maxValue, - expand: data.expand, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + */ + public static updateBusiness( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateBusinessResponses, + UpdateBusinessErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/business", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } } -export class BillingMeterUsage { +export class Industries { /** - * Create meter usage record - * Create a new meter usage record + * Get industries + * + * Get a list of industries and associated industry keys. * *
- * create:meter_usage + * read:industries *
* - * @param data The data for the request. - * @param data.requestBody Meter usage record - * @returns create_meter_usage_record_response Meter usage record successfully created. - * @throws ApiError */ - public static createMeterUsageRecord( - data: CreateMeterUsageRecordData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/v1/billing/meter_usage", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + public static getIndustries( + options?: Options, + ) { + return (options?.client ?? client).get< + GetIndustriesResponses, + GetIndustriesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/industries", + ...options, }); } } -export class Business { +export class Timezones { /** - * Get business - * Get your business details. + * Get timezones + * + * Get a list of timezones and associated timezone keys. * *
- * read:businesses + * read:timezones *
* - * @returns get_business_response Your business details. - * @throws ApiError */ - public static getBusiness(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/v1/business", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + public static getTimezones( + options?: Options, + ) { + return (options?.client ?? client).get< + GetTimezonesResponses, + GetTimezonesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/timezones", + ...options, }); } +} +export class Callbacks { /** - * Update business - * Update your business details. + * Delete Callback URLs + * + * Delete callback URLs. * *
- * update:businesses + * delete:applications_redirect_uris *
* - * @param data The data for the request. - * @param data.requestBody The business details to update. - * @returns success_response Business successfully updated. - * @throws ApiError */ - public static updateBusiness( - data: UpdateBusinessData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", - url: "/api/v1/business", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + public static deleteCallbackUrls( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteCallbackUrlsResponses, + DeleteCallbackUrlsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/applications/{app_id}/auth_redirect_urls", + ...options, }); } -} -export class Callbacks { /** * List Callback URLs + * * Returns an application's redirect callback URLs. * *
* read:applications_redirect_uris *
* - * @param data The data for the request. - * @param data.appId The identifier for the application. - * @returns redirect_callback_urls Callback URLs successfully retrieved. - * @throws ApiError */ - public static getCallbackUrls( - data: GetCallbackUrlsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getCallbackUrls( + options: Options, + ) { + return (options.client ?? client).get< + GetCallbackUrlsResponses, + GetCallbackUrlsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{app_id}/auth_redirect_urls", - path: { - app_id: data.appId, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Add Redirect Callback URLs + * * Add additional redirect callback URLs. * *
* create:applications_redirect_uris *
* - * @param data The data for the request. - * @param data.appId The identifier for the application. - * @param data.requestBody Callback details. - * @returns success_response Callbacks successfully updated - * @throws ApiError */ - public static addRedirectCallbackUrls( - data: AddRedirectCallbackUrlsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static addRedirectCallbackUrls( + options: Options, + ) { + return (options.client ?? client).post< + AddRedirectCallbackUrlsResponses, + AddRedirectCallbackUrlsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{app_id}/auth_redirect_urls", - path: { - app_id: data.appId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Replace Redirect Callback URLs + * * Replace all redirect callback URLs. * *
* update:applications_redirect_uris *
* - * @param data The data for the request. - * @param data.appId The identifier for the application. - * @param data.requestBody Callback details. - * @returns success_response Callbacks successfully updated - * @throws ApiError */ - public static replaceRedirectCallbackUrls( - data: ReplaceRedirectCallbackUrlsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static replaceRedirectCallbackUrls< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).put< + ReplaceRedirectCallbackUrlsResponses, + ReplaceRedirectCallbackUrlsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{app_id}/auth_redirect_urls", - path: { - app_id: data.appId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Delete Callback URLs - * Delete callback URLs. + * Delete Logout URLs + * + * Delete logout URLs. * *
- * delete:applications_redirect_uris + * delete:application_logout_uris *
* - * @param data The data for the request. - * @param data.appId The identifier for the application. - * @param data.urls Urls to delete, comma separated and url encoded. - * @returns success_response Callback URLs successfully deleted. - * @throws ApiError */ - public static deleteCallbackUrls( - data: DeleteCallbackUrlsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", - url: "/api/v1/applications/{app_id}/auth_redirect_urls", - path: { - app_id: data.appId, - }, - query: { - urls: data.urls, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + public static deleteLogoutUrls( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteLogoutUrlsResponses, + DeleteLogoutUrlsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/applications/{app_id}/auth_logout_urls", + ...options, }); } /** * List logout URLs + * * Returns an application's logout redirect URLs. * *
* read:application_logout_uris *
* - * @param data The data for the request. - * @param data.appId The identifier for the application. - * @returns logout_redirect_urls Logout URLs successfully retrieved. - * @throws ApiError */ - public static getLogoutUrls( - data: GetLogoutUrlsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getLogoutUrls( + options: Options, + ) { + return (options.client ?? client).get< + GetLogoutUrlsResponses, + GetLogoutUrlsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{app_id}/auth_logout_urls", - path: { - app_id: data.appId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Add logout redirect URLs + * * Add additional logout redirect URLs. * *
* create:application_logout_uris *
* - * @param data The data for the request. - * @param data.appId The identifier for the application. - * @param data.requestBody Callback details. - * @returns success_response Logout URLs successfully updated. - * @throws ApiError */ - public static addLogoutRedirectUrls( - data: AddLogoutRedirectUrlsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static addLogoutRedirectUrls( + options: Options, + ) { + return (options.client ?? client).post< + AddLogoutRedirectUrlsResponses, + AddLogoutRedirectUrlsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{app_id}/auth_logout_urls", - path: { - app_id: data.appId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Replace logout redirect URls + * * Replace all logout redirect URLs. * *
* update:application_logout_uris *
* - * @param data The data for the request. - * @param data.appId The identifier for the application. - * @param data.requestBody Callback details. - * @returns success_response Logout URLs successfully updated. - * @throws ApiError - */ - public static replaceLogoutRedirectUrls( - data: ReplaceLogoutRedirectUrlsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/v1/applications/{app_id}/auth_logout_urls", - path: { - app_id: data.appId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, - }); - } - - /** - * Delete Logout URLs - * Delete logout URLs. - * - *
- * delete:application_logout_uris - *
- * - * @param data The data for the request. - * @param data.appId The identifier for the application. - * @param data.urls Urls to delete, comma separated and url encoded. - * @returns success_response Logout URLs successfully deleted. - * @throws ApiError */ - public static deleteLogoutUrls( - data: DeleteLogoutUrlsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static replaceLogoutRedirectUrls( + options: Options, + ) { + return (options.client ?? client).put< + ReplaceLogoutRedirectUrlsResponses, + ReplaceLogoutRedirectUrlsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/applications/{app_id}/auth_logout_urls", - path: { - app_id: data.appId, - }, - query: { - urls: data.urls, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -1713,99 +1701,73 @@ export class Callbacks { export class ConnectedApps { /** * Get Connected App URL + * * Get a URL that authenticates and authorizes a user to a third-party connected app. * *
* read:connected_apps *
* - * @param data The data for the request. - * @param data.keyCodeRef The unique key code reference of the connected app to authenticate against. - * @param data.userId The id of the user that needs to authenticate to the third-party connected app. - * @param data.orgCode The code of the Kinde organization that needs to authenticate to the third-party connected app. - * @param data.overrideCallbackUrl A URL that overrides the default callback URL setup in your connected app configuration - * @returns connected_apps_auth_url A URL that can be used to authenticate and a session id to identify this authentication session. - * @throws ApiError */ - public static getConnectedAppAuthUrl( - data: GetConnectedAppAuthUrlData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getConnectedAppAuthUrl( + options: Options, + ) { + return (options.client ?? client).get< + GetConnectedAppAuthUrlResponses, + GetConnectedAppAuthUrlErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connected_apps/auth_url", - query: { - key_code_ref: data.keyCodeRef, - user_id: data.userId, - org_code: data.orgCode, - override_callback_url: data.overrideCallbackUrl, - }, - errors: { - 400: "Error retrieving connected app auth url.", - 403: "Invalid credentials.", - 404: "Error retrieving connected app auth url.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Get Connected App Token + * * Get an access token that can be used to call the third-party provider linked to the connected app. * *
* read:connected_apps *
* - * @param data The data for the request. - * @param data.sessionId The unique sesssion id representing the login session of a user. - * @returns connected_apps_access_token An access token that can be used to query a third-party provider, as well as the token's expiry time. - * @throws ApiError */ - public static getConnectedAppToken( - data: GetConnectedAppTokenData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getConnectedAppToken( + options: Options, + ) { + return (options.client ?? client).get< + GetConnectedAppTokenResponses, + GetConnectedAppTokenErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connected_apps/token", - query: { - session_id: data.sessionId, - }, - errors: { - 400: "The session id provided points to an invalid session.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Revoke Connected App Token + * * Revoke the tokens linked to the connected app session. * *
* create:connected_apps *
* - * @param data The data for the request. - * @param data.sessionId The unique sesssion id representing the login session of a user. - * @returns success_response An access token that can be used to query a third-party provider, as well as the token's expiry time. - * @throws ApiError */ - public static revokeConnectedAppToken( - data: RevokeConnectedAppTokenData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static revokeConnectedAppToken( + options: Options, + ) { + return (options.client ?? client).post< + RevokeConnectedAppTokenResponses, + RevokeConnectedAppTokenErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connected_apps/revoke", - query: { - session_id: data.sessionId, - }, - errors: { - 400: "Bad request.", - 403: "Invalid credentials.", - 405: "Invalid HTTP method used.", - 429: "Request was throttled.", - }, + ...options, }); } } @@ -1813,194 +1775,156 @@ export class ConnectedApps { export class Connections { /** * Get connections + * * Returns a list of authentication connections. Optionally you can filter this by a home realm domain. * *
* read:connections *
* - * @param data The data for the request. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.homeRealmDomain Filter the results by the home realm domain. - * @param data.startingAfter The ID of the connection to start after. - * @param data.endingBefore The ID of the connection to end before. - * @returns get_connections_response Connections successfully retrieved. - * @throws ApiError */ - public static getConnections( - data: GetConnectionsData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getConnections( + options?: Options, + ) { + return (options?.client ?? client).get< + GetConnectionsResponses, + GetConnectionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connections", - query: { - page_size: data.pageSize, - home_realm_domain: data.homeRealmDomain, - starting_after: data.startingAfter, - ending_before: data.endingBefore, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Create Connection + * * Create Connection. * *
* create:connections *
* - * @param data The data for the request. - * @param data.requestBody Connection details. - * @returns create_connection_response Connection successfully created. - * @throws ApiError */ - public static createConnection( - data: CreateConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createConnection( + options: Options, + ) { + return (options.client ?? client).post< + CreateConnectionResponses, + CreateConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connections", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get Connection - * Get Connection. + * Delete Connection + * + * Delete connection. * *
- * read:connections + * delete:connections *
* - * @param data The data for the request. - * @param data.connectionId The unique identifier for the connection. - * @returns connection Connection successfully retrieved. - * @throws ApiError */ - public static getConnection( - data: GetConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteConnection( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteConnectionResponses, + DeleteConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connections/{connection_id}", - path: { - connection_id: data.connectionId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Update Connection - * Update Connection. + * Get Connection + * + * Get Connection. * *
- * update:connections + * read:connections *
* - * @param data The data for the request. - * @param data.connectionId The unique identifier for the connection. - * @param data.requestBody The fields of the connection to update. - * @returns success_response Connection successfully updated. - * @throws ApiError */ - public static updateConnection( - data: UpdateConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static getConnection( + options: Options, + ) { + return (options.client ?? client).get< + GetConnectionResponses, + GetConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connections/{connection_id}", - path: { - connection_id: data.connectionId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Replace Connection - * Replace Connection Config. + * Update Connection + * + * Update Connection. * *
* update:connections *
* - * @param data The data for the request. - * @param data.connectionId The unique identifier for the connection. - * @param data.requestBody The complete connection configuration to replace the existing one. - * @returns success_response Connection successfully updated - * @throws ApiError */ - public static replaceConnection( - data: ReplaceConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static updateConnection( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateConnectionResponses, + UpdateConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connections/{connection_id}", - path: { - connection_id: data.connectionId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Delete Connection - * Delete connection. + * Replace Connection + * + * Replace Connection Config. * *
- * delete:connections + * update:connections *
* - * @param data The data for the request. - * @param data.connectionId The identifier for the connection. - * @returns success_response Connection successfully deleted. - * @throws ApiError */ - public static deleteConnection( - data: DeleteConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static replaceConnection( + options: Options, + ) { + return (options.client ?? client).put< + ReplaceConnectionResponses, + ReplaceConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/connections/{connection_id}", - path: { - connection_id: data.connectionId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -2009,156 +1933,124 @@ export class Connections { export class Directories { /** * Get SCIM directories + * * Returns a list of SCIM directories for your organization. * *
* read:scim_directories *
* - * @param data The data for the request. - * @param data.pageSize Number of results per page. Defaults to 50 if parameter not sent. - * @param data.startingAfter The ID of the directory to start after. - * @param data.organizationCode Filter by organization code to get directories for a specific organization. - * @returns get_directories_response SCIM directories successfully retrieved. - * @throws ApiError */ - public static getDirectories( - data: GetDirectoriesData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getDirectories( + options?: Options, + ) { + return (options?.client ?? client).get< + GetDirectoriesResponses, + GetDirectoriesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/directories", - query: { - page_size: data.pageSize, - starting_after: data.startingAfter, - organization_code: data.organizationCode, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create SCIM directory + * * Create a new SCIM directory for user and group synchronization. * *
* create:scim_directories *
* - * @param data The data for the request. - * @param data.requestBody - * @returns create_directory_response SCIM directory successfully created. - * @throws ApiError */ - public static createDirectory( - data: CreateDirectoryData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createDirectory( + options: Options, + ) { + return (options.client ?? client).post< + CreateDirectoryResponses, + CreateDirectoryErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/directories", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 409: "Conflict - Directory already exists.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get SCIM directory - * Retrieve SCIM directory details by ID. + * Delete SCIM directory + * + * Delete a SCIM directory and all associated data. * *
- * read:scim_directories + * delete:scim_directories *
* - * @param data The data for the request. - * @param data.directoryId The directory's ID. - * @returns get_directory_response SCIM directory successfully retrieved. - * @throws ApiError */ - public static getDirectory( - data: GetDirectoryData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteDirectory( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteDirectoryResponses, + DeleteDirectoryErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/directories/{directory_id}", - path: { - directory_id: data.directoryId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Update SCIM directory - * Update SCIM directory configuration. + * Get SCIM directory + * + * Retrieve SCIM directory details by ID. + * + *
+ * read:scim_directories + *
* - * @param data The data for the request. - * @param data.requestBody - * @param data.directoryId The directory's ID. - * @returns update_directory_response SCIM directory successfully updated. - * @throws ApiError - */ - public static updateDirectory( - data: UpdateDirectoryData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + */ + public static getDirectory( + options: Options, + ) { + return (options.client ?? client).get< + GetDirectoryResponses, + GetDirectoryErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/directories/{directory_id}", - path: { - directory_id: data.directoryId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete SCIM directory - * Delete a SCIM directory and all associated data. + * Update SCIM directory * - *
- * delete:scim_directories - *
+ * Update SCIM directory configuration. * - * @param data The data for the request. - * @param data.directoryId The directory's ID. - * @returns delete_directory_response SCIM directory successfully deleted. - * @throws ApiError */ - public static deleteDirectory( - data: DeleteDirectoryData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static updateDirectory( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateDirectoryResponses, + UpdateDirectoryErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/directories/{directory_id}", - path: { - directory_id: data.directoryId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -2167,217 +2059,203 @@ export class Directories { export class Environments { /** * Get environment + * * Gets the current environment. * *
* read:environments *
* - * @returns get_environment_response Environment successfully retrieved. - * @throws ApiError */ - public static getEnvironment(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getEnvironment( + options?: Options, + ) { + return (options?.client ?? client).get< + GetEnvironmentResponses, + GetEnvironmentErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Delete Environment Feature Flag Overrides + * * Delete all environment feature flag overrides. * *
* delete:environment_feature_flags *
* - * @returns success_response Feature flag overrides deleted successfully. - * @throws ApiError */ - public static deleteEnvironementFeatureFlagOverrides(): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteEnvironementFeatureFlagOverrides< + ThrowOnError extends boolean = false, + >( + options?: Options, + ) { + return (options?.client ?? client).delete< + DeleteEnvironementFeatureFlagOverridesResponses, + DeleteEnvironementFeatureFlagOverridesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment/feature_flags", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * List Environment Feature Flags + * * Get environment feature flags. * *
* read:environment_feature_flags *
* - * @returns get_environment_feature_flags_response Feature flags retrieved successfully. - * @throws ApiError */ - public static getEnvironementFeatureFlags(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getEnvironementFeatureFlags< + ThrowOnError extends boolean = false, + >(options?: Options) { + return (options?.client ?? client).get< + GetEnvironementFeatureFlagsResponses, + GetEnvironementFeatureFlagsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment/feature_flags", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Delete Environment Feature Flag Override + * * Delete environment feature flag override. * *
* delete:environment_feature_flags *
* - * @param data The data for the request. - * @param data.featureFlagKey The identifier for the feature flag. - * @returns success_response Feature flag deleted successfully. - * @throws ApiError */ - public static deleteEnvironementFeatureFlagOverride( - data: DeleteEnvironementFeatureFlagOverrideData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteEnvironementFeatureFlagOverride< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).delete< + DeleteEnvironementFeatureFlagOverrideResponses, + DeleteEnvironementFeatureFlagOverrideErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment/feature_flags/{feature_flag_key}", - path: { - feature_flag_key: data.featureFlagKey, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Update Environment Feature Flag Override + * * Update environment feature flag override. * *
* update:environment_feature_flags *
* - * @param data The data for the request. - * @param data.featureFlagKey The identifier for the feature flag. - * @param data.requestBody Flag details. - * @returns success_response Feature flag override successful - * @throws ApiError */ - public static updateEnvironementFeatureFlagOverride( - data: UpdateEnvironementFeatureFlagOverrideData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateEnvironementFeatureFlagOverride< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).patch< + UpdateEnvironementFeatureFlagOverrideResponses, + UpdateEnvironementFeatureFlagOverrideErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment/feature_flags/{feature_flag_key}", - path: { - feature_flag_key: data.featureFlagKey, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Read logo details + * * Read environment logo details * *
* read:environments *
* - * @returns read_env_logo_response Success - * @throws ApiError */ - public static readLogo(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static readLogo( + options?: Options, + ) { + return (options?.client ?? client).get< + ReadLogoResponses, + ReadLogoErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment/logos", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Add logo - * Add environment logo + * Delete logo + * + * Delete environment logo * *
* update:environments *
* - * @param data The data for the request. - * @param data.type The type of logo to add. - * @param data.formData Logo details. - * @returns success_response Logo successfully updated - * @throws ApiError */ - public static addLogo(data: AddLogoData): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static deleteLogo( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteLogoResponses, + DeleteLogoErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment/logos/{type}", - path: { - type: data.type, - }, - formData: data.formData, - mediaType: "multipart/form-data", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete logo - * Delete environment logo + * Add logo + * + * Add environment logo * *
* update:environments *
* - * @param data The data for the request. - * @param data.type The type of logo to delete. - * @returns success_response Logo successfully deleted - * @returns void No logo found to delete - * @throws ApiError */ - public static deleteLogo( - data: DeleteLogoData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static addLogo( + options: Options, + ) { + return (options.client ?? client).put< + AddLogoResponses, + AddLogoErrors, + ThrowOnError + >({ + ...formDataBodySerializer, + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment/logos/{type}", - path: { - type: data.type, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": null, + ...options.headers, }, }); } @@ -2386,145 +2264,128 @@ export class Environments { export class EnvironmentVariables { /** * Get environment variables + * * Get environment variables. This feature is in beta and admin UI is not yet available. * *
* read:environment_variables *
* - * @returns get_environment_variables_response A successful response with a list of environment variables or an empty list. - * @throws ApiError */ - public static getEnvironmentVariables(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getEnvironmentVariables( + options?: Options, + ) { + return (options?.client ?? client).get< + GetEnvironmentVariablesResponses, + GetEnvironmentVariablesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment_variables", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create environment variable + * * Create a new environment variable. This feature is in beta and admin UI is not yet available. * *
* create:environment_variables *
* - * @param data The data for the request. - * @param data.requestBody The environment variable details. - * @returns create_environment_variable_response Environment variable successfully created. - * @throws ApiError */ - public static createEnvironmentVariable( - data: CreateEnvironmentVariableData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createEnvironmentVariable( + options: Options, + ) { + return (options.client ?? client).post< + CreateEnvironmentVariableResponses, + CreateEnvironmentVariableErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment_variables", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get environment variable - * Retrieve environment variable details by ID. This feature is in beta and admin UI is not yet available. + * Delete environment variable + * + * Delete an environment variable you previously created. This feature is in beta and admin UI is not yet available. * *
- * read:environment_variables + * delete:environment_variables *
* - * @param data The data for the request. - * @param data.variableId The environment variable's ID. - * @returns get_environment_variable_response Environment variable successfully retrieved. - * @throws ApiError */ - public static getEnvironmentVariable( - data: GetEnvironmentVariableData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteEnvironmentVariable( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteEnvironmentVariableResponses, + DeleteEnvironmentVariableErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment_variables/{variable_id}", - path: { - variable_id: data.variableId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Update environment variable - * Update an environment variable you previously created. This feature is in beta and admin UI is not yet available. + * Get environment variable + * + * Retrieve environment variable details by ID. This feature is in beta and admin UI is not yet available. * *
- * update:environment_variables + * read:environment_variables *
* - * @param data The data for the request. - * @param data.requestBody The new details for the environment variable - * @param data.variableId The environment variable's ID. - * @returns update_environment_variable_response Environment variable successfully updated. - * @throws ApiError */ - public static updateEnvironmentVariable( - data: UpdateEnvironmentVariableData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static getEnvironmentVariable( + options: Options, + ) { + return (options.client ?? client).get< + GetEnvironmentVariableResponses, + GetEnvironmentVariableErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment_variables/{variable_id}", - path: { - variable_id: data.variableId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete environment variable - * Delete an environment variable you previously created. This feature is in beta and admin UI is not yet available. + * Update environment variable + * + * Update an environment variable you previously created. This feature is in beta and admin UI is not yet available. * *
- * delete:environment_variables + * update:environment_variables *
* - * @param data The data for the request. - * @param data.variableId The environment variable's ID. - * @returns delete_environment_variable_response Environment variable successfully deleted. - * @throws ApiError */ - public static deleteEnvironmentVariable( - data: DeleteEnvironmentVariableData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static updateEnvironmentVariable( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateEnvironmentVariableResponses, + UpdateEnvironmentVariableErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/environment_variables/{variable_id}", - path: { - variable_id: data.variableId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -2533,252 +2394,154 @@ export class EnvironmentVariables { export class FeatureFlags { /** * Create Feature Flag + * * Create feature flag. * *
* create:feature_flags - *
- * - * @param data The data for the request. - * @param data.requestBody Flag details. - * @returns success_response Feature flag successfully created - * @throws ApiError - */ - public static createFeatureFlag( - data: CreateFeatureFlagData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/v1/feature_flags", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, - }); - } - - /** - * Delete Feature Flag - * Delete feature flag - * - *
- * delete:feature_flags - *
- * - * @param data The data for the request. - * @param data.featureFlagKey The identifier for the feature flag. - * @returns success_response Feature flag successfully updated. - * @throws ApiError - */ - public static deleteFeatureFlag( - data: DeleteFeatureFlagData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", - url: "/api/v1/feature_flags/{feature_flag_key}", - path: { - feature_flag_key: data.featureFlagKey, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, - }); - } - - /** - * Replace Feature Flag - * Update feature flag. - * - *
- * update:feature_flags - *
- * - * @param data The data for the request. - * @param data.featureFlagKey The key identifier for the feature flag. - * @param data.name The name of the flag. - * @param data.description Description of the flag purpose. - * @param data.type The variable type - * @param data.allowOverrideLevel Allow the flag to be overridden at a different level. - * @param data.defaultValue Default value for the flag used by environments and organizations. - * @returns success_response Feature flag successfully updated. - * @throws ApiError - */ - public static updateFeatureFlag( - data: UpdateFeatureFlagData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/v1/feature_flags/{feature_flag_key}", - path: { - feature_flag_key: data.featureFlagKey, - }, - query: { - name: data.name, - description: data.description, - type: data.type, - allow_override_level: data.allowOverrideLevel, - default_value: data.defaultValue, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + * + * + */ + public static createFeatureFlag( + options: Options, + ) { + return (options.client ?? client).post< + CreateFeatureFlagResponses, + CreateFeatureFlagErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/feature_flags", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } -} -export class Identities { /** - * Get identity - * Returns an identity by ID + * Delete Feature Flag + * + * Delete feature flag * *
- * read:identities + * delete:feature_flags *
* - * @param data The data for the request. - * @param data.identityId The unique identifier for the identity. - * @returns identity Identity successfully retrieved. - * @throws ApiError */ - public static getIdentity( - data: GetIdentityData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/v1/identities/{identity_id}", - path: { - identity_id: data.identityId, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + public static deleteFeatureFlag( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteFeatureFlagResponses, + DeleteFeatureFlagErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/feature_flags/{feature_flag_key}", + ...options, }); } /** - * Update identity - * Update identity by ID. + * Replace Feature Flag + * + * Update feature flag. * *
- * update:identities + * update:feature_flags *
* - * @param data The data for the request. - * @param data.identityId The unique identifier for the identity. - * @param data.requestBody The fields of the identity to update. - * @returns success_response Identity successfully updated. - * @throws ApiError */ - public static updateIdentity( - data: UpdateIdentityData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", - url: "/api/v1/identities/{identity_id}", - path: { - identity_id: data.identityId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + public static updateFeatureFlag( + options: Options, + ) { + return (options.client ?? client).put< + UpdateFeatureFlagResponses, + UpdateFeatureFlagErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/feature_flags/{feature_flag_key}", + ...options, }); } +} +export class Identities { /** * Delete identity + * * Delete identity by ID. * *
* delete:identities *
* - * @param data The data for the request. - * @param data.identityId The unique identifier for the identity. - * @returns success_response Identity successfully deleted. - * @throws ApiError */ - public static deleteIdentity( - data: DeleteIdentityData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteIdentity( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteIdentityResponses, + DeleteIdentityErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/identities/{identity_id}", - path: { - identity_id: data.identityId, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } -} -export class Industries { /** - * Get industries - * Get a list of industries and associated industry keys. + * Get identity + * + * Returns an identity by ID * *
- * read:industries + * read:identities *
* - * @returns get_industries_response A list of industries. - * @throws ApiError */ - public static getIndustries(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/v1/industries", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + public static getIdentity( + options: Options, + ) { + return (options.client ?? client).get< + GetIdentityResponses, + GetIdentityErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/identities/{identity_id}", + ...options, }); } -} -export class Mfa { /** - * Replace MFA Configuration - * Replace MFA Configuration. + * Update identity + * + * Update identity by ID. * *
- * update:mfa + * update:identities *
* - * @param data The data for the request. - * @param data.requestBody MFA details. - * @returns success_response MFA Configuration updated successfully. - * @throws ApiError */ - public static replaceMfa( - data: ReplaceMfaData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/v1/mfa", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + public static updateIdentity( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateIdentityResponses, + UpdateIdentityErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/identities/{identity_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -2787,48 +2550,31 @@ export class Mfa { export class Organizations { /** * Get organization invites + * * Get a list of invitations for an organization. By default, only pending (non-revoked, non-accepted) invitations are returned. * *
* read:organization_invites *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.sort Field and order to sort the result by. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.nextToken A string to get the next page of results if there are more results. - * @param data.includeRevoked Include revoked invitations in the results. - * @param data.includeAccepted Include accepted invitations in the results. - * @returns get_organization_invites_response Invitations successfully retrieved. - * @throws ApiError - */ - public static getOrganizationInvites( - data: GetOrganizationInvitesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + */ + public static getOrganizationInvites( + options: Options, + ) { + return (options.client ?? client).get< + GetOrganizationInvitesResponses, + GetOrganizationInvitesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization/{org_code}/invites", - path: { - org_code: data.orgCode, - }, - query: { - sort: data.sort, - page_size: data.pageSize, - next_token: data.nextToken, - include_revoked: data.includeRevoked, - include_accepted: data.includeAccepted, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create organization invite + * * Create a new invitation for an organization. An invitation email will be sent to the provided email address if `send_email` is set to `true`. * * Invitations cannot be created for organizations that are managed by directory sync; user and role changes for those organizations must be made in the upstream identity provider. @@ -2841,1286 +2587,1006 @@ export class Organizations { * create:organization_invites * * - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.requestBody Invitation details. `email` is capped at 254 characters (RFC 5321). `first_name` and `last_name` are capped at 64 characters each. Inputs over these limits are rejected with `EMAIL_TOO_LONG`, `FIRST_NAME_TOO_LONG`, or `LAST_NAME_TOO_LONG`. - * @returns create_organization_invite_response Invitation successfully created. - * @throws ApiError */ - public static createOrganizationInvite( - data: CreateOrganizationInviteData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createOrganizationInvite( + options: Options, + ) { + return (options.client ?? client).post< + CreateOrganizationInviteResponses, + CreateOrganizationInviteErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization/{org_code}/invites", - path: { - org_code: data.orgCode, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get organization invite - * Get details of a specific invitation by its code. + * Delete organization invite + * + * Revoke (delete) an invitation. This will mark the invitation as revoked and prevent it from being accepted. * *
- * read:organization_invites + * delete:organization_invites *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.inviteCode The invitation's code. - * @returns get_organization_invite_response Invitation successfully retrieved. - * @throws ApiError */ - public static getOrganizationInvite( - data: GetOrganizationInviteData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteOrganizationInvite( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteOrganizationInviteResponses, + DeleteOrganizationInviteErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization/{org_code}/invites/{invite_code}", - path: { - org_code: data.orgCode, - invite_code: data.inviteCode, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete organization invite - * Revoke (delete) an invitation. This will mark the invitation as revoked and prevent it from being accepted. + * Get organization invite + * + * Get details of a specific invitation by its code. * *
- * delete:organization_invites + * read:organization_invites *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.inviteCode The invitation's code. - * @returns success_response Invitation successfully revoked. - * @throws ApiError */ - public static deleteOrganizationInvite( - data: DeleteOrganizationInviteData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static getOrganizationInvite( + options: Options, + ) { + return (options.client ?? client).get< + GetOrganizationInviteResponses, + GetOrganizationInviteErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization/{org_code}/invites/{invite_code}", - path: { - org_code: data.orgCode, - invite_code: data.inviteCode, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Get organization + * * Retrieve organization details by code. * *
* read:organizations *
* - * @param data The data for the request. - * @param data.code The organization's code. - * @param data.expand Additional data to include in the response. Allowed value: "billing". - * @returns get_organization_response Organization successfully retrieved. - * @throws ApiError */ - public static getOrganization( - data: GetOrganizationData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getOrganization( + options?: Options, + ) { + return (options?.client ?? client).get< + GetOrganizationResponses, + GetOrganizationErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization", - query: { - code: data.code, - expand: data.expand, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create organization + * * Create a new organization. To learn more read about [multi tenancy using organizations](https://docs.kinde.com/build/organizations/multi-tenancy-using-organizations/) * *
* create:organizations *
* - * @param data The data for the request. - * @param data.requestBody Organization details. - * @returns create_organization_response Organization successfully created. - * @throws ApiError */ - public static createOrganization( - data: CreateOrganizationData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createOrganization( + options: Options, + ) { + return (options.client ?? client).post< + CreateOrganizationResponses, + CreateOrganizationErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Get organizations + * * Get a list of organizations. * *
* read:organizations *
* - * @param data The data for the request. - * @param data.sort Field and order to sort the result by. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.nextToken A string to get the next page of results if there are more results. - * @returns get_organizations_response Organizations successfully retreived. - * @throws ApiError */ - public static getOrganizations( - data: GetOrganizationsData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getOrganizations( + options?: Options, + ) { + return (options?.client ?? client).get< + GetOrganizationsResponses, + GetOrganizationsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations", - query: { - sort: data.sort, - page_size: data.pageSize, - next_token: data.nextToken, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Update Organization - * Update an organization. + * Delete Organization + * + * Delete an organization. * *
- * update:organizations + * delete:organizations *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @param data.expand Additional data to include in the response. Allowed value: "billing". - * @param data.requestBody Organization details. - * @returns success_response Organization successfully updated. - * @throws ApiError */ - public static updateOrganization( - data: UpdateOrganizationData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static deleteOrganization( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteOrganizationResponses, + DeleteOrganizationErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization/{org_code}", - path: { - org_code: data.orgCode, - }, - query: { - expand: data.expand, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete Organization - * Delete an organization. + * Update Organization + * + * Update an organization. * *
- * delete:organizations + * update:organizations *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @returns success_response Organization successfully deleted. - * @throws ApiError */ - public static deleteOrganization( - data: DeleteOrganizationData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static updateOrganization( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateOrganizationResponses, + UpdateOrganizationErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization/{org_code}", - path: { - org_code: data.orgCode, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Get organization users + * * Get user details for all members of an organization. * *
* read:organization_users *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.sort Field and order to sort the result by. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.nextToken A string to get the next page of results if there are more results. - * @param data.permissions Filter by user permissions comma separated (where all match) - * @param data.roles Filter by user roles comma separated (where all match) - * @returns get_organization_users_response A successful response with a list of organization users or an empty list. - * @throws ApiError - */ - public static getOrganizationUsers( - data: GetOrganizationUsersData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + */ + public static getOrganizationUsers( + options: Options, + ) { + return (options.client ?? client).get< + GetOrganizationUsersResponses, + GetOrganizationUsersErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users", - path: { - org_code: data.orgCode, - }, - query: { - sort: data.sort, - page_size: data.pageSize, - next_token: data.nextToken, - permissions: data.permissions, - roles: data.roles, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Add Organization Users - * Add existing users to an organization. + * Update Organization Users + * + * Update users that belong to an organization. * *
- * create:organization_users + * update:organization_users *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.requestBody - * @returns add_organization_users_response Add organization users request successfully processed. - * @throws ApiError */ - public static addOrganizationUsers( - data: AddOrganizationUsersData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static updateOrganizationUsers( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateOrganizationUsersResponses, + UpdateOrganizationUsersErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users", - path: { - org_code: data.orgCode, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Update Organization Users - * Update users that belong to an organization. + * Add Organization Users + * + * Add existing users to an organization. * *
- * update:organization_users + * create:organization_users *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.requestBody - * @returns update_organization_users_response Users successfully removed. - * @throws ApiError */ - public static updateOrganizationUsers( - data: UpdateOrganizationUsersData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static addOrganizationUsers( + options: Options, + ) { + return (options.client ?? client).post< + AddOrganizationUsersResponses, + AddOrganizationUsersErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users", - path: { - org_code: data.orgCode, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * List Organization User Roles + * * Get roles for an organization user. * *
* read:organization_user_roles *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.userId The user's id. - * @returns get_organizations_user_roles_response A successful response with a list of user roles. - * @throws ApiError */ - public static getOrganizationUserRoles( - data: GetOrganizationUserRolesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getOrganizationUserRoles( + options: Options, + ) { + return (options.client ?? client).get< + GetOrganizationUserRolesResponses, + GetOrganizationUserRolesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/roles", - path: { - org_code: data.orgCode, - user_id: data.userId, - }, - errors: { - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Add Organization User Role + * * Add role to an organization user. * *
* create:organization_user_roles *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.userId The user's id. - * @param data.requestBody Role details. - * @returns success_response Role successfully added. - * @throws ApiError */ - public static createOrganizationUserRole( - data: CreateOrganizationUserRoleData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createOrganizationUserRole< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).post< + CreateOrganizationUserRoleResponses, + CreateOrganizationUserRoleErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/roles", - path: { - org_code: data.orgCode, - user_id: data.userId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Delete Organization User Role + * * Delete role for an organization user. * *
* delete:organization_user_roles *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.userId The user's id. - * @param data.roleId The role id. - * @returns success_response User successfully removed. - * @throws ApiError */ - public static deleteOrganizationUserRole( - data: DeleteOrganizationUserRoleData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteOrganizationUserRole< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).delete< + DeleteOrganizationUserRoleResponses, + DeleteOrganizationUserRoleErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/roles/{role_id}", - path: { - org_code: data.orgCode, - user_id: data.userId, - role_id: data.roleId, - }, - errors: { - 400: "Error creating user.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * List Organization User Permissions + * * Get permissions for an organization user. * *
* read:organization_user_permissions *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.userId The user's id. - * @param data.expand Additional data to include in the response. Allowed value: "roles". - * @returns get_organizations_user_permissions_response A successful response with a list of user permissions. - * @throws ApiError */ - public static getOrganizationUserPermissions( - data: GetOrganizationUserPermissionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getOrganizationUserPermissions< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).get< + GetOrganizationUserPermissionsResponses, + GetOrganizationUserPermissionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/permissions", - path: { - org_code: data.orgCode, - user_id: data.userId, - }, - query: { - expand: data.expand, - }, - errors: { - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Add Organization User Permission + * * Add permission to an organization user. * *
* create:organization_user_permissions *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.userId The user's id. - * @param data.requestBody Permission details. - * @returns success_response User permission successfully updated. - * @throws ApiError */ - public static createOrganizationUserPermission( - data: CreateOrganizationUserPermissionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createOrganizationUserPermission< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).post< + CreateOrganizationUserPermissionResponses, + CreateOrganizationUserPermissionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/permissions", - path: { - org_code: data.orgCode, - user_id: data.userId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Delete Organization User Permission + * * Delete permission for an organization user. * *
* delete:organization_user_permissions *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.userId The user's id. - * @param data.permissionId The permission id. - * @returns success_response User successfully removed. - * @throws ApiError */ - public static deleteOrganizationUserPermission( - data: DeleteOrganizationUserPermissionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteOrganizationUserPermission< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).delete< + DeleteOrganizationUserPermissionResponses, + DeleteOrganizationUserPermissionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/permissions/{permission_id}", - path: { - org_code: data.orgCode, - user_id: data.userId, - permission_id: data.permissionId, - }, - errors: { - 400: "Error creating user.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Remove Organization User + * * Remove user from an organization. * *
* delete:organization_users *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.userId The user's id. - * @returns success_response User successfully removed from organization - * @throws ApiError */ - public static removeOrganizationUser( - data: RemoveOrganizationUserData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static removeOrganizationUser( + options: Options, + ) { + return (options.client ?? client).delete< + RemoveOrganizationUserResponses, + RemoveOrganizationUserErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}", - path: { - org_code: data.orgCode, - user_id: data.userId, - }, - errors: { - 400: "Error removing user", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** - * Add scope to organization user api - * Add a scope to an organization user api. + * Delete scope from organization user API + * + * Delete a scope from an organization user api you previously created. * *
- * create:organization_user_api_scopes + * delete:organization_user_api_scopes *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @param data.userId User ID - * @param data.apiId API ID - * @param data.scopeId Scope ID - * @returns unknown API scope successfully added to organization user api - * @throws ApiError */ - public static addOrganizationUserApiScope( - data: AddOrganizationUserApiScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static deleteOrganizationUserApiScope< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).delete< + DeleteOrganizationUserApiScopeResponses, + DeleteOrganizationUserApiScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/apis/{api_id}/scopes/{scope_id}", - path: { - org_code: data.orgCode, - user_id: data.userId, - api_id: data.apiId, - scope_id: data.scopeId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete scope from organization user API - * Delete a scope from an organization user api you previously created. + * Add scope to organization user api + * + * Add a scope to an organization user api. * *
- * delete:organization_user_api_scopes + * create:organization_user_api_scopes *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @param data.userId User ID - * @param data.apiId API ID - * @param data.scopeId Scope ID - * @returns unknown Organization user API scope successfully deleted. - * @throws ApiError */ - public static deleteOrganizationUserApiScope( - data: DeleteOrganizationUserApiScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static addOrganizationUserApiScope< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).post< + AddOrganizationUserApiScopeResponses, + AddOrganizationUserApiScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/apis/{api_id}/scopes/{scope_id}", - path: { - org_code: data.orgCode, - user_id: data.userId, - api_id: data.apiId, - scope_id: data.scopeId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Get an organization user's MFA configuration - * Get an organization user’s MFA configuration. + * Reset all organization MFA for a user + * + * Reset all organization MFA factors for a user. * *
- * read:organization_user_mfa + * delete:organization_user_mfa *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @param data.userId The identifier for the user - * @returns get_user_mfa_response Successfully retrieve user's MFA configuration. - * @throws ApiError */ - public static getOrgUserMfa( - data: GetOrgUserMfaData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static resetOrgUserMfaAll( + options: Options, + ) { + return (options.client ?? client).delete< + ResetOrgUserMfaAllResponses, + ResetOrgUserMfaAllErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/mfa", - path: { - org_code: data.orgCode, - user_id: data.userId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Reset all organization MFA for a user - * Reset all organization MFA factors for a user. + * Get an organization user's MFA configuration + * + * Get an organization user’s MFA configuration. * *
- * delete:organization_user_mfa + * read:organization_user_mfa *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @param data.userId The identifier for the user - * @returns success_response User's MFA successfully reset. - * @throws ApiError */ - public static resetOrgUserMfaAll( - data: ResetOrgUserMfaAllData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static getOrgUserMfa( + options: Options, + ) { + return (options.client ?? client).get< + GetOrgUserMfaResponses, + GetOrgUserMfaErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/mfa", - path: { - org_code: data.orgCode, - user_id: data.userId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Reset specific organization MFA for a user + * * Reset a specific organization MFA factor for a user. * *
* delete:organization_user_mfa *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @param data.userId The identifier for the user - * @param data.factorId The identifier for the MFA factor - * @returns success_response User's MFA successfully reset. - * @throws ApiError */ - public static resetOrgUserMfa( - data: ResetOrgUserMfaData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static resetOrgUserMfa( + options: Options, + ) { + return (options.client ?? client).delete< + ResetOrgUserMfaResponses, + ResetOrgUserMfaErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/users/{user_id}/mfa/{factor_id}", - path: { - org_code: data.orgCode, - user_id: data.userId, - factor_id: data.factorId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * List Organization Feature Flags - * Get all organization feature flags. + * Delete Organization Feature Flag Overrides + * + * Delete all organization feature flag overrides. * *
- * read:organization_feature_flags + * delete:organization_feature_flags *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @returns get_organization_feature_flags_response Feature flag overrides successfully returned. - * @throws ApiError */ - public static getOrganizationFeatureFlags( - data: GetOrganizationFeatureFlagsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteOrganizationFeatureFlagOverrides< + ThrowOnError extends boolean = false, + >( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteOrganizationFeatureFlagOverridesResponses, + DeleteOrganizationFeatureFlagOverridesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/feature_flags", - path: { - org_code: data.orgCode, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** - * Delete Organization Feature Flag Overrides - * Delete all organization feature flag overrides. + * List Organization Feature Flags + * + * Get all organization feature flags. * *
- * delete:organization_feature_flags + * read:organization_feature_flags *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @returns success_response Feature flag overrides successfully deleted. - * @throws ApiError */ - public static deleteOrganizationFeatureFlagOverrides( - data: DeleteOrganizationFeatureFlagOverridesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static getOrganizationFeatureFlags< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).get< + GetOrganizationFeatureFlagsResponses, + GetOrganizationFeatureFlagsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/feature_flags", - path: { - org_code: data.orgCode, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Delete Organization Feature Flag Override + * * Delete organization feature flag override. * *
* delete:organization_feature_flags *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization. - * @param data.featureFlagKey The identifier for the feature flag. - * @returns success_response Feature flag override successfully deleted. - * @throws ApiError */ - public static deleteOrganizationFeatureFlagOverride( - data: DeleteOrganizationFeatureFlagOverrideData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteOrganizationFeatureFlagOverride< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).delete< + DeleteOrganizationFeatureFlagOverrideResponses, + DeleteOrganizationFeatureFlagOverrideErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}", - path: { - org_code: data.orgCode, - feature_flag_key: data.featureFlagKey, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Update Organization Feature Flag Override + * * Update organization feature flag override. * *
* update:organization_feature_flags *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization - * @param data.featureFlagKey The identifier for the feature flag - * @param data.value Override value - * @returns success_response Feature flag override successfully updated. - * @throws ApiError */ - public static updateOrganizationFeatureFlagOverride( - data: UpdateOrganizationFeatureFlagOverrideData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateOrganizationFeatureFlagOverride< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).patch< + UpdateOrganizationFeatureFlagOverrideResponses, + UpdateOrganizationFeatureFlagOverrideErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}", - path: { - org_code: data.orgCode, - feature_flag_key: data.featureFlagKey, - }, - query: { - value: data.value, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Update Organization Property value + * * Update organization property value. * *
* update:organization_properties *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization - * @param data.propertyKey The identifier for the property - * @param data.value The new property value - * @returns success_response Property successfully updated. - * @throws ApiError */ - public static updateOrganizationProperty( - data: UpdateOrganizationPropertyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static updateOrganizationProperty< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).put< + UpdateOrganizationPropertyResponses, + UpdateOrganizationPropertyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/properties/{property_key}", - path: { - org_code: data.orgCode, - property_key: data.propertyKey, - }, - query: { - value: data.value, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Get Organization Property Values + * * Gets properties for an organization by org code. * *
* read:organization_properties *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @returns get_property_values_response Properties successfully retrieved. - * @throws ApiError */ - public static getOrganizationPropertyValues( - data: GetOrganizationPropertyValuesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getOrganizationPropertyValues< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).get< + GetOrganizationPropertyValuesResponses, + GetOrganizationPropertyValuesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/properties", - path: { - org_code: data.orgCode, - }, - errors: { - 400: "Bad request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Update Organization Property values + * * Update organization property values. * *
* update:organization_properties *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization - * @param data.requestBody Properties to update. - * @returns success_response Properties successfully updated. - * @throws ApiError */ - public static updateOrganizationProperties( - data: UpdateOrganizationPropertiesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateOrganizationProperties< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).patch< + UpdateOrganizationPropertiesResponses, + UpdateOrganizationPropertiesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/properties", - path: { - org_code: data.orgCode, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Replace Organization MFA Configuration + * * Replace Organization MFA Configuration. * *
* update:organization_mfa *
* - * @param data The data for the request. - * @param data.orgCode The identifier for the organization - * @param data.requestBody MFA details. - * @returns success_response MFA Configuration updated successfully. - * @throws ApiError */ - public static replaceOrganizationMfa( - data: ReplaceOrganizationMfaData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static replaceOrganizationMfa( + options: Options, + ) { + return (options.client ?? client).put< + ReplaceOrganizationMfaResponses, + ReplaceOrganizationMfaErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/mfa", - path: { - org_code: data.orgCode, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Delete organization handle + * * Delete organization handle * *
* delete:organization_handles *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @returns success_response Handle successfully deleted. - * @throws ApiError */ - public static deleteOrganizationHandle( - data: DeleteOrganizationHandleData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteOrganizationHandle( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteOrganizationHandleResponses, + DeleteOrganizationHandleErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organization/{org_code}/handle", - path: { - org_code: data.orgCode, - }, - errors: { - 400: "Bad request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Read organization logo details + * * Read organization logo details * *
* read:organizations *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @returns read_logo_response Successfully retrieved organization logo details - * @throws ApiError */ - public static readOrganizationLogo( - data: ReadOrganizationLogoData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static readOrganizationLogo( + options: Options, + ) { + return (options.client ?? client).get< + ReadOrganizationLogoResponses, + ReadOrganizationLogoErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/logos", - path: { - org_code: data.orgCode, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Add organization logo - * Add organization logo + * Delete organization logo + * + * Delete organization logo * *
* update:organizations *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.type The type of logo to add. - * @param data.formData Organization logo details. - * @returns success_response Organization logo successfully updated - * @throws ApiError */ - public static addOrganizationLogo( - data: AddOrganizationLogoData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static deleteOrganizationLogo( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteOrganizationLogoResponses, + DeleteOrganizationLogoErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/logos/{type}", - path: { - org_code: data.orgCode, - type: data.type, - }, - formData: data.formData, - mediaType: "multipart/form-data", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete organization logo - * Delete organization logo + * Add organization logo + * + * Add organization logo * *
* update:organizations *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.type The type of logo to delete. - * @returns success_response Organization logo successfully deleted - * @returns void No logo found to delete - * @throws ApiError */ - public static deleteOrganizationLogo( - data: DeleteOrganizationLogoData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static addOrganizationLogo( + options: Options, + ) { + return (options.client ?? client).post< + AddOrganizationLogoResponses, + AddOrganizationLogoErrors, + ThrowOnError + >({ + ...formDataBodySerializer, + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/logos/{type}", - path: { - org_code: data.orgCode, - type: data.type, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": null, + ...options.headers, }, }); } /** * Get connections + * * Gets all connections for an organization. * *
* read:organization_connections *
* - * @param data The data for the request. - * @param data.organizationCode The organization code. - * @returns get_connections_response Organization connections successfully retrieved. - * @throws ApiError */ - public static getOrganizationConnections( - data: GetOrganizationConnectionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getOrganizationConnections< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).get< + GetOrganizationConnectionsResponses, + GetOrganizationConnectionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{organization_code}/connections", - path: { - organization_code: data.organizationCode, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Enable connection - * Enable an auth connection for an organization. + * Remove connection + * + * Turn off an auth connection for an organization * *
- * create:organization_connections + * delete:organization_connections *
* - * @param data The data for the request. - * @param data.organizationCode The unique code for the organization. - * @param data.connectionId The identifier for the connection. - * @returns unknown Connection successfully enabled. - * @throws ApiError */ - public static enableOrgConnection( - data: EnableOrgConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static removeOrgConnection( + options: Options, + ) { + return (options.client ?? client).delete< + RemoveOrgConnectionResponses, + RemoveOrgConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{organization_code}/connections/{connection_id}", - path: { - organization_code: data.organizationCode, - connection_id: data.connectionId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Remove connection - * Turn off an auth connection for an organization + * Enable connection + * + * Enable an auth connection for an organization. * *
- * delete:organization_connections + * create:organization_connections *
* - * @param data The data for the request. - * @param data.organizationCode The unique code for the organization. - * @param data.connectionId The identifier for the connection. - * @returns success_response Connection successfully removed. - * @throws ApiError */ - public static removeOrgConnection( - data: RemoveOrgConnectionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static enableOrgConnection( + options: Options, + ) { + return (options.client ?? client).post< + EnableOrgConnectionResponses, + EnableOrgConnectionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{organization_code}/connections/{connection_id}", - path: { - organization_code: data.organizationCode, - connection_id: data.connectionId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Update organization session configuration + * * Update the organization's session configuration. * *
* update:organizations *
* - * @param data The data for the request. - * @param data.orgCode The organization's code. - * @param data.requestBody Organization session configuration. - * @returns success_response Organization sessions successfully updated - * @throws ApiError */ - public static updateOrganizationSessions( - data: UpdateOrganizationSessionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateOrganizationSessions< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).patch< + UpdateOrganizationSessionsResponses, + UpdateOrganizationSessionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/organizations/{org_code}/sessions", - path: { - org_code: data.orgCode, + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + }); + } +} + +export class Mfa { + /** + * Replace MFA Configuration + * + * Replace MFA Configuration. + * + *
+ * update:mfa + *
+ * + */ + public static replaceMfa( + options: Options, + ) { + return (options.client ?? client).put< + ReplaceMfaResponses, + ReplaceMfaErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/api/v1/mfa", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -4129,125 +3595,104 @@ export class Organizations { export class Permissions { /** * List Permissions + * * The returned list can be sorted by permission name or permission ID in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter. * *
* read:permissions *
* - * @param data The data for the request. - * @param data.sort Field and order to sort the result by. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.nextToken A string to get the next page of results if there are more results. - * @returns get_permissions_response Permissions successfully retrieved. - * @throws ApiError */ - public static getPermissions( - data: GetPermissionsData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getPermissions( + options?: Options, + ) { + return (options?.client ?? client).get< + GetPermissionsResponses, + GetPermissionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/permissions", - query: { - sort: data.sort, - page_size: data.pageSize, - next_token: data.nextToken, - }, - errors: { - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Create Permission + * * Create a new permission. * *
* create:permissions *
* - * @param data The data for the request. - * @param data.requestBody Permission details. - * @returns success_response Permission successfully created - * @throws ApiError */ - public static createPermission( - data: CreatePermissionData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createPermission( + options?: Options, + ) { + return (options?.client ?? client).post< + CreatePermissionResponses, + CreatePermissionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/permissions", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, }, }); } /** - * Update Permission - * Update permission + * Delete Permission + * + * Delete permission * *
- * update:permissions + * delete:permissions *
* - * @param data The data for the request. - * @param data.permissionId The identifier for the permission. - * @param data.requestBody Permission details. - * @returns success_response Permission successfully updated - * @throws ApiError */ - public static updatePermissions( - data: UpdatePermissionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static deletePermission( + options: Options, + ) { + return (options.client ?? client).delete< + DeletePermissionResponses, + DeletePermissionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/permissions/{permission_id}", - path: { - permission_id: data.permissionId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** - * Delete Permission - * Delete permission + * Update Permission + * + * Update permission * *
- * delete:permissions + * update:permissions *
* - * @param data The data for the request. - * @param data.permissionId The identifier for the permission. - * @returns success_response permission successfully updated. - * @throws ApiError */ - public static deletePermission( - data: DeletePermissionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static updatePermissions( + options: Options, + ) { + return (options.client ?? client).patch< + UpdatePermissionsResponses, + UpdatePermissionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/permissions/{permission_id}", - path: { - permission_id: data.permissionId, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -4256,128 +3701,104 @@ export class Permissions { export class Properties { /** * List properties + * * Returns a list of properties * *
* read:properties *
* - * @param data The data for the request. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.startingAfter The ID of the property to start after. - * @param data.endingBefore The ID of the property to end before. - * @param data.context Filter results by user, organization or application context - * @returns get_properties_response Properties successfully retrieved. - * @throws ApiError */ - public static getProperties( - data: GetPropertiesData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getProperties( + options?: Options, + ) { + return (options?.client ?? client).get< + GetPropertiesResponses, + GetPropertiesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/properties", - query: { - page_size: data.pageSize, - starting_after: data.startingAfter, - ending_before: data.endingBefore, - context: data.context, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Create Property + * * Create property. * *
* create:properties *
* - * @param data The data for the request. - * @param data.requestBody Property details. - * @returns create_property_response Property successfully created - * @throws ApiError */ - public static createProperty( - data: CreatePropertyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createProperty( + options: Options, + ) { + return (options.client ?? client).post< + CreatePropertyResponses, + CreatePropertyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/properties", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Update Property - * Update property. + * Delete Property + * + * Delete property. * *
- * update:properties + * delete:properties *
* - * @param data The data for the request. - * @param data.propertyId The unique identifier for the property. - * @param data.requestBody The fields of the property to update. - * @returns success_response Property successfully updated. - * @throws ApiError */ - public static updateProperty( - data: UpdatePropertyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static deleteProperty( + options: Options, + ) { + return (options.client ?? client).delete< + DeletePropertyResponses, + DeletePropertyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/properties/{property_id}", - path: { - property_id: data.propertyId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** - * Delete Property - * Delete property. + * Update Property + * + * Update property. * *
- * delete:properties + * update:properties *
* - * @param data The data for the request. - * @param data.propertyId The unique identifier for the property. - * @returns success_response Property successfully deleted. - * @throws ApiError */ - public static deleteProperty( - data: DeletePropertyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static updateProperty( + options: Options, + ) { + return (options.client ?? client).put< + UpdatePropertyResponses, + UpdatePropertyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/properties/{property_id}", - path: { - property_id: data.propertyId, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -4386,98 +3807,80 @@ export class Properties { export class PropertyCategories { /** * List categories + * * Returns a list of categories. * *
* read:property_categories *
* - * @param data The data for the request. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.startingAfter The ID of the category to start after. - * @param data.endingBefore The ID of the category to end before. - * @param data.context Filter the results by User or Organization context - * @returns get_categories_response Categories successfully retrieved. - * @throws ApiError */ - public static getCategories( - data: GetCategoriesData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getCategories( + options?: Options, + ) { + return (options?.client ?? client).get< + GetCategoriesResponses, + GetCategoriesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/property_categories", - query: { - page_size: data.pageSize, - starting_after: data.startingAfter, - ending_before: data.endingBefore, - context: data.context, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Create Category + * * Create category. * *
* create:property_categories *
* - * @param data The data for the request. - * @param data.requestBody Category details. - * @returns create_category_response Category successfully created - * @throws ApiError */ - public static createCategory( - data: CreateCategoryData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createCategory( + options: Options, + ) { + return (options.client ?? client).post< + CreateCategoryResponses, + CreateCategoryErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/property_categories", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Update Category + * * Update category. * *
* update:property_categories *
* - * @param data The data for the request. - * @param data.categoryId The unique identifier for the category. - * @param data.requestBody The fields of the category to update. - * @returns success_response category successfully updated. - * @throws ApiError */ - public static updateCategory( - data: UpdateCategoryData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static updateCategory( + options: Options, + ) { + return (options.client ?? client).put< + UpdateCategoryResponses, + UpdateCategoryErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/property_categories/{category_id}", - path: { - category_id: data.categoryId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } @@ -4486,352 +3889,281 @@ export class PropertyCategories { export class Roles { /** * List roles + * * The returned list can be sorted by role name or role ID in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter. * *
* read:roles *
* - * @param data The data for the request. - * @param data.sort Field and order to sort the result by. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.nextToken A string to get the next page of results if there are more results. - * @returns get_roles_response Roles successfully retrieved. - * @throws ApiError */ - public static getRoles( - data: GetRolesData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getRoles( + options?: Options, + ) { + return (options?.client ?? client).get< + GetRolesResponses, + GetRolesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles", - query: { - sort: data.sort, - page_size: data.pageSize, - next_token: data.nextToken, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Create role + * * Create role. * *
* create:roles *
* - * @param data The data for the request. - * @param data.requestBody Role details. - * @returns create_roles_response Role successfully created - * @throws ApiError */ - public static createRole( - data: CreateRoleData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createRole( + options?: Options, + ) { + return (options?.client ?? client).post< + CreateRoleResponses, + CreateRoleErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, }, }); } /** - * Get role - * Get a role + * Delete role + * + * Delete role * *
- * read:roles + * delete:roles *
* - * @param data The data for the request. - * @param data.roleId The identifier for the role. - * @returns get_role_response Role successfully retrieved. - * @throws ApiError */ - public static getRole(data: GetRoleData): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteRole( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteRoleResponses, + DeleteRoleErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}", - path: { - role_id: data.roleId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Update role - * Update a role + * Get role + * + * Get a role * *
- * update:roles + * read:roles *
* - * @param data The data for the request. - * @param data.roleId The identifier for the role. - * @param data.requestBody Role details. - * @returns success_response Role successfully updated - * @throws ApiError */ - public static updateRoles( - data: UpdateRolesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static getRole( + options: Options, + ) { + return (options.client ?? client).get< + GetRoleResponses, + GetRoleErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}", - path: { - role_id: data.roleId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete role - * Delete role + * Update role + * + * Update a role * *
- * delete:roles + * update:roles *
* - * @param data The data for the request. - * @param data.roleId The identifier for the role. - * @returns success_response Role successfully deleted. - * @throws ApiError */ - public static deleteRole( - data: DeleteRoleData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static updateRoles( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateRolesResponses, + UpdateRolesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}", - path: { - role_id: data.roleId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Get role scopes + * * Get scopes for a role. * *
* read:role_scopes *
* - * @param data The data for the request. - * @param data.roleId The role id. - * @returns role_scopes_response A list of scopes for a role - * @throws ApiError */ - public static getRoleScopes( - data: GetRoleScopesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getRoleScopes( + options: Options, + ) { + return (options.client ?? client).get< + GetRoleScopesResponses, + GetRoleScopesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}/scopes", - path: { - role_id: data.roleId, - }, - errors: { - 400: "Error removing user", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Add role scope + * * Add scope to role. * *
* create:role_scopes *
* - * @param data The data for the request. - * @param data.roleId The role id. - * @param data.requestBody Add scope to role. - * @returns add_role_scope_response Role scope successfully added. - * @throws ApiError */ - public static addRoleScope( - data: AddRoleScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static addRoleScope( + options: Options, + ) { + return (options.client ?? client).post< + AddRoleScopeResponses, + AddRoleScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}/scopes", - path: { - role_id: data.roleId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Delete role scope + * * Delete scope from role. * *
* delete:role_scopes *
* - * @param data The data for the request. - * @param data.roleId The role id. - * @param data.scopeId The scope id. - * @returns delete_role_scope_response Role scope successfully deleted. - * @throws ApiError */ - public static deleteRoleScope( - data: DeleteRoleScopeData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteRoleScope( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteRoleScopeResponses, + DeleteRoleScopeErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}/scopes/{scope_id}", - path: { - role_id: data.roleId, - scope_id: data.scopeId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Get role permissions + * * Get permissions for a role. * *
* read:role_permissions *
* - * @param data The data for the request. - * @param data.roleId The role's public id. - * @param data.sort Field and order to sort the result by. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.nextToken A string to get the next page of results if there are more results. - * @returns role_permissions_response A list of permissions for a role - * @throws ApiError */ - public static getRolePermissions( - data: GetRolePermissionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getRolePermissions( + options: Options, + ) { + return (options.client ?? client).get< + GetRolePermissionsResponses, + GetRolePermissionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}/permissions", - path: { - role_id: data.roleId, - }, - query: { - sort: data.sort, - page_size: data.pageSize, - next_token: data.nextToken, - }, - errors: { - 400: "Error removing user", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Update role permissions + * * Update role permissions. * *
* update:role_permissions *
* - * @param data The data for the request. - * @param data.roleId The identifier for the role. - * @param data.requestBody - * @returns update_role_permissions_response Permissions successfully updated. - * @throws ApiError */ - public static updateRolePermissions( - data: UpdateRolePermissionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateRolePermissions( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateRolePermissionsResponses, + UpdateRolePermissionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}/permissions", - path: { - role_id: data.roleId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Remove role permission + * * Remove a permission from a role. * *
* delete:role_permissions *
* - * @param data The data for the request. - * @param data.roleId The role's public id. - * @param data.permissionId The permission's public id. - * @returns success_response Permission successfully removed from role - * @throws ApiError */ - public static removeRolePermission( - data: RemoveRolePermissionData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static removeRolePermission( + options: Options, + ) { + return (options.client ?? client).delete< + RemoveRolePermissionResponses, + RemoveRolePermissionErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/roles/{role_id}/permissions/{permission_id}", - path: { - role_id: data.roleId, - permission_id: data.permissionId, - }, - errors: { - 400: "Error removing user", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } } @@ -4839,6 +4171,7 @@ export class Roles { export class Search { /** * Search users + * * Search for users based on the provided query string. Set query to '*' to filter by other parameters only. * The number of records to return at a time can be controlled using the `page_size` query string parameter. * @@ -4846,37 +4179,18 @@ export class Search { * read:users * * - * @param data The data for the request. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.query Search the users by email or name. Use '*' to search all. - * @param data.apiScopes Search the users by api scopes. - * @param data.properties - * @param data.startingAfter The ID of the user to start after. - * @param data.endingBefore The ID of the user to end before. - * @param data.expand Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "properties". - * @returns search_users_response Users successfully retrieved. - * @throws ApiError - */ - public static searchUsers( - data: SearchUsersData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + */ + public static searchUsers( + options?: Options, + ) { + return (options?.client ?? client).get< + SearchUsersResponses, + SearchUsersErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/search/users", - query: { - page_size: data.pageSize, - query: data.query, - api_scopes: data.apiScopes, - properties: data.properties, - starting_after: data.startingAfter, - ending_before: data.endingBefore, - expand: data.expand, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } } @@ -4884,6 +4198,7 @@ export class Search { export class Subscribers { /** * List Subscribers + * * The returned list can be sorted by full name or email address * in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query * string parameter. @@ -4892,117 +4207,66 @@ export class Subscribers { * read:subscribers * * - * @param data The data for the request. - * @param data.sort Field and order to sort the result by. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.nextToken A string to get the next page of results if there are more results. - * @returns get_subscribers_response Subscriber successfully retrieved. - * @throws ApiError */ - public static getSubscribers( - data: GetSubscribersData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getSubscribers( + options?: Options, + ) { + return (options?.client ?? client).get< + GetSubscribersResponses, + GetSubscribersErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/subscribers", - query: { - sort: data.sort, - page_size: data.pageSize, - next_token: data.nextToken, - }, - errors: { - 403: "Bad request.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Create Subscriber + * * Create subscriber. * *
* create:subscribers *
* - * @param data The data for the request. - * @param data.firstName Subscriber's first name. - * @param data.lastName Subscriber's last name. - * @param data.email The email address of the subscriber. - * @returns create_subscriber_success_response Subscriber successfully created - * @throws ApiError */ - public static createSubscriber( - data: CreateSubscriberData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createSubscriber( + options: Options, + ) { + return (options.client ?? client).post< + CreateSubscriberResponses, + CreateSubscriberErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/subscribers", - query: { - first_name: data.firstName, - last_name: data.lastName, - email: data.email, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Get Subscriber + * * Retrieve a subscriber record. * *
* read:subscribers *
* - * @param data The data for the request. - * @param data.subscriberId The subscriber's id. - * @returns get_subscriber_response Subscriber successfully retrieved. - * @throws ApiError */ - public static getSubscriber( - data: GetSubscriberData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getSubscriber( + options: Options, + ) { + return (options.client ?? client).get< + GetSubscriberResponses, + GetSubscriberErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/subscribers/{subscriber_id}", - path: { - subscriber_id: data.subscriberId, - }, - errors: { - 400: "Bad request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, - }); - } -} - -export class Timezones { - /** - * Get timezones - * Get a list of timezones and associated timezone keys. - * - *
- * read:timezones - *
- * - * @returns get_timezones_response A list of timezones. - * @throws ApiError - */ - public static getTimezones(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/v1/timezones", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } } @@ -5010,598 +4274,454 @@ export class Timezones { export class Users { /** * Get users + * * The returned list can be sorted by full name or email address in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter. * *
* read:users *
* - * @param data The data for the request. - * @param data.pageSize Number of results per page. Defaults to 10 if parameter not sent. - * @param data.userId Filter the results by User ID. The query string should be comma separated and url encoded. - * @param data.nextToken A string to get the next page of results if there are more results. - * @param data.email Filter the results by email address. The query string should be comma separated and url encoded. - * @param data.username Filter the results by username. The query string should be comma separated and url encoded. - * @param data.phone Filter the results by phone. The query string should be comma separated and url encoded. - * @param data.expand Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "billing". - * @param data.hasOrganization Filter the results by if the user has at least one organization assigned. - * @param data.activeSince Filter the results to only include users who have been active since this date. Date should be in ISO 8601 format. - * @returns users_response Users successfully retrieved. - * @throws ApiError - */ - public static getUsers( - data: GetUsersData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + */ + public static getUsers( + options?: Options, + ) { + return (options?.client ?? client).get< + GetUsersResponses, + GetUsersErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users", - query: { - page_size: data.pageSize, - user_id: data.userId, - next_token: data.nextToken, - email: data.email, - username: data.username, - phone: data.phone, - expand: data.expand, - has_organization: data.hasOrganization, - active_since: data.activeSince, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Refresh User Claims and Invalidate Cache + * * Refreshes the user's claims and invalidates the current cache. * *
* update:user_refresh_claims *
* - * @param data The data for the request. - * @param data.userId The id of the user whose claims needs to be updated. - * @returns success_response Claims successfully refreshed. - * @throws ApiError */ - public static refreshUserClaims( - data: RefreshUserClaimsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static refreshUserClaims( + options: Options, + ) { + return (options.client ?? client).post< + RefreshUserClaimsResponses, + RefreshUserClaimsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/refresh_claims", - path: { - user_id: data.userId, - }, - errors: { - 400: "Bad request.", - 403: "Bad request.", - 429: "Request was throttled.", - }, + ...options, }); } /** - * Get user - * Retrieve a user record. + * Delete user + * + * Delete a user record. * *
- * read:users + * delete:users *
* - * @param data The data for the request. - * @param data.id The user's id. - * @param data.expand Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "billing". - * @returns user User successfully retrieved. - * @throws ApiError */ - public static getUserData( - data: GetUserDataData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteUser( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteUserResponses, + DeleteUserErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/user", - query: { - id: data.id, - expand: data.expand, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Create user - * Creates a user record and optionally zero or more identities for the user. An example identity could be the email - * address of the user. + * Get user + * + * Retrieve a user record. * *
- * create:users + * read:users *
* - * @param data The data for the request. - * @param data.requestBody The details of the user to create. - * @returns create_user_response User successfully created. - * @throws ApiError */ - public static createUser( - data: CreateUserData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static getUserData( + options: Options, + ) { + return (options.client ?? client).get< + GetUserDataResponses, + GetUserDataErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/user", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Update user + * * Update a user record. * *
* update:users *
* - * @param data The data for the request. - * @param data.id The user's id. - * @param data.requestBody The user to update. - * @returns update_user_response User successfully updated. - * @throws ApiError */ - public static updateUser( - data: UpdateUserData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateUser( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateUserResponses, + UpdateUserErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/user", - query: { - id: data.id, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Delete user - * Delete a user record. + * Create user + * + * Creates a user record and optionally zero or more identities for the user. An example identity could be the email + * address of the user. * *
- * delete:users + * create:users *
* - * @param data The data for the request. - * @param data.id The user's id. - * @param data.isDeleteProfile Delete all data and remove the user's profile from all of Kinde, including the subscriber list - * @returns success_response User successfully deleted. - * @throws ApiError */ - public static deleteUser( - data: DeleteUserData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static createUser( + options?: Options, + ) { + return (options?.client ?? client).post< + CreateUserResponses, + CreateUserErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/user", - query: { - id: data.id, - is_delete_profile: data.isDeleteProfile, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 429: "Too many requests. Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, }, }); } /** * Update User Feature Flag Override + * * Update user feature flag override. * *
* update:user_feature_flags *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @param data.featureFlagKey The identifier for the feature flag - * @param data.value Override value - * @returns success_response Feature flag override successfully updated. - * @throws ApiError */ - public static updateUserFeatureFlagOverride( - data: UpdateUserFeatureFlagOverrideData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateUserFeatureFlagOverride< + ThrowOnError extends boolean = false, + >(options: Options) { + return (options.client ?? client).patch< + UpdateUserFeatureFlagOverrideResponses, + UpdateUserFeatureFlagOverrideErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/feature_flags/{feature_flag_key}", - path: { - user_id: data.userId, - feature_flag_key: data.featureFlagKey, - }, - query: { - value: data.value, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Update Property value + * * Update property value. * *
* update:user_properties *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @param data.propertyKey The identifier for the property - * @param data.value The new property value - * @returns success_response Property successfully updated. - * @throws ApiError */ - public static updateUserProperty( - data: UpdateUserPropertyData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static updateUserProperty( + options: Options, + ) { + return (options.client ?? client).put< + UpdateUserPropertyResponses, + UpdateUserPropertyErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/properties/{property_key}", - path: { - user_id: data.userId, - property_key: data.propertyKey, - }, - query: { - value: data.value, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Get property values + * * Gets properties for an user by ID. * *
* read:user_properties *
* - * @param data The data for the request. - * @param data.userId The user's ID. - * @returns get_property_values_response Properties successfully retrieved. - * @throws ApiError */ - public static getUserPropertyValues( - data: GetUserPropertyValuesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getUserPropertyValues( + options: Options, + ) { + return (options.client ?? client).get< + GetUserPropertyValuesResponses, + GetUserPropertyValuesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/properties", - path: { - user_id: data.userId, - }, - errors: { - 400: "Bad request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Update Property values + * * Update property values. * *
* update:user_properties *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @param data.requestBody Properties to update. - * @returns success_response Properties successfully updated. - * @throws ApiError */ - public static updateUserProperties( - data: UpdateUserPropertiesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateUserProperties( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateUserPropertiesResponses, + UpdateUserPropertiesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/properties", - path: { - user_id: data.userId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Set User password + * * Set user password. * *
* update:user_passwords *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @param data.requestBody Password details. - * @returns success_response User successfully created. - * @throws ApiError */ - public static setUserPassword( - data: SetUserPasswordData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", + public static setUserPassword( + options: Options, + ) { + return (options.client ?? client).put< + SetUserPasswordResponses, + SetUserPasswordErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/password", - path: { - user_id: data.userId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Error creating user.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * Get identities + * * Gets a list of identities for an user by ID. * *
* read:user_identities *
* - * @param data The data for the request. - * @param data.userId The user's ID. - * @param data.startingAfter The ID of the identity to start after. - * @param data.endingBefore The ID of the identity to end before. - * @returns get_identities_response Identities successfully retrieved. - * @throws ApiError */ - public static getUserIdentities( - data: GetUserIdentitiesData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getUserIdentities( + options: Options, + ) { + return (options.client ?? client).get< + GetUserIdentitiesResponses, + GetUserIdentitiesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/identities", - path: { - user_id: data.userId, - }, - query: { - starting_after: data.startingAfter, - ending_before: data.endingBefore, - }, - errors: { - 400: "Bad request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Create identity + * * Creates an identity for a user. * *
* create:user_identities *
* - * @param data The data for the request. - * @param data.userId The user's ID. - * @param data.requestBody The identity details. - * @returns create_identity_response Identity successfully created. - * @throws ApiError */ - public static createUserIdentity( - data: CreateUserIdentityData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createUserIdentity( + options: Options, + ) { + return (options.client ?? client).post< + CreateUserIdentityResponses, + CreateUserIdentityErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/identities", - path: { - user_id: data.userId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Error creating identity.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** - * Get user sessions - * Retrieve the list of active sessions for a specific user. + * Delete user sessions + * + * Invalidate user sessions. * *
- * read:user_sessions + * delete:user_sessions *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @returns get_user_sessions_response Successfully retrieved user sessions. - * @throws ApiError */ - public static getUserSessions( - data: GetUserSessionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static deleteUserSessions( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteUserSessionsResponses, + DeleteUserSessionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/sessions", - path: { - user_id: data.userId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Delete user sessions - * Invalidate user sessions. + * Get user sessions + * + * Retrieve the list of active sessions for a specific user. * *
- * delete:user_sessions + * read:user_sessions *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @returns success_response User sessions successfully invalidated. - * @throws ApiError */ - public static deleteUserSessions( - data: DeleteUserSessionsData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static getUserSessions( + options: Options, + ) { + return (options.client ?? client).get< + GetUserSessionsResponses, + GetUserSessionsErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/sessions", - path: { - user_id: data.userId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Get user's MFA configuration - * Get a user’s MFA configuration. + * Reset all environment MFA for a user + * + * Reset all environment MFA factors for a user. * *
- * read:user_mfa + * delete:user_mfa *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @returns get_user_mfa_response Successfully retrieve user's MFA configuration. - * @throws ApiError */ - public static getUsersMfa( - data: GetUsersMfaData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static resetUsersMfaAll( + options: Options, + ) { + return (options.client ?? client).delete< + ResetUsersMfaAllResponses, + ResetUsersMfaAllErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/mfa", - path: { - user_id: data.userId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** - * Reset all environment MFA for a user - * Reset all environment MFA factors for a user. + * Get user's MFA configuration + * + * Get a user’s MFA configuration. * *
- * delete:user_mfa + * read:user_mfa *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @returns success_response User's MFA successfully reset. - * @throws ApiError */ - public static resetUsersMfaAll( - data: ResetUsersMfaAllData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static getUsersMfa( + options: Options, + ) { + return (options.client ?? client).get< + GetUsersMfaResponses, + GetUsersMfaErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/mfa", - path: { - user_id: data.userId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } /** * Reset specific environment MFA for a user + * * Reset a specific environment MFA factor for a user. * *
* delete:user_mfa *
* - * @param data The data for the request. - * @param data.userId The identifier for the user - * @param data.factorId The identifier for the MFA factor - * @returns success_response User's MFA successfully reset. - * @throws ApiError */ - public static resetUsersMfa( - data: ResetUsersMfaData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static resetUsersMfa( + options: Options, + ) { + return (options.client ?? client).delete< + ResetUsersMfaResponses, + ResetUsersMfaErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/users/{user_id}/mfa/{factor_id}", - path: { - user_id: data.userId, - factor_id: data.factorId, - }, - errors: { - 400: "Invalid request.", - 403: "Unauthorized - invalid credentials.", - 404: "The specified resource was not found", - 429: "Too many requests. Request was throttled.", - }, + ...options, }); } } @@ -5609,168 +4729,152 @@ export class Users { export class Webhooks { /** * Get Event + * * Returns an event * *
* read:events *
* - * @param data The data for the request. - * @param data.eventId The event id. - * @returns get_event_response Event successfully retrieved. - * @throws ApiError */ - public static getEvent( - data: GetEventData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getEvent( + options: Options, + ) { + return (options.client ?? client).get< + GetEventResponses, + GetEventErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/events/{event_id}", - path: { - event_id: data.eventId, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * List Event Types + * * Returns a list event type definitions * *
* read:event_types *
* - * @returns get_event_types_response Event types successfully retrieved. - * @throws ApiError */ - public static getEventTypes(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getEventTypes( + options?: Options, + ) { + return (options?.client ?? client).get< + GetEventTypesResponses, + GetEventTypesErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/event_types", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Delete Webhook + * * Delete webhook * *
* delete:webhooks *
* - * @param data The data for the request. - * @param data.webhookId The webhook id. - * @returns delete_webhook_response Webhook successfully deleted. - * @throws ApiError */ - public static deleteWebHook( - data: DeleteWebHookData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", + public static deleteWebHook( + options: Options, + ) { + return (options.client ?? client).delete< + DeleteWebHookResponses, + DeleteWebHookErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/webhooks/{webhook_id}", - path: { - webhook_id: data.webhookId, - }, - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Update a Webhook + * * Update a webhook * *
* update:webhooks *
* - * @param data The data for the request. - * @param data.webhookId The webhook id. - * @param data.requestBody Update webhook request specification. - * @returns update_webhook_response Webhook successfully updated. - * @throws ApiError */ - public static updateWebHook( - data: UpdateWebHookData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "PATCH", + public static updateWebHook( + options: Options, + ) { + return (options.client ?? client).patch< + UpdateWebHookResponses, + UpdateWebHookErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/webhooks/{webhook_id}", - path: { - webhook_id: data.webhookId, - }, - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } /** * List Webhooks + * * List webhooks * *
* read:webhooks *
* - * @returns get_webhooks_response Webhook list successfully returned. - * @throws ApiError */ - public static getWebHooks(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", + public static getWebHooks( + options?: Options, + ) { + return (options?.client ?? client).get< + GetWebHooksResponses, + GetWebHooksErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/webhooks", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", - }, + ...options, }); } /** * Create a Webhook + * * Create a webhook * *
* create:webhooks *
* - * @param data The data for the request. - * @param data.requestBody Webhook request specification. - * @returns create_webhook_response Webhook successfully created. - * @throws ApiError */ - public static createWebHook( - data: CreateWebHookData, - ): CancelablePromise { - return __request(OpenAPI, { - method: "POST", + public static createWebHook( + options: Options, + ) { + return (options.client ?? client).post< + CreateWebHookResponses, + CreateWebHookErrors, + ThrowOnError + >({ + security: [{ scheme: "bearer", type: "http" }], url: "/api/v1/webhooks", - body: data.requestBody, - mediaType: "application/json", - errors: { - 400: "Invalid request.", - 403: "Invalid credentials.", - 429: "Request was throttled.", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, }, }); } diff --git a/lib/api/types.gen.ts b/lib/api/types.gen.ts index d2d81b9..b58be69 100644 --- a/lib/api/types.gen.ts +++ b/lib/api/types.gen.ts @@ -1,76 +1,37 @@ // This file is auto-generated by @hey-api/openapi-ts -export type add_organization_users_response = { - /** - * Response code. - */ - code?: string; - /** - * Response message. - */ +export type ClientOptions = { + baseUrl: "https://{subdomain}.kinde.com" | (string & {}); +}; + +export type SuccessResponse = { message?: string; - users_added?: Array; + code?: string; }; -export type add_role_scope_response = { +export type Error = { /** - * Response code. + * Error code. */ code?: string; /** - * Response message. - */ - message?: string; -}; - -export type api_result = { - /** - * The result of the api operation. + * Error message. */ - result?: string; -}; - -export type applications = { - id?: string; - name?: string; - type?: string; -}; - -export type authorize_app_api_response = { message?: string; - code?: string; - applications_disconnected?: Array; - applications_connected?: Array; }; -export type category = { - id?: string; - name?: string; -}; - -export type connected_apps_access_token = { - /** - * The access token to access a third-party provider. - */ - access_token?: string; - /** - * The date and time that the access token expires. - */ - access_token_expiry?: string; +export type ErrorResponse = { + errors?: Array; }; -export type connected_apps_auth_url = { - /** - * A URL that is used to authenticate an end-user against a connected app. - */ - url?: string; - /** - * A unique identifier for the login session. - */ - session_id?: string; +export type NotFoundResponse = { + errors?: { + code?: string; + message?: string; + }; }; -export type connection = { +export type GetApisResponse = { /** * Response code. */ @@ -79,36 +40,35 @@ export type connection = { * Response message. */ message?: string; - connection?: { - id?: string; - name?: string; - display_name?: string; - strategy?: string; - }; -}; - -export type create_api_key_response = { - /** - * A Kinde generated message. - */ - message?: string; /** - * A Kinde generated status code. + * Pagination token. */ - code?: string; - api_key?: { + next_token?: string; + apis?: Array<{ /** - * The unique ID for the API key. + * The unique ID for the API. */ id?: string; /** - * The API key value (only shown once on creation). + * The API's name. */ - key?: string; - }; + name?: string; + /** + * A unique identifier for the API - commonly the URL. This value will be used as the `audience` parameter in authorization claims. + */ + audience?: string; + /** + * Whether or not it is the Kinde management API. + */ + is_management_api?: boolean; + scopes?: Array<{ + id?: string; + key?: string; + }>; + }>; }; -export type create_api_scopes_response = { +export type CreateApisResponse = { /** * A Kinde generated message. */ @@ -117,15 +77,15 @@ export type create_api_scopes_response = { * A Kinde generated status code. */ code?: string; - scope?: { + api?: { /** - * The unique ID for the API scope. + * The unique ID for the API. */ id?: string; }; }; -export type create_apis_response = { +export type CreateApiScopesResponse = { /** * A Kinde generated message. */ @@ -134,15 +94,15 @@ export type create_apis_response = { * A Kinde generated status code. */ code?: string; - api?: { + scope?: { /** - * The unique ID for the API. + * The unique ID for the API scope. */ id?: string; }; }; -export type create_application_response = { +export type GetEnvironmentVariablesResponse = { /** * Response code. */ @@ -151,45 +111,14 @@ export type create_application_response = { * Response message. */ message?: string; - application?: { - /** - * The application's identifier. - */ - id?: string; - /** - * The application's client ID. - */ - client_id?: string; - /** - * The application's client secret. - */ - client_secret?: string; - }; -}; - -export type create_category_response = { - message?: string; - code?: string; - category?: { - /** - * The category's ID. - */ - id?: string; - }; -}; - -export type create_connection_response = { - message?: string; - code?: string; - connection?: { - /** - * The connection's ID. - */ - id?: string; - }; + /** + * Whether more records exist. + */ + has_more?: boolean; + environment_variables?: Array; }; -export type create_directory_response = { +export type GetEnvironmentVariableResponse = { /** * Response code. */ @@ -198,10 +127,10 @@ export type create_directory_response = { * Response message. */ message?: string; - directory?: directory; + environment_variable?: EnvironmentVariable; }; -export type create_environment_variable_response = { +export type CreateEnvironmentVariableResponse = { /** * A Kinde generated message. */ @@ -218,29 +147,29 @@ export type create_environment_variable_response = { }; }; -export type create_identity_response = { +export type UpdateEnvironmentVariableResponse = { + /** + * A Kinde generated message. + */ message?: string; + /** + * A Kinde generated status code. + */ code?: string; - identity?: { - /** - * The identity's ID. - */ - id?: string; - }; }; -export type create_meter_usage_record_response = { +export type DeleteEnvironmentVariableResponse = { /** - * Response message. + * A Kinde generated message. */ message?: string; /** - * Response code. + * A Kinde generated status code. */ code?: string; }; -export type create_organization_invite_response = { +export type GetBusinessResponse = { /** * Response code. */ @@ -249,100 +178,97 @@ export type create_organization_invite_response = { * Response message. */ message?: string; - invite?: { - /** - * The invitation's unique identifier. - */ - id?: string; + business?: { /** - * The invitation's code. + * The unique ID for the business. */ code?: string; /** - * The email address of the invited user. + * Your business's name. */ - email?: string; + name?: string; /** - * The first name of the invited user. + * Phone number associated with business. */ - first_name?: string | null; + phone?: string | null; /** - * The last name of the invited user. + * Email address associated with business. */ - last_name?: string | null; + email?: string | null; /** - * The full name of the invited user. + * The industry your business is in. */ - full_name?: string; + industry?: string | null; /** - * When the invitation was created. + * The timezone your business is in. */ - created_on?: string; + timezone?: string | null; /** - * Whether the invitation email was sent. + * Your Privacy policy URL. */ - is_sent?: boolean; + privacy_url?: string | null; /** - * When the invitation was accepted. Always null for a freshly created invitation. + * Your Terms and Conditions URL. */ - accepted_on?: string | null; + terms_url?: string | null; /** - * The roles assigned to the invitation. + * Whether your business uses clickwrap agreements. */ - roles?: Array<{ - /** - * The role's key. - */ - key?: string; - /** - * The role's name. - */ - name?: string; - }>; + has_clickwrap?: boolean; /** - * Whether the invitation has been revoked. Always false for a freshly created invitation. + * Whether your business shows Kinde branding. */ - is_revoked?: boolean; + has_kinde_branding?: boolean; /** - * URL to share with the invitee to accept the invitation. + * Date of business creation in ISO 8601 format. */ - invite_link?: string; + created_on?: string; }; }; -export type create_organization_response = { - /** - * Response message. - */ - message?: string; +export type GetIndustriesResponse = { /** * Response code. */ code?: string; - organization?: { + /** + * Response message. + */ + message?: string; + industries?: Array<{ /** - * The organization's unique code. + * The unique key for the industry. */ - code?: string; + key?: string; /** - * The billing customer id if the organization was created with the is_create_billing_customer as true + * The display name for the industry. */ - billing_customer_id?: string; - }; + name?: string; + }>; }; -export type create_property_response = { - message?: string; +export type GetTimezonesResponse = { + /** + * Response code. + */ code?: string; - property?: { + /** + * Response message. + */ + message?: string; + timezones?: Array<{ /** - * The property's ID. + * The unique key for the timezone. */ - id?: string; - }; + key?: string; + /** + * The display name for the timezone. + */ + name?: string; + }>; }; -export type create_roles_response = { +export type GetApiResponse = { /** * Response code. */ @@ -351,36 +277,84 @@ export type create_roles_response = { * Response message. */ message?: string; - role?: { + api?: { /** - * The role's ID. + * Unique ID of the API. */ id?: string; - }; -}; - -export type create_subscriber_success_response = { - subscriber?: { /** - * A unique identifier for the subscriber. + * The API's name. */ - subscriber_id?: string; + name?: string; + /** + * A unique identifier for the API - commonly the URL. This value will be used as the `audience` parameter in authorization claims. + */ + audience?: string; + /** + * Whether or not it is the Kinde management API. + */ + is_management_api?: boolean; + scopes?: Array<{ + /** + * The ID of the scope. + */ + id?: string; + /** + * The reference key for the scope. + */ + key?: string; + }>; + applications?: Array<{ + /** + * The Client ID of the application. + */ + id?: string; + /** + * The application's name. + */ + name?: string; + /** + * The application's type. + */ + type?: + | "Machine to machine (M2M)" + | "Back-end web" + | "Front-end and mobile" + | "Device and IoT"; + /** + * Whether or not the application is authorized to access the API + */ + is_active?: boolean | null; + }>; }; }; -export type create_user_response = { +export type GetApiScopesResponse = { /** - * Unique ID of the user in Kinde. + * Response code. */ - id?: string; + code?: string; /** - * True if the user was successfully created. + * Response message. */ - created?: boolean; - identities?: Array; + message?: string; + scopes?: Array<{ + /** + * Unique ID of the API scope. + */ + id?: string; + /** + * The scope's reference key. + */ + key?: string; + /** + * Explanation of the scope purpose. + */ + description?: string; + }>; }; -export type create_webhook_response = { +export type GetApiScopeResponse = { /** * Response code. */ @@ -389,158 +363,140 @@ export type create_webhook_response = { * Response message. */ message?: string; - webhook?: { + scope?: { + /** + * Unique ID of the API scope. + */ id?: string; - endpoint?: string; + /** + * The scope's reference key. + */ + key?: string; + /** + * Explanation of the scope purpose. + */ + description?: string; }; }; -export type delete_api_response = { +export type AuthorizeAppApiResponse = { message?: string; code?: string; + applications_disconnected?: Array; + applications_connected?: Array; }; -export type delete_directory_response = { - /** - * Response code. - */ - code?: string; - /** - * Response message. - */ +export type DeleteApiResponse = { message?: string; + code?: string; }; -export type delete_environment_variable_response = { - /** - * A Kinde generated message. - */ - message?: string; +export type User = { /** - * A Kinde generated status code. + * Unique ID of the user in Kinde. */ - code?: string; -}; - -export type delete_role_scope_response = { + id?: string; /** - * Response code. + * External ID for user. */ - code?: string; + provided_id?: string; /** - * Response message. + * Default email address of the user in Kinde. */ - message?: string; -}; - -export type delete_webhook_response = { + preferred_email?: string; /** - * Response code. + * User's primary phone number. */ - code?: string; + phone?: string; /** - * Response message. + * Primary username of the user in Kinde. */ - message?: string; -}; - -export type directory = { + username?: string; /** - * The unique ID for the SCIM directory. + * User's last name. */ - id?: string; + last_name?: string; /** - * The name of the SCIM directory. + * User's first name. */ - directory_name?: string; + first_name?: string; /** - * The endpoint ID for the SCIM directory. + * Whether the user is currently suspended or not. */ - directory_endpoint_id?: string; + is_suspended?: boolean; /** - * The secret token for SCIM authentication. + * User's profile picture URL. */ - secret_token?: string; + picture?: string; /** - * The current status of the SCIM directory. + * Total number of user sign ins. */ - status?: "Pending" | "Validating" | "Active" | "Inactive" | "Error"; + total_sign_ins?: number | null; /** - * The organization code this directory belongs to. + * Number of consecutive failed user sign ins. */ - organization_code?: string; + failed_sign_ins?: number | null; /** - * When the last sync started. + * Last sign in date in ISO 8601 format. */ - last_sync_started_at?: string | null; + last_signed_in?: string | null; /** - * When the last sync completed. + * Date of user creation in ISO 8601 format. */ - last_sync_completed_at?: string | null; + created_on?: string | null; /** - * The last sync error message. + * Array of organizations a user belongs to. */ - last_sync_error?: string | null; + organizations?: Array; /** - * When the directory was created. + * Array of identities belonging to the user. */ - created_on?: string; + identities?: Array<{ + type?: string; + identity?: string; + }>; + billing?: { + customer_id?: string; + }; }; -/** - * The current status of the SCIM directory. - */ -export type status = "Pending" | "Validating" | "Active" | "Inactive" | "Error"; - -export type environment_variable = { +export type UpdateUserResponse = { /** - * The unique ID for the environment variable. + * Unique ID of the user in Kinde. */ id?: string; /** - * The name of the environment variable. + * User's first name. */ - key?: string; + given_name?: string; /** - * The value of the environment variable. + * User's last name. */ - value?: string | null; + family_name?: string; /** - * Whether the environment variable is sensitive. + * User's preferred email. */ - is_secret?: boolean; + email?: string; /** - * The date the environment variable was created. + * Whether the user is currently suspended or not. */ - created_on?: string; -}; - -export type error = { + is_suspended?: boolean; /** - * Error code. + * Whether a password reset has been requested. */ - code?: string; + is_password_reset_requested?: boolean; /** - * Error message. + * User's profile picture URL. */ - message?: string; -}; - -export type error_response = { - errors?: Array; + picture?: string | null; }; -export type event_type = { - id?: string; - code?: string; - name?: string; - origin?: string; - schema?: { - [key: string]: unknown; - }; -}; +/** + * Array of users. + */ +export type Users = Array; -export type get_api_key_response = { +export type UsersResponse = { /** * Response code. */ @@ -549,71 +505,97 @@ export type get_api_key_response = { * Response message. */ message?: string; - api_key?: { + users?: Array<{ /** - * The unique ID for the API key. + * Unique ID of the user in Kinde. */ id?: string; /** - * The API key's name. + * External ID for user. */ - name?: string; + provided_id?: string; /** - * The type of API key. + * Default email address of the user in Kinde. */ - type?: string; + email?: string; /** - * The status of the API key. + * User's primary phone number. */ - status?: string; + phone?: string; /** - * The first 6 characters of the API key for identification. + * Primary username of the user in Kinde. */ - key_prefix?: string; + username?: string; /** - * The last 4 characters of the API key for identification. + * User's last name. */ - key_suffix?: string | null; + last_name?: string; /** - * When the API key was created. + * User's first name. */ - created_on?: string; + first_name?: string; /** - * When the API key was last verified. + * Whether the user is currently suspended or not. */ - last_verified_on?: string | null; + is_suspended?: boolean; /** - * The IP address from which the API key was last verified. + * User's profile picture URL. */ - last_verified_ip?: string | null; + picture?: string; /** - * The name of the user who created the API key. + * Total number of user sign ins. */ - created_by?: string | null; + total_sign_ins?: number | null; /** - * Array of API IDs associated with this key. + * Number of consecutive failed user sign ins. */ - api_ids?: Array; + failed_sign_ins?: number | null; /** - * Array of scopes associated with this key. + * Last sign in date in ISO 8601 format. */ - scopes?: Array; + last_signed_in?: string | null; /** - * Number of times this API key has been verified. + * Date of user creation in ISO 8601 format. */ - verification_count?: number | null; + created_on?: string | null; /** - * The organization code associated with this key. + * Array of organization sign-in information for the user. */ - organization_id?: string | null; + last_organization_sign_ins?: Array<{ + /** + * The organization code. + */ + org_code?: string; + /** + * The date and time the user last signed in to this organization in ISO 8601 format. + */ + last_signed_in?: string; + }> | null; /** - * The user ID associated with this key. + * Array of organizations a user belongs to. */ - user_id?: string | null; - }; + organizations?: Array; + /** + * Array of identities belonging to the user. + */ + identities?: Array<{ + type?: string; + identity?: string; + }>; + billing?: { + /** + * The billing customer id. + */ + customer_id?: string; + }; + }>; + /** + * Pagination token. + */ + next_token?: string; }; -export type get_api_keys_response = { +export type SearchUsersResponse = { /** * Response code. */ @@ -622,174 +604,155 @@ export type get_api_keys_response = { * Response message. */ message?: string; - /** - * Whether more records exist. - */ - has_more?: boolean; - api_keys?: Array<{ + results?: Array<{ /** - * The unique ID for the API key. + * Unique ID of the user in Kinde. */ id?: string; /** - * The API key's name. + * External ID for user. */ - name?: string; + provided_id?: string | null; /** - * The type of API key. + * Default email address of the user in Kinde. */ - type?: string; + email?: string | null; /** - * The status of the API key. + * Primary username of the user in Kinde. */ - status?: string; + username?: string | null; /** - * The first 6 characters of the API key for identification. + * User's last name. */ - key_prefix?: string; + last_name?: string; /** - * The last 4 characters of the API key for identification. + * User's first name. */ - key_suffix?: string | null; + first_name?: string; /** - * When the API key was created. + * Whether the user is currently suspended or not. */ - created_on?: string; + is_suspended?: boolean; /** - * When the API key was last verified. + * User's profile picture URL. */ - last_verified_on?: string | null; + picture?: string | null; /** - * The IP address from which the API key was last verified. + * Total number of user sign ins. */ - last_verified_ip?: string | null; + total_sign_ins?: number | null; /** - * The name of the user who created the API key. + * Number of consecutive failed user sign ins. */ - created_by?: string | null; + failed_sign_ins?: number | null; /** - * Array of API IDs associated with this key. + * Last sign in date in ISO 8601 format. */ - api_ids?: Array; + last_signed_in?: string | null; /** - * Array of scopes associated with this key. + * Date of user creation in ISO 8601 format. */ - scopes?: Array; - }>; -}; - -export type get_api_response = { - /** - * Response code. - */ - code?: string; - /** - * Response message. - */ - message?: string; - api?: { + created_on?: string | null; /** - * Unique ID of the API. + * Array of organizations a user belongs to. */ - id?: string; + organizations?: Array; /** - * The API's name. + * Array of identities belonging to the user. */ - name?: string; + identities?: Array<{ + type?: string; + identity?: string; + }>; /** - * A unique identifier for the API - commonly the URL. This value will be used as the `audience` parameter in authorization claims. + * The user properties. */ - audience?: string; + properties?: { + [key: string]: string; + }; /** - * Whether or not it is the Kinde management API. + * Array of api scopes belonging to the user. */ - is_management_api?: boolean; - scopes?: Array<{ - /** - * The ID of the scope. - */ - id?: string; - /** - * The reference key for the scope. - */ - key?: string; - }>; - applications?: Array<{ - /** - * The Client ID of the application. - */ - id?: string; - /** - * The application's name. - */ - name?: string; - /** - * The application's type. - */ - type?: - | "Machine to machine (M2M)" - | "Back-end web" - | "Front-end and mobile" - | "Device and IoT"; - /** - * Whether or not the application is authorized to access the API - */ - is_active?: boolean | null; + api_scopes?: Array<{ + org_code?: string; + scope?: string; + api_id?: string; }>; - }; + }>; }; -export type get_api_scope_response = { +export type CreateUserResponse = { /** - * Response code. + * Unique ID of the user in Kinde. */ - code?: string; + id?: string; + /** + * True if the user was successfully created. + */ + created?: boolean; + identities?: Array; +}; + +export type CreateOrganizationResponse = { /** * Response message. */ message?: string; - scope?: { - /** - * Unique ID of the API scope. - */ - id?: string; + /** + * Response code. + */ + code?: string; + organization?: { /** - * The scope's reference key. + * The organization's unique code. */ - key?: string; + code?: string; /** - * Explanation of the scope purpose. + * The billing customer id if the organization was created with the is_create_billing_customer as true */ - description?: string; + billing_customer_id?: string; }; }; -export type get_api_scopes_response = { +export type UserIdentity = { /** - * Response code. + * The type of identity object created. */ - code?: string; + type?: string; /** - * Response message. + * The result of the user creation operation. */ - message?: string; - scopes?: Array<{ + result?: { /** - * Unique ID of the API scope. + * True if the user identity was successfully created. */ - id?: string; + created?: boolean; + }; +}; + +export type CreatePropertyResponse = { + message?: string; + code?: string; + property?: { /** - * The scope's reference key. + * The property's ID. */ - key?: string; + id?: string; + }; +}; + +export type CreateIdentityResponse = { + message?: string; + code?: string; + identity?: { /** - * Explanation of the scope purpose. + * The identity's ID. */ - description?: string; - }>; + id?: string; + }; }; -export type get_apis_response = { +export type GetIdentitiesResponse = { /** * Response code. */ @@ -798,150 +761,105 @@ export type get_apis_response = { * Response message. */ message?: string; + identities?: Array; /** - * Pagination token. + * Whether more records exist. */ - next_token?: string; - apis?: Array<{ + has_more?: boolean; +}; + +export type GetUserSessionsResponse = { + code?: string; + message?: string; + has_more?: boolean; + sessions?: Array<{ /** - * The unique ID for the API. + * The unique identifier of the user associated with the session. */ - id?: string; + user_id?: string; /** - * The API's name. + * The organization code associated with the session, if applicable. */ - name?: string; + org_code?: string | null; /** - * A unique identifier for the API - commonly the URL. This value will be used as the `audience` parameter in authorization claims. + * The client ID used to initiate the session. */ - audience?: string; + client_id?: string; /** - * Whether or not it is the Kinde management API. + * The timestamp indicating when the session will expire. */ - is_management_api?: boolean; - scopes?: Array<{ - id?: string; - key?: string; - }>; - }>; -}; - -export type get_application_response = { - /** - * Response code. - */ - code?: string; - /** - * Response message. - */ - message?: string; - application?: { + expires_on?: string; /** - * The application's identifier. + * The unique identifier of the session. */ - id?: string; + session_id?: string; /** - * The application's name. + * The timestamp when the session was initiated. */ - name?: string; + started_on?: string; /** - * The application's type. + * The timestamp of the last update to the session. */ - type?: "m2m" | "reg" | "spa"; + updated_on?: string; /** - * The application's client ID. + * The identifier of the connection through which the session was established. */ - client_id?: string; + connection_id?: string; /** - * The application's client secret. + * The last known IP address of the user during this session. */ - client_secret?: string; + last_ip_address?: string; /** - * The default login route for resolving session issues. + * The last known user agent (browser or app) used during this session. */ - login_uri?: string; + last_user_agent?: string; /** - * The homepage link to your application. + * The IP address from which the session was initially started. */ - homepage_uri?: string; + initial_ip_address?: string; /** - * Whether the application has a cancel button to allow users to exit the auth flow [Beta]. + * The user agent (browser or app) used when the session was first created. */ - has_cancel_button?: boolean; - }; + initial_user_agent?: string; + }>; }; -/** - * The application's type. - */ -export type type = "m2m" | "reg" | "spa"; - -export type get_applications_response = { - /** - * Response code. - */ - code?: string; - /** - * Response message. - */ +export type GetUserMfaResponse = { message?: string; - applications?: Array; - /** - * Pagination token. - */ - next_token?: string; -}; - -export type get_billing_agreements_response = { - /** - * Response code. - */ code?: string; - /** - * Response message. - */ - message?: string; - /** - * Whether more records exist. - */ - has_more?: boolean; - /** - * A list of billing agreements - */ - agreements?: Array<{ + mfa?: { /** - * The friendly id of an agreement + * The MFA's identifier. */ id?: string; /** - * The plan code the billing customer is subscribed to + * The type of MFA (e.g. email, SMS, authenticator app). */ - plan_code?: string; + type?: string; /** - * The date the agreement expired (and was no longer active) + * The timestamp when the MFA was created. */ - expires_on?: string; + created_on?: string; /** - * The friendly id of the billing group this agreement's plan is part of + * The identifier used for MFA (e.g. email address, phone number). */ - billing_group_id?: string; + name?: string; /** - * A list of billing entitlements that is part of this agreement + * Whether the MFA is verified or not. */ - entitlements?: Array<{ - /** - * The feature code of the feature corresponding to this entitlement - */ - feature_code?: string; - /** - * The friendly id of an entitlement - */ - entitlement_id?: string; - }>; - }>; + is_verified?: boolean; + /** + * The number of times MFA has been used. + */ + usage_count?: number; + /** + * The timestamp when the MFA was last used. + */ + last_used_on?: string; + }; }; -export type get_billing_entitlements_response = { +export type GetPropertiesResponse = { /** * Response code. */ @@ -950,60 +868,14 @@ export type get_billing_entitlements_response = { * Response message. */ message?: string; + properties?: Array; /** * Whether more records exist. */ has_more?: boolean; - /** - * A list of entitlements - */ - entitlements?: Array<{ - /** - * The friendly id of an entitlement - */ - id?: string; - /** - * The price charged if this is an entitlement for a fixed charged - */ - fixed_charge?: number; - /** - * The name of the price associated with the entitlement - */ - price_name?: string; - /** - * The price charged for this entitlement in cents - */ - unit_amount?: number; - /** - * The feature code of the feature corresponding to this entitlement - */ - feature_code?: string; - /** - * The feature name of the feature corresponding to this entitlement - */ - feature_name?: string; - /** - * The maximum number of units of the feature the customer is entitled to - */ - entitlement_limit_max?: number; - /** - * The minimum number of units of the feature the customer is entitled to - */ - entitlement_limit_min?: number; - }>; - /** - * A list of plans. - */ - plans?: Array<{ - /** - * The plan code the billing customer is subscribed to - */ - code?: string; - subscribed_on?: string; - }>; }; -export type get_business_response = { +export type GetPropertyValuesResponse = { /** * Response code. */ @@ -1012,55 +884,25 @@ export type get_business_response = { * Response message. */ message?: string; - business?: { - /** - * The unique ID for the business. - */ - code?: string; - /** - * Your business's name. - */ - name?: string; - /** - * Phone number associated with business. - */ - phone?: string | null; - /** - * Email address associated with business. - */ - email?: string | null; - /** - * The industry your business is in. - */ - industry?: string | null; - /** - * The timezone your business is in. - */ - timezone?: string | null; - /** - * Your Privacy policy URL. - */ - privacy_url?: string | null; - /** - * Your Terms and Conditions URL. - */ - terms_url?: string | null; - /** - * Whether your business uses clickwrap agreements. - */ - has_clickwrap?: boolean; - /** - * Whether your business shows Kinde branding. - */ - has_kinde_branding?: boolean; + properties?: Array; + /** + * Pagination token. + */ + next_token?: string; +}; + +export type CreateCategoryResponse = { + message?: string; + code?: string; + category?: { /** - * Date of business creation in ISO 8601 format. + * The category's ID. */ - created_on?: string; + id?: string; }; }; -export type get_categories_response = { +export type GetCategoriesResponse = { /** * Response code. */ @@ -1069,14 +911,14 @@ export type get_categories_response = { * Response message. */ message?: string; - categories?: Array; + categories?: Array; /** * Whether more records exist. */ has_more?: boolean; }; -export type get_connections_response = { +export type GetEventResponse = { /** * Response code. */ @@ -1085,14 +927,24 @@ export type get_connections_response = { * Response message. */ message?: string; - connections?: Array; - /** - * Whether more records exist. - */ - has_more?: boolean; + event?: { + type?: string; + source?: string; + event_id?: string; + /** + * Timestamp in ISO 8601 format. + */ + timestamp?: number; + /** + * Event specific data object. + */ + data?: { + [key: string]: unknown; + }; + }; }; -export type get_directories_response = { +export type GetEventTypesResponse = { /** * Response code. */ @@ -1101,14 +953,10 @@ export type get_directories_response = { * Response message. */ message?: string; - /** - * Whether more records exist. - */ - has_more?: boolean; - directories?: Array; + event_types?: Array; }; -export type get_directory_response = { +export type GetWebhooksResponse = { /** * Response code. */ @@ -1117,10 +965,22 @@ export type get_directory_response = { * Response message. */ message?: string; - directory?: directory; + webhooks?: Array; +}; + +export type Webhook = { + id?: string; + name?: string; + endpoint?: string; + description?: string; + event_types?: Array; + /** + * Created on date in ISO 8601 format. + */ + created_on?: string; }; -export type get_environment_feature_flags_response = { +export type CreateWebhookResponse = { /** * Response code. */ @@ -1129,22 +989,96 @@ export type get_environment_feature_flags_response = { * Response message. */ message?: string; + webhook?: { + id?: string; + endpoint?: string; + }; +}; + +export type UpdateWebhookResponse = { + message?: string; + code?: string; + webhook?: { + id?: string; + }; +}; + +export type CreateConnectionResponse = { + message?: string; + code?: string; + connection?: { + /** + * The connection's ID. + */ + id?: string; + }; +}; + +export type GetConnectionsResponse = { /** - * The environment's feature flag settings. + * Response code. */ - feature_flags?: { - [key: string]: { - type?: "str" | "int" | "bool"; - value?: string; - }; + code?: string; + /** + * Response message. + */ + message?: string; + connections?: Array; + /** + * Whether more records exist. + */ + has_more?: boolean; +}; + +export type DeleteWebhookResponse = { + /** + * Response code. + */ + code?: string; + /** + * Response message. + */ + message?: string; +}; + +export type EventType = { + id?: string; + code?: string; + name?: string; + origin?: string; + schema?: { + [key: string]: unknown; }; +}; + +export type OrganizationItemSchema = { /** - * Pagination token. + * The unique identifier for the organization. */ - next_token?: string; + code?: string; + /** + * The organization's name. + */ + name?: string; + /** + * A unique handle for the organization - can be used for dynamic callback urls. + */ + handle?: string | null; + /** + * Whether the organization is the default organization. + */ + is_default?: boolean; + /** + * The organization's external identifier - commonly used when migrating from or mapping to other systems. + */ + external_id?: string | null; + /** + * If users become members of this organization when the org code is supplied during authentication. + */ + is_auto_membership_enabled?: boolean; }; -export type get_environment_response = { +export type GetEnvironmentResponse = { /** * Response code. */ @@ -1273,204 +1207,207 @@ export type get_environment_response = { }; }; -/** - * Whether the environment is forced into light mode, dark mode or user preference - */ -export type theme_code = "light" | "dark" | "user_preference"; - -/** - * The color scheme for the environment used for meta tags based on the theme code - */ -export type color_scheme = "light" | "dark" | "light dark"; - -export type get_environment_variable_response = { +export type GetOrganizationResponse = { /** - * Response code. + * The unique identifier for the organization. */ code?: string; /** - * Response message. + * The organization's name. */ - message?: string; - environment_variable?: environment_variable; -}; - -export type get_environment_variables_response = { + name?: string; /** - * Response code. + * A unique handle for the organization - can be used for dynamic callback urls. */ - code?: string; + handle?: string | null; /** - * Response message. + * Whether the organization is the default organization. */ - message?: string; + is_default?: boolean; /** - * Whether more records exist. + * The organization's external identifier - commonly used when migrating from or mapping to other systems. */ - has_more?: boolean; - environment_variables?: Array; -}; - -export type get_event_response = { + external_id?: string | null; /** - * Response code. + * If users become members of this organization when the org code is supplied during authentication. */ - code?: string; + is_auto_membership_enabled?: boolean; /** - * Response message. + * The organization's logo URL. */ - message?: string; - event?: { - type?: string; - source?: string; - event_id?: string; - /** - * Timestamp in ISO 8601 format. - */ - timestamp?: number; - /** - * Event specific data object. - */ - data?: { - [key: string]: unknown; - }; - }; -}; - -export type get_event_types_response = { + logo?: string | null; /** - * Response code. + * The organization's logo URL to be used for dark themes. */ - code?: string; + logo_dark?: string | null; /** - * Response message. + * The organization's SVG favicon URL. Optimal format for most browsers */ - message?: string; - event_types?: Array; -}; - -export type get_identities_response = { + favicon_svg?: string | null; /** - * Response code. + * The favicon URL to be used as a fallback in browsers that don't support SVG, add a PNG */ - code?: string; + favicon_fallback?: string | null; /** - * Response message. + * Domains allowed for self-sign up to this environment. Empty array means no restrictions. */ - message?: string; - identities?: Array; + allowed_domains?: Array; + link_color?: { + raw?: string; + hex?: string; + hsl?: string; + } | null; + background_color?: { + raw?: string; + hex?: string; + hsl?: string; + } | null; + button_color?: { + raw?: string; + hex?: string; + hsl?: string; + } | null; + button_text_color?: { + raw?: string; + hex?: string; + hsl?: string; + } | null; + link_color_dark?: { + raw?: string; + hex?: string; + hsl?: string; + } | null; + background_color_dark?: { + raw?: string; + hex?: string; + hsl?: string; + } | null; + button_text_color_dark?: { + raw?: string; + hex?: string; + hsl?: string; + } | null; + button_color_dark?: { + raw?: string; + hex?: string; + hsl?: string; + } | null; /** - * Whether more records exist. + * The border radius for buttons. Value is px, Kinde transforms to rem for rendering */ - has_more?: boolean; -}; - -export type get_industries_response = { + button_border_radius?: number | null; /** - * Response code. + * The border radius for cards. Value is px, Kinde transforms to rem for rendering */ - code?: string; + card_border_radius?: number | null; /** - * Response message. + * The border radius for inputs. Value is px, Kinde transforms to rem for rendering */ - message?: string; - industries?: Array<{ - /** - * The unique key for the industry. - */ - key?: string; - /** - * The display name for the industry. - */ - name?: string; - }>; -}; - -export type get_organization_feature_flags_response = { + input_border_radius?: number | null; /** - * Response code. + * Whether the environment is forced into light mode, dark mode or user preference */ - code?: string; + theme_code?: "light" | "dark" | "user_preference"; /** - * Response message. + * The color scheme for the environment used for meta tags based on the theme code */ - message?: string; + color_scheme?: "light" | "dark" | "light dark"; /** - * The environment's feature flag settings. + * Date of organization creation in ISO 8601 format. */ - feature_flags?: { - [key: string]: { - type?: "str" | "int" | "bool"; - value?: string; - }; - }; -}; - -export type get_organization_invite_response = { + created_on?: string; /** - * Response message. + * Deprecated - Use 'is_auto_membership_enabled' instead + * + * @deprecated */ - message?: string; + is_allow_registrations?: boolean | null; /** - * The invitation's unique identifier. + * The name of the organization that will be used in emails */ - id?: string; + sender_name?: string | null; /** - * The invitation's code. + * The email address that will be used in emails. Requires custom SMTP to be set up. */ - code?: string; + sender_email?: string | null; /** - * The email address of the invited user. + * Whether the organization is currently suspended or not. */ - email?: string; + is_suspended?: boolean; /** - * The first name of the invited user. + * The date the organization was suspended in ISO 8601 format. Null if not suspended. */ - first_name?: string | null; + suspended_on?: string | null; /** - * The last name of the invited user. + * The billing information if the organization is a billing customer. */ - last_name?: string | null; + billing?: { + billing_customer_id?: string; + /** + * The billing agreements the billing customer is currently subscribed to + */ + agreements?: Array<{ + /** + * The code of the plan from which this agreement is taken from + */ + plan_code?: string; + /** + * The id of the billing agreement in Kinde + */ + agreement_id?: string; + }>; + }; +}; + +export type OrganizationUser = { /** - * The full name of the invited user. + * The unique ID for the user. + */ + id?: string | null; + /** + * The user's email address. + */ + email?: string | null; + /** + * The user's full name. */ full_name?: string; /** - * When the invitation was created. + * The user's last name. */ - created_on?: string; + last_name?: string | null; /** - * Whether the invitation email was sent. + * The user's first name. */ - is_sent?: boolean; + first_name?: string | null; /** - * When the invitation was accepted. + * The user's profile picture URL. */ - accepted_on?: string | null; + picture?: string | null; /** - * The roles assigned to the invitation. + * The date the user joined the organization. */ - roles?: Array<{ - /** - * The role's key. - */ - key?: string; - /** - * The role's name. - */ - name?: string; - }>; + joined_on?: string; /** - * Whether the invitation has been revoked. + * The date the user last accessed the organization. */ - is_revoked?: boolean; + last_accessed_on?: string | null; /** - * URL to share with the invitee to accept the invitation. + * Whether the user is currently suspended or not. */ - invite_link?: string; + is_suspended?: boolean; + /** + * The roles the user has in the organization. + */ + roles?: Array; }; -export type get_organization_invites_response = { +export type Category = { + id?: string; + name?: string; +}; + +export type Connection = { /** * Response code. */ @@ -1479,165 +1416,168 @@ export type get_organization_invites_response = { * Response message. */ message?: string; - invites?: Array; - /** - * Pagination token. - */ - next_token?: string | null; + connection?: { + id?: string; + name?: string; + display_name?: string; + strategy?: string; + }; }; -export type get_organization_response = { +export type EnvironmentVariable = { /** - * The unique identifier for the organization. + * The unique ID for the environment variable. */ - code?: string; + id?: string; /** - * The organization's name. + * The name of the environment variable. */ - name?: string; + key?: string; /** - * A unique handle for the organization - can be used for dynamic callback urls. + * The value of the environment variable. */ - handle?: string | null; + value?: string | null; /** - * Whether the organization is the default organization. + * Whether the environment variable is sensitive. */ - is_default?: boolean; + is_secret?: boolean; /** - * The organization's external identifier - commonly used when migrating from or mapping to other systems. + * The date the environment variable was created. */ - external_id?: string | null; + created_on?: string; +}; + +export type Identity = { /** - * If users become members of this organization when the org code is supplied during authentication. + * The unique ID for the identity */ - is_auto_membership_enabled?: boolean; + id?: string; /** - * The organization's logo URL. + * The type of identity */ - logo?: string | null; + type?: string; /** - * The organization's logo URL to be used for dark themes. + * Whether the identity is confirmed */ - logo_dark?: string | null; + is_confirmed?: boolean; /** - * The organization's SVG favicon URL. Optimal format for most browsers + * Date of user creation in ISO 8601 format */ - favicon_svg?: string | null; + created_on?: string; /** - * The favicon URL to be used as a fallback in browsers that don't support SVG, add a PNG + * Date of last login in ISO 8601 format */ - favicon_fallback?: string | null; + last_login_on?: string; + total_logins?: number; /** - * Domains allowed for self-sign up to this environment. Empty array means no restrictions. + * The value of the identity */ - allowed_domains?: Array; - link_color?: { - raw?: string; - hex?: string; - hsl?: string; - } | null; - background_color?: { - raw?: string; - hex?: string; - hsl?: string; - } | null; - button_color?: { - raw?: string; - hex?: string; - hsl?: string; - } | null; - button_text_color?: { - raw?: string; - hex?: string; - hsl?: string; - } | null; - link_color_dark?: { - raw?: string; - hex?: string; - hsl?: string; - } | null; - background_color_dark?: { - raw?: string; - hex?: string; - hsl?: string; - } | null; - button_text_color_dark?: { - raw?: string; - hex?: string; - hsl?: string; - } | null; - button_color_dark?: { - raw?: string; - hex?: string; - hsl?: string; - } | null; + name?: string; /** - * The border radius for buttons. Value is px, Kinde transforms to rem for rendering + * The associated email of the identity */ - button_border_radius?: number | null; + email?: string; /** - * The border radius for cards. Value is px, Kinde transforms to rem for rendering + * Whether the identity is the primary identity for the user */ - card_border_radius?: number | null; + is_primary?: boolean | null; +}; + +export type Property = { + id?: string; + key?: string; + name?: string; + is_private?: boolean; + description?: string; + is_kinde_property?: boolean; +}; + +export type PropertyValue = { + id?: string; + name?: string; + description?: string | null; + key?: string; + value?: string | null; +}; + +export type Role = { + id?: string; + key?: string; + name?: string; + description?: string; +}; + +export type SubscribersSubscriber = { + id?: string; + email?: string; + full_name?: string; + first_name?: string; + last_name?: string; +}; + +export type Subscriber = { + id?: string; + preferred_email?: string; + first_name?: string; + last_name?: string; +}; + +export type OrganizationUserRole = { + id?: string; + key?: string; + name?: string; +}; + +export type OrganizationUserRolePermissions = { + id?: string; + role?: string; + permissions?: { + key?: string; + }; +}; + +export type OrganizationUserPermission = { + id?: string; + key?: string; + name?: string; + description?: string; + roles?: Array<{ + id?: string; + key?: string; + }>; +}; + +export type OrganizationUsers = Array; + +export type GetSubscriberResponse = { /** - * The border radius for inputs. Value is px, Kinde transforms to rem for rendering + * Response code. */ - input_border_radius?: number | null; + code?: string; /** - * Whether the environment is forced into light mode, dark mode or user preference + * Response message. */ - theme_code?: "light" | "dark" | "user_preference"; + message?: string; + subscribers?: Array; +}; + +export type GetSubscribersResponse = { /** - * The color scheme for the environment used for meta tags based on the theme code + * Response code. */ - color_scheme?: "light" | "dark" | "light dark"; + code?: string; /** - * Date of organization creation in ISO 8601 format. + * Response message. */ - created_on?: string; - /** - * Deprecated - Use 'is_auto_membership_enabled' instead - * @deprecated - */ - is_allow_registrations?: boolean | null; - /** - * The name of the organization that will be used in emails - */ - sender_name?: string | null; - /** - * The email address that will be used in emails. Requires custom SMTP to be set up. - */ - sender_email?: string | null; - /** - * Whether the organization is currently suspended or not. - */ - is_suspended?: boolean; - /** - * The date the organization was suspended in ISO 8601 format. Null if not suspended. - */ - suspended_on?: string | null; + message?: string; + subscribers?: Array; /** - * The billing information if the organization is a billing customer. + * Pagination token. */ - billing?: { - billing_customer_id?: string; - /** - * The billing agreements the billing customer is currently subscribed to - */ - agreements?: Array<{ - /** - * The code of the plan from which this agreement is taken from - */ - plan_code?: string; - /** - * The id of the billing agreement in Kinde - */ - agreement_id?: string; - }>; - }; + next_token?: string; }; -export type get_organization_users_response = { +export type GetRolesResponse = { /** * Response code. */ @@ -1646,14 +1586,14 @@ export type get_organization_users_response = { * Response message. */ message?: string; - organization_users?: Array; + roles?: Array; /** * Pagination token. */ next_token?: string; }; -export type get_organizations_response = { +export type GetRoleResponse = { /** * Response code. */ @@ -1662,14 +1602,31 @@ export type get_organizations_response = { * Response message. */ message?: string; - organizations?: Array; - /** - * Pagination token. - */ - next_token?: string; + role?: { + /** + * The role's ID. + */ + id?: string; + /** + * The role identifier to use in code. + */ + key?: string; + /** + * The role's name. + */ + name?: string; + /** + * The role's description. + */ + description?: string; + /** + * Whether the role is the default role. + */ + is_default_role?: boolean; + }; }; -export type get_organizations_user_permissions_response = { +export type CreateRolesResponse = { /** * Response code. */ @@ -1678,10 +1635,15 @@ export type get_organizations_user_permissions_response = { * Response message. */ message?: string; - permissions?: Array; + role?: { + /** + * The role's ID. + */ + id?: string; + }; }; -export type get_organizations_user_roles_response = { +export type AddRoleScopeResponse = { /** * Response code. */ @@ -1690,14 +1652,20 @@ export type get_organizations_user_roles_response = { * Response message. */ message?: string; - roles?: Array; +}; + +export type DeleteRoleScopeResponse = { /** - * Pagination token. + * Response code. */ - next_token?: string; + code?: string; + /** + * Response message. + */ + message?: string; }; -export type get_permissions_response = { +export type GetOrganizationsResponse = { /** * Response code. */ @@ -1706,14 +1674,14 @@ export type get_permissions_response = { * Response message. */ message?: string; - permissions?: Array; + organizations?: Array; /** * Pagination token. */ next_token?: string; }; -export type get_properties_response = { +export type GetOrganizationUsersResponse = { /** * Response code. */ @@ -1722,14 +1690,14 @@ export type get_properties_response = { * Response message. */ message?: string; - properties?: Array; + organization_users?: Array; /** - * Whether more records exist. + * Pagination token. */ - has_more?: boolean; + next_token?: string; }; -export type get_property_values_response = { +export type GetOrganizationsUserRolesResponse = { /** * Response code. */ @@ -1738,21 +1706,14 @@ export type get_property_values_response = { * Response message. */ message?: string; - properties?: Array; + roles?: Array; /** * Pagination token. */ next_token?: string; }; -export type get_redirect_callback_urls_response = { - /** - * An application's redirect callback URLs. - */ - redirect_urls?: Array; -}; - -export type get_role_response = { +export type GetOrganizationsUserPermissionsResponse = { /** * Response code. */ @@ -1761,31 +1722,10 @@ export type get_role_response = { * Response message. */ message?: string; - role?: { - /** - * The role's ID. - */ - id?: string; - /** - * The role identifier to use in code. - */ - key?: string; - /** - * The role's name. - */ - name?: string; - /** - * The role's description. - */ - description?: string; - /** - * Whether the role is the default role. - */ - is_default_role?: boolean; - }; + permissions?: Array; }; -export type get_roles_response = { +export type GetOrganizationInvitesResponse = { /** * Response code. */ @@ -1794,224 +1734,148 @@ export type get_roles_response = { * Response message. */ message?: string; - roles?: Array; + invites?: Array; /** * Pagination token. */ - next_token?: string; + next_token?: string | null; }; -export type get_subscriber_response = { - /** - * Response code. - */ - code?: string; +export type GetOrganizationInviteResponse = { /** * Response message. */ message?: string; - subscribers?: Array; -}; - -export type get_subscribers_response = { /** - * Response code. + * The invitation's unique identifier. + */ + id?: string; + /** + * The invitation's code. */ code?: string; /** - * Response message. + * The email address of the invited user. */ - message?: string; - subscribers?: Array; + email?: string; /** - * Pagination token. + * The first name of the invited user. */ - next_token?: string; -}; - -export type get_timezones_response = { + first_name?: string | null; /** - * Response code. + * The last name of the invited user. */ - code?: string; + last_name?: string | null; /** - * Response message. + * The full name of the invited user. */ - message?: string; - timezones?: Array<{ + full_name?: string; + /** + * When the invitation was created. + */ + created_on?: string; + /** + * Whether the invitation email was sent. + */ + is_sent?: boolean; + /** + * When the invitation was accepted. + */ + accepted_on?: string | null; + /** + * The roles assigned to the invitation. + */ + roles?: Array<{ /** - * The unique key for the timezone. + * The role's key. */ key?: string; /** - * The display name for the timezone. + * The role's name. */ name?: string; }>; + /** + * Whether the invitation has been revoked. + */ + is_revoked?: boolean; + /** + * URL to share with the invitee to accept the invitation. + */ + invite_link?: string; }; -export type get_user_mfa_response = { - message?: string; +export type CreateOrganizationInviteResponse = { + /** + * Response code. + */ code?: string; - mfa?: { + /** + * Response message. + */ + message?: string; + invite?: { /** - * The MFA's identifier. + * The invitation's unique identifier. */ id?: string; /** - * The type of MFA (e.g. email, SMS, authenticator app). - */ - type?: string; - /** - * The timestamp when the MFA was created. - */ - created_on?: string; - /** - * The identifier used for MFA (e.g. email address, phone number). + * The invitation's code. */ - name?: string; + code?: string; /** - * Whether the MFA is verified or not. + * The email address of the invited user. */ - is_verified?: boolean; + email?: string; /** - * The number of times MFA has been used. + * The first name of the invited user. */ - usage_count?: number; + first_name?: string | null; /** - * The timestamp when the MFA was last used. + * The last name of the invited user. */ - last_used_on?: string; - }; -}; - -export type get_user_sessions_response = { - code?: string; - message?: string; - has_more?: boolean; - sessions?: Array<{ + last_name?: string | null; /** - * The unique identifier of the user associated with the session. + * The full name of the invited user. */ - user_id?: string; + full_name?: string; /** - * The organization code associated with the session, if applicable. + * When the invitation was created. */ - org_code?: string | null; + created_on?: string; /** - * The client ID used to initiate the session. + * Whether the invitation email was sent. */ - client_id?: string; + is_sent?: boolean; /** - * The timestamp indicating when the session will expire. + * When the invitation was accepted. Always null for a freshly created invitation. */ - expires_on?: string; + accepted_on?: string | null; /** - * The unique identifier of the session. + * The roles assigned to the invitation. */ - session_id?: string; + roles?: Array<{ + /** + * The role's key. + */ + key?: string; + /** + * The role's name. + */ + name?: string; + }>; /** - * The timestamp when the session was initiated. + * Whether the invitation has been revoked. Always false for a freshly created invitation. */ - started_on?: string; + is_revoked?: boolean; /** - * The timestamp of the last update to the session. + * URL to share with the invitee to accept the invitation. */ - updated_on?: string; - /** - * The identifier of the connection through which the session was established. - */ - connection_id?: string; - /** - * The last known IP address of the user during this session. - */ - last_ip_address?: string; - /** - * The last known user agent (browser or app) used during this session. - */ - last_user_agent?: string; - /** - * The IP address from which the session was initially started. - */ - initial_ip_address?: string; - /** - * The user agent (browser or app) used when the session was first created. - */ - initial_user_agent?: string; - }>; -}; - -export type get_webhooks_response = { - /** - * Response code. - */ - code?: string; - /** - * Response message. - */ - message?: string; - webhooks?: Array; -}; - -export type identity = { - /** - * The unique ID for the identity - */ - id?: string; - /** - * The type of identity - */ - type?: string; - /** - * Whether the identity is confirmed - */ - is_confirmed?: boolean; - /** - * Date of user creation in ISO 8601 format - */ - created_on?: string; - /** - * Date of last login in ISO 8601 format - */ - last_login_on?: string; - total_logins?: number; - /** - * The value of the identity - */ - name?: string; - /** - * The associated email of the identity - */ - email?: string; - /** - * Whether the identity is the primary identity for the user - */ - is_primary?: boolean | null; -}; - -export type logout_redirect_urls = { - /** - * An application's logout URLs. - */ - logout_urls?: Array; - /** - * Response code. - */ - code?: string; - /** - * Response message. - */ - message?: string; -}; - -export type not_found_response = { - errors?: { - code?: string; - message?: string; + invite_link?: string; }; }; -export type organization_invite = { +export type OrganizationInvite = { /** * The invitation's unique identifier. */ @@ -2071,226 +1935,226 @@ export type organization_invite = { invite_link?: string; }; -export type organization_item_schema = { +export type GetOrganizationFeatureFlagsResponse = { /** - * The unique identifier for the organization. + * Response code. */ code?: string; /** - * The organization's name. - */ - name?: string; - /** - * A unique handle for the organization - can be used for dynamic callback urls. - */ - handle?: string | null; - /** - * Whether the organization is the default organization. - */ - is_default?: boolean; - /** - * The organization's external identifier - commonly used when migrating from or mapping to other systems. + * Response message. */ - external_id?: string | null; + message?: string; /** - * If users become members of this organization when the org code is supplied during authentication. + * The environment's feature flag settings. */ - is_auto_membership_enabled?: boolean; + feature_flags?: { + [key: string]: { + type?: "str" | "int" | "bool"; + value?: string; + }; + }; }; -export type organization_user = { - /** - * The unique ID for the user. - */ - id?: string | null; - /** - * The user's email address. - */ - email?: string | null; - /** - * The user's full name. - */ - full_name?: string; - /** - * The user's last name. - */ - last_name?: string | null; +export type GetEnvironmentFeatureFlagsResponse = { /** - * The user's first name. + * Response code. */ - first_name?: string | null; + code?: string; /** - * The user's profile picture URL. + * Response message. */ - picture?: string | null; + message?: string; /** - * The date the user joined the organization. + * The environment's feature flag settings. */ - joined_on?: string; + feature_flags?: { + [key: string]: { + type?: "str" | "int" | "bool"; + value?: string; + }; + }; /** - * The date the user last accessed the organization. + * Pagination token. */ - last_accessed_on?: string | null; + next_token?: string; +}; + +export type AddOrganizationUsersResponse = { /** - * Whether the user is currently suspended or not. + * Response code. */ - is_suspended?: boolean; + code?: string; /** - * The roles the user has in the organization. + * Response message. */ - roles?: Array; -}; - -export type organization_user_permission = { - id?: string; - key?: string; - name?: string; - description?: string; - roles?: Array<{ - id?: string; - key?: string; - }>; + message?: string; + users_added?: Array; }; -export type organization_user_role = { - id?: string; - key?: string; - name?: string; +export type UpdateRolePermissionsResponse = { + code?: string; + message?: string; + permissions_added?: Array; + permissions_removed?: Array; }; -export type organization_user_role_permissions = { - id?: string; - role?: string; - permissions?: { - key?: string; - }; +export type UpdateOrganizationUsersResponse = { + message?: string; + code?: string; + users_added?: Array; + users_updated?: Array; + users_removed?: Array; }; -export type organization_users = Array; - -/** - * The API's ID. - */ -export type Parameterapi_id = string; - -/** - * The application's ID / client ID. - */ -export type Parameterapplication_id = string; - -/** - * The property's key. - */ -export type Parameterproperty_key = string; - -/** - * The environment variable's ID. - */ -export type Parametervariable_id = string; - -export type permissions = { +export type ConnectedAppsAuthUrl = { /** - * The permission's ID. + * A URL that is used to authenticate an end-user against a connected app. */ - id?: string; + url?: string; /** - * The permission identifier to use in code. + * A unique identifier for the login session. */ - key?: string; + session_id?: string; +}; + +export type CreateSubscriberSuccessResponse = { + subscriber?: { + /** + * A unique identifier for the subscriber. + */ + subscriber_id?: string; + }; +}; + +export type ConnectedAppsAccessToken = { /** - * The permission's name. + * The access token to access a third-party provider. */ - name?: string; + access_token?: string; /** - * The permission's description. + * The date and time that the access token expires. */ - description?: string; -}; - -export type property = { - id?: string; - key?: string; - name?: string; - is_private?: boolean; - description?: string; - is_kinde_property?: boolean; + access_token_expiry?: string; }; -export type property_value = { - id?: string; - name?: string; - description?: string | null; - key?: string; - value?: string | null; +export type ApiResult = { + /** + * The result of the api operation. + */ + result?: string; }; -export type read_env_logo_response = { +export type CreateApplicationResponse = { /** * Response code. */ code?: string; /** - * A list of logos. + * Response message. */ - logos?: Array<{ + message?: string; + application?: { /** - * The type of logo (light or dark). + * The application's identifier. */ - type?: string; + id?: string; /** - * The name of the logo file. + * The application's client ID. */ - file_name?: string; - }>; - /** - * Response message. - */ - message?: string; + client_id?: string; + /** + * The application's client secret. + */ + client_secret?: string; + }; }; -export type read_logo_response = { +export type GetApplicationResponse = { /** * Response code. */ code?: string; /** - * A list of logos. + * Response message. */ - logos?: Array<{ + message?: string; + application?: { /** - * The type of logo (light or dark). + * The application's identifier. */ - type?: string; + id?: string; /** - * The name of the logo file. + * The application's name. */ - file_name?: string; + name?: string; /** - * The relative path to the logo file. + * The application's type. */ - path?: string; - }>; + type?: "m2m" | "reg" | "spa"; + /** + * The application's client ID. + */ + client_id?: string; + /** + * The application's client secret. + */ + client_secret?: string; + /** + * The default login route for resolving session issues. + */ + login_uri?: string; + /** + * The homepage link to your application. + */ + homepage_uri?: string; + /** + * Whether the application has a cancel button to allow users to exit the auth flow [Beta]. + */ + has_cancel_button?: boolean; + }; +}; + +export type Applications = { + id?: string; + name?: string; + type?: string; +}; + +export type GetApplicationsResponse = { + /** + * Response code. + */ + code?: string; /** * Response message. */ message?: string; + applications?: Array; + /** + * Pagination token. + */ + next_token?: string; }; -export type redirect_callback_urls = { +export type RedirectCallbackUrls = { /** * An application's redirect URLs. */ redirect_urls?: Array; }; -export type role = { - id?: string; - key?: string; - name?: string; - description?: string; +export type GetRedirectCallbackUrlsResponse = { + /** + * An application's redirect callback URLs. + */ + redirect_urls?: Array; }; -export type role_permissions_response = { +export type LogoutRedirectUrls = { + /** + * An application's logout URLs. + */ + logout_urls?: Array; /** * Response code. */ @@ -2299,14 +2163,9 @@ export type role_permissions_response = { * Response message. */ message?: string; - permissions?: Array; - /** - * Pagination token. - */ - next_token?: string; }; -export type role_scopes_response = { +export type GetPermissionsResponse = { /** * Response code. */ @@ -2315,10 +2174,52 @@ export type role_scopes_response = { * Response message. */ message?: string; - scopes?: Array; + permissions?: Array; + /** + * Pagination token. + */ + next_token?: string; +}; + +export type Permissions = { + /** + * The permission's ID. + */ + id?: string; + /** + * The permission identifier to use in code. + */ + key?: string; + /** + * The permission's name. + */ + name?: string; + /** + * The permission's description. + */ + description?: string; +}; + +export type Scopes = { + /** + * Scope ID. + */ + id?: string; + /** + * Scope key. + */ + key?: string; + /** + * Description of scope. + */ + description?: string; + /** + * API ID. + */ + api_id?: string; }; -export type roles = { +export type Roles = { /** * The role's ID. */ @@ -2341,7 +2242,7 @@ export type roles = { is_default_role?: boolean; }; -export type rotate_api_key_response = { +export type RolePermissionsResponse = { /** * Response code. */ @@ -2350,144 +2251,140 @@ export type rotate_api_key_response = { * Response message. */ message?: string; - api_key?: { - /** - * The unique ID for the API key. - */ - id?: string; - /** - * The new API key value (only shown once). - */ - key?: string; - }; -}; - -export type scopes = { - /** - * Scope ID. - */ - id?: string; + permissions?: Array; /** - * Scope key. + * Pagination token. */ - key?: string; + next_token?: string; +}; + +export type RoleScopesResponse = { /** - * Description of scope. + * Response code. */ - description?: string; + code?: string; /** - * API ID. + * Response message. */ - api_id?: string; + message?: string; + scopes?: Array; }; -export type search_users_response = { +export type ReadLogoResponse = { /** * Response code. */ code?: string; /** - * Response message. + * A list of logos. */ - message?: string; - results?: Array<{ + logos?: Array<{ /** - * Unique ID of the user in Kinde. + * The type of logo (light or dark). */ - id?: string; + type?: string; /** - * External ID for user. + * The name of the logo file. */ - provided_id?: string | null; + file_name?: string; /** - * Default email address of the user in Kinde. + * The relative path to the logo file. */ - email?: string | null; + path?: string; + }>; + /** + * Response message. + */ + message?: string; +}; + +export type ReadEnvLogoResponse = { + /** + * Response code. + */ + code?: string; + /** + * A list of logos. + */ + logos?: Array<{ /** - * Primary username of the user in Kinde. + * The type of logo (light or dark). */ - username?: string | null; + type?: string; /** - * User's last name. + * The name of the logo file. */ - last_name?: string; + file_name?: string; + }>; + /** + * Response message. + */ + message?: string; +}; + +export type GetBillingEntitlementsResponse = { + /** + * Response code. + */ + code?: string; + /** + * Response message. + */ + message?: string; + /** + * Whether more records exist. + */ + has_more?: boolean; + /** + * A list of entitlements + */ + entitlements?: Array<{ /** - * User's first name. + * The friendly id of an entitlement */ - first_name?: string; + id?: string; /** - * Whether the user is currently suspended or not. + * The price charged if this is an entitlement for a fixed charged */ - is_suspended?: boolean; + fixed_charge?: number; /** - * User's profile picture URL. + * The name of the price associated with the entitlement */ - picture?: string | null; + price_name?: string; /** - * Total number of user sign ins. + * The price charged for this entitlement in cents */ - total_sign_ins?: number | null; + unit_amount?: number; /** - * Number of consecutive failed user sign ins. + * The feature code of the feature corresponding to this entitlement */ - failed_sign_ins?: number | null; + feature_code?: string; /** - * Last sign in date in ISO 8601 format. + * The feature name of the feature corresponding to this entitlement */ - last_signed_in?: string | null; + feature_name?: string; /** - * Date of user creation in ISO 8601 format. + * The maximum number of units of the feature the customer is entitled to */ - created_on?: string | null; + entitlement_limit_max?: number; /** - * Array of organizations a user belongs to. + * The minimum number of units of the feature the customer is entitled to */ - organizations?: Array; + entitlement_limit_min?: number; + }>; + /** + * A list of plans. + */ + plans?: Array<{ /** - * Array of identities belonging to the user. + * The plan code the billing customer is subscribed to */ - identities?: Array<{ - type?: string; - identity?: string; - }>; - /** - * The user properties. - */ - properties?: { - [key: string]: string; - }; - /** - * Array of api scopes belonging to the user. - */ - api_scopes?: Array<{ - org_code?: string; - scope?: string; - api_id?: string; - }>; + code?: string; + subscribed_on?: string; }>; }; -export type subscriber = { - id?: string; - preferred_email?: string; - first_name?: string; - last_name?: string; -}; - -export type subscribers_subscriber = { - id?: string; - email?: string; - full_name?: string; - first_name?: string; - last_name?: string; -}; - -export type success_response = { - message?: string; - code?: string; -}; - -export type update_directory_response = { +export type GetBillingAgreementsResponse = { /** * Response code. */ @@ -2496,264 +2393,281 @@ export type update_directory_response = { * Response message. */ message?: string; - directory?: directory; -}; - -export type update_environment_variable_response = { /** - * A Kinde generated message. + * Whether more records exist. */ - message?: string; + has_more?: boolean; /** - * A Kinde generated status code. + * A list of billing agreements */ - code?: string; -}; - -export type update_organization_users_response = { - message?: string; - code?: string; - users_added?: Array; - users_updated?: Array; - users_removed?: Array; -}; - -export type update_role_permissions_response = { - code?: string; - message?: string; - permissions_added?: Array; - permissions_removed?: Array; + agreements?: Array<{ + /** + * The friendly id of an agreement + */ + id?: string; + /** + * The plan code the billing customer is subscribed to + */ + plan_code?: string; + /** + * The date the agreement expired (and was no longer active) + */ + expires_on?: string; + /** + * The friendly id of the billing group this agreement's plan is part of + */ + billing_group_id?: string; + /** + * A list of billing entitlements that is part of this agreement + */ + entitlements?: Array<{ + /** + * The feature code of the feature corresponding to this entitlement + */ + feature_code?: string; + /** + * The friendly id of an entitlement + */ + entitlement_id?: string; + }>; + }>; }; -export type update_user_response = { +export type CreateMeterUsageRecordResponse = { /** - * Unique ID of the user in Kinde. + * Response message. */ - id?: string; + message?: string; /** - * User's first name. + * Response code. */ - given_name?: string; + code?: string; +}; + +export type GetApiKeysResponse = { /** - * User's last name. + * Response code. */ - family_name?: string; + code?: string; /** - * User's preferred email. + * Response message. */ - email?: string; + message?: string; /** - * Whether the user is currently suspended or not. + * Whether more records exist. */ - is_suspended?: boolean; + has_more?: boolean; + api_keys?: Array<{ + /** + * The unique ID for the API key. + */ + id?: string; + /** + * The API key's name. + */ + name?: string; + /** + * The type of API key. + */ + type?: string; + /** + * The status of the API key. + */ + status?: string; + /** + * The first 6 characters of the API key for identification. + */ + key_prefix?: string; + /** + * The last 4 characters of the API key for identification. + */ + key_suffix?: string | null; + /** + * When the API key was created. + */ + created_on?: string; + /** + * When the API key was last verified. + */ + last_verified_on?: string | null; + /** + * The IP address from which the API key was last verified. + */ + last_verified_ip?: string | null; + /** + * The name of the user who created the API key. + */ + created_by?: string | null; + /** + * Array of API IDs associated with this key. + */ + api_ids?: Array; + /** + * Array of scopes associated with this key. + */ + scopes?: Array; + }>; +}; + +export type RotateApiKeyResponse = { /** - * Whether a password reset has been requested. + * Response code. */ - is_password_reset_requested?: boolean; + code?: string; /** - * User's profile picture URL. + * Response message. */ - picture?: string | null; -}; - -export type update_webhook_response = { message?: string; - code?: string; - webhook?: { + api_key?: { + /** + * The unique ID for the API key. + */ id?: string; + /** + * The new API key value (only shown once). + */ + key?: string; }; }; -export type user = { - /** - * Unique ID of the user in Kinde. - */ - id?: string; +export type CreateApiKeyResponse = { /** - * External ID for user. + * A Kinde generated message. */ - provided_id?: string; + message?: string; /** - * Default email address of the user in Kinde. + * A Kinde generated status code. */ - preferred_email?: string; + code?: string; + api_key?: { + /** + * The unique ID for the API key. + */ + id?: string; + /** + * The API key value (only shown once on creation). + */ + key?: string; + }; +}; + +export type VerifyApiKeyResponse = { /** - * User's primary phone number. + * Response code. */ - phone?: string; + code?: string; /** - * Primary username of the user in Kinde. + * Response message. */ - username?: string; + message?: string; /** - * User's last name. + * Whether the API key is valid. */ - last_name?: string; + is_valid?: boolean; /** - * User's first name. + * The unique ID for the API key. */ - first_name?: string; + key_id?: string; /** - * Whether the user is currently suspended or not. + * The status of the API key. */ - is_suspended?: boolean; + status?: string; /** - * User's profile picture URL. + * Array of scopes associated with this key. */ - picture?: string; + scopes?: Array; /** - * Total number of user sign ins. + * The organization code associated with this key. */ - total_sign_ins?: number | null; + org_code?: string | null; /** - * Number of consecutive failed user sign ins. + * The user ID associated with this key. */ - failed_sign_ins?: number | null; + user_id?: string | null; /** - * Last sign in date in ISO 8601 format. + * When the API key was last verified. */ - last_signed_in?: string | null; + last_verified_on?: string | null; /** - * Date of user creation in ISO 8601 format. + * Number of times this API key has been verified. */ - created_on?: string | null; + verification_count?: number; +}; + +export type GetApiKeyResponse = { /** - * Array of organizations a user belongs to. + * Response code. */ - organizations?: Array; + code?: string; /** - * Array of identities belonging to the user. - */ - identities?: Array<{ - type?: string; - identity?: string; - }>; - billing?: { - customer_id?: string; - }; -}; - -export type user_identity = { - /** - * The type of identity object created. - */ - type?: string; - /** - * The result of the user creation operation. - */ - result?: { - /** - * True if the user identity was successfully created. - */ - created?: boolean; - }; -}; - -/** - * Array of users. - */ -export type users = Array; - -export type users_response = { - /** - * Response code. - */ - code?: string; - /** - * Response message. + * Response message. */ message?: string; - users?: Array<{ + api_key?: { /** - * Unique ID of the user in Kinde. + * The unique ID for the API key. */ id?: string; /** - * External ID for user. - */ - provided_id?: string; - /** - * Default email address of the user in Kinde. + * The API key's name. */ - email?: string; + name?: string; /** - * User's primary phone number. + * The type of API key. */ - phone?: string; + type?: string; /** - * Primary username of the user in Kinde. + * The status of the API key. */ - username?: string; + status?: string; /** - * User's last name. + * The first 6 characters of the API key for identification. */ - last_name?: string; + key_prefix?: string; /** - * User's first name. + * The last 4 characters of the API key for identification. */ - first_name?: string; + key_suffix?: string | null; /** - * Whether the user is currently suspended or not. + * When the API key was created. */ - is_suspended?: boolean; + created_on?: string; /** - * User's profile picture URL. + * When the API key was last verified. */ - picture?: string; + last_verified_on?: string | null; /** - * Total number of user sign ins. + * The IP address from which the API key was last verified. */ - total_sign_ins?: number | null; + last_verified_ip?: string | null; /** - * Number of consecutive failed user sign ins. + * The name of the user who created the API key. */ - failed_sign_ins?: number | null; + created_by?: string | null; /** - * Last sign in date in ISO 8601 format. + * Array of API IDs associated with this key. */ - last_signed_in?: string | null; + api_ids?: Array; /** - * Date of user creation in ISO 8601 format. + * Array of scopes associated with this key. */ - created_on?: string | null; + scopes?: Array; /** - * Array of organization sign-in information for the user. + * Number of times this API key has been verified. */ - last_organization_sign_ins?: Array<{ - /** - * The organization code. - */ - org_code?: string; - /** - * The date and time the user last signed in to this organization in ISO 8601 format. - */ - last_signed_in?: string; - }> | null; + verification_count?: number | null; /** - * Array of organizations a user belongs to. + * The organization code associated with this key. */ - organizations?: Array; + organization_id?: string | null; /** - * Array of identities belonging to the user. + * The user ID associated with this key. */ - identities?: Array<{ - type?: string; - identity?: string; - }>; - billing?: { - /** - * The billing customer id. - */ - customer_id?: string; - }; - }>; - /** - * Pagination token. - */ - next_token?: string; + user_id?: string | null; + }; }; -export type verify_api_key_response = { +export type GetDirectoriesResponse = { /** * Response code. */ @@ -2763,85 +2677,186 @@ export type verify_api_key_response = { */ message?: string; /** - * Whether the API key is valid. + * Whether more records exist. */ - is_valid?: boolean; + has_more?: boolean; + directories?: Array; +}; + +export type GetDirectoryResponse = { /** - * The unique ID for the API key. + * Response code. */ - key_id?: string; + code?: string; /** - * The status of the API key. + * Response message. */ - status?: string; + message?: string; + directory?: Directory; +}; + +export type CreateDirectoryResponse = { /** - * Array of scopes associated with this key. + * Response code. */ - scopes?: Array; + code?: string; /** - * The organization code associated with this key. + * Response message. */ - org_code?: string | null; + message?: string; + directory?: Directory; +}; + +export type UpdateDirectoryResponse = { /** - * The user ID associated with this key. + * Response code. */ - user_id?: string | null; + code?: string; /** - * When the API key was last verified. + * Response message. */ - last_verified_on?: string | null; + message?: string; + directory?: Directory; +}; + +export type DeleteDirectoryResponse = { /** - * Number of times this API key has been verified. + * Response code. */ - verification_count?: number; + code?: string; + /** + * Response message. + */ + message?: string; }; -export type webhook = { +export type Directory = { + /** + * The unique ID for the SCIM directory. + */ id?: string; - name?: string; - endpoint?: string; - description?: string; - event_types?: Array; /** - * Created on date in ISO 8601 format. + * The name of the SCIM directory. */ - created_on?: string; -}; - -export type GetApiKeysData = { + directory_name?: string; + /** + * The endpoint ID for the SCIM directory. + */ + directory_endpoint_id?: string; + /** + * The secret token for SCIM authentication. + */ + secret_token?: string; + /** + * The current status of the SCIM directory. + */ + status?: "Pending" | "Validating" | "Active" | "Inactive" | "Error"; + /** + * The organization code this directory belongs to. + */ + organization_code?: string; + /** + * When the last sync started. + */ + last_sync_started_at?: string | null; + /** + * When the last sync completed. + */ + last_sync_completed_at?: string | null; /** - * Filter by API key type (organization or user). + * The last sync error message. */ - keyType?: ("organization" | "user") | null; + last_sync_error?: string | null; /** - * Filter by organization code to get API keys associated with a specific organization. + * When the directory was created. */ - orgCode?: string | null; + created_on?: string; +}; + +/** + * The API's ID. + */ +export type ApiId = string; + +/** + * The application's ID / client ID. + */ +export type ApplicationId = string; + +/** + * The property's key. + */ +export type PropertyKey = string; + +/** + * The environment variable's ID. + */ +export type VariableId = string; + +export type GetApiKeysData = { + body?: never; + path?: never; + query?: { + /** + * Number of results per page. Defaults to 50 if parameter not sent. + */ + page_size?: number | null; + /** + * The ID of the API key to start after. + */ + starting_after?: string | null; + /** + * Filter by API key type (organization or user). + */ + key_type?: "organization" | "user"; + /** + * Filter by API key status (active, inactive, revoked). + */ + status?: "active" | "inactive" | "revoked"; + /** + * Filter by user ID to get API keys associated with a specific user. + */ + user_id?: string | null; + /** + * Filter by organization code to get API keys associated with a specific organization. + */ + org_code?: string | null; + }; + url: "/api/v1/api_keys"; +}; + +export type GetApiKeysErrors = { /** - * Number of results per page. Defaults to 50 if parameter not sent. + * Invalid request. */ - pageSize?: number | null; + 400: ErrorResponse; /** - * The ID of the API key to start after. + * Unauthorized - invalid credentials. */ - startingAfter?: string | null; + 403: ErrorResponse; /** - * Filter by API key status (active, inactive, revoked). + * Too many requests. Request was throttled. */ - status?: ("active" | "inactive" | "revoked") | null; + 429: ErrorResponse; +}; + +export type GetApiKeysError = GetApiKeysErrors[keyof GetApiKeysErrors]; + +export type GetApiKeysResponses = { /** - * Filter by user ID to get API keys associated with a specific user. + * API keys successfully retrieved. */ - userId?: string | null; + 200: GetApiKeysResponse; }; -export type GetApiKeysResponse = get_api_keys_response; +export type GetApiKeysResponse2 = + GetApiKeysResponses[keyof GetApiKeysResponses]; export type CreateApiKeyData = { /** * API key details. */ - requestBody: { + body: { /** * The name of the API key. */ @@ -2867,1042 +2882,2813 @@ export type CreateApiKeyData = { */ org_code?: string | null; }; + path?: never; + query?: never; + url: "/api/v1/api_keys"; }; -export type CreateApiKeyResponse = create_api_key_response; - -export type GetApiKeyData = { +export type CreateApiKeyErrors = { /** - * The ID of the API key. + * Invalid request. */ - keyId: string; -}; - -export type GetApiKeyResponse = get_api_key_response; - -export type DeleteApiKeyData = { + 400: ErrorResponse; /** - * The ID of the API key. + * Unauthorized - invalid credentials. */ - keyId: string; + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type DeleteApiKeyResponse = success_response; +export type CreateApiKeyError = CreateApiKeyErrors[keyof CreateApiKeyErrors]; -export type RotateApiKeyData = { +export type CreateApiKeyResponses = { /** - * The ID of the API key to rotate. + * API key successfully created. */ - keyId: string; + 201: CreateApiKeyResponse; }; -export type RotateApiKeyResponse = rotate_api_key_response; +export type CreateApiKeyResponse2 = + CreateApiKeyResponses[keyof CreateApiKeyResponses]; -export type VerifyApiKeyData = { - /** - * API key verification details. - */ - requestBody: { +export type DeleteApiKeyData = { + body?: never; + path: { /** - * The API key to verify. + * The ID of the API key. */ - api_key: string; + key_id: string; }; + query?: never; + url: "/api/v1/api_keys/{key_id}"; }; -export type VerifyApiKeyResponse = verify_api_key_response; +export type DeleteApiKeyErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; -export type GetApisData = { +export type DeleteApiKeyError = DeleteApiKeyErrors[keyof DeleteApiKeyErrors]; + +export type DeleteApiKeyResponses = { /** - * Additional data to include in the response. Allowed value: "scopes". + * API key successfully deleted. */ - expand?: "scopes" | null; + 200: SuccessResponse; }; -export type GetApisResponse = get_apis_response; +export type DeleteApiKeyResponse = + DeleteApiKeyResponses[keyof DeleteApiKeyResponses]; -export type AddApisData = { - requestBody: { - /** - * The name of the API. (1-64 characters). - */ - name: string; +export type GetApiKeyData = { + body?: never; + path: { /** - * A unique identifier for the API - commonly the URL. This value will be used as the `audience` parameter in authorization claims. (1-64 characters) + * The ID of the API key. */ - audience: string; + key_id: string; }; + query?: never; + url: "/api/v1/api_keys/{key_id}"; }; -export type AddApisResponse = create_apis_response; - -export type GetApiData = { +export type GetApiKeyErrors = { /** - * The API's ID. + * Invalid request. */ - apiId: string; -}; - -export type GetApiResponse = get_api_response; - -export type DeleteApiData = { + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; /** - * The API's ID. + * Too many requests. Request was throttled. */ - apiId: string; + 429: ErrorResponse; }; -export type DeleteApiResponse = delete_api_response; +export type GetApiKeyError = GetApiKeyErrors[keyof GetApiKeyErrors]; -export type GetApiScopesData = { +export type GetApiKeyResponses = { /** - * API ID + * API key successfully retrieved. */ - apiId: string; + 200: GetApiKeyResponse; }; -export type GetApiScopesResponse = get_api_scopes_response; +export type GetApiKeyResponse2 = GetApiKeyResponses[keyof GetApiKeyResponses]; -export type AddApiScopeData = { - /** - * API ID - */ - apiId: string; - requestBody: { - /** - * The key reference for the scope (1-64 characters, no white space). - */ - key: string; +export type RotateApiKeyData = { + body?: never; + path: { /** - * Description of the api scope purpose. + * The ID of the API key to rotate. */ - description?: string; + key_id: string; }; + query?: never; + url: "/api/v1/api_keys/{key_id}"; }; -export type AddApiScopeResponse = create_api_scopes_response; - -export type GetApiScopeData = { +export type RotateApiKeyErrors = { /** - * API ID + * Invalid request. */ - apiId: string; + 400: ErrorResponse; /** - * Scope ID + * Unauthorized - invalid credentials. */ - scopeId: string; -}; - -export type GetApiScopeResponse = get_api_scope_response; - -export type UpdateApiScopeData = { + 403: ErrorResponse; /** - * API ID + * The specified resource was not found */ - apiId: string; - requestBody: { - /** - * Description of the api scope purpose. - */ - description?: string; - }; + 404: NotFoundResponse; /** - * Scope ID + * Too many requests. Request was throttled. */ - scopeId: string; + 429: ErrorResponse; }; -export type UpdateApiScopeResponse = unknown; +export type RotateApiKeyError = RotateApiKeyErrors[keyof RotateApiKeyErrors]; -export type DeleteApiScopeData = { - /** - * API ID - */ - apiId: string; +export type RotateApiKeyResponses = { /** - * Scope ID + * API key successfully rotated. */ - scopeId: string; + 201: RotateApiKeyResponse; }; -export type DeleteApiScopeResponse = unknown; +export type RotateApiKeyResponse2 = + RotateApiKeyResponses[keyof RotateApiKeyResponses]; -export type UpdateApiApplicationsData = { - /** - * The API's ID. - */ - apiId: string; +export type VerifyApiKeyData = { /** - * The applications you want to authorize. + * API key verification details. */ - requestBody: { - applications: Array<{ - /** - * The application's Client ID. - */ - id: string; - /** - * Optional operation, set to 'delete' to revoke authorization for the application. If not set, the application will be authorized. - */ - operation?: string; - }>; + body: { + /** + * The API key to verify. + */ + api_key: string; }; + path?: never; + query?: never; + url: "/api/v1/api_keys/verify"; }; -export type UpdateApiApplicationsResponse = authorize_app_api_response; - -export type AddApiApplicationScopeData = { +export type VerifyApiKeyErrors = { /** - * API ID + * Invalid request. */ - apiId: string; + 400: ErrorResponse; /** - * Application ID + * Unauthorized - invalid credentials. */ - applicationId: string; + 401: ErrorResponse; /** - * Scope ID + * Too many requests. Request was throttled. */ - scopeId: string; + 429: ErrorResponse; }; -export type AddApiApplicationScopeResponse = unknown; +export type VerifyApiKeyError = VerifyApiKeyErrors[keyof VerifyApiKeyErrors]; -export type DeleteApiApplicationScopeData = { - /** - * API ID - */ - apiId: string; - /** - * Application ID - */ - applicationId: string; +export type VerifyApiKeyResponses = { /** - * Scope ID + * API key verification result. */ - scopeId: string; + 200: VerifyApiKeyResponse; }; -export type DeleteApiApplicationScopeResponse = unknown; +export type VerifyApiKeyResponse2 = + VerifyApiKeyResponses[keyof VerifyApiKeyResponses]; -export type GetApplicationsData = { +export type GetApisData = { + body?: never; + path?: never; + query?: { + /** + * Additional data to include in the response. Allowed value: "scopes". + */ + expand?: "scopes"; + }; + url: "/api/v1/apis"; +}; + +export type GetApisErrors = { /** - * A string to get the next page of results if there are more results. + * Invalid request. */ - nextToken?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Unauthorized - invalid credentials. */ - pageSize?: number | null; + 403: ErrorResponse; /** - * Field and order to sort the result by. + * Too many requests. Request was throttled. */ - sort?: ("name_asc" | "name_desc") | null; + 429: ErrorResponse; }; -export type GetApplicationsResponse = get_applications_response; +export type GetApisError = GetApisErrors[keyof GetApisErrors]; -export type CreateApplicationData = { - requestBody: { +export type GetApisResponses = { + /** + * A list of APIs. + */ + 200: GetApisResponse; +}; + +export type GetApisResponse2 = GetApisResponses[keyof GetApisResponses]; + +export type AddApisData = { + body: { /** - * The application's name. + * The name of the API. (1-64 characters). */ name: string; /** - * The application's type. Use `reg` for regular server rendered applications, `spa` for single-page applications, `m2m` for machine-to-machine applications, and `device` for devices and IoT. - */ - type: "reg" | "spa" | "m2m" | "device"; - /** - * Scope an M2M application to an org (Plus plan required). + * A unique identifier for the API - commonly the URL. This value will be used as the `audience` parameter in authorization claims. (1-64 characters) */ - org_code?: string | null; + audience: string; }; + path?: never; + query?: never; + url: "/api/v1/apis"; }; -export type CreateApplicationResponse = create_application_response; - -export type GetApplicationData = { +export type AddApisErrors = { /** - * The identifier for the application. + * Invalid request. */ - applicationId: string; -}; - -export type GetApplicationResponse = get_application_response; - -export type UpdateApplicationData = { + 400: ErrorResponse; /** - * The identifier for the application. + * Unauthorized - invalid credentials. */ - applicationId: string; + 403: ErrorResponse; /** - * Application details. + * Too many requests. Request was throttled. */ - requestBody?: { - /** - * The application's name. - */ - name?: string; - /** - * The application's language key. - */ - language_key?: string; - /** - * The application's logout uris. - */ - logout_uris?: Array; - /** - * The application's redirect uris. - */ - redirect_uris?: Array; - /** - * The default login route for resolving session issues. - */ - login_uri?: string; - /** - * The homepage link to your application. - */ - homepage_uri?: string; - }; + 429: ErrorResponse; }; -export type UpdateApplicationResponse = unknown; +export type AddApisError = AddApisErrors[keyof AddApisErrors]; -export type DeleteApplicationData = { +export type AddApisResponses = { /** - * The identifier for the application. + * APIs successfully updated */ - applicationId: string; + 200: CreateApisResponse; }; -export type DeleteApplicationResponse = success_response; +export type AddApisResponse = AddApisResponses[keyof AddApisResponses]; -export type GetApplicationConnectionsData = { +export type DeleteApiData = { + body?: never; + path: { + /** + * The API's ID. + */ + api_id: string; + }; + query?: never; + url: "/api/v1/apis/{api_id}"; +}; + +export type DeleteApiErrors = { /** - * The identifier/client ID for the application. + * Invalid request. */ - applicationId: string; + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type GetApplicationConnectionsResponse = get_connections_response; +export type DeleteApiError = DeleteApiErrors[keyof DeleteApiErrors]; -export type EnableConnectionData = { - /** - * The identifier/client ID for the application. - */ - applicationId: string; +export type DeleteApiResponses = { /** - * The identifier for the connection. + * API successfully deleted. */ - connectionId: string; + 200: DeleteApiResponse; }; -export type EnableConnectionResponse = unknown; +export type DeleteApiResponse2 = DeleteApiResponses[keyof DeleteApiResponses]; -export type RemoveConnectionData = { +export type GetApiData = { + body?: never; + path: { + /** + * The API's ID. + */ + api_id: string; + }; + query?: never; + url: "/api/v1/apis/{api_id}"; +}; + +export type GetApiErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; /** - * The identifier/client ID for the application. + * Unauthorized - invalid credentials. */ - applicationId: string; + 403: ErrorResponse; /** - * The identifier for the connection. + * Too many requests. Request was throttled. */ - connectionId: string; + 429: ErrorResponse; }; -export type RemoveConnectionResponse = success_response; +export type GetApiError = GetApiErrors[keyof GetApiErrors]; -export type GetApplicationPropertyValuesData = { +export type GetApiResponses = { /** - * The application's ID / client ID. + * API successfully retrieved. */ - applicationId: string; + 200: GetApiResponse; }; -export type GetApplicationPropertyValuesResponse = get_property_values_response; +export type GetApiResponse2 = GetApiResponses[keyof GetApiResponses]; -export type UpdateApplicationsPropertyData = { - /** - * The application's ID / client ID. - */ - applicationId: string; - /** - * The property's key. - */ - propertyKey: string; - requestBody: { +export type GetApiScopesData = { + body?: never; + path: { /** - * The new value for the property + * API ID */ - value: string | boolean; + api_id: string; }; + query?: never; + url: "/api/v1/apis/{api_id}/scopes"; }; -export type UpdateApplicationsPropertyResponse = success_response; - -export type UpdateApplicationTokensData = { +export type GetApiScopesErrors = { /** - * The identifier/client ID for the application. + * Invalid request. */ - applicationId: string; + 400: ErrorResponse; /** - * Application tokens. + * Unauthorized - invalid credentials. */ - requestBody: { - /** - * The lifetime of an access token in seconds. - */ - access_token_lifetime?: number; - /** - * The lifetime of a refresh token in seconds. - */ - refresh_token_lifetime?: number; + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetApiScopesError = GetApiScopesErrors[keyof GetApiScopesErrors]; + +export type GetApiScopesResponses = { + /** + * API scopes successfully retrieved. + */ + 200: GetApiScopesResponse; +}; + +export type GetApiScopesResponse2 = + GetApiScopesResponses[keyof GetApiScopesResponses]; + +export type AddApiScopeData = { + body: { /** - * The lifetime of an ID token in seconds. + * The key reference for the scope (1-64 characters, no white space). */ - id_token_lifetime?: number; + key: string; /** - * The lifetime of an authenticated session in seconds. + * Description of the api scope purpose. */ - authenticated_session_lifetime?: number; + description?: string; + }; + path: { /** - * Enable or disable Hasura mapping. + * API ID */ - is_hasura_mapping_enabled?: boolean; + api_id: string; }; + query?: never; + url: "/api/v1/apis/{api_id}/scopes"; }; -export type UpdateApplicationTokensResponse = success_response; - -export type GetBillingAgreementsData = { - /** - * The ID of the billing customer to retrieve agreements for - */ - customerId: string; - /** - * The ID of the billing agreement to end before. - */ - endingBefore?: string | null; +export type AddApiScopeErrors = { /** - * The feature code to filter by agreements only containing that feature + * Invalid request. */ - featureCode?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Unauthorized - invalid credentials. */ - pageSize?: number | null; + 403: ErrorResponse; /** - * The ID of the billing agreement to start after. + * Too many requests. Request was throttled. */ - startingAfter?: string | null; + 429: ErrorResponse; }; -export type GetBillingAgreementsResponse = get_billing_agreements_response; +export type AddApiScopeError = AddApiScopeErrors[keyof AddApiScopeErrors]; -export type CreateBillingAgreementData = { +export type AddApiScopeResponses = { /** - * New agreement request values + * API scopes successfully created */ - requestBody: { - /** - * The ID of the billing customer to create a new agreement for - */ - customer_id: string; - /** - * The code of the billing plan the new agreement will be based on - */ - plan_code: string; + 200: CreateApiScopesResponse; +}; + +export type AddApiScopeResponse = + AddApiScopeResponses[keyof AddApiScopeResponses]; + +export type DeleteApiScopeData = { + body?: never; + path: { /** - * Generate a final invoice for any un-invoiced metered usage. + * API ID */ - is_invoice_now?: boolean; + api_id: string; /** - * Generate a proration invoice item that credits remaining unused features. + * Scope ID */ - is_prorate?: boolean; + scope_id: string; }; + query?: never; + url: "/api/v1/apis/{api_id}/scopes/{scope_id}"; }; -export type CreateBillingAgreementResponse = success_response; - -export type GetBillingEntitlementsData = { - /** - * The ID of the billing customer to retrieve entitlements for - */ - customerId: string; - /** - * The ID of the billing entitlement to end before. - */ - endingBefore?: string | null; - /** - * Additional plan data to include in the response. Allowed value: "plans". - */ - expand?: "plans" | null; +export type DeleteApiScopeErrors = { /** - * When the maximum limit of an entitlement is null, this value is returned as the maximum limit + * Invalid request. */ - maxValue?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Unauthorized - invalid credentials. */ - pageSize?: number | null; + 403: ErrorResponse; /** - * The ID of the billing entitlement to start after. + * Too many requests. Request was throttled. */ - startingAfter?: string | null; + 429: ErrorResponse; }; -export type GetBillingEntitlementsResponse = get_billing_entitlements_response; +export type DeleteApiScopeError = + DeleteApiScopeErrors[keyof DeleteApiScopeErrors]; -export type CreateMeterUsageRecordData = { +export type DeleteApiScopeResponses = { /** - * Meter usage record + * API scope successfully deleted. */ - requestBody: { + 200: unknown; +}; + +export type GetApiScopeData = { + body?: never; + path: { /** - * The billing agreement against which to record usage + * API ID */ - customer_agreement_id: string; + api_id: string; /** - * The code of the feature within the agreement against which to record usage + * Scope ID */ - billing_feature_code: string; - /** - * The value of usage to record - */ - meter_value: string; - /** - * The date and time the usage needs to be recorded for (defaults to current date/time) - */ - meter_usage_timestamp?: string; - /** - * Absolutes overrides the current usage - */ - meter_type_code?: "absolute" | "delta"; + scope_id: string; }; + query?: never; + url: "/api/v1/apis/{api_id}/scopes/{scope_id}"; }; -export type CreateMeterUsageRecordResponse = create_meter_usage_record_response; +export type GetApiScopeErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; -export type GetBusinessResponse = get_business_response; +export type GetApiScopeError = GetApiScopeErrors[keyof GetApiScopeErrors]; -export type UpdateBusinessData = { +export type GetApiScopeResponses = { /** - * The business details to update. + * API scope successfully retrieved. */ - requestBody: { - /** - * The name of the business. - */ - business_name?: string | null; - /** - * The email address of the business. - */ - email?: string | null; - /** - * The key of the industry of your business. Can be retrieved from the /industries endpoint. - */ - industry_key?: string | null; - /** - * Whether the business is using clickwrap agreements. - */ - is_click_wrap?: boolean | null; - /** - * Whether the business is showing Kinde branding. Requires a paid plan. - */ - is_show_kinde_branding?: boolean | null; - /** - * The Kinde perk code for the business. - */ - kinde_perk_code?: string | null; - /** - * The phone number of the business. - */ - phone?: string | null; + 200: GetApiScopeResponse; +}; + +export type GetApiScopeResponse2 = + GetApiScopeResponses[keyof GetApiScopeResponses]; + +export type UpdateApiScopeData = { + body: { /** - * The URL to the business's privacy policy. + * Description of the api scope purpose. */ - privacy_url?: string | null; + description?: string; + }; + path: { /** - * The URL to the business's terms of service. + * API ID */ - terms_url?: string | null; + api_id: string; /** - * The key of the timezone of your business. Can be retrieved from the /timezones endpoint. + * Scope ID */ - timezone_key?: string | null; + scope_id: string; }; + query?: never; + url: "/api/v1/apis/{api_id}/scopes/{scope_id}"; }; -export type UpdateBusinessResponse = success_response; - -export type GetCallbackUrlsData = { +export type UpdateApiScopeErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; /** - * The identifier for the application. + * Too many requests. Request was throttled. */ - appId: string; + 429: ErrorResponse; }; -export type GetCallbackUrlsResponse = redirect_callback_urls; +export type UpdateApiScopeError = + UpdateApiScopeErrors[keyof UpdateApiScopeErrors]; -export type AddRedirectCallbackUrlsData = { +export type UpdateApiScopeResponses = { /** - * The identifier for the application. + * API scope successfully updated */ - appId: string; + 200: unknown; +}; + +export type UpdateApiApplicationsData = { /** - * Callback details. + * The applications you want to authorize. */ - requestBody: { + body: { + applications: Array<{ + /** + * The application's Client ID. + */ + id: string; + /** + * Optional operation, set to 'delete' to revoke authorization for the application. If not set, the application will be authorized. + */ + operation?: string; + }>; + }; + path: { /** - * Array of callback urls. + * The API's ID. */ - urls?: Array; + api_id: string; }; + query?: never; + url: "/api/v1/apis/{api_id}/applications"; }; -export type AddRedirectCallbackUrlsResponse = success_response; - -export type ReplaceRedirectCallbackUrlsData = { +export type UpdateApiApplicationsErrors = { /** - * The identifier for the application. + * Invalid request. */ - appId: string; + 400: ErrorResponse; /** - * Callback details. + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateApiApplicationsError = + UpdateApiApplicationsErrors[keyof UpdateApiApplicationsErrors]; + +export type UpdateApiApplicationsResponses = { + /** + * Authorized applications updated. */ - requestBody: { + 200: AuthorizeAppApiResponse; +}; + +export type UpdateApiApplicationsResponse = + UpdateApiApplicationsResponses[keyof UpdateApiApplicationsResponses]; + +export type DeleteApiApplicationScopeData = { + body?: never; + path: { /** - * Array of callback urls. + * API ID */ - urls?: Array; + api_id: string; + /** + * Application ID + */ + application_id: string; + /** + * Scope ID + */ + scope_id: string; }; + query?: never; + url: "/api/v1/apis/{api_id}/applications/{application_id}/scopes/{scope_id}"; }; -export type ReplaceRedirectCallbackUrlsResponse = success_response; - -export type DeleteCallbackUrlsData = { +export type DeleteApiApplicationScopeErrors = { /** - * The identifier for the application. + * Invalid request. */ - appId: string; + 400: ErrorResponse; /** - * Urls to delete, comma separated and url encoded. + * Unauthorized - invalid credentials. */ - urls: string; + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type DeleteCallbackUrlsResponse = success_response; +export type DeleteApiApplicationScopeError = + DeleteApiApplicationScopeErrors[keyof DeleteApiApplicationScopeErrors]; -export type GetLogoutUrlsData = { +export type DeleteApiApplicationScopeResponses = { /** - * The identifier for the application. + * API scope successfully deleted. */ - appId: string; + 200: unknown; }; -export type GetLogoutUrlsResponse = logout_redirect_urls; +export type AddApiApplicationScopeData = { + body?: never; + path: { + /** + * API ID + */ + api_id: string; + /** + * Application ID + */ + application_id: string; + /** + * Scope ID + */ + scope_id: string; + }; + query?: never; + url: "/api/v1/apis/{api_id}/applications/{application_id}/scopes/{scope_id}"; +}; -export type AddLogoutRedirectUrlsData = { +export type AddApiApplicationScopeErrors = { /** - * The identifier for the application. + * Invalid request. */ - appId: string; + 400: ErrorResponse; /** - * Callback details. + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type AddApiApplicationScopeError = + AddApiApplicationScopeErrors[keyof AddApiApplicationScopeErrors]; + +export type AddApiApplicationScopeResponses = { + /** + * API scope successfully added to API application */ - requestBody: { + 200: unknown; +}; + +export type GetApplicationsData = { + body?: never; + path?: never; + query?: { /** - * Array of logout urls. + * Field and order to sort the result by. */ - urls?: Array; + sort?: "name_asc" | "name_desc"; + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * A string to get the next page of results if there are more results. + */ + next_token?: string | null; }; + url: "/api/v1/applications"; }; -export type AddLogoutRedirectUrlsResponse = success_response; - -export type ReplaceLogoutRedirectUrlsData = { +export type GetApplicationsErrors = { /** - * The identifier for the application. + * Invalid request. */ - appId: string; + 400: ErrorResponse; /** - * Callback details. + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetApplicationsError = + GetApplicationsErrors[keyof GetApplicationsErrors]; + +export type GetApplicationsResponses = { + /** + * A successful response with a list of applications or an empty list. */ - requestBody: { + 200: GetApplicationsResponse; +}; + +export type GetApplicationsResponse2 = + GetApplicationsResponses[keyof GetApplicationsResponses]; + +export type CreateApplicationData = { + body: { /** - * Array of logout urls. + * The application's name. */ - urls?: Array; + name: string; + /** + * The application's type. Use `reg` for regular server rendered applications, `spa` for single-page applications, `m2m` for machine-to-machine applications, and `device` for devices and IoT. + */ + type: "reg" | "spa" | "m2m" | "device"; + /** + * Scope an M2M application to an org (Plus plan required). + */ + org_code?: string | null; }; + path?: never; + query?: never; + url: "/api/v1/applications"; }; -export type ReplaceLogoutRedirectUrlsResponse = success_response; - -export type DeleteLogoutUrlsData = { +export type CreateApplicationErrors = { /** - * The identifier for the application. + * Invalid request. */ - appId: string; + 400: ErrorResponse; /** - * Urls to delete, comma separated and url encoded. + * Unauthorized - invalid credentials. */ - urls: string; + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type DeleteLogoutUrlsResponse = success_response; +export type CreateApplicationError = + CreateApplicationErrors[keyof CreateApplicationErrors]; -export type GetConnectedAppAuthUrlData = { +export type CreateApplicationResponses = { /** - * The unique key code reference of the connected app to authenticate against. + * Application successfully created. */ - keyCodeRef: string; + 201: CreateApplicationResponse; +}; + +export type CreateApplicationResponse2 = + CreateApplicationResponses[keyof CreateApplicationResponses]; + +export type DeleteApplicationData = { + body?: never; + path: { + /** + * The identifier for the application. + */ + application_id: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}"; +}; + +export type DeleteApplicationErrors = { /** - * The code of the Kinde organization that needs to authenticate to the third-party connected app. + * Invalid request. */ - orgCode?: string; + 400: ErrorResponse; /** - * A URL that overrides the default callback URL setup in your connected app configuration + * Unauthorized - invalid credentials. */ - overrideCallbackUrl?: string; + 403: ErrorResponse; /** - * The id of the user that needs to authenticate to the third-party connected app. + * Too many requests. Request was throttled. */ - userId?: string; + 429: ErrorResponse; }; -export type GetConnectedAppAuthUrlResponse = connected_apps_auth_url; +export type DeleteApplicationError = + DeleteApplicationErrors[keyof DeleteApplicationErrors]; -export type GetConnectedAppTokenData = { +export type DeleteApplicationResponses = { /** - * The unique sesssion id representing the login session of a user. + * Application successfully deleted. */ - sessionId: string; + 200: SuccessResponse; }; -export type GetConnectedAppTokenResponse = connected_apps_access_token; +export type DeleteApplicationResponse = + DeleteApplicationResponses[keyof DeleteApplicationResponses]; -export type RevokeConnectedAppTokenData = { - /** - * The unique sesssion id representing the login session of a user. - */ - sessionId: string; +export type GetApplicationData = { + body?: never; + path: { + /** + * The identifier for the application. + */ + application_id: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}"; }; -export type RevokeConnectedAppTokenResponse = success_response; - -export type GetConnectionsData = { +export type GetApplicationErrors = { /** - * The ID of the connection to end before. + * Invalid request. */ - endingBefore?: string | null; + 400: ErrorResponse; /** - * Filter the results by the home realm domain. + * Unauthorized - invalid credentials. */ - homeRealmDomain?: string | null; + 403: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Too many requests. Request was throttled. */ - pageSize?: number | null; + 429: ErrorResponse; +}; + +export type GetApplicationError = + GetApplicationErrors[keyof GetApplicationErrors]; + +export type GetApplicationResponses = { /** - * The ID of the connection to start after. + * Application successfully retrieved. */ - startingAfter?: string | null; + 200: GetApplicationResponse; }; -export type GetConnectionsResponse = get_connections_response; +export type GetApplicationResponse2 = + GetApplicationResponses[keyof GetApplicationResponses]; -export type CreateConnectionData = { +export type UpdateApplicationData = { /** - * Connection details. + * Application details. */ - requestBody: { + body?: { /** - * The internal name of the connection. + * The application's name. */ name?: string; /** - * The public facing name of the connection. + * The application's language key. */ - display_name?: string; + language_key?: string; /** - * The identity provider identifier for the connection. + * The application's logout uris. */ - strategy?: - | "oauth2:apple" - | "oauth2:azure_ad" - | "oauth2:bitbucket" - | "oauth2:discord" - | "oauth2:facebook" - | "oauth2:github" - | "oauth2:gitlab" - | "oauth2:google" - | "oauth2:linkedin" - | "oauth2:microsoft" - | "oauth2:patreon" - | "oauth2:slack" - | "oauth2:stripe" - | "oauth2:twitch" - | "oauth2:twitter" - | "oauth2:xero" - | "saml:custom" - | "saml:cloudflare" - | "saml:okta" - | "saml:microsoft" - | "saml:google" - | "wsfed:azure_ad"; + logout_uris?: Array; /** - * Client IDs of applications in which this connection is to be enabled. + * The application's redirect uris. */ - enabled_applications?: Array; + redirect_uris?: Array; /** - * Enterprise connections only - the code for organization that manages this connection. + * The default login route for resolving session issues. */ - organization_code?: string | null; - options?: - | { - /** - * OAuth client ID. - */ - client_id?: string; - /** - * OAuth client secret. - */ - client_secret?: string; - /** - * Use custom domain callback URL. - */ - is_use_custom_domain?: boolean; - /** - * Trust this connection for account merging. - */ - is_trusted?: boolean; - } - | { - /** - * Client ID. - */ - client_id?: string; - /** - * Client secret. - */ - client_secret?: string; - /** - * List of domains to limit authentication. - */ - home_realm_domains?: Array; - /** - * Domain for Entra ID. - */ - entra_id_domain?: string; - /** - * Use https://login.windows.net/common instead of a default endpoint. - */ - is_use_common_endpoint?: boolean; - /** - * Sync user profile data with IDP. - */ - is_sync_user_profile_on_login?: boolean; - /** - * Include user group info from MS Entra ID. - */ - is_retrieve_provider_user_groups?: boolean; - /** - * Include additional user profile information. - */ - is_extended_attributes_required?: boolean; - /** - * Users automatically join organization when using this connection. - */ - is_auto_join_organization_enabled?: boolean; - /** - * Create a user record in Kinde if the user signing in does not exist. - */ - is_create_missing_user?: boolean; - /** - * Force showing the SSO button for this connection. - */ - is_force_show_sso_button?: boolean; - /** - * Additional upstream parameters to pass to the identity provider. - */ - upstream_params?: { - [key: string]: unknown; - }; - /** - * Use custom domain callback URL. - */ - is_use_custom_domain?: boolean; - /** - * Trust this connection for account merging. - */ - is_trusted?: boolean; - } - | { - /** - * List of domains to restrict authentication. - */ - home_realm_domains?: Array; - /** - * SAML Entity ID. - */ - saml_entity_id?: string; - /** - * URL for the IdP metadata. - */ - saml_idp_metadata_url?: string; - /** - * Override the default SSO endpoint with a URL your IdP recognizes. - */ - saml_sign_in_url?: string; - /** - * Algorithm used to sign SAML requests. - */ - sign_request_algorithm?: "RSA-SHA256" | "RSA-SHA1"; - /** - * Protocol binding used to send SAML requests. - */ - protocol_binding?: "HTTP-REDIRECT" | "HTTP-POST"; - /** - * Format for the Name ID used to identify users in SAML responses. - */ - name_id_format?: - | "Persistent" - | "Transient" - | "Email address" - | "Unspecified"; - /** - * Attribute key for the user's email. - */ - saml_email_key_attr?: string; - /** - * Attribute key for the user's ID. - */ - saml_user_id_key_attr?: string; - /** - * Attribute key for the user's first name. - */ - saml_first_name_key_attr?: string; - /** - * Attribute key for the user's last name. - */ - saml_last_name_key_attr?: string; - /** - * Create user if they don't exist. - */ - is_create_missing_user?: boolean; - /** - * Force showing the SSO button for this connection. - */ - is_force_show_sso_button?: boolean; - /** - * Additional upstream parameters to pass to the identity provider. - */ - upstream_params?: { - [key: string]: unknown; - }; - /** - * Certificate for signing SAML requests. - */ - saml_signing_certificate?: string; - /** - * Private key associated with the signing certificate. - */ - saml_signing_private_key?: string; - /** - * Users automatically join organization when using this connection. - */ - is_auto_join_organization_enabled?: boolean; - /** - * Use custom domain callback URL. - */ - is_use_custom_domain?: boolean; - /** - * Trust this connection for account merging. - */ - is_trusted?: boolean; - }; + login_uri?: string; + /** + * The homepage link to your application. + */ + homepage_uri?: string; }; + path: { + /** + * The identifier for the application. + */ + application_id: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}"; +}; + +export type UpdateApplicationErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type CreateConnectionResponse = create_connection_response; +export type UpdateApplicationError = + UpdateApplicationErrors[keyof UpdateApplicationErrors]; -export type GetConnectionData = { +export type UpdateApplicationResponses = { /** - * The unique identifier for the connection. + * Application successfully updated. */ - connectionId: string; + 200: unknown; }; -export type GetConnectionResponse = connection; +export type GetApplicationConnectionsData = { + body?: never; + path: { + /** + * The identifier/client ID for the application. + */ + application_id: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}/connections"; +}; -export type UpdateConnectionData = { +export type GetApplicationConnectionsErrors = { /** - * The unique identifier for the connection. + * Invalid request. */ - connectionId: string; + 400: ErrorResponse; /** - * The fields of the connection to update. + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetApplicationConnectionsError = + GetApplicationConnectionsErrors[keyof GetApplicationConnectionsErrors]; + +export type GetApplicationConnectionsResponses = { + /** + * Application connections successfully retrieved. */ - requestBody: { + 200: GetConnectionsResponse; +}; + +export type GetApplicationConnectionsResponse = + GetApplicationConnectionsResponses[keyof GetApplicationConnectionsResponses]; + +export type RemoveConnectionData = { + body?: never; + path: { /** - * The internal name of the connection. + * The identifier/client ID for the application. */ - name?: string; + application_id: string; /** - * The public facing name of the connection. + * The identifier for the connection. */ - display_name?: string; + connection_id: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}/connections/{connection_id}"; +}; + +export type RemoveConnectionErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type RemoveConnectionError = + RemoveConnectionErrors[keyof RemoveConnectionErrors]; + +export type RemoveConnectionResponses = { + /** + * Connection successfully removed. + */ + 200: SuccessResponse; +}; + +export type RemoveConnectionResponse = + RemoveConnectionResponses[keyof RemoveConnectionResponses]; + +export type EnableConnectionData = { + body?: never; + path: { /** - * Client IDs of applications in which this connection is to be enabled. + * The identifier/client ID for the application. */ - enabled_applications?: Array; - options?: - | { - /** - * OAuth client ID. - */ - client_id?: string; - /** - * OAuth client secret. - */ - client_secret?: string; - /** - * Use custom domain callback URL. - */ - is_use_custom_domain?: boolean; - /** - * Trust this connection for account merging. - */ - is_trusted?: boolean; - } - | { - /** - * Client ID. - */ - client_id?: string; - /** - * Client secret. - */ - client_secret?: string; - /** - * List of domains to limit authentication. - */ - home_realm_domains?: Array; - /** - * Domain for Entra ID. - */ - entra_id_domain?: string; - /** - * Use https://login.windows.net/common instead of a default endpoint. - */ - is_use_common_endpoint?: boolean; - /** - * Sync user profile data with IDP. - */ - is_sync_user_profile_on_login?: boolean; - /** - * Include user group info from MS Entra ID. + application_id: string; + /** + * The identifier for the connection. + */ + connection_id: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}/connections/{connection_id}"; +}; + +export type EnableConnectionErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type EnableConnectionError = + EnableConnectionErrors[keyof EnableConnectionErrors]; + +export type EnableConnectionResponses = { + /** + * Connection successfully enabled. + */ + 200: unknown; +}; + +export type GetApplicationPropertyValuesData = { + body?: never; + path: { + /** + * The application's ID / client ID. + */ + application_id: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}/properties"; +}; + +export type GetApplicationPropertyValuesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetApplicationPropertyValuesError = + GetApplicationPropertyValuesErrors[keyof GetApplicationPropertyValuesErrors]; + +export type GetApplicationPropertyValuesResponses = { + /** + * Properties successfully retrieved. + */ + 200: GetPropertyValuesResponse; +}; + +export type GetApplicationPropertyValuesResponse = + GetApplicationPropertyValuesResponses[keyof GetApplicationPropertyValuesResponses]; + +export type UpdateApplicationsPropertyData = { + body: { + /** + * The new value for the property + */ + value: string | boolean; + }; + path: { + /** + * The application's ID / client ID. + */ + application_id: string; + /** + * The property's key. + */ + property_key: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}/properties/{property_key}"; +}; + +export type UpdateApplicationsPropertyErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateApplicationsPropertyError = + UpdateApplicationsPropertyErrors[keyof UpdateApplicationsPropertyErrors]; + +export type UpdateApplicationsPropertyResponses = { + /** + * Property successfully updated + */ + 200: SuccessResponse; +}; + +export type UpdateApplicationsPropertyResponse = + UpdateApplicationsPropertyResponses[keyof UpdateApplicationsPropertyResponses]; + +export type UpdateApplicationTokensData = { + /** + * Application tokens. + */ + body: { + /** + * The lifetime of an access token in seconds. + */ + access_token_lifetime?: number; + /** + * The lifetime of a refresh token in seconds. + */ + refresh_token_lifetime?: number; + /** + * The lifetime of an ID token in seconds. + */ + id_token_lifetime?: number; + /** + * The lifetime of an authenticated session in seconds. + */ + authenticated_session_lifetime?: number; + /** + * Enable or disable Hasura mapping. + */ + is_hasura_mapping_enabled?: boolean; + }; + path: { + /** + * The identifier/client ID for the application. + */ + application_id: string; + }; + query?: never; + url: "/api/v1/applications/{application_id}/tokens"; +}; + +export type UpdateApplicationTokensErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateApplicationTokensError = + UpdateApplicationTokensErrors[keyof UpdateApplicationTokensErrors]; + +export type UpdateApplicationTokensResponses = { + /** + * Application tokens successfully updated. + */ + 200: SuccessResponse; +}; + +export type UpdateApplicationTokensResponse = + UpdateApplicationTokensResponses[keyof UpdateApplicationTokensResponses]; + +export type GetBillingEntitlementsData = { + body?: never; + path?: never; + query: { + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * The ID of the billing entitlement to start after. + */ + starting_after?: string | null; + /** + * The ID of the billing entitlement to end before. + */ + ending_before?: string | null; + /** + * The ID of the billing customer to retrieve entitlements for + */ + customer_id: string; + /** + * When the maximum limit of an entitlement is null, this value is returned as the maximum limit + */ + max_value?: string | null; + /** + * Additional plan data to include in the response. Allowed value: "plans". + */ + expand?: "plans"; + }; + url: "/api/v1/billing/entitlements"; +}; + +export type GetBillingEntitlementsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetBillingEntitlementsError = + GetBillingEntitlementsErrors[keyof GetBillingEntitlementsErrors]; + +export type GetBillingEntitlementsResponses = { + /** + * Billing entitlements successfully retrieved. + */ + 200: GetBillingEntitlementsResponse; +}; + +export type GetBillingEntitlementsResponse2 = + GetBillingEntitlementsResponses[keyof GetBillingEntitlementsResponses]; + +export type GetBillingAgreementsData = { + body?: never; + path?: never; + query: { + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * The ID of the billing agreement to start after. + */ + starting_after?: string | null; + /** + * The ID of the billing agreement to end before. + */ + ending_before?: string | null; + /** + * The ID of the billing customer to retrieve agreements for + */ + customer_id: string; + /** + * The feature code to filter by agreements only containing that feature + */ + feature_code?: string | null; + }; + url: "/api/v1/billing/agreements"; +}; + +export type GetBillingAgreementsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetBillingAgreementsError = + GetBillingAgreementsErrors[keyof GetBillingAgreementsErrors]; + +export type GetBillingAgreementsResponses = { + /** + * Billing agreements successfully retrieved. + */ + 200: GetBillingAgreementsResponse; +}; + +export type GetBillingAgreementsResponse2 = + GetBillingAgreementsResponses[keyof GetBillingAgreementsResponses]; + +export type CreateBillingAgreementData = { + /** + * New agreement request values + */ + body: { + /** + * The ID of the billing customer to create a new agreement for + */ + customer_id: string; + /** + * The code of the billing plan the new agreement will be based on + */ + plan_code: string; + /** + * Generate a final invoice for any un-invoiced metered usage. + */ + is_invoice_now?: boolean; + /** + * Generate a proration invoice item that credits remaining unused features. + */ + is_prorate?: boolean; + }; + path?: never; + query?: never; + url: "/api/v1/billing/agreements"; +}; + +export type CreateBillingAgreementErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type CreateBillingAgreementError = + CreateBillingAgreementErrors[keyof CreateBillingAgreementErrors]; + +export type CreateBillingAgreementResponses = { + /** + * Billing agreement successfully changed + */ + 200: SuccessResponse; +}; + +export type CreateBillingAgreementResponse = + CreateBillingAgreementResponses[keyof CreateBillingAgreementResponses]; + +export type CreateMeterUsageRecordData = { + /** + * Meter usage record + */ + body: { + /** + * The billing agreement against which to record usage + */ + customer_agreement_id: string; + /** + * The code of the feature within the agreement against which to record usage + */ + billing_feature_code: string; + /** + * The value of usage to record + */ + meter_value: string; + /** + * The date and time the usage needs to be recorded for (defaults to current date/time) + */ + meter_usage_timestamp?: string; + /** + * Absolutes overrides the current usage + */ + meter_type_code?: "absolute" | "delta"; + }; + path?: never; + query?: never; + url: "/api/v1/billing/meter_usage"; +}; + +export type CreateMeterUsageRecordErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type CreateMeterUsageRecordError = + CreateMeterUsageRecordErrors[keyof CreateMeterUsageRecordErrors]; + +export type CreateMeterUsageRecordResponses = { + /** + * Meter usage record successfully created. + */ + 200: CreateMeterUsageRecordResponse; +}; + +export type CreateMeterUsageRecordResponse2 = + CreateMeterUsageRecordResponses[keyof CreateMeterUsageRecordResponses]; + +export type GetBusinessData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/business"; +}; + +export type GetBusinessErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetBusinessError = GetBusinessErrors[keyof GetBusinessErrors]; + +export type GetBusinessResponses = { + /** + * Your business details. + */ + 200: GetBusinessResponse; +}; + +export type GetBusinessResponse2 = + GetBusinessResponses[keyof GetBusinessResponses]; + +export type UpdateBusinessData = { + /** + * The business details to update. + */ + body: { + /** + * The name of the business. + */ + business_name?: string | null; + /** + * The email address of the business. + */ + email?: string | null; + /** + * The key of the industry of your business. Can be retrieved from the /industries endpoint. + */ + industry_key?: string | null; + /** + * Whether the business is using clickwrap agreements. + */ + is_click_wrap?: boolean | null; + /** + * Whether the business is showing Kinde branding. Requires a paid plan. + */ + is_show_kinde_branding?: boolean | null; + /** + * The Kinde perk code for the business. + */ + kinde_perk_code?: string | null; + /** + * The phone number of the business. + */ + phone?: string | null; + /** + * The URL to the business's privacy policy. + */ + privacy_url?: string | null; + /** + * The URL to the business's terms of service. + */ + terms_url?: string | null; + /** + * The key of the timezone of your business. Can be retrieved from the /timezones endpoint. + */ + timezone_key?: string | null; + }; + path?: never; + query?: never; + url: "/api/v1/business"; +}; + +export type UpdateBusinessErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateBusinessError = + UpdateBusinessErrors[keyof UpdateBusinessErrors]; + +export type UpdateBusinessResponses = { + /** + * Business successfully updated. + */ + 200: SuccessResponse; +}; + +export type UpdateBusinessResponse = + UpdateBusinessResponses[keyof UpdateBusinessResponses]; + +export type GetIndustriesData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/industries"; +}; + +export type GetIndustriesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetIndustriesError = GetIndustriesErrors[keyof GetIndustriesErrors]; + +export type GetIndustriesResponses = { + /** + * A list of industries. + */ + 200: GetIndustriesResponse; +}; + +export type GetIndustriesResponse2 = + GetIndustriesResponses[keyof GetIndustriesResponses]; + +export type GetTimezonesData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/timezones"; +}; + +export type GetTimezonesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetTimezonesError = GetTimezonesErrors[keyof GetTimezonesErrors]; + +export type GetTimezonesResponses = { + /** + * A list of timezones. + */ + 200: GetTimezonesResponse; +}; + +export type GetTimezonesResponse2 = + GetTimezonesResponses[keyof GetTimezonesResponses]; + +export type DeleteCallbackUrlsData = { + body?: never; + path: { + /** + * The identifier for the application. + */ + app_id: string; + }; + query: { + /** + * Urls to delete, comma separated and url encoded. + */ + urls: string; + }; + url: "/api/v1/applications/{app_id}/auth_redirect_urls"; +}; + +export type DeleteCallbackUrlsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type DeleteCallbackUrlsError = + DeleteCallbackUrlsErrors[keyof DeleteCallbackUrlsErrors]; + +export type DeleteCallbackUrlsResponses = { + /** + * Callback URLs successfully deleted. + */ + 200: SuccessResponse; +}; + +export type DeleteCallbackUrlsResponse = + DeleteCallbackUrlsResponses[keyof DeleteCallbackUrlsResponses]; + +export type GetCallbackUrlsData = { + body?: never; + path: { + /** + * The identifier for the application. + */ + app_id: string; + }; + query?: never; + url: "/api/v1/applications/{app_id}/auth_redirect_urls"; +}; + +export type GetCallbackUrlsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetCallbackUrlsError = + GetCallbackUrlsErrors[keyof GetCallbackUrlsErrors]; + +export type GetCallbackUrlsResponses = { + /** + * Callback URLs successfully retrieved. + */ + 200: RedirectCallbackUrls; +}; + +export type GetCallbackUrlsResponse = + GetCallbackUrlsResponses[keyof GetCallbackUrlsResponses]; + +export type AddRedirectCallbackUrlsData = { + /** + * Callback details. + */ + body: { + /** + * Array of callback urls. + */ + urls?: Array; + }; + path: { + /** + * The identifier for the application. + */ + app_id: string; + }; + query?: never; + url: "/api/v1/applications/{app_id}/auth_redirect_urls"; +}; + +export type AddRedirectCallbackUrlsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type AddRedirectCallbackUrlsError = + AddRedirectCallbackUrlsErrors[keyof AddRedirectCallbackUrlsErrors]; + +export type AddRedirectCallbackUrlsResponses = { + /** + * Callbacks successfully updated + */ + 200: SuccessResponse; +}; + +export type AddRedirectCallbackUrlsResponse = + AddRedirectCallbackUrlsResponses[keyof AddRedirectCallbackUrlsResponses]; + +export type ReplaceRedirectCallbackUrlsData = { + /** + * Callback details. + */ + body: { + /** + * Array of callback urls. + */ + urls?: Array; + }; + path: { + /** + * The identifier for the application. + */ + app_id: string; + }; + query?: never; + url: "/api/v1/applications/{app_id}/auth_redirect_urls"; +}; + +export type ReplaceRedirectCallbackUrlsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type ReplaceRedirectCallbackUrlsError = + ReplaceRedirectCallbackUrlsErrors[keyof ReplaceRedirectCallbackUrlsErrors]; + +export type ReplaceRedirectCallbackUrlsResponses = { + /** + * Callbacks successfully updated + */ + 200: SuccessResponse; +}; + +export type ReplaceRedirectCallbackUrlsResponse = + ReplaceRedirectCallbackUrlsResponses[keyof ReplaceRedirectCallbackUrlsResponses]; + +export type DeleteLogoutUrlsData = { + body?: never; + path: { + /** + * The identifier for the application. + */ + app_id: string; + }; + query: { + /** + * Urls to delete, comma separated and url encoded. + */ + urls: string; + }; + url: "/api/v1/applications/{app_id}/auth_logout_urls"; +}; + +export type DeleteLogoutUrlsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteLogoutUrlsError = + DeleteLogoutUrlsErrors[keyof DeleteLogoutUrlsErrors]; + +export type DeleteLogoutUrlsResponses = { + /** + * Logout URLs successfully deleted. + */ + 200: SuccessResponse; +}; + +export type DeleteLogoutUrlsResponse = + DeleteLogoutUrlsResponses[keyof DeleteLogoutUrlsResponses]; + +export type GetLogoutUrlsData = { + body?: never; + path: { + /** + * The identifier for the application. + */ + app_id: string; + }; + query?: never; + url: "/api/v1/applications/{app_id}/auth_logout_urls"; +}; + +export type GetLogoutUrlsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetLogoutUrlsError = GetLogoutUrlsErrors[keyof GetLogoutUrlsErrors]; + +export type GetLogoutUrlsResponses = { + /** + * Logout URLs successfully retrieved. + */ + 200: LogoutRedirectUrls; +}; + +export type GetLogoutUrlsResponse = + GetLogoutUrlsResponses[keyof GetLogoutUrlsResponses]; + +export type AddLogoutRedirectUrlsData = { + /** + * Callback details. + */ + body: { + /** + * Array of logout urls. + */ + urls?: Array; + }; + path: { + /** + * The identifier for the application. + */ + app_id: string; + }; + query?: never; + url: "/api/v1/applications/{app_id}/auth_logout_urls"; +}; + +export type AddLogoutRedirectUrlsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type AddLogoutRedirectUrlsError = + AddLogoutRedirectUrlsErrors[keyof AddLogoutRedirectUrlsErrors]; + +export type AddLogoutRedirectUrlsResponses = { + /** + * Logout URLs successfully updated. + */ + 200: SuccessResponse; +}; + +export type AddLogoutRedirectUrlsResponse = + AddLogoutRedirectUrlsResponses[keyof AddLogoutRedirectUrlsResponses]; + +export type ReplaceLogoutRedirectUrlsData = { + /** + * Callback details. + */ + body: { + /** + * Array of logout urls. + */ + urls?: Array; + }; + path: { + /** + * The identifier for the application. + */ + app_id: string; + }; + query?: never; + url: "/api/v1/applications/{app_id}/auth_logout_urls"; +}; + +export type ReplaceLogoutRedirectUrlsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type ReplaceLogoutRedirectUrlsError = + ReplaceLogoutRedirectUrlsErrors[keyof ReplaceLogoutRedirectUrlsErrors]; + +export type ReplaceLogoutRedirectUrlsResponses = { + /** + * Logout URLs successfully updated. + */ + 200: SuccessResponse; +}; + +export type ReplaceLogoutRedirectUrlsResponse = + ReplaceLogoutRedirectUrlsResponses[keyof ReplaceLogoutRedirectUrlsResponses]; + +export type GetConnectedAppAuthUrlData = { + body?: never; + path?: never; + query: { + /** + * The unique key code reference of the connected app to authenticate against. + */ + key_code_ref: string; + /** + * The id of the user that needs to authenticate to the third-party connected app. + */ + user_id?: string; + /** + * The code of the Kinde organization that needs to authenticate to the third-party connected app. + */ + org_code?: string; + /** + * A URL that overrides the default callback URL setup in your connected app configuration + */ + override_callback_url?: string; + }; + url: "/api/v1/connected_apps/auth_url"; +}; + +export type GetConnectedAppAuthUrlErrors = { + /** + * Error retrieving connected app auth url. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Error retrieving connected app auth url. + */ + 404: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetConnectedAppAuthUrlError = + GetConnectedAppAuthUrlErrors[keyof GetConnectedAppAuthUrlErrors]; + +export type GetConnectedAppAuthUrlResponses = { + /** + * A URL that can be used to authenticate and a session id to identify this authentication session. + */ + 200: ConnectedAppsAuthUrl; +}; + +export type GetConnectedAppAuthUrlResponse = + GetConnectedAppAuthUrlResponses[keyof GetConnectedAppAuthUrlResponses]; + +export type GetConnectedAppTokenData = { + body?: never; + path?: never; + query: { + /** + * The unique sesssion id representing the login session of a user. + */ + session_id: string; + }; + url: "/api/v1/connected_apps/token"; +}; + +export type GetConnectedAppTokenErrors = { + /** + * The session id provided points to an invalid session. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetConnectedAppTokenError = + GetConnectedAppTokenErrors[keyof GetConnectedAppTokenErrors]; + +export type GetConnectedAppTokenResponses = { + /** + * An access token that can be used to query a third-party provider, as well as the token's expiry time. + */ + 200: ConnectedAppsAccessToken; +}; + +export type GetConnectedAppTokenResponse = + GetConnectedAppTokenResponses[keyof GetConnectedAppTokenResponses]; + +export type RevokeConnectedAppTokenData = { + body?: never; + path?: never; + query: { + /** + * The unique sesssion id representing the login session of a user. + */ + session_id: string; + }; + url: "/api/v1/connected_apps/revoke"; +}; + +export type RevokeConnectedAppTokenErrors = { + /** + * Bad request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Invalid HTTP method used. + */ + 405: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type RevokeConnectedAppTokenError = + RevokeConnectedAppTokenErrors[keyof RevokeConnectedAppTokenErrors]; + +export type RevokeConnectedAppTokenResponses = { + /** + * An access token that can be used to query a third-party provider, as well as the token's expiry time. + */ + 200: SuccessResponse; +}; + +export type RevokeConnectedAppTokenResponse = + RevokeConnectedAppTokenResponses[keyof RevokeConnectedAppTokenResponses]; + +export type GetConnectionsData = { + body?: never; + path?: never; + query?: { + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * Filter the results by the home realm domain. + */ + home_realm_domain?: string | null; + /** + * The ID of the connection to start after. + */ + starting_after?: string | null; + /** + * The ID of the connection to end before. + */ + ending_before?: string | null; + }; + url: "/api/v1/connections"; +}; + +export type GetConnectionsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetConnectionsError = + GetConnectionsErrors[keyof GetConnectionsErrors]; + +export type GetConnectionsResponses = { + /** + * Connections successfully retrieved. + */ + 200: GetConnectionsResponse; +}; + +export type GetConnectionsResponse2 = + GetConnectionsResponses[keyof GetConnectionsResponses]; + +export type CreateConnectionData = { + /** + * Connection details. + */ + body: { + /** + * The internal name of the connection. + */ + name?: string; + /** + * The public facing name of the connection. + */ + display_name?: string; + /** + * The identity provider identifier for the connection. + */ + strategy?: + | "oauth2:apple" + | "oauth2:azure_ad" + | "oauth2:bitbucket" + | "oauth2:discord" + | "oauth2:facebook" + | "oauth2:github" + | "oauth2:gitlab" + | "oauth2:google" + | "oauth2:linkedin" + | "oauth2:microsoft" + | "oauth2:patreon" + | "oauth2:slack" + | "oauth2:stripe" + | "oauth2:twitch" + | "oauth2:twitter" + | "oauth2:xero" + | "saml:custom" + | "saml:cloudflare" + | "saml:okta" + | "saml:microsoft" + | "saml:google" + | "wsfed:azure_ad"; + /** + * Client IDs of applications in which this connection is to be enabled. + */ + enabled_applications?: Array; + /** + * Enterprise connections only - the code for organization that manages this connection. + */ + organization_code?: string | null; + options?: + | { + /** + * OAuth client ID. + */ + client_id?: string; + /** + * OAuth client secret. + */ + client_secret?: string; + /** + * Use custom domain callback URL. + */ + is_use_custom_domain?: boolean; + /** + * Trust this connection for account merging. + */ + is_trusted?: boolean; + } + | { + /** + * Client ID. + */ + client_id?: string; + /** + * Client secret. + */ + client_secret?: string; + /** + * List of domains to limit authentication. + */ + home_realm_domains?: Array; + /** + * Domain for Entra ID. + */ + entra_id_domain?: string; + /** + * Use https://login.windows.net/common instead of a default endpoint. + */ + is_use_common_endpoint?: boolean; + /** + * Sync user profile data with IDP. + */ + is_sync_user_profile_on_login?: boolean; + /** + * Include user group info from MS Entra ID. + */ + is_retrieve_provider_user_groups?: boolean; + /** + * Include additional user profile information. + */ + is_extended_attributes_required?: boolean; + /** + * Users automatically join organization when using this connection. + */ + is_auto_join_organization_enabled?: boolean; + /** + * Create a user record in Kinde if the user signing in does not exist. + */ + is_create_missing_user?: boolean; + /** + * Force showing the SSO button for this connection. + */ + is_force_show_sso_button?: boolean; + /** + * Additional upstream parameters to pass to the identity provider. + */ + upstream_params?: { + [key: string]: unknown; + }; + /** + * Use custom domain callback URL. + */ + is_use_custom_domain?: boolean; + /** + * Trust this connection for account merging. + */ + is_trusted?: boolean; + } + | { + /** + * List of domains to restrict authentication. + */ + home_realm_domains?: Array; + /** + * SAML Entity ID. + */ + saml_entity_id?: string; + /** + * URL for the IdP metadata. + */ + saml_idp_metadata_url?: string; + /** + * Override the default SSO endpoint with a URL your IdP recognizes. + */ + saml_sign_in_url?: string; + /** + * Algorithm used to sign SAML requests. + */ + sign_request_algorithm?: "RSA-SHA256" | "RSA-SHA1"; + /** + * Protocol binding used to send SAML requests. + */ + protocol_binding?: "HTTP-REDIRECT" | "HTTP-POST"; + /** + * Format for the Name ID used to identify users in SAML responses. + */ + name_id_format?: + | "Persistent" + | "Transient" + | "Email address" + | "Unspecified"; + /** + * Attribute key for the user's email. + */ + saml_email_key_attr?: string; + /** + * Attribute key for the user's ID. + */ + saml_user_id_key_attr?: string; + /** + * Attribute key for the user's first name. + */ + saml_first_name_key_attr?: string; + /** + * Attribute key for the user's last name. + */ + saml_last_name_key_attr?: string; + /** + * Create user if they don't exist. + */ + is_create_missing_user?: boolean; + /** + * Force showing the SSO button for this connection. + */ + is_force_show_sso_button?: boolean; + /** + * Additional upstream parameters to pass to the identity provider. + */ + upstream_params?: { + [key: string]: unknown; + }; + /** + * Certificate for signing SAML requests. + */ + saml_signing_certificate?: string; + /** + * Private key associated with the signing certificate. + */ + saml_signing_private_key?: string; + /** + * Users automatically join organization when using this connection. + */ + is_auto_join_organization_enabled?: boolean; + /** + * Use custom domain callback URL. + */ + is_use_custom_domain?: boolean; + /** + * Trust this connection for account merging. + */ + is_trusted?: boolean; + }; + }; + path?: never; + query?: never; + url: "/api/v1/connections"; +}; + +export type CreateConnectionErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type CreateConnectionError = + CreateConnectionErrors[keyof CreateConnectionErrors]; + +export type CreateConnectionResponses = { + /** + * Connection successfully created. + */ + 201: CreateConnectionResponse; +}; + +export type CreateConnectionResponse2 = + CreateConnectionResponses[keyof CreateConnectionResponses]; + +export type DeleteConnectionData = { + body?: never; + path: { + /** + * The identifier for the connection. + */ + connection_id: string; + }; + query?: never; + url: "/api/v1/connections/{connection_id}"; +}; + +export type DeleteConnectionErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteConnectionError = + DeleteConnectionErrors[keyof DeleteConnectionErrors]; + +export type DeleteConnectionResponses = { + /** + * Connection successfully deleted. + */ + 200: SuccessResponse; +}; + +export type DeleteConnectionResponse = + DeleteConnectionResponses[keyof DeleteConnectionResponses]; + +export type GetConnectionData = { + body?: never; + path: { + /** + * The unique identifier for the connection. + */ + connection_id: string; + }; + query?: never; + url: "/api/v1/connections/{connection_id}"; +}; + +export type GetConnectionErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetConnectionError = GetConnectionErrors[keyof GetConnectionErrors]; + +export type GetConnectionResponses = { + /** + * Connection successfully retrieved. + */ + 200: Connection; +}; + +export type GetConnectionResponse = + GetConnectionResponses[keyof GetConnectionResponses]; + +export type UpdateConnectionData = { + /** + * The fields of the connection to update. + */ + body: { + /** + * The internal name of the connection. + */ + name?: string; + /** + * The public facing name of the connection. + */ + display_name?: string; + /** + * Client IDs of applications in which this connection is to be enabled. + */ + enabled_applications?: Array; + options?: + | { + /** + * OAuth client ID. + */ + client_id?: string; + /** + * OAuth client secret. + */ + client_secret?: string; + /** + * Use custom domain callback URL. + */ + is_use_custom_domain?: boolean; + /** + * Trust this connection for account merging. + */ + is_trusted?: boolean; + } + | { + /** + * Client ID. + */ + client_id?: string; + /** + * Client secret. + */ + client_secret?: string; + /** + * List of domains to limit authentication. + */ + home_realm_domains?: Array; + /** + * Domain for Entra ID. + */ + entra_id_domain?: string; + /** + * Use https://login.windows.net/common instead of a default endpoint. + */ + is_use_common_endpoint?: boolean; + /** + * Sync user profile data with IDP. + */ + is_sync_user_profile_on_login?: boolean; + /** + * Include user group info from MS Entra ID. + */ + is_retrieve_provider_user_groups?: boolean; + /** + * Include additional user profile information. + */ + is_extended_attributes_required?: boolean; + /** + * Create users if they don't exist in the system. + */ + is_create_missing_user?: boolean; + /** + * Force showing the SSO button for this connection. + */ + is_force_show_sso_button?: boolean; + /** + * Additional upstream parameters to pass to the identity provider. + */ + upstream_params?: { + [key: string]: unknown; + }; + /** + * Use custom domain callback URL. + */ + is_use_custom_domain?: boolean; + /** + * Trust this connection for account merging. + */ + is_trusted?: boolean; + } + | { + /** + * List of domains to restrict authentication. + */ + home_realm_domains?: Array; + /** + * SAML Entity ID. + */ + saml_entity_id?: string; + /** + * URL for the IdP metadata. + */ + saml_idp_metadata_url?: string; + /** + * Override the default SSO endpoint with a URL your IdP recognizes. + */ + saml_sign_in_url?: string; + /** + * Algorithm used to sign SAML requests. + */ + sign_request_algorithm?: "RSA-SHA256" | "RSA-SHA1"; + /** + * Protocol binding used to send SAML requests. + */ + protocol_binding?: "HTTP-REDIRECT" | "HTTP-POST"; + /** + * Format for the Name ID used to identify users in SAML responses. + */ + name_id_format?: + | "Persistent" + | "Transient" + | "Email address" + | "Unspecified"; + /** + * Attribute key for the user's email. + */ + saml_email_key_attr?: string; + /** + * Attribute key for the user's ID. + */ + saml_user_id_key_attr?: string; + /** + * Attribute key for the user's first name. + */ + saml_first_name_key_attr?: string; + /** + * Attribute key for the user's last name. + */ + saml_last_name_key_attr?: string; + /** + * Create user if they don't exist. + */ + is_create_missing_user?: boolean; + /** + * Force showing the SSO button for this connection. + */ + is_force_show_sso_button?: boolean; + /** + * Additional upstream parameters to pass to the identity provider. + */ + upstream_params?: { + [key: string]: unknown; + }; + /** + * Certificate for signing SAML requests. + */ + saml_signing_certificate?: string; + /** + * Private key associated with the signing certificate. + */ + saml_signing_private_key?: string; + /** + * Use custom domain callback URL. + */ + is_use_custom_domain?: boolean; + /** + * Trust this connection for account merging. + */ + is_trusted?: boolean; + }; + }; + path: { + /** + * The unique identifier for the connection. + */ + connection_id: string; + }; + query?: never; + url: "/api/v1/connections/{connection_id}"; +}; + +export type UpdateConnectionErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateConnectionError = + UpdateConnectionErrors[keyof UpdateConnectionErrors]; + +export type UpdateConnectionResponses = { + /** + * Connection successfully updated. + */ + 200: SuccessResponse; +}; + +export type UpdateConnectionResponse = + UpdateConnectionResponses[keyof UpdateConnectionResponses]; + +export type ReplaceConnectionData = { + /** + * The complete connection configuration to replace the existing one. + */ + body: { + /** + * The internal name of the connection. + */ + name?: string; + /** + * The public-facing name of the connection. + */ + display_name?: string; + /** + * Client IDs of applications in which this connection is to be enabled. + */ + enabled_applications?: Array; + options?: + | { + /** + * OAuth client ID. + */ + client_id?: string; + /** + * OAuth client secret. + */ + client_secret?: string; + /** + * Use custom domain callback URL. + */ + is_use_custom_domain?: boolean; + /** + * Trust this connection for account merging. + */ + is_trusted?: boolean; + } + | { + /** + * Client ID. + */ + client_id?: string; + /** + * Client secret. + */ + client_secret?: string; + /** + * List of domains to limit authentication. + */ + home_realm_domains?: Array; + /** + * Domain for Entra ID. + */ + entra_id_domain?: string; + /** + * Use https://login.windows.net/common instead of a default endpoint. + */ + is_use_common_endpoint?: boolean; + /** + * Sync user profile data with IDP. + */ + is_sync_user_profile_on_login?: boolean; + /** + * Include user group info from MS Entra ID. */ is_retrieve_provider_user_groups?: boolean; /** @@ -3910,7 +5696,7 @@ export type UpdateConnectionData = { */ is_extended_attributes_required?: boolean; /** - * Create users if they don't exist in the system. + * Create a user record in Kinde if the user signing in does not exist. */ is_create_missing_user?: boolean; /** @@ -3945,10 +5731,6 @@ export type UpdateConnectionData = { * URL for the IdP metadata. */ saml_idp_metadata_url?: string; - /** - * Override the default SSO endpoint with a URL your IdP recognizes. - */ - saml_sign_in_url?: string; /** * Algorithm used to sign SAML requests. */ @@ -4013,1989 +5795,4794 @@ export type UpdateConnectionData = { is_trusted?: boolean; }; }; + path: { + /** + * The unique identifier for the connection. + */ + connection_id: string; + }; + query?: never; + url: "/api/v1/connections/{connection_id}"; +}; + +export type ReplaceConnectionErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type ReplaceConnectionError = + ReplaceConnectionErrors[keyof ReplaceConnectionErrors]; + +export type ReplaceConnectionResponses = { + /** + * Connection successfully updated + */ + 200: SuccessResponse; +}; + +export type ReplaceConnectionResponse = + ReplaceConnectionResponses[keyof ReplaceConnectionResponses]; + +export type GetDirectoriesData = { + body?: never; + path?: never; + query?: { + /** + * Number of results per page. Defaults to 50 if parameter not sent. + */ + page_size?: number | null; + /** + * The ID of the directory to start after. + */ + starting_after?: string | null; + /** + * Filter by organization code to get directories for a specific organization. + */ + organization_code?: string | null; + }; + url: "/api/v1/directories"; +}; + +export type GetDirectoriesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetDirectoriesError = + GetDirectoriesErrors[keyof GetDirectoriesErrors]; + +export type GetDirectoriesResponses = { + /** + * SCIM directories successfully retrieved. + */ + 200: GetDirectoriesResponse; +}; + +export type GetDirectoriesResponse2 = + GetDirectoriesResponses[keyof GetDirectoriesResponses]; + +export type CreateDirectoryData = { + body: { + /** + * The organization code to create the SCIM directory for. + */ + org_code: string; + /** + * A descriptive name for the SCIM directory. + */ + directory_name: string; + /** + * The SCIM provider code to use for this directory. + */ + provider_code: + | "entra_id_azure_ad" + | "okta" + | "google_workspace" + | "custom_scim_v2" + | "cyberark" + | "jumpcloud" + | "onelogin" + | "pingfederate" + | "rippling"; + }; + path?: never; + query?: never; + url: "/api/v1/directories"; +}; + +export type CreateDirectoryErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Conflict - Directory already exists. + */ + 409: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type CreateDirectoryError = + CreateDirectoryErrors[keyof CreateDirectoryErrors]; + +export type CreateDirectoryResponses = { + /** + * SCIM directory successfully created. + */ + 201: CreateDirectoryResponse; +}; + +export type CreateDirectoryResponse2 = + CreateDirectoryResponses[keyof CreateDirectoryResponses]; + +export type DeleteDirectoryData = { + body?: never; + path: { + /** + * The directory's ID. + */ + directory_id: string; + }; + query?: never; + url: "/api/v1/directories/{directory_id}"; +}; + +export type DeleteDirectoryErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteDirectoryError = + DeleteDirectoryErrors[keyof DeleteDirectoryErrors]; + +export type DeleteDirectoryResponses = { + /** + * SCIM directory successfully deleted. + */ + 200: DeleteDirectoryResponse; +}; + +export type DeleteDirectoryResponse2 = + DeleteDirectoryResponses[keyof DeleteDirectoryResponses]; + +export type GetDirectoryData = { + body?: never; + path: { + /** + * The directory's ID. + */ + directory_id: string; + }; + query?: never; + url: "/api/v1/directories/{directory_id}"; +}; + +export type GetDirectoryErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetDirectoryError = GetDirectoryErrors[keyof GetDirectoryErrors]; + +export type GetDirectoryResponses = { + /** + * SCIM directory successfully retrieved. + */ + 200: GetDirectoryResponse; +}; + +export type GetDirectoryResponse2 = + GetDirectoryResponses[keyof GetDirectoryResponses]; + +export type UpdateDirectoryData = { + body: { + /** + * A descriptive name for the SCIM directory. + */ + directory_name: string; + }; + path: { + /** + * The directory's ID. + */ + directory_id: string; + }; + query?: never; + url: "/api/v1/directories/{directory_id}"; +}; + +export type UpdateDirectoryErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateDirectoryError = + UpdateDirectoryErrors[keyof UpdateDirectoryErrors]; + +export type UpdateDirectoryResponses = { + /** + * SCIM directory successfully updated. + */ + 200: UpdateDirectoryResponse; +}; + +export type UpdateDirectoryResponse2 = + UpdateDirectoryResponses[keyof UpdateDirectoryResponses]; + +export type GetEnvironmentData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/environment"; +}; + +export type GetEnvironmentErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetEnvironmentError = + GetEnvironmentErrors[keyof GetEnvironmentErrors]; + +export type GetEnvironmentResponses = { + /** + * Environment successfully retrieved. + */ + 200: GetEnvironmentResponse; +}; + +export type GetEnvironmentResponse2 = + GetEnvironmentResponses[keyof GetEnvironmentResponses]; + +export type DeleteEnvironementFeatureFlagOverridesData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/environment/feature_flags"; +}; + +export type DeleteEnvironementFeatureFlagOverridesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type DeleteEnvironementFeatureFlagOverridesError = + DeleteEnvironementFeatureFlagOverridesErrors[keyof DeleteEnvironementFeatureFlagOverridesErrors]; + +export type DeleteEnvironementFeatureFlagOverridesResponses = { + /** + * Feature flag overrides deleted successfully. + */ + 200: SuccessResponse; +}; + +export type DeleteEnvironementFeatureFlagOverridesResponse = + DeleteEnvironementFeatureFlagOverridesResponses[keyof DeleteEnvironementFeatureFlagOverridesResponses]; + +export type GetEnvironementFeatureFlagsData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/environment/feature_flags"; +}; + +export type GetEnvironementFeatureFlagsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetEnvironementFeatureFlagsError = + GetEnvironementFeatureFlagsErrors[keyof GetEnvironementFeatureFlagsErrors]; + +export type GetEnvironementFeatureFlagsResponses = { + /** + * Feature flags retrieved successfully. + */ + 200: GetEnvironmentFeatureFlagsResponse; +}; + +export type GetEnvironementFeatureFlagsResponse = + GetEnvironementFeatureFlagsResponses[keyof GetEnvironementFeatureFlagsResponses]; + +export type DeleteEnvironementFeatureFlagOverrideData = { + body?: never; + path: { + /** + * The identifier for the feature flag. + */ + feature_flag_key: string; + }; + query?: never; + url: "/api/v1/environment/feature_flags/{feature_flag_key}"; +}; + +export type DeleteEnvironementFeatureFlagOverrideErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type DeleteEnvironementFeatureFlagOverrideError = + DeleteEnvironementFeatureFlagOverrideErrors[keyof DeleteEnvironementFeatureFlagOverrideErrors]; + +export type DeleteEnvironementFeatureFlagOverrideResponses = { + /** + * Feature flag deleted successfully. + */ + 200: SuccessResponse; +}; + +export type DeleteEnvironementFeatureFlagOverrideResponse = + DeleteEnvironementFeatureFlagOverrideResponses[keyof DeleteEnvironementFeatureFlagOverrideResponses]; + +export type UpdateEnvironementFeatureFlagOverrideData = { + /** + * Flag details. + */ + body: { + /** + * The flag override value. + */ + value: string; + }; + path: { + /** + * The identifier for the feature flag. + */ + feature_flag_key: string; + }; + query?: never; + url: "/api/v1/environment/feature_flags/{feature_flag_key}"; +}; + +export type UpdateEnvironementFeatureFlagOverrideErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type UpdateEnvironementFeatureFlagOverrideError = + UpdateEnvironementFeatureFlagOverrideErrors[keyof UpdateEnvironementFeatureFlagOverrideErrors]; + +export type UpdateEnvironementFeatureFlagOverrideResponses = { + /** + * Feature flag override successful + */ + 200: SuccessResponse; +}; + +export type UpdateEnvironementFeatureFlagOverrideResponse = + UpdateEnvironementFeatureFlagOverrideResponses[keyof UpdateEnvironementFeatureFlagOverrideResponses]; + +export type ReadLogoData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/environment/logos"; +}; + +export type ReadLogoErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type ReadLogoError = ReadLogoErrors[keyof ReadLogoErrors]; + +export type ReadLogoResponses = { + /** + * Success + */ + 200: ReadEnvLogoResponse; +}; + +export type ReadLogoResponse2 = ReadLogoResponses[keyof ReadLogoResponses]; + +export type DeleteLogoData = { + body?: never; + path: { + /** + * The type of logo to delete. + */ + type: "dark" | "light"; + }; + query?: never; + url: "/api/v1/environment/logos/{type}"; +}; + +export type DeleteLogoErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteLogoError = DeleteLogoErrors[keyof DeleteLogoErrors]; + +export type DeleteLogoResponses = { + /** + * Logo successfully deleted + */ + 200: SuccessResponse; + /** + * No logo found to delete + */ + 204: void; +}; + +export type DeleteLogoResponse = DeleteLogoResponses[keyof DeleteLogoResponses]; + +export type AddLogoData = { + /** + * Logo details. + */ + body: { + /** + * The logo file to upload. + */ + logo: Blob | File; + }; + path: { + /** + * The type of logo to add. + */ + type: "dark" | "light"; + }; + query?: never; + url: "/api/v1/environment/logos/{type}"; +}; + +export type AddLogoErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type AddLogoError = AddLogoErrors[keyof AddLogoErrors]; + +export type AddLogoResponses = { + /** + * Logo successfully updated + */ + 200: SuccessResponse; +}; + +export type AddLogoResponse = AddLogoResponses[keyof AddLogoResponses]; + +export type GetEnvironmentVariablesData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/environment_variables"; +}; + +export type GetEnvironmentVariablesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetEnvironmentVariablesError = + GetEnvironmentVariablesErrors[keyof GetEnvironmentVariablesErrors]; + +export type GetEnvironmentVariablesResponses = { + /** + * A successful response with a list of environment variables or an empty list. + */ + 200: GetEnvironmentVariablesResponse; +}; + +export type GetEnvironmentVariablesResponse2 = + GetEnvironmentVariablesResponses[keyof GetEnvironmentVariablesResponses]; + +export type CreateEnvironmentVariableData = { + /** + * The environment variable details. + */ + body: { + /** + * The name of the environment variable (max 128 characters). + */ + key: string; + /** + * The value of the new environment variable (max 2048 characters). + */ + value: string; + /** + * Whether the environment variable is sensitive. Secrets are not-readable by you or your team after creation. + */ + is_secret?: boolean; + }; + path?: never; + query?: never; + url: "/api/v1/environment_variables"; +}; + +export type CreateEnvironmentVariableErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type CreateEnvironmentVariableError = + CreateEnvironmentVariableErrors[keyof CreateEnvironmentVariableErrors]; + +export type CreateEnvironmentVariableResponses = { + /** + * Environment variable successfully created. + */ + 201: CreateEnvironmentVariableResponse; +}; + +export type CreateEnvironmentVariableResponse2 = + CreateEnvironmentVariableResponses[keyof CreateEnvironmentVariableResponses]; + +export type DeleteEnvironmentVariableData = { + body?: never; + path: { + /** + * The environment variable's ID. + */ + variable_id: string; + }; + query?: never; + url: "/api/v1/environment_variables/{variable_id}"; +}; + +export type DeleteEnvironmentVariableErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteEnvironmentVariableError = + DeleteEnvironmentVariableErrors[keyof DeleteEnvironmentVariableErrors]; + +export type DeleteEnvironmentVariableResponses = { + /** + * Environment variable successfully deleted. + */ + 200: DeleteEnvironmentVariableResponse; +}; + +export type DeleteEnvironmentVariableResponse2 = + DeleteEnvironmentVariableResponses[keyof DeleteEnvironmentVariableResponses]; + +export type GetEnvironmentVariableData = { + body?: never; + path: { + /** + * The environment variable's ID. + */ + variable_id: string; + }; + query?: never; + url: "/api/v1/environment_variables/{variable_id}"; +}; + +export type GetEnvironmentVariableErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetEnvironmentVariableError = + GetEnvironmentVariableErrors[keyof GetEnvironmentVariableErrors]; + +export type GetEnvironmentVariableResponses = { + /** + * Environment variable successfully retrieved. + */ + 200: GetEnvironmentVariableResponse; +}; + +export type GetEnvironmentVariableResponse2 = + GetEnvironmentVariableResponses[keyof GetEnvironmentVariableResponses]; + +export type UpdateEnvironmentVariableData = { + /** + * The new details for the environment variable + */ + body: { + /** + * The key to update. + */ + key?: string; + /** + * The new value for the environment variable. + */ + value?: string; + /** + * Whether the environment variable is sensitive. Secret variables are not-readable by you or your team after creation. + */ + is_secret?: boolean; + }; + path: { + /** + * The environment variable's ID. + */ + variable_id: string; + }; + query?: never; + url: "/api/v1/environment_variables/{variable_id}"; +}; + +export type UpdateEnvironmentVariableErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateEnvironmentVariableError = + UpdateEnvironmentVariableErrors[keyof UpdateEnvironmentVariableErrors]; + +export type UpdateEnvironmentVariableResponses = { + /** + * Environment variable successfully updated. + */ + 200: UpdateEnvironmentVariableResponse; +}; + +export type UpdateEnvironmentVariableResponse2 = + UpdateEnvironmentVariableResponses[keyof UpdateEnvironmentVariableResponses]; + +export type CreateFeatureFlagData = { + /** + * Flag details. + */ + body: { + /** + * The name of the flag. + */ + name: string; + /** + * Description of the flag purpose. + */ + description?: string; + /** + * The flag identifier to use in code. + */ + key: string; + /** + * The variable type. + */ + type: "str" | "int" | "bool"; + /** + * Allow the flag to be overridden at a different level. + */ + allow_override_level?: "env" | "org" | "usr"; + /** + * Default value for the flag used by environments and organizations. + */ + default_value: string; + }; + path?: never; + query?: never; + url: "/api/v1/feature_flags"; +}; + +export type CreateFeatureFlagErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type CreateFeatureFlagError = + CreateFeatureFlagErrors[keyof CreateFeatureFlagErrors]; + +export type CreateFeatureFlagResponses = { + /** + * Feature flag successfully created + */ + 201: SuccessResponse; +}; + +export type CreateFeatureFlagResponse = + CreateFeatureFlagResponses[keyof CreateFeatureFlagResponses]; + +export type DeleteFeatureFlagData = { + body?: never; + path: { + /** + * The identifier for the feature flag. + */ + feature_flag_key: string; + }; + query?: never; + url: "/api/v1/feature_flags/{feature_flag_key}"; +}; + +export type DeleteFeatureFlagErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type DeleteFeatureFlagError = + DeleteFeatureFlagErrors[keyof DeleteFeatureFlagErrors]; + +export type DeleteFeatureFlagResponses = { + /** + * Feature flag successfully updated. + */ + 200: SuccessResponse; +}; + +export type DeleteFeatureFlagResponse = + DeleteFeatureFlagResponses[keyof DeleteFeatureFlagResponses]; + +export type UpdateFeatureFlagData = { + body?: never; + path: { + /** + * The key identifier for the feature flag. + */ + feature_flag_key: string; + }; + query: { + /** + * The name of the flag. + */ + name: string; + /** + * Description of the flag purpose. + */ + description: string; + /** + * The variable type + */ + type: "str" | "int" | "bool"; + /** + * Allow the flag to be overridden at a different level. + */ + allow_override_level: "env" | "org"; + /** + * Default value for the flag used by environments and organizations. + */ + default_value: string; + }; + url: "/api/v1/feature_flags/{feature_flag_key}"; +}; + +export type UpdateFeatureFlagErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type UpdateFeatureFlagError = + UpdateFeatureFlagErrors[keyof UpdateFeatureFlagErrors]; + +export type UpdateFeatureFlagResponses = { + /** + * Feature flag successfully updated. + */ + 200: SuccessResponse; +}; + +export type UpdateFeatureFlagResponse = + UpdateFeatureFlagResponses[keyof UpdateFeatureFlagResponses]; + +export type DeleteIdentityData = { + body?: never; + path: { + /** + * The unique identifier for the identity. + */ + identity_id: string; + }; + query?: never; + url: "/api/v1/identities/{identity_id}"; +}; + +export type DeleteIdentityErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type DeleteIdentityError = + DeleteIdentityErrors[keyof DeleteIdentityErrors]; + +export type DeleteIdentityResponses = { + /** + * Identity successfully deleted. + */ + 200: SuccessResponse; +}; + +export type DeleteIdentityResponse = + DeleteIdentityResponses[keyof DeleteIdentityResponses]; + +export type GetIdentityData = { + body?: never; + path: { + /** + * The unique identifier for the identity. + */ + identity_id: string; + }; + query?: never; + url: "/api/v1/identities/{identity_id}"; +}; + +export type GetIdentityErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetIdentityError = GetIdentityErrors[keyof GetIdentityErrors]; + +export type GetIdentityResponses = { + /** + * Identity successfully retrieved. + */ + 200: Identity; +}; + +export type GetIdentityResponse = + GetIdentityResponses[keyof GetIdentityResponses]; + +export type UpdateIdentityData = { + /** + * The fields of the identity to update. + */ + body: { + /** + * Whether the identity is the primary for it's type + */ + is_primary?: boolean; + }; + path: { + /** + * The unique identifier for the identity. + */ + identity_id: string; + }; + query?: never; + url: "/api/v1/identities/{identity_id}"; +}; + +export type UpdateIdentityErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type UpdateIdentityError = + UpdateIdentityErrors[keyof UpdateIdentityErrors]; + +export type UpdateIdentityResponses = { + /** + * Identity successfully updated. + */ + 200: SuccessResponse; +}; + +export type UpdateIdentityResponse = + UpdateIdentityResponses[keyof UpdateIdentityResponses]; + +export type GetOrganizationInvitesData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + }; + query?: { + /** + * Field and order to sort the result by. + */ + sort?: + | "created_on_asc" + | "created_on_desc" + | "email_asc" + | "email_desc" + | "name_asc" + | "name_desc"; + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * A string to get the next page of results if there are more results. + */ + next_token?: string | null; + /** + * Include revoked invitations in the results. + */ + include_revoked?: boolean | null; + /** + * Include accepted invitations in the results. + */ + include_accepted?: boolean | null; + }; + url: "/api/v1/organization/{org_code}/invites"; +}; + +export type GetOrganizationInvitesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetOrganizationInvitesError = + GetOrganizationInvitesErrors[keyof GetOrganizationInvitesErrors]; + +export type GetOrganizationInvitesResponses = { + /** + * Invitations successfully retrieved. + */ + 200: GetOrganizationInvitesResponse; +}; + +export type GetOrganizationInvitesResponse2 = + GetOrganizationInvitesResponses[keyof GetOrganizationInvitesResponses]; + +export type CreateOrganizationInviteData = { + /** + * Invitation details. `email` is capped at 254 characters (RFC 5321). `first_name` and `last_name` are capped at 64 characters each. Inputs over these limits are rejected with `EMAIL_TOO_LONG`, `FIRST_NAME_TOO_LONG`, or `LAST_NAME_TOO_LONG`. + */ + body: { + /** + * The email address of the user to invite. Maximum 254 characters. + */ + email: string; + /** + * The first name of the user to invite. Maximum 64 characters. + */ + first_name?: string | null; + /** + * The last name of the user to invite. Maximum 64 characters. + */ + last_name?: string | null; + /** + * Array of role keys to assign to the user. + */ + roles: Array; + /** + * Whether to send an invitation email to the user. Defaults to false. + */ + send_email?: boolean; + }; + path: { + /** + * The organization's code. + */ + org_code: string; + }; + query?: never; + url: "/api/v1/organization/{org_code}/invites"; +}; + +export type CreateOrganizationInviteErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type CreateOrganizationInviteError = + CreateOrganizationInviteErrors[keyof CreateOrganizationInviteErrors]; + +export type CreateOrganizationInviteResponses = { + /** + * Invitation successfully created. + */ + 201: CreateOrganizationInviteResponse; +}; + +export type CreateOrganizationInviteResponse2 = + CreateOrganizationInviteResponses[keyof CreateOrganizationInviteResponses]; + +export type DeleteOrganizationInviteData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The invitation's code. + */ + invite_code: string; + }; + query?: never; + url: "/api/v1/organization/{org_code}/invites/{invite_code}"; +}; + +export type DeleteOrganizationInviteErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteOrganizationInviteError = + DeleteOrganizationInviteErrors[keyof DeleteOrganizationInviteErrors]; + +export type DeleteOrganizationInviteResponses = { + /** + * Invitation successfully revoked. + */ + 200: SuccessResponse; +}; + +export type DeleteOrganizationInviteResponse = + DeleteOrganizationInviteResponses[keyof DeleteOrganizationInviteResponses]; + +export type GetOrganizationInviteData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The invitation's code. + */ + invite_code: string; + }; + query?: never; + url: "/api/v1/organization/{org_code}/invites/{invite_code}"; +}; + +export type GetOrganizationInviteErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetOrganizationInviteError = + GetOrganizationInviteErrors[keyof GetOrganizationInviteErrors]; + +export type GetOrganizationInviteResponses = { + /** + * Invitation successfully retrieved. + */ + 200: GetOrganizationInviteResponse; +}; + +export type GetOrganizationInviteResponse2 = + GetOrganizationInviteResponses[keyof GetOrganizationInviteResponses]; + +export type ReplaceMfaData = { + /** + * MFA details. + */ + body: { + /** + * Specifies whether MFA is required, optional, or not enforced. + */ + policy: "required" | "off" | "optional"; + /** + * The MFA methods to enable. + */ + enabled_factors: Array<"mfa:email" | "mfa:sms" | "mfa:authenticator_app">; + /** + * Determines whether recovery codes are shown to users during MFA setup for the environment. + */ + is_recovery_codes_enabled?: boolean; + }; + path?: never; + query?: never; + url: "/api/v1/mfa"; +}; + +export type ReplaceMfaErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type ReplaceMfaError = ReplaceMfaErrors[keyof ReplaceMfaErrors]; + +export type ReplaceMfaResponses = { + /** + * MFA Configuration updated successfully. + */ + 200: SuccessResponse; +}; + +export type ReplaceMfaResponse = ReplaceMfaResponses[keyof ReplaceMfaResponses]; + +export type GetOrganizationData = { + body?: never; + path?: never; + query?: { + /** + * The organization's code. + */ + code?: string; + /** + * Additional data to include in the response. Allowed value: "billing". + */ + expand?: string; + }; + url: "/api/v1/organization"; +}; + +export type GetOrganizationErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetOrganizationError = + GetOrganizationErrors[keyof GetOrganizationErrors]; + +export type GetOrganizationResponses = { + /** + * Organization successfully retrieved. + */ + 200: GetOrganizationResponse; +}; + +export type GetOrganizationResponse2 = + GetOrganizationResponses[keyof GetOrganizationResponses]; + +export type CreateOrganizationData = { + /** + * Organization details. + */ + body: { + /** + * The organization's name. + */ + name: string; + /** + * The organization's feature flag settings. + */ + feature_flags?: { + [key: string]: "str" | "int" | "bool"; + }; + /** + * The organization's external identifier - commonly used when migrating from or mapping to other systems. + */ + external_id?: string; + /** + * The organization's brand settings - background color. + */ + background_color?: string; + /** + * The organization's brand settings - button color. + */ + button_color?: string; + /** + * The organization's brand settings - button text color. + */ + button_text_color?: string; + /** + * The organization's brand settings - link color. + */ + link_color?: string; + /** + * The organization's brand settings - dark mode background color. + */ + background_color_dark?: string; + /** + * The organization's brand settings - dark mode button color. + */ + button_color_dark?: string; + /** + * The organization's brand settings - dark mode button text color. + */ + button_text_color_dark?: string; + /** + * The organization's brand settings - dark mode link color. + */ + link_color_dark?: string; + /** + * The organization's brand settings - theme/mode 'light' | 'dark' | 'user_preference'. + */ + theme_code?: string; + /** + * A unique handle for the organization - can be used for dynamic callback urls. + */ + handle?: string; + /** + * Deprecated - Use 'is_auto_membership_enabled' instead. + * + * @deprecated + */ + is_allow_registrations?: boolean; + /** + * If users become members of this organization when the org code is supplied during authentication. + */ + is_auto_membership_enabled?: boolean; + /** + * The name of the organization that will be used in emails + */ + sender_name?: string | null; + /** + * The email address that will be used in emails. Requires custom SMTP to be set up. + */ + sender_email?: string | null; + /** + * If a billing customer is also created for this organization + */ + is_create_billing_customer?: boolean; + /** + * The email address used for billing purposes for the organization + */ + billing_email?: string; + /** + * The billing plan to put the customer on. If not specified, the default plan is used + */ + billing_plan_code?: string; + }; + path?: never; + query?: never; + url: "/api/v1/organization"; +}; + +export type CreateOrganizationErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type CreateOrganizationError = + CreateOrganizationErrors[keyof CreateOrganizationErrors]; + +export type CreateOrganizationResponses = { + /** + * Organization successfully created. + */ + 200: CreateOrganizationResponse; +}; + +export type CreateOrganizationResponse2 = + CreateOrganizationResponses[keyof CreateOrganizationResponses]; + +export type GetOrganizationsData = { + body?: never; + path?: never; + query?: { + /** + * Field and order to sort the result by. + */ + sort?: "name_asc" | "name_desc" | "email_asc" | "email_desc"; + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * A string to get the next page of results if there are more results. + */ + next_token?: string | null; + }; + url: "/api/v1/organizations"; +}; + +export type GetOrganizationsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetOrganizationsError = + GetOrganizationsErrors[keyof GetOrganizationsErrors]; + +export type GetOrganizationsResponses = { + /** + * Organizations successfully retreived. + */ + 200: GetOrganizationsResponse; +}; + +export type GetOrganizationsResponse2 = + GetOrganizationsResponses[keyof GetOrganizationsResponses]; + +export type DeleteOrganizationData = { + body?: never; + path: { + /** + * The identifier for the organization. + */ + org_code: string; + }; + query?: never; + url: "/api/v1/organization/{org_code}"; +}; + +export type DeleteOrganizationErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteOrganizationError = + DeleteOrganizationErrors[keyof DeleteOrganizationErrors]; + +export type DeleteOrganizationResponses = { + /** + * Organization successfully deleted. + */ + 200: SuccessResponse; +}; + +export type DeleteOrganizationResponse = + DeleteOrganizationResponses[keyof DeleteOrganizationResponses]; + +export type UpdateOrganizationData = { + /** + * Organization details. + */ + body?: { + /** + * The organization's name. + */ + name?: string; + /** + * The organization's ID. + */ + external_id?: string; + /** + * The organization's brand settings - background color. + */ + background_color?: string; + /** + * The organization's brand settings - button color. + */ + button_color?: string; + /** + * The organization's brand settings - button text color. + */ + button_text_color?: string; + /** + * The organization's brand settings - link color. + */ + link_color?: string; + /** + * The organization's brand settings - dark mode background color. + */ + background_color_dark?: string; + /** + * The organization's brand settings - dark mode button color. + */ + button_color_dark?: string; + /** + * The organization's brand settings - dark mode button text color. + */ + button_text_color_dark?: string; + /** + * The organization's brand settings - dark mode link color. + */ + link_color_dark?: string; + /** + * The organization's brand settings - theme/mode. + */ + theme_code?: "light" | "dark" | "user_preference"; + /** + * The organization's handle. + */ + handle?: string; + /** + * Deprecated - Use 'is_auto_membership_enabled' instead. + * + * @deprecated + */ + is_allow_registrations?: boolean; + /** + * If users become members of this organization when the org code is supplied during authentication. + */ + is_auto_membership_enabled?: boolean; + /** + * Users can sign up to this organization. + */ + is_auto_join_domain_list?: boolean; + /** + * Domains allowed for self-sign up to this environment. + */ + allowed_domains?: Array; + /** + * Activate advanced organization features. + */ + is_enable_advanced_orgs?: boolean; + /** + * Enforce MFA for all users in this organization. + */ + is_enforce_mfa?: boolean; + /** + * The name of the organization that will be used in emails + */ + sender_name?: string | null; + /** + * The email address that will be used in emails. Requires custom SMTP to be set up. + */ + sender_email?: string | null; + /** + * Whether to suspend or unsuspend the organization. Setting to true suspends the organization; setting to false unsuspends it. The default organization cannot be suspended. + */ + is_suspended?: boolean; + }; + path: { + /** + * The identifier for the organization. + */ + org_code: string; + }; + query?: { + /** + * Additional data to include in the response. Allowed value: "billing". + */ + expand?: "billing"; + }; + url: "/api/v1/organization/{org_code}"; +}; + +export type UpdateOrganizationErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateOrganizationError = + UpdateOrganizationErrors[keyof UpdateOrganizationErrors]; + +export type UpdateOrganizationResponses = { + /** + * Organization successfully updated. + */ + 200: SuccessResponse; +}; + +export type UpdateOrganizationResponse = + UpdateOrganizationResponses[keyof UpdateOrganizationResponses]; + +export type GetOrganizationUsersData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + }; + query?: { + /** + * Field and order to sort the result by. + */ + sort?: + | "name_asc" + | "name_desc" + | "email_asc" + | "email_desc" + | "id_asc" + | "id_desc"; + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * A string to get the next page of results if there are more results. + */ + next_token?: string | null; + /** + * Filter by user permissions comma separated (where all match) + */ + permissions?: string; + /** + * Filter by user roles comma separated (where all match) + */ + roles?: string; + }; + url: "/api/v1/organizations/{org_code}/users"; +}; + +export type GetOrganizationUsersErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetOrganizationUsersError = + GetOrganizationUsersErrors[keyof GetOrganizationUsersErrors]; + +export type GetOrganizationUsersResponses = { + /** + * A successful response with a list of organization users or an empty list. + */ + 200: GetOrganizationUsersResponse; +}; + +export type GetOrganizationUsersResponse2 = + GetOrganizationUsersResponses[keyof GetOrganizationUsersResponses]; + +export type UpdateOrganizationUsersData = { + body?: { + /** + * Users to add, update or remove from the organization. + */ + users?: Array<{ + /** + * The users id. + */ + id?: string; + /** + * Optional operation, set to 'delete' to remove the user from the organization. + */ + operation?: string; + /** + * Role keys to assign to the user. + */ + roles?: Array; + /** + * Permission keys to assign to the user. + */ + permissions?: Array; + }>; + }; + path: { + /** + * The organization's code. + */ + org_code: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users"; +}; + +export type UpdateOrganizationUsersErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type UpdateOrganizationUsersError = + UpdateOrganizationUsersErrors[keyof UpdateOrganizationUsersErrors]; + +export type UpdateOrganizationUsersResponses = { + /** + * Users successfully removed. + */ + 200: UpdateOrganizationUsersResponse; +}; + +export type UpdateOrganizationUsersResponse2 = + UpdateOrganizationUsersResponses[keyof UpdateOrganizationUsersResponses]; + +export type AddOrganizationUsersData = { + body?: { + /** + * Users to be added to the organization. + */ + users?: Array<{ + /** + * The users id. + */ + id?: string; + /** + * Role keys to assign to the user. + */ + roles?: Array; + /** + * Permission keys to assign to the user. + */ + permissions?: Array; + }>; + }; + path: { + /** + * The organization's code. + */ + org_code: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users"; +}; + +export type AddOrganizationUsersErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type AddOrganizationUsersError = + AddOrganizationUsersErrors[keyof AddOrganizationUsersErrors]; + +export type AddOrganizationUsersResponses = { + /** + * Add organization users request successfully processed. + */ + 200: AddOrganizationUsersResponse; +}; + +export type AddOrganizationUsersResponse2 = + AddOrganizationUsersResponses[keyof AddOrganizationUsersResponses]; + +export type GetOrganizationUserRolesData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The user's id. + */ + user_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/roles"; +}; + +export type GetOrganizationUserRolesErrors = { + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetOrganizationUserRolesResponses = { + /** + * A successful response with a list of user roles. + */ + 200: GetOrganizationsUserRolesResponse; +}; + +export type GetOrganizationUserRolesResponse = + GetOrganizationUserRolesResponses[keyof GetOrganizationUserRolesResponses]; + +export type CreateOrganizationUserRoleData = { + /** + * Role details. + */ + body: { + /** + * The role id. + */ + role_id?: string; + }; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The user's id. + */ + user_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/roles"; +}; + +export type CreateOrganizationUserRoleErrors = { + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type CreateOrganizationUserRoleResponses = { + /** + * Role successfully added. + */ + 200: SuccessResponse; +}; + +export type CreateOrganizationUserRoleResponse = + CreateOrganizationUserRoleResponses[keyof CreateOrganizationUserRoleResponses]; + +export type DeleteOrganizationUserRoleData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The user's id. + */ + user_id: string; + /** + * The role id. + */ + role_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/roles/{role_id}"; +}; + +export type DeleteOrganizationUserRoleErrors = { + /** + * Error creating user. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type DeleteOrganizationUserRoleError = + DeleteOrganizationUserRoleErrors[keyof DeleteOrganizationUserRoleErrors]; + +export type DeleteOrganizationUserRoleResponses = { + /** + * User successfully removed. + */ + 200: SuccessResponse; +}; + +export type DeleteOrganizationUserRoleResponse = + DeleteOrganizationUserRoleResponses[keyof DeleteOrganizationUserRoleResponses]; + +export type GetOrganizationUserPermissionsData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The user's id. + */ + user_id: string; + }; + query?: { + /** + * Additional data to include in the response. Allowed value: "roles". + */ + expand?: string | null; + }; + url: "/api/v1/organizations/{org_code}/users/{user_id}/permissions"; +}; + +export type GetOrganizationUserPermissionsErrors = { + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetOrganizationUserPermissionsResponses = { + /** + * A successful response with a list of user permissions. + */ + 200: GetOrganizationsUserPermissionsResponse; +}; + +export type GetOrganizationUserPermissionsResponse = + GetOrganizationUserPermissionsResponses[keyof GetOrganizationUserPermissionsResponses]; + +export type CreateOrganizationUserPermissionData = { + /** + * Permission details. + */ + body: { + /** + * The permission id. + */ + permission_id?: string; + }; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The user's id. + */ + user_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/permissions"; +}; + +export type CreateOrganizationUserPermissionErrors = { + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type CreateOrganizationUserPermissionResponses = { + /** + * User permission successfully updated. + */ + 200: SuccessResponse; +}; + +export type CreateOrganizationUserPermissionResponse = + CreateOrganizationUserPermissionResponses[keyof CreateOrganizationUserPermissionResponses]; + +export type DeleteOrganizationUserPermissionData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The user's id. + */ + user_id: string; + /** + * The permission id. + */ + permission_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/permissions/{permission_id}"; +}; + +export type DeleteOrganizationUserPermissionErrors = { + /** + * Error creating user. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type DeleteOrganizationUserPermissionError = + DeleteOrganizationUserPermissionErrors[keyof DeleteOrganizationUserPermissionErrors]; + +export type DeleteOrganizationUserPermissionResponses = { + /** + * User successfully removed. + */ + 200: SuccessResponse; +}; + +export type DeleteOrganizationUserPermissionResponse = + DeleteOrganizationUserPermissionResponses[keyof DeleteOrganizationUserPermissionResponses]; + +export type RemoveOrganizationUserData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + /** + * The user's id. + */ + user_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}"; +}; + +export type RemoveOrganizationUserErrors = { + /** + * Error removing user + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type RemoveOrganizationUserError = + RemoveOrganizationUserErrors[keyof RemoveOrganizationUserErrors]; + +export type RemoveOrganizationUserResponses = { + /** + * User successfully removed from organization + */ + 200: SuccessResponse; +}; + +export type RemoveOrganizationUserResponse = + RemoveOrganizationUserResponses[keyof RemoveOrganizationUserResponses]; + +export type DeleteOrganizationUserApiScopeData = { + body?: never; + path: { + /** + * The identifier for the organization. + */ + org_code: string; + /** + * User ID + */ + user_id: string; + /** + * API ID + */ + api_id: string; + /** + * Scope ID + */ + scope_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/apis/{api_id}/scopes/{scope_id}"; +}; + +export type DeleteOrganizationUserApiScopeErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteOrganizationUserApiScopeError = + DeleteOrganizationUserApiScopeErrors[keyof DeleteOrganizationUserApiScopeErrors]; + +export type DeleteOrganizationUserApiScopeResponses = { + /** + * Organization user API scope successfully deleted. + */ + 200: unknown; +}; + +export type AddOrganizationUserApiScopeData = { + body?: never; + path: { + /** + * The identifier for the organization. + */ + org_code: string; + /** + * User ID + */ + user_id: string; + /** + * API ID + */ + api_id: string; + /** + * Scope ID + */ + scope_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/apis/{api_id}/scopes/{scope_id}"; +}; + +export type AddOrganizationUserApiScopeErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type UpdateConnectionResponse = success_response; +export type AddOrganizationUserApiScopeError = + AddOrganizationUserApiScopeErrors[keyof AddOrganizationUserApiScopeErrors]; -export type ReplaceConnectionData = { +export type AddOrganizationUserApiScopeResponses = { + /** + * API scope successfully added to organization user api + */ + 200: unknown; +}; + +export type ResetOrgUserMfaAllData = { + body?: never; + path: { + /** + * The identifier for the organization. + */ + org_code: string; + /** + * The identifier for the user + */ + user_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/mfa"; +}; + +export type ResetOrgUserMfaAllErrors = { /** - * The unique identifier for the connection. + * Invalid request. */ - connectionId: string; + 400: ErrorResponse; /** - * The complete connection configuration to replace the existing one. + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type ResetOrgUserMfaAllError = + ResetOrgUserMfaAllErrors[keyof ResetOrgUserMfaAllErrors]; + +export type ResetOrgUserMfaAllResponses = { + /** + * User's MFA successfully reset. */ - requestBody: { + 200: SuccessResponse; +}; + +export type ResetOrgUserMfaAllResponse = + ResetOrgUserMfaAllResponses[keyof ResetOrgUserMfaAllResponses]; + +export type GetOrgUserMfaData = { + body?: never; + path: { /** - * The internal name of the connection. + * The identifier for the organization. */ - name?: string; + org_code: string; /** - * The public-facing name of the connection. + * The identifier for the user */ - display_name?: string; + user_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/mfa"; +}; + +export type GetOrgUserMfaErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetOrgUserMfaError = GetOrgUserMfaErrors[keyof GetOrgUserMfaErrors]; + +export type GetOrgUserMfaResponses = { + /** + * Successfully retrieve user's MFA configuration. + */ + 200: GetUserMfaResponse; +}; + +export type GetOrgUserMfaResponse = + GetOrgUserMfaResponses[keyof GetOrgUserMfaResponses]; + +export type ResetOrgUserMfaData = { + body?: never; + path: { /** - * Client IDs of applications in which this connection is to be enabled. + * The identifier for the organization. */ - enabled_applications?: Array; - options?: - | { - /** - * OAuth client ID. - */ - client_id?: string; - /** - * OAuth client secret. - */ - client_secret?: string; - /** - * Use custom domain callback URL. - */ - is_use_custom_domain?: boolean; - /** - * Trust this connection for account merging. - */ - is_trusted?: boolean; - } - | { - /** - * Client ID. - */ - client_id?: string; - /** - * Client secret. - */ - client_secret?: string; - /** - * List of domains to limit authentication. - */ - home_realm_domains?: Array; - /** - * Domain for Entra ID. - */ - entra_id_domain?: string; - /** - * Use https://login.windows.net/common instead of a default endpoint. - */ - is_use_common_endpoint?: boolean; - /** - * Sync user profile data with IDP. - */ - is_sync_user_profile_on_login?: boolean; - /** - * Include user group info from MS Entra ID. - */ - is_retrieve_provider_user_groups?: boolean; - /** - * Include additional user profile information. - */ - is_extended_attributes_required?: boolean; - /** - * Create a user record in Kinde if the user signing in does not exist. - */ - is_create_missing_user?: boolean; - /** - * Force showing the SSO button for this connection. - */ - is_force_show_sso_button?: boolean; - /** - * Additional upstream parameters to pass to the identity provider. - */ - upstream_params?: { - [key: string]: unknown; - }; - /** - * Use custom domain callback URL. - */ - is_use_custom_domain?: boolean; - /** - * Trust this connection for account merging. - */ - is_trusted?: boolean; - } - | { - /** - * List of domains to restrict authentication. - */ - home_realm_domains?: Array; - /** - * SAML Entity ID. - */ - saml_entity_id?: string; - /** - * URL for the IdP metadata. - */ - saml_idp_metadata_url?: string; - /** - * Algorithm used to sign SAML requests. - */ - sign_request_algorithm?: "RSA-SHA256" | "RSA-SHA1"; - /** - * Protocol binding used to send SAML requests. - */ - protocol_binding?: "HTTP-REDIRECT" | "HTTP-POST"; - /** - * Format for the Name ID used to identify users in SAML responses. - */ - name_id_format?: - | "Persistent" - | "Transient" - | "Email address" - | "Unspecified"; - /** - * Attribute key for the user's email. - */ - saml_email_key_attr?: string; - /** - * Attribute key for the user's ID. - */ - saml_user_id_key_attr?: string; - /** - * Attribute key for the user's first name. - */ - saml_first_name_key_attr?: string; - /** - * Attribute key for the user's last name. - */ - saml_last_name_key_attr?: string; - /** - * Create user if they don't exist. - */ - is_create_missing_user?: boolean; - /** - * Force showing the SSO button for this connection. - */ - is_force_show_sso_button?: boolean; - /** - * Additional upstream parameters to pass to the identity provider. - */ - upstream_params?: { - [key: string]: unknown; - }; - /** - * Certificate for signing SAML requests. - */ - saml_signing_certificate?: string; - /** - * Private key associated with the signing certificate. - */ - saml_signing_private_key?: string; - /** - * Use custom domain callback URL. - */ - is_use_custom_domain?: boolean; - /** - * Trust this connection for account merging. - */ - is_trusted?: boolean; - }; + org_code: string; + /** + * The identifier for the user + */ + user_id: string; + /** + * The identifier for the MFA factor + */ + factor_id: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/users/{user_id}/mfa/{factor_id}"; +}; + +export type ResetOrgUserMfaErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type ResetOrgUserMfaError = + ResetOrgUserMfaErrors[keyof ResetOrgUserMfaErrors]; + +export type ResetOrgUserMfaResponses = { + /** + * User's MFA successfully reset. + */ + 200: SuccessResponse; +}; + +export type ResetOrgUserMfaResponse = + ResetOrgUserMfaResponses[keyof ResetOrgUserMfaResponses]; + +export type DeleteOrganizationFeatureFlagOverridesData = { + body?: never; + path: { + /** + * The identifier for the organization. + */ + org_code: string; }; + query?: never; + url: "/api/v1/organizations/{org_code}/feature_flags"; +}; + +export type DeleteOrganizationFeatureFlagOverridesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; }; -export type ReplaceConnectionResponse = success_response; +export type DeleteOrganizationFeatureFlagOverridesError = + DeleteOrganizationFeatureFlagOverridesErrors[keyof DeleteOrganizationFeatureFlagOverridesErrors]; -export type DeleteConnectionData = { +export type DeleteOrganizationFeatureFlagOverridesResponses = { /** - * The identifier for the connection. + * Feature flag overrides successfully deleted. */ - connectionId: string; + 200: SuccessResponse; }; -export type DeleteConnectionResponse = success_response; +export type DeleteOrganizationFeatureFlagOverridesResponse = + DeleteOrganizationFeatureFlagOverridesResponses[keyof DeleteOrganizationFeatureFlagOverridesResponses]; -export type GetDirectoriesData = { +export type GetOrganizationFeatureFlagsData = { + body?: never; + path: { + /** + * The identifier for the organization. + */ + org_code: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/feature_flags"; +}; + +export type GetOrganizationFeatureFlagsErrors = { /** - * Filter by organization code to get directories for a specific organization. + * Invalid request. */ - organizationCode?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 50 if parameter not sent. + * Invalid credentials. */ - pageSize?: number | null; + 403: unknown; /** - * The ID of the directory to start after. + * Request was throttled. */ - startingAfter?: string | null; + 429: unknown; }; -export type GetDirectoriesResponse = get_directories_response; +export type GetOrganizationFeatureFlagsError = + GetOrganizationFeatureFlagsErrors[keyof GetOrganizationFeatureFlagsErrors]; -export type CreateDirectoryData = { - requestBody: { +export type GetOrganizationFeatureFlagsResponses = { + /** + * Feature flag overrides successfully returned. + */ + 200: GetOrganizationFeatureFlagsResponse; +}; + +export type GetOrganizationFeatureFlagsResponse2 = + GetOrganizationFeatureFlagsResponses[keyof GetOrganizationFeatureFlagsResponses]; + +export type DeleteOrganizationFeatureFlagOverrideData = { + body?: never; + path: { /** - * The organization code to create the SCIM directory for. + * The identifier for the organization. */ org_code: string; /** - * A descriptive name for the SCIM directory. - */ - directory_name: string; - /** - * The SCIM provider code to use for this directory. + * The identifier for the feature flag. */ - provider_code: - | "entra_id_azure_ad" - | "okta" - | "google_workspace" - | "custom_scim_v2" - | "cyberark" - | "jumpcloud" - | "onelogin" - | "pingfederate" - | "rippling"; + feature_flag_key: string; }; + query?: never; + url: "/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}"; }; -export type CreateDirectoryResponse = create_directory_response; - -export type GetDirectoryData = { +export type DeleteOrganizationFeatureFlagOverrideErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; /** - * The directory's ID. + * Request was throttled. */ - directoryId: string; + 429: unknown; }; -export type GetDirectoryResponse = get_directory_response; +export type DeleteOrganizationFeatureFlagOverrideError = + DeleteOrganizationFeatureFlagOverrideErrors[keyof DeleteOrganizationFeatureFlagOverrideErrors]; -export type UpdateDirectoryData = { +export type DeleteOrganizationFeatureFlagOverrideResponses = { /** - * The directory's ID. + * Feature flag override successfully deleted. */ - directoryId: string; - requestBody: { + 200: SuccessResponse; +}; + +export type DeleteOrganizationFeatureFlagOverrideResponse = + DeleteOrganizationFeatureFlagOverrideResponses[keyof DeleteOrganizationFeatureFlagOverrideResponses]; + +export type UpdateOrganizationFeatureFlagOverrideData = { + body?: never; + path: { /** - * A descriptive name for the SCIM directory. + * The identifier for the organization */ - directory_name: string; + org_code: string; + /** + * The identifier for the feature flag + */ + feature_flag_key: string; + }; + query: { + /** + * Override value + */ + value: string; }; + url: "/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}"; }; -export type UpdateDirectoryResponse = update_directory_response; - -export type DeleteDirectoryData = { +export type UpdateOrganizationFeatureFlagOverrideErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; /** - * The directory's ID. + * Request was throttled. */ - directoryId: string; + 429: unknown; }; -export type DeleteDirectoryResponse = delete_directory_response; - -export type GetEnvironmentResponse = get_environment_response; - -export type DeleteEnvironementFeatureFlagOverridesResponse = success_response; - -export type GetEnvironementFeatureFlagsResponse = - get_environment_feature_flags_response; +export type UpdateOrganizationFeatureFlagOverrideError = + UpdateOrganizationFeatureFlagOverrideErrors[keyof UpdateOrganizationFeatureFlagOverrideErrors]; -export type DeleteEnvironementFeatureFlagOverrideData = { +export type UpdateOrganizationFeatureFlagOverrideResponses = { /** - * The identifier for the feature flag. + * Feature flag override successfully updated. */ - featureFlagKey: string; + 200: SuccessResponse; }; -export type DeleteEnvironementFeatureFlagOverrideResponse = success_response; +export type UpdateOrganizationFeatureFlagOverrideResponse = + UpdateOrganizationFeatureFlagOverrideResponses[keyof UpdateOrganizationFeatureFlagOverrideResponses]; -export type UpdateEnvironementFeatureFlagOverrideData = { - /** - * The identifier for the feature flag. - */ - featureFlagKey: string; - /** - * Flag details. - */ - requestBody: { +export type UpdateOrganizationPropertyData = { + body?: never; + path: { /** - * The flag override value. + * The identifier for the organization + */ + org_code: string; + /** + * The identifier for the property + */ + property_key: string; + }; + query: { + /** + * The new property value */ value: string; }; + url: "/api/v1/organizations/{org_code}/properties/{property_key}"; }; -export type UpdateEnvironementFeatureFlagOverrideResponse = success_response; +export type UpdateOrganizationPropertyErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; -export type ReadLogoResponse = read_env_logo_response; +export type UpdateOrganizationPropertyError = + UpdateOrganizationPropertyErrors[keyof UpdateOrganizationPropertyErrors]; -export type AddLogoData = { +export type UpdateOrganizationPropertyResponses = { /** - * Logo details. + * Property successfully updated. */ - formData: { + 200: SuccessResponse; +}; + +export type UpdateOrganizationPropertyResponse = + UpdateOrganizationPropertyResponses[keyof UpdateOrganizationPropertyResponses]; + +export type GetOrganizationPropertyValuesData = { + body?: never; + path: { /** - * The logo file to upload. + * The organization's code. */ - logo: Blob | File; + org_code: string; }; + query?: never; + url: "/api/v1/organizations/{org_code}/properties"; +}; + +export type GetOrganizationPropertyValuesErrors = { + /** + * Bad request. + */ + 400: ErrorResponse; /** - * The type of logo to add. + * Invalid credentials. */ - type: "dark" | "light"; + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; }; -export type AddLogoResponse = success_response; +export type GetOrganizationPropertyValuesError = + GetOrganizationPropertyValuesErrors[keyof GetOrganizationPropertyValuesErrors]; -export type DeleteLogoData = { +export type GetOrganizationPropertyValuesResponses = { /** - * The type of logo to delete. + * Properties successfully retrieved. */ - type: "dark" | "light"; + 200: GetPropertyValuesResponse; }; -export type DeleteLogoResponse = success_response | void; - -export type GetEnvironmentVariablesResponse = - get_environment_variables_response; +export type GetOrganizationPropertyValuesResponse = + GetOrganizationPropertyValuesResponses[keyof GetOrganizationPropertyValuesResponses]; -export type CreateEnvironmentVariableData = { +export type UpdateOrganizationPropertiesData = { /** - * The environment variable details. + * Properties to update. */ - requestBody: { - /** - * The name of the environment variable (max 128 characters). - */ - key: string; + body: { /** - * The value of the new environment variable (max 2048 characters). + * Property keys and values */ - value: string; + properties: { + [key: string]: unknown; + }; + }; + path: { /** - * Whether the environment variable is sensitive. Secrets are not-readable by you or your team after creation. + * The identifier for the organization */ - is_secret?: boolean; + org_code: string; }; + query?: never; + url: "/api/v1/organizations/{org_code}/properties"; +}; + +export type UpdateOrganizationPropertiesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; }; -export type CreateEnvironmentVariableResponse = - create_environment_variable_response; +export type UpdateOrganizationPropertiesError = + UpdateOrganizationPropertiesErrors[keyof UpdateOrganizationPropertiesErrors]; -export type GetEnvironmentVariableData = { +export type UpdateOrganizationPropertiesResponses = { /** - * The environment variable's ID. + * Properties successfully updated. */ - variableId: string; + 200: SuccessResponse; }; -export type GetEnvironmentVariableResponse = get_environment_variable_response; +export type UpdateOrganizationPropertiesResponse = + UpdateOrganizationPropertiesResponses[keyof UpdateOrganizationPropertiesResponses]; -export type UpdateEnvironmentVariableData = { +export type ReplaceOrganizationMfaData = { /** - * The new details for the environment variable + * MFA details. */ - requestBody: { + body: { /** - * The key to update. + * The MFA methods to enable. */ - key?: string; + enabled_factors: Array<"mfa:email" | "mfa:sms" | "mfa:authenticator_app">; /** - * The new value for the environment variable. + * Determines whether recovery codes are shown to users during MFA setup for this specific organization. This overrides the environment-level setting. */ - value?: string; + is_recovery_codes_enabled?: boolean; + }; + path: { /** - * Whether the environment variable is sensitive. Secret variables are not-readable by you or your team after creation. + * The identifier for the organization */ - is_secret?: boolean; + org_code: string; }; + query?: never; + url: "/api/v1/organizations/{org_code}/mfa"; +}; + +export type ReplaceOrganizationMfaErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; /** - * The environment variable's ID. + * Unauthorized - invalid credentials. */ - variableId: string; + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type UpdateEnvironmentVariableResponse = - update_environment_variable_response; +export type ReplaceOrganizationMfaError = + ReplaceOrganizationMfaErrors[keyof ReplaceOrganizationMfaErrors]; -export type DeleteEnvironmentVariableData = { +export type ReplaceOrganizationMfaResponses = { /** - * The environment variable's ID. + * MFA Configuration updated successfully. */ - variableId: string; + 200: SuccessResponse; }; -export type DeleteEnvironmentVariableResponse = - delete_environment_variable_response; +export type ReplaceOrganizationMfaResponse = + ReplaceOrganizationMfaResponses[keyof ReplaceOrganizationMfaResponses]; -export type CreateFeatureFlagData = { +export type DeleteOrganizationHandleData = { + body?: never; + path: { + /** + * The organization's code. + */ + org_code: string; + }; + query?: never; + url: "/api/v1/organization/{org_code}/handle"; +}; + +export type DeleteOrganizationHandleErrors = { /** - * Flag details. + * Bad request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. */ - requestBody: { + 429: unknown; +}; + +export type DeleteOrganizationHandleError = + DeleteOrganizationHandleErrors[keyof DeleteOrganizationHandleErrors]; + +export type DeleteOrganizationHandleResponses = { + /** + * Handle successfully deleted. + */ + 200: SuccessResponse; +}; + +export type DeleteOrganizationHandleResponse = + DeleteOrganizationHandleResponses[keyof DeleteOrganizationHandleResponses]; + +export type ReadOrganizationLogoData = { + body?: never; + path: { /** - * The name of the flag. + * The organization's code. */ - name: string; + org_code: string; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/logos"; +}; + +export type ReadOrganizationLogoErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type ReadOrganizationLogoError = + ReadOrganizationLogoErrors[keyof ReadOrganizationLogoErrors]; + +export type ReadOrganizationLogoResponses = { + /** + * Successfully retrieved organization logo details + */ + 200: ReadLogoResponse; +}; + +export type ReadOrganizationLogoResponse = + ReadOrganizationLogoResponses[keyof ReadOrganizationLogoResponses]; + +export type DeleteOrganizationLogoData = { + body?: never; + path: { /** - * Description of the flag purpose. + * The organization's code. */ - description?: string; + org_code: string; /** - * The flag identifier to use in code. + * The type of logo to delete. */ - key: string; + type: "dark" | "light"; + }; + query?: never; + url: "/api/v1/organizations/{org_code}/logos/{type}"; +}; + +export type DeleteOrganizationLogoErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteOrganizationLogoError = + DeleteOrganizationLogoErrors[keyof DeleteOrganizationLogoErrors]; + +export type DeleteOrganizationLogoResponses = { + /** + * Organization logo successfully deleted + */ + 200: SuccessResponse; + /** + * No logo found to delete + */ + 204: void; +}; + +export type DeleteOrganizationLogoResponse = + DeleteOrganizationLogoResponses[keyof DeleteOrganizationLogoResponses]; + +export type AddOrganizationLogoData = { + /** + * Organization logo details. + */ + body: { /** - * The variable type. + * The logo file to upload. */ - type: "str" | "int" | "bool"; + logo: Blob | File; + }; + path: { /** - * Allow the flag to be overridden at a different level. + * The organization's code. */ - allow_override_level?: "env" | "org" | "usr"; + org_code: string; /** - * Default value for the flag used by environments and organizations. + * The type of logo to add. */ - default_value: string; + type: "dark" | "light"; }; + query?: never; + url: "/api/v1/organizations/{org_code}/logos/{type}"; }; -export type CreateFeatureFlagResponse = success_response; - -export type DeleteFeatureFlagData = { +export type AddOrganizationLogoErrors = { /** - * The identifier for the feature flag. + * Invalid request. */ - featureFlagKey: string; -}; - -export type DeleteFeatureFlagResponse = success_response; - -export type UpdateFeatureFlagData = { + 400: ErrorResponse; /** - * Allow the flag to be overridden at a different level. + * Unauthorized - invalid credentials. */ - allowOverrideLevel: "env" | "org"; + 403: ErrorResponse; /** - * Default value for the flag used by environments and organizations. + * Too many requests. Request was throttled. */ - defaultValue: string; + 429: ErrorResponse; +}; + +export type AddOrganizationLogoError = + AddOrganizationLogoErrors[keyof AddOrganizationLogoErrors]; + +export type AddOrganizationLogoResponses = { /** - * Description of the flag purpose. + * Organization logo successfully updated */ - description: string; + 200: SuccessResponse; +}; + +export type AddOrganizationLogoResponse = + AddOrganizationLogoResponses[keyof AddOrganizationLogoResponses]; + +export type GetOrganizationConnectionsData = { + body?: never; + path: { + /** + * The organization code. + */ + organization_code: string; + }; + query?: never; + url: "/api/v1/organizations/{organization_code}/connections"; +}; + +export type GetOrganizationConnectionsErrors = { /** - * The key identifier for the feature flag. + * Invalid request. */ - featureFlagKey: string; + 400: ErrorResponse; /** - * The name of the flag. + * Unauthorized - invalid credentials. */ - name: string; + 403: ErrorResponse; /** - * The variable type + * Too many requests. Request was throttled. */ - type: "str" | "int" | "bool"; + 429: ErrorResponse; }; -export type UpdateFeatureFlagResponse = success_response; +export type GetOrganizationConnectionsError = + GetOrganizationConnectionsErrors[keyof GetOrganizationConnectionsErrors]; -export type GetIdentityData = { +export type GetOrganizationConnectionsResponses = { /** - * The unique identifier for the identity. + * Organization connections successfully retrieved. */ - identityId: string; + 200: GetConnectionsResponse; }; -export type GetIdentityResponse = identity; +export type GetOrganizationConnectionsResponse = + GetOrganizationConnectionsResponses[keyof GetOrganizationConnectionsResponses]; -export type UpdateIdentityData = { - /** - * The unique identifier for the identity. - */ - identityId: string; - /** - * The fields of the identity to update. - */ - requestBody: { +export type RemoveOrgConnectionData = { + body?: never; + path: { /** - * Whether the identity is the primary for it's type + * The unique code for the organization. */ - is_primary?: boolean; + organization_code: string; + /** + * The identifier for the connection. + */ + connection_id: string; }; + query?: never; + url: "/api/v1/organizations/{organization_code}/connections/{connection_id}"; }; -export type UpdateIdentityResponse = success_response; - -export type DeleteIdentityData = { +export type RemoveOrgConnectionErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; /** - * The unique identifier for the identity. + * Too many requests. Request was throttled. */ - identityId: string; + 429: ErrorResponse; }; -export type DeleteIdentityResponse = success_response; +export type RemoveOrgConnectionError = + RemoveOrgConnectionErrors[keyof RemoveOrgConnectionErrors]; -export type GetIndustriesResponse = get_industries_response; - -export type ReplaceMfaData = { +export type RemoveOrgConnectionResponses = { /** - * MFA details. + * Connection successfully removed. */ - requestBody: { - /** - * Specifies whether MFA is required, optional, or not enforced. - */ - policy: "required" | "off" | "optional"; + 200: SuccessResponse; +}; + +export type RemoveOrgConnectionResponse = + RemoveOrgConnectionResponses[keyof RemoveOrgConnectionResponses]; + +export type EnableOrgConnectionData = { + body?: never; + path: { /** - * The MFA methods to enable. + * The unique code for the organization. */ - enabled_factors: Array<"mfa:email" | "mfa:sms" | "mfa:authenticator_app">; + organization_code: string; /** - * Determines whether recovery codes are shown to users during MFA setup for the environment. + * The identifier for the connection. */ - is_recovery_codes_enabled?: boolean; + connection_id: string; }; + query?: never; + url: "/api/v1/organizations/{organization_code}/connections/{connection_id}"; }; -export type ReplaceMfaResponse = success_response; - -export type GetOrganizationInvitesData = { - /** - * Include accepted invitations in the results. - */ - includeAccepted?: boolean | null; - /** - * Include revoked invitations in the results. - */ - includeRevoked?: boolean | null; - /** - * A string to get the next page of results if there are more results. - */ - nextToken?: string | null; +export type EnableOrgConnectionErrors = { /** - * The organization's code. + * Invalid request. */ - orgCode: string; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Unauthorized - invalid credentials. */ - pageSize?: number | null; + 403: ErrorResponse; /** - * Field and order to sort the result by. + * Too many requests. Request was throttled. */ - sort?: - | ( - | "created_on_asc" - | "created_on_desc" - | "email_asc" - | "email_desc" - | "name_asc" - | "name_desc" - ) - | null; + 429: ErrorResponse; }; -export type GetOrganizationInvitesResponse = get_organization_invites_response; +export type EnableOrgConnectionError = + EnableOrgConnectionErrors[keyof EnableOrgConnectionErrors]; -export type CreateOrganizationInviteData = { +export type EnableOrgConnectionResponses = { /** - * The organization's code. + * Connection successfully enabled. */ - orgCode: string; + 200: unknown; +}; + +export type UpdateOrganizationSessionsData = { /** - * Invitation details. `email` is capped at 254 characters (RFC 5321). `first_name` and `last_name` are capped at 64 characters each. Inputs over these limits are rejected with `EMAIL_TOO_LONG`, `FIRST_NAME_TOO_LONG`, or `LAST_NAME_TOO_LONG`. + * Organization session configuration. */ - requestBody: { + body: { /** - * The email address of the user to invite. Maximum 254 characters. + * Whether to use the organization's SSO session policy override. */ - email: string; + is_use_org_sso_session_policy?: boolean; /** - * The first name of the user to invite. Maximum 64 characters. + * Determines if the session should be persistent or not. */ - first_name?: string | null; + sso_session_persistence_mode?: "persistent" | "non_persistent"; /** - * The last name of the user to invite. Maximum 64 characters. + * Whether to apply the organization's authenticated session lifetime override. */ - last_name?: string | null; + is_use_org_authenticated_session_lifetime?: boolean; /** - * Array of role keys to assign to the user. + * Authenticated session lifetime in seconds. */ - roles: Array; + authenticated_session_lifetime?: number; + }; + path: { /** - * Whether to send an invitation email to the user. Defaults to false. + * The organization's code. */ - send_email?: boolean; + org_code: string; }; + query?: never; + url: "/api/v1/organizations/{org_code}/sessions"; }; -export type CreateOrganizationInviteResponse = - create_organization_invite_response; - -export type GetOrganizationInviteData = { - /** - * The invitation's code. - */ - inviteCode: string; +export type UpdateOrganizationSessionsErrors = { /** - * The organization's code. + * Invalid request. */ - orgCode: string; -}; - -export type GetOrganizationInviteResponse = get_organization_invite_response; - -export type DeleteOrganizationInviteData = { + 400: ErrorResponse; /** - * The invitation's code. + * Unauthorized - invalid credentials. */ - inviteCode: string; + 403: ErrorResponse; /** - * The organization's code. + * Too many requests. Request was throttled. */ - orgCode: string; + 429: ErrorResponse; }; -export type DeleteOrganizationInviteResponse = success_response; +export type UpdateOrganizationSessionsError = + UpdateOrganizationSessionsErrors[keyof UpdateOrganizationSessionsErrors]; -export type GetOrganizationData = { +export type UpdateOrganizationSessionsResponses = { /** - * The organization's code. + * Organization sessions successfully updated */ - code?: string; - /** - * Additional data to include in the response. Allowed value: "billing". - */ - expand?: string; + 200: SuccessResponse; }; -export type GetOrganizationResponse = get_organization_response; +export type UpdateOrganizationSessionsResponse = + UpdateOrganizationSessionsResponses[keyof UpdateOrganizationSessionsResponses]; -export type CreateOrganizationData = { - /** - * Organization details. - */ - requestBody: { - /** - * The organization's name. - */ - name: string; - /** - * The organization's feature flag settings. - */ - feature_flags?: { - [key: string]: "str" | "int" | "bool"; - }; - /** - * The organization's external identifier - commonly used when migrating from or mapping to other systems. - */ - external_id?: string; - /** - * The organization's brand settings - background color. - */ - background_color?: string; - /** - * The organization's brand settings - button color. - */ - button_color?: string; - /** - * The organization's brand settings - button text color. - */ - button_text_color?: string; - /** - * The organization's brand settings - link color. - */ - link_color?: string; - /** - * The organization's brand settings - dark mode background color. - */ - background_color_dark?: string; - /** - * The organization's brand settings - dark mode button color. - */ - button_color_dark?: string; - /** - * The organization's brand settings - dark mode button text color. - */ - button_text_color_dark?: string; - /** - * The organization's brand settings - dark mode link color. - */ - link_color_dark?: string; - /** - * The organization's brand settings - theme/mode 'light' | 'dark' | 'user_preference'. - */ - theme_code?: string; - /** - * A unique handle for the organization - can be used for dynamic callback urls. - */ - handle?: string; - /** - * Deprecated - Use 'is_auto_membership_enabled' instead. - * @deprecated - */ - is_allow_registrations?: boolean; - /** - * If users become members of this organization when the org code is supplied during authentication. - */ - is_auto_membership_enabled?: boolean; - /** - * The name of the organization that will be used in emails - */ - sender_name?: string | null; - /** - * The email address that will be used in emails. Requires custom SMTP to be set up. - */ - sender_email?: string | null; +export type GetPermissionsData = { + body?: never; + path?: never; + query?: { /** - * If a billing customer is also created for this organization + * Field and order to sort the result by. */ - is_create_billing_customer?: boolean; + sort?: "name_asc" | "name_desc" | "id_asc" | "id_desc"; /** - * The email address used for billing purposes for the organization + * Number of results per page. Defaults to 10 if parameter not sent. */ - billing_email?: string; + page_size?: number | null; /** - * The billing plan to put the customer on. If not specified, the default plan is used + * A string to get the next page of results if there are more results. */ - billing_plan_code?: string; + next_token?: string | null; }; + url: "/api/v1/permissions"; }; -export type CreateOrganizationResponse = create_organization_response; - -export type GetOrganizationsData = { - /** - * A string to get the next page of results if there are more results. - */ - nextToken?: string | null; +export type GetPermissionsErrors = { /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Invalid credentials. */ - pageSize?: number | null; + 403: ErrorResponse; /** - * Field and order to sort the result by. + * Request was throttled. */ - sort?: ("name_asc" | "name_desc" | "email_asc" | "email_desc") | null; + 429: unknown; }; -export type GetOrganizationsResponse = get_organizations_response; +export type GetPermissionsError = + GetPermissionsErrors[keyof GetPermissionsErrors]; -export type UpdateOrganizationData = { - /** - * Additional data to include in the response. Allowed value: "billing". - */ - expand?: "billing" | null; +export type GetPermissionsResponses = { /** - * The identifier for the organization. + * Permissions successfully retrieved. */ - orgCode: string; + 200: GetPermissionsResponse; +}; + +export type GetPermissionsResponse2 = + GetPermissionsResponses[keyof GetPermissionsResponses]; + +export type CreatePermissionData = { /** - * Organization details. + * Permission details. */ - requestBody?: { - /** - * The organization's name. - */ - name?: string; - /** - * The organization's ID. - */ - external_id?: string; - /** - * The organization's brand settings - background color. - */ - background_color?: string; - /** - * The organization's brand settings - button color. - */ - button_color?: string; - /** - * The organization's brand settings - button text color. - */ - button_text_color?: string; - /** - * The organization's brand settings - link color. - */ - link_color?: string; - /** - * The organization's brand settings - dark mode background color. - */ - background_color_dark?: string; - /** - * The organization's brand settings - dark mode button color. - */ - button_color_dark?: string; - /** - * The organization's brand settings - dark mode button text color. - */ - button_text_color_dark?: string; - /** - * The organization's brand settings - dark mode link color. - */ - link_color_dark?: string; - /** - * The organization's brand settings - theme/mode. - */ - theme_code?: "light" | "dark" | "user_preference"; - /** - * The organization's handle. - */ - handle?: string; - /** - * Deprecated - Use 'is_auto_membership_enabled' instead. - * @deprecated - */ - is_allow_registrations?: boolean; - /** - * If users become members of this organization when the org code is supplied during authentication. - */ - is_auto_membership_enabled?: boolean; - /** - * Users can sign up to this organization. - */ - is_auto_join_domain_list?: boolean; - /** - * Domains allowed for self-sign up to this environment. - */ - allowed_domains?: Array; - /** - * Activate advanced organization features. - */ - is_enable_advanced_orgs?: boolean; - /** - * Enforce MFA for all users in this organization. - */ - is_enforce_mfa?: boolean; + body?: { /** - * The name of the organization that will be used in emails + * The permission's name. */ - sender_name?: string | null; + name?: string; /** - * The email address that will be used in emails. Requires custom SMTP to be set up. + * The permission's description. */ - sender_email?: string | null; + description?: string; /** - * Whether to suspend or unsuspend the organization. Setting to true suspends the organization; setting to false unsuspends it. The default organization cannot be suspended. + * The permission identifier to use in code. */ - is_suspended?: boolean; + key?: string; }; + path?: never; + query?: never; + url: "/api/v1/permissions"; }; -export type UpdateOrganizationResponse = success_response; - -export type DeleteOrganizationData = { +export type CreatePermissionErrors = { /** - * The identifier for the organization. + * Invalid request. */ - orgCode: string; -}; - -export type DeleteOrganizationResponse = success_response; - -export type GetOrganizationUsersData = { + 400: ErrorResponse; /** - * A string to get the next page of results if there are more results. + * Invalid credentials. */ - nextToken?: string | null; + 403: ErrorResponse; /** - * The organization's code. + * Request was throttled. */ - orgCode: string; + 429: unknown; +}; + +export type CreatePermissionError = + CreatePermissionErrors[keyof CreatePermissionErrors]; + +export type CreatePermissionResponses = { /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Permission successfully created */ - pageSize?: number | null; + 201: SuccessResponse; +}; + +export type CreatePermissionResponse = + CreatePermissionResponses[keyof CreatePermissionResponses]; + +export type DeletePermissionData = { + body?: never; + path: { + /** + * The identifier for the permission. + */ + permission_id: string; + }; + query?: never; + url: "/api/v1/permissions/{permission_id}"; +}; + +export type DeletePermissionErrors = { /** - * Filter by user permissions comma separated (where all match) + * Invalid request. */ - permissions?: string; + 400: ErrorResponse; /** - * Filter by user roles comma separated (where all match) + * Invalid credentials. */ - roles?: string; + 403: unknown; /** - * Field and order to sort the result by. + * Request was throttled. */ - sort?: - | ( - | "name_asc" - | "name_desc" - | "email_asc" - | "email_desc" - | "id_asc" - | "id_desc" - ) - | null; + 429: unknown; }; -export type GetOrganizationUsersResponse = get_organization_users_response; +export type DeletePermissionError = + DeletePermissionErrors[keyof DeletePermissionErrors]; -export type AddOrganizationUsersData = { +export type DeletePermissionResponses = { /** - * The organization's code. + * permission successfully updated. */ - orgCode: string; - requestBody?: { - /** - * Users to be added to the organization. - */ - users?: Array<{ - /** - * The users id. - */ - id?: string; - /** - * Role keys to assign to the user. - */ - roles?: Array; - /** - * Permission keys to assign to the user. - */ - permissions?: Array; - }>; - }; + 200: SuccessResponse; }; -export type AddOrganizationUsersResponse = add_organization_users_response; +export type DeletePermissionResponse = + DeletePermissionResponses[keyof DeletePermissionResponses]; -export type UpdateOrganizationUsersData = { +export type UpdatePermissionsData = { /** - * The organization's code. + * Permission details. */ - orgCode: string; - requestBody?: { + body?: { /** - * Users to add, update or remove from the organization. + * The permission's name. */ - users?: Array<{ - /** - * The users id. - */ - id?: string; - /** - * Optional operation, set to 'delete' to remove the user from the organization. - */ - operation?: string; - /** - * Role keys to assign to the user. - */ - roles?: Array; - /** - * Permission keys to assign to the user. - */ - permissions?: Array; - }>; + name?: string; + /** + * The permission's description. + */ + description?: string; + /** + * The permission identifier to use in code. + */ + key?: string; }; + path: { + /** + * The identifier for the permission. + */ + permission_id: string; + }; + query?: never; + url: "/api/v1/permissions/{permission_id}"; }; -export type UpdateOrganizationUsersResponse = - update_organization_users_response; - -export type GetOrganizationUserRolesData = { +export type UpdatePermissionsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; /** - * The organization's code. + * Invalid credentials. */ - orgCode: string; + 403: ErrorResponse; /** - * The user's id. + * Request was throttled. */ - userId: string; + 429: unknown; }; -export type GetOrganizationUserRolesResponse = - get_organizations_user_roles_response; +export type UpdatePermissionsError = + UpdatePermissionsErrors[keyof UpdatePermissionsErrors]; -export type CreateOrganizationUserRoleData = { - /** - * The organization's code. - */ - orgCode: string; +export type UpdatePermissionsResponses = { /** - * Role details. + * Permission successfully updated */ - requestBody: { + 200: SuccessResponse; +}; + +export type UpdatePermissionsResponse = + UpdatePermissionsResponses[keyof UpdatePermissionsResponses]; + +export type GetPropertiesData = { + body?: never; + path?: never; + query?: { /** - * The role id. + * Number of results per page. Defaults to 10 if parameter not sent. */ - role_id?: string; + page_size?: number | null; + /** + * The ID of the property to start after. + */ + starting_after?: string | null; + /** + * The ID of the property to end before. + */ + ending_before?: string | null; + /** + * Filter results by user, organization or application context + */ + context?: "usr" | "org" | "app"; }; - /** - * The user's id. - */ - userId: string; + url: "/api/v1/properties"; }; -export type CreateOrganizationUserRoleResponse = success_response; - -export type DeleteOrganizationUserRoleData = { +export type GetPropertiesErrors = { /** - * The organization's code. + * Invalid request. */ - orgCode: string; + 400: ErrorResponse; /** - * The role id. + * Invalid credentials. */ - roleId: string; + 403: ErrorResponse; /** - * The user's id. + * Request was throttled. */ - userId: string; + 429: unknown; }; -export type DeleteOrganizationUserRoleResponse = success_response; +export type GetPropertiesError = GetPropertiesErrors[keyof GetPropertiesErrors]; -export type GetOrganizationUserPermissionsData = { - /** - * Additional data to include in the response. Allowed value: "roles". - */ - expand?: string | null; - /** - * The organization's code. - */ - orgCode: string; +export type GetPropertiesResponses = { /** - * The user's id. + * Properties successfully retrieved. */ - userId: string; + 200: GetPropertiesResponse; }; -export type GetOrganizationUserPermissionsResponse = - get_organizations_user_permissions_response; +export type GetPropertiesResponse2 = + GetPropertiesResponses[keyof GetPropertiesResponses]; -export type CreateOrganizationUserPermissionData = { - /** - * The organization's code. - */ - orgCode: string; +export type CreatePropertyData = { /** - * Permission details. + * Property details. */ - requestBody: { + body: { /** - * The permission id. + * The name of the property. */ - permission_id?: string; + name: string; + /** + * Description of the property purpose. + */ + description?: string; + /** + * The property identifier to use in code. + */ + key: string; + /** + * The property type. + */ + type: "single_line_text" | "multi_line_text"; + /** + * The context that the property applies to. + */ + context: "org" | "usr" | "app"; + /** + * Whether the property can be included in id and access tokens. + */ + is_private: boolean; + /** + * Which category the property belongs to. + */ + category_id: string; }; - /** - * The user's id. - */ - userId: string; + path?: never; + query?: never; + url: "/api/v1/properties"; }; -export type CreateOrganizationUserPermissionResponse = success_response; - -export type DeleteOrganizationUserPermissionData = { +export type CreatePropertyErrors = { /** - * The organization's code. + * Invalid request. */ - orgCode: string; + 400: ErrorResponse; /** - * The permission id. + * Invalid credentials. */ - permissionId: string; + 403: unknown; /** - * The user's id. + * Request was throttled. */ - userId: string; + 429: unknown; }; -export type DeleteOrganizationUserPermissionResponse = success_response; +export type CreatePropertyError = + CreatePropertyErrors[keyof CreatePropertyErrors]; -export type RemoveOrganizationUserData = { - /** - * The organization's code. - */ - orgCode: string; +export type CreatePropertyResponses = { /** - * The user's id. + * Property successfully created */ - userId: string; + 201: CreatePropertyResponse; }; -export type RemoveOrganizationUserResponse = success_response; +export type CreatePropertyResponse2 = + CreatePropertyResponses[keyof CreatePropertyResponses]; -export type AddOrganizationUserApiScopeData = { +export type DeletePropertyData = { + body?: never; + path: { + /** + * The unique identifier for the property. + */ + property_id: string; + }; + query?: never; + url: "/api/v1/properties/{property_id}"; +}; + +export type DeletePropertyErrors = { /** - * API ID + * Invalid request. */ - apiId: string; + 400: ErrorResponse; /** - * The identifier for the organization. + * Invalid credentials. */ - orgCode: string; + 403: unknown; /** - * Scope ID + * Request was throttled. */ - scopeId: string; + 429: unknown; +}; + +export type DeletePropertyError = + DeletePropertyErrors[keyof DeletePropertyErrors]; + +export type DeletePropertyResponses = { /** - * User ID + * Property successfully deleted. */ - userId: string; + 200: SuccessResponse; }; -export type AddOrganizationUserApiScopeResponse = unknown; +export type DeletePropertyResponse = + DeletePropertyResponses[keyof DeletePropertyResponses]; -export type DeleteOrganizationUserApiScopeData = { +export type UpdatePropertyData = { /** - * API ID + * The fields of the property to update. */ - apiId: string; + body: { + /** + * The name of the property. + */ + name: string; + /** + * Description of the property purpose. + */ + description?: string; + /** + * Whether the property can be included in id and access tokens. + */ + is_private: boolean; + /** + * Which category the property belongs to. + */ + category_id: string; + }; + path: { + /** + * The unique identifier for the property. + */ + property_id: string; + }; + query?: never; + url: "/api/v1/properties/{property_id}"; +}; + +export type UpdatePropertyErrors = { /** - * The identifier for the organization. + * Invalid request. */ - orgCode: string; + 400: ErrorResponse; /** - * Scope ID + * Invalid credentials. */ - scopeId: string; + 403: unknown; /** - * User ID + * Request was throttled. */ - userId: string; + 429: unknown; }; -export type DeleteOrganizationUserApiScopeResponse = unknown; +export type UpdatePropertyError = + UpdatePropertyErrors[keyof UpdatePropertyErrors]; -export type GetOrgUserMfaData = { +export type UpdatePropertyResponses = { + /** + * Property successfully updated. + */ + 200: SuccessResponse; +}; + +export type UpdatePropertyResponse = + UpdatePropertyResponses[keyof UpdatePropertyResponses]; + +export type GetCategoriesData = { + body?: never; + path?: never; + query?: { + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * The ID of the category to start after. + */ + starting_after?: string | null; + /** + * The ID of the category to end before. + */ + ending_before?: string | null; + /** + * Filter the results by User or Organization context + */ + context?: "usr" | "org"; + }; + url: "/api/v1/property_categories"; +}; + +export type GetCategoriesErrors = { /** - * The identifier for the organization. + * Invalid request. */ - orgCode: string; + 400: ErrorResponse; /** - * The identifier for the user + * Invalid credentials. */ - userId: string; + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; }; -export type GetOrgUserMfaResponse = get_user_mfa_response; +export type GetCategoriesError = GetCategoriesErrors[keyof GetCategoriesErrors]; -export type ResetOrgUserMfaAllData = { +export type GetCategoriesResponses = { /** - * The identifier for the organization. + * Categories successfully retrieved. */ - orgCode: string; + 200: GetCategoriesResponse; +}; + +export type GetCategoriesResponse2 = + GetCategoriesResponses[keyof GetCategoriesResponses]; + +export type CreateCategoryData = { /** - * The identifier for the user + * Category details. */ - userId: string; + body: { + /** + * The name of the category. + */ + name: string; + /** + * The context that the category applies to. + */ + context: "org" | "usr" | "app"; + }; + path?: never; + query?: never; + url: "/api/v1/property_categories"; }; -export type ResetOrgUserMfaAllResponse = success_response; - -export type ResetOrgUserMfaData = { +export type CreateCategoryErrors = { /** - * The identifier for the MFA factor + * Invalid request. */ - factorId: string; + 400: ErrorResponse; /** - * The identifier for the organization. + * Invalid credentials. */ - orgCode: string; + 403: unknown; /** - * The identifier for the user + * Request was throttled. */ - userId: string; + 429: unknown; }; -export type ResetOrgUserMfaResponse = success_response; +export type CreateCategoryError = + CreateCategoryErrors[keyof CreateCategoryErrors]; -export type GetOrganizationFeatureFlagsData = { +export type CreateCategoryResponses = { /** - * The identifier for the organization. + * Category successfully created */ - orgCode: string; + 201: CreateCategoryResponse; }; -export type GetOrganizationFeatureFlagsResponse = - get_organization_feature_flags_response; +export type CreateCategoryResponse2 = + CreateCategoryResponses[keyof CreateCategoryResponses]; -export type DeleteOrganizationFeatureFlagOverridesData = { +export type UpdateCategoryData = { /** - * The identifier for the organization. + * The fields of the category to update. */ - orgCode: string; + body: { + /** + * The name of the category. + */ + name?: string; + }; + path: { + /** + * The unique identifier for the category. + */ + category_id: string; + }; + query?: never; + url: "/api/v1/property_categories/{category_id}"; }; -export type DeleteOrganizationFeatureFlagOverridesResponse = success_response; - -export type DeleteOrganizationFeatureFlagOverrideData = { +export type UpdateCategoryErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; /** - * The identifier for the feature flag. + * Invalid credentials. */ - featureFlagKey: string; + 403: unknown; /** - * The identifier for the organization. + * Request was throttled. */ - orgCode: string; + 429: unknown; }; -export type DeleteOrganizationFeatureFlagOverrideResponse = success_response; +export type UpdateCategoryError = + UpdateCategoryErrors[keyof UpdateCategoryErrors]; -export type UpdateOrganizationFeatureFlagOverrideData = { - /** - * The identifier for the feature flag - */ - featureFlagKey: string; - /** - * The identifier for the organization - */ - orgCode: string; +export type UpdateCategoryResponses = { /** - * Override value + * category successfully updated. */ - value: string; + 200: SuccessResponse; +}; + +export type UpdateCategoryResponse = + UpdateCategoryResponses[keyof UpdateCategoryResponses]; + +export type GetRolesData = { + body?: never; + path?: never; + query?: { + /** + * Field and order to sort the result by. + */ + sort?: "name_asc" | "name_desc" | "id_asc" | "id_desc"; + /** + * Number of results per page. Defaults to 10 if parameter not sent. + */ + page_size?: number | null; + /** + * A string to get the next page of results if there are more results. + */ + next_token?: string | null; + }; + url: "/api/v1/roles"; }; -export type UpdateOrganizationFeatureFlagOverrideResponse = success_response; - -export type UpdateOrganizationPropertyData = { +export type GetRolesErrors = { /** - * The identifier for the organization + * Invalid request. */ - orgCode: string; + 400: ErrorResponse; /** - * The identifier for the property + * Unauthorized - invalid credentials. */ - propertyKey: string; + 403: ErrorResponse; /** - * The new property value + * Too many requests. Request was throttled. */ - value: string; + 429: ErrorResponse; }; -export type UpdateOrganizationPropertyResponse = success_response; +export type GetRolesError = GetRolesErrors[keyof GetRolesErrors]; -export type GetOrganizationPropertyValuesData = { +export type GetRolesResponses = { /** - * The organization's code. + * Roles successfully retrieved. */ - orgCode: string; + 200: GetRolesResponse; }; -export type GetOrganizationPropertyValuesResponse = - get_property_values_response; +export type GetRolesResponse2 = GetRolesResponses[keyof GetRolesResponses]; -export type UpdateOrganizationPropertiesData = { - /** - * The identifier for the organization - */ - orgCode: string; +export type CreateRoleData = { /** - * Properties to update. + * Role details. */ - requestBody: { + body?: { /** - * Property keys and values + * The role's name. */ - properties: { - [key: string]: unknown; - }; - }; -}; - -export type UpdateOrganizationPropertiesResponse = success_response; - -export type ReplaceOrganizationMfaData = { - /** - * The identifier for the organization - */ - orgCode: string; - /** - * MFA details. - */ - requestBody: { + name?: string; /** - * The MFA methods to enable. + * The role's description. */ - enabled_factors: Array<"mfa:email" | "mfa:sms" | "mfa:authenticator_app">; + description?: string; /** - * Determines whether recovery codes are shown to users during MFA setup for this specific organization. This overrides the environment-level setting. + * The role identifier to use in code. */ - is_recovery_codes_enabled?: boolean; + key?: string; + /** + * Set role as default for new users. + */ + is_default_role?: boolean; + /** + * The public ID of the permission required to assign this role to users. If null, no permission is required. + */ + assignment_permission_id?: string | null; }; + path?: never; + query?: never; + url: "/api/v1/roles"; }; -export type ReplaceOrganizationMfaResponse = success_response; - -export type DeleteOrganizationHandleData = { +export type CreateRoleErrors = { /** - * The organization's code. + * Invalid request. */ - orgCode: string; + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type DeleteOrganizationHandleResponse = success_response; +export type CreateRoleError = CreateRoleErrors[keyof CreateRoleErrors]; -export type ReadOrganizationLogoData = { +export type CreateRoleResponses = { /** - * The organization's code. + * Role successfully created */ - orgCode: string; + 201: CreateRolesResponse; }; -export type ReadOrganizationLogoResponse = read_logo_response; +export type CreateRoleResponse = CreateRoleResponses[keyof CreateRoleResponses]; -export type AddOrganizationLogoData = { - /** - * Organization logo details. - */ - formData: { +export type DeleteRoleData = { + body?: never; + path: { /** - * The logo file to upload. + * The identifier for the role. */ - logo: Blob | File; + role_id: string; }; - /** - * The organization's code. - */ - orgCode: string; - /** - * The type of logo to add. - */ - type: "dark" | "light"; + query?: never; + url: "/api/v1/roles/{role_id}"; }; -export type AddOrganizationLogoResponse = success_response; - -export type DeleteOrganizationLogoData = { +export type DeleteRoleErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; /** - * The organization's code. + * Unauthorized - invalid credentials. */ - orgCode: string; + 403: ErrorResponse; /** - * The type of logo to delete. + * Too many requests. Request was throttled. */ - type: "dark" | "light"; + 429: ErrorResponse; }; -export type DeleteOrganizationLogoResponse = success_response | void; +export type DeleteRoleError = DeleteRoleErrors[keyof DeleteRoleErrors]; -export type GetOrganizationConnectionsData = { +export type DeleteRoleResponses = { /** - * The organization code. + * Role successfully deleted. */ - organizationCode: string; + 200: SuccessResponse; }; -export type GetOrganizationConnectionsResponse = get_connections_response; +export type DeleteRoleResponse = DeleteRoleResponses[keyof DeleteRoleResponses]; -export type EnableOrgConnectionData = { +export type GetRoleData = { + body?: never; + path: { + /** + * The identifier for the role. + */ + role_id: string; + }; + query?: never; + url: "/api/v1/roles/{role_id}"; +}; + +export type GetRoleErrors = { /** - * The identifier for the connection. + * Invalid request. */ - connectionId: string; + 400: ErrorResponse; /** - * The unique code for the organization. + * Unauthorized - invalid credentials. */ - organizationCode: string; + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type EnableOrgConnectionResponse = unknown; +export type GetRoleError = GetRoleErrors[keyof GetRoleErrors]; -export type RemoveOrgConnectionData = { - /** - * The identifier for the connection. - */ - connectionId: string; +export type GetRoleResponses = { /** - * The unique code for the organization. + * Role successfully retrieved. */ - organizationCode: string; + 200: GetRoleResponse; }; -export type RemoveOrgConnectionResponse = success_response; +export type GetRoleResponse2 = GetRoleResponses[keyof GetRoleResponses]; -export type UpdateOrganizationSessionsData = { - /** - * The organization's code. - */ - orgCode: string; +export type UpdateRolesData = { /** - * Organization session configuration. + * Role details. */ - requestBody: { + body?: { /** - * Whether to use the organization's SSO session policy override. + * The role's name. */ - is_use_org_sso_session_policy?: boolean; + name: string; /** - * Determines if the session should be persistent or not. + * The role's description. */ - sso_session_persistence_mode?: "persistent" | "non_persistent"; + description?: string; /** - * Whether to apply the organization's authenticated session lifetime override. + * The role identifier to use in code. */ - is_use_org_authenticated_session_lifetime?: boolean; + key: string; /** - * Authenticated session lifetime in seconds. + * Set role as default for new users. */ - authenticated_session_lifetime?: number; + is_default_role?: boolean; + /** + * The public ID of the permission required to assign this role to users. If null, no change to the assignment permission is made. If set to 'NO_PERMISSION_REQUIRED', no permission is required. + */ + assignment_permission_id?: string | null; + }; + path: { + /** + * The identifier for the role. + */ + role_id: string; }; + query?: never; + url: "/api/v1/roles/{role_id}"; }; -export type UpdateOrganizationSessionsResponse = success_response; - -export type GetPermissionsData = { +export type UpdateRolesErrors = { /** - * A string to get the next page of results if there are more results. + * Invalid request. */ - nextToken?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Unauthorized - invalid credentials. */ - pageSize?: number | null; + 403: ErrorResponse; /** - * Field and order to sort the result by. + * Too many requests. Request was throttled. */ - sort?: ("name_asc" | "name_desc" | "id_asc" | "id_desc") | null; + 429: ErrorResponse; }; -export type GetPermissionsResponse = get_permissions_response; +export type UpdateRolesError = UpdateRolesErrors[keyof UpdateRolesErrors]; -export type CreatePermissionData = { +export type UpdateRolesResponses = { /** - * Permission details. + * Role successfully updated */ - requestBody?: { - /** - * The permission's name. - */ - name?: string; - /** - * The permission's description. - */ - description?: string; + 201: SuccessResponse; +}; + +export type UpdateRolesResponse = + UpdateRolesResponses[keyof UpdateRolesResponses]; + +export type GetRoleScopesData = { + body?: never; + path: { /** - * The permission identifier to use in code. + * The role id. */ - key?: string; + role_id: string; }; + query?: never; + url: "/api/v1/roles/{role_id}/scopes"; }; -export type CreatePermissionResponse = success_response; - -export type UpdatePermissionsData = { +export type GetRoleScopesErrors = { /** - * The identifier for the permission. + * Error removing user */ - permissionId: string; + 400: ErrorResponse; /** - * Permission details. + * Invalid credentials. */ - requestBody?: { - /** - * The permission's name. - */ - name?: string; - /** - * The permission's description. - */ - description?: string; - /** - * The permission identifier to use in code. - */ - key?: string; - }; + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; }; -export type UpdatePermissionsResponse = success_response; +export type GetRoleScopesError = GetRoleScopesErrors[keyof GetRoleScopesErrors]; -export type DeletePermissionData = { +export type GetRoleScopesResponses = { /** - * The identifier for the permission. + * A list of scopes for a role */ - permissionId: string; + 200: RoleScopesResponse; }; -export type DeletePermissionResponse = success_response; +export type GetRoleScopesResponse = + GetRoleScopesResponses[keyof GetRoleScopesResponses]; -export type GetPropertiesData = { +export type AddRoleScopeData = { /** - * Filter results by user, organization or application context + * Add scope to role. */ - context?: ("usr" | "org" | "app") | null; + body: { + /** + * The scope identifier. + */ + scope_id: string; + }; + path: { + /** + * The role id. + */ + role_id: string; + }; + query?: never; + url: "/api/v1/roles/{role_id}/scopes"; +}; + +export type AddRoleScopeErrors = { /** - * The ID of the property to end before. + * Invalid request. */ - endingBefore?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Unauthorized - invalid credentials. */ - pageSize?: number | null; + 403: ErrorResponse; /** - * The ID of the property to start after. + * Too many requests. Request was throttled. */ - startingAfter?: string | null; + 429: ErrorResponse; }; -export type GetPropertiesResponse = get_properties_response; +export type AddRoleScopeError = AddRoleScopeErrors[keyof AddRoleScopeErrors]; -export type CreatePropertyData = { +export type AddRoleScopeResponses = { /** - * Property details. + * Role scope successfully added. */ - requestBody: { - /** - * The name of the property. - */ - name: string; - /** - * Description of the property purpose. - */ - description?: string; - /** - * The property identifier to use in code. - */ - key: string; - /** - * The property type. - */ - type: "single_line_text" | "multi_line_text"; - /** - * The context that the property applies to. - */ - context: "org" | "usr" | "app"; + 201: AddRoleScopeResponse; +}; + +export type AddRoleScopeResponse2 = + AddRoleScopeResponses[keyof AddRoleScopeResponses]; + +export type DeleteRoleScopeData = { + body?: never; + path: { /** - * Whether the property can be included in id and access tokens. + * The role id. */ - is_private: boolean; + role_id: string; /** - * Which category the property belongs to. + * The scope id. */ - category_id: string; + scope_id: string; }; + query?: never; + url: "/api/v1/roles/{role_id}/scopes/{scope_id}"; }; -export type CreatePropertyResponse = create_property_response; - -export type UpdatePropertyData = { +export type DeleteRoleScopeErrors = { /** - * The unique identifier for the property. + * Invalid request. */ - propertyId: string; + 400: ErrorResponse; /** - * The fields of the property to update. + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type DeleteRoleScopeError = + DeleteRoleScopeErrors[keyof DeleteRoleScopeErrors]; + +export type DeleteRoleScopeResponses = { + /** + * Role scope successfully deleted. */ - requestBody: { + 200: DeleteRoleScopeResponse; +}; + +export type DeleteRoleScopeResponse2 = + DeleteRoleScopeResponses[keyof DeleteRoleScopeResponses]; + +export type GetRolePermissionsData = { + body?: never; + path: { /** - * The name of the property. + * The role's public id. */ - name: string; + role_id: string; + }; + query?: { /** - * Description of the property purpose. + * Field and order to sort the result by. */ - description?: string; + sort?: "name_asc" | "name_desc" | "id_asc" | "id_desc"; /** - * Whether the property can be included in id and access tokens. + * Number of results per page. Defaults to 10 if parameter not sent. */ - is_private: boolean; + page_size?: number | null; /** - * Which category the property belongs to. + * A string to get the next page of results if there are more results. */ - category_id: string; + next_token?: string | null; }; + url: "/api/v1/roles/{role_id}/permissions"; }; -export type UpdatePropertyResponse = success_response; - -export type DeletePropertyData = { - /** - * The unique identifier for the property. - */ - propertyId: string; -}; - -export type DeletePropertyResponse = success_response; - -export type GetCategoriesData = { - /** - * Filter the results by User or Organization context - */ - context?: ("usr" | "org") | null; +export type GetRolePermissionsErrors = { /** - * The ID of the category to end before. + * Error removing user */ - endingBefore?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Invalid credentials. */ - pageSize?: number | null; + 403: unknown; /** - * The ID of the category to start after. + * Request was throttled. */ - startingAfter?: string | null; + 429: unknown; }; -export type GetCategoriesResponse = get_categories_response; +export type GetRolePermissionsError = + GetRolePermissionsErrors[keyof GetRolePermissionsErrors]; -export type CreateCategoryData = { +export type GetRolePermissionsResponses = { /** - * Category details. + * A list of permissions for a role */ - requestBody: { + 200: RolePermissionsResponse; +}; + +export type GetRolePermissionsResponse = + GetRolePermissionsResponses[keyof GetRolePermissionsResponses]; + +export type UpdateRolePermissionsData = { + body: { /** - * The name of the category. + * Permissions to add or remove from the role. */ - name: string; + permissions?: Array<{ + /** + * The permission id. + */ + id?: string; + /** + * Optional operation, set to 'delete' to remove the permission from the role. + */ + operation?: string; + }>; + }; + path: { /** - * The context that the category applies to. + * The identifier for the role. */ - context: "org" | "usr" | "app"; + role_id: string; }; + query?: never; + url: "/api/v1/roles/{role_id}/permissions"; }; -export type CreateCategoryResponse = create_category_response; - -export type UpdateCategoryData = { +export type UpdateRolePermissionsErrors = { + /** + * Invalid credentials. + */ + 403: ErrorResponse; /** - * The unique identifier for the category. + * Request was throttled. */ - categoryId: string; + 429: unknown; +}; + +export type UpdateRolePermissionsError = + UpdateRolePermissionsErrors[keyof UpdateRolePermissionsErrors]; + +export type UpdateRolePermissionsResponses = { /** - * The fields of the category to update. + * Permissions successfully updated. */ - requestBody: { + 200: UpdateRolePermissionsResponse; +}; + +export type UpdateRolePermissionsResponse2 = + UpdateRolePermissionsResponses[keyof UpdateRolePermissionsResponses]; + +export type RemoveRolePermissionData = { + body?: never; + path: { /** - * The name of the category. + * The role's public id. */ - name?: string; + role_id: string; + /** + * The permission's public id. + */ + permission_id: string; }; + query?: never; + url: "/api/v1/roles/{role_id}/permissions/{permission_id}"; }; -export type UpdateCategoryResponse = success_response; - -export type GetRolesData = { +export type RemoveRolePermissionErrors = { /** - * A string to get the next page of results if there are more results. + * Error removing user */ - nextToken?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Invalid credentials. */ - pageSize?: number | null; + 403: unknown; /** - * Field and order to sort the result by. + * Request was throttled. */ - sort?: ("name_asc" | "name_desc" | "id_asc" | "id_desc") | null; + 429: unknown; }; -export type GetRolesResponse = get_roles_response; +export type RemoveRolePermissionError = + RemoveRolePermissionErrors[keyof RemoveRolePermissionErrors]; -export type CreateRoleData = { +export type RemoveRolePermissionResponses = { /** - * Role details. + * Permission successfully removed from role */ - requestBody?: { + 200: SuccessResponse; +}; + +export type RemoveRolePermissionResponse = + RemoveRolePermissionResponses[keyof RemoveRolePermissionResponses]; + +export type SearchUsersData = { + body?: never; + path?: never; + query?: { /** - * The role's name. + * Number of results per page. Defaults to 10 if parameter not sent. */ - name?: string; + page_size?: number | null; /** - * The role's description. + * Search the users by email or name. Use '*' to search all. */ - description?: string; + query?: string | null; /** - * The role identifier to use in code. + * Search the users by api scopes. */ - key?: string; + api_scopes?: string | null; + properties?: { + [key: string]: Array; + }; /** - * Set role as default for new users. + * The ID of the user to start after. */ - is_default_role?: boolean; + starting_after?: string | null; /** - * The public ID of the permission required to assign this role to users. If null, no permission is required. + * The ID of the user to end before. */ - assignment_permission_id?: string | null; + ending_before?: string | null; + /** + * Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "properties". + */ + expand?: string | null; }; + url: "/api/v1/search/users"; }; -export type CreateRoleResponse = create_roles_response; - -export type GetRoleData = { +export type SearchUsersErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; /** - * The identifier for the role. + * Too many requests. Request was throttled. */ - roleId: string; + 429: ErrorResponse; }; -export type GetRoleResponse = get_role_response; +export type SearchUsersError = SearchUsersErrors[keyof SearchUsersErrors]; -export type UpdateRolesData = { +export type SearchUsersResponses = { /** - * Role details. + * Users successfully retrieved. */ - requestBody?: { - /** - * The role's name. - */ - name: string; - /** - * The role's description. - */ - description?: string; + 200: SearchUsersResponse; +}; + +export type SearchUsersResponse2 = + SearchUsersResponses[keyof SearchUsersResponses]; + +export type GetSubscribersData = { + body?: never; + path?: never; + query?: { /** - * The role identifier to use in code. + * Field and order to sort the result by. */ - key: string; + sort?: "name_asc" | "name_desc" | "email_asc" | "email_desc"; /** - * Set role as default for new users. + * Number of results per page. Defaults to 10 if parameter not sent. */ - is_default_role?: boolean; + page_size?: number | null; /** - * The public ID of the permission required to assign this role to users. If null, no change to the assignment permission is made. If set to 'NO_PERMISSION_REQUIRED', no permission is required. + * A string to get the next page of results if there are more results. */ - assignment_permission_id?: string | null; + next_token?: string | null; }; - /** - * The identifier for the role. - */ - roleId: string; + url: "/api/v1/subscribers"; }; -export type UpdateRolesResponse = success_response; - -export type DeleteRoleData = { +export type GetSubscribersErrors = { + /** + * Bad request. + */ + 403: ErrorResponse; /** - * The identifier for the role. + * Request was throttled. */ - roleId: string; + 429: unknown; }; -export type DeleteRoleResponse = success_response; +export type GetSubscribersError = + GetSubscribersErrors[keyof GetSubscribersErrors]; -export type GetRoleScopesData = { +export type GetSubscribersResponses = { /** - * The role id. + * Subscriber successfully retrieved. */ - roleId: string; + 200: GetSubscribersResponse; }; -export type GetRoleScopesResponse = role_scopes_response; +export type GetSubscribersResponse2 = + GetSubscribersResponses[keyof GetSubscribersResponses]; -export type AddRoleScopeData = { - /** - * Add scope to role. - */ - requestBody: { +export type CreateSubscriberData = { + body?: never; + path?: never; + query: { /** - * The scope identifier. + * Subscriber's first name. */ - scope_id: string; + first_name: string; + /** + * Subscriber's last name. + */ + last_name: string | null; + /** + * The email address of the subscriber. + */ + email: string | null; }; + url: "/api/v1/subscribers"; +}; + +export type CreateSubscriberErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; /** - * The role id. + * Request was throttled. */ - roleId: string; + 429: unknown; }; -export type AddRoleScopeResponse = add_role_scope_response; +export type CreateSubscriberError = + CreateSubscriberErrors[keyof CreateSubscriberErrors]; -export type DeleteRoleScopeData = { - /** - * The role id. - */ - roleId: string; +export type CreateSubscriberResponses = { /** - * The scope id. + * Subscriber successfully created */ - scopeId: string; + 201: CreateSubscriberSuccessResponse; }; -export type DeleteRoleScopeResponse = delete_role_scope_response; +export type CreateSubscriberResponse = + CreateSubscriberResponses[keyof CreateSubscriberResponses]; -export type GetRolePermissionsData = { +export type GetSubscriberData = { + body?: never; + path: { + /** + * The subscriber's id. + */ + subscriber_id: string; + }; + query?: never; + url: "/api/v1/subscribers/{subscriber_id}"; +}; + +export type GetSubscriberErrors = { /** - * A string to get the next page of results if there are more results. + * Bad request. */ - nextToken?: string | null; + 400: ErrorResponse; /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Invalid credentials. */ - pageSize?: number | null; + 403: ErrorResponse; /** - * The role's public id. + * Request was throttled. */ - roleId: string; + 429: unknown; +}; + +export type GetSubscriberError = GetSubscriberErrors[keyof GetSubscriberErrors]; + +export type GetSubscriberResponses = { /** - * Field and order to sort the result by. + * Subscriber successfully retrieved. */ - sort?: ("name_asc" | "name_desc" | "id_asc" | "id_desc") | null; + 200: GetSubscriberResponse; }; -export type GetRolePermissionsResponse = role_permissions_response; +export type GetSubscriberResponse2 = + GetSubscriberResponses[keyof GetSubscriberResponses]; -export type UpdateRolePermissionsData = { - requestBody: { +export type GetUsersData = { + body?: never; + path?: never; + query?: { /** - * Permissions to add or remove from the role. + * Number of results per page. Defaults to 10 if parameter not sent. */ - permissions?: Array<{ - /** - * The permission id. - */ - id?: string; - /** - * Optional operation, set to 'delete' to remove the permission from the role. - */ - operation?: string; - }>; + page_size?: number | null; + /** + * Filter the results by User ID. The query string should be comma separated and url encoded. + */ + user_id?: string | null; + /** + * A string to get the next page of results if there are more results. + */ + next_token?: string | null; + /** + * Filter the results by email address. The query string should be comma separated and url encoded. + */ + email?: string | null; + /** + * Filter the results by username. The query string should be comma separated and url encoded. + */ + username?: string | null; + /** + * Filter the results by phone. The query string should be comma separated and url encoded. + */ + phone?: string | null; + /** + * Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "billing". + */ + expand?: string | null; + /** + * Filter the results by if the user has at least one organization assigned. + */ + has_organization?: boolean | null; + /** + * Filter the results to only include users who have been active since this date. Date should be in ISO 8601 format. + */ + active_since?: string | null; }; - /** - * The identifier for the role. - */ - roleId: string; + url: "/api/v1/users"; }; -export type UpdateRolePermissionsResponse = update_role_permissions_response; - -export type RemoveRolePermissionData = { +export type GetUsersErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; /** - * The permission's public id. + * Unauthorized - invalid credentials. */ - permissionId: string; + 403: ErrorResponse; /** - * The role's public id. + * Too many requests. Request was throttled. */ - roleId: string; + 429: ErrorResponse; }; -export type RemoveRolePermissionResponse = success_response; +export type GetUsersError = GetUsersErrors[keyof GetUsersErrors]; -export type SearchUsersData = { - /** - * Search the users by api scopes. - */ - apiScopes?: string | null; +export type GetUsersResponses = { /** - * The ID of the user to end before. + * Users successfully retrieved. */ - endingBefore?: string | null; - /** - * Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "properties". - */ - expand?: string | null; + 200: UsersResponse; +}; + +export type GetUsersResponse = GetUsersResponses[keyof GetUsersResponses]; + +export type RefreshUserClaimsData = { + body?: never; + path: { + /** + * The id of the user whose claims needs to be updated. + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/refresh_claims"; +}; + +export type RefreshUserClaimsErrors = { /** - * Number of results per page. Defaults to 10 if parameter not sent. + * Bad request. */ - pageSize?: number | null; - properties?: { - [key: string]: Array; - }; + 400: ErrorResponse; /** - * Search the users by email or name. Use '*' to search all. + * Bad request. */ - query?: string | null; + 403: ErrorResponse; /** - * The ID of the user to start after. + * Request was throttled. */ - startingAfter?: string | null; + 429: unknown; }; -export type SearchUsersResponse = search_users_response; +export type RefreshUserClaimsError = + RefreshUserClaimsErrors[keyof RefreshUserClaimsErrors]; -export type GetSubscribersData = { - /** - * A string to get the next page of results if there are more results. - */ - nextToken?: string | null; - /** - * Number of results per page. Defaults to 10 if parameter not sent. - */ - pageSize?: number | null; +export type RefreshUserClaimsResponses = { /** - * Field and order to sort the result by. + * Claims successfully refreshed. */ - sort?: ("name_asc" | "name_desc" | "email_asc" | "email_desc") | null; + 200: SuccessResponse; }; -export type GetSubscribersResponse = get_subscribers_response; +export type RefreshUserClaimsResponse = + RefreshUserClaimsResponses[keyof RefreshUserClaimsResponses]; -export type CreateSubscriberData = { +export type DeleteUserData = { + body?: never; + path?: never; + query: { + /** + * The user's id. + */ + id: string; + /** + * Delete all data and remove the user's profile from all of Kinde, including the subscriber list + */ + is_delete_profile?: boolean; + }; + url: "/api/v1/user"; +}; + +export type DeleteUserErrors = { /** - * The email address of the subscriber. + * Invalid request. */ - email: string | null; + 400: ErrorResponse; /** - * Subscriber's first name. + * Unauthorized - invalid credentials. */ - firstName: string; + 403: ErrorResponse; /** - * Subscriber's last name. + * Too many requests. Request was throttled. */ - lastName: string | null; + 429: ErrorResponse; }; -export type CreateSubscriberResponse = create_subscriber_success_response; +export type DeleteUserError = DeleteUserErrors[keyof DeleteUserErrors]; -export type GetSubscriberData = { +export type DeleteUserResponses = { /** - * The subscriber's id. + * User successfully deleted. */ - subscriberId: string; + 200: SuccessResponse; }; -export type GetSubscriberResponse = get_subscriber_response; +export type DeleteUserResponse = DeleteUserResponses[keyof DeleteUserResponses]; -export type GetTimezonesResponse = get_timezones_response; +export type GetUserDataData = { + body?: never; + path?: never; + query: { + /** + * The user's id. + */ + id: string; + /** + * Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "billing". + */ + expand?: string | null; + }; + url: "/api/v1/user"; +}; -export type GetUsersData = { - /** - * Filter the results to only include users who have been active since this date. Date should be in ISO 8601 format. - */ - activeSince?: string | null; - /** - * Filter the results by email address. The query string should be comma separated and url encoded. - */ - email?: string | null; +export type GetUserDataErrors = { /** - * Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "billing". + * Invalid request. */ - expand?: string | null; + 400: ErrorResponse; /** - * Filter the results by if the user has at least one organization assigned. + * Unauthorized - invalid credentials. */ - hasOrganization?: boolean | null; + 403: ErrorResponse; /** - * A string to get the next page of results if there are more results. + * Too many requests. Request was throttled. */ - nextToken?: string | null; + 429: ErrorResponse; +}; + +export type GetUserDataError = GetUserDataErrors[keyof GetUserDataErrors]; + +export type GetUserDataResponses = { /** - * Number of results per page. Defaults to 10 if parameter not sent. + * User successfully retrieved. */ - pageSize?: number | null; + 200: User; +}; + +export type GetUserDataResponse = + GetUserDataResponses[keyof GetUserDataResponses]; + +export type UpdateUserData = { /** - * Filter the results by phone. The query string should be comma separated and url encoded. + * The user to update. */ - phone?: string | null; + body: { + /** + * User's first name. + */ + given_name?: string; + /** + * User's last name. + */ + family_name?: string; + /** + * The user's profile picture. + */ + picture?: string; + /** + * Whether the user is currently suspended or not. + */ + is_suspended?: boolean; + /** + * Prompt the user to change their password on next sign in. + */ + is_password_reset_requested?: boolean; + /** + * An external id to reference the user. + */ + provided_id?: string; + }; + path?: never; + query: { + /** + * The user's id. + */ + id: string; + }; + url: "/api/v1/user"; +}; + +export type UpdateUserErrors = { /** - * Filter the results by User ID. The query string should be comma separated and url encoded. + * Invalid request. */ - userId?: string | null; + 400: ErrorResponse; /** - * Filter the results by username. The query string should be comma separated and url encoded. + * Unauthorized - invalid credentials. */ - username?: string | null; -}; - -export type GetUsersResponse = users_response; - -export type RefreshUserClaimsData = { + 403: ErrorResponse; /** - * The id of the user whose claims needs to be updated. + * Too many requests. Request was throttled. */ - userId: string; + 429: ErrorResponse; }; -export type RefreshUserClaimsResponse = success_response; +export type UpdateUserError = UpdateUserErrors[keyof UpdateUserErrors]; -export type GetUserDataData = { - /** - * Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "billing". - */ - expand?: string | null; +export type UpdateUserResponses = { /** - * The user's id. + * User successfully updated. */ - id: string; + 200: UpdateUserResponse; }; -export type GetUserDataResponse = user; +export type UpdateUserResponse2 = + UpdateUserResponses[keyof UpdateUserResponses]; export type CreateUserData = { /** * The details of the user to create. */ - requestBody?: { + body?: { /** * Basic information required to create a user. */ @@ -6056,109 +10643,181 @@ export type CreateUserData = { }; }>; }; + path?: never; + query?: never; + url: "/api/v1/user"; }; -export type CreateUserResponse = create_user_response; - -export type UpdateUserData = { +export type CreateUserErrors = { /** - * The user's id. + * Invalid request. */ - id: string; + 400: ErrorResponse; /** - * The user to update. + * Unauthorized - invalid credentials. */ - requestBody: { + 403: ErrorResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type CreateUserError = CreateUserErrors[keyof CreateUserErrors]; + +export type CreateUserResponses = { + /** + * User successfully created. + */ + 200: CreateUserResponse; +}; + +export type CreateUserResponse2 = + CreateUserResponses[keyof CreateUserResponses]; + +export type UpdateUserFeatureFlagOverrideData = { + body?: never; + path: { /** - * User's first name. + * The identifier for the user */ - given_name?: string; + user_id: string; /** - * User's last name. + * The identifier for the feature flag */ - family_name?: string; + feature_flag_key: string; + }; + query: { /** - * The user's profile picture. + * Override value */ - picture?: string; + value: string; + }; + url: "/api/v1/users/{user_id}/feature_flags/{feature_flag_key}"; +}; + +export type UpdateUserFeatureFlagOverrideErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type UpdateUserFeatureFlagOverrideError = + UpdateUserFeatureFlagOverrideErrors[keyof UpdateUserFeatureFlagOverrideErrors]; + +export type UpdateUserFeatureFlagOverrideResponses = { + /** + * Feature flag override successfully updated. + */ + 200: SuccessResponse; +}; + +export type UpdateUserFeatureFlagOverrideResponse = + UpdateUserFeatureFlagOverrideResponses[keyof UpdateUserFeatureFlagOverrideResponses]; + +export type UpdateUserPropertyData = { + body?: never; + path: { /** - * Whether the user is currently suspended or not. + * The identifier for the user */ - is_suspended?: boolean; + user_id: string; /** - * Prompt the user to change their password on next sign in. + * The identifier for the property */ - is_password_reset_requested?: boolean; + property_key: string; + }; + query: { /** - * An external id to reference the user. + * The new property value */ - provided_id?: string; + value: string; }; + url: "/api/v1/users/{user_id}/properties/{property_key}"; }; -export type UpdateUserResponse = update_user_response; - -export type DeleteUserData = { +export type UpdateUserPropertyErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; /** - * The user's id. + * Invalid credentials. */ - id: string; + 403: unknown; /** - * Delete all data and remove the user's profile from all of Kinde, including the subscriber list + * Request was throttled. */ - isDeleteProfile?: boolean; + 429: unknown; }; -export type DeleteUserResponse = success_response; +export type UpdateUserPropertyError = + UpdateUserPropertyErrors[keyof UpdateUserPropertyErrors]; -export type UpdateUserFeatureFlagOverrideData = { - /** - * The identifier for the feature flag - */ - featureFlagKey: string; +export type UpdateUserPropertyResponses = { /** - * The identifier for the user + * Property successfully updated. */ - userId: string; - /** - * Override value - */ - value: string; + 200: SuccessResponse; }; -export type UpdateUserFeatureFlagOverrideResponse = success_response; +export type UpdateUserPropertyResponse = + UpdateUserPropertyResponses[keyof UpdateUserPropertyResponses]; -export type UpdateUserPropertyData = { +export type GetUserPropertyValuesData = { + body?: never; + path: { + /** + * The user's ID. + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/properties"; +}; + +export type GetUserPropertyValuesErrors = { /** - * The identifier for the property + * Bad request. */ - propertyKey: string; + 400: ErrorResponse; /** - * The identifier for the user + * Invalid credentials. */ - userId: string; + 403: unknown; /** - * The new property value + * Request was throttled. */ - value: string; + 429: unknown; }; -export type UpdateUserPropertyResponse = success_response; +export type GetUserPropertyValuesError = + GetUserPropertyValuesErrors[keyof GetUserPropertyValuesErrors]; -export type GetUserPropertyValuesData = { +export type GetUserPropertyValuesResponses = { /** - * The user's ID. + * Properties successfully retrieved. */ - userId: string; + 200: GetPropertyValuesResponse; }; -export type GetUserPropertyValuesResponse = get_property_values_response; +export type GetUserPropertyValuesResponse = + GetUserPropertyValuesResponses[keyof GetUserPropertyValuesResponses]; export type UpdateUserPropertiesData = { /** * Properties to update. */ - requestBody: { + body: { /** * Property keys and values */ @@ -6166,19 +10825,49 @@ export type UpdateUserPropertiesData = { [key: string]: unknown; }; }; + path: { + /** + * The identifier for the user + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/properties"; +}; + +export type UpdateUserPropertiesErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type UpdateUserPropertiesError = + UpdateUserPropertiesErrors[keyof UpdateUserPropertiesErrors]; + +export type UpdateUserPropertiesResponses = { /** - * The identifier for the user + * Properties successfully updated. */ - userId: string; + 200: SuccessResponse; }; -export type UpdateUserPropertiesResponse = success_response; +export type UpdateUserPropertiesResponse = + UpdateUserPropertiesResponses[keyof UpdateUserPropertiesResponses]; export type SetUserPasswordData = { /** * Password details. */ - requestBody: { + body: { /** * The hashed password. */ @@ -6200,36 +10889,98 @@ export type SetUserPasswordData = { */ is_temporary_password?: boolean; }; + path: { + /** + * The identifier for the user + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/password"; +}; + +export type SetUserPasswordErrors = { + /** + * Error creating user. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type SetUserPasswordError = + SetUserPasswordErrors[keyof SetUserPasswordErrors]; + +export type SetUserPasswordResponses = { /** - * The identifier for the user + * User successfully created. */ - userId: string; + 200: SuccessResponse; }; -export type SetUserPasswordResponse = success_response; +export type SetUserPasswordResponse = + SetUserPasswordResponses[keyof SetUserPasswordResponses]; export type GetUserIdentitiesData = { + body?: never; + path: { + /** + * The user's ID. + */ + user_id: string; + }; + query?: { + /** + * The ID of the identity to start after. + */ + starting_after?: string | null; + /** + * The ID of the identity to end before. + */ + ending_before?: string | null; + }; + url: "/api/v1/users/{user_id}/identities"; +}; + +export type GetUserIdentitiesErrors = { /** - * The ID of the identity to end before. + * Bad request. */ - endingBefore?: string | null; + 400: ErrorResponse; /** - * The ID of the identity to start after. + * Invalid credentials. */ - startingAfter?: string | null; + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetUserIdentitiesError = + GetUserIdentitiesErrors[keyof GetUserIdentitiesErrors]; + +export type GetUserIdentitiesResponses = { /** - * The user's ID. + * Identities successfully retrieved. */ - userId: string; + 200: GetIdentitiesResponse; }; -export type GetUserIdentitiesResponse = get_identities_response; +export type GetUserIdentitiesResponse = + GetUserIdentitiesResponses[keyof GetUserIdentitiesResponses]; export type CreateUserIdentityData = { /** * The identity details. */ - requestBody?: { + body?: { /** * The email address, social identity, or username of the user. */ @@ -6247,88 +10998,382 @@ export type CreateUserIdentityData = { */ connection_id?: string; }; + path: { + /** + * The user's ID. + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/identities"; +}; + +export type CreateUserIdentityErrors = { + /** + * Error creating identity. + */ + 400: ErrorResponse; /** - * The user's ID. + * Invalid credentials. */ - userId: string; + 403: unknown; + /** + * Request was throttled. + */ + 429: unknown; }; -export type CreateUserIdentityResponse = create_identity_response; +export type CreateUserIdentityError = + CreateUserIdentityErrors[keyof CreateUserIdentityErrors]; -export type GetUserSessionsData = { +export type CreateUserIdentityResponses = { /** - * The identifier for the user + * Identity successfully created. */ - userId: string; + 201: CreateIdentityResponse; }; -export type GetUserSessionsResponse = get_user_sessions_response; +export type CreateUserIdentityResponse = + CreateUserIdentityResponses[keyof CreateUserIdentityResponses]; export type DeleteUserSessionsData = { + body?: never; + path: { + /** + * The identifier for the user + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/sessions"; +}; + +export type DeleteUserSessionsErrors = { /** - * The identifier for the user + * Invalid request. */ - userId: string; + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; }; -export type DeleteUserSessionsResponse = success_response; +export type DeleteUserSessionsError = + DeleteUserSessionsErrors[keyof DeleteUserSessionsErrors]; -export type GetUsersMfaData = { +export type DeleteUserSessionsResponses = { + /** + * User sessions successfully invalidated. + */ + 200: SuccessResponse; +}; + +export type DeleteUserSessionsResponse = + DeleteUserSessionsResponses[keyof DeleteUserSessionsResponses]; + +export type GetUserSessionsData = { + body?: never; + path: { + /** + * The identifier for the user + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/sessions"; +}; + +export type GetUserSessionsErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; /** - * The identifier for the user + * Too many requests. Request was throttled. */ - userId: string; + 429: ErrorResponse; }; -export type GetUsersMfaResponse = get_user_mfa_response; +export type GetUserSessionsError = + GetUserSessionsErrors[keyof GetUserSessionsErrors]; + +export type GetUserSessionsResponses = { + /** + * Successfully retrieved user sessions. + */ + 200: GetUserSessionsResponse; +}; + +export type GetUserSessionsResponse2 = + GetUserSessionsResponses[keyof GetUserSessionsResponses]; export type ResetUsersMfaAllData = { + body?: never; + path: { + /** + * The identifier for the user + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/mfa"; +}; + +export type ResetUsersMfaAllErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; /** - * The identifier for the user + * Too many requests. Request was throttled. */ - userId: string; + 429: ErrorResponse; }; -export type ResetUsersMfaAllResponse = success_response; +export type ResetUsersMfaAllError = + ResetUsersMfaAllErrors[keyof ResetUsersMfaAllErrors]; + +export type ResetUsersMfaAllResponses = { + /** + * User's MFA successfully reset. + */ + 200: SuccessResponse; +}; + +export type ResetUsersMfaAllResponse = + ResetUsersMfaAllResponses[keyof ResetUsersMfaAllResponses]; + +export type GetUsersMfaData = { + body?: never; + path: { + /** + * The identifier for the user + */ + user_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/mfa"; +}; + +export type GetUsersMfaErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; + /** + * Too many requests. Request was throttled. + */ + 429: ErrorResponse; +}; + +export type GetUsersMfaError = GetUsersMfaErrors[keyof GetUsersMfaErrors]; + +export type GetUsersMfaResponses = { + /** + * Successfully retrieve user's MFA configuration. + */ + 200: GetUserMfaResponse; +}; + +export type GetUsersMfaResponse = + GetUsersMfaResponses[keyof GetUsersMfaResponses]; export type ResetUsersMfaData = { + body?: never; + path: { + /** + * The identifier for the user + */ + user_id: string; + /** + * The identifier for the MFA factor + */ + factor_id: string; + }; + query?: never; + url: "/api/v1/users/{user_id}/mfa/{factor_id}"; +}; + +export type ResetUsersMfaErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Unauthorized - invalid credentials. + */ + 403: ErrorResponse; + /** + * The specified resource was not found + */ + 404: NotFoundResponse; /** - * The identifier for the MFA factor + * Too many requests. Request was throttled. */ - factorId: string; + 429: ErrorResponse; +}; + +export type ResetUsersMfaError = ResetUsersMfaErrors[keyof ResetUsersMfaErrors]; + +export type ResetUsersMfaResponses = { /** - * The identifier for the user + * User's MFA successfully reset. */ - userId: string; + 200: SuccessResponse; }; -export type ResetUsersMfaResponse = success_response; +export type ResetUsersMfaResponse = + ResetUsersMfaResponses[keyof ResetUsersMfaResponses]; export type GetEventData = { + body?: never; + path: { + /** + * The event id. + */ + event_id: string; + }; + query?: never; + url: "/api/v1/events/{event_id}"; +}; + +export type GetEventErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type GetEventError = GetEventErrors[keyof GetEventErrors]; + +export type GetEventResponses = { + /** + * Event successfully retrieved. + */ + 200: GetEventResponse; +}; + +export type GetEventResponse2 = GetEventResponses[keyof GetEventResponses]; + +export type GetEventTypesData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/event_types"; +}; + +export type GetEventTypesErrors = { /** - * The event id. + * Invalid request. */ - eventId: string; + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; }; -export type GetEventResponse = get_event_response; +export type GetEventTypesError = GetEventTypesErrors[keyof GetEventTypesErrors]; + +export type GetEventTypesResponses = { + /** + * Event types successfully retrieved. + */ + 200: GetEventTypesResponse; +}; -export type GetEventTypesResponse = get_event_types_response; +export type GetEventTypesResponse2 = + GetEventTypesResponses[keyof GetEventTypesResponses]; export type DeleteWebHookData = { + body?: never; + path: { + /** + * The webhook id. + */ + webhook_id: string; + }; + query?: never; + url: "/api/v1/webhooks/{webhook_id}"; +}; + +export type DeleteWebHookErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type DeleteWebHookError = DeleteWebHookErrors[keyof DeleteWebHookErrors]; + +export type DeleteWebHookResponses = { /** - * The webhook id. + * Webhook successfully deleted. */ - webhookId: string; + 200: DeleteWebhookResponse; }; -export type DeleteWebHookResponse = delete_webhook_response; +export type DeleteWebHookResponse = + DeleteWebHookResponses[keyof DeleteWebHookResponses]; export type UpdateWebHookData = { /** * Update webhook request specification. */ - requestBody: { + body: { /** * Array of event type keys */ @@ -6342,21 +11387,82 @@ export type UpdateWebHookData = { */ description?: string | null; }; + path: { + /** + * The webhook id. + */ + webhook_id: string; + }; + query?: never; + url: "/api/v1/webhooks/{webhook_id}"; +}; + +export type UpdateWebHookErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type UpdateWebHookError = UpdateWebHookErrors[keyof UpdateWebHookErrors]; + +export type UpdateWebHookResponses = { + /** + * Webhook successfully updated. + */ + 200: UpdateWebhookResponse; +}; + +export type UpdateWebHookResponse = + UpdateWebHookResponses[keyof UpdateWebHookResponses]; + +export type GetWebHooksData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/webhooks"; +}; + +export type GetWebHooksErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; /** - * The webhook id. + * Request was throttled. */ - webhookId: string; + 429: unknown; }; -export type UpdateWebHookResponse = update_webhook_response; +export type GetWebHooksError = GetWebHooksErrors[keyof GetWebHooksErrors]; + +export type GetWebHooksResponses = { + /** + * Webhook list successfully returned. + */ + 200: GetWebhooksResponse; +}; -export type GetWebHooksResponse = get_webhooks_response; +export type GetWebHooksResponse = + GetWebHooksResponses[keyof GetWebHooksResponses]; export type CreateWebHookData = { /** * Webhook request specification. */ - requestBody: { + body: { /** * The webhook endpoint url */ @@ -6374,6 +11480,34 @@ export type CreateWebHookData = { */ description?: string | null; }; + path?: never; + query?: never; + url: "/api/v1/webhooks"; +}; + +export type CreateWebHookErrors = { + /** + * Invalid request. + */ + 400: ErrorResponse; + /** + * Invalid credentials. + */ + 403: ErrorResponse; + /** + * Request was throttled. + */ + 429: unknown; +}; + +export type CreateWebHookError = CreateWebHookErrors[keyof CreateWebHookErrors]; + +export type CreateWebHookResponses = { + /** + * Webhook successfully created. + */ + 200: CreateWebhookResponse; }; -export type CreateWebHookResponse = create_webhook_response; +export type CreateWebHookResponse = + CreateWebHookResponses[keyof CreateWebHookResponses]; diff --git a/lib/config.ts b/lib/config.ts index 529f40a..13d1e4b 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -1,5 +1,6 @@ -import { OpenAPI } from "./api/index"; +import { client } from "./api/client.gen"; import { getToken } from "./utilities/getToken"; +import { ApiError } from "./utilities/ApiError"; export interface TokenStore { getToken(): Promise; @@ -62,11 +63,16 @@ export const init = ( config, ); - _merge(OpenAPI, { - BASE: kindeConfig.kindeDomain, - TOKEN: async () => { - return await getToken(); - }, + client.setConfig({ + baseUrl: kindeConfig.kindeDomain, + auth: async () => await getToken(), + parseAs: "json", + responseStyle: "data", + throwOnError: true, + }); + + client.interceptors.error.use((error, response) => { + return new ApiError(response.status, error); }); }; diff --git a/lib/main.test.ts b/lib/main.test.ts index a4aebdf..877dd7d 100644 --- a/lib/main.test.ts +++ b/lib/main.test.ts @@ -135,8 +135,6 @@ describe("main.ts exports", () => { "BillingMeterUsage", "Business", "Callbacks", - "CancelError", - "CancelablePromise", "ConnectedApps", "Connections", "Directories", @@ -146,7 +144,6 @@ describe("main.ts exports", () => { "Identities", "Industries", "Mfa", - "OpenAPI", "Organizations", "Permissions", "Properties", diff --git a/lib/main.ts b/lib/main.ts index 1f1a528..39b7b56 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -1,4 +1,37 @@ -export * from "./api/index"; +// Schema exports (auto-generated) +export * from "./api/schemas.gen"; +export type * from "./api/types.gen"; + +// SDK class exports (all except Callbacks, which is overridden by the compat layer below) +export { + ApiKeys, + Apis, + Applications, + BillingAgreements, + BillingEntitlements, + BillingMeterUsage, + Business, + ConnectedApps, + Connections, + Directories, + EnvironmentVariables, + Environments, + FeatureFlags, + Identities, + Industries, + Mfa, + Organizations, + Permissions, + Properties, + PropertyCategories, + Roles, + Search, + Subscribers, + Timezones, + Users, + Webhooks, +} from "./api/sdk.gen"; + import { Apis } from "./api/sdk.gen"; // Import and re-export Callbacks with deprecated methods from compatibility layer export { Callbacks } from "./api/callbacks-compat"; @@ -8,4 +41,5 @@ export { Callbacks } from "./api/callbacks-compat"; */ export { Apis as ApIs }; export * from "./utilities/index"; +export { ApiError } from "./utilities/ApiError"; export { init } from "./config"; diff --git a/lib/utilities/ApiError.ts b/lib/utilities/ApiError.ts new file mode 100644 index 0000000..910a1d4 --- /dev/null +++ b/lib/utilities/ApiError.ts @@ -0,0 +1,11 @@ +export class ApiError extends Error { + readonly status: number; + readonly body: unknown; + + constructor(status: number, body: unknown) { + super(`API Error: ${status}`); + this.name = "ApiError"; + this.status = status; + this.body = body; + } +} diff --git a/lib/utilities/getToken.ts b/lib/utilities/getToken.ts index 2fa6d3e..da02a01 100644 --- a/lib/utilities/getToken.ts +++ b/lib/utilities/getToken.ts @@ -1,7 +1,6 @@ import * as constants from "../constants"; import { setToken } from "./setToken"; import { kindeConfig } from "../config"; -import { OpenAPI } from "../api"; import { LIB_VERSION } from "../version"; import { checkAudience } from "./token/checkAudience"; import { hasTokenExpired } from "./token/hasTokenExpired"; @@ -49,7 +48,7 @@ async function generateM2MToken() { scope: constants.DEFAULT_TOKEN_SCOPES, client_id: kindeConfig.clientId, client_secret: kindeConfig.clientSecret, - audience: OpenAPI.BASE + "/api", + audience: kindeConfig.audience || kindeConfig.kindeDomain + "/api", }); const headers = new Headers(); diff --git a/openapi-ts.config.ts b/openapi-ts.config.ts index ceefcb8..aff14e4 100644 --- a/openapi-ts.config.ts +++ b/openapi-ts.config.ts @@ -4,29 +4,26 @@ export default defineConfig({ input: "./spec/kinde-mgmt-api-specs.yaml", output: { clean: false, - format: "prettier", path: "lib/api", + postProcess: ["prettier"], }, plugins: [ { - // TODO: uncomment after migrating to the new Fetch client - // baseUrl: "https://your_kinde_subdomain.kinde.com", - // exportFromIndex: true, - // name: "@hey-api/client-fetch", - name: "legacy/fetch", + baseUrl: "https://your_kinde_subdomain.kinde.com", + name: "@hey-api/client-fetch", }, { identifierCase: "preserve", name: "@hey-api/typescript", }, { - asClass: true, - classNameBuilder: "{{name}}", name: "@hey-api/sdk", - responseStyle: "data", + operations: { + strategy: "byTags", + }, }, { - exportFromIndex: true, + includeInEntry: true, name: "@hey-api/schemas", nameBuilder: "${{name}}", }, diff --git a/package.json b/package.json index b485219..649c7ee 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@hey-api/client-fetch": "^0.13.0", - "@hey-api/openapi-ts": "^0.71.1", + "@hey-api/openapi-ts": "^0.96.0", "@types/node": "^24.0.0", "@vitest/coverage-v8": "^4.1.5", "prettier": "^3.2.5", @@ -49,5 +49,8 @@ "publishConfig": { "access": "public" }, + "engines": { + "node": ">=22.13.0" + }, "packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 59b1686..eec4b27 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,10 +20,10 @@ importers: devDependencies: '@hey-api/client-fetch': specifier: ^0.13.0 - version: 0.13.1(@hey-api/openapi-ts@0.71.1(typescript@5.9.3)) + version: 0.13.1(@hey-api/openapi-ts@0.96.1(magicast@0.5.2)(typescript@5.9.3)) '@hey-api/openapi-ts': - specifier: ^0.71.1 - version: 0.71.1(typescript@5.9.3) + specifier: ^0.96.0 + version: 0.96.1(magicast@0.5.2)(typescript@5.9.3) '@types/node': specifier: ^24.0.0 version: 24.12.4 @@ -243,16 +243,30 @@ packages: peerDependencies: '@hey-api/openapi-ts': < 2 - '@hey-api/json-schema-ref-parser@1.0.6': - resolution: {integrity: sha512-yktiFZoWPtEW8QKS65eqKwA5MTKp88CyiL8q72WynrBs/73SAaxlSWlA2zW/DZlywZ5hX1OYzrCC0wFdvO9c2w==} - engines: {node: '>= 16'} + '@hey-api/codegen-core@0.8.0': + resolution: {integrity: sha512-OuF/jenX9wz7AWHRBfb37v+jLkrfCt0FJXQuALNH2UsW6+bdZBmoibHl0K778SiHwneotJbAaEvX2S05wEqUQw==} + engines: {node: '>=22.13.0'} - '@hey-api/openapi-ts@0.71.1': - resolution: {integrity: sha512-LZhHH1CngE2vRgMdZGRI4UrxJ/JHvcsAy4Qjsbiu9BGWyZIraIqWLMsQgqB3TU5yJTrblFo9DA7RI5LIUol0yg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=22.10.0} + '@hey-api/json-schema-ref-parser@1.4.1': + resolution: {integrity: sha512-DoPJGxVApDlktP1yYLjmOrF0YBEqb32ieCbx1S1i09n8TyCgdoh4yQaQ3kp0sMTauH+bwNKPsFh7S8qiWCoKZA==} + engines: {node: '>=22.13.0'} + + '@hey-api/openapi-ts@0.96.1': + resolution: {integrity: sha512-EnH+6ncaVC1yNvYWcsO7MoeBSqCvYZaKvRDRqh+S7dsfb9lhe2mKUR2+7sDacGUBm7VDZZ7hg4q4egxlpZaf0g==} + engines: {node: '>=22.13.0'} hasBin: true peerDependencies: - typescript: ^5.5.3 + typescript: '>=5.5.3 || >=6.0.0 || 6.0.1-rc' + + '@hey-api/shared@0.4.1': + resolution: {integrity: sha512-EDAjvGpEamn2fOB7W87ZStyDSv5mEpnQCciVbiZ+Ll4EfawwIjHMMtDtRQOYol0YjTkAeEm274GFPAtg3xfPGA==} + engines: {node: '>=22.13.0'} + + '@hey-api/spec-types@0.2.0': + resolution: {integrity: sha512-ibQ8Is7evMavzr8GNyJCcTg975d8DpaMUyLmOrQ85UBdy1l6t1KuRAwgChAbesJsIlNV6gjmlXruWyegDX18Fg==} + + '@hey-api/types@0.1.4': + resolution: {integrity: sha512-thWfawrDIP7wSI9ioT13I5soaaqB5vAPIiZmgD8PbeEVKNrkonc0N/Sjj97ezl7oQgusZmaNphGdMKipPO6IBg==} '@isaacs/balanced-match@4.0.1': resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==} @@ -711,9 +725,6 @@ packages: argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -731,10 +742,14 @@ packages: brace-expansion@2.0.2: resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} - c12@2.0.1: - resolution: {integrity: sha512-Z4JgsKXHG37C6PYUtIxCfLJZvo6FyhHJoClwwb9ftUkLpPSkuYqn6Tr+vnaN8hymm0kIbcg6Ey3kv/Q71k5w/A==} + bundle-name@4.1.0: + resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} + engines: {node: '>=18'} + + c12@3.3.4: + resolution: {integrity: sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==} peerDependencies: - magicast: ^0.3.5 + magicast: '*' peerDependenciesMeta: magicast: optional: true @@ -743,24 +758,17 @@ packages: resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - - chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - - citty@0.1.6: - resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} color-support@1.1.3: resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} hasBin: true - commander@13.0.0: - resolution: {integrity: sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==} - engines: {node: '>=18'} + commander@14.0.3: + resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} + engines: {node: '>=20'} compare-versions@6.1.1: resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} @@ -771,13 +779,13 @@ packages: confbox@0.2.4: resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==} - consola@3.4.2: - resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} - engines: {node: ^14.18.0 || >=16.10.0} - convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} @@ -790,6 +798,18 @@ packages: supports-color: optional: true + default-browser-id@5.0.1: + resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==} + engines: {node: '>=18'} + + default-browser@5.5.0: + resolution: {integrity: sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==} + engines: {node: '>=18'} + + define-lazy-prop@3.0.0: + resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} + engines: {node: '>=12'} + defu@6.1.7: resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} @@ -804,10 +824,6 @@ packages: resolution: {integrity: sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==} engines: {node: '>=0.3.1'} - dotenv@16.6.1: - resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==} - engines: {node: '>=12'} - dotenv@17.4.2: resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} engines: {node: '>=12'} @@ -853,10 +869,6 @@ packages: resolution: {integrity: sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==} engines: {node: '>=14.14'} - fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -865,18 +877,16 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - giget@1.2.5: - resolution: {integrity: sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==} + get-tsconfig@4.14.0: + resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} + + giget@3.2.0: + resolution: {integrity: sha512-GvHTWcykIR/fP8cj8dMpuMMkvaeJfPvYnhq0oW+chSeIr+ldX21ifU2Ms6KBoyKZQZmVaUAAhQ2EZ68KJF8a7A==} hasBin: true graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - handlebars@4.7.8: - resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} - engines: {node: '>=0.4.7'} - hasBin: true - has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -900,6 +910,27 @@ packages: resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} + is-docker@3.0.0: + resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + + is-in-ssh@1.0.0: + resolution: {integrity: sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==} + engines: {node: '>=20'} + + is-inside-container@1.0.0: + resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} + engines: {node: '>=14.16'} + hasBin: true + + is-wsl@3.1.1: + resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==} + engines: {node: '>=16'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -922,10 +953,6 @@ packages: js-tokens@10.0.0: resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} - js-yaml@4.1.1: - resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} - hasBin: true - json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} @@ -1038,26 +1065,6 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - - minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - - minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - - minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} - - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - mlly@1.7.4: resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} @@ -1075,37 +1082,31 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - - node-fetch-native@1.6.7: - resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} - - nypm@0.5.4: - resolution: {integrity: sha512-X0SNNrZiGU8/e/zAB7sCTtdxWTMSIO73q+xuKgglm2Yvzwlo8UoC5FNySQFCvl84uPaeADkqHUZUkWy4aH4xOA==} - engines: {node: ^14.16.0 || >=16.10.0} - hasBin: true - obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} - ohash@1.1.6: - resolution: {integrity: sha512-TBu7PtV8YkAZn0tSxobKY2n2aAQva936lhRrj6957aDaCf9IEtqsKbgMzXE/F/sjqYOwmrukeORHNLe5glk7Cg==} + ohash@2.0.11: + resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} + + open@11.0.0: + resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==} + engines: {node: '>=20'} path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - pathe@1.1.2: - resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - perfect-debounce@1.0.0: - resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1124,6 +1125,10 @@ packages: resolution: {integrity: sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==} engines: {node: ^10 || ^12 || >=14} + powershell-utils@0.1.0: + resolution: {integrity: sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==} + engines: {node: '>=20'} + prettier@3.8.3: resolution: {integrity: sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==} engines: {node: '>=14'} @@ -1136,17 +1141,20 @@ packages: quansync@0.2.11: resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} - rc9@2.1.2: - resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==} + rc9@3.0.1: + resolution: {integrity: sha512-gMDyleLWVE+i6Sgtc0QbbY6pEKqYs97NGi6isHQPqYlLemPoO8dxQ3uGi0f4NiP98c+jMW6cG1Kx9dDwfvqARQ==} - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} + readdirp@5.0.0: + resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} + engines: {node: '>= 20.19.0'} require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + resolve@1.22.11: resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==} engines: {node: '>= 0.4'} @@ -1162,16 +1170,33 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + run-applescript@7.1.0: + resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==} + engines: {node: '>=18'} + semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} + engines: {node: '>=10'} + hasBin: true + semver@7.8.0: resolution: {integrity: sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==} engines: {node: '>=10'} hasBin: true + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -1212,17 +1237,9 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} - engines: {node: '>=10'} - deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.2: - resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyexec@1.1.2: resolution: {integrity: sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==} engines: {node: '>=18'} @@ -1254,11 +1271,6 @@ packages: ufo@1.6.3: resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} - uglify-js@3.19.3: - resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} - engines: {node: '>=0.8.0'} - hasBin: true - undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} @@ -1371,13 +1383,19 @@ packages: vscode-uri@3.1.0: resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==} + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + why-is-node-running@2.3.0: resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} hasBin: true - wordwrap@1.0.0: - resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + wsl-utils@0.3.1: + resolution: {integrity: sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==} + engines: {node: '>=20'} yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} @@ -1498,29 +1516,59 @@ snapshots: '@esbuild/win32-x64@0.27.3': optional: true - '@hey-api/client-fetch@0.13.1(@hey-api/openapi-ts@0.71.1(typescript@5.9.3))': + '@hey-api/client-fetch@0.13.1(@hey-api/openapi-ts@0.96.1(magicast@0.5.2)(typescript@5.9.3))': dependencies: - '@hey-api/openapi-ts': 0.71.1(typescript@5.9.3) + '@hey-api/openapi-ts': 0.96.1(magicast@0.5.2)(typescript@5.9.3) - '@hey-api/json-schema-ref-parser@1.0.6': + '@hey-api/codegen-core@0.8.0(magicast@0.5.2)': + dependencies: + '@hey-api/types': 0.1.4 + ansi-colors: 4.1.3 + c12: 3.3.4(magicast@0.5.2) + color-support: 1.1.3 + transitivePeerDependencies: + - magicast + + '@hey-api/json-schema-ref-parser@1.4.1': dependencies: '@jsdevtools/ono': 7.1.3 '@types/json-schema': 7.0.15 - js-yaml: 4.1.1 - lodash: 4.17.23 + yaml: 2.8.3 - '@hey-api/openapi-ts@0.71.1(typescript@5.9.3)': + '@hey-api/openapi-ts@0.96.1(magicast@0.5.2)(typescript@5.9.3)': dependencies: - '@hey-api/json-schema-ref-parser': 1.0.6 + '@hey-api/codegen-core': 0.8.0(magicast@0.5.2) + '@hey-api/json-schema-ref-parser': 1.4.1 + '@hey-api/shared': 0.4.1(magicast@0.5.2) + '@hey-api/spec-types': 0.2.0 + '@hey-api/types': 0.1.4 ansi-colors: 4.1.3 - c12: 2.0.1 color-support: 1.1.3 - commander: 13.0.0 - handlebars: 4.7.8 + commander: 14.0.3 + get-tsconfig: 4.14.0 typescript: 5.9.3 transitivePeerDependencies: - magicast + '@hey-api/shared@0.4.1(magicast@0.5.2)': + dependencies: + '@hey-api/codegen-core': 0.8.0(magicast@0.5.2) + '@hey-api/json-schema-ref-parser': 1.4.1 + '@hey-api/spec-types': 0.2.0 + '@hey-api/types': 0.1.4 + ansi-colors: 4.1.3 + cross-spawn: 7.0.6 + open: 11.0.0 + semver: 7.7.4 + transitivePeerDependencies: + - magicast + + '@hey-api/spec-types@0.2.0': + dependencies: + '@hey-api/types': 0.1.4 + + '@hey-api/types@0.1.4': {} + '@isaacs/balanced-match@4.0.1': {} '@isaacs/brace-expansion@5.0.1': @@ -1919,8 +1967,6 @@ snapshots: dependencies: sprintf-js: 1.0.3 - argparse@2.0.1: {} - assertion-error@2.0.1: {} ast-v8-to-istanbul@1.0.0: @@ -1937,36 +1983,36 @@ snapshots: dependencies: balanced-match: 1.0.2 - c12@2.0.1: + bundle-name@4.1.0: dependencies: - chokidar: 4.0.3 - confbox: 0.1.8 + run-applescript: 7.1.0 + + c12@3.3.4(magicast@0.5.2): + dependencies: + chokidar: 5.0.0 + confbox: 0.2.4 defu: 6.1.7 - dotenv: 16.6.1 - giget: 1.2.5 + dotenv: 17.4.2 + exsolve: 1.0.8 + giget: 3.2.0 jiti: 2.6.1 - mlly: 1.8.0 - ohash: 1.1.6 - pathe: 1.1.2 - perfect-debounce: 1.0.0 - pkg-types: 1.3.1 - rc9: 2.1.2 + ohash: 2.0.11 + pathe: 2.0.3 + perfect-debounce: 2.1.0 + pkg-types: 2.3.0 + rc9: 3.0.1 + optionalDependencies: + magicast: 0.5.2 chai@6.2.2: {} - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 - - chownr@2.0.0: {} - - citty@0.1.6: + chokidar@5.0.0: dependencies: - consola: 3.4.2 + readdirp: 5.0.0 color-support@1.1.3: {} - commander@13.0.0: {} + commander@14.0.3: {} compare-versions@6.1.1: {} @@ -1974,16 +2020,29 @@ snapshots: confbox@0.2.4: {} - consola@3.4.2: {} - convert-source-map@2.0.0: {} + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + de-indent@1.0.2: {} debug@4.4.3: dependencies: ms: 2.1.3 + default-browser-id@5.0.1: {} + + default-browser@5.5.0: + dependencies: + bundle-name: 4.1.0 + default-browser-id: 5.0.1 + + define-lazy-prop@3.0.0: {} + defu@6.1.7: {} destr@2.0.5: {} @@ -1992,8 +2051,6 @@ snapshots: diff@8.0.3: {} - dotenv@16.6.1: {} - dotenv@17.4.2: {} entities@7.0.1: {} @@ -2052,35 +2109,18 @@ snapshots: jsonfile: 6.2.0 universalify: 2.0.1 - fs-minipass@2.1.0: - dependencies: - minipass: 3.3.6 - fsevents@2.3.3: optional: true function-bind@1.1.2: {} - giget@1.2.5: + get-tsconfig@4.14.0: dependencies: - citty: 0.1.6 - consola: 3.4.2 - defu: 6.1.7 - node-fetch-native: 1.6.7 - nypm: 0.5.4 - pathe: 2.0.3 - tar: 6.2.1 + resolve-pkg-maps: 1.0.0 - graceful-fs@4.2.11: {} + giget@3.2.0: {} - handlebars@4.7.8: - dependencies: - minimist: 1.2.8 - neo-async: 2.6.2 - source-map: 0.6.1 - wordwrap: 1.0.0 - optionalDependencies: - uglify-js: 3.19.3 + graceful-fs@4.2.11: {} has-flag@4.0.0: {} @@ -2098,6 +2138,20 @@ snapshots: dependencies: hasown: 2.0.2 + is-docker@3.0.0: {} + + is-in-ssh@1.0.0: {} + + is-inside-container@1.0.0: + dependencies: + is-docker: 3.0.0 + + is-wsl@3.1.1: + dependencies: + is-inside-container: 1.0.0 + + isexe@2.0.0: {} + istanbul-lib-coverage@3.2.2: {} istanbul-lib-report@3.0.1: @@ -2117,10 +2171,6 @@ snapshots: js-tokens@10.0.0: {} - js-yaml@4.1.1: - dependencies: - argparse: 2.0.1 - json-schema-traverse@1.0.0: {} jsonfile@6.2.0: @@ -2214,21 +2264,6 @@ snapshots: dependencies: brace-expansion: 2.0.2 - minimist@1.2.8: {} - - minipass@3.3.6: - dependencies: - yallist: 4.0.0 - - minipass@5.0.0: {} - - minizlib@2.1.2: - dependencies: - minipass: 3.3.6 - yallist: 4.0.0 - - mkdirp@1.0.4: {} - mlly@1.7.4: dependencies: acorn: 8.14.1 @@ -2249,32 +2284,28 @@ snapshots: nanoid@3.3.11: {} - neo-async@2.6.2: {} + obug@2.1.1: {} - node-fetch-native@1.6.7: {} + ohash@2.0.11: {} - nypm@0.5.4: + open@11.0.0: dependencies: - citty: 0.1.6 - consola: 3.4.2 - pathe: 2.0.3 - pkg-types: 1.3.1 - tinyexec: 0.3.2 - ufo: 1.6.3 - - obug@2.1.1: {} - - ohash@1.1.6: {} + default-browser: 5.5.0 + define-lazy-prop: 3.0.0 + is-in-ssh: 1.0.0 + is-inside-container: 1.0.0 + powershell-utils: 0.1.0 + wsl-utils: 0.3.1 path-browserify@1.0.1: {} - path-parse@1.0.7: {} + path-key@3.1.1: {} - pathe@1.1.2: {} + path-parse@1.0.7: {} pathe@2.0.3: {} - perfect-debounce@1.0.0: {} + perfect-debounce@2.1.0: {} picocolors@1.1.1: {} @@ -2298,21 +2329,25 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + powershell-utils@0.1.0: {} + prettier@3.8.3: {} punycode@2.3.1: {} quansync@0.2.11: {} - rc9@2.1.2: + rc9@3.0.1: dependencies: defu: 6.1.7 destr: 2.0.5 - readdirp@4.1.2: {} + readdirp@5.0.0: {} require-from-string@2.0.2: {} + resolve-pkg-maps@1.0.0: {} + resolve@1.22.11: dependencies: is-core-module: 2.16.1 @@ -2372,12 +2407,22 @@ snapshots: fsevents: 2.3.3 optional: true + run-applescript@7.1.0: {} + semver@7.5.4: dependencies: lru-cache: 6.0.0 + semver@7.7.4: {} + semver@7.8.0: {} + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + siginfo@2.0.0: {} source-map-js@1.2.1: {} @@ -2404,19 +2449,8 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - tar@6.2.1: - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - tinybench@2.9.0: {} - tinyexec@0.3.2: {} - tinyexec@1.1.2: {} tinyglobby@0.2.16: @@ -2437,9 +2471,6 @@ snapshots: ufo@1.6.3: {} - uglify-js@3.19.3: - optional: true - undici-types@7.16.0: {} universalify@2.0.1: {} @@ -2515,14 +2546,20 @@ snapshots: vscode-uri@3.1.0: {} + which@2.0.2: + dependencies: + isexe: 2.0.0 + why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 stackback: 0.0.2 - wordwrap@1.0.0: {} + wsl-utils@0.3.1: + dependencies: + is-wsl: 3.1.1 + powershell-utils: 0.1.0 yallist@4.0.0: {} - yaml@2.8.3: - optional: true + yaml@2.8.3: {} diff --git a/tests/regressions.test.ts b/tests/regressions.test.ts index f67c830..bba4e1f 100644 --- a/tests/regressions.test.ts +++ b/tests/regressions.test.ts @@ -109,7 +109,7 @@ describe("Breaking Changes and Regressions", () => { }), ); - const data: GetCallbackUrlsData = { appId: "test-app-id" }; + const data: GetCallbackUrlsData = { path: { app_id: "test-app-id" } }; const result = await Callbacks.getCallbackUrls(data); expect(result).toBeDefined(); }); @@ -122,7 +122,7 @@ describe("Breaking Changes and Regressions", () => { }), ); - const data: GetCallbackUrlsData = { appId: "test-app-id" }; + const data: GetCallbackUrlsData = { path: { app_id: "test-app-id" } }; const result = await Callbacks.getCallbackUrLs(data); expect(result).toBeDefined(); }); @@ -161,8 +161,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.addRedirectCallbackUrls({ - appId: "test-app-id", - requestBody: { urls: ["https://example.com/callback"] }, + path: { app_id: "test-app-id" }, + body: { urls: ["https://example.com/callback"] }, }); expect(result).toBeDefined(); }); @@ -177,8 +177,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.addRedirectCallbackUrLs({ - appId: "test-app-id", - requestBody: { urls: ["https://example.com/callback"] }, + path: { app_id: "test-app-id" }, + body: { urls: ["https://example.com/callback"] }, }); expect(result).toBeDefined(); }); @@ -222,8 +222,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.replaceRedirectCallbackUrls({ - appId: "test-app-id", - requestBody: { urls: ["https://example.com/callback"] }, + path: { app_id: "test-app-id" }, + body: { urls: ["https://example.com/callback"] }, }); expect(result).toBeDefined(); }); @@ -238,8 +238,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.replaceRedirectCallbackUrLs({ - appId: "test-app-id", - requestBody: { urls: ["https://example.com/callback"] }, + path: { app_id: "test-app-id" }, + body: { urls: ["https://example.com/callback"] }, }); expect(result).toBeDefined(); }); @@ -283,8 +283,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.deleteCallbackUrls({ - appId: "test-app-id", - urls: "https://example.com/callback", + path: { app_id: "test-app-id" }, + query: { urls: "https://example.com/callback" }, }); expect(result).toBeDefined(); }); @@ -299,8 +299,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.deleteCallbackUrLs({ - appId: "test-app-id", - urls: "https://example.com/callback", + path: { app_id: "test-app-id" }, + query: { urls: "https://example.com/callback" }, }); expect(result).toBeDefined(); }); @@ -342,7 +342,7 @@ describe("Breaking Changes and Regressions", () => { }), ); - const data: GetLogoutUrlsData = { appId: "test-app-id" }; + const data: GetLogoutUrlsData = { path: { app_id: "test-app-id" } }; const result = await Callbacks.getLogoutUrls(data); expect(result).toBeDefined(); }); @@ -355,7 +355,7 @@ describe("Breaking Changes and Regressions", () => { }), ); - const data: GetLogoutUrlsData = { appId: "test-app-id" }; + const data: GetLogoutUrlsData = { path: { app_id: "test-app-id" } }; const result = await Callbacks.getLogoutUrLs(data); expect(result).toBeDefined(); }); @@ -394,8 +394,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.addLogoutRedirectUrls({ - appId: "test-app-id", - requestBody: { urls: ["https://example.com/logout"] }, + path: { app_id: "test-app-id" }, + body: { urls: ["https://example.com/logout"] }, }); expect(result).toBeDefined(); }); @@ -410,8 +410,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.addLogoutRedirectUrLs({ - appId: "test-app-id", - requestBody: { urls: ["https://example.com/logout"] }, + path: { app_id: "test-app-id" }, + body: { urls: ["https://example.com/logout"] }, }); expect(result).toBeDefined(); }); @@ -455,8 +455,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.replaceLogoutRedirectUrls({ - appId: "test-app-id", - requestBody: { urls: ["https://example.com/logout"] }, + path: { app_id: "test-app-id" }, + body: { urls: ["https://example.com/logout"] }, }); expect(result).toBeDefined(); }); @@ -471,8 +471,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.replaceLogoutRedirectUrLs({ - appId: "test-app-id", - requestBody: { urls: ["https://example.com/logout"] }, + path: { app_id: "test-app-id" }, + body: { urls: ["https://example.com/logout"] }, }); expect(result).toBeDefined(); }); @@ -516,8 +516,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.deleteLogoutUrls({ - appId: "test-app-id", - urls: "https://example.com/logout", + path: { app_id: "test-app-id" }, + query: { urls: "https://example.com/logout" }, }); expect(result).toBeDefined(); }); @@ -532,8 +532,8 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Callbacks.deleteLogoutUrLs({ - appId: "test-app-id", - urls: "https://example.com/logout", + path: { app_id: "test-app-id" }, + query: { urls: "https://example.com/logout" }, }); expect(result).toBeDefined(); }); @@ -570,7 +570,9 @@ describe("Breaking Changes and Regressions", () => { }), ); - const result = await Users.getUsers({ phone: "+1234567890" }); + const result = await Users.getUsers({ + query: { phone: "+1234567890" }, + }); expect(result).toBeDefined(); }); }); @@ -594,12 +596,14 @@ describe("Breaking Changes and Regressions", () => { }), ); - const result = await Users.getUsers({ expand: "billing" }); + const result = await Users.getUsers({ query: { expand: "billing" } }); expect(result).toBeDefined(); - if (result.users && result.users.length > 0) { - expect(result.users[0].billing).toBeDefined(); - expect(result.users[0].billing?.customer_id).toBe("cust-123"); - } + type BillingUser = { billing?: { customer_id?: string } }; + const users = (result as { users?: BillingUser[] }).users; + expect(users).toBeDefined(); + expect(users!.length).toBeGreaterThan(0); + expect(users![0].billing).toBeDefined(); + expect(users![0].billing?.customer_id).toBe("cust-123"); }); it("should accept multiple expand options including billing", async () => { @@ -623,14 +627,20 @@ describe("Breaking Changes and Regressions", () => { ); const result = await Users.getUsers({ - expand: "organizations,identities,billing", + query: { expand: "organizations,identities,billing" }, }); expect(result).toBeDefined(); - if (result.users && result.users.length > 0) { - expect(result.users[0].billing).toBeDefined(); - expect(result.users[0].organizations).toBeDefined(); - expect(result.users[0].identities).toBeDefined(); - } + type ExpandedUser = { + billing?: unknown; + organizations?: unknown; + identities?: unknown; + }; + const users = (result as { users?: ExpandedUser[] }).users; + expect(users).toBeDefined(); + expect(users!.length).toBeGreaterThan(0); + expect(users![0].billing).toBeDefined(); + expect(users![0].organizations).toBeDefined(); + expect(users![0].identities).toBeDefined(); }); }); }); @@ -638,8 +648,8 @@ describe("Breaking Changes and Regressions", () => { describe("Type Name Changes", () => { it("should export new GetCallbackUrlsData type", () => { // This is a compile-time check, but we can verify it's importable - const data: GetCallbackUrlsData = { appId: "test" }; - expect(data.appId).toBe("test"); + const data: GetCallbackUrlsData = { path: { app_id: "test" } }; + expect(data.path.app_id).toBe("test"); }); it("should export new GetCallbackUrlsResponse type", async () => { @@ -650,15 +660,17 @@ describe("Breaking Changes and Regressions", () => { }), ); - const result = await Callbacks.getCallbackUrls({ appId: "test-app-id" }); + const result = await Callbacks.getCallbackUrls({ + path: { app_id: "test-app-id" }, + }); // Type should be GetCallbackUrlsResponse (redirect_callback_urls) // The method should work and return a result expect(result).toBeDefined(); }); it("should export new GetLogoutUrlsData type", () => { - const data: GetLogoutUrlsData = { appId: "test" }; - expect(data.appId).toBe("test"); + const data: GetLogoutUrlsData = { path: { app_id: "test" } }; + expect(data.path.app_id).toBe("test"); }); });