export type CreateApiWorkspacesUpdateArgs = {body: {connect_partner_name?: string | undefined, connect_webview_customization?: ({logo_shape?: ('circle' | 'square' | null) | undefined, primary_button_color?: (string | null) | undefined, primary_button_text_color?: (string | null) | undefined, success_message?: (string | null) | undefined}) | undefined, is_publishable_key_auth_enabled?: boolean | undefined, is_suspended?: boolean | undefined, name?: string | undefined, organization_id?: string | undefined}}; export type CreateApiWorkspacesUpdateOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update a Workspace * * POST /workspaces/update * * Also accepts auth: console_session_with_workspace, pat_with_workspace */ export const createApiWorkspacesUpdate = async (args: CreateApiWorkspacesUpdateArgs, options?: CreateApiWorkspacesUpdateOptions) => { const {baseUrl = "https://connect.getseam.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('authorization', `Bearer ${apiKey}`) const url = `${baseUrl.replace(/\/+$/, '')}/workspaces/update${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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 };