/** * This file was auto-generated from an OpenAPI spec. */ import { aiFunction,AIFunctionsProvider } from '@agentic/core' import defaultKy, { type KyInstance } from 'ky' import { security } from './security' /** * Agentic Security client. * * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#securitySchemeObject. */ export class SecurityClient extends AIFunctionsProvider { protected readonly ky: KyInstance protected readonly apiBaseUrl: string constructor({ apiBaseUrl = security.apiBaseUrl, ky = defaultKy }: { apiKey?: string apiBaseUrl?: string ky?: KyInstance } = {}) { super() this.apiBaseUrl = apiBaseUrl this.ky = ky.extend({ prefixUrl: apiBaseUrl }) } /** * `apiKey` auth will be supplied within an `apiKey` query parameter. */ @aiFunction({ name: 'security_get_anything_api_key', description: `\`apiKey\` auth will be supplied within an \`apiKey\` query parameter.`, inputSchema: security.GetAnythingApiKeyParamsSchema, tags: ['API Key'] }) async getAnythingApiKey( _params: security.GetAnythingApiKeyParams ): Promise { return this.ky .get('/anything/apiKey') .json() } /** * `apiKey` auth will be supplied within an `api_key` cookie. */ @aiFunction({ name: 'security_post_anything_api_key', description: `\`apiKey\` auth will be supplied within an \`api_key\` cookie.`, inputSchema: security.PostAnythingApiKeyParamsSchema, tags: ['API Key'] }) async postAnythingApiKey( _params: security.PostAnythingApiKeyParams ): Promise { return this.ky .post('/anything/apiKey') .json() } /** * `apiKey` auth will be supplied within an `X-API-KEY` header. */ @aiFunction({ name: 'security_put_anything_api_key', description: `\`apiKey\` auth will be supplied within an \`X-API-KEY\` header.`, inputSchema: security.PutAnythingApiKeyParamsSchema, tags: ['API Key'] }) async putAnythingApiKey( _params: security.PutAnythingApiKeyParams ): Promise { return this.ky .put('/anything/apiKey') .json() } /** * Authentication credentials will be supplied within a `Basic` `Authorization` header. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample. */ @aiFunction({ name: 'security_post_anything_basic', description: `Authentication credentials will be supplied within a \`Basic\` \`Authorization\` header. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample.`, inputSchema: security.PostAnythingBasicParamsSchema, tags: ['HTTP'] }) async postAnythingBasic( _params: security.PostAnythingBasicParams ): Promise { return this.ky .post('/anything/basic') .json() } /** * Authentication credentials will be supplied within a `Bearer` `Authorization` header. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample. */ @aiFunction({ name: 'security_post_anything_bearer', description: `Authentication credentials will be supplied within a \`Bearer\` \`Authorization\` header. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample.`, inputSchema: security.PostAnythingBearerParamsSchema, tags: ['HTTP'] }) async postAnythingBearer( _params: security.PostAnythingBearerParams ): Promise { return this.ky .post('/anything/bearer') .json() } /** * Authentication credentials will be supplied within a `Bearer` `Authorization` header, but its data should be controlled as a JWT. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample > ℹ️ > We currently do not support any special handling for this so they're handled as a standard `Bearer` authentication token. */ @aiFunction({ name: 'security_put_anything_bearer', description: `Authentication credentials will be supplied within a \`Bearer\` \`Authorization\` header, but its data should be controlled as a JWT. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample > ℹ️ > We currently do not support any special handling for this so they're handled as a standard \`Bearer\` authentication token.`, inputSchema: security.PutAnythingBearerParamsSchema, tags: ['HTTP'] }) async putAnythingBearer( _params: security.PutAnythingBearerParams ): Promise { return this.ky .put('/anything/bearer') .json() } /** * > ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23. */ @aiFunction({ name: 'security_get_anything_oauth2', description: `> ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an \`oauth2\` requirement we assume that the user, or the projects JWT, has a qualified \`bearer\` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23.`, inputSchema: security.GetAnythingOauth2ParamsSchema, tags: ['OAuth 2'] }) async getAnythingOauth2( _params: security.GetAnythingOauth2Params ): Promise { return this.ky .get('/anything/oauth2') .json() } /** * > ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23. */ @aiFunction({ name: 'security_post_anything_oauth2', description: `> ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an \`oauth2\` requirement we assume that the user, or the projects JWT, has a qualified \`bearer\` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23.`, inputSchema: security.PostAnythingOauth2ParamsSchema, tags: ['OAuth 2'] }) async postAnythingOauth2( _params: security.PostAnythingOauth2Params ): Promise { return this.ky .post('/anything/oauth2') .json() } /** * > ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23. */ @aiFunction({ name: 'security_put_anything_oauth2', description: `> ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an \`oauth2\` requirement we assume that the user, or the projects JWT, has a qualified \`bearer\` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23.`, inputSchema: security.PutAnythingOauth2ParamsSchema, tags: ['OAuth 2'] }) async putAnythingOauth2( _params: security.PutAnythingOauth2Params ): Promise { return this.ky .put('/anything/oauth2') .json() } /** * > ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23. */ @aiFunction({ name: 'security_delete_anything_oauth2', description: `> ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an \`oauth2\` requirement we assume that the user, or the projects JWT, has a qualified \`bearer\` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23.`, inputSchema: security.DeleteAnythingOauth2ParamsSchema, tags: ['OAuth 2'] }) async deleteAnythingOauth2( _params: security.DeleteAnythingOauth2Params ): Promise { return this.ky .delete('/anything/oauth2') .json() } /** * > ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an `oauth2` requirement we assume that the user, or the projects JWT, has a qualified `bearer` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23. */ @aiFunction({ name: 'security_patch_anything_oauth2', description: `> ℹ️ > We currently do not handle OAuth 2 authentication flows so if an operation has an \`oauth2\` requirement we assume that the user, or the projects JWT, has a qualified \`bearer\` token and will use that. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23.`, inputSchema: security.PatchAnythingOauth2ParamsSchema, tags: ['OAuth 2'] }) async patchAnythingOauth2( _params: security.PatchAnythingOauth2Params ): Promise { return this.ky .patch('/anything/oauth2') .json() } /** * 🚧 This is not supported. */ @aiFunction({ name: 'security_post_anything_open_id_connect', description: `🚧 This is not supported.`, inputSchema: security.PostAnythingOpenIdConnectParamsSchema, tags: ['OpenID Connect'] }) async postAnythingOpenIdConnect( _params: security.PostAnythingOpenIdConnectParams ): Promise { return this.ky .post('/anything/openIdConnect') .json() } /** * This operation does not have any authentication requirements. */ @aiFunction({ name: 'security_post_anything_no_auth', description: `This operation does not have any authentication requirements.`, inputSchema: security.PostAnythingNoAuthParamsSchema, tags: ['Other'] }) async postAnythingNoAuth( _params: security.PostAnythingNoAuthParams ): Promise { return this.ky .post('/anything/no-auth') .json() } /** * The `apiKey` query parameter auth on this operation is optional. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-requirement-object. */ @aiFunction({ name: 'security_get_anything_optional_auth', description: `The \`apiKey\` query parameter auth on this operation is optional. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-requirement-object.`, inputSchema: security.GetAnythingOptionalAuthParamsSchema, tags: ['Other'] }) async getAnythingOptionalAuth( _params: security.GetAnythingOptionalAuthParams ): Promise { return this.ky .get('/anything/optional-auth') .json() } /** * This endpoint requires an authentication header but making any request to it will forcefully return a 401 status code for invalid auth. */ @aiFunction({ name: 'security_post_status401', description: `This endpoint requires an authentication header but making any request to it will forcefully return a 401 status code for invalid auth.`, inputSchema: security.PostStatus401ParamsSchema, tags: ['Other'] }) async postStatus401( _params: security.PostStatus401Params ): Promise { return this.ky.post('/status/401').json() } }