feed-common 1.14.0 → 1.14.2
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 +6 -2
- package/dist/types/product.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/types/product.types.ts +99 -110
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [1.14.2](https://github.com/advertikon/package-maxify-feed-common/compare/v1.14.1...v1.14.2) (2024-06-09)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* change GmcProduct price type ([4e1ca45](https://github.com/advertikon/package-maxify-feed-common/commit/4e1ca45a469d413436c64f8d590c355813fabd95))
|
7
|
+
|
8
|
+
## [1.14.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.14.0...v1.14.1) (2024-06-09)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* change numeric types of AppProductVariant ([611b08c](https://github.com/advertikon/package-maxify-feed-common/commit/611b08c48607a5b2cada3d4dc04fa947613ae039))
|
14
|
+
|
1
15
|
# [1.14.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.13.0...v1.14.0) (2024-06-08)
|
2
16
|
|
3
17
|
|
@@ -2,7 +2,11 @@ import { GmcProductSyncStatus } from '../constants/google.constants.js';
|
|
2
2
|
import { ProductSyncStatus } from '../constants/product.constants.js';
|
3
3
|
import { ShopifyProductImage, ShopifyProductVariant } from './shopify.types.js';
|
4
4
|
export type AppProductStatus = 'active' | 'draft' | 'archived';
|
5
|
-
export type AppProductVariant = Pick<ShopifyProductVariant, 'id' | 'title' | '
|
5
|
+
export type AppProductVariant = Pick<ShopifyProductVariant, 'id' | 'title' | 'sku' | 'barcode' | 'image_id' | 'inventory_policy' | 'weight_unit' | 'requires_shipping'> & {
|
6
|
+
price: number;
|
7
|
+
compare_at_price: number | null;
|
8
|
+
weight: number;
|
9
|
+
inventory_quantity: number;
|
6
10
|
gmcProduct?: GmcProductId[];
|
7
11
|
};
|
8
12
|
export type GmcProductId = {
|
@@ -107,7 +111,7 @@ export type UploadProductBulkPayload = {
|
|
107
111
|
export type GmcProduct = {
|
108
112
|
id: number;
|
109
113
|
title: string;
|
110
|
-
price:
|
114
|
+
price: number;
|
111
115
|
sku: string;
|
112
116
|
image?: string;
|
113
117
|
locale: 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,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE/D,MAAM,MAAM,iBAAiB,
|
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,GACvB,IAAI,CACA,qBAAqB,EACrB,IAAI,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,kBAAkB,GAAG,aAAa,GAAG,mBAAmB,CAC7G,GAAG;IACA,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EA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,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
package/package.json
CHANGED
@@ -5,150 +5,139 @@ import { ShopifyProductImage, ShopifyProductVariant } from './shopify.types.js';
|
|
5
5
|
export type AppProductStatus = 'active' | 'draft' | 'archived';
|
6
6
|
|
7
7
|
export type AppProductVariant =
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
| 'weight'
|
19
|
-
| 'weight_unit'
|
20
|
-
| 'compare_at_price'
|
21
|
-
| 'requires_shipping'
|
22
|
-
>
|
23
|
-
& {
|
24
|
-
gmcProduct?: GmcProductId[];
|
25
|
-
};
|
8
|
+
| Pick<
|
9
|
+
ShopifyProductVariant,
|
10
|
+
'id' | 'title' | 'sku' | 'barcode' | 'image_id' | 'inventory_policy' | 'weight_unit' | 'requires_shipping'
|
11
|
+
> & {
|
12
|
+
price: number;
|
13
|
+
compare_at_price: number | null;
|
14
|
+
weight: number;
|
15
|
+
inventory_quantity: number;
|
16
|
+
gmcProduct?: GmcProductId[];
|
17
|
+
};
|
26
18
|
|
27
19
|
export type GmcProductId = {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
20
|
+
id: string;
|
21
|
+
profileId: string;
|
22
|
+
gmcAccount: string;
|
23
|
+
uploaded_at: string;
|
24
|
+
status?: GmcProductSyncStatus;
|
25
|
+
uploadError?: string;
|
26
|
+
issues?: GoogleProductIssue[];
|
35
27
|
};
|
36
28
|
|
37
29
|
export type GoogleProductIssue = {
|
38
|
-
|
39
|
-
|
40
|
-
|
30
|
+
servability?: 'demoted' | 'disapproved' | 'unaffected' | string;
|
31
|
+
description?: string;
|
32
|
+
documentation?: string;
|
41
33
|
};
|
42
34
|
|
43
35
|
export type gmcIssue = {
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
36
|
+
gmcProductId: string;
|
37
|
+
gmcAccount: string;
|
38
|
+
updated_at: string;
|
39
|
+
issue: GoogleProductIssue[];
|
48
40
|
};
|
49
41
|
|
50
42
|
export type AppCollection = {
|
51
|
-
|
52
|
-
|
53
|
-
|
43
|
+
id: number;
|
44
|
+
handle: string;
|
45
|
+
title: string;
|
54
46
|
};
|
55
47
|
|
56
48
|
export type AppProduct = {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
49
|
+
status: AppProductStatus;
|
50
|
+
handle: string;
|
51
|
+
title: string;
|
52
|
+
category?: string;
|
53
|
+
id: number;
|
54
|
+
_id: string;
|
55
|
+
updated_at: string;
|
56
|
+
variants: AppProductVariant[];
|
57
|
+
images: {
|
58
|
+
src: string;
|
59
|
+
id: string;
|
60
|
+
variant_ids: number[];
|
61
|
+
}[];
|
62
|
+
collections: AppCollection[];
|
63
|
+
tags: string[];
|
64
|
+
vendor: string;
|
65
|
+
product_type: string;
|
66
|
+
syncStatus: ProductSyncStatus;
|
75
67
|
};
|
76
68
|
|
77
69
|
export type AppVariant = {
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
70
|
+
status: AppProductStatus;
|
71
|
+
handle: string;
|
72
|
+
title: string;
|
73
|
+
id: number;
|
74
|
+
_id: string;
|
75
|
+
updated_at: string;
|
76
|
+
variants: AppProductVariant;
|
77
|
+
images: Pick<ShopifyProductImage, 'src' | 'id' | 'variant_ids'>[];
|
78
|
+
collections: AppCollection[];
|
79
|
+
tags: string[];
|
80
|
+
vendor: string;
|
81
|
+
product_type: string;
|
82
|
+
syncStatus: ProductSyncStatus;
|
91
83
|
};
|
92
84
|
|
93
|
-
export type AppGmcProduct = Omit<
|
94
|
-
AppVariant,
|
95
|
-
'variants.gmcProduct'
|
96
|
-
> & { variants: {gmcProduct: GmcProductId} };
|
85
|
+
export type AppGmcProduct = Omit<AppVariant, 'variants.gmcProduct'> & { variants: { gmcProduct: GmcProductId } };
|
97
86
|
|
98
87
|
export type GetProductsQuery = {
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
88
|
+
before?: string;
|
89
|
+
after?: string;
|
90
|
+
limit?: number;
|
91
|
+
handle?: string;
|
92
|
+
title?: string;
|
93
|
+
id?: number[];
|
94
|
+
sortField?: 'title' | 'id';
|
95
|
+
sort?: 'asc' | 'desc';
|
96
|
+
fields?: string[];
|
97
|
+
gmcProductId?: string[] | boolean;
|
109
98
|
};
|
110
99
|
|
111
100
|
export type GetProductsResponse = {
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
101
|
+
products: AppProduct[];
|
102
|
+
pagination: {
|
103
|
+
firstId: string;
|
104
|
+
lastId: string;
|
105
|
+
hasMore: boolean;
|
106
|
+
hasLess: boolean;
|
107
|
+
};
|
119
108
|
};
|
120
109
|
|
121
110
|
export type GetGmcProductsResponse = {
|
122
|
-
|
123
|
-
|
111
|
+
products: GmcProduct[];
|
112
|
+
total: number;
|
124
113
|
};
|
125
114
|
|
126
115
|
export type ProductsList = {
|
127
|
-
|
116
|
+
ids: string[];
|
128
117
|
};
|
129
118
|
|
130
119
|
export type UploadProductBulkPayload = {
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
120
|
+
collections: string[];
|
121
|
+
vendors: string[];
|
122
|
+
types: string[];
|
123
|
+
tags: string[];
|
135
124
|
};
|
136
125
|
|
137
126
|
export type GmcProduct = {
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
127
|
+
id: number;
|
128
|
+
title: string;
|
129
|
+
price: number;
|
130
|
+
sku: string;
|
131
|
+
image?: string;
|
132
|
+
locale: string;
|
133
|
+
country: string;
|
134
|
+
gmcProductId: string;
|
135
|
+
gmcIssues?: gmcIssue[][number]['issue'];
|
136
|
+
profileId: string;
|
137
|
+
updated_at: string;
|
138
|
+
uploaded_to_gmc_at: string;
|
139
|
+
updated_issue_at?: string;
|
140
|
+
profile: string;
|
141
|
+
status?: GmcProductSyncStatus;
|
142
|
+
uploadError?: string;
|
154
143
|
};
|