@adtrackify/at-service-common 3.1.11 → 3.1.13
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/cjs/clients/third-party/shopify/graphql-product-queries.d.ts +2 -1
- package/dist/cjs/clients/third-party/shopify/graphql-product-queries.js +24 -21
- package/dist/cjs/clients/third-party/shopify/graphql-product-queries.js.map +1 -1
- package/dist/cjs/services/shopify/products/shopify-products-serviceV2.js +0 -2
- package/dist/cjs/services/shopify/products/shopify-products-serviceV2.js.map +1 -1
- package/dist/cjs/types/shopify-graphql-types/admin.generated.d.ts +2 -4
- package/dist/esm/clients/third-party/shopify/graphql-product-queries.d.ts +2 -1
- package/dist/esm/clients/third-party/shopify/graphql-product-queries.js +23 -20
- package/dist/esm/clients/third-party/shopify/graphql-product-queries.js.map +1 -1
- package/dist/esm/services/shopify/products/shopify-products-serviceV2.js +0 -2
- package/dist/esm/services/shopify/products/shopify-products-serviceV2.js.map +1 -1
- package/dist/esm/types/shopify-graphql-types/admin.generated.d.ts +2 -4
- package/package.json +1 -1
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const MediaSnippet = "\n... on MediaImage {\n createdAt\n fileErrors {\n code\n details\n message\n }\n fileStatus\n id\n image {\n altText\n height\n id\n originalSrc\n src\n transformedSrc\n width\n }\n mimeType\n}\n";
|
|
2
|
+
export declare const graphqlProductQueryByProductId = "\n#graphql\nquery GetProduct($id: ID!, $first: Int!, $after: String) {\n product(id: $id) { \n id\n handle\n productType\n hasOnlyDefaultVariant\n isGiftCard\n legacyResourceId\n onlineStoreUrl\n productType\n publishedAt\n requiresSellingPlan\n status\n tags\n title\n totalInventory\n tracksInventory\n vendor\n createdAt\n updatedAt \n category {\n id\n name\n fullName\n parentId\n }\n priceRangeV2 {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variantsCount {\n count\n }\n seo {\n title\n description\n }\n featuredMedia {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n }\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n\n }\n }\n variants (first: $first, after: $after) { \n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n availableForSale\n barcode\n compareAtPrice\n createdAt\n displayName\n id\n legacyResourceId\n product {\n id\n handle\n }\n image {\n id\n url \n }\n inventoryQuantity\n price\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status \n preview {\n image {\n id\n url\n }\n status\n }\n }\n }\n selectedOptions {\n name\n value\n }\n sellableOnlineQuantity\n sku\n taxable\n title\n updatedAt\n }\n }\n }\n}\n";
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.graphqlProductQueryByProductId = void 0;
|
|
3
|
+
exports.graphqlProductQueryByProductId = exports.MediaSnippet = void 0;
|
|
4
|
+
exports.MediaSnippet = `
|
|
5
|
+
... on MediaImage {
|
|
6
|
+
createdAt
|
|
7
|
+
fileErrors {
|
|
8
|
+
code
|
|
9
|
+
details
|
|
10
|
+
message
|
|
11
|
+
}
|
|
12
|
+
fileStatus
|
|
13
|
+
id
|
|
14
|
+
image {
|
|
15
|
+
altText
|
|
16
|
+
height
|
|
17
|
+
id
|
|
18
|
+
originalSrc
|
|
19
|
+
src
|
|
20
|
+
transformedSrc
|
|
21
|
+
width
|
|
22
|
+
}
|
|
23
|
+
mimeType
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
4
26
|
exports.graphqlProductQueryByProductId = `
|
|
5
27
|
#graphql
|
|
6
28
|
query GetProduct($id: ID!, $first: Int!, $after: String) {
|
|
@@ -70,6 +92,7 @@ query GetProduct($id: ID!, $first: Int!, $after: String) {
|
|
|
70
92
|
}
|
|
71
93
|
status
|
|
72
94
|
}
|
|
95
|
+
|
|
73
96
|
}
|
|
74
97
|
}
|
|
75
98
|
variants (first: $first, after: $after) {
|
|
@@ -107,26 +130,6 @@ query GetProduct($id: ID!, $first: Int!, $after: String) {
|
|
|
107
130
|
}
|
|
108
131
|
status
|
|
109
132
|
}
|
|
110
|
-
... on MediaImage {
|
|
111
|
-
createdAt
|
|
112
|
-
fileErrors {
|
|
113
|
-
code
|
|
114
|
-
details
|
|
115
|
-
message
|
|
116
|
-
}
|
|
117
|
-
fileStatus
|
|
118
|
-
id
|
|
119
|
-
image {
|
|
120
|
-
altText
|
|
121
|
-
height
|
|
122
|
-
id
|
|
123
|
-
originalSrc
|
|
124
|
-
src
|
|
125
|
-
transformedSrc
|
|
126
|
-
width
|
|
127
|
-
}
|
|
128
|
-
mimeType
|
|
129
|
-
}
|
|
130
133
|
}
|
|
131
134
|
}
|
|
132
135
|
selectedOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-product-queries.js","sourceRoot":"","sources":["../../../../../src/clients/third-party/shopify/graphql-product-queries.ts"],"names":[],"mappings":";;;AAAa,QAAA,8BAA8B,GAAG
|
|
1
|
+
{"version":3,"file":"graphql-product-queries.js","sourceRoot":"","sources":["../../../../../src/clients/third-party/shopify/graphql-product-queries.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAC;AAEW,QAAA,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0H7C,CAAC"}
|
|
@@ -14,14 +14,12 @@ class ShopifyProductsServiceV2 {
|
|
|
14
14
|
try {
|
|
15
15
|
let product = null;
|
|
16
16
|
if (useCache) {
|
|
17
|
-
helpers_1.Logger.info('getShopifyProduct: Getting product from cache', { pixelId, shop, productId });
|
|
18
17
|
product = await this.productCacheService.getProductFromCache(pixelId, productId);
|
|
19
18
|
if (product) {
|
|
20
19
|
helpers_1.Logger.info('getShopifyProduct: Product found in cache', { pixelId, shop, productId, product });
|
|
21
20
|
return product;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
helpers_1.Logger.info('getShopifyProduct: Getting product from ShopifyAPI', { pixelId, shop, productId });
|
|
25
23
|
product = await this.getShopifyProductFromAPI(pixelId, shop, accessToken, productId, true);
|
|
26
24
|
if (product && updateCache) {
|
|
27
25
|
helpers_1.Logger.info('getShopifyProduct: Product found in ShopifyAPI, putting in cache', { pixelId, productId, product });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify-products-serviceV2.js","sourceRoot":"","sources":["../../../../../src/services/shopify/products/shopify-products-serviceV2.ts"],"names":[],"mappings":";;;AAAA,8CAA0C;AAG1C,6EAAwE;AACxE,gFAA2E;AAC3E,wGAAmG;AAEnG,MAAa,wBAAwB;IAE3B,mBAAmB,CAAsB;IACjD,YAAY,sBAA8B;QACxC,IAAI,CAAC,mBAAmB,GAAG,IAAI,2CAAmB,CAAC,sBAAsB,CAAC,CAAC;IAC7E,CAAC;IAEM,iBAAiB,GAAG,KAAK,EAAE,OAAe,EAAE,IAAY,EAAE,WAAmB,EAAE,SAAiB,EAAE,QAAQ,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,EAA+C,EAAE;QAC3L,IAAI;YACF,IAAI,OAAO,GAAuC,IAAI,CAAC;YACvD,IAAI,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"shopify-products-serviceV2.js","sourceRoot":"","sources":["../../../../../src/services/shopify/products/shopify-products-serviceV2.ts"],"names":[],"mappings":";;;AAAA,8CAA0C;AAG1C,6EAAwE;AACxE,gFAA2E;AAC3E,wGAAmG;AAEnG,MAAa,wBAAwB;IAE3B,mBAAmB,CAAsB;IACjD,YAAY,sBAA8B;QACxC,IAAI,CAAC,mBAAmB,GAAG,IAAI,2CAAmB,CAAC,sBAAsB,CAAC,CAAC;IAC7E,CA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AAI,EAAkE,EAAE;QACxM,IAAI;YACF,MAAM,OAAO,GAAG,MAAM,6CAAoB,CAAC,6BAA6B,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;YAC5G,IAAI,OAAO,EAAE;gBACX,gBAAM,CAAC,IAAI,CAAC,uDAAuD,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;gBAC5G,MAAM,kBAAkB,GAAG,cAAc,CAAC,CAAC,CAAC,uDAAyB,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;gBACpH,gBAAM,CAAC,IAAI,CAAC,+CAA+C,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC;gBAC/G,OAAO,kBAAkB,CAAC;aAC3B;YACD,gBAAM,CAAC,KAAK,CAAC,2DAA2D,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;YACxG,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,KAAK,EAAE;YACd,gBAAM,CAAC,KAAK,CAAC,2DAA2D,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;YACtJ,OAAO,IAAI,CAAC;SACb;IACH,CAAC,CAAA;CAGF;AAlDD,4DAkDC"}
|
|
@@ -59,9 +59,7 @@ export type GetProductQuery = {
|
|
|
59
59
|
preview?: AdminTypes.Maybe<(Pick<AdminTypes.MediaPreviewImage, 'status'> & {
|
|
60
60
|
image?: AdminTypes.Maybe<Pick<AdminTypes.Image, 'id' | 'url'>>;
|
|
61
61
|
})>;
|
|
62
|
-
}) | (Pick<AdminTypes.MediaImage, '
|
|
63
|
-
fileErrors: Array<Pick<AdminTypes.FileError, 'code' | 'details' | 'message'>>;
|
|
64
|
-
image?: AdminTypes.Maybe<Pick<AdminTypes.Image, 'altText' | 'height' | 'id' | 'originalSrc' | 'src' | 'transformedSrc' | 'width'>>;
|
|
62
|
+
}) | (Pick<AdminTypes.MediaImage, 'id' | 'mediaContentType' | 'status'> & {
|
|
65
63
|
preview?: AdminTypes.Maybe<(Pick<AdminTypes.MediaPreviewImage, 'status'> & {
|
|
66
64
|
image?: AdminTypes.Maybe<Pick<AdminTypes.Image, 'id' | 'url'>>;
|
|
67
65
|
})>;
|
|
@@ -81,7 +79,7 @@ export type GetProductQuery = {
|
|
|
81
79
|
})>;
|
|
82
80
|
};
|
|
83
81
|
interface GeneratedQueryTypes {
|
|
84
|
-
"\n#graphql\nquery GetProduct($id: ID!, $first: Int!, $after: String) {\n product(id: $id) { \n id\n handle\n productType\n hasOnlyDefaultVariant\n isGiftCard\n legacyResourceId\n onlineStoreUrl\n productType\n publishedAt\n requiresSellingPlan\n status\n tags\n title\n totalInventory\n tracksInventory\n vendor\n createdAt\n updatedAt \n category {\n id\n name\n fullName\n parentId\n }\n priceRangeV2 {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variantsCount {\n count\n }\n seo {\n title\n description\n }\n featuredMedia {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n }\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n }\n }\n variants (first: $first, after: $after) { \n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n availableForSale\n barcode\n compareAtPrice\n createdAt\n displayName\n id\n legacyResourceId\n product {\n id\n handle\n }\n image {\n id\n url \n }\n inventoryQuantity\n price\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status \n preview {\n image {\n id\n url\n }\n status\n }\n
|
|
82
|
+
"\n#graphql\nquery GetProduct($id: ID!, $first: Int!, $after: String) {\n product(id: $id) { \n id\n handle\n productType\n hasOnlyDefaultVariant\n isGiftCard\n legacyResourceId\n onlineStoreUrl\n productType\n publishedAt\n requiresSellingPlan\n status\n tags\n title\n totalInventory\n tracksInventory\n vendor\n createdAt\n updatedAt \n category {\n id\n name\n fullName\n parentId\n }\n priceRangeV2 {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variantsCount {\n count\n }\n seo {\n title\n description\n }\n featuredMedia {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n }\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n\n }\n }\n variants (first: $first, after: $after) { \n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n availableForSale\n barcode\n compareAtPrice\n createdAt\n displayName\n id\n legacyResourceId\n product {\n id\n handle\n }\n image {\n id\n url \n }\n inventoryQuantity\n price\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status \n preview {\n image {\n id\n url\n }\n status\n }\n }\n }\n selectedOptions {\n name\n value\n }\n sellableOnlineQuantity\n sku\n taxable\n title\n updatedAt\n }\n }\n }\n}\n": {
|
|
85
83
|
return: GetProductQuery;
|
|
86
84
|
variables: GetProductQueryVariables;
|
|
87
85
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const MediaSnippet = "\n... on MediaImage {\n createdAt\n fileErrors {\n code\n details\n message\n }\n fileStatus\n id\n image {\n altText\n height\n id\n originalSrc\n src\n transformedSrc\n width\n }\n mimeType\n}\n";
|
|
2
|
+
export declare const graphqlProductQueryByProductId = "\n#graphql\nquery GetProduct($id: ID!, $first: Int!, $after: String) {\n product(id: $id) { \n id\n handle\n productType\n hasOnlyDefaultVariant\n isGiftCard\n legacyResourceId\n onlineStoreUrl\n productType\n publishedAt\n requiresSellingPlan\n status\n tags\n title\n totalInventory\n tracksInventory\n vendor\n createdAt\n updatedAt \n category {\n id\n name\n fullName\n parentId\n }\n priceRangeV2 {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variantsCount {\n count\n }\n seo {\n title\n description\n }\n featuredMedia {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n }\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n\n }\n }\n variants (first: $first, after: $after) { \n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n availableForSale\n barcode\n compareAtPrice\n createdAt\n displayName\n id\n legacyResourceId\n product {\n id\n handle\n }\n image {\n id\n url \n }\n inventoryQuantity\n price\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status \n preview {\n image {\n id\n url\n }\n status\n }\n }\n }\n selectedOptions {\n name\n value\n }\n sellableOnlineQuantity\n sku\n taxable\n title\n updatedAt\n }\n }\n }\n}\n";
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
export const MediaSnippet = `
|
|
2
|
+
... on MediaImage {
|
|
3
|
+
createdAt
|
|
4
|
+
fileErrors {
|
|
5
|
+
code
|
|
6
|
+
details
|
|
7
|
+
message
|
|
8
|
+
}
|
|
9
|
+
fileStatus
|
|
10
|
+
id
|
|
11
|
+
image {
|
|
12
|
+
altText
|
|
13
|
+
height
|
|
14
|
+
id
|
|
15
|
+
originalSrc
|
|
16
|
+
src
|
|
17
|
+
transformedSrc
|
|
18
|
+
width
|
|
19
|
+
}
|
|
20
|
+
mimeType
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
1
23
|
export const graphqlProductQueryByProductId = `
|
|
2
24
|
#graphql
|
|
3
25
|
query GetProduct($id: ID!, $first: Int!, $after: String) {
|
|
@@ -67,6 +89,7 @@ query GetProduct($id: ID!, $first: Int!, $after: String) {
|
|
|
67
89
|
}
|
|
68
90
|
status
|
|
69
91
|
}
|
|
92
|
+
|
|
70
93
|
}
|
|
71
94
|
}
|
|
72
95
|
variants (first: $first, after: $after) {
|
|
@@ -104,26 +127,6 @@ query GetProduct($id: ID!, $first: Int!, $after: String) {
|
|
|
104
127
|
}
|
|
105
128
|
status
|
|
106
129
|
}
|
|
107
|
-
... on MediaImage {
|
|
108
|
-
createdAt
|
|
109
|
-
fileErrors {
|
|
110
|
-
code
|
|
111
|
-
details
|
|
112
|
-
message
|
|
113
|
-
}
|
|
114
|
-
fileStatus
|
|
115
|
-
id
|
|
116
|
-
image {
|
|
117
|
-
altText
|
|
118
|
-
height
|
|
119
|
-
id
|
|
120
|
-
originalSrc
|
|
121
|
-
src
|
|
122
|
-
transformedSrc
|
|
123
|
-
width
|
|
124
|
-
}
|
|
125
|
-
mimeType
|
|
126
|
-
}
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
selectedOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-product-queries.js","sourceRoot":"","sources":["../../../../../src/clients/third-party/shopify/graphql-product-queries.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,8BAA8B,GAAG
|
|
1
|
+
{"version":3,"file":"graphql-product-queries.js","sourceRoot":"","sources":["../../../../../src/clients/third-party/shopify/graphql-product-queries.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0H7C,CAAC"}
|
|
@@ -11,14 +11,12 @@ export class ShopifyProductsServiceV2 {
|
|
|
11
11
|
try {
|
|
12
12
|
let product = null;
|
|
13
13
|
if (useCache) {
|
|
14
|
-
Logger.info('getShopifyProduct: Getting product from cache', { pixelId, shop, productId });
|
|
15
14
|
product = await this.productCacheService.getProductFromCache(pixelId, productId);
|
|
16
15
|
if (product) {
|
|
17
16
|
Logger.info('getShopifyProduct: Product found in cache', { pixelId, shop, productId, product });
|
|
18
17
|
return product;
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
|
-
Logger.info('getShopifyProduct: Getting product from ShopifyAPI', { pixelId, shop, productId });
|
|
22
20
|
product = await this.getShopifyProductFromAPI(pixelId, shop, accessToken, productId, true);
|
|
23
21
|
if (product && updateCache) {
|
|
24
22
|
Logger.info('getShopifyProduct: Product found in ShopifyAPI, putting in cache', { pixelId, productId, product });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify-products-serviceV2.js","sourceRoot":"","sources":["../../../../../src/services/shopify/products/shopify-products-serviceV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AAEnG,MAAM,OAAO,wBAAwB;IAE3B,mBAAmB,CAAsB;IACjD,YAAY,sBAA8B;QACxC,IAAI,CAAC,mBAAmB,GAAG,IAAI,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;IAC7E,CAAC;IAEM,iBAAiB,GAAG,KAAK,EAAE,OAAe,EAAE,IAAY,EAAE,WAAmB,EAAE,SAAiB,EAAE,QAAQ,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,EAA+C,EAAE;QAC3L,IAAI;YACF,IAAI,OAAO,GAAuC,IAAI,CAAC;YACvD,IAAI,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"shopify-products-serviceV2.js","sourceRoot":"","sources":["../../../../../src/services/shopify/products/shopify-products-serviceV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,yBAAy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es.MediaPreviewImage, 'status'> & {
|
|
60
60
|
image?: AdminTypes.Maybe<Pick<AdminTypes.Image, 'id' | 'url'>>;
|
|
61
61
|
})>;
|
|
62
|
-
}) | (Pick<AdminTypes.MediaImage, '
|
|
63
|
-
fileErrors: Array<Pick<AdminTypes.FileError, 'code' | 'details' | 'message'>>;
|
|
64
|
-
image?: AdminTypes.Maybe<Pick<AdminTypes.Image, 'altText' | 'height' | 'id' | 'originalSrc' | 'src' | 'transformedSrc' | 'width'>>;
|
|
62
|
+
}) | (Pick<AdminTypes.MediaImage, 'id' | 'mediaContentType' | 'status'> & {
|
|
65
63
|
preview?: AdminTypes.Maybe<(Pick<AdminTypes.MediaPreviewImage, 'status'> & {
|
|
66
64
|
image?: AdminTypes.Maybe<Pick<AdminTypes.Image, 'id' | 'url'>>;
|
|
67
65
|
})>;
|
|
@@ -81,7 +79,7 @@ export type GetProductQuery = {
|
|
|
81
79
|
})>;
|
|
82
80
|
};
|
|
83
81
|
interface GeneratedQueryTypes {
|
|
84
|
-
"\n#graphql\nquery GetProduct($id: ID!, $first: Int!, $after: String) {\n product(id: $id) { \n id\n handle\n productType\n hasOnlyDefaultVariant\n isGiftCard\n legacyResourceId\n onlineStoreUrl\n productType\n publishedAt\n requiresSellingPlan\n status\n tags\n title\n totalInventory\n tracksInventory\n vendor\n createdAt\n updatedAt \n category {\n id\n name\n fullName\n parentId\n }\n priceRangeV2 {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variantsCount {\n count\n }\n seo {\n title\n description\n }\n featuredMedia {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n }\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n }\n }\n variants (first: $first, after: $after) { \n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n availableForSale\n barcode\n compareAtPrice\n createdAt\n displayName\n id\n legacyResourceId\n product {\n id\n handle\n }\n image {\n id\n url \n }\n inventoryQuantity\n price\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status \n preview {\n image {\n id\n url\n }\n status\n }\n
|
|
82
|
+
"\n#graphql\nquery GetProduct($id: ID!, $first: Int!, $after: String) {\n product(id: $id) { \n id\n handle\n productType\n hasOnlyDefaultVariant\n isGiftCard\n legacyResourceId\n onlineStoreUrl\n productType\n publishedAt\n requiresSellingPlan\n status\n tags\n title\n totalInventory\n tracksInventory\n vendor\n createdAt\n updatedAt \n category {\n id\n name\n fullName\n parentId\n }\n priceRangeV2 {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variantsCount {\n count\n }\n seo {\n title\n description\n }\n featuredMedia {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n }\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status\n preview {\n image {\n id\n url\n }\n status\n }\n\n }\n }\n variants (first: $first, after: $after) { \n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n availableForSale\n barcode\n compareAtPrice\n createdAt\n displayName\n id\n legacyResourceId\n product {\n id\n handle\n }\n image {\n id\n url \n }\n inventoryQuantity\n price\n media (first: 3) {\n nodes {\n id\n mediaContentType\n status \n preview {\n image {\n id\n url\n }\n status\n }\n }\n }\n selectedOptions {\n name\n value\n }\n sellableOnlineQuantity\n sku\n taxable\n title\n updatedAt\n }\n }\n }\n}\n": {
|
|
85
83
|
return: GetProductQuery;
|
|
86
84
|
variables: GetProductQueryVariables;
|
|
87
85
|
};
|