/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ExternalProxyInvoke } from '../models/ExternalProxyInvoke'; import type { ExternalProxyServiceDetail } from '../models/ExternalProxyServiceDetail'; import type { ExternalProxyServiceList } from '../models/ExternalProxyServiceList'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class AiProxyService { /** * List external proxy services * Returns a list of all enabled external proxy services. Use this endpoint to discover which services are available for proxying. * @returns ExternalProxyServiceList * @throws ApiError */ public static aiProxyOrgsServicesList({ org, }: { org: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/ai-proxy/orgs/{org}/services/', path: { 'org': org, }, }); } /** * Get external proxy service details * Returns detailed information about a specific external proxy service, including all available endpoints and their configurations. Use this to discover what actions are available for a service. * @returns ExternalProxyServiceDetail * @throws ApiError */ public static aiProxyOrgsServicesRetrieve({ org, service, }: { org: string, service: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-proxy/orgs/{org}/services/{service}/', path: { 'org': org, 'service': service, }, errors: { 404: `Service not found or disabled.`, }, }); } /** * Invoke external service endpoint * Proxy a request to an external service endpoint. The service and action must be pre-configured in the system. Credentials are automatically injected based on the service's credential policy. * @returns any Successful response from the upstream service. Response format depends on the endpoint configuration (JSON or binary). * @throws ApiError */ public static aiProxyOrgsServicesCreate({ action, org, service, requestBody, }: { action: string, org: string, service: string, requestBody?: ExternalProxyInvoke, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-proxy/orgs/{org}/services/{service}/{action}/', path: { 'action': action, 'org': org, 'service': service, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request or credential policy error.`, 404: `Service, endpoint, or credentials not found.`, 502: `Upstream service request failed.`, }, }); } }