UNPKG

@swishapp/browser

Version:

JS library to integrate Swish into a browser environment.

15 lines (14 loc) 826 B
import { StorefrontApiClient, StorefrontApiResponse } from "./storefront-api-client"; import type { SelectedOptionInput } from "./types/storefront.types"; import type { GetSelectedVariantQuery } from "./types/storefront.generated"; export type LoadSelectedVariantResponse = StorefrontApiResponse<GetSelectedVariantQuery>; export type { GetSelectedVariantQueryVariables } from "./types/storefront.generated"; export interface LoadSelectedVariantArgs { productId?: string; productHandle?: string; selectedOptions: SelectedOptionInput[]; } export declare const loadSelectedVariant: (client: StorefrontApiClient, { productId, productHandle, selectedOptions }: LoadSelectedVariantArgs) => Promise<{ data: GetSelectedVariantQuery | undefined; errors: import("@shopify/graphql-client").ResponseErrors | null; }>;