import { BaseResource } from './BaseResource.js'; import type { RequestOptions } from '../types/common.js'; import type { ShopifyScriptCheckParams, ShopifyScriptCheckResult, ShopifyScriptUpdateParams, ShopifyScriptUpdateResult, ShopifyScriptRemoveResult, ShopifyAuditResult } from '../types/shopify.js'; /** * Manage the Tagada checkout script ("TgdMapper") injected into a connected * Shopify store's theme. The script rewrites the storefront Buy/Checkout * buttons to hand the cart off to a Tagada funnel checkout. Binding it to a * funnel/step (via {@link Shopify.updateScript}) decides which checkout — and * therefore which payment routing — the storefront uses. * * Requires the store to have Shopify connected (OAuth) in the dashboard. * * @example * ```ts * // Point the storefront checkout at a new funnel * await tagada.shopify.updateScript('store_123', { * config: { funnelId: 'funnelv2_abc', stepId: 'step_1' }, * }); * ``` */ export declare class Shopify extends BaseResource { /** * Read the installed script and its current config (which funnel/step it is * bound to). Pass `funnelId` + `stepId` to also get conflict detection. */ checkScript(storeId: string, params?: ShopifyScriptCheckParams, opts?: RequestOptions): Promise; /** * Install the script, or update it in place (e.g. switch the bound funnel). * Any existing Tagada block is replaced — one script per store. */ updateScript(storeId: string, params: ShopifyScriptUpdateParams, opts?: RequestOptions): Promise; /** * Remove all Tagada script blocks from the store's active theme. */ removeScript(storeId: string, opts?: RequestOptions): Promise; /** * Scan the active theme for known conflict patterns that silently bypass or * break the Tagada integration (hardcoded redirects, fetch interceptors, * commented-out native buttons, legacy v1 references, ...). */ audit(storeId: string, opts?: RequestOptions): Promise; } //# sourceMappingURL=Shopify.d.ts.map