export type AuthenticationConfig = {apiKeys?: Array | undefined, applicationId?: string | undefined, audience?: string | undefined, authenticationType: 'NONE' | 'API_KEY' | 'OIDC', conductorToken?: string | undefined, createdBy?: string | undefined, fallbackToDefaultAuth?: boolean | undefined, id?: string | undefined, issuerUri?: string | undefined, orgId?: string | undefined, passthrough?: boolean | undefined, tokenInWorkflowInput?: boolean | undefined, updatedBy?: string | undefined}; export type UpdateApiApiGatewayConfigAuthIdArgs = {id: string, body: AuthenticationConfig}; export type UpdateApiApiGatewayConfigAuthIdOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * PUT /api/gateway/config/auth/{id} */ export const updateApiApiGatewayConfigAuthId = async (args: UpdateApiApiGatewayConfigAuthIdArgs, options?: UpdateApiApiGatewayConfigAuthIdOptions) => { const {baseUrl = "https://developer.orkescloud.com", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (apiKey !== undefined) headers.set("X-Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/gateway/config/auth/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };