feed-common 1.10.6 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [1.11.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.10.6...v1.11.0) (2024-06-03)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* add ID to rule section ([b421d3d](https://github.com/advertikon/package-maxify-feed-common/commit/b421d3d51177580ae067a860fcb1b2abd2492cfa))
|
7
|
+
|
1
8
|
## [1.10.6](https://github.com/advertikon/package-maxify-feed-common/compare/v1.10.5...v1.10.6) (2024-05-26)
|
2
9
|
|
3
10
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ProductUploadMappings, RuleOperators } from '../constants/profile.constants.js';
|
2
2
|
export type SelectItem = {
|
3
3
|
label: string;
|
4
4
|
value: string;
|
@@ -35,16 +35,7 @@ export type ProductUploadMapSource = {
|
|
35
35
|
export type ProductUploadMapping = {
|
36
36
|
attribute: MappingFields;
|
37
37
|
value: ValueType;
|
38
|
-
rules:
|
39
|
-
sections: {
|
40
|
-
ruleItems: {
|
41
|
-
attribute: (typeof ProductUploadRuleFilters)[number]['value'];
|
42
|
-
operator: ProductUploadRuleOperatorType['value'];
|
43
|
-
value: string | string[] | number[] | number | boolean;
|
44
|
-
id: string;
|
45
|
-
}[];
|
46
|
-
}[];
|
47
|
-
};
|
38
|
+
rules: ProductUploadRules;
|
48
39
|
};
|
49
40
|
type MappingFields = (typeof ProductUploadMappings)[number]['attribute'];
|
50
41
|
export type ProductUploadProfile = {
|
@@ -59,6 +50,7 @@ export type ProductUploadRules = {
|
|
59
50
|
sections: ProductUploadRuleSection[];
|
60
51
|
};
|
61
52
|
export type ProductUploadRuleSection = {
|
53
|
+
id: string;
|
62
54
|
ruleItems: ProductUploadRuleItem[];
|
63
55
|
};
|
64
56
|
export type ProductUploadRuleItem = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"profile.types.d.ts","sourceRoot":"","sources":["../../src/types/profile.types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"profile.types.d.ts","sourceRoot":"","sources":["../../src/types/profile.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEzF,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC;AAEvD,MAAM,MAAM,2BAA2B,GAAG;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,6BAA6B,EAAE,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,OAAO,aAAa,CAAC;AACrD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,OAAO,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC;AAC3E,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,eAAe,GAAG,MAAM,CAAC;AACnE,MAAM,MAAM,sBAAsB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,GAAG,aAAa,GAAG,MAAM,GAAG,QAAQ,CAAC;IACnD,OAAO,CAAC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
import { ProductUploadMappings, RuleOperators } from '../constants/profile.constants.js';
|
6
2
|
|
7
3
|
export type SelectItem = { label: string; value: string };
|
8
4
|
|
9
5
|
export type ProductUploadRuleOperatorType = SelectItem;
|
10
6
|
|
11
7
|
export type ProductUploadRuleFilterType = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
label: string;
|
9
|
+
operators: ProductUploadRuleOperatorType[];
|
10
|
+
value: string;
|
11
|
+
disabled?: boolean;
|
12
|
+
values?: SelectItem[];
|
17
13
|
};
|
18
14
|
|
19
15
|
export type RuleOperatorsType = typeof RuleOperators;
|
@@ -22,53 +18,45 @@ export type OptionTypeItem = { label: string; value: ValueType };
|
|
22
18
|
export type OptionTypeGroup = { title: string; options: OptionTypeItem[] };
|
23
19
|
export type OptionType = OptionTypeItem | OptionTypeGroup | string;
|
24
20
|
export type ProductUploadMapSource = {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
required: boolean;
|
22
|
+
label: string;
|
23
|
+
attribute: string;
|
24
|
+
type: 'select' | 'multiselect' | 'text' | 'number';
|
25
|
+
choices?: OptionType[];
|
26
|
+
rules: ProductUploadRuleFilterType['value'][];
|
27
|
+
description?: string;
|
28
|
+
defaultValue?: ValueType;
|
33
29
|
};
|
34
30
|
|
35
31
|
export type ProductUploadMapping = {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
sections: {
|
40
|
-
ruleItems: {
|
41
|
-
attribute: (typeof ProductUploadRuleFilters)[number]['value'];
|
42
|
-
operator: ProductUploadRuleOperatorType['value'];
|
43
|
-
value: string | string[] | number[] | number | boolean;
|
44
|
-
id: string;
|
45
|
-
}[];
|
46
|
-
}[];
|
47
|
-
};
|
32
|
+
attribute: MappingFields;
|
33
|
+
value: ValueType;
|
34
|
+
rules: ProductUploadRules;
|
48
35
|
};
|
49
36
|
|
50
37
|
type MappingFields = (typeof ProductUploadMappings)[number]['attribute'];
|
51
38
|
|
52
39
|
export type ProductUploadProfile = {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
40
|
+
id: string;
|
41
|
+
profileIdTemplate: string;
|
42
|
+
name: string;
|
43
|
+
active?: boolean;
|
44
|
+
rules: ProductUploadRules;
|
45
|
+
mappings: ProductUploadMapping[];
|
59
46
|
};
|
60
47
|
|
61
48
|
export type ProductUploadRules = {
|
62
|
-
|
49
|
+
sections: ProductUploadRuleSection[];
|
63
50
|
};
|
64
51
|
|
65
52
|
export type ProductUploadRuleSection = {
|
66
|
-
|
53
|
+
id: string;
|
54
|
+
ruleItems: ProductUploadRuleItem[];
|
67
55
|
};
|
68
56
|
|
69
57
|
export type ProductUploadRuleItem = {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
58
|
+
id: string;
|
59
|
+
attribute: string;
|
60
|
+
operator: string;
|
61
|
+
value: string | number | string[] | number[] | boolean;
|
74
62
|
};
|