export type UpdateApiApiOrgIdServiceStreamsConfigIdentityArgs = {org_id: string, body: unknown}; export type UpdateApiApiOrgIdServiceStreamsConfigIdentityOptions = {baseUrl: string, Authorization?: string | undefined, fetch?: typeof fetch | undefined}; /** * PUT /api/{org_id}/service_streams/config/identity */ export const updateApiApiOrgIdServiceStreamsConfigIdentity = async (args: UpdateApiApiOrgIdServiceStreamsConfigIdentityArgs, options: UpdateApiApiOrgIdServiceStreamsConfigIdentityOptions) => { const {baseUrl, fetch: fetchFn = fetch, Authorization} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (Authorization !== undefined) headers.set("Authorization", Authorization) const url = `${baseUrl.replace(/\/+$/, '')}/api/${encodeURIComponent(String(args.org_id))}/service_streams/config/identity${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 };