// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import { APIPromise } from '../core/api-promise'; import { buildHeaders } from '../internal/headers'; import { RequestOptions } from '../internal/request-options'; export class RegisterExternalPipeline extends APIResource { /** * Registers an external pipeline by verifying the connection and storing the * configuration. This endpoint calls the external pipeline's /verify endpoint to * ensure it's accessible and properly configured before registration. */ registerExternalPipeline( params: RegisterExternalPipelineRegisterExternalPipelineParams, options?: RequestOptions, ): APIPromise { const { 'Accept-Language': acceptLanguage, 'X-Error-Format': xErrorFormat, ...body } = params; return this._client.post('/register-external-pipeline', { body, ...options, headers: buildHeaders([ { ...(acceptLanguage != null ? { 'Accept-Language': acceptLanguage } : undefined), ...(xErrorFormat != null ? { 'X-Error-Format': xErrorFormat } : undefined), }, options?.headers, ]), }); } } /** * Response model for registering external pipeline. * * Attributes: status (str): The status of the external pipeline registration. * message (str): A descriptive message about the registration result. */ export interface RegisterExternalPipelineResponse { /** * A descriptive message about the registration result */ message: string; /** * The status of the external pipeline registration */ status: string; } export interface RegisterExternalPipelineRegisterExternalPipelineParams { /** * Body param: The API key for authenticating with the external pipeline service */ api_key: string; /** * Body param: The base URL of the external pipeline service */ url: string; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace RegisterExternalPipeline { export { type RegisterExternalPipelineResponse as RegisterExternalPipelineResponse, type RegisterExternalPipelineRegisterExternalPipelineParams as RegisterExternalPipelineRegisterExternalPipelineParams, }; }