UNPKG

@swishapp/browser

Version:

JS library to integrate Swish into a browser environment.

19 lines (18 loc) 728 B
import type { ResponseErrors } from "@shopify/graphql-client"; export * from "./types/storefront.generated"; export * from "./loadProductOptions"; export * from "./loadSelectedVariant"; export interface StorefrontApiResponse<TData> { data: TData; errors: ResponseErrors; } export declare const API_VERSION = "2025-04"; export interface StorefrontConfig { storeDomain: string; accessToken: string; } export declare const setConfig: (config: StorefrontConfig) => void; export declare const queryStorefrontApi: <TData, TVariables extends Record<string, unknown>>(query: string, variables: TVariables) => Promise<{ data: (TData extends undefined ? any : TData) | undefined; error: ResponseErrors | null; }>;