@swishapp/sdk 0.133.0 → 0.134.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ajax-api/ajax-api-client.d.ts +11 -0
- package/dist/customiser/index.d.ts +1 -0
- package/dist/customiser/mount.d.ts +13 -0
- package/dist/dom/create-placement.d.ts +2 -2
- package/dist/dom/page-type.d.ts +7 -0
- package/dist/elements/swish-save-element.d.ts +1 -1
- package/dist/events/event-bus.d.ts +1 -1
- package/dist/intents/intents.d.ts +62 -3
- package/dist/options/schemas.d.ts +60 -0
- package/dist/options/swish-options.d.ts +3 -0
- package/dist/options/types.d.ts +7 -0
- package/dist/state/index.d.ts +1 -0
- package/dist/storefront-api/load-product-handle.d.ts +11 -0
- package/dist/storefront-api/load-product-images.d.ts +1 -1
- package/dist/storefront-api/load-product.d.ts +2 -50
- package/dist/storefront-api/queries/fragments.d.ts +1 -1
- package/dist/storefront-api/queries/index.d.ts +3 -2
- package/dist/storefront-api/storefront-api-client.d.ts +11 -54
- package/dist/storefront-api/types/storefront.generated.d.ts +167 -149
- package/dist/storefront-api/types/storefront.types.d.ts +1334 -411
- package/dist/swish-ui/swish-ui.d.ts +10 -4
- package/dist/swish.d.ts +15 -2
- package/dist/swish.js +42 -29
- package/dist/types.d.ts +21 -3
- package/package.json +4 -4
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { ResponseErrors } from "@shopify/graphql-client";
|
|
2
|
-
import {
|
|
2
|
+
import { MetafieldOptions, StorefrontContext } from "../options/types";
|
|
3
|
+
import { LoadCollectionProductsArgs } from "./load-collection-products";
|
|
3
4
|
import { LoadProductArgs } from "./load-product";
|
|
4
5
|
import { LoadProductIdArgs } from "./load-product-id";
|
|
5
6
|
import { LoadProductImagesArgs } from "./load-product-images";
|
|
6
7
|
import { LoadProductRecommendationsArgs } from "./load-product-recommendations";
|
|
7
|
-
import {
|
|
8
|
+
import { LoadProductHandleArgs } from "./load-product-handle";
|
|
9
|
+
export * from "./load-collection-products";
|
|
8
10
|
export * from "./load-product";
|
|
9
11
|
export * from "./load-product-recommendations";
|
|
10
|
-
export * from "./load-collection-products";
|
|
11
12
|
export * from "./types/storefront.generated";
|
|
12
13
|
export type { SelectedOptionInput } from "./types/storefront.types";
|
|
13
14
|
export interface StorefrontApiResponse<TData> {
|
|
@@ -34,61 +35,13 @@ export declare class StorefrontApiClient {
|
|
|
34
35
|
}>;
|
|
35
36
|
loadProduct: (args: ArgsWithoutDefaults<LoadProductArgs>) => Promise<{
|
|
36
37
|
data: {
|
|
37
|
-
product:
|
|
38
|
-
|
|
39
|
-
compareAtPrice?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">>;
|
|
40
|
-
image?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
41
|
-
price: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
42
|
-
selectedOptions: Array<Pick<import("./types/storefront.types").SelectedOption, "name" | "value">>;
|
|
43
|
-
metafields: Array<import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Metafield, "key" | "namespace" | "value">>>;
|
|
44
|
-
}>;
|
|
45
|
-
category?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").TaxonomyCategory, "id" | "name">>;
|
|
46
|
-
compareAtPriceRange: {
|
|
47
|
-
maxVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
48
|
-
minVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
49
|
-
};
|
|
50
|
-
featuredImage?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
51
|
-
images: {
|
|
52
|
-
nodes: Array<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
53
|
-
};
|
|
54
|
-
metafields: Array<import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Metafield, "key" | "namespace" | "value">>>;
|
|
55
|
-
selectedOrFirstAvailableVariant?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").ProductVariant, "id" | "availableForSale" | "currentlyNotInStock" | "sku" | "title"> & {
|
|
56
|
-
compareAtPrice?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">>;
|
|
57
|
-
image?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
58
|
-
price: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
59
|
-
selectedOptions: Array<Pick<import("./types/storefront.types").SelectedOption, "name" | "value">>;
|
|
60
|
-
metafields: Array<import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Metafield, "key" | "namespace" | "value">>>;
|
|
61
|
-
}>;
|
|
62
|
-
options: Array<Pick<import("./types/storefront.types").ProductOption, "id" | "name"> & {
|
|
63
|
-
optionValues: Array<Pick<import("./types/storefront.types").ProductOptionValue, "name"> & {
|
|
64
|
-
swatch?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").ProductOptionValueSwatch, "color"> & {
|
|
65
|
-
image?: import("./types/storefront.types").Maybe<{
|
|
66
|
-
previewImage?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Image, "url">>;
|
|
67
|
-
}>;
|
|
68
|
-
}>;
|
|
69
|
-
firstSelectableVariant?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").ProductVariant, "id"> & {
|
|
70
|
-
image?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
71
|
-
}>;
|
|
72
|
-
}>;
|
|
73
|
-
}>;
|
|
74
|
-
priceRange: {
|
|
75
|
-
maxVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
76
|
-
minVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
77
|
-
};
|
|
78
|
-
variantsCount?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Count, "count" | "precision">>;
|
|
79
|
-
}) | null;
|
|
80
|
-
variant: (Pick<import("./types/storefront.types").ProductVariant, "title" | "id" | "availableForSale" | "currentlyNotInStock" | "sku"> & {
|
|
81
|
-
compareAtPrice?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">>;
|
|
82
|
-
image?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
83
|
-
price: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
84
|
-
selectedOptions: Array<Pick<import("./types/storefront.types").SelectedOption, "name" | "value">>;
|
|
85
|
-
metafields: Array<import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Metafield, "key" | "namespace" | "value">>>;
|
|
86
|
-
}) | null;
|
|
38
|
+
product: import("../types").Product | null;
|
|
39
|
+
variant: import("../types").ProductVariant | null;
|
|
87
40
|
};
|
|
88
41
|
errors: ResponseErrors | null;
|
|
89
42
|
}>;
|
|
90
43
|
loadProductImages: (args: ArgsWithoutDefaults<LoadProductImagesArgs>) => Promise<{
|
|
91
|
-
data: (Pick<import("./types/storefront.types").Image, "id" | "
|
|
44
|
+
data: (Pick<import("./types/storefront.types").Image, "id" | "url" | "altText" | "thumbhash"> | undefined)[];
|
|
92
45
|
errors: null;
|
|
93
46
|
} | {
|
|
94
47
|
data: null;
|
|
@@ -104,6 +57,10 @@ export declare class StorefrontApiClient {
|
|
|
104
57
|
data: import("./storefront-api-client").GetProductIdByHandleQuery | undefined;
|
|
105
58
|
errors: ResponseErrors | null;
|
|
106
59
|
}>;
|
|
60
|
+
loadProductHandle: (args: LoadProductHandleArgs) => Promise<{
|
|
61
|
+
data: import("./storefront-api-client").GetProductHandleByIdQuery | undefined;
|
|
62
|
+
errors: ResponseErrors | null;
|
|
63
|
+
}>;
|
|
107
64
|
loadCollectionProducts: (args: ArgsWithoutDefaults<LoadCollectionProductsArgs>) => Promise<{
|
|
108
65
|
data: import("./storefront-api-client").GetCollectionProductsQuery | undefined;
|
|
109
66
|
errors: ResponseErrors | null;
|
|
@@ -1,234 +1,248 @@
|
|
|
1
|
-
import * as StorefrontTypes from
|
|
2
|
-
export type ProductImageFieldsFragment = Pick<StorefrontTypes.Image,
|
|
3
|
-
export type ProductFieldsFragment = Pick<StorefrontTypes.Product,
|
|
4
|
-
category?: StorefrontTypes.Maybe<Pick<StorefrontTypes.TaxonomyCategory,
|
|
1
|
+
import * as StorefrontTypes from './storefront.types.js';
|
|
2
|
+
export type ProductImageFieldsFragment = Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>;
|
|
3
|
+
export type ProductFieldsFragment = (Pick<StorefrontTypes.Product, 'id' | 'availableForSale' | 'description' | 'descriptionHtml' | 'encodedVariantAvailability' | 'encodedVariantExistence' | 'handle' | 'isGiftCard' | 'onlineStoreUrl' | 'productType' | 'tags' | 'title'> & {
|
|
4
|
+
category?: StorefrontTypes.Maybe<Pick<StorefrontTypes.TaxonomyCategory, 'id' | 'name'>>;
|
|
5
5
|
compareAtPriceRange: {
|
|
6
|
-
maxVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
7
|
-
minVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
6
|
+
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
7
|
+
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
8
8
|
};
|
|
9
|
-
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
9
|
+
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
10
10
|
images: {
|
|
11
|
-
nodes: Array<Pick<StorefrontTypes.Image,
|
|
11
|
+
nodes: Array<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
12
12
|
};
|
|
13
|
-
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield,
|
|
14
|
-
selectedOrFirstAvailableVariant?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
15
|
-
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2,
|
|
16
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
17
|
-
price: Pick<StorefrontTypes.MoneyV2,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
14
|
+
selectedOrFirstAvailableVariant?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id' | 'availableForSale' | 'currentlyNotInStock' | 'sku' | 'title'> & {
|
|
15
|
+
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>>;
|
|
16
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
17
|
+
price: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
18
|
+
product: Pick<StorefrontTypes.Product, 'id'>;
|
|
19
|
+
selectedOptions: Array<Pick<StorefrontTypes.SelectedOption, 'name' | 'value'>>;
|
|
20
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
21
|
+
})>;
|
|
22
|
+
options: Array<(Pick<StorefrontTypes.ProductOption, 'id' | 'name'> & {
|
|
23
|
+
optionValues: Array<(Pick<StorefrontTypes.ProductOptionValue, 'name'> & {
|
|
24
|
+
swatch?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductOptionValueSwatch, 'color'> & {
|
|
24
25
|
image?: StorefrontTypes.Maybe<{
|
|
25
|
-
previewImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
26
|
+
previewImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'url'>>;
|
|
26
27
|
}>;
|
|
27
|
-
}>;
|
|
28
|
-
firstSelectableVariant?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
29
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
30
|
-
}>;
|
|
31
|
-
}>;
|
|
32
|
-
}>;
|
|
28
|
+
})>;
|
|
29
|
+
firstSelectableVariant?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id'> & {
|
|
30
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
31
|
+
})>;
|
|
32
|
+
})>;
|
|
33
|
+
})>;
|
|
33
34
|
priceRange: {
|
|
34
|
-
maxVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
35
|
-
minVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
35
|
+
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
36
|
+
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
36
37
|
};
|
|
37
|
-
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count,
|
|
38
|
-
};
|
|
39
|
-
export type ProductVariantDataFieldsFragment = Pick<StorefrontTypes.ProductVariant,
|
|
40
|
-
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2,
|
|
41
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
42
|
-
price: Pick<StorefrontTypes.MoneyV2,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count, 'count' | 'precision'>>;
|
|
39
|
+
});
|
|
40
|
+
export type ProductVariantDataFieldsFragment = (Pick<StorefrontTypes.ProductVariant, 'id' | 'availableForSale' | 'currentlyNotInStock' | 'sku' | 'title'> & {
|
|
41
|
+
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>>;
|
|
42
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
43
|
+
price: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
44
|
+
product: Pick<StorefrontTypes.Product, 'id'>;
|
|
45
|
+
selectedOptions: Array<Pick<StorefrontTypes.SelectedOption, 'name' | 'value'>>;
|
|
46
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
47
|
+
});
|
|
46
48
|
export type GetProductQueryVariables = StorefrontTypes.Exact<{
|
|
47
|
-
productId: StorefrontTypes.Scalars[
|
|
48
|
-
variantId: StorefrontTypes.Scalars[
|
|
49
|
+
productId: StorefrontTypes.Scalars['ID']['input'];
|
|
50
|
+
variantId: StorefrontTypes.Scalars['ID']['input'];
|
|
49
51
|
selectedOptions: Array<StorefrontTypes.SelectedOptionInput> | StorefrontTypes.SelectedOptionInput;
|
|
50
52
|
productMetafields: Array<StorefrontTypes.HasMetafieldsIdentifier> | StorefrontTypes.HasMetafieldsIdentifier;
|
|
51
53
|
variantMetafields: Array<StorefrontTypes.HasMetafieldsIdentifier> | StorefrontTypes.HasMetafieldsIdentifier;
|
|
52
|
-
includeVariantById: StorefrontTypes.Scalars[
|
|
53
|
-
includeVariantBySelectedOptions: StorefrontTypes.Scalars[
|
|
54
|
+
includeVariantById: StorefrontTypes.Scalars['Boolean']['input'];
|
|
55
|
+
includeVariantBySelectedOptions: StorefrontTypes.Scalars['Boolean']['input'];
|
|
54
56
|
country: StorefrontTypes.CountryCode;
|
|
55
57
|
language: StorefrontTypes.LanguageCode;
|
|
56
58
|
}>;
|
|
57
59
|
export type GetProductQuery = {
|
|
58
|
-
product?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Product,
|
|
59
|
-
variant?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
60
|
-
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2,
|
|
61
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
62
|
-
price: Pick<StorefrontTypes.MoneyV2,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
product?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.Product, 'id' | 'availableForSale' | 'description' | 'descriptionHtml' | 'encodedVariantAvailability' | 'encodedVariantExistence' | 'handle' | 'isGiftCard' | 'onlineStoreUrl' | 'productType' | 'tags' | 'title'> & {
|
|
61
|
+
variant?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id' | 'availableForSale' | 'currentlyNotInStock' | 'sku' | 'title'> & {
|
|
62
|
+
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>>;
|
|
63
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
64
|
+
price: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
65
|
+
product: Pick<StorefrontTypes.Product, 'id'>;
|
|
66
|
+
selectedOptions: Array<Pick<StorefrontTypes.SelectedOption, 'name' | 'value'>>;
|
|
67
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
68
|
+
})>;
|
|
69
|
+
category?: StorefrontTypes.Maybe<Pick<StorefrontTypes.TaxonomyCategory, 'id' | 'name'>>;
|
|
67
70
|
compareAtPriceRange: {
|
|
68
|
-
maxVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
69
|
-
minVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
71
|
+
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
72
|
+
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
70
73
|
};
|
|
71
|
-
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
74
|
+
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
72
75
|
images: {
|
|
73
|
-
nodes: Array<Pick<StorefrontTypes.Image,
|
|
76
|
+
nodes: Array<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
74
77
|
};
|
|
75
|
-
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield,
|
|
76
|
-
selectedOrFirstAvailableVariant?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
77
|
-
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2,
|
|
78
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
79
|
-
price: Pick<StorefrontTypes.MoneyV2,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
79
|
+
selectedOrFirstAvailableVariant?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id' | 'availableForSale' | 'currentlyNotInStock' | 'sku' | 'title'> & {
|
|
80
|
+
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>>;
|
|
81
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
82
|
+
price: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
83
|
+
product: Pick<StorefrontTypes.Product, 'id'>;
|
|
84
|
+
selectedOptions: Array<Pick<StorefrontTypes.SelectedOption, 'name' | 'value'>>;
|
|
85
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
86
|
+
})>;
|
|
87
|
+
options: Array<(Pick<StorefrontTypes.ProductOption, 'id' | 'name'> & {
|
|
88
|
+
optionValues: Array<(Pick<StorefrontTypes.ProductOptionValue, 'name'> & {
|
|
89
|
+
swatch?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductOptionValueSwatch, 'color'> & {
|
|
86
90
|
image?: StorefrontTypes.Maybe<{
|
|
87
|
-
previewImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
91
|
+
previewImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'url'>>;
|
|
88
92
|
}>;
|
|
89
|
-
}>;
|
|
90
|
-
firstSelectableVariant?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
91
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
92
|
-
}>;
|
|
93
|
-
}>;
|
|
94
|
-
}>;
|
|
93
|
+
})>;
|
|
94
|
+
firstSelectableVariant?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id'> & {
|
|
95
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
96
|
+
})>;
|
|
97
|
+
})>;
|
|
98
|
+
})>;
|
|
95
99
|
priceRange: {
|
|
96
|
-
maxVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
97
|
-
minVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
100
|
+
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
101
|
+
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
98
102
|
};
|
|
99
|
-
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count,
|
|
100
|
-
}>;
|
|
101
|
-
variantNode?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
102
|
-
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2,
|
|
103
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
104
|
-
price: Pick<StorefrontTypes.MoneyV2,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count, 'count' | 'precision'>>;
|
|
104
|
+
})>;
|
|
105
|
+
variantNode?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id' | 'availableForSale' | 'currentlyNotInStock' | 'sku' | 'title'> & {
|
|
106
|
+
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>>;
|
|
107
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
108
|
+
price: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
109
|
+
product: Pick<StorefrontTypes.Product, 'id'>;
|
|
110
|
+
selectedOptions: Array<Pick<StorefrontTypes.SelectedOption, 'name' | 'value'>>;
|
|
111
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
112
|
+
})>;
|
|
108
113
|
};
|
|
109
114
|
export type GetProductByHandleQueryVariables = StorefrontTypes.Exact<{
|
|
110
|
-
handle: StorefrontTypes.Scalars[
|
|
111
|
-
variantId: StorefrontTypes.Scalars[
|
|
115
|
+
handle: StorefrontTypes.Scalars['String']['input'];
|
|
116
|
+
variantId: StorefrontTypes.Scalars['ID']['input'];
|
|
112
117
|
selectedOptions: Array<StorefrontTypes.SelectedOptionInput> | StorefrontTypes.SelectedOptionInput;
|
|
113
118
|
productMetafields: Array<StorefrontTypes.HasMetafieldsIdentifier> | StorefrontTypes.HasMetafieldsIdentifier;
|
|
114
119
|
variantMetafields: Array<StorefrontTypes.HasMetafieldsIdentifier> | StorefrontTypes.HasMetafieldsIdentifier;
|
|
115
|
-
includeVariantById: StorefrontTypes.Scalars[
|
|
116
|
-
includeVariantBySelectedOptions: StorefrontTypes.Scalars[
|
|
120
|
+
includeVariantById: StorefrontTypes.Scalars['Boolean']['input'];
|
|
121
|
+
includeVariantBySelectedOptions: StorefrontTypes.Scalars['Boolean']['input'];
|
|
117
122
|
country: StorefrontTypes.CountryCode;
|
|
118
123
|
language: StorefrontTypes.LanguageCode;
|
|
119
124
|
}>;
|
|
120
125
|
export type GetProductByHandleQuery = {
|
|
121
|
-
product?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Product,
|
|
122
|
-
variant?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
123
|
-
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2,
|
|
124
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
125
|
-
price: Pick<StorefrontTypes.MoneyV2,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
product?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.Product, 'id' | 'availableForSale' | 'description' | 'descriptionHtml' | 'encodedVariantAvailability' | 'encodedVariantExistence' | 'handle' | 'isGiftCard' | 'onlineStoreUrl' | 'productType' | 'tags' | 'title'> & {
|
|
127
|
+
variant?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id' | 'availableForSale' | 'currentlyNotInStock' | 'sku' | 'title'> & {
|
|
128
|
+
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>>;
|
|
129
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
130
|
+
price: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
131
|
+
product: Pick<StorefrontTypes.Product, 'id'>;
|
|
132
|
+
selectedOptions: Array<Pick<StorefrontTypes.SelectedOption, 'name' | 'value'>>;
|
|
133
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
134
|
+
})>;
|
|
135
|
+
category?: StorefrontTypes.Maybe<Pick<StorefrontTypes.TaxonomyCategory, 'id' | 'name'>>;
|
|
130
136
|
compareAtPriceRange: {
|
|
131
|
-
maxVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
132
|
-
minVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
137
|
+
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
138
|
+
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
133
139
|
};
|
|
134
|
-
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
140
|
+
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
135
141
|
images: {
|
|
136
|
-
nodes: Array<Pick<StorefrontTypes.Image,
|
|
142
|
+
nodes: Array<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
137
143
|
};
|
|
138
|
-
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield,
|
|
139
|
-
selectedOrFirstAvailableVariant?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
140
|
-
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2,
|
|
141
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
142
|
-
price: Pick<StorefrontTypes.MoneyV2,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
144
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
145
|
+
selectedOrFirstAvailableVariant?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id' | 'availableForSale' | 'currentlyNotInStock' | 'sku' | 'title'> & {
|
|
146
|
+
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>>;
|
|
147
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
148
|
+
price: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
149
|
+
product: Pick<StorefrontTypes.Product, 'id'>;
|
|
150
|
+
selectedOptions: Array<Pick<StorefrontTypes.SelectedOption, 'name' | 'value'>>;
|
|
151
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
152
|
+
})>;
|
|
153
|
+
options: Array<(Pick<StorefrontTypes.ProductOption, 'id' | 'name'> & {
|
|
154
|
+
optionValues: Array<(Pick<StorefrontTypes.ProductOptionValue, 'name'> & {
|
|
155
|
+
swatch?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductOptionValueSwatch, 'color'> & {
|
|
149
156
|
image?: StorefrontTypes.Maybe<{
|
|
150
|
-
previewImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
157
|
+
previewImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'url'>>;
|
|
151
158
|
}>;
|
|
152
|
-
}>;
|
|
153
|
-
firstSelectableVariant?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
154
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
155
|
-
}>;
|
|
156
|
-
}>;
|
|
157
|
-
}>;
|
|
159
|
+
})>;
|
|
160
|
+
firstSelectableVariant?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id'> & {
|
|
161
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
162
|
+
})>;
|
|
163
|
+
})>;
|
|
164
|
+
})>;
|
|
158
165
|
priceRange: {
|
|
159
|
-
maxVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
160
|
-
minVariantPrice: Pick<StorefrontTypes.MoneyV2,
|
|
166
|
+
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
167
|
+
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
161
168
|
};
|
|
162
|
-
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count,
|
|
163
|
-
}>;
|
|
164
|
-
variantNode?: StorefrontTypes.Maybe<Pick<StorefrontTypes.ProductVariant,
|
|
165
|
-
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2,
|
|
166
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
167
|
-
price: Pick<StorefrontTypes.MoneyV2,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count, 'count' | 'precision'>>;
|
|
170
|
+
})>;
|
|
171
|
+
variantNode?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductVariant, 'id' | 'availableForSale' | 'currentlyNotInStock' | 'sku' | 'title'> & {
|
|
172
|
+
compareAtPrice?: StorefrontTypes.Maybe<Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>>;
|
|
173
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
174
|
+
price: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
175
|
+
product: Pick<StorefrontTypes.Product, 'id'>;
|
|
176
|
+
selectedOptions: Array<Pick<StorefrontTypes.SelectedOption, 'name' | 'value'>>;
|
|
177
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
178
|
+
})>;
|
|
171
179
|
};
|
|
172
180
|
export type GetProductImagesByIdQueryVariables = StorefrontTypes.Exact<{
|
|
173
|
-
ids: Array<StorefrontTypes.Scalars[
|
|
181
|
+
ids: Array<StorefrontTypes.Scalars['ID']['input']> | StorefrontTypes.Scalars['ID']['input'];
|
|
174
182
|
country: StorefrontTypes.CountryCode;
|
|
175
183
|
language: StorefrontTypes.LanguageCode;
|
|
176
184
|
}>;
|
|
177
185
|
export type GetProductImagesByIdQuery = {
|
|
178
186
|
nodes: Array<StorefrontTypes.Maybe<{
|
|
179
|
-
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
187
|
+
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
180
188
|
} | {
|
|
181
|
-
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
189
|
+
image?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
182
190
|
product: {
|
|
183
|
-
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image,
|
|
191
|
+
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
184
192
|
};
|
|
185
193
|
}>>;
|
|
186
194
|
};
|
|
187
195
|
export type GetProductRecommendationsByIdQueryVariables = StorefrontTypes.Exact<{
|
|
188
|
-
productId: StorefrontTypes.Scalars[
|
|
196
|
+
productId: StorefrontTypes.Scalars['ID']['input'];
|
|
189
197
|
intent?: StorefrontTypes.InputMaybe<StorefrontTypes.ProductRecommendationIntent>;
|
|
190
198
|
country: StorefrontTypes.CountryCode;
|
|
191
199
|
language: StorefrontTypes.LanguageCode;
|
|
192
200
|
}>;
|
|
193
201
|
export type GetProductRecommendationsByIdQuery = {
|
|
194
|
-
productRecommendations?: StorefrontTypes.Maybe<Array<Pick<StorefrontTypes.Product,
|
|
202
|
+
productRecommendations?: StorefrontTypes.Maybe<Array<Pick<StorefrontTypes.Product, 'id'>>>;
|
|
195
203
|
};
|
|
196
204
|
export type GetProductRecommendationsByHandleQueryVariables = StorefrontTypes.Exact<{
|
|
197
|
-
handle: StorefrontTypes.Scalars[
|
|
205
|
+
handle: StorefrontTypes.Scalars['String']['input'];
|
|
198
206
|
intent?: StorefrontTypes.InputMaybe<StorefrontTypes.ProductRecommendationIntent>;
|
|
199
207
|
country: StorefrontTypes.CountryCode;
|
|
200
208
|
language: StorefrontTypes.LanguageCode;
|
|
201
209
|
}>;
|
|
202
210
|
export type GetProductRecommendationsByHandleQuery = {
|
|
203
|
-
productRecommendations?: StorefrontTypes.Maybe<Array<Pick<StorefrontTypes.Product,
|
|
211
|
+
productRecommendations?: StorefrontTypes.Maybe<Array<Pick<StorefrontTypes.Product, 'id'>>>;
|
|
204
212
|
};
|
|
205
213
|
export type GetProductIdByHandleQueryVariables = StorefrontTypes.Exact<{
|
|
206
|
-
handle: StorefrontTypes.Scalars[
|
|
214
|
+
handle: StorefrontTypes.Scalars['String']['input'];
|
|
207
215
|
}>;
|
|
208
216
|
export type GetProductIdByHandleQuery = {
|
|
209
|
-
product?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Product,
|
|
217
|
+
product?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Product, 'id'>>;
|
|
218
|
+
};
|
|
219
|
+
export type GetProductHandleByIdQueryVariables = StorefrontTypes.Exact<{
|
|
220
|
+
productId: StorefrontTypes.Scalars['ID']['input'];
|
|
221
|
+
}>;
|
|
222
|
+
export type GetProductHandleByIdQuery = {
|
|
223
|
+
product?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Product, 'handle'>>;
|
|
210
224
|
};
|
|
211
225
|
export type GetCollectionProductsQueryVariables = StorefrontTypes.Exact<{
|
|
212
|
-
handle: StorefrontTypes.Scalars[
|
|
213
|
-
first: StorefrontTypes.Scalars[
|
|
214
|
-
after?: StorefrontTypes.InputMaybe<StorefrontTypes.Scalars[
|
|
226
|
+
handle: StorefrontTypes.Scalars['String']['input'];
|
|
227
|
+
first: StorefrontTypes.Scalars['Int']['input'];
|
|
228
|
+
after?: StorefrontTypes.InputMaybe<StorefrontTypes.Scalars['String']['input']>;
|
|
215
229
|
country: StorefrontTypes.CountryCode;
|
|
216
230
|
language: StorefrontTypes.LanguageCode;
|
|
217
231
|
}>;
|
|
218
232
|
export type GetCollectionProductsQuery = {
|
|
219
|
-
collection?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Collection,
|
|
233
|
+
collection?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.Collection, 'title' | 'handle' | 'onlineStoreUrl'> & {
|
|
220
234
|
products: {
|
|
221
|
-
pageInfo: Pick<StorefrontTypes.PageInfo,
|
|
222
|
-
nodes: Array<Pick<StorefrontTypes.Product,
|
|
235
|
+
pageInfo: Pick<StorefrontTypes.PageInfo, 'hasNextPage' | 'endCursor'>;
|
|
236
|
+
nodes: Array<Pick<StorefrontTypes.Product, 'id'>>;
|
|
223
237
|
};
|
|
224
|
-
}>;
|
|
238
|
+
})>;
|
|
225
239
|
};
|
|
226
240
|
interface GeneratedQueryTypes {
|
|
227
|
-
"\n query GetProduct(\n $productId: ID!\n $variantId: ID!\n $selectedOptions: [SelectedOptionInput!]!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $includeVariantById: Boolean!\n $includeVariantBySelectedOptions: Boolean!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productFields\n variant: variantBySelectedOptions(selectedOptions: $selectedOptions)\n @include(if: $includeVariantBySelectedOptions) {\n ...productVariantDataFields\n }\n }\n variantNode: node(id: $variantId) @include(if: $includeVariantById) {\n ... on ProductVariant {\n ...productVariantDataFields\n }\n }\n }\n \n fragment productFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n description\n descriptionHtml\n encodedVariantAvailability\n encodedVariantExistence\n featuredImage {\n ...productImageFields\n }\n handle\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n isGiftCard\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n onlineStoreUrl\n selectedOrFirstAvailableVariant(selectedOptions: $selectedOptions) {\n ...productVariantDataFields\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 ...productImageFields\n }\n }\n }\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n precision\n }\n # totalInventory\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
241
|
+
"\n query GetProduct(\n $productId: ID!\n $variantId: ID!\n $selectedOptions: [SelectedOptionInput!]!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $includeVariantById: Boolean!\n $includeVariantBySelectedOptions: Boolean!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productFields\n variant: variantBySelectedOptions(selectedOptions: $selectedOptions)\n @include(if: $includeVariantBySelectedOptions) {\n ...productVariantDataFields\n }\n }\n variantNode: node(id: $variantId) @include(if: $includeVariantById) {\n ... on ProductVariant {\n ...productVariantDataFields\n }\n }\n }\n \n fragment productFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n description\n descriptionHtml\n encodedVariantAvailability\n encodedVariantExistence\n featuredImage {\n ...productImageFields\n }\n handle\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n isGiftCard\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n onlineStoreUrl\n selectedOrFirstAvailableVariant(selectedOptions: $selectedOptions) {\n ...productVariantDataFields\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 ...productImageFields\n }\n }\n }\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n precision\n }\n # totalInventory\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n product {\n id\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
228
242
|
return: GetProductQuery;
|
|
229
243
|
variables: GetProductQueryVariables;
|
|
230
244
|
};
|
|
231
|
-
"\n query GetProductByHandle(\n $handle: String!\n $variantId: ID!\n $selectedOptions: [SelectedOptionInput!]!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $includeVariantById: Boolean!\n $includeVariantBySelectedOptions: Boolean!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...productFields\n variant: variantBySelectedOptions(selectedOptions: $selectedOptions)\n @include(if: $includeVariantBySelectedOptions) {\n ...productVariantDataFields\n }\n }\n variantNode: node(id: $variantId) @include(if: $includeVariantById) {\n ... on ProductVariant {\n ...productVariantDataFields\n }\n }\n }\n \n fragment productFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n description\n descriptionHtml\n encodedVariantAvailability\n encodedVariantExistence\n featuredImage {\n ...productImageFields\n }\n handle\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n isGiftCard\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n onlineStoreUrl\n selectedOrFirstAvailableVariant(selectedOptions: $selectedOptions) {\n ...productVariantDataFields\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 ...productImageFields\n }\n }\n }\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n precision\n }\n # totalInventory\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
245
|
+
"\n query GetProductByHandle(\n $handle: String!\n $variantId: ID!\n $selectedOptions: [SelectedOptionInput!]!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $includeVariantById: Boolean!\n $includeVariantBySelectedOptions: Boolean!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...productFields\n variant: variantBySelectedOptions(selectedOptions: $selectedOptions)\n @include(if: $includeVariantBySelectedOptions) {\n ...productVariantDataFields\n }\n }\n variantNode: node(id: $variantId) @include(if: $includeVariantById) {\n ... on ProductVariant {\n ...productVariantDataFields\n }\n }\n }\n \n fragment productFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n description\n descriptionHtml\n encodedVariantAvailability\n encodedVariantExistence\n featuredImage {\n ...productImageFields\n }\n handle\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n isGiftCard\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n onlineStoreUrl\n selectedOrFirstAvailableVariant(selectedOptions: $selectedOptions) {\n ...productVariantDataFields\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 ...productImageFields\n }\n }\n }\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n precision\n }\n # totalInventory\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n product {\n id\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
232
246
|
return: GetProductByHandleQuery;
|
|
233
247
|
variables: GetProductByHandleQueryVariables;
|
|
234
248
|
};
|
|
@@ -248,6 +262,10 @@ interface GeneratedQueryTypes {
|
|
|
248
262
|
return: GetProductIdByHandleQuery;
|
|
249
263
|
variables: GetProductIdByHandleQueryVariables;
|
|
250
264
|
};
|
|
265
|
+
"\n query GetProductHandleById($productId: ID!) {\n product(id: $productId) {\n handle\n }\n }\n": {
|
|
266
|
+
return: GetProductHandleByIdQuery;
|
|
267
|
+
variables: GetProductHandleByIdQueryVariables;
|
|
268
|
+
};
|
|
251
269
|
"\n query GetCollectionProducts(\n $handle: String!\n $first: Int!\n $after: String\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n collection(handle: $handle) {\n title\n handle\n onlineStoreUrl\n products(first: $first, after: $after) {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n id\n }\n }\n }\n }\n": {
|
|
252
270
|
return: GetCollectionProductsQuery;
|
|
253
271
|
variables: GetCollectionProductsQueryVariables;
|
|
@@ -255,7 +273,7 @@ interface GeneratedQueryTypes {
|
|
|
255
273
|
}
|
|
256
274
|
interface GeneratedMutationTypes {
|
|
257
275
|
}
|
|
258
|
-
declare module
|
|
276
|
+
declare module '@shopify/storefront-api-client' {
|
|
259
277
|
type InputMaybe<T> = StorefrontTypes.InputMaybe<T>;
|
|
260
278
|
interface StorefrontQueries extends GeneratedQueryTypes {
|
|
261
279
|
}
|