@salesforce/plugin-bre-to-cml 1.0.2

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.
Files changed (85) hide show
  1. package/LICENSE.txt +206 -0
  2. package/README.md +158 -0
  3. package/lib/commands/cml/convert/prod-cfg-rules.d.ts +29 -0
  4. package/lib/commands/cml/convert/prod-cfg-rules.js +226 -0
  5. package/lib/commands/cml/convert/prod-cfg-rules.js.map +1 -0
  6. package/lib/commands/cml/import/as-expression-set.d.ts +18 -0
  7. package/lib/commands/cml/import/as-expression-set.js +184 -0
  8. package/lib/commands/cml/import/as-expression-set.js.map +1 -0
  9. package/lib/index.d.ts +2 -0
  10. package/lib/index.js +17 -0
  11. package/lib/index.js.map +1 -0
  12. package/lib/shared/bre-rules-generator.d.ts +20 -0
  13. package/lib/shared/bre-rules-generator.js +497 -0
  14. package/lib/shared/bre-rules-generator.js.map +1 -0
  15. package/lib/shared/cml.d.ts +2 -0
  16. package/lib/shared/cml.js +13 -0
  17. package/lib/shared/cml.js.map +1 -0
  18. package/lib/shared/constants/constants.d.ts +94 -0
  19. package/lib/shared/constants/constants.js +109 -0
  20. package/lib/shared/constants/constants.js.map +1 -0
  21. package/lib/shared/grouping.d.ts +4 -0
  22. package/lib/shared/grouping.js +88 -0
  23. package/lib/shared/grouping.js.map +1 -0
  24. package/lib/shared/models.d.ts +65 -0
  25. package/lib/shared/models.js +2 -0
  26. package/lib/shared/models.js.map +1 -0
  27. package/lib/shared/pcm-generator.d.ts +57 -0
  28. package/lib/shared/pcm-generator.js +418 -0
  29. package/lib/shared/pcm-generator.js.map +1 -0
  30. package/lib/shared/pcm-products.d.ts +14 -0
  31. package/lib/shared/pcm-products.js +125 -0
  32. package/lib/shared/pcm-products.js.map +1 -0
  33. package/lib/shared/pcm-products.types.d.ts +99 -0
  34. package/lib/shared/pcm-products.types.js +2 -0
  35. package/lib/shared/pcm-products.types.js.map +1 -0
  36. package/lib/shared/types/association.d.ts +15 -0
  37. package/lib/shared/types/association.js +64 -0
  38. package/lib/shared/types/association.js.map +1 -0
  39. package/lib/shared/types/base/annotated-cml-element-w-attributes.d.ts +10 -0
  40. package/lib/shared/types/base/annotated-cml-element-w-attributes.js +36 -0
  41. package/lib/shared/types/base/annotated-cml-element-w-attributes.js.map +1 -0
  42. package/lib/shared/types/base/annotated-cml-element.d.ts +9 -0
  43. package/lib/shared/types/base/annotated-cml-element.js +39 -0
  44. package/lib/shared/types/base/annotated-cml-element.js.map +1 -0
  45. package/lib/shared/types/base/types.d.ts +2 -0
  46. package/lib/shared/types/base/types.js +18 -0
  47. package/lib/shared/types/base/types.js.map +1 -0
  48. package/lib/shared/types/cml-attribute.d.ts +17 -0
  49. package/lib/shared/types/cml-attribute.js +84 -0
  50. package/lib/shared/types/cml-attribute.js.map +1 -0
  51. package/lib/shared/types/cml-constraint.d.ts +50 -0
  52. package/lib/shared/types/cml-constraint.js +277 -0
  53. package/lib/shared/types/cml-constraint.js.map +1 -0
  54. package/lib/shared/types/cml-domain.d.ts +25 -0
  55. package/lib/shared/types/cml-domain.js +132 -0
  56. package/lib/shared/types/cml-domain.js.map +1 -0
  57. package/lib/shared/types/cml-model.d.ts +39 -0
  58. package/lib/shared/types/cml-model.js +153 -0
  59. package/lib/shared/types/cml-model.js.map +1 -0
  60. package/lib/shared/types/cml-relation.d.ts +31 -0
  61. package/lib/shared/types/cml-relation.js +118 -0
  62. package/lib/shared/types/cml-relation.js.map +1 -0
  63. package/lib/shared/types/cml-type.d.ts +22 -0
  64. package/lib/shared/types/cml-type.js +111 -0
  65. package/lib/shared/types/cml-type.js.map +1 -0
  66. package/lib/shared/types/sobject.d.ts +13 -0
  67. package/lib/shared/types/sobject.js +2 -0
  68. package/lib/shared/types/sobject.js.map +1 -0
  69. package/lib/shared/types/types.d.ts +8 -0
  70. package/lib/shared/types/types.js +24 -0
  71. package/lib/shared/types/types.js.map +1 -0
  72. package/lib/shared/utils/association.utils.d.ts +61 -0
  73. package/lib/shared/utils/association.utils.js +175 -0
  74. package/lib/shared/utils/association.utils.js.map +1 -0
  75. package/lib/shared/utils/common.utils.d.ts +191 -0
  76. package/lib/shared/utils/common.utils.js +338 -0
  77. package/lib/shared/utils/common.utils.js.map +1 -0
  78. package/messages/call.external.service.md +20 -0
  79. package/messages/cml.convert.prod-cfg-rules.md +59 -0
  80. package/messages/cml.import.as-expression-set.md +32 -0
  81. package/messages/connect.org.md +19 -0
  82. package/messages/hello.world.md +29 -0
  83. package/oclif.lock +8313 -0
  84. package/oclif.manifest.json +209 -0
  85. package/package.json +227 -0
@@ -0,0 +1,31 @@
1
+ import { AnnotatedCmlElementWAttributes } from './base/types.js';
2
+ export type CmlRelationCardinality = {
3
+ min?: number;
4
+ max?: number;
5
+ };
6
+ export declare class CmlRelation extends AnnotatedCmlElementWAttributes {
7
+ #private;
8
+ constructor(name: string, type: string);
9
+ get name(): string;
10
+ get type(): string;
11
+ get cardinality(): CmlRelationCardinality;
12
+ get order(): string[];
13
+ get prcIds(): string[];
14
+ set type(type: string);
15
+ set name(name: string);
16
+ /**
17
+ * Cardinality can be an integer or a string constant.
18
+ */
19
+ setMinCardinality(minCardinality: number): void;
20
+ /**
21
+ * Cardinality can be an integer or a string constant.
22
+ */
23
+ setMaxCardinality(maxCardinality: number): void;
24
+ hasCardinality(): boolean;
25
+ hasMinCardinality(): boolean;
26
+ hasMaxCardinality(): boolean;
27
+ setOrder(order: string[]): void;
28
+ setPrcIds(prcIds: string[]): void;
29
+ hasOrder(): boolean;
30
+ generateCml(): string;
31
+ }
@@ -0,0 +1,118 @@
1
+ /*
2
+ * Copyright 2025, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { isEmpty } from '../utils/common.utils.js';
17
+ import { AnnotatedCmlElementWAttributes } from './base/types.js';
18
+ export class CmlRelation extends AnnotatedCmlElementWAttributes {
19
+ #name;
20
+ #type;
21
+ #cardinality = {};
22
+ #order = [];
23
+ #prcIds = [];
24
+ constructor(name, type) {
25
+ super();
26
+ this.#name = name;
27
+ this.#type = type;
28
+ }
29
+ get name() {
30
+ return this.#name;
31
+ }
32
+ get type() {
33
+ return this.#type;
34
+ }
35
+ get cardinality() {
36
+ return this.#cardinality;
37
+ }
38
+ get order() {
39
+ return this.#order;
40
+ }
41
+ get prcIds() {
42
+ return this.#prcIds;
43
+ }
44
+ set type(type) {
45
+ this.#type = type;
46
+ }
47
+ set name(name) {
48
+ this.#name = name;
49
+ }
50
+ /**
51
+ * Cardinality can be an integer or a string constant.
52
+ */
53
+ setMinCardinality(minCardinality) {
54
+ this.#cardinality.min = minCardinality;
55
+ }
56
+ /**
57
+ * Cardinality can be an integer or a string constant.
58
+ */
59
+ setMaxCardinality(maxCardinality) {
60
+ if (isEmpty(this.#cardinality.min)) {
61
+ this.#cardinality.min = 0;
62
+ }
63
+ this.#cardinality.max = maxCardinality;
64
+ }
65
+ hasCardinality() {
66
+ return !isEmpty(this.#cardinality.min) && !isEmpty(this.#cardinality.max);
67
+ }
68
+ hasMinCardinality() {
69
+ return !isEmpty(this.#cardinality.min);
70
+ }
71
+ hasMaxCardinality() {
72
+ return !isEmpty(this.#cardinality.max);
73
+ }
74
+ setOrder(order) {
75
+ this.#order = order;
76
+ }
77
+ setPrcIds(prcIds) {
78
+ this.#prcIds = prcIds;
79
+ }
80
+ hasOrder() {
81
+ return this.#order.length > 0;
82
+ }
83
+ generateCml() {
84
+ let output = '';
85
+ if (this.hasProperties()) {
86
+ output += this.generateAnnotation() + '\n';
87
+ }
88
+ output += `relation ${this.#name} : ${this.#type}`;
89
+ // relations can have min/max cardinalities
90
+ if (this.hasCardinality()) {
91
+ if (this.cardinality.min === this.cardinality.max) {
92
+ output += `[${this.cardinality.min ?? 0}]`;
93
+ }
94
+ else {
95
+ output += `[${this.cardinality.min ?? 0}..${this.cardinality.max ?? 0}]`;
96
+ }
97
+ }
98
+ // relations can have an order of child types
99
+ if (this.hasOrder()) {
100
+ output += ' order (';
101
+ output += this.order.join(', ');
102
+ output += ')';
103
+ }
104
+ // relation body can contain relation attributes and default components
105
+ if (this.hasAttributes()) {
106
+ output += ' {\n';
107
+ this.attributes.forEach((a) => {
108
+ output += a.generateCml() + ';\n';
109
+ });
110
+ output += '}';
111
+ }
112
+ else {
113
+ output += ';';
114
+ }
115
+ return output;
116
+ }
117
+ }
118
+ //# sourceMappingURL=cml-relation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cml-relation.js","sourceRoot":"","sources":["../../../src/shared/types/cml-relation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAOjE,MAAM,OAAO,WAAY,SAAQ,8BAA8B;IAC7D,KAAK,CAAC;IACN,KAAK,CAAC;IACN,YAAY,GAA2B,EAAE,CAAC;IAC1C,MAAM,GAAa,EAAE,CAAC;IACtB,OAAO,GAAa,EAAE,CAAC;IAEvB,YAAmB,IAAY,EAAE,IAAY;QAC3C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IA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AAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import { AnnotatedCmlElementWAttributes } from './base/types.js';
2
+ import { CmlConstraint } from './cml-constraint.js';
3
+ import { CmlRelation } from './cml-relation.js';
4
+ export declare class CmlType extends AnnotatedCmlElementWAttributes {
5
+ #private;
6
+ constructor(name: string, productId: string | undefined, basedOnId?: string);
7
+ get name(): string;
8
+ get productId(): string | undefined;
9
+ get basedOnId(): string | undefined;
10
+ get parentType(): CmlType | undefined;
11
+ get relations(): CmlRelation[];
12
+ get constraints(): CmlConstraint[];
13
+ get isVirtualContainer(): boolean;
14
+ hasParentType(): boolean;
15
+ setParentType(parentType: CmlType): void;
16
+ isEmptyType(): boolean;
17
+ addRelation(r: CmlRelation): void;
18
+ getRelation(name: string): CmlRelation | undefined;
19
+ editRelation(r: CmlRelation): void;
20
+ addConstraint(c: CmlConstraint): void;
21
+ generateCml(): string;
22
+ }
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Copyright 2025, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { AnnotatedCmlElementWAttributes } from './base/types.js';
17
+ export class CmlType extends AnnotatedCmlElementWAttributes {
18
+ #name;
19
+ #productId;
20
+ #basedOnId;
21
+ #parentType;
22
+ #relations = new Map();
23
+ #constraints = [];
24
+ constructor(name, productId, basedOnId) {
25
+ super();
26
+ this.#name = name;
27
+ this.#productId = productId;
28
+ this.#basedOnId = basedOnId;
29
+ }
30
+ get name() {
31
+ return this.#name;
32
+ }
33
+ get productId() {
34
+ return this.#productId;
35
+ }
36
+ get basedOnId() {
37
+ return this.#basedOnId;
38
+ }
39
+ get parentType() {
40
+ return this.#parentType;
41
+ }
42
+ get relations() {
43
+ return Array.from(this.#relations.values());
44
+ }
45
+ get constraints() {
46
+ return Array.from(this.#constraints);
47
+ }
48
+ get isVirtualContainer() {
49
+ return this.properties?.virtual === true;
50
+ }
51
+ hasParentType() {
52
+ return !!this.#parentType;
53
+ }
54
+ setParentType(parentType) {
55
+ this.#parentType = parentType;
56
+ }
57
+ isEmptyType() {
58
+ return this.attributes.length === 0 && this.relations.length === 0 && this.constraints.length === 0;
59
+ }
60
+ addRelation(r) {
61
+ if (!r.name) {
62
+ throw new Error('MissingRelationName');
63
+ }
64
+ const existingRelation = this.#relations.get(r.name);
65
+ if (existingRelation) {
66
+ throw new Error('RelationExists'.replace('{0}', r.name));
67
+ }
68
+ this.#relations.set(r.name, r);
69
+ }
70
+ getRelation(name) {
71
+ return this.#relations.get(name);
72
+ }
73
+ editRelation(r) {
74
+ if (!r.name) {
75
+ throw new Error('MissingRelationName');
76
+ }
77
+ if (!this.#relations.has(r.name)) {
78
+ throw new Error('RelationDoesNotExist'.replace('{0}', r.name));
79
+ }
80
+ this.#relations.set(r.name, r);
81
+ }
82
+ addConstraint(c) {
83
+ if (!c.name || !this.#constraints.some(({ name }) => c.name === name)) {
84
+ c.setSequence(this.#constraints.length);
85
+ this.#constraints.push(c);
86
+ }
87
+ }
88
+ generateCml() {
89
+ let output = '';
90
+ if (this.hasProperties()) {
91
+ output += this.generateAnnotation() + '\n';
92
+ }
93
+ output += `type ${this.#name}`;
94
+ if (this.#parentType) {
95
+ output += ` : ${this.#parentType.name}`;
96
+ }
97
+ if (this.isEmptyType()) {
98
+ return `${output};\n`;
99
+ }
100
+ const sections = [
101
+ this.attributes.map((a) => a.generateCml() + ';\n'),
102
+ this.relations.map((r) => r.generateCml() + '\n'),
103
+ this.constraints.sort((l, r) => l.sequence - r.sequence).map((c) => c.generateCml() + '\n'),
104
+ ]
105
+ .filter((section) => section.length > 0)
106
+ .flat();
107
+ output += ` {\n${sections.join('\n')}\n}\n`;
108
+ return output;
109
+ }
110
+ }
111
+ //# sourceMappingURL=cml-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cml-type.js","sourceRoot":"","sources":["../../../src/shared/types/cml-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAIjE,MAAM,OAAO,OAAQ,SAAQ,8BAA8B;IAChD,KAAK,CAAS;IACd,UAAU,CAAqB;IAC/B,UAAU,CAAqB;IACxC,WAAW,CAAW;IACtB,UAAU,GAA6B,IAAI,GAAG,EAAE,CAAC;IACjD,YAAY,GAAoB,EAAE,CAAC;IAEnC,YAAmB,IAAY,EAAE,SAA6B,EAAE,SAAkB;QAChF,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,IAAW,WAAW;QACpB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvC,CAAC;IAED,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,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,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC;SAC5F;aACE,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;aACvC,IAAI,EAAE,CAAC;QAEV,MAAM,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5C,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ export type ExpressionSetConstraintObj = {
2
+ Id: string;
3
+ ExpressionSetId: string;
4
+ 'ExpressionSet.ApiName': string;
5
+ ReferenceObjectId: string;
6
+ ConstraintModelTag: string;
7
+ ConstraintModelTagType: 'Type' | 'Port';
8
+ };
9
+ export type ExpressionSetConstraintObjCustom = ExpressionSetConstraintObj & {
10
+ $Product2ReferenceId: string;
11
+ $ProductClassificationName: string;
12
+ $ProductRelatedComponentKey: string;
13
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sobject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sobject.js","sourceRoot":"","sources":["../../../src/shared/types/sobject.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export * from './association.js';
2
+ export * from './cml-attribute.js';
3
+ export * from './cml-constraint.js';
4
+ export * from './cml-domain.js';
5
+ export * from './cml-model.js';
6
+ export * from './cml-relation.js';
7
+ export * from './cml-type.js';
8
+ export * from './sobject.js';
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright 2025, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './association.js';
17
+ export * from './cml-attribute.js';
18
+ export * from './cml-constraint.js';
19
+ export * from './cml-domain.js';
20
+ export * from './cml-model.js';
21
+ export * from './cml-relation.js';
22
+ export * from './cml-type.js';
23
+ export * from './sobject.js';
24
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/shared/types/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { Association, CmlRelation, CmlType } from '../types/types.js';
2
+ /**
3
+ * Filters associations to return only those that match the specified type
4
+ * and are not marked for deletion.
5
+ *
6
+ * @param {Array} associations - Array of association objects to filter.
7
+ * @param {Object} typeName - The type name to filter associations by.
8
+ * @returns {Array} Filtered array of associations for the specified type and not marked for deletion.
9
+ */
10
+ export declare function getTypeAssociationsForType(associations: Association[], typeName: string): Association[];
11
+ export declare function getTypeAssociationForTypeAndReferenceObjectId(associations: Association[], type: CmlType, referenceObjectId: string): Association | undefined;
12
+ export declare function getRelationAssociationForRelationAndReferenceObjectId(associations: Association[], relation: CmlRelation, referenceObjectId: string): Association | undefined;
13
+ export declare function getRelationAssociationsForType(associations: Association[], type: CmlType): Association[];
14
+ export declare function getRelationAssociationsForRelation(associations: Association[], relation: CmlRelation): Association[];
15
+ /**
16
+ * Retrieves the tag name of the type association for a given reference object ID.
17
+ *
18
+ * @param {Array} associations - Array of association objects to search within.
19
+ * @param {string} referenceObjectId - The reference object ID to match.
20
+ * @returns {string|undefined} The tag name of the type association if found, otherwise undefined.
21
+ */
22
+ export declare function getTypeNameForRelatedObjectId(associations: Association[], referenceObjectId: string): string | undefined;
23
+ /**
24
+ * Retrieves the tag name of the relation association for a given reference object ID.
25
+ *
26
+ * @param {Array} associations - Array of association objects to search within.
27
+ * @param {string} referenceObjectId - The reference object ID to match.
28
+ * @returns {string|undefined} The tag name of the relation association if found, otherwise undefined.
29
+ */
30
+ export declare function getRelationNameForRelatedObjectId(associations: Association[], referenceObjectId: string): string | undefined;
31
+ /**
32
+ * Filters associations to return only those marked for creation.
33
+ *
34
+ * @param {Array} associations - Array of association objects to filter.
35
+ * @returns {Array} Filtered array of associations marked for creation.
36
+ */
37
+ export declare function getAssociationRecordsToCreate(associations: Association[]): Association[];
38
+ /**
39
+ * Filters associations to return only those marked for update.
40
+ *
41
+ * @param {Array} associations - Array of association objects to filter.
42
+ * @returns {Array} Filtered array of associations marked for update.
43
+ */
44
+ export declare function getAssociationRecordsToUpdate(associations: Association[]): Association[];
45
+ /**
46
+ * Returns true if there is an existing association for the same tag and reference object ID
47
+ *
48
+ * @param {Array} associations - Array of association objects to filter.
49
+ * @param {string} tag - The tag of the association to match
50
+ * @param {string} referenceObjectId - The reference object ID of the association to match.
51
+ * @returns {Boolean} True or false depending on if the association exists
52
+ */
53
+ export declare function isDuplicateAssociationRecord(associations: Association[], tag: string, referenceObjectId: string): boolean;
54
+ /**
55
+ * Returns generated CSV using provided associations for provided CML model name
56
+ *
57
+ * @param {string} cmlName - The name of target CML model.
58
+ * @param {Array} associations - Array of association objects.
59
+ * @returns {String} Generated CSV content
60
+ */
61
+ export declare function generateCsvForAssociations(cmlName: string, associations: Association[]): string;
@@ -0,0 +1,175 @@
1
+ /*
2
+ * Copyright 2025, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ASSOCIATION_TYPES } from '../constants/constants.js';
17
+ /**
18
+ * Filters associations to return only those that match the specified type
19
+ * and are not marked for deletion.
20
+ *
21
+ * @param {Array} associations - Array of association objects to filter.
22
+ * @param {Object} typeName - The type name to filter associations by.
23
+ * @returns {Array} Filtered array of associations for the specified type and not marked for deletion.
24
+ */
25
+ export function getTypeAssociationsForType(associations, typeName) {
26
+ const isTypeAssociation = (a) => a.type === ASSOCIATION_TYPES.TYPE;
27
+ const isForTypeName = (a) => a.tag === typeName;
28
+ return associations.filter(isTypeAssociation).filter(isForTypeName);
29
+ }
30
+ // /**
31
+ // * Retrieves type association that match a specified type and reference object ID.
32
+ // *
33
+ // * @param {Array} associations - Array of association objects to search within.
34
+ // * @param {Object} type - The type object to filter associations by.
35
+ // * @param {string} referenceObjectId - The reference object ID to match.
36
+ // * @returns {Object} - An association that:
37
+ // * is of the specified relation
38
+ // * have a matching reference object ID
39
+ // */
40
+ export function getTypeAssociationForTypeAndReferenceObjectId(associations, type, referenceObjectId) {
41
+ const typeAssociations = getTypeAssociationsForType(associations, type.name);
42
+ const isForReferenceObjectId = (a) => a.referenceObjectId === referenceObjectId;
43
+ return typeAssociations.find(isForReferenceObjectId);
44
+ }
45
+ // /**
46
+ // * Retrieves relation associations that match a specified relation and reference object ID.
47
+ // *
48
+ // * @param {Array} associations - Array of association objects to search within.
49
+ // * @param {Object} relation - The relation object to filter associations by.
50
+ // * @param {string} referenceObjectId - The reference object ID to match.
51
+ // * @returns {Object} - An association that:
52
+ // * is of the specified relation
53
+ // * have a matching reference object ID
54
+ // */
55
+ export function getRelationAssociationForRelationAndReferenceObjectId(associations, relation, referenceObjectId) {
56
+ const relationAssociations = getRelationAssociationsForRelation(associations, relation);
57
+ const isForReferenceObjectId = (a) => a.referenceObjectId === referenceObjectId;
58
+ return relationAssociations.find(isForReferenceObjectId);
59
+ }
60
+ // /**
61
+ // * Filters a list of associations to return only those that are of type `RELATION`,
62
+ // * are part of the specified type's relations, and are not marked for deletion.
63
+ // *
64
+ // * @param {Array} associations - Array of association objects to filter.
65
+ // * @param {Object} type - An object representing the type, which includes a `relations` property.
66
+ // * @param {Array<Object>} type.relations - Array of relation objects associated with the type.
67
+ // * @param {string} type.relations[].name - The name of each relation associated with the type.
68
+ // * @returns {Array} Filtered array of associations that match the criteria:
69
+ // * they are of type `RELATION`, their tag matches a relation in the specified type,
70
+ // * and they are not marked for deletion.
71
+ // */
72
+ export function getRelationAssociationsForType(associations, type) {
73
+ const relations = new Set(type.relations.map((r) => r.name));
74
+ const prcIds = new Set(type.relations.flatMap((r) => r.prcIds));
75
+ const isRelationAssociation = (a) => a.type === ASSOCIATION_TYPES.RELATION;
76
+ const isRelationAssociationPartOfType = (a) => relations.has(a.tag) && prcIds.has(a.referenceObjectId);
77
+ const isNotMarkedForDelete = (a) => a && false; // !a.hasState(ASSOCIATION_STATES.MARKED_FOR_DELETION);
78
+ return associations
79
+ .filter(isRelationAssociation)
80
+ .filter(isRelationAssociationPartOfType)
81
+ .filter(isNotMarkedForDelete);
82
+ }
83
+ // /**
84
+ // * Retrieves active relation associations for a specified relation from a list of associations.
85
+ // *
86
+ // * @param {Array} associations - The list of associations to filter.
87
+ // * @param {Object} relation - The relation object to match against.
88
+ // * @param {string} relation.name - The name of the relation to filter associations by.
89
+ // * @returns {Array} - An array of associations that:
90
+ // * - have the type `ASSOCIATION_TYPES.RELATION`
91
+ // * - match the specified relation's name
92
+ // * - are not marked for deletion
93
+ // */
94
+ export function getRelationAssociationsForRelation(associations, relation) {
95
+ const isRelationAssociation = (a) => a.type === ASSOCIATION_TYPES.RELATION;
96
+ const isForRelationName = (a) => a.tag === relation.name && relation.prcIds?.includes(a.referenceObjectId);
97
+ const isNotMarkedForDelete = (a) => a && false; // !a.hasState(ASSOCIATION_STATES.MARKED_FOR_DELETION);
98
+ return associations.filter(isRelationAssociation).filter(isForRelationName).filter(isNotMarkedForDelete);
99
+ }
100
+ /**
101
+ * Retrieves the tag name of the type association for a given reference object ID.
102
+ *
103
+ * @param {Array} associations - Array of association objects to search within.
104
+ * @param {string} referenceObjectId - The reference object ID to match.
105
+ * @returns {string|undefined} The tag name of the type association if found, otherwise undefined.
106
+ */
107
+ export function getTypeNameForRelatedObjectId(associations, referenceObjectId) {
108
+ const isTypeAssociation = (a) => a.type === ASSOCIATION_TYPES.TYPE;
109
+ const isRelatedObjectMatch = (a) => a.referenceObjectId === referenceObjectId;
110
+ const association = associations.filter(isTypeAssociation).find(isRelatedObjectMatch);
111
+ return association?.tag;
112
+ }
113
+ /**
114
+ * Retrieves the tag name of the relation association for a given reference object ID.
115
+ *
116
+ * @param {Array} associations - Array of association objects to search within.
117
+ * @param {string} referenceObjectId - The reference object ID to match.
118
+ * @returns {string|undefined} The tag name of the relation association if found, otherwise undefined.
119
+ */
120
+ export function getRelationNameForRelatedObjectId(associations, referenceObjectId) {
121
+ const isRelationAssociation = (a) => a.type === ASSOCIATION_TYPES.RELATION;
122
+ const isRelatedObjectMatch = (a) => a.referenceObjectId === referenceObjectId;
123
+ const association = associations.filter(isRelationAssociation).find(isRelatedObjectMatch);
124
+ return association?.tag;
125
+ }
126
+ /**
127
+ * Filters associations to return only those marked for creation.
128
+ *
129
+ * @param {Array} associations - Array of association objects to filter.
130
+ * @returns {Array} Filtered array of associations marked for creation.
131
+ */
132
+ export function getAssociationRecordsToCreate(associations) {
133
+ return associations;
134
+ // return associations.filter((a) => a.hasState(ASSOCIATION_STATES.DRAFT));
135
+ }
136
+ /**
137
+ * Filters associations to return only those marked for update.
138
+ *
139
+ * @param {Array} associations - Array of association objects to filter.
140
+ * @returns {Array} Filtered array of associations marked for update.
141
+ */
142
+ export function getAssociationRecordsToUpdate(associations) {
143
+ return associations;
144
+ // return associations.filter((a) => a.hasState(ASSOCIATION_STATES.MARKED_FOR_UPDATE));
145
+ }
146
+ /**
147
+ * Returns true if there is an existing association for the same tag and reference object ID
148
+ *
149
+ * @param {Array} associations - Array of association objects to filter.
150
+ * @param {string} tag - The tag of the association to match
151
+ * @param {string} referenceObjectId - The reference object ID of the association to match.
152
+ * @returns {Boolean} True or false depending on if the association exists
153
+ */
154
+ export function isDuplicateAssociationRecord(associations, tag, referenceObjectId) {
155
+ return associations.some((a) => a.tag === tag && a.referenceObjectId === referenceObjectId);
156
+ }
157
+ /**
158
+ * Returns generated CSV using provided associations for provided CML model name
159
+ *
160
+ * @param {string} cmlName - The name of target CML model.
161
+ * @param {Array} associations - Array of association objects.
162
+ * @returns {String} Generated CSV content
163
+ */
164
+ export function generateCsvForAssociations(cmlName, associations) {
165
+ return ('ExpressionSet.ApiName,ConstraintModelTag,ConstraintModelTagType,ReferenceObjectId,$Product2ReferenceId,$ProductClassificationName,$ProductRelatedComponentKey\n' +
166
+ associations
167
+ .map((a) => {
168
+ const product2ReferenceId = a.referenceObjectType === 'Product2' ? a.referenceObjectReferenceValue : '';
169
+ const productClassificationName = a.referenceObjectType === 'ProductClassification' ? a.referenceObjectReferenceValue : '';
170
+ const productRelatedComponentKey = a.referenceObjectType === 'ProductRelatedComponent' ? a.referenceObjectReferenceValue : '';
171
+ return `${cmlName},${a.tag},${a.type},${a.referenceObjectId},${product2ReferenceId},${productClassificationName},${productRelatedComponentKey}`;
172
+ })
173
+ .join('\n'));
174
+ }
175
+ //# sourceMappingURL=association.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"association.utils.js","sourceRoot":"","sources":["../../../src/shared/utils/association.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,iB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