feed-common 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.releaserc +10 -0
- package/dist/constants/google.constants.js +14 -0
- package/dist/constants/google.constants.js.map +1 -0
- package/dist/constants/product.constants.js +6 -0
- package/dist/constants/product.constants.js.map +1 -0
- package/dist/constants/profile.constants.js +356 -0
- package/dist/constants/profile.constants.js.map +1 -0
- package/dist/google.constants.js +14 -0
- package/dist/google.constants.js.map +1 -0
- package/dist/product.constants.js +6 -0
- package/dist/product.constants.js.map +1 -0
- package/dist/profile.constants.js +356 -0
- package/dist/profile.constants.js.map +1 -0
- package/dist/types/product.types.js +2 -0
- package/dist/types/product.types.js.map +1 -0
- package/dist/types/profile.types.js +2 -0
- package/dist/types/profile.types.js.map +1 -0
- package/dist/utils/gmc.js +39 -0
- package/dist/utils/gmc.js.map +1 -0
- package/dist/utils/profile.js +229 -0
- package/dist/utils/profile.js.map +1 -0
- package/dist/utils/utils.js +4 -0
- package/dist/utils/utils.js.map +1 -0
- package/package.json +34 -0
package/.releaserc
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
branches:
|
2
|
+
- master
|
3
|
+
repositoryUrl: "https://github.com/advertikon/package-maxify-feed-common.git"
|
4
|
+
plugins:
|
5
|
+
- "@semantic-release/commit-analyzer"
|
6
|
+
- "@semantic-release/changelog"
|
7
|
+
- "@semantic-release/release-notes-generator"
|
8
|
+
- "@semantic-release/npm"
|
9
|
+
- "@semantic-release/git"
|
10
|
+
- "@semantic-release/github"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export var GmcProductSyncStatus;
|
2
|
+
(function (GmcProductSyncStatus) {
|
3
|
+
GmcProductSyncStatus["REJECTED"] = "rejected";
|
4
|
+
GmcProductSyncStatus["APPROVED"] = "approved";
|
5
|
+
GmcProductSyncStatus["WARINING"] = "warning";
|
6
|
+
GmcProductSyncStatus["SYNC_SHEDULED"] = "sync_sheduled";
|
7
|
+
})(GmcProductSyncStatus || (GmcProductSyncStatus = {}));
|
8
|
+
export var GoogleAccountStatus;
|
9
|
+
(function (GoogleAccountStatus) {
|
10
|
+
GoogleAccountStatus["ENABLED"] = "ENABLED";
|
11
|
+
GoogleAccountStatus["REMOVED"] = "REMOVED";
|
12
|
+
GoogleAccountStatus["REJECTED"] = "REJECTED";
|
13
|
+
})(GoogleAccountStatus || (GoogleAccountStatus = {}));
|
14
|
+
//# sourceMappingURL=google.constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"google.constants.js","sourceRoot":"","sources":["../../src/common/constants/google.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,4CAAoB,CAAA;IACpB,uDAA+B,CAAA;AACjC,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"product.constants.js","sourceRoot":"","sources":["../../src/common/constants/product.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;AACnB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B"}
|
@@ -0,0 +1,356 @@
|
|
1
|
+
export const SOURCE_VENDORS = 'source.vendor';
|
2
|
+
export const SOURCE_TAGS = 'source.tag';
|
3
|
+
export const SOURCE_PORODUCT_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
|
+
export const RuleOperators = {
|
13
|
+
contains: {
|
14
|
+
label: 'Contains',
|
15
|
+
value: 'contains',
|
16
|
+
},
|
17
|
+
notContains: {
|
18
|
+
label: 'Not Contains',
|
19
|
+
value: 'notContains',
|
20
|
+
},
|
21
|
+
equals: {
|
22
|
+
label: 'Equals',
|
23
|
+
value: 'equals',
|
24
|
+
},
|
25
|
+
notEquals: {
|
26
|
+
label: 'Not Equals',
|
27
|
+
value: 'notEquals',
|
28
|
+
},
|
29
|
+
startsWith: {
|
30
|
+
label: 'Starts With',
|
31
|
+
value: 'startsWith',
|
32
|
+
},
|
33
|
+
notStartsWith: {
|
34
|
+
label: 'Not Starts With',
|
35
|
+
value: 'notStartsWith',
|
36
|
+
},
|
37
|
+
endsWith: {
|
38
|
+
label: 'Ends With',
|
39
|
+
value: 'endsWith',
|
40
|
+
},
|
41
|
+
notEndsWith: {
|
42
|
+
label: 'Not Ends With',
|
43
|
+
value: 'notEndsWith',
|
44
|
+
},
|
45
|
+
in: {
|
46
|
+
label: 'In',
|
47
|
+
value: 'in',
|
48
|
+
},
|
49
|
+
notIn: {
|
50
|
+
label: 'Not In',
|
51
|
+
value: 'notIn',
|
52
|
+
},
|
53
|
+
};
|
54
|
+
export const PruoductUploadRulesOperators = {
|
55
|
+
string: [
|
56
|
+
RuleOperators.contains,
|
57
|
+
RuleOperators.notContains,
|
58
|
+
RuleOperators.equals,
|
59
|
+
RuleOperators.notEquals,
|
60
|
+
RuleOperators.startsWith,
|
61
|
+
RuleOperators.endsWith,
|
62
|
+
RuleOperators.notStartsWith,
|
63
|
+
RuleOperators.notEndsWith,
|
64
|
+
],
|
65
|
+
list: [RuleOperators.in, RuleOperators.notIn],
|
66
|
+
};
|
67
|
+
export const ProductUploadRuleFilters = [
|
68
|
+
{
|
69
|
+
label: 'Title',
|
70
|
+
operators: PruoductUploadRulesOperators.string,
|
71
|
+
value: 'title',
|
72
|
+
},
|
73
|
+
{
|
74
|
+
label: 'Collection',
|
75
|
+
operators: PruoductUploadRulesOperators.list,
|
76
|
+
value: 'collection',
|
77
|
+
},
|
78
|
+
{
|
79
|
+
label: 'Product Type',
|
80
|
+
operators: PruoductUploadRulesOperators.list,
|
81
|
+
value: 'product_type',
|
82
|
+
},
|
83
|
+
{
|
84
|
+
label: 'Vendor',
|
85
|
+
operators: PruoductUploadRulesOperators.list,
|
86
|
+
value: 'vendor',
|
87
|
+
},
|
88
|
+
{
|
89
|
+
label: 'Tag',
|
90
|
+
operators: PruoductUploadRulesOperators.list,
|
91
|
+
value: 'tag',
|
92
|
+
},
|
93
|
+
];
|
94
|
+
const ShopifyProductSource = {
|
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
|
+
};
|
100
|
+
export const ProductUploadMappings = [
|
101
|
+
{
|
102
|
+
required: true,
|
103
|
+
label: 'Content Language',
|
104
|
+
attribute: 'contentLanguage',
|
105
|
+
type: 'select',
|
106
|
+
choises: [SOURCE_LANGUAGE],
|
107
|
+
rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
|
108
|
+
description: 'Language for the item',
|
109
|
+
},
|
110
|
+
{
|
111
|
+
required: true,
|
112
|
+
label: 'Target Country',
|
113
|
+
attribute: 'targetCountry',
|
114
|
+
type: 'select',
|
115
|
+
choises: [SOURCE_COUNTRY],
|
116
|
+
rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
|
117
|
+
description: 'The item\'s country of sale',
|
118
|
+
},
|
119
|
+
{
|
120
|
+
required: false,
|
121
|
+
label: 'Adult',
|
122
|
+
attribute: 'adult',
|
123
|
+
type: 'select',
|
124
|
+
choises: [
|
125
|
+
{ label: 'Yes', value: true },
|
126
|
+
{ label: 'No', value: false },
|
127
|
+
],
|
128
|
+
rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
|
129
|
+
description: 'Should be set to "Yes" if the item is targeted towards adults',
|
130
|
+
},
|
131
|
+
{
|
132
|
+
required: false,
|
133
|
+
label: 'Age Group',
|
134
|
+
attribute: 'ageGroup',
|
135
|
+
type: 'select',
|
136
|
+
choises: [
|
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
|
+
],
|
143
|
+
rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
|
144
|
+
description: 'Target age group of the item',
|
145
|
+
},
|
146
|
+
{
|
147
|
+
required: false,
|
148
|
+
label: 'Availability',
|
149
|
+
attribute: 'availability',
|
150
|
+
type: 'select',
|
151
|
+
choises: [
|
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
|
+
],
|
157
|
+
rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
|
158
|
+
description: 'Availability status of the item',
|
159
|
+
},
|
160
|
+
{
|
161
|
+
required: false,
|
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
|
+
choises: [
|
169
|
+
ShopifyProductSource.vendor,
|
170
|
+
SOURCE_VENDORS,
|
171
|
+
ShopifyProductSource.custom,
|
172
|
+
],
|
173
|
+
},
|
174
|
+
{
|
175
|
+
required: false,
|
176
|
+
label: 'Gender',
|
177
|
+
attribute: 'gender',
|
178
|
+
type: 'select',
|
179
|
+
choises: [
|
180
|
+
{ label: 'Male', value: 'male' },
|
181
|
+
{ label: 'Female', value: 'female' },
|
182
|
+
{ label: 'Unisex', value: 'unisex' },
|
183
|
+
],
|
184
|
+
rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
|
185
|
+
description: 'Target gender of the item',
|
186
|
+
},
|
187
|
+
{
|
188
|
+
required: false,
|
189
|
+
label: 'Google category',
|
190
|
+
attribute: 'googleProductCategory',
|
191
|
+
type: 'select',
|
192
|
+
choises: [SOURCE_GOOGLE_CATEGORY],
|
193
|
+
rules: ['title', 'collection', 'product_type', 'vendor', 'tag'],
|
194
|
+
description: 'Google\'s category of the item',
|
195
|
+
},
|
196
|
+
{
|
197
|
+
required: false,
|
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
|
+
choises: [
|
205
|
+
ShopifyProductSource.barcode,
|
206
|
+
ShopifyProductSource.sku,
|
207
|
+
{ label: 'Custom input', value: SOURCE_CUSTOM },
|
208
|
+
],
|
209
|
+
},
|
210
|
+
{
|
211
|
+
required: false,
|
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
|
+
choises: [
|
219
|
+
ShopifyProductSource.barcode,
|
220
|
+
ShopifyProductSource.sku,
|
221
|
+
{ label: 'Custom input', value: SOURCE_CUSTOM },
|
222
|
+
],
|
223
|
+
},
|
224
|
+
{
|
225
|
+
required: false,
|
226
|
+
label: 'Included Destinations',
|
227
|
+
attribute: 'includedDestinations',
|
228
|
+
type: 'multiselect',
|
229
|
+
choises: [
|
230
|
+
{ label: 'Shopping ads', value: 'Shopping_ads' },
|
231
|
+
{ label: 'Dynamic remarketing ads', value: 'Display_ads' },
|
232
|
+
{ label: 'Free listings', value: 'Free_listings' },
|
233
|
+
],
|
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
|
+
},
|
237
|
+
{
|
238
|
+
required: false,
|
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
|
+
},
|
245
|
+
// /**
|
246
|
+
// * The day a pre-ordered product becomes available for delivery, in ISO 8601 format.
|
247
|
+
// */
|
248
|
+
// availabilityDate?: string | null;
|
249
|
+
// /**
|
250
|
+
// * Color of the item.
|
251
|
+
// */
|
252
|
+
// color?: string | null;
|
253
|
+
// /**
|
254
|
+
// * Condition or state of the item.
|
255
|
+
// */
|
256
|
+
// condition?: string | null;
|
257
|
+
// /**
|
258
|
+
// * Custom label 0 for custom grouping of items in a Shopping campaign.
|
259
|
+
// */
|
260
|
+
// customLabel0?: string | null;
|
261
|
+
// /**
|
262
|
+
// * Custom label 1 for custom grouping of items in a Shopping campaign.
|
263
|
+
// */
|
264
|
+
// customLabel1?: string | null;
|
265
|
+
// /**
|
266
|
+
// * Custom label 2 for custom grouping of items in a Shopping campaign.
|
267
|
+
// */
|
268
|
+
// customLabel2?: string | null;
|
269
|
+
// /**
|
270
|
+
// * Custom label 3 for custom grouping of items in a Shopping campaign.
|
271
|
+
// */
|
272
|
+
// customLabel3?: string | null;
|
273
|
+
// /**
|
274
|
+
// * Custom label 4 for custom grouping of items in a Shopping campaign.
|
275
|
+
// */
|
276
|
+
// customLabel4?: string | null;
|
277
|
+
// /**
|
278
|
+
// * The date time when an offer becomes visible in search results across Google’s YouTube surfaces, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. See [Disclosure date](https://support.google.com/merchants/answer/13034208) for more information.
|
279
|
+
// */
|
280
|
+
// disclosureDate?: string | null;
|
281
|
+
// /**
|
282
|
+
// * Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in `productstatuses` as `googleExpirationDate` and might be earlier if `expirationDate` is too far in the future.
|
283
|
+
// */
|
284
|
+
// expirationDate?: string | null;
|
285
|
+
// /**
|
286
|
+
// * The material of which the item is made.
|
287
|
+
// */
|
288
|
+
// material?: string | null;
|
289
|
+
// /**
|
290
|
+
// * Maximal product handling time (in business days).
|
291
|
+
// */
|
292
|
+
// maxHandlingTime?: string | null;
|
293
|
+
// /**
|
294
|
+
// * Minimal product handling time (in business days).
|
295
|
+
// */
|
296
|
+
// minHandlingTime?: string | null;
|
297
|
+
// /**
|
298
|
+
// * The pick up option for the item. Acceptable values are: - "`buy`" - "`reserve`" - "`ship to store`" - "`not supported`"
|
299
|
+
// */
|
300
|
+
// pickupMethod?: string | null;
|
301
|
+
// /**
|
302
|
+
// * Item store pickup timeline. Acceptable values are: - "`same day`" - "`next day`" - "`2-day`" - "`3-day`" - "`4-day`" - "`5-day`" - "`6-day`" - "`7-day`" - "`multi-week`"
|
303
|
+
// */
|
304
|
+
// pickupSla?: string | null;
|
305
|
+
// /**
|
306
|
+
// * The height of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
|
307
|
+
// */
|
308
|
+
// productHeight?: Schema$ProductDimension;
|
309
|
+
// /**
|
310
|
+
// * The length of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
|
311
|
+
// */
|
312
|
+
// productLength?: Schema$ProductDimension;
|
313
|
+
// /**
|
314
|
+
// * The width of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
|
315
|
+
// */
|
316
|
+
// productWidth?: Schema$ProductDimension;
|
317
|
+
// /**
|
318
|
+
// * Shipping rules.
|
319
|
+
// */
|
320
|
+
// shipping?: Schema$ProductShipping[];
|
321
|
+
// /**
|
322
|
+
// * Height of the item for shipping.
|
323
|
+
// */
|
324
|
+
// shippingHeight?: Schema$ProductShippingDimension;
|
325
|
+
// /**
|
326
|
+
// * Length of the item for shipping.
|
327
|
+
// */
|
328
|
+
// shippingLength?: Schema$ProductShippingDimension;
|
329
|
+
// /**
|
330
|
+
// * Weight of the item for shipping.
|
331
|
+
// */
|
332
|
+
// shippingWeight?: Schema$ProductShippingWeight;
|
333
|
+
// /**
|
334
|
+
// * Width of the item for shipping.
|
335
|
+
// */
|
336
|
+
// shippingWidth?: Schema$ProductShippingDimension;
|
337
|
+
// /**
|
338
|
+
// * List of country codes (ISO 3166-1 alpha-2) to exclude the offer from Shopping Ads destination. Countries from this list are removed from countries configured in MC feed settings.
|
339
|
+
// */
|
340
|
+
// shoppingAdsExcludedCountries?: string[] | null;
|
341
|
+
// /**
|
342
|
+
// * Size of the item. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same `itemGroupId` value (see size definition).
|
343
|
+
// */
|
344
|
+
// sizes?: string[] | null;
|
345
|
+
// /**
|
346
|
+
// * System in which the size is specified. Recommended for apparel items.
|
347
|
+
// */
|
348
|
+
// sizeSystem?: string | null;
|
349
|
+
// /**
|
350
|
+
// * The cut of the item. Recommended for apparel items.
|
351
|
+
// */
|
352
|
+
// sizeType?: string | null;
|
353
|
+
];
|
354
|
+
export const CHANNEL = 'online';
|
355
|
+
export const GMC_PRODUCT_ID_TEMPLATE = '{PRODUCT_ID}_{VARIANT_ID}';
|
356
|
+
//# sourceMappingURL=profile.constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"profile.constants.js","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AM;IACN,gCAAgC;IAChC,MAAM;IACN,oQAAoQ;IACpQ,MAAM;IACN,kCAAkC;IAClC,MAAM;IACN,uQAAuQ;IACvQ,MAAM;IACN,kCAAkC;IAClC,MAAM;IACN,6CAA6C;IAC7C,MAAM;IACN,4BAA4B;IAC5B,MAAM;IACN,uDAAuD;IACvD,MAAM;IACN,mCAAmC;IACnC,MAAM;IACN,uDAAuD;IACvD,MAAM;IACN,mCAAmC;IACnC,MAAM;IACN,6HAA6H;IAC7H,MAAM;IACN,gCAAgC;IAChC,MAAM;IACN,+KAA+K;IAC/K,MAAM;IACN,6BAA6B;IAC7B,MAAM;IACN,oHAAoH;IACpH,MAAM;IACN,2CAA2C;IAC3C,MAAM;IACN,oHAAoH;IACpH,MAAM;IACN,2CAA2C;IAC3C,MAAM;IACN,mHAAmH;IACnH,MAAM;IACN,0CAA0C;IAC1C,MAAM;IACN,qBAAqB;IACrB,MAAM;IACN,uCAAuC;IACvC,MAAM;IACN,sCAAsC;IACtC,MAAM;IACN,oDAAoD;IACpD,MAAM;IACN,sCAAsC;IACtC,MAAM;IACN,oDAAoD;IACpD,MAAM;IACN,sCAAsC;IACtC,MAAM;IACN,iDAAiD;IACjD,MAAM;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"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export var GmcProductSyncStatus;
|
2
|
+
(function (GmcProductSyncStatus) {
|
3
|
+
GmcProductSyncStatus["REJECTED"] = "rejected";
|
4
|
+
GmcProductSyncStatus["APPROVED"] = "approved";
|
5
|
+
GmcProductSyncStatus["WARINING"] = "warning";
|
6
|
+
GmcProductSyncStatus["SYNC_SHEDULED"] = "sync_sheduled";
|
7
|
+
})(GmcProductSyncStatus || (GmcProductSyncStatus = {}));
|
8
|
+
export var GoogleAccountStatus;
|
9
|
+
(function (GoogleAccountStatus) {
|
10
|
+
GoogleAccountStatus["ENABLED"] = "ENABLED";
|
11
|
+
GoogleAccountStatus["REMOVED"] = "REMOVED";
|
12
|
+
GoogleAccountStatus["REJECTED"] = "REJECTED";
|
13
|
+
})(GoogleAccountStatus || (GoogleAccountStatus = {}));
|
14
|
+
//# sourceMappingURL=google.constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"google.constants.js","sourceRoot":"","sources":["../src/common/constants/google.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,4CAAoB,CAAA;IACpB,uDAA+B,CAAA;AACjC,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"product.constants.js","sourceRoot":"","sources":["../src/common/constants/product.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;AACnB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B"}
|
@@ -0,0 +1,356 @@
|
|
1
|
+
export const SOURCE_VENDORS = "source.vendor";
|
2
|
+
export const SOURCE_TAGS = "source.tag";
|
3
|
+
export const SOURCE_PORODUCT_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
|
+
export const RuleOperators = {
|
13
|
+
contains: {
|
14
|
+
label: "Contains",
|
15
|
+
value: "contains",
|
16
|
+
},
|
17
|
+
notContains: {
|
18
|
+
label: "Not Contains",
|
19
|
+
value: "notContains",
|
20
|
+
},
|
21
|
+
equals: {
|
22
|
+
label: "Equals",
|
23
|
+
value: "equals",
|
24
|
+
},
|
25
|
+
notEquals: {
|
26
|
+
label: "Not Equals",
|
27
|
+
value: "notEquals",
|
28
|
+
},
|
29
|
+
startsWith: {
|
30
|
+
label: "Starts With",
|
31
|
+
value: "startsWith",
|
32
|
+
},
|
33
|
+
notStartsWith: {
|
34
|
+
label: "Not Starts With",
|
35
|
+
value: "notStartsWith",
|
36
|
+
},
|
37
|
+
endsWith: {
|
38
|
+
label: "Ends With",
|
39
|
+
value: "endsWith",
|
40
|
+
},
|
41
|
+
notEndsWith: {
|
42
|
+
label: "Not Ends With",
|
43
|
+
value: "notEndsWith",
|
44
|
+
},
|
45
|
+
in: {
|
46
|
+
label: "In",
|
47
|
+
value: "in",
|
48
|
+
},
|
49
|
+
notIn: {
|
50
|
+
label: "Not In",
|
51
|
+
value: "notIn",
|
52
|
+
},
|
53
|
+
};
|
54
|
+
export const PruoductUploadRulesOperators = {
|
55
|
+
string: [
|
56
|
+
RuleOperators.contains,
|
57
|
+
RuleOperators.notContains,
|
58
|
+
RuleOperators.equals,
|
59
|
+
RuleOperators.notEquals,
|
60
|
+
RuleOperators.startsWith,
|
61
|
+
RuleOperators.endsWith,
|
62
|
+
RuleOperators.notStartsWith,
|
63
|
+
RuleOperators.notEndsWith,
|
64
|
+
],
|
65
|
+
list: [RuleOperators.in, RuleOperators.notIn],
|
66
|
+
};
|
67
|
+
export const ProductUploadRuleFilters = [
|
68
|
+
{
|
69
|
+
label: "Title",
|
70
|
+
operators: PruoductUploadRulesOperators.string,
|
71
|
+
value: "title",
|
72
|
+
},
|
73
|
+
{
|
74
|
+
label: "Collection",
|
75
|
+
operators: PruoductUploadRulesOperators.list,
|
76
|
+
value: "collection",
|
77
|
+
},
|
78
|
+
{
|
79
|
+
label: "Product Type",
|
80
|
+
operators: PruoductUploadRulesOperators.list,
|
81
|
+
value: "product_type",
|
82
|
+
},
|
83
|
+
{
|
84
|
+
label: "Vendor",
|
85
|
+
operators: PruoductUploadRulesOperators.list,
|
86
|
+
value: "vendor",
|
87
|
+
},
|
88
|
+
{
|
89
|
+
label: "Tag",
|
90
|
+
operators: PruoductUploadRulesOperators.list,
|
91
|
+
value: "tag",
|
92
|
+
},
|
93
|
+
];
|
94
|
+
const ShopifyProductSource = {
|
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
|
+
};
|
100
|
+
export const ProductUploadMappings = [
|
101
|
+
{
|
102
|
+
required: true,
|
103
|
+
label: "Content Language",
|
104
|
+
attribute: "contentLanguage",
|
105
|
+
type: "select",
|
106
|
+
choises: [SOURCE_LANGUAGE],
|
107
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
108
|
+
description: "Language for the item",
|
109
|
+
},
|
110
|
+
{
|
111
|
+
required: true,
|
112
|
+
label: "Target Country",
|
113
|
+
attribute: "targetCountry",
|
114
|
+
type: "select",
|
115
|
+
choises: [SOURCE_COUNTRY],
|
116
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
117
|
+
description: "The item's country of sale",
|
118
|
+
},
|
119
|
+
{
|
120
|
+
required: false,
|
121
|
+
label: "Adult",
|
122
|
+
attribute: "adult",
|
123
|
+
type: "select",
|
124
|
+
choises: [
|
125
|
+
{ label: "Yes", value: true },
|
126
|
+
{ label: "No", value: false },
|
127
|
+
],
|
128
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
129
|
+
description: 'Should be set to "Yes" if the item is targeted towards adults',
|
130
|
+
},
|
131
|
+
{
|
132
|
+
required: false,
|
133
|
+
label: "Age Group",
|
134
|
+
attribute: "ageGroup",
|
135
|
+
type: "select",
|
136
|
+
choises: [
|
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
|
+
],
|
143
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
144
|
+
description: "Target age group of the item",
|
145
|
+
},
|
146
|
+
{
|
147
|
+
required: false,
|
148
|
+
label: "Availability",
|
149
|
+
attribute: "availability",
|
150
|
+
type: "select",
|
151
|
+
choises: [
|
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
|
+
],
|
157
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
158
|
+
description: "Availability status of the item",
|
159
|
+
},
|
160
|
+
{
|
161
|
+
required: false,
|
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
|
+
choises: [
|
169
|
+
ShopifyProductSource.vendor,
|
170
|
+
SOURCE_VENDORS,
|
171
|
+
ShopifyProductSource.custom,
|
172
|
+
],
|
173
|
+
},
|
174
|
+
{
|
175
|
+
required: false,
|
176
|
+
label: "Gender",
|
177
|
+
attribute: "gender",
|
178
|
+
type: "select",
|
179
|
+
choises: [
|
180
|
+
{ label: "Male", value: "male" },
|
181
|
+
{ label: "Female", value: "female" },
|
182
|
+
{ label: "Unisex", value: "unisex" },
|
183
|
+
],
|
184
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
185
|
+
description: "Target gender of the item",
|
186
|
+
},
|
187
|
+
{
|
188
|
+
required: false,
|
189
|
+
label: "Google category",
|
190
|
+
attribute: "googleProductCategory",
|
191
|
+
type: "select",
|
192
|
+
choises: [SOURCE_GOOGLE_CATEGORY],
|
193
|
+
rules: ["title", "collection", "product_type", "vendor", "tag"],
|
194
|
+
description: "Google's category of the item",
|
195
|
+
},
|
196
|
+
{
|
197
|
+
required: false,
|
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
|
+
choises: [
|
205
|
+
ShopifyProductSource.barcode,
|
206
|
+
ShopifyProductSource.sku,
|
207
|
+
{ label: "Custom input", value: SOURCE_CUSTOM },
|
208
|
+
],
|
209
|
+
},
|
210
|
+
{
|
211
|
+
required: false,
|
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
|
+
choises: [
|
219
|
+
ShopifyProductSource.barcode,
|
220
|
+
ShopifyProductSource.sku,
|
221
|
+
{ label: "Custom input", value: SOURCE_CUSTOM },
|
222
|
+
],
|
223
|
+
},
|
224
|
+
{
|
225
|
+
required: false,
|
226
|
+
label: "Included Destinations",
|
227
|
+
attribute: "includedDestinations",
|
228
|
+
type: "multiselect",
|
229
|
+
choises: [
|
230
|
+
{ label: "Shopping ads", value: "Shopping_ads" },
|
231
|
+
{ label: "Dynamic remarketing ads", value: "Display_ads" },
|
232
|
+
{ label: "Free listings", value: "Free_listings" },
|
233
|
+
],
|
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
|
+
},
|
237
|
+
{
|
238
|
+
required: false,
|
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
|
+
},
|
245
|
+
// /**
|
246
|
+
// * The day a pre-ordered product becomes available for delivery, in ISO 8601 format.
|
247
|
+
// */
|
248
|
+
// availabilityDate?: string | null;
|
249
|
+
// /**
|
250
|
+
// * Color of the item.
|
251
|
+
// */
|
252
|
+
// color?: string | null;
|
253
|
+
// /**
|
254
|
+
// * Condition or state of the item.
|
255
|
+
// */
|
256
|
+
// condition?: string | null;
|
257
|
+
// /**
|
258
|
+
// * Custom label 0 for custom grouping of items in a Shopping campaign.
|
259
|
+
// */
|
260
|
+
// customLabel0?: string | null;
|
261
|
+
// /**
|
262
|
+
// * Custom label 1 for custom grouping of items in a Shopping campaign.
|
263
|
+
// */
|
264
|
+
// customLabel1?: string | null;
|
265
|
+
// /**
|
266
|
+
// * Custom label 2 for custom grouping of items in a Shopping campaign.
|
267
|
+
// */
|
268
|
+
// customLabel2?: string | null;
|
269
|
+
// /**
|
270
|
+
// * Custom label 3 for custom grouping of items in a Shopping campaign.
|
271
|
+
// */
|
272
|
+
// customLabel3?: string | null;
|
273
|
+
// /**
|
274
|
+
// * Custom label 4 for custom grouping of items in a Shopping campaign.
|
275
|
+
// */
|
276
|
+
// customLabel4?: string | null;
|
277
|
+
// /**
|
278
|
+
// * The date time when an offer becomes visible in search results across Google’s YouTube surfaces, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. See [Disclosure date](https://support.google.com/merchants/answer/13034208) for more information.
|
279
|
+
// */
|
280
|
+
// disclosureDate?: string | null;
|
281
|
+
// /**
|
282
|
+
// * Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in `productstatuses` as `googleExpirationDate` and might be earlier if `expirationDate` is too far in the future.
|
283
|
+
// */
|
284
|
+
// expirationDate?: string | null;
|
285
|
+
// /**
|
286
|
+
// * The material of which the item is made.
|
287
|
+
// */
|
288
|
+
// material?: string | null;
|
289
|
+
// /**
|
290
|
+
// * Maximal product handling time (in business days).
|
291
|
+
// */
|
292
|
+
// maxHandlingTime?: string | null;
|
293
|
+
// /**
|
294
|
+
// * Minimal product handling time (in business days).
|
295
|
+
// */
|
296
|
+
// minHandlingTime?: string | null;
|
297
|
+
// /**
|
298
|
+
// * The pick up option for the item. Acceptable values are: - "`buy`" - "`reserve`" - "`ship to store`" - "`not supported`"
|
299
|
+
// */
|
300
|
+
// pickupMethod?: string | null;
|
301
|
+
// /**
|
302
|
+
// * Item store pickup timeline. Acceptable values are: - "`same day`" - "`next day`" - "`2-day`" - "`3-day`" - "`4-day`" - "`5-day`" - "`6-day`" - "`7-day`" - "`multi-week`"
|
303
|
+
// */
|
304
|
+
// pickupSla?: string | null;
|
305
|
+
// /**
|
306
|
+
// * The height of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
|
307
|
+
// */
|
308
|
+
// productHeight?: Schema$ProductDimension;
|
309
|
+
// /**
|
310
|
+
// * The length of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
|
311
|
+
// */
|
312
|
+
// productLength?: Schema$ProductDimension;
|
313
|
+
// /**
|
314
|
+
// * The width of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
|
315
|
+
// */
|
316
|
+
// productWidth?: Schema$ProductDimension;
|
317
|
+
// /**
|
318
|
+
// * Shipping rules.
|
319
|
+
// */
|
320
|
+
// shipping?: Schema$ProductShipping[];
|
321
|
+
// /**
|
322
|
+
// * Height of the item for shipping.
|
323
|
+
// */
|
324
|
+
// shippingHeight?: Schema$ProductShippingDimension;
|
325
|
+
// /**
|
326
|
+
// * Length of the item for shipping.
|
327
|
+
// */
|
328
|
+
// shippingLength?: Schema$ProductShippingDimension;
|
329
|
+
// /**
|
330
|
+
// * Weight of the item for shipping.
|
331
|
+
// */
|
332
|
+
// shippingWeight?: Schema$ProductShippingWeight;
|
333
|
+
// /**
|
334
|
+
// * Width of the item for shipping.
|
335
|
+
// */
|
336
|
+
// shippingWidth?: Schema$ProductShippingDimension;
|
337
|
+
// /**
|
338
|
+
// * List of country codes (ISO 3166-1 alpha-2) to exclude the offer from Shopping Ads destination. Countries from this list are removed from countries configured in MC feed settings.
|
339
|
+
// */
|
340
|
+
// shoppingAdsExcludedCountries?: string[] | null;
|
341
|
+
// /**
|
342
|
+
// * Size of the item. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same `itemGroupId` value (see size definition).
|
343
|
+
// */
|
344
|
+
// sizes?: string[] | null;
|
345
|
+
// /**
|
346
|
+
// * System in which the size is specified. Recommended for apparel items.
|
347
|
+
// */
|
348
|
+
// sizeSystem?: string | null;
|
349
|
+
// /**
|
350
|
+
// * The cut of the item. Recommended for apparel items.
|
351
|
+
// */
|
352
|
+
// sizeType?: string | null;
|
353
|
+
];
|
354
|
+
export const CHANNEL = "online";
|
355
|
+
export const GMC_PRODUCT_ID_TEMPLATE = "{PRODUCT_ID}_{VARIANT_ID}";
|
356
|
+
//# sourceMappingURL=profile.constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"profile.constants.js","sourceRoot":"","sources":["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IAChC,MAAM;IACN,oQAAoQ;IACpQ,MAAM;IACN,kCAAkC;IAClC,MAAM;IACN,uQAAuQ;IACvQ,MAAM;IACN,kCAAkC;IAClC,MAAM;IACN,6CAA6C;IAC7C,MAAM;IACN,4BAA4B;IAC5B,MAAM;IACN,uDAAuD;IACvD,MAAM;IACN,mCAAmC;IACnC,MAAM;IACN,uDAAuD;IACvD,MAAM;IACN,mCAAmC;IACnC,MAAM;IACN,6HAA6H;IAC7H,MAAM;IACN,gCAAgC;IAChC,MAAM;IACN,+KAA+K;IAC/K,MAAM;IACN,6BAA6B;IAC7B,MAAM;IACN,oHAAoH;IACpH,MAAM;IACN,2CAA2C;IAC3C,MAAM;IACN,oHAAoH;IACpH,MAAM;IACN,2CAA2C;IAC3C,MAAM;IACN,mHAAmH;IACnH,MAAM;IACN,0CAA0C;IAC1C,MAAM;IACN,qBAAqB;IACrB,MAAM;IACN,uCAAuC;IACvC,MAAM;IACN,sCAAsC;IACtC,MAAM;IACN,oDAAoD;IACpD,MAAM;IACN,sCAAsC;IACtC,MAAM;IACN,oDAAoD;IACpD,MAAM;IACN,sCAAsC;IACtC,MAAM;IACN,iDAAiD;IACjD,MAAM;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"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"product.types.js","sourceRoot":"","sources":["../../src/common/types/product.types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"profile.types.js","sourceRoot":"","sources":["../../src/common/types/profile.types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { GMC_PRODUCT_ID_TEMPLATE } from '../constants/profile.constants.js';
|
2
|
+
export function isGmcProductId(productId) {
|
3
|
+
return new RegExp(GMC_PRODUCT_ID_TEMPLATE.replace('{PRODUCT_ID}', '\\d+').replace('{VARIANT_ID}', '\\d+')).test(productId);
|
4
|
+
}
|
5
|
+
export function GMCProductIdToShopify(productId) {
|
6
|
+
const [, , , id] = productId.split(':');
|
7
|
+
return Number(getProductIdFromGmcId(id));
|
8
|
+
}
|
9
|
+
export function GmcIdParts(gmcProductId) {
|
10
|
+
const [channel, locale, country, idPart] = gmcProductId.split(':');
|
11
|
+
if (!channel || !locale || !country || !idPart) {
|
12
|
+
throw new Error(`${gmcProductId} is not a valid GMC product id`);
|
13
|
+
}
|
14
|
+
return {
|
15
|
+
channel,
|
16
|
+
locale,
|
17
|
+
country,
|
18
|
+
idPart,
|
19
|
+
...getShopifyIdsFromGmcIdPart(idPart),
|
20
|
+
};
|
21
|
+
}
|
22
|
+
export function makeGmcIdPart(productId, variantId) {
|
23
|
+
return GMC_PRODUCT_ID_TEMPLATE.replace('{PRODUCT_ID}', String(productId)).replace('{VARIANT_ID}', String(variantId));
|
24
|
+
}
|
25
|
+
export function getShopifyIdsFromGmcIdPart(gmcId) {
|
26
|
+
if (!isGmcProductId(gmcId)) {
|
27
|
+
throw new Error(`${gmcId} is not a valid GMC product id part`);
|
28
|
+
}
|
29
|
+
const [productId, variantId] = gmcId.split('_');
|
30
|
+
return { shopifyId: Number(productId), shopifyVariantId: Number(variantId) };
|
31
|
+
}
|
32
|
+
export function getProductIdFromGmcId(gmcId) {
|
33
|
+
if (!isGmcProductId(gmcId)) {
|
34
|
+
throw new Error(`${gmcId} is not a valid GMC product id part`);
|
35
|
+
}
|
36
|
+
const [productId] = gmcId.split('_');
|
37
|
+
return Number(productId);
|
38
|
+
}
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S,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAE,KAAa;IAIvD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,gBAAgB,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAE,KAAa;IAClD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,CAAC"}
|
@@ -0,0 +1,229 @@
|
|
1
|
+
import { ProductUploadMappings } from '../constants/profile.constants.js';
|
2
|
+
import { code } from './utils.js';
|
3
|
+
export function checkRuleDuplication(rules) {
|
4
|
+
return rules
|
5
|
+
.map((r) => {
|
6
|
+
for (const rule of rules) {
|
7
|
+
if (r.id !== rule.id &&
|
8
|
+
r.attribute === rule.attribute &&
|
9
|
+
r.operator === rule.operator &&
|
10
|
+
r.value === rule.value) {
|
11
|
+
return r.id;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
return null;
|
15
|
+
})
|
16
|
+
.filter(Boolean);
|
17
|
+
}
|
18
|
+
export function checkRuleAlwaysness(rules) {
|
19
|
+
return rules
|
20
|
+
.map((r) => {
|
21
|
+
for (const rule of rules) {
|
22
|
+
if (isExlusive(r, rule)) {
|
23
|
+
return r.id;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
return null;
|
27
|
+
})
|
28
|
+
.filter(Boolean);
|
29
|
+
}
|
30
|
+
export function checkRuleDeadlocks(sections) {
|
31
|
+
let totalList = [];
|
32
|
+
for (let i = 0; i < sections.length; i++) {
|
33
|
+
const currentSection = sections[i];
|
34
|
+
const currentList = [];
|
35
|
+
for (let y = 0; y < sections.length; y++) {
|
36
|
+
if (i === y) {
|
37
|
+
continue;
|
38
|
+
}
|
39
|
+
from_start: for (const ruleA of currentSection.ruleItems) {
|
40
|
+
for (const ruleB of sections[y].ruleItems) {
|
41
|
+
if (isExlusive(ruleA, ruleB)) {
|
42
|
+
currentList.push(ruleA.id);
|
43
|
+
continue from_start;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
if (currentList.length === currentSection.ruleItems.length) {
|
49
|
+
totalList = [...totalList, ...currentList];
|
50
|
+
}
|
51
|
+
}
|
52
|
+
return totalList;
|
53
|
+
}
|
54
|
+
function isExlusive(rule1, rule2) {
|
55
|
+
return (rule1.id !== rule2.id &&
|
56
|
+
rule1.attribute === rule2.attribute &&
|
57
|
+
rule1.operator ===
|
58
|
+
getOperatorCounterpart(rule2.operator) &&
|
59
|
+
rule1.value === rule2.value);
|
60
|
+
}
|
61
|
+
function getOperatorCounterpart(operator) {
|
62
|
+
switch (operator) {
|
63
|
+
case 'equals':
|
64
|
+
return 'notEquals';
|
65
|
+
case 'notEquals':
|
66
|
+
return 'equals';
|
67
|
+
case 'contains':
|
68
|
+
return 'notContains';
|
69
|
+
case 'notContains':
|
70
|
+
return 'contains';
|
71
|
+
case 'startsWith':
|
72
|
+
return 'notStartsWith';
|
73
|
+
case 'notStartsWith':
|
74
|
+
return 'startsWith';
|
75
|
+
case 'endsWith':
|
76
|
+
return 'notEndsWith';
|
77
|
+
case 'notEndsWith':
|
78
|
+
return 'endsWith';
|
79
|
+
case 'in':
|
80
|
+
return 'notIn';
|
81
|
+
case 'notIn':
|
82
|
+
return 'in';
|
83
|
+
default:
|
84
|
+
throw new Error(`Unknown operator ${String(operator)}`);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
export function getEmptyRuleItem(attribute = '') {
|
88
|
+
return { attribute, operator: '', value: '', id: code() };
|
89
|
+
}
|
90
|
+
export function sortMappings(a, b) {
|
91
|
+
if (!a.attribute) {
|
92
|
+
return 1;
|
93
|
+
}
|
94
|
+
if (!b.attribute) {
|
95
|
+
return -1;
|
96
|
+
}
|
97
|
+
const sourceA = ProductUploadMappings.find((m) => m.attribute === a.attribute);
|
98
|
+
const sourceB = ProductUploadMappings.find((m) => m.attribute === b.attribute);
|
99
|
+
if (sourceA?.required && !sourceB?.required) {
|
100
|
+
return -1;
|
101
|
+
}
|
102
|
+
if (sourceB?.required && !sourceA?.required) {
|
103
|
+
return 1;
|
104
|
+
}
|
105
|
+
if (a.attribute < b.attribute) {
|
106
|
+
return -1;
|
107
|
+
}
|
108
|
+
if (a.attribute > b.attribute) {
|
109
|
+
return 1;
|
110
|
+
}
|
111
|
+
return 0;
|
112
|
+
}
|
113
|
+
export function hasRules(rules) {
|
114
|
+
return (Array.isArray(rules?.sections) &&
|
115
|
+
rules.sections.some((section) => section.ruleItems.length > 0));
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Checks if two rules are the same
|
119
|
+
* @param a
|
120
|
+
* @param b
|
121
|
+
* @returns
|
122
|
+
*/
|
123
|
+
export function compareRules(a = { sections: [] }, b = { sections: [] }) {
|
124
|
+
const matchedSections = [];
|
125
|
+
const sameRule = (rA, rB) => {
|
126
|
+
return (rA.attribute === rB.attribute &&
|
127
|
+
rA.operator === rB.operator &&
|
128
|
+
compareValues(rA.value, rB.value));
|
129
|
+
};
|
130
|
+
a.sections = a.sections.filter((s) => s.ruleItems.length > 0);
|
131
|
+
b.sections = b.sections.filter((s) => s.ruleItems.length > 0);
|
132
|
+
if (a.sections.length !== b.sections.length) {
|
133
|
+
return false;
|
134
|
+
}
|
135
|
+
for (let i = 0; i < a.sections.length; i++) {
|
136
|
+
const rulesA = a.sections[i].ruleItems;
|
137
|
+
for (let j = 0; j < b.sections.length; j++) {
|
138
|
+
if (matchedSections.includes(j)) {
|
139
|
+
continue;
|
140
|
+
}
|
141
|
+
const rulesB = b.sections[j].ruleItems;
|
142
|
+
if (rulesA.length !== rulesB.length) {
|
143
|
+
continue;
|
144
|
+
}
|
145
|
+
if (rulesA.every((ruleA) => rulesB.some((ruleB) => sameRule(ruleA, ruleB)))) {
|
146
|
+
matchedSections.push(j);
|
147
|
+
break;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
return matchedSections.length === a.sections.length;
|
152
|
+
}
|
153
|
+
function compareValues(a, b) {
|
154
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
155
|
+
return a.length === b.length && a.every((i) => b.includes(i));
|
156
|
+
}
|
157
|
+
return a === b;
|
158
|
+
}
|
159
|
+
export function compareMappings(a, b) {
|
160
|
+
const matchedMappings = [];
|
161
|
+
if (a.length !== b.length) {
|
162
|
+
return false;
|
163
|
+
}
|
164
|
+
for (let i = 0; i < a.length; i++) {
|
165
|
+
const mappingA = a[i];
|
166
|
+
for (let j = 0; j < b.length; j++) {
|
167
|
+
if (matchedMappings.includes(j)) {
|
168
|
+
continue;
|
169
|
+
}
|
170
|
+
const mappingB = b[j];
|
171
|
+
if (mappingA.attribute === mappingB.attribute &&
|
172
|
+
compareValues(mappingA.value, mappingB.value) &&
|
173
|
+
compareRules(mappingA.rules, mappingB.rules)) {
|
174
|
+
matchedMappings.push(j);
|
175
|
+
break;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
return matchedMappings.length === a.length;
|
180
|
+
}
|
181
|
+
export function optionIsString(option) {
|
182
|
+
return typeof option === 'string';
|
183
|
+
}
|
184
|
+
export function optionIsItem(option) {
|
185
|
+
return typeof option !== 'string' && 'value' in option;
|
186
|
+
}
|
187
|
+
export function optionIsGroup(option) {
|
188
|
+
return typeof option !== 'string' && 'options' in option;
|
189
|
+
}
|
190
|
+
export function detectProfileChange(a, b) {
|
191
|
+
const changes = {
|
192
|
+
name: false,
|
193
|
+
rules: false,
|
194
|
+
mappings: false,
|
195
|
+
id: false,
|
196
|
+
};
|
197
|
+
if (a.name !== b.name) {
|
198
|
+
changes.name = true;
|
199
|
+
}
|
200
|
+
if (a.mappings !== b.mappings) {
|
201
|
+
const mappingsA = a.mappings?.filter((m) => m.attribute !== 'targetCountry' && m.attribute !== 'contentLanguage');
|
202
|
+
const mappingsB = b.mappings?.filter((m) => m.attribute !== 'targetCountry' && m.attribute !== 'contentLanguage');
|
203
|
+
changes.mappings = !compareMappings(mappingsA, mappingsB);
|
204
|
+
}
|
205
|
+
if (['targetCountry', 'contentLanguage'].some((key) => {
|
206
|
+
const mappingA = a.mappings?.filter((m) => m.attribute === key) ?? [];
|
207
|
+
const mappingB = b.mappings?.filter((m) => m.attribute === key) ?? [];
|
208
|
+
return !compareMappings(mappingA, mappingB);
|
209
|
+
})) {
|
210
|
+
changes.id = true;
|
211
|
+
}
|
212
|
+
if (!compareRules(a.rules, b.rules)) {
|
213
|
+
changes.rules = true;
|
214
|
+
}
|
215
|
+
return changes;
|
216
|
+
}
|
217
|
+
export function sanitizeUploadProfile(profile) {
|
218
|
+
if (profile.rules?.sections) {
|
219
|
+
profile.rules.sections = profile.rules.sections.filter((section) => section.ruleItems.length > 0);
|
220
|
+
}
|
221
|
+
profile.mappings = profile.mappings?.map((mapping) => {
|
222
|
+
if (mapping.rules?.sections) {
|
223
|
+
mapping.rules.sections = mapping.rules.sections.filter((section) => section.ruleItems.length > 0);
|
224
|
+
}
|
225
|
+
return mapping;
|
226
|
+
});
|
227
|
+
return profile;
|
228
|
+
}
|
229
|
+
//# sourceMappingURL=profile.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/common/utils/profile.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,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jB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/common/utils/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI;IAClB,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
package/package.json
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"name": "feed-common",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "Maxify feed common library",
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"type": "module",
|
7
|
+
"scripts": {
|
8
|
+
"build": "tsc"
|
9
|
+
},
|
10
|
+
"devDependencies": {
|
11
|
+
"@semantic-release/changelog": "^6.0.1",
|
12
|
+
"@semantic-release/commit-analyzer": "^9.0.2",
|
13
|
+
"@semantic-release/git": "^10.0.1",
|
14
|
+
"@semantic-release/github": "^8.0.4",
|
15
|
+
"@semantic-release/npm": "^9.0.1",
|
16
|
+
"@semantic-release/release-notes-generator": "^10.0.3",
|
17
|
+
"@tsconfig/node16": "^1.0.2",
|
18
|
+
"@types/express": "^4.17.13",
|
19
|
+
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
20
|
+
"@typescript-eslint/parser": "^5.18.0",
|
21
|
+
"semantic-release": "^19.0.5",
|
22
|
+
"typescript": "^5.3.3"
|
23
|
+
},
|
24
|
+
"repository": {
|
25
|
+
"type": "git",
|
26
|
+
"url": "git+https://github.com/advertikon/package-maxify-feed-common.git"
|
27
|
+
},
|
28
|
+
"author": "Maxim Bogochunas",
|
29
|
+
"license": "ISC",
|
30
|
+
"bugs": {
|
31
|
+
"url": "https://github.com/advertikon/package-maxify-feed-common/issues"
|
32
|
+
},
|
33
|
+
"homepage": "https://github.com/advertikon/package-maxify-feed-common#readme"
|
34
|
+
}
|