feed-common 1.10.1 → 1.10.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/dist/types/product.types.d.ts +3 -7
- package/dist/types/product.types.d.ts.map +1 -1
- package/dist/types/shopify.types.d.ts +2 -1
- package/dist/types/shopify.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/types/product.types.ts +4 -7
- package/src/types/shopify.types.ts +2 -0
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [1.10.3](https://github.com/advertikon/package-maxify-feed-common/compare/v1.10.2...v1.10.3) (2024-05-12)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* upadate AppVariant type ([c0e455f](https://github.com/advertikon/package-maxify-feed-common/commit/c0e455f4331cf7e13c202e0e8482f3af6002b3dd))
|
7
|
+
|
8
|
+
## [1.10.2](https://github.com/advertikon/package-maxify-feed-common/compare/v1.10.1...v1.10.2) (2024-05-12)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* upadate AppVariant type ([de0640a](https://github.com/advertikon/package-maxify-feed-common/commit/de0640a84eb4f9af325964c87a9ca3f7eabda0c3))
|
14
|
+
|
1
15
|
## [1.10.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.10.0...v1.10.1) (2024-05-12)
|
2
16
|
|
3
17
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { GmcProductSyncStatus } from '../constants/google.constants.js';
|
2
2
|
import { ProductSyncStatus } from '../constants/product.constants.js';
|
3
|
-
import { ShopifyProductVariant } from './shopify.types.js';
|
3
|
+
import { ShopifyProductImage, ShopifyProductVariant } from './shopify.types.js';
|
4
4
|
export type AppProductStatus = 'active' | 'draft' | 'archived';
|
5
|
-
export type AppProductVariant = Pick<ShopifyProductVariant, 'id' | 'title' | 'price' | 'sku' | '
|
5
|
+
export type AppProductVariant = Pick<ShopifyProductVariant, 'id' | 'title' | 'price' | 'sku' | 'image_id' | 'inventory_quantity' | 'inventory_policy' | 'weight' | 'weight_unit' | 'compare_at_price'> & {
|
6
6
|
gmcProduct?: GmcProductId[];
|
7
7
|
};
|
8
8
|
export type GmcProductId = {
|
@@ -58,11 +58,7 @@ export type AppVariant = {
|
|
58
58
|
_id: string;
|
59
59
|
updated_at: string;
|
60
60
|
variants: AppProductVariant;
|
61
|
-
images:
|
62
|
-
src: string;
|
63
|
-
id: string;
|
64
|
-
variant_ids: number[];
|
65
|
-
}[];
|
61
|
+
images: Pick<ShopifyProductImage, 'src' | 'id' | 'variant_ids'>[];
|
66
62
|
collections: AppCollection[];
|
67
63
|
tags: string[];
|
68
64
|
vendor: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"product.types.d.ts","sourceRoot":"","sources":["../../src/types/product.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"product.types.d.ts","sourceRoot":"","sources":["../../src/types/product.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GACzB,IAAI,CACF,qBAAqB,EACnB,IAAI,GACJ,OAAO,GACP,OAAO,GACP,KAAK,GACL,UAAU,GACV,oBAAoB,GACpB,kBAAkB,GAClB,QAAQ,GACR,aAAa,GACb,kBAAkB,CACrB,GACD;IACE,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;CAC7B,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ifyWebhook = GetInstanceType<'Webhook'>;
|
|
6
6
|
type ShopifyCustomCollection = GetInstanceType<'CustomCollection'>;
|
7
7
|
type ShopifySmartCollection = GetInstanceType<'SmartCollection'>;
|
8
8
|
type ShopifyCollection = ShopifyCustomCollection | ShopifySmartCollection;
|
9
|
+
type ShopifyProductImage = GetInstanceType<'Image'>;
|
9
10
|
type ShopifyProductVariant = GetInstanceType<'Variant'> & {
|
10
11
|
images: {
|
11
12
|
variant_ids?: number[];
|
@@ -32,5 +33,5 @@ export type WebhookHeader = {
|
|
32
33
|
'x-shopify-triggered-at': string;
|
33
34
|
'x-shopify-webhook-id': string;
|
34
35
|
};
|
35
|
-
export { ShopifyShop, ShopifyProduct, ShopifyWebhook, ShopifyCustomCollection, ShopifySmartCollection, ShopifyCollection, ShopifyRecurringCharge, ShopifyProductVariant, };
|
36
|
+
export { ShopifyShop, ShopifyProduct, ShopifyWebhook, ShopifyCustomCollection, ShopifySmartCollection, ShopifyCollection, ShopifyRecurringCharge, ShopifyProductVariant, ShopifyProductImage, };
|
36
37
|
//# sourceMappingURL=shopify.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shopify.types.d.ts","sourceRoot":"","sources":["../../src/types/shopify.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,KAAK,eAAe,CAAC,CAAC,SAAS,MAAM,aAAa,IAAI,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF,KAAK,sBAAsB,GAAG,eAAe,CAAC,4BAA4B,CAAC,CAAC;AAC5E,KAAK,WAAW,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;AAC3C,KAAK,cAAc,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;AACjD,KAAK,uBAAuB,GAAG,eAAe,CAAC,kBAAkB,CAAC,CAAC;AACnE,KAAK,sBAAsB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC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,cAAc,EACd,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { GmcProductSyncStatus } from '../constants/google.constants.js';
|
2
2
|
import { ProductSyncStatus } from '../constants/product.constants.js';
|
3
|
-
import { ShopifyProductVariant } from './shopify.types.js';
|
3
|
+
import { ShopifyProductImage, ShopifyProductVariant } from './shopify.types.js';
|
4
4
|
|
5
5
|
export type AppProductStatus = 'active' | 'draft' | 'archived';
|
6
6
|
|
@@ -11,11 +11,12 @@ export type AppProductVariant =
|
|
11
11
|
| 'title'
|
12
12
|
| 'price'
|
13
13
|
| 'sku'
|
14
|
+
| 'image_id'
|
14
15
|
| 'inventory_quantity'
|
15
16
|
| 'inventory_policy'
|
16
|
-
| 'compare_at_price'
|
17
17
|
| 'weight'
|
18
18
|
| 'weight_unit'
|
19
|
+
| 'compare_at_price'
|
19
20
|
>
|
20
21
|
& {
|
21
22
|
gmcProduct?: GmcProductId[];
|
@@ -79,11 +80,7 @@ export type AppVariant = {
|
|
79
80
|
_id: string;
|
80
81
|
updated_at: string;
|
81
82
|
variants: AppProductVariant;
|
82
|
-
images:
|
83
|
-
src: string;
|
84
|
-
id: string;
|
85
|
-
variant_ids: number[];
|
86
|
-
}[];
|
83
|
+
images: Pick<ShopifyProductImage, 'src' | 'id' | 'variant_ids'>[];
|
87
84
|
collections: AppCollection[];
|
88
85
|
tags: string[];
|
89
86
|
vendor: string;
|
@@ -8,6 +8,7 @@ type ShopifyWebhook = GetInstanceType<'Webhook'>;
|
|
8
8
|
type ShopifyCustomCollection = GetInstanceType<'CustomCollection'>;
|
9
9
|
type ShopifySmartCollection = GetInstanceType<'SmartCollection'>;
|
10
10
|
type ShopifyCollection = ShopifyCustomCollection | ShopifySmartCollection;
|
11
|
+
type ShopifyProductImage = GetInstanceType<'Image'>;
|
11
12
|
type ShopifyProductVariant = GetInstanceType<'Variant'> & {
|
12
13
|
images: { variant_ids?: number[] }[];
|
13
14
|
};
|
@@ -43,4 +44,5 @@ export {
|
|
43
44
|
ShopifyCollection,
|
44
45
|
ShopifyRecurringCharge,
|
45
46
|
ShopifyProductVariant,
|
47
|
+
ShopifyProductImage,
|
46
48
|
};
|