@swishapp/browser
Version:
JS library to integrate Swish into a browser environment.
7 lines (6 loc) • 4.76 kB
TypeScript
export declare const GET_PRODUCT_OPTIONS_BY_ID = "\n query GetProductOptions($productId: ID!) {\n product(id: $productId) {\n ...productOptionsFields\n }\n }\n \n fragment productOptionsFields on Product {\n id\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n url\n }\n }\n }\n }\n }\n\n";
export declare const GET_PRODUCT_OPTIONS_BY_HANDLE = "\n query GetProductOptionsByHandle($handle: String!) {\n product(handle: $handle) {\n ...productOptionsFields\n }\n }\n \n fragment productOptionsFields on Product {\n id\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n url\n }\n }\n }\n }\n }\n\n";
export declare const GET_PRODUCT_OPTIONS_BY_ID_WITH_VARIANT = "\n query GetProductOptionsWithVariant($productId: ID!, $variantId: ID!) {\n product(id: $productId) {\n ...productOptionsFields\n }\n variant: node(id: $variantId) {\n ...productOptionsVariantFields\n }\n }\n \n fragment productOptionsFields on Product {\n id\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n url\n }\n }\n }\n }\n }\n\n \n fragment productOptionsVariantFields on ProductVariant {\n id\n selectedOptions {\n name\n value\n }\n }\n\n";
export declare const GET_PRODUCT_OPTIONS_BY_HANDLE_WITH_VARIANT = "\n query GetProductOptionsByHandleWithVariant(\n $handle: String!\n $variantId: ID!\n ) {\n product(handle: $handle) {\n ...productOptionsFields\n }\n variant: node(id: $variantId) {\n ...productOptionsVariantFields\n }\n }\n \n fragment productOptionsFields on Product {\n id\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n url\n }\n }\n }\n }\n }\n\n \n fragment productOptionsVariantFields on ProductVariant {\n id\n selectedOptions {\n name\n value\n }\n }\n\n";
export declare const GET_SELECTED_VARIANT = "\n query GetSelectedVariant(\n $productId: ID!\n $selectedOptions: [SelectedOptionInput!]!\n ) {\n product(id: $productId) {\n ...selectedVariantFields\n }\n }\n \n fragment selectedVariantFields on Product {\n id\n title\n handle\n variantBySelectedOptions(selectedOptions: $selectedOptions) {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n url\n }\n price {\n amount\n currencyCode\n }\n title\n selectedOptions {\n name\n value\n }\n }\n }\n\n";
export declare const GET_SELECTED_VARIANT_BY_HANDLE = "\n query GetSelectedVariantByHandle(\n $handle: String!\n $selectedOptions: [SelectedOptionInput!]!\n ) {\n product(handle: $handle) {\n ...selectedVariantFields\n }\n }\n \n fragment selectedVariantFields on Product {\n id\n title\n handle\n variantBySelectedOptions(selectedOptions: $selectedOptions) {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n url\n }\n price {\n amount\n currencyCode\n }\n title\n selectedOptions {\n name\n value\n }\n }\n }\n\n";