@swishapp/browser
Version:
JS library to integrate Swish into a browser environment.
15 lines (14 loc) • 786 B
TypeScript
import { StorefrontApi, StorefrontApiResponse } from ".";
import { 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: StorefrontApi, { productId, productHandle, selectedOptions }: LoadSelectedVariantArgs) => Promise<{
data: GetSelectedVariantQuery | undefined;
error: import("@shopify/graphql-client").ResponseErrors | null;
}>;