export type QPilotCoreHttpShopifyShopifyCustomersRedactRequest = {siteId?: (number | null) | undefined, customerExternalId?: (string | null) | undefined}; export type DeleteApiShopifyWebhooksArgs = {body: QPilotCoreHttpShopifyShopifyCustomersRedactRequest}; export type DeleteApiShopifyWebhooksOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /ShopifyWebhooks */ export const deleteApiShopifyWebhooks = async (args: DeleteApiShopifyWebhooksArgs, options?: DeleteApiShopifyWebhooksOptions) => { const {baseUrl = "https://api.qpilot.cloud", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/ShopifyWebhooks${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", 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 };