export type UpdateApiV1ShopsShopIdUpdateArgs = {body: {name: string, subdomain: string, logo_image_id?: (string | null) | undefined, favicon_image_id?: (string | null) | undefined, background_image_id?: (string | null) | undefined, discord_client_id?: (string | null) | undefined, discord_client_secret?: (string | null) | undefined, discord_bot_token?: (string | null) | undefined, discord_login_enabled?: (boolean | null) | undefined, crisp_website_id?: (string | null) | undefined, tawkto_id?: (string | null) | undefined, gtag_id?: (string | null) | undefined, gtm_id?: (string | null) | undefined, meta_pixel_id?: (string | null) | undefined, trustpilot_afs_email?: (string | null) | undefined, description?: (string | null) | undefined, meta_title?: (string | null) | undefined, meta_description?: (string | null) | undefined, meta_image_id?: (string | null) | undefined, meta_twitter_card?: ('summary' | 'summary_large_image') | undefined, invoice_header?: (string | null) | undefined, invoice_notes?: (string | null) | undefined, invoice_footer?: (string | null) | undefined, invoice_attach_email?: (boolean | null) | undefined, tax_enabled?: (boolean | null) | undefined, tax_rate?: (number | null) | undefined, tax_countries?: (Record | null) | undefined, force_custom_domain?: (boolean | null) | undefined, refund_out_of_stock_to_customer_balance?: (boolean | null) | undefined, hide_out_of_stock_products?: (boolean | null) | undefined, hide_out_of_stock_variants?: (boolean | null) | undefined, require_shipping_zone?: (boolean | null) | undefined, noindex?: boolean | undefined, powered_by_enabled?: (boolean | null) | undefined, maintenance_enabled?: (boolean | null) | undefined, maintenance_password?: (string | null) | undefined, currency?: (string | null) | undefined, default_language?: ('en' | 'ar' | 'de' | 'es' | 'fa' | 'fi' | 'fr' | 'he' | 'hi' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sv' | 'tr' | 'uk' | 'vi' | 'zh' | null) | undefined, enabled_languages?: (Array<'en' | 'ar' | 'de' | 'es' | 'fa' | 'fi' | 'fr' | 'he' | 'hi' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sv' | 'tr' | 'uk' | 'vi' | 'zh'>) | undefined}}; export type UpdateApiV1ShopsShopIdUpdateOptions = {baseUrl?: string | undefined, defaultValue?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update Shop * * PUT /v1/shops/{shopId}/update */ export const updateApiV1ShopsShopIdUpdate = async (args: UpdateApiV1ShopsShopIdUpdateArgs, options?: UpdateApiV1ShopsShopIdUpdateOptions) => { const {baseUrl = "https://api.sellauth.com", fetch: fetchFn = fetch, defaultValue} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (defaultValue !== undefined) headers.set('authorization', `Bearer ${defaultValue}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/shops/${encodeURIComponent(String(args.shopId))}/update${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 };