feed-common 0.0.1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.releaserc.json +33 -0
- package/CHANGELOG.md +23 -0
- package/dist/constants/google.constants.d.ts +11 -0
- package/dist/constants/google.constants.js.map +1 -1
- package/dist/constants/product.constants.d.ts +4 -0
- package/dist/constants/product.constants.js.map +1 -1
- package/dist/constants/profile.constants.d.ts +69 -0
- package/dist/constants/profile.constants.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/types/company.types.d.ts +9 -0
- package/dist/types/company.types.js +2 -0
- package/dist/types/company.types.js.map +1 -0
- package/dist/types/product.types.d.ts +86 -0
- package/dist/types/product.types.js.map +1 -1
- package/dist/types/profile.types.d.ts +68 -0
- package/dist/types/profile.types.js.map +1 -1
- package/dist/utils/gmc.d.ts +16 -0
- package/dist/utils/gmc.js.map +1 -1
- package/dist/utils/profile.d.ts +28 -0
- package/dist/utils/profile.js.map +1 -1
- package/dist/utils/utils.d.ts +1 -0
- package/dist/utils/utils.js.map +1 -1
- package/package.json +4 -2
- package/scripts/install.sh +9 -0
- package/src/constants/google.constants.ts +12 -0
- package/src/constants/product.constants.ts +4 -0
- package/src/constants/profile.constants.ts +369 -0
- package/src/index.ts +11 -0
- package/src/types/company.types.ts +10 -0
- package/src/types/product.types.ts +97 -0
- package/src/types/profile.types.ts +73 -0
- package/src/utils/gmc.ts +69 -0
- package/src/utils/profile.ts +348 -0
- package/src/utils/utils.ts +3 -0
- package/.releaserc +0 -10
- package/dist/google.constants.js +0 -14
- package/dist/google.constants.js.map +0 -1
- package/dist/product.constants.js +0 -6
- package/dist/product.constants.js.map +0 -1
- package/dist/profile.constants.js +0 -356
- package/dist/profile.constants.js.map +0 -1
package/.releaserc.json
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
{
|
2
|
+
"branches": ["master", "main"],
|
3
|
+
"repositoryUrl": "https://github.com/advertikon/package-maxify-feed-common",
|
4
|
+
"plugins": [
|
5
|
+
"@semantic-release/commit-analyzer",
|
6
|
+
"@semantic-release/npm",
|
7
|
+
"@semantic-release/changelog",
|
8
|
+
"@semantic-release/release-notes-generator",
|
9
|
+
"@semantic-release/git",
|
10
|
+
"@semantic-release/github",
|
11
|
+
[
|
12
|
+
"semantic-release-slack-bot",
|
13
|
+
{
|
14
|
+
"notifyOnSuccess": false,
|
15
|
+
"notifyOnFail": false,
|
16
|
+
"packageName": "Feed/common lib",
|
17
|
+
"markdownReleaseNotes": true,
|
18
|
+
"branchesConfig": [
|
19
|
+
{
|
20
|
+
"pattern": "master",
|
21
|
+
"notifyOnSuccess": true,
|
22
|
+
"notifyOnFail": true
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"pattern": "main",
|
26
|
+
"notifyOnSuccess": true,
|
27
|
+
"notifyOnFail": true
|
28
|
+
}
|
29
|
+
]
|
30
|
+
}
|
31
|
+
]
|
32
|
+
]
|
33
|
+
}
|
package/CHANGELOG.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
## [1.0.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.0.0...v1.0.1) (2024-01-30)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add company types ([cd62d4d](https://github.com/advertikon/package-maxify-feed-common/commit/cd62d4d762b6afd72279426f42fab34eefce1bc0))
|
7
|
+
* add type definitions ([8f5d33f](https://github.com/advertikon/package-maxify-feed-common/commit/8f5d33f69a5f65772fdc0f1ba7bb543ff0f88afe))
|
8
|
+
* fix ci ([6444435](https://github.com/advertikon/package-maxify-feed-common/commit/6444435746003edbebe340a258f9c9c5b1639289))
|
9
|
+
|
10
|
+
# 1.0.0 (2024-01-28)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* add semantic release slack module ([47c555a](https://github.com/advertikon/package-maxify-feed-common/commit/47c555a2e5532d76d1e65af56214339440eb9ef8))
|
16
|
+
* fix ([756da52](https://github.com/advertikon/package-maxify-feed-common/commit/756da52637f6deb0bd27639257bfd9a34f72b3bd))
|
17
|
+
* fix envs ([26454af](https://github.com/advertikon/package-maxify-feed-common/commit/26454afe5fad63e1991b7dcb19e1e0d522f2c748))
|
18
|
+
* fix permissions ([673486e](https://github.com/advertikon/package-maxify-feed-common/commit/673486e3bd28d4186d61d5dbca824c4b511a28f4))
|
19
|
+
|
20
|
+
|
21
|
+
### Features
|
22
|
+
|
23
|
+
* first commit ([2456ffd](https://github.com/advertikon/package-maxify-feed-common/commit/2456ffd7474a62587573367f56d44d0bd9442604))
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export declare enum GmcProductSyncStatus {
|
2
|
+
REJECTED = "rejected",
|
3
|
+
APPROVED = "approved",
|
4
|
+
WARINING = "warning",
|
5
|
+
SYNC_SHEDULED = "sync_sheduled"
|
6
|
+
}
|
7
|
+
export declare enum GoogleAccountStatus {
|
8
|
+
ENABLED = "ENABLED",
|
9
|
+
REMOVED = "REMOVED",
|
10
|
+
REJECTED = "REJECTED"
|
11
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"google.constants.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"google.constants.js","sourceRoot":"","sources":["../../src/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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"product.constants.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"product.constants.js","sourceRoot":"","sources":["../../src/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,69 @@
|
|
1
|
+
import { ProductUploadMapSource } from '../types/profile.types.js';
|
2
|
+
import { ProductUploadRuleFilterType } from '../types/profile.types.js';
|
3
|
+
export declare const SOURCE_VENDORS = "source.vendor";
|
4
|
+
export declare const SOURCE_TAGS = "source.tag";
|
5
|
+
export declare const SOURCE_PORODUCT_TYPE = "source.product_type";
|
6
|
+
export declare const SOURCE_COLLECTIONS = "source.collection";
|
7
|
+
export declare const SOURCE_LANGUAGE = "source.language";
|
8
|
+
export declare const SOURCE_GOOGLE_CATEGORY = "source.google_category";
|
9
|
+
export declare const SOURCE_COUNTRY = "source.country";
|
10
|
+
export declare const SOURCE_SHOPIFY_VENDORS = "shopify.vendor";
|
11
|
+
export declare const SOURCE_SHOPIFY_BARCODE = "shopify.barcode";
|
12
|
+
export declare const SOURCE_SHOPIFY_SKU = "shopify.sku";
|
13
|
+
export declare const SOURCE_CUSTOM = "custom_input";
|
14
|
+
export declare const RuleOperators: {
|
15
|
+
contains: {
|
16
|
+
label: string;
|
17
|
+
value: string;
|
18
|
+
};
|
19
|
+
notContains: {
|
20
|
+
label: string;
|
21
|
+
value: string;
|
22
|
+
};
|
23
|
+
equals: {
|
24
|
+
label: string;
|
25
|
+
value: string;
|
26
|
+
};
|
27
|
+
notEquals: {
|
28
|
+
label: string;
|
29
|
+
value: string;
|
30
|
+
};
|
31
|
+
startsWith: {
|
32
|
+
label: string;
|
33
|
+
value: string;
|
34
|
+
};
|
35
|
+
notStartsWith: {
|
36
|
+
label: string;
|
37
|
+
value: string;
|
38
|
+
};
|
39
|
+
endsWith: {
|
40
|
+
label: string;
|
41
|
+
value: string;
|
42
|
+
};
|
43
|
+
notEndsWith: {
|
44
|
+
label: string;
|
45
|
+
value: string;
|
46
|
+
};
|
47
|
+
in: {
|
48
|
+
label: string;
|
49
|
+
value: string;
|
50
|
+
};
|
51
|
+
notIn: {
|
52
|
+
label: string;
|
53
|
+
value: string;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
export declare const PruoductUploadRulesOperators: {
|
57
|
+
string: {
|
58
|
+
label: string;
|
59
|
+
value: string;
|
60
|
+
}[];
|
61
|
+
list: {
|
62
|
+
label: string;
|
63
|
+
value: string;
|
64
|
+
}[];
|
65
|
+
};
|
66
|
+
export declare const ProductUploadRuleFilters: ProductUploadRuleFilterType[];
|
67
|
+
export declare const ProductUploadMappings: ProductUploadMapSource[];
|
68
|
+
export declare const CHANNEL = "online";
|
69
|
+
export declare const GMC_PRODUCT_ID_TEMPLATE = "{PRODUCT_ID}_{VARIANT_ID}";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"profile.constants.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"profile.constants.js","sourceRoot":"","sources":["../../src/constants/profile.constants.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAC1D,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;AAEh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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"}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
export * from './constants/google.constants.js';
|
2
|
+
export * from './constants/product.constants.js';
|
3
|
+
export * from './constants/profile.constants.js';
|
4
|
+
export * from './types/product.types.js';
|
5
|
+
export * from './types/profile.types.js';
|
6
|
+
export * from './types/company.types.js';
|
7
|
+
export * from './utils/gmc.js';
|
8
|
+
export * from './utils/profile.js';
|
9
|
+
export * from './utils/utils.js';
|
package/dist/index.js
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
export * from './constants/google.constants.js';
|
2
|
+
export * from './constants/product.constants.js';
|
3
|
+
export * from './constants/profile.constants.js';
|
4
|
+
export * from './types/product.types.js';
|
5
|
+
export * from './types/profile.types.js';
|
6
|
+
export * from './types/company.types.js';
|
7
|
+
export * from './utils/gmc.js';
|
8
|
+
export * from './utils/profile.js';
|
9
|
+
export * from './utils/utils.js';
|
10
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"company.types.js","sourceRoot":"","sources":["../../src/types/company.types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import { GmcProductSyncStatus } from '../constants/google.constants.js';
|
2
|
+
import { ProductSyncStatus } from '../constants/product.constants.js';
|
3
|
+
export type AppProductStatus = 'active' | 'draft' | 'archived';
|
4
|
+
export type AppProductVariant = {
|
5
|
+
id: number;
|
6
|
+
title: string;
|
7
|
+
price: string;
|
8
|
+
sku: string | null;
|
9
|
+
image_id: number | null;
|
10
|
+
};
|
11
|
+
export type GmcProductId = {
|
12
|
+
id: string;
|
13
|
+
profileId: string;
|
14
|
+
gmcAccount: string;
|
15
|
+
uploaded_at: string;
|
16
|
+
status?: GmcProductSyncStatus;
|
17
|
+
};
|
18
|
+
export type GoogleProductIssue = {
|
19
|
+
servability?: 'demoted' | 'disapproved' | 'unaffected' | string;
|
20
|
+
description?: string;
|
21
|
+
documentation?: string;
|
22
|
+
};
|
23
|
+
export type gmcIssue = {
|
24
|
+
gmcProductId: string;
|
25
|
+
gmcAccount: string;
|
26
|
+
updated_at: string;
|
27
|
+
issue: GoogleProductIssue[];
|
28
|
+
};
|
29
|
+
export type ShopifyCollection = {
|
30
|
+
id: number;
|
31
|
+
handle: string;
|
32
|
+
title: string;
|
33
|
+
};
|
34
|
+
export type AppProduct = {
|
35
|
+
status: AppProductStatus;
|
36
|
+
handle: string;
|
37
|
+
title: string;
|
38
|
+
category?: string;
|
39
|
+
id: number;
|
40
|
+
googleCategory?: number;
|
41
|
+
image?: string;
|
42
|
+
_id: string;
|
43
|
+
gmcIssues?: gmcIssue[];
|
44
|
+
gmcProductId?: GmcProductId[];
|
45
|
+
updated_at: string;
|
46
|
+
variants: AppProductVariant[];
|
47
|
+
images: {
|
48
|
+
src: string;
|
49
|
+
id: string;
|
50
|
+
}[];
|
51
|
+
collections: ShopifyCollection[];
|
52
|
+
tags: string[];
|
53
|
+
vendor: string;
|
54
|
+
product_type: string;
|
55
|
+
syncStatus: ProductSyncStatus;
|
56
|
+
};
|
57
|
+
export type GetProductsQuery = {
|
58
|
+
before?: string;
|
59
|
+
after?: string;
|
60
|
+
limit?: number;
|
61
|
+
handle?: string;
|
62
|
+
title?: string;
|
63
|
+
id?: number[];
|
64
|
+
sortField?: 'title' | 'id';
|
65
|
+
sort?: 'asc' | 'desc';
|
66
|
+
fields?: string[];
|
67
|
+
gmcProductId?: string[] | boolean;
|
68
|
+
};
|
69
|
+
export type GetProductsResponse = {
|
70
|
+
products: AppProduct[];
|
71
|
+
pagination: {
|
72
|
+
firstId: string;
|
73
|
+
lastId: string;
|
74
|
+
hasMore: boolean;
|
75
|
+
hasLess: boolean;
|
76
|
+
};
|
77
|
+
};
|
78
|
+
export type ProductsList = {
|
79
|
+
ids: string[];
|
80
|
+
};
|
81
|
+
export type UploadProductBulkPayload = {
|
82
|
+
collections: string[];
|
83
|
+
vendors: string[];
|
84
|
+
types: string[];
|
85
|
+
tags: string[];
|
86
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"product.types.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"product.types.js","sourceRoot":"","sources":["../../src/types/product.types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { ProductUploadRuleFilters, ProductUploadMappings } from '../constants/profile.constants.js';
|
2
|
+
import { RuleOperators } from '../constants/profile.constants.js';
|
3
|
+
export type ProductUploadRuleOpratorType = {
|
4
|
+
label: string;
|
5
|
+
value: string;
|
6
|
+
};
|
7
|
+
export type ProductUploadRuleFilterType = {
|
8
|
+
label: string;
|
9
|
+
operators: ProductUploadRuleOpratorType[];
|
10
|
+
value: string;
|
11
|
+
disabled?: boolean;
|
12
|
+
};
|
13
|
+
export type RuleOperatorsType = typeof RuleOperators;
|
14
|
+
export type ValueType = string | string[] | number[] | number | boolean;
|
15
|
+
export type OptionTypeItem = {
|
16
|
+
label: string;
|
17
|
+
value: ValueType;
|
18
|
+
};
|
19
|
+
export type OptionTypeGroup = {
|
20
|
+
title: string;
|
21
|
+
options: OptionTypeItem[];
|
22
|
+
};
|
23
|
+
export type OptionType = OptionTypeItem | OptionTypeGroup | string;
|
24
|
+
export type ProductUploadMapSource = {
|
25
|
+
required: boolean;
|
26
|
+
label: string;
|
27
|
+
attribute: string;
|
28
|
+
type: 'select' | 'multiselect' | 'text' | 'number';
|
29
|
+
choises?: OptionType[];
|
30
|
+
rules: ProductUploadRuleFilterType['value'][];
|
31
|
+
description?: string;
|
32
|
+
defaultValue?: ValueType;
|
33
|
+
};
|
34
|
+
export type ProductUploadMapping = {
|
35
|
+
attribute: MappingFields;
|
36
|
+
value: ValueType;
|
37
|
+
rules: {
|
38
|
+
sections: {
|
39
|
+
ruleItems: {
|
40
|
+
attribute: (typeof ProductUploadRuleFilters)[number]['value'];
|
41
|
+
operator: ProductUploadRuleOpratorType['value'];
|
42
|
+
value: string | string[] | number[] | number | boolean;
|
43
|
+
id: string;
|
44
|
+
}[];
|
45
|
+
}[];
|
46
|
+
};
|
47
|
+
};
|
48
|
+
type MappingFields = (typeof ProductUploadMappings)[number]['attribute'];
|
49
|
+
export type ProductUploadProfile = {
|
50
|
+
id: string;
|
51
|
+
name: string;
|
52
|
+
active?: boolean;
|
53
|
+
rules: ProductUploadRules;
|
54
|
+
mappings: ProductUploadMapping[];
|
55
|
+
};
|
56
|
+
export type ProductUploadRules = {
|
57
|
+
sections: ProductUploadRuleSection[];
|
58
|
+
};
|
59
|
+
export type ProductUploadRuleSection = {
|
60
|
+
ruleItems: ProductUploadRuleItem[];
|
61
|
+
};
|
62
|
+
export type ProductUploadRuleItem = {
|
63
|
+
id: string;
|
64
|
+
attribute: string;
|
65
|
+
operator: string;
|
66
|
+
value: string | number | string[] | number[] | boolean;
|
67
|
+
};
|
68
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"profile.types.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"profile.types.js","sourceRoot":"","sources":["../../src/types/profile.types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export declare function isGmcProductId(productId: string): boolean;
|
2
|
+
export declare function GMCProductIdToShopify(productId: string): number;
|
3
|
+
export declare function GmcIdParts(gmcProductId: string): {
|
4
|
+
channel: string;
|
5
|
+
locale: string;
|
6
|
+
country: string;
|
7
|
+
idPart: string;
|
8
|
+
shopifyId: number;
|
9
|
+
shopifyVariantId: number;
|
10
|
+
};
|
11
|
+
export declare function makeGmcIdPart(productId: number | null, variantId: number | null): string;
|
12
|
+
export declare function getShopifyIdsFromGmcIdPart(gmcId: string): {
|
13
|
+
shopifyId: number;
|
14
|
+
shopifyVariantId: number;
|
15
|
+
};
|
16
|
+
export declare function getProductIdFromGmcId(gmcId: string): number;
|
package/dist/utils/gmc.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gmc.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"gmc.js","sourceRoot":"","sources":["../../src/utils/gmc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,MAAM,UAAU,cAAc,CAAE,SAAiB;IAC/C,OAAO,IAAI,MAAM,CACf,uBAAuB,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,OAAO,CAC7D,cAAc,EACd,MAAM,CACP,CACF,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAE,SA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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,28 @@
|
|
1
|
+
import { OptionType, OptionTypeItem, OptionTypeGroup, ProductUploadProfile } from '../types/profile.types.js';
|
2
|
+
import { ProductUploadMapping } from '../types/profile.types.js';
|
3
|
+
import { ProductUploadRuleFilterType } from '../types/profile.types.js';
|
4
|
+
import { ProductUploadRuleItem, ProductUploadRuleSection, ProductUploadRules } from '../types/profile.types.js';
|
5
|
+
export declare function checkRuleDuplication(rules: ProductUploadRuleItem[]): string[];
|
6
|
+
export declare function checkRuleAlwaysness(rules: ProductUploadRuleItem[]): string[];
|
7
|
+
export declare function checkRuleDeadlocks(sections: ProductUploadRuleSection[]): string[];
|
8
|
+
export declare function getEmptyRuleItem(attribute?: ProductUploadRuleFilterType['value']): ProductUploadRuleItem;
|
9
|
+
export declare function sortMappings(a: ProductUploadMapping, b: ProductUploadMapping): number;
|
10
|
+
export declare function hasRules(rules: ProductUploadRules): boolean;
|
11
|
+
/**
|
12
|
+
* Checks if two rules are the same
|
13
|
+
* @param a
|
14
|
+
* @param b
|
15
|
+
* @returns
|
16
|
+
*/
|
17
|
+
export declare function compareRules(a?: ProductUploadRules, b?: ProductUploadRules): boolean;
|
18
|
+
export declare function compareMappings(a: ProductUploadMapping[], b: ProductUploadMapping[]): boolean;
|
19
|
+
export declare function optionIsString(option: OptionType): option is string;
|
20
|
+
export declare function optionIsItem(option: OptionType): option is OptionTypeItem;
|
21
|
+
export declare function optionIsGroup(option: OptionType): option is OptionTypeGroup;
|
22
|
+
export declare function detectProfileChange(a: ProductUploadProfile, b: ProductUploadProfile): {
|
23
|
+
name: boolean;
|
24
|
+
rules: boolean;
|
25
|
+
mappings: boolean;
|
26
|
+
id: boolean;
|
27
|
+
};
|
28
|
+
export declare function sanitizeUploadProfile(profile: ProductUploadProfile): ProductUploadProfile;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/utils/profile.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAW1E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,UAAU,oBAAoB,CAAE,KAA8B;IAClE,OAAO,KAAK;SACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IACE,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE;gBAChB,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS;gBAC9B,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ;gBAC5B,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,EACtB,CAAC;gBACD,OAAO,CAAC,CAAC,EAAE,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAa,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAE,KAA8B;IACjE,OAAO,KAAK;SACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC;gBACxB,OAAO,CAAC,CAAC,EAAE,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;SACD,MAAM,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C,CAAC,OAAO,EAAE,EAAE;QACnD,IAAI,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC;YAC5B,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CACpD,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAC1C,CAAC;QACJ,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function code(): string;
|
package/dist/utils/utils.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/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
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "feed-common",
|
3
|
-
"version": "
|
3
|
+
"version": "1.0.1",
|
4
4
|
"description": "Maxify feed common library",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"type": "module",
|
7
7
|
"scripts": {
|
8
|
-
"build": "tsc"
|
8
|
+
"build": "tsc",
|
9
|
+
"install-local": "scripts/install.sh"
|
9
10
|
},
|
10
11
|
"devDependencies": {
|
11
12
|
"@semantic-release/changelog": "^6.0.1",
|
@@ -19,6 +20,7 @@
|
|
19
20
|
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
20
21
|
"@typescript-eslint/parser": "^5.18.0",
|
21
22
|
"semantic-release": "^19.0.5",
|
23
|
+
"semantic-release-slack-bot": "^4.0.2",
|
22
24
|
"typescript": "^5.3.3"
|
23
25
|
},
|
24
26
|
"repository": {
|
@@ -0,0 +1,9 @@
|
|
1
|
+
rm -R /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/dist/
|
2
|
+
rm -R /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/src/
|
3
|
+
cp -R dist/ /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/
|
4
|
+
cp -R src/ /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/
|
5
|
+
|
6
|
+
rm -R /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/dist/
|
7
|
+
rm -R /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/src/
|
8
|
+
cp -R dist/ /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/
|
9
|
+
cp -R src/ /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export enum GmcProductSyncStatus {
|
2
|
+
REJECTED = 'rejected',
|
3
|
+
APPROVED = 'approved',
|
4
|
+
WARINING = 'warning',
|
5
|
+
SYNC_SHEDULED = 'sync_sheduled',
|
6
|
+
}
|
7
|
+
|
8
|
+
export enum GoogleAccountStatus {
|
9
|
+
ENABLED = 'ENABLED',
|
10
|
+
REMOVED = 'REMOVED',
|
11
|
+
REJECTED = 'REJECTED',
|
12
|
+
}
|