export type PatchApiV3SettingsSnowyArgs = {teamId?: string | undefined, body: {customInstructions?: string | undefined, responseStyle?: ('concise' | 'balanced' | 'detailed') | undefined, responseLanguage?: string | undefined, writeActions?: boolean | undefined, knowledgeBase?: boolean | undefined, brandMemory?: boolean | undefined, autoMemory?: boolean | undefined} | {[key: string]: unknown}}; export type PatchApiV3SettingsSnowyOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update Ask Snowy agent settings * * PATCH /v3/settings/snowy * * Also accepts auth: apiKey */ export const patchApiV3SettingsSnowy = async (args: PatchApiV3SettingsSnowyArgs, options?: PatchApiV3SettingsSnowyOptions) => { const {baseUrl = "https://api.snowseo.com", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args.teamId != null) query.append("teamId", String(args.teamId)) if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v3/settings/snowy${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", 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 };