feed-common 1.3.1 → 1.4.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/CHANGELOG.md +14 -0
- package/dist/constants/profile.constants.d.ts +1 -1
- package/dist/constants/profile.constants.d.ts.map +1 -1
- package/dist/constants/profile.constants.js +135 -130
- package/dist/constants/profile.constants.js.map +1 -1
- package/dist/types/product.types.d.ts +23 -6
- package/dist/types/product.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/constants/profile.constants.ts +137 -131
- package/src/types/product.types.ts +24 -6
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# [1.4.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.3.2...v1.4.0) (2024-04-30)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* add product variant type ([b271915](https://github.com/advertikon/package-maxify-feed-common/commit/b2719156eee8534208b8581c6246b4c6c17795df))
|
7
|
+
|
8
|
+
## [1.3.2](https://github.com/advertikon/package-maxify-feed-common/compare/v1.3.1...v1.3.2) (2024-04-14)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* set Availability as required GMC product field ([e9d1ea7](https://github.com/advertikon/package-maxify-feed-common/commit/e9d1ea7a0cd6f189402b22266d7495172af05cf2))
|
14
|
+
|
1
15
|
## [1.3.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.3.0...v1.3.1) (2024-04-14)
|
2
16
|
|
3
17
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ProductUploadMapSource, ProductUploadRuleFilterType } from
|
1
|
+
import { ProductUploadMapSource, ProductUploadRuleFilterType } from "../types/profile.types.js";
|
2
2
|
export declare const SOURCE_VENDORS = "source.vendor";
|
3
3
|
export declare const SOURCE_TAGS = "source.tag";
|
4
4
|
export declare const SOURCE_PRODUCT_TYPE = "source.product_type";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"profile.constants.d.ts","sourceRoot":"","sources":["../../src/constants/profile.constants.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"profile.constants.d.ts","sourceRoot":"","sources":["../../src/constants/profile.constants.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAC9C,eAAO,MAAM,WAAW,eAAe,CAAC;AACxC,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,eAAO,MAAM,sBAAsB,oBAAoB,CAAC;AACxD,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCzB,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;CAYvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,2BAA2B,EA0BjE,CAAC;AASF,eAAO,MAAM,qBAAqB,EAAE,sBAAsB,EAiQzD,CAAC;AACF,eAAO,MAAM,OAAO,WAAW,CAAC;AAChC,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AACnE,eAAO,MAAM,sBAAsB,UAKlC,CAAC"}
|
@@ -1,54 +1,54 @@
|
|
1
|
-
export const SOURCE_VENDORS =
|
2
|
-
export const SOURCE_TAGS =
|
3
|
-
export const SOURCE_PRODUCT_TYPE =
|
4
|
-
export const SOURCE_COLLECTIONS =
|
5
|
-
export const SOURCE_LANGUAGE =
|
6
|
-
export const SOURCE_GOOGLE_CATEGORY =
|
7
|
-
export const SOURCE_COUNTRY =
|
8
|
-
export const SOURCE_SHOPIFY_VENDORS =
|
9
|
-
export const SOURCE_SHOPIFY_BARCODE =
|
10
|
-
export const SOURCE_SHOPIFY_SKU =
|
11
|
-
export const SOURCE_CUSTOM =
|
1
|
+
export const SOURCE_VENDORS = "source.vendor";
|
2
|
+
export const SOURCE_TAGS = "source.tag";
|
3
|
+
export const SOURCE_PRODUCT_TYPE = "source.product_type";
|
4
|
+
export const SOURCE_COLLECTIONS = "source.collection";
|
5
|
+
export const SOURCE_LANGUAGE = "source.language";
|
6
|
+
export const SOURCE_GOOGLE_CATEGORY = "source.google_category";
|
7
|
+
export const SOURCE_COUNTRY = "source.country";
|
8
|
+
export const SOURCE_SHOPIFY_VENDORS = "shopify.vendor";
|
9
|
+
export const SOURCE_SHOPIFY_BARCODE = "shopify.barcode";
|
10
|
+
export const SOURCE_SHOPIFY_SKU = "shopify.sku";
|
11
|
+
export const SOURCE_CUSTOM = "custom_input";
|
12
12
|
export const RuleOperators = {
|
13
13
|
contains: {
|
14
|
-
label:
|
15
|
-
value:
|
14
|
+
label: "Contains",
|
15
|
+
value: "contains",
|
16
16
|
},
|
17
17
|
notContains: {
|
18
|
-
label:
|
19
|
-
value:
|
18
|
+
label: "Not Contains",
|
19
|
+
value: "notContains",
|
20
20
|
},
|
21
21
|
equals: {
|
22
|
-
label:
|
23
|
-
value:
|
22
|
+
label: "Equals",
|
23
|
+
value: "equals",
|
24
24
|
},
|
25
25
|
notEquals: {
|
26
|
-
label:
|
27
|
-
value:
|
26
|
+
label: "Not Equals",
|
27
|
+
value: "notEquals",
|
28
28
|
},
|
29
29
|
startsWith: {
|
30
|
-
label:
|
31
|
-
value:
|
30
|
+
label: "Starts With",
|
31
|
+
value: "startsWith",
|
32
32
|
},
|
33
33
|
notStartsWith: {
|
34
|
-
label:
|
35
|
-
value:
|
34
|
+
label: "Not Starts With",
|
35
|
+
value: "notStartsWith",
|
36
36
|
},
|
37
37
|
endsWith: {
|
38
|
-
label:
|
39
|
-
value:
|
38
|
+
label: "Ends With",
|
39
|
+
value: "endsWith",
|
40
40
|
},
|
41
41
|
notEndsWith: {
|
42
|
-
label:
|
43
|
-
value:
|
42
|
+
label: "Not Ends With",
|
43
|
+
value: "notEndsWith",
|
44
44
|
},
|
45
45
|
in: {
|
46
|
-
label:
|
47
|
-
value:
|
46
|
+
label: "In",
|
47
|
+
value: "in",
|
48
48
|
},
|
49
49
|
notIn: {
|
50
|
-
label:
|
51
|
-
value:
|
50
|
+
label: "Not In",
|
51
|
+
value: "notIn",
|
52
52
|
},
|
53
53
|
};
|
54
54
|
export const ProductUploadRulesOperators = {
|
@@ -66,105 +66,105 @@ export const ProductUploadRulesOperators = {
|
|
66
66
|
};
|
67
67
|
export const ProductUploadRuleFilters = [
|
68
68
|
{
|
69
|
-
label:
|
69
|
+
label: "Title",
|
70
70
|
operators: ProductUploadRulesOperators.string,
|
71
|
-
value:
|
71
|
+
value: "title",
|
72
72
|
},
|
73
73
|
{
|
74
|
-
label:
|
74
|
+
label: "Collection",
|
75
75
|
operators: ProductUploadRulesOperators.list,
|
76
|
-
value:
|
76
|
+
value: "collection",
|
77
77
|
},
|
78
78
|
{
|
79
|
-
label:
|
79
|
+
label: "Product Type",
|
80
80
|
operators: ProductUploadRulesOperators.list,
|
81
|
-
value:
|
81
|
+
value: "product_type",
|
82
82
|
},
|
83
83
|
{
|
84
|
-
label:
|
84
|
+
label: "Vendor",
|
85
85
|
operators: ProductUploadRulesOperators.list,
|
86
|
-
value:
|
86
|
+
value: "vendor",
|
87
87
|
},
|
88
88
|
{
|
89
|
-
label:
|
89
|
+
label: "Tag",
|
90
90
|
operators: ProductUploadRulesOperators.list,
|
91
|
-
value:
|
91
|
+
value: "tag",
|
92
92
|
},
|
93
93
|
];
|
94
94
|
const ShopifyProductSource = {
|
95
|
-
vendor: { label:
|
96
|
-
barcode: { label:
|
97
|
-
sku: { label:
|
98
|
-
custom: { label:
|
95
|
+
vendor: { label: "Shopify Product Vendor", value: SOURCE_SHOPIFY_VENDORS },
|
96
|
+
barcode: { label: "Shopify Product Barcode", value: SOURCE_SHOPIFY_BARCODE },
|
97
|
+
sku: { label: "Shopify Product SKU", value: SOURCE_SHOPIFY_SKU },
|
98
|
+
custom: { label: "Custom input", value: SOURCE_CUSTOM },
|
99
99
|
};
|
100
100
|
export const ProductUploadMappings = [
|
101
101
|
{
|
102
102
|
required: true,
|
103
|
-
label:
|
104
|
-
attribute:
|
105
|
-
type:
|
103
|
+
label: "Content Language",
|
104
|
+
attribute: "contentLanguage",
|
105
|
+
type: "select",
|
106
106
|
choices: [SOURCE_LANGUAGE],
|
107
|
-
rules: [
|
108
|
-
description:
|
107
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
108
|
+
description: "Language for the item",
|
109
109
|
},
|
110
110
|
{
|
111
111
|
required: true,
|
112
|
-
label:
|
113
|
-
attribute:
|
114
|
-
type:
|
112
|
+
label: "Target Country",
|
113
|
+
attribute: "targetCountry",
|
114
|
+
type: "select",
|
115
115
|
choices: [SOURCE_COUNTRY],
|
116
|
-
rules: [
|
117
|
-
description:
|
116
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
117
|
+
description: "The item's country of sale",
|
118
118
|
},
|
119
119
|
{
|
120
120
|
required: false,
|
121
|
-
label:
|
122
|
-
attribute:
|
123
|
-
type:
|
121
|
+
label: "Adult",
|
122
|
+
attribute: "adult",
|
123
|
+
type: "select",
|
124
124
|
choices: [
|
125
|
-
{ label:
|
126
|
-
{ label:
|
125
|
+
{ label: "Yes", value: true },
|
126
|
+
{ label: "No", value: false },
|
127
127
|
],
|
128
|
-
rules: [
|
128
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
129
129
|
description: 'Should be set to "Yes" if the item is targeted towards adults',
|
130
130
|
},
|
131
131
|
{
|
132
132
|
required: false,
|
133
|
-
label:
|
134
|
-
attribute:
|
135
|
-
type:
|
133
|
+
label: "Age Group",
|
134
|
+
attribute: "ageGroup",
|
135
|
+
type: "select",
|
136
136
|
choices: [
|
137
|
-
{ label:
|
138
|
-
{ label:
|
139
|
-
{ label:
|
140
|
-
{ label:
|
141
|
-
{ label:
|
137
|
+
{ label: "0-3 months old", value: "newborn" },
|
138
|
+
{ label: "3-12 months old", value: "infant" },
|
139
|
+
{ label: "1-5 years old", value: "toddler" },
|
140
|
+
{ label: "5-13 years old", value: "kids" },
|
141
|
+
{ label: "13 years old or more", value: "adult" },
|
142
142
|
],
|
143
|
-
rules: [
|
144
|
-
description:
|
143
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
144
|
+
description: "Target age group of the item",
|
145
145
|
},
|
146
146
|
{
|
147
|
-
required:
|
148
|
-
label:
|
149
|
-
attribute:
|
150
|
-
type:
|
147
|
+
required: true,
|
148
|
+
label: "Availability",
|
149
|
+
attribute: "availability",
|
150
|
+
type: "select",
|
151
151
|
choices: [
|
152
|
-
{ label:
|
153
|
-
{ label:
|
154
|
-
{ label:
|
155
|
-
{ label:
|
152
|
+
{ label: "In Stock", value: "in_stock" },
|
153
|
+
{ label: "Out Of Stock", value: "out_of_stock" },
|
154
|
+
{ label: "Preorder", value: "preorder" },
|
155
|
+
{ label: "Backorder", value: "backorder" },
|
156
156
|
],
|
157
|
-
rules: [
|
158
|
-
description:
|
157
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
158
|
+
description: "Availability status of the item",
|
159
159
|
},
|
160
160
|
{
|
161
161
|
required: false,
|
162
|
-
label:
|
163
|
-
attribute:
|
164
|
-
type:
|
165
|
-
defaultValue:
|
166
|
-
rules: [
|
167
|
-
description:
|
162
|
+
label: "Brand",
|
163
|
+
attribute: "brand",
|
164
|
+
type: "select",
|
165
|
+
defaultValue: "shopify.vendor",
|
166
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
167
|
+
description: "Brand of the item",
|
168
168
|
choices: [
|
169
169
|
ShopifyProductSource.vendor,
|
170
170
|
SOURCE_VENDORS,
|
@@ -173,74 +173,74 @@ export const ProductUploadMappings = [
|
|
173
173
|
},
|
174
174
|
{
|
175
175
|
required: false,
|
176
|
-
label:
|
177
|
-
attribute:
|
178
|
-
type:
|
176
|
+
label: "Gender",
|
177
|
+
attribute: "gender",
|
178
|
+
type: "select",
|
179
179
|
choices: [
|
180
|
-
{ label:
|
181
|
-
{ label:
|
182
|
-
{ label:
|
180
|
+
{ label: "Male", value: "male" },
|
181
|
+
{ label: "Female", value: "female" },
|
182
|
+
{ label: "Unisex", value: "unisex" },
|
183
183
|
],
|
184
|
-
rules: [
|
185
|
-
description:
|
184
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
185
|
+
description: "Target gender of the item",
|
186
186
|
},
|
187
187
|
{
|
188
188
|
required: false,
|
189
|
-
label:
|
190
|
-
attribute:
|
191
|
-
type:
|
189
|
+
label: "Google category",
|
190
|
+
attribute: "googleProductCategory",
|
191
|
+
type: "select",
|
192
192
|
choices: [SOURCE_GOOGLE_CATEGORY],
|
193
|
-
rules: [
|
194
|
-
description:
|
193
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
194
|
+
description: "Google's category of the item",
|
195
195
|
},
|
196
196
|
{
|
197
197
|
required: false,
|
198
|
-
label:
|
199
|
-
attribute:
|
200
|
-
type:
|
201
|
-
defaultValue:
|
202
|
-
rules: [
|
203
|
-
description:
|
198
|
+
label: "GTIN",
|
199
|
+
attribute: "gtin",
|
200
|
+
type: "select",
|
201
|
+
defaultValue: "shopify.vendor",
|
202
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
203
|
+
description: "Global Trade Item Number (GTIN) of the item",
|
204
204
|
choices: [
|
205
205
|
ShopifyProductSource.barcode,
|
206
206
|
ShopifyProductSource.sku,
|
207
|
-
{ label:
|
207
|
+
{ label: "Custom input", value: SOURCE_CUSTOM },
|
208
208
|
],
|
209
209
|
},
|
210
210
|
{
|
211
211
|
required: false,
|
212
|
-
label:
|
213
|
-
attribute:
|
214
|
-
type:
|
215
|
-
defaultValue:
|
216
|
-
rules: [
|
217
|
-
description:
|
212
|
+
label: "MPN",
|
213
|
+
attribute: "mpn",
|
214
|
+
type: "select",
|
215
|
+
defaultValue: "shopify.vendor",
|
216
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
217
|
+
description: "Manufacturer Part Number (MPN) of the item",
|
218
218
|
choices: [
|
219
219
|
ShopifyProductSource.barcode,
|
220
220
|
ShopifyProductSource.sku,
|
221
|
-
{ label:
|
221
|
+
{ label: "Custom input", value: SOURCE_CUSTOM },
|
222
222
|
],
|
223
223
|
},
|
224
224
|
{
|
225
225
|
required: false,
|
226
|
-
label:
|
227
|
-
attribute:
|
228
|
-
type:
|
226
|
+
label: "Included Destinations",
|
227
|
+
attribute: "includedDestinations",
|
228
|
+
type: "multiselect",
|
229
229
|
choices: [
|
230
|
-
{ label:
|
231
|
-
{ label:
|
232
|
-
{ label:
|
230
|
+
{ label: "Shopping ads", value: "Shopping_ads" },
|
231
|
+
{ label: "Dynamic remarketing ads", value: "Display_ads" },
|
232
|
+
{ label: "Free listings", value: "Free_listings" },
|
233
233
|
],
|
234
|
-
rules: [
|
235
|
-
description:
|
234
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
235
|
+
description: "The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center)",
|
236
236
|
},
|
237
237
|
{
|
238
238
|
required: false,
|
239
|
-
label:
|
240
|
-
attribute:
|
241
|
-
type:
|
242
|
-
rules: [
|
243
|
-
description:
|
239
|
+
label: "Shipping label",
|
240
|
+
attribute: "shippingLabel",
|
241
|
+
type: "text",
|
242
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
243
|
+
description: "The shipping label of the product, used to group product in account-level shipping rules",
|
244
244
|
},
|
245
245
|
// /**
|
246
246
|
// * The day a pre-ordered product becomes available for delivery, in ISO 8601 format.
|
@@ -351,7 +351,12 @@ export const ProductUploadMappings = [
|
|
351
351
|
// */
|
352
352
|
// sizeType?: string | null;
|
353
353
|
];
|
354
|
-
export const CHANNEL =
|
355
|
-
export const GMC_PRODUCT_ID_TEMPLATE =
|
356
|
-
export const ProfileIdTemplateCodes = [
|
354
|
+
export const CHANNEL = "online";
|
355
|
+
export const GMC_PRODUCT_ID_TEMPLATE = "{PRODUCT_ID}_{VARIANT_ID}";
|
356
|
+
export const ProfileIdTemplateCodes = [
|
357
|
+
"PRODUCT_ID",
|
358
|
+
"VARIANT_ID",
|
359
|
+
"COUNTRY",
|
360
|
+
"LANGUAGE",
|
361
|
+
];
|
357
362
|
//# sourceMappingURL=profile.constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"profile.constants.js","sourceRoot":"","sources":["../../src/constants/profile.constants.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"profile.constants.js","sourceRoot":"","sources":["../../src/constants/profile.constants.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACtD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAE5C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,UAAU;KAClB;IACD,WAAW,EAAE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AAM;IACN,qCAAqC;IACrC,MAAM;IACN,mDAAmD;IACnD,MAAM;IACN,wLAAwL;IACxL,MAAM;IACN,kDAAkD;IAClD,MAAM;IACN,sLAAsL;IACtL,MAAM;IACN,2BAA2B;IAC3B,MAAM;IACN,2EAA2E;IAC3E,MAAM;IACN,8BAA8B;IAC9B,MAAM;IACN,yDAAyD;IACzD,MAAM;IACN,4BAA4B;CAC7B,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAChC,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AACnE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,UAAU;CACX,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { GmcProductSyncStatus } from
|
2
|
-
import { ProductSyncStatus } from
|
3
|
-
export type AppProductStatus =
|
1
|
+
import { GmcProductSyncStatus } from "../constants/google.constants.js";
|
2
|
+
import { ProductSyncStatus } from "../constants/product.constants.js";
|
3
|
+
export type AppProductStatus = "active" | "draft" | "archived";
|
4
4
|
export type AppProductVariant = {
|
5
5
|
id: number;
|
6
6
|
title: string;
|
@@ -16,7 +16,7 @@ export type GmcProductId = {
|
|
16
16
|
status?: GmcProductSyncStatus;
|
17
17
|
};
|
18
18
|
export type GoogleProductIssue = {
|
19
|
-
servability?:
|
19
|
+
servability?: "demoted" | "disapproved" | "unaffected" | string;
|
20
20
|
description?: string;
|
21
21
|
documentation?: string;
|
22
22
|
};
|
@@ -61,8 +61,8 @@ export type GetProductsQuery = {
|
|
61
61
|
handle?: string;
|
62
62
|
title?: string;
|
63
63
|
id?: number[];
|
64
|
-
sortField?:
|
65
|
-
sort?:
|
64
|
+
sortField?: "title" | "id";
|
65
|
+
sort?: "asc" | "desc";
|
66
66
|
fields?: string[];
|
67
67
|
gmcProductId?: string[] | boolean;
|
68
68
|
};
|
@@ -84,4 +84,21 @@ export type UploadProductBulkPayload = {
|
|
84
84
|
types: string[];
|
85
85
|
tags: string[];
|
86
86
|
};
|
87
|
+
export type ProductVariant = {
|
88
|
+
id: number;
|
89
|
+
title: string;
|
90
|
+
price: string;
|
91
|
+
sku: string;
|
92
|
+
image?: string;
|
93
|
+
locale: string;
|
94
|
+
country: string;
|
95
|
+
gmcProductId: string;
|
96
|
+
gmcIssues?: gmcIssue[][number]["issue"];
|
97
|
+
profileId: string;
|
98
|
+
updated_at: string;
|
99
|
+
uploaded_to_gmc_at: string;
|
100
|
+
updated_issue_at?: string;
|
101
|
+
profile: string;
|
102
|
+
status?: GmcProductSyncStatus;
|
103
|
+
};
|
87
104
|
//# sourceMappingURL=product.types.d.ts.map
|
@@ -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;AAEtE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;IA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B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAAC"}
|
package/package.json
CHANGED
@@ -1,62 +1,63 @@
|
|
1
|
+
/* eslint-disable quotes */
|
1
2
|
import {
|
2
3
|
ProductUploadMapSource,
|
3
4
|
ProductUploadRuleFilterType,
|
4
|
-
} from
|
5
|
+
} from "../types/profile.types.js";
|
5
6
|
|
6
|
-
export const SOURCE_VENDORS =
|
7
|
-
export const SOURCE_TAGS =
|
8
|
-
export const SOURCE_PRODUCT_TYPE =
|
9
|
-
export const SOURCE_COLLECTIONS =
|
10
|
-
export const SOURCE_LANGUAGE =
|
11
|
-
export const SOURCE_GOOGLE_CATEGORY =
|
12
|
-
export const SOURCE_COUNTRY =
|
7
|
+
export const SOURCE_VENDORS = "source.vendor";
|
8
|
+
export const SOURCE_TAGS = "source.tag";
|
9
|
+
export const SOURCE_PRODUCT_TYPE = "source.product_type";
|
10
|
+
export const SOURCE_COLLECTIONS = "source.collection";
|
11
|
+
export const SOURCE_LANGUAGE = "source.language";
|
12
|
+
export const SOURCE_GOOGLE_CATEGORY = "source.google_category";
|
13
|
+
export const SOURCE_COUNTRY = "source.country";
|
13
14
|
|
14
|
-
export const SOURCE_SHOPIFY_VENDORS =
|
15
|
-
export const SOURCE_SHOPIFY_BARCODE =
|
16
|
-
export const SOURCE_SHOPIFY_SKU =
|
15
|
+
export const SOURCE_SHOPIFY_VENDORS = "shopify.vendor";
|
16
|
+
export const SOURCE_SHOPIFY_BARCODE = "shopify.barcode";
|
17
|
+
export const SOURCE_SHOPIFY_SKU = "shopify.sku";
|
17
18
|
|
18
|
-
export const SOURCE_CUSTOM =
|
19
|
+
export const SOURCE_CUSTOM = "custom_input";
|
19
20
|
|
20
21
|
export const RuleOperators = {
|
21
22
|
contains: {
|
22
|
-
label:
|
23
|
-
value:
|
23
|
+
label: "Contains",
|
24
|
+
value: "contains",
|
24
25
|
},
|
25
26
|
notContains: {
|
26
|
-
label:
|
27
|
-
value:
|
27
|
+
label: "Not Contains",
|
28
|
+
value: "notContains",
|
28
29
|
},
|
29
30
|
equals: {
|
30
|
-
label:
|
31
|
-
value:
|
31
|
+
label: "Equals",
|
32
|
+
value: "equals",
|
32
33
|
},
|
33
34
|
notEquals: {
|
34
|
-
label:
|
35
|
-
value:
|
35
|
+
label: "Not Equals",
|
36
|
+
value: "notEquals",
|
36
37
|
},
|
37
38
|
startsWith: {
|
38
|
-
label:
|
39
|
-
value:
|
39
|
+
label: "Starts With",
|
40
|
+
value: "startsWith",
|
40
41
|
},
|
41
42
|
notStartsWith: {
|
42
|
-
label:
|
43
|
-
value:
|
43
|
+
label: "Not Starts With",
|
44
|
+
value: "notStartsWith",
|
44
45
|
},
|
45
46
|
endsWith: {
|
46
|
-
label:
|
47
|
-
value:
|
47
|
+
label: "Ends With",
|
48
|
+
value: "endsWith",
|
48
49
|
},
|
49
50
|
notEndsWith: {
|
50
|
-
label:
|
51
|
-
value:
|
51
|
+
label: "Not Ends With",
|
52
|
+
value: "notEndsWith",
|
52
53
|
},
|
53
54
|
in: {
|
54
|
-
label:
|
55
|
-
value:
|
55
|
+
label: "In",
|
56
|
+
value: "in",
|
56
57
|
},
|
57
58
|
notIn: {
|
58
|
-
label:
|
59
|
-
value:
|
59
|
+
label: "Not In",
|
60
|
+
value: "notIn",
|
60
61
|
},
|
61
62
|
};
|
62
63
|
|
@@ -76,108 +77,108 @@ export const ProductUploadRulesOperators = {
|
|
76
77
|
|
77
78
|
export const ProductUploadRuleFilters: ProductUploadRuleFilterType[] = [
|
78
79
|
{
|
79
|
-
label:
|
80
|
+
label: "Title",
|
80
81
|
operators: ProductUploadRulesOperators.string,
|
81
|
-
value:
|
82
|
+
value: "title",
|
82
83
|
},
|
83
84
|
{
|
84
|
-
label:
|
85
|
+
label: "Collection",
|
85
86
|
operators: ProductUploadRulesOperators.list,
|
86
|
-
value:
|
87
|
+
value: "collection",
|
87
88
|
},
|
88
89
|
{
|
89
|
-
label:
|
90
|
+
label: "Product Type",
|
90
91
|
operators: ProductUploadRulesOperators.list,
|
91
|
-
value:
|
92
|
+
value: "product_type",
|
92
93
|
},
|
93
94
|
{
|
94
|
-
label:
|
95
|
+
label: "Vendor",
|
95
96
|
operators: ProductUploadRulesOperators.list,
|
96
|
-
value:
|
97
|
+
value: "vendor",
|
97
98
|
},
|
98
99
|
{
|
99
|
-
label:
|
100
|
+
label: "Tag",
|
100
101
|
operators: ProductUploadRulesOperators.list,
|
101
|
-
value:
|
102
|
+
value: "tag",
|
102
103
|
},
|
103
104
|
];
|
104
105
|
|
105
106
|
const ShopifyProductSource = {
|
106
|
-
vendor: { label:
|
107
|
-
barcode: { label:
|
108
|
-
sku: { label:
|
109
|
-
custom: { label:
|
107
|
+
vendor: { label: "Shopify Product Vendor", value: SOURCE_SHOPIFY_VENDORS },
|
108
|
+
barcode: { label: "Shopify Product Barcode", value: SOURCE_SHOPIFY_BARCODE },
|
109
|
+
sku: { label: "Shopify Product SKU", value: SOURCE_SHOPIFY_SKU },
|
110
|
+
custom: { label: "Custom input", value: SOURCE_CUSTOM },
|
110
111
|
};
|
111
112
|
|
112
113
|
export const ProductUploadMappings: ProductUploadMapSource[] = [
|
113
114
|
{
|
114
115
|
required: true,
|
115
|
-
label:
|
116
|
-
attribute:
|
117
|
-
type:
|
116
|
+
label: "Content Language",
|
117
|
+
attribute: "contentLanguage",
|
118
|
+
type: "select",
|
118
119
|
choices: [SOURCE_LANGUAGE],
|
119
|
-
rules: [
|
120
|
-
description:
|
120
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
121
|
+
description: "Language for the item",
|
121
122
|
},
|
122
123
|
{
|
123
124
|
required: true,
|
124
|
-
label:
|
125
|
-
attribute:
|
126
|
-
type:
|
125
|
+
label: "Target Country",
|
126
|
+
attribute: "targetCountry",
|
127
|
+
type: "select",
|
127
128
|
choices: [SOURCE_COUNTRY],
|
128
|
-
rules: [
|
129
|
-
description:
|
129
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
130
|
+
description: "The item's country of sale",
|
130
131
|
},
|
131
132
|
{
|
132
133
|
required: false,
|
133
|
-
label:
|
134
|
-
attribute:
|
135
|
-
type:
|
134
|
+
label: "Adult",
|
135
|
+
attribute: "adult",
|
136
|
+
type: "select",
|
136
137
|
choices: [
|
137
|
-
{ label:
|
138
|
-
{ label:
|
138
|
+
{ label: "Yes", value: true },
|
139
|
+
{ label: "No", value: false },
|
139
140
|
],
|
140
|
-
rules: [
|
141
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
141
142
|
description:
|
142
143
|
'Should be set to "Yes" if the item is targeted towards adults',
|
143
144
|
},
|
144
145
|
{
|
145
146
|
required: false,
|
146
|
-
label:
|
147
|
-
attribute:
|
148
|
-
type:
|
147
|
+
label: "Age Group",
|
148
|
+
attribute: "ageGroup",
|
149
|
+
type: "select",
|
149
150
|
choices: [
|
150
|
-
{ label:
|
151
|
-
{ label:
|
152
|
-
{ label:
|
153
|
-
{ label:
|
154
|
-
{ label:
|
151
|
+
{ label: "0-3 months old", value: "newborn" },
|
152
|
+
{ label: "3-12 months old", value: "infant" },
|
153
|
+
{ label: "1-5 years old", value: "toddler" },
|
154
|
+
{ label: "5-13 years old", value: "kids" },
|
155
|
+
{ label: "13 years old or more", value: "adult" },
|
155
156
|
],
|
156
|
-
rules: [
|
157
|
-
description:
|
157
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
158
|
+
description: "Target age group of the item",
|
158
159
|
},
|
159
160
|
{
|
160
|
-
required:
|
161
|
-
label:
|
162
|
-
attribute:
|
163
|
-
type:
|
161
|
+
required: true,
|
162
|
+
label: "Availability",
|
163
|
+
attribute: "availability",
|
164
|
+
type: "select",
|
164
165
|
choices: [
|
165
|
-
{ label:
|
166
|
-
{ label:
|
167
|
-
{ label:
|
168
|
-
{ label:
|
166
|
+
{ label: "In Stock", value: "in_stock" },
|
167
|
+
{ label: "Out Of Stock", value: "out_of_stock" },
|
168
|
+
{ label: "Preorder", value: "preorder" },
|
169
|
+
{ label: "Backorder", value: "backorder" },
|
169
170
|
],
|
170
|
-
rules: [
|
171
|
-
description:
|
171
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
172
|
+
description: "Availability status of the item",
|
172
173
|
},
|
173
174
|
{
|
174
175
|
required: false,
|
175
|
-
label:
|
176
|
-
attribute:
|
177
|
-
type:
|
178
|
-
defaultValue:
|
179
|
-
rules: [
|
180
|
-
description:
|
176
|
+
label: "Brand",
|
177
|
+
attribute: "brand",
|
178
|
+
type: "select",
|
179
|
+
defaultValue: "shopify.vendor",
|
180
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
181
|
+
description: "Brand of the item",
|
181
182
|
choices: [
|
182
183
|
ShopifyProductSource.vendor,
|
183
184
|
SOURCE_VENDORS,
|
@@ -186,76 +187,76 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
|
|
186
187
|
},
|
187
188
|
{
|
188
189
|
required: false,
|
189
|
-
label:
|
190
|
-
attribute:
|
191
|
-
type:
|
190
|
+
label: "Gender",
|
191
|
+
attribute: "gender",
|
192
|
+
type: "select",
|
192
193
|
choices: [
|
193
|
-
{ label:
|
194
|
-
{ label:
|
195
|
-
{ label:
|
194
|
+
{ label: "Male", value: "male" },
|
195
|
+
{ label: "Female", value: "female" },
|
196
|
+
{ label: "Unisex", value: "unisex" },
|
196
197
|
],
|
197
|
-
rules: [
|
198
|
-
description:
|
198
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
199
|
+
description: "Target gender of the item",
|
199
200
|
},
|
200
201
|
{
|
201
202
|
required: false,
|
202
|
-
label:
|
203
|
-
attribute:
|
204
|
-
type:
|
203
|
+
label: "Google category",
|
204
|
+
attribute: "googleProductCategory",
|
205
|
+
type: "select",
|
205
206
|
choices: [SOURCE_GOOGLE_CATEGORY],
|
206
|
-
rules: [
|
207
|
-
description:
|
207
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
208
|
+
description: "Google's category of the item",
|
208
209
|
},
|
209
210
|
{
|
210
211
|
required: false,
|
211
|
-
label:
|
212
|
-
attribute:
|
213
|
-
type:
|
214
|
-
defaultValue:
|
215
|
-
rules: [
|
216
|
-
description:
|
212
|
+
label: "GTIN",
|
213
|
+
attribute: "gtin",
|
214
|
+
type: "select",
|
215
|
+
defaultValue: "shopify.vendor",
|
216
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
217
|
+
description: "Global Trade Item Number (GTIN) of the item",
|
217
218
|
choices: [
|
218
219
|
ShopifyProductSource.barcode,
|
219
220
|
ShopifyProductSource.sku,
|
220
|
-
{ label:
|
221
|
+
{ label: "Custom input", value: SOURCE_CUSTOM },
|
221
222
|
],
|
222
223
|
},
|
223
224
|
{
|
224
225
|
required: false,
|
225
|
-
label:
|
226
|
-
attribute:
|
227
|
-
type:
|
228
|
-
defaultValue:
|
229
|
-
rules: [
|
230
|
-
description:
|
226
|
+
label: "MPN",
|
227
|
+
attribute: "mpn",
|
228
|
+
type: "select",
|
229
|
+
defaultValue: "shopify.vendor",
|
230
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
231
|
+
description: "Manufacturer Part Number (MPN) of the item",
|
231
232
|
choices: [
|
232
233
|
ShopifyProductSource.barcode,
|
233
234
|
ShopifyProductSource.sku,
|
234
|
-
{ label:
|
235
|
+
{ label: "Custom input", value: SOURCE_CUSTOM },
|
235
236
|
],
|
236
237
|
},
|
237
238
|
{
|
238
239
|
required: false,
|
239
|
-
label:
|
240
|
-
attribute:
|
241
|
-
type:
|
240
|
+
label: "Included Destinations",
|
241
|
+
attribute: "includedDestinations",
|
242
|
+
type: "multiselect",
|
242
243
|
choices: [
|
243
|
-
{ label:
|
244
|
-
{ label:
|
245
|
-
{ label:
|
244
|
+
{ label: "Shopping ads", value: "Shopping_ads" },
|
245
|
+
{ label: "Dynamic remarketing ads", value: "Display_ads" },
|
246
|
+
{ label: "Free listings", value: "Free_listings" },
|
246
247
|
],
|
247
|
-
rules: [
|
248
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
248
249
|
description:
|
249
|
-
|
250
|
+
"The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center)",
|
250
251
|
},
|
251
252
|
{
|
252
253
|
required: false,
|
253
|
-
label:
|
254
|
-
attribute:
|
255
|
-
type:
|
256
|
-
rules: [
|
254
|
+
label: "Shipping label",
|
255
|
+
attribute: "shippingLabel",
|
256
|
+
type: "text",
|
257
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
257
258
|
description:
|
258
|
-
|
259
|
+
"The shipping label of the product, used to group product in account-level shipping rules",
|
259
260
|
},
|
260
261
|
|
261
262
|
// /**
|
@@ -367,6 +368,11 @@ export const ProductUploadMappings: ProductUploadMapSource[] = [
|
|
367
368
|
// */
|
368
369
|
// sizeType?: string | null;
|
369
370
|
];
|
370
|
-
export const CHANNEL =
|
371
|
-
export const GMC_PRODUCT_ID_TEMPLATE =
|
372
|
-
export const ProfileIdTemplateCodes = [
|
371
|
+
export const CHANNEL = "online";
|
372
|
+
export const GMC_PRODUCT_ID_TEMPLATE = "{PRODUCT_ID}_{VARIANT_ID}";
|
373
|
+
export const ProfileIdTemplateCodes = [
|
374
|
+
"PRODUCT_ID",
|
375
|
+
"VARIANT_ID",
|
376
|
+
"COUNTRY",
|
377
|
+
"LANGUAGE",
|
378
|
+
];
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { GmcProductSyncStatus } from
|
2
|
-
import { ProductSyncStatus } from
|
1
|
+
import { GmcProductSyncStatus } from "../constants/google.constants.js";
|
2
|
+
import { ProductSyncStatus } from "../constants/product.constants.js";
|
3
3
|
|
4
|
-
export type AppProductStatus =
|
4
|
+
export type AppProductStatus = "active" | "draft" | "archived";
|
5
5
|
|
6
6
|
export type AppProductVariant = {
|
7
7
|
id: number;
|
@@ -20,7 +20,7 @@ export type GmcProductId = {
|
|
20
20
|
};
|
21
21
|
|
22
22
|
export type GoogleProductIssue = {
|
23
|
-
servability?:
|
23
|
+
servability?: "demoted" | "disapproved" | "unaffected" | string;
|
24
24
|
description?: string;
|
25
25
|
documentation?: string;
|
26
26
|
};
|
@@ -69,8 +69,8 @@ export type GetProductsQuery = {
|
|
69
69
|
handle?: string;
|
70
70
|
title?: string;
|
71
71
|
id?: number[];
|
72
|
-
sortField?:
|
73
|
-
sort?:
|
72
|
+
sortField?: "title" | "id";
|
73
|
+
sort?: "asc" | "desc";
|
74
74
|
fields?: string[];
|
75
75
|
gmcProductId?: string[] | boolean;
|
76
76
|
};
|
@@ -95,3 +95,21 @@ export type UploadProductBulkPayload = {
|
|
95
95
|
types: string[];
|
96
96
|
tags: string[];
|
97
97
|
};
|
98
|
+
|
99
|
+
export type ProductVariant = {
|
100
|
+
id: number;
|
101
|
+
title: string;
|
102
|
+
price: string;
|
103
|
+
sku: string;
|
104
|
+
image?: string;
|
105
|
+
locale: string;
|
106
|
+
country: string;
|
107
|
+
gmcProductId: string;
|
108
|
+
gmcIssues?: gmcIssue[][number]["issue"];
|
109
|
+
profileId: string;
|
110
|
+
updated_at: string;
|
111
|
+
uploaded_to_gmc_at: string;
|
112
|
+
updated_issue_at?: string;
|
113
|
+
profile: string;
|
114
|
+
status?: GmcProductSyncStatus;
|
115
|
+
};
|