feed-common 1.10.6 → 1.11.1

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.11.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.11.0...v1.11.1) (2024-06-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add ID to ProductUploadMapping ([f2b8082](https://github.com/advertikon/package-maxify-feed-common/commit/f2b80825b9fb5b4824d140795c11395dd363ec2b))
7
+
8
+ # [1.11.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.10.6...v1.11.0) (2024-06-03)
9
+
10
+
11
+ ### Features
12
+
13
+ * add ID to rule section ([b421d3d](https://github.com/advertikon/package-maxify-feed-common/commit/b421d3d51177580ae067a860fcb1b2abd2492cfa))
14
+
1
15
  ## [1.10.6](https://github.com/advertikon/package-maxify-feed-common/compare/v1.10.5...v1.10.6) (2024-05-26)
2
16
 
3
17
 
@@ -1,4 +1,4 @@
1
- import { ProductUploadRuleFilters, ProductUploadMappings, RuleOperators } from '../constants/profile.constants.js';
1
+ import { ProductUploadMappings, RuleOperators } from '../constants/profile.constants.js';
2
2
  export type SelectItem = {
3
3
  label: string;
4
4
  value: string;
@@ -33,18 +33,10 @@ export type ProductUploadMapSource = {
33
33
  defaultValue?: ValueType;
34
34
  };
35
35
  export type ProductUploadMapping = {
36
+ id: string;
36
37
  attribute: MappingFields;
37
38
  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
- };
39
+ rules: ProductUploadRules;
48
40
  };
49
41
  type MappingFields = (typeof ProductUploadMappings)[number]['attribute'];
50
42
  export type ProductUploadProfile = {
@@ -59,6 +51,7 @@ export type ProductUploadRules = {
59
51
  sections: ProductUploadRuleSection[];
60
52
  };
61
53
  export type ProductUploadRuleSection = {
54
+ id: string;
62
55
  ruleItems: ProductUploadRuleItem[];
63
56
  };
64
57
  export type ProductUploadRuleItem = {
@@ -1 +1 @@
1
- {"version":3,"file":"profile.types.d.ts","sourceRoot":"","sources":["../../src/types/profile.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACd,MAAM,mCAAmC,CAAC;AAE3C,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;IACxC,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;CACvB,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;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAA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package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feed-common",
3
- "version": "1.10.6",
3
+ "version": "1.11.1",
4
4
  "description": "Maxify feed common library",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,19 +1,15 @@
1
- import {
2
- ProductUploadRuleFilters,
3
- ProductUploadMappings,
4
- RuleOperators,
5
- } from '../constants/profile.constants.js';
1
+ 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
- label: string;
13
- operators: ProductUploadRuleOperatorType[];
14
- value: string;
15
- disabled?: boolean;
16
- values?: SelectItem[];
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,46 @@ 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
- required: boolean;
26
- label: string;
27
- attribute: string;
28
- type: 'select' | 'multiselect' | 'text' | 'number';
29
- choices?: OptionType[];
30
- rules: ProductUploadRuleFilterType['value'][];
31
- description?: string;
32
- defaultValue?: ValueType;
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
- attribute: MappingFields;
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
- };
32
+ id: string;
33
+ attribute: MappingFields;
34
+ value: ValueType;
35
+ rules: ProductUploadRules;
48
36
  };
49
37
 
50
38
  type MappingFields = (typeof ProductUploadMappings)[number]['attribute'];
51
39
 
52
40
  export type ProductUploadProfile = {
53
- id: string;
54
- profileIdTemplate: string;
55
- name: string;
56
- active?: boolean;
57
- rules: ProductUploadRules;
58
- mappings: ProductUploadMapping[];
41
+ id: string;
42
+ profileIdTemplate: string;
43
+ name: string;
44
+ active?: boolean;
45
+ rules: ProductUploadRules;
46
+ mappings: ProductUploadMapping[];
59
47
  };
60
48
 
61
49
  export type ProductUploadRules = {
62
- sections: ProductUploadRuleSection[];
50
+ sections: ProductUploadRuleSection[];
63
51
  };
64
52
 
65
53
  export type ProductUploadRuleSection = {
66
- ruleItems: ProductUploadRuleItem[];
54
+ id: string;
55
+ ruleItems: ProductUploadRuleItem[];
67
56
  };
68
57
 
69
58
  export type ProductUploadRuleItem = {
70
- id: string;
71
- attribute: string;
72
- operator: string;
73
- value: string | number | string[] | number[] | boolean;
59
+ id: string;
60
+ attribute: string;
61
+ operator: string;
62
+ value: string | number | string[] | number[] | boolean;
74
63
  };