@carbonbox/domain 0.7.22 → 0.7.24
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/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationSegment.js +0 -2
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentIncludedSubsegments.js +0 -2
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationStage.js +0 -2
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageIncludedSubsegments.js +0 -2
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationSegment.js +0 -2
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentIncludedSubsegments.js +0 -2
- package/build/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowJobSequence.js +3 -5
- package/build/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowParallelJobs.js +28 -27
- package/build/carbonbox/shared/domain/value-objects/CarbonFootprintSegmentReferences.js +16 -103
- package/build/carbonbox/shared/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationReferences.js +15 -29
- package/build/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentReference.js +6 -131
- package/build/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentReference.js +6 -131
- package/build/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReference.js +7 -149
- package/build/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReferences.js +9 -165
- package/build/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageConfigurationReferences.js +42 -50
- package/build/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageReference.js +8 -112
- package/build/carbonbox/shared/domain/value-objects/NullableCorporateConfigurationCarbonFootprintSubsegmentReference.js +11 -136
- package/build/carbonbox/shared/domain/value-objects/NullableEventEditionConfigurationCarbonFootprintSubsegmentReference.js +11 -168
- package/build/carbonbox/shared/domain/value-objects/NullableProductConfigurationCarbonFootprintSubsegmentReference.js +11 -136
- package/build/carbonbox/shared/domain/value-objects/ProductCarbonFootprintSegmentConfigurationReferences.js +35 -56
- package/build/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSegmentReference.js +6 -172
- package/build/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentReference.js +6 -172
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationSegment.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentIncludedSubsegments.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationStage.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageIncludedSubsegments.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationSegment.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentIncludedSubsegments.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowJobSequence.d.ts +2 -2
- package/build/types/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowJobSequence.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowParallelJobs.d.ts +5 -5
- package/build/types/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowParallelJobs.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSegmentReference.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSegmentReferencePrimitives.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSegmentReferencePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSubsegmentReference.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSubsegmentReferencePrimitives.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSubsegmentReferencePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/EventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/EventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/EventEditionConfigurationCarbonFootprintSubsegmentReferencePrimitives.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/EventEditionConfigurationCarbonFootprintSubsegmentReferencePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/EventEditionLifecycleStageReference.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/EventEditionLifecycleStageReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/EventEditionLifecycleStageReferencePrimitives.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/EventEditionLifecycleStageReferencePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/ProductConfigurationCarbonFootprintSegmentReference.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/ProductConfigurationCarbonFootprintSegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/ProductConfigurationCarbonFootprintSegmentReferencePrimitives.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/ProductConfigurationCarbonFootprintSegmentReferencePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/ProductConfigurationCarbonFootprintSubsegmentReference.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/ProductConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/types/ProductConfigurationCarbonFootprintSubsegmentReferencePrimitives.d.ts +0 -2
- package/build/types/carbonbox/shared/domain/types/ProductConfigurationCarbonFootprintSubsegmentReferencePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CarbonFootprintSegmentReferences.d.ts +7 -43
- package/build/types/carbonbox/shared/domain/value-objects/CarbonFootprintSegmentReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationReferences.d.ts +6 -8
- package/build/types/carbonbox/shared/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentReference.d.ts +1 -62
- package/build/types/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentReference.d.ts +1 -71
- package/build/types/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts +2 -78
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReferences.d.ts +5 -68
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageConfigurationReferences.d.ts +20 -19
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageConfigurationReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageReference.d.ts +2 -45
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableCorporateConfigurationCarbonFootprintSubsegmentReference.d.ts +2 -62
- package/build/types/carbonbox/shared/domain/value-objects/NullableCorporateConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableEventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts +2 -77
- package/build/types/carbonbox/shared/domain/value-objects/NullableEventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableProductConfigurationCarbonFootprintSubsegmentReference.d.ts +2 -62
- package/build/types/carbonbox/shared/domain/value-objects/NullableProductConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ProductCarbonFootprintSegmentConfigurationReferences.d.ts +15 -17
- package/build/types/carbonbox/shared/domain/value-objects/ProductCarbonFootprintSegmentConfigurationReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSegmentReference.d.ts +1 -81
- package/build/types/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentReference.d.ts +1 -90
- package/build/types/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,13 +10,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _ProductConfigurationCarbonFootprintSegmentReference_id
|
|
13
|
+
var _ProductConfigurationCarbonFootprintSegmentReference_id;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ProductConfigurationCarbonFootprintSegmentReference = void 0;
|
|
16
16
|
const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
|
|
17
17
|
const ObjectValueObject_1 = require("./ObjectValueObject");
|
|
18
18
|
const String_1 = require("./String");
|
|
19
|
-
const Code_1 = require("./Code");
|
|
20
19
|
const AggregateId_1 = require("./AggregateId");
|
|
21
20
|
class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObject_1.ObjectValueObject {
|
|
22
21
|
/**
|
|
@@ -26,15 +25,11 @@ class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObj
|
|
|
26
25
|
constructor(value, skipDomainValidation, propertyName = ProductConfigurationCarbonFootprintSegmentReference.DEFAULT_PROPERTY_NAME) {
|
|
27
26
|
super(value, skipDomainValidation, propertyName, 'The provided value must be of type ProductConfigurationCarbonFootprintSegmentReference from the domain layer', { allowNull: false, allowUndefined: false });
|
|
28
27
|
_ProductConfigurationCarbonFootprintSegmentReference_id.set(this, void 0);
|
|
29
|
-
_ProductConfigurationCarbonFootprintSegmentReference_code.set(this, void 0);
|
|
30
|
-
_ProductConfigurationCarbonFootprintSegmentReference_name.set(this, void 0);
|
|
31
28
|
if (skipDomainValidation === false) {
|
|
32
29
|
ProductConfigurationCarbonFootprintSegmentReference
|
|
33
30
|
.validateProductConfigurationCarbonFootprintSegmentReference(value, propertyName);
|
|
34
31
|
}
|
|
35
32
|
__classPrivateFieldSet(this, _ProductConfigurationCarbonFootprintSegmentReference_id, value.id.trim(), "f");
|
|
36
|
-
__classPrivateFieldSet(this, _ProductConfigurationCarbonFootprintSegmentReference_code, value.code.trim().toUpperCase(), "f");
|
|
37
|
-
__classPrivateFieldSet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, value.name.trim(), "f");
|
|
38
33
|
}
|
|
39
34
|
/**
|
|
40
35
|
* Validación estática para reutilización en factory methods y constructores.
|
|
@@ -42,8 +37,6 @@ class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObj
|
|
|
42
37
|
static validateProductConfigurationCarbonFootprintSegmentReference(value, propertyName) {
|
|
43
38
|
this.guardAgainstInvalidType(value, propertyName);
|
|
44
39
|
this.guardAgainstInvalidId(value.id);
|
|
45
|
-
this.guardAgainstInvalidSegmentCode(value.code);
|
|
46
|
-
this.guardAgainstInvalidSegmentName(value.name);
|
|
47
40
|
}
|
|
48
41
|
/**
|
|
49
42
|
* Valida que el objeto tenga la estructura correcta.
|
|
@@ -55,12 +48,6 @@ class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObj
|
|
|
55
48
|
if (typeof value.id !== 'string') {
|
|
56
49
|
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
57
50
|
}
|
|
58
|
-
if (typeof value.code !== 'string') {
|
|
59
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
60
|
-
}
|
|
61
|
-
if (typeof value.name !== 'string') {
|
|
62
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
63
|
-
}
|
|
64
51
|
}
|
|
65
52
|
/**
|
|
66
53
|
* Valida si el valor principal es inválido.
|
|
@@ -72,139 +59,12 @@ class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObj
|
|
|
72
59
|
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
73
60
|
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
74
61
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Valida el código del segmento de producto.
|
|
77
|
-
*/
|
|
78
|
-
static guardAgainstInvalidSegmentCode(code) {
|
|
79
|
-
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
80
|
-
Code_1.Code.guardAgainstInvalidCode(code);
|
|
81
|
-
if (this.codeIsEmpty(code)) {
|
|
82
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'non-empty string', 'empty string');
|
|
83
|
-
}
|
|
84
|
-
const trimmedCode = code.trim().toUpperCase();
|
|
85
|
-
if (this.codeLengthIsInvalid(trimmedCode)) {
|
|
86
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', `string with length between ${this.MIN_CODE_LENGTH} and ${this.MAX_CODE_LENGTH} characters`, `string with ${trimmedCode.length} characters`);
|
|
87
|
-
}
|
|
88
|
-
this.codeFormatIsInvalid(trimmedCode, 'code');
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Verifica si el código de segmento está vacío.
|
|
92
|
-
*/
|
|
93
|
-
static codeIsEmpty(code) {
|
|
94
|
-
return code.trim().length === 0;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Verifica si la longitud del código de segmento es inválida.
|
|
98
|
-
*/
|
|
99
|
-
static codeLengthIsInvalid(trimmedCode) {
|
|
100
|
-
return trimmedCode.length < this.MIN_CODE_LENGTH || trimmedCode.length > this.MAX_CODE_LENGTH;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Verifica si el formato del código de segmento es inválido.
|
|
104
|
-
*/
|
|
105
|
-
static codeFormatIsInvalid(trimmedCode, propertyName) {
|
|
106
|
-
Code_1.Code.guardAgainstInvalidCode(trimmedCode, propertyName);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Valida el nombre del segmento de producto.
|
|
110
|
-
*/
|
|
111
|
-
static guardAgainstInvalidSegmentName(name) {
|
|
112
|
-
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
113
|
-
if (this.nameIsEmpty(name)) {
|
|
114
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'non-empty string', 'empty string');
|
|
115
|
-
}
|
|
116
|
-
if (this.nameLengthIsInvalid(name)) {
|
|
117
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', `string with maximum ${this.MAX_NAME_LENGTH} characters`, `string with ${name.trim().length} characters`);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Verifica si el nombre de segmento está vacío.
|
|
122
|
-
*/
|
|
123
|
-
static nameIsEmpty(name) {
|
|
124
|
-
return name.trim().length === 0;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Verifica si la longitud del nombre de segmento es inválida.
|
|
128
|
-
*/
|
|
129
|
-
static nameLengthIsInvalid(name) {
|
|
130
|
-
return name.trim().length > this.MAX_NAME_LENGTH;
|
|
131
|
-
}
|
|
132
62
|
get id() {
|
|
133
63
|
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_id, "f");
|
|
134
64
|
}
|
|
135
|
-
/**
|
|
136
|
-
* Código del segmento de producto.
|
|
137
|
-
*/
|
|
138
|
-
get code() {
|
|
139
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_code, "f");
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Nombre del segmento de producto.
|
|
143
|
-
*/
|
|
144
|
-
get name() {
|
|
145
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f");
|
|
146
|
-
}
|
|
147
65
|
hasId(id) {
|
|
148
66
|
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_id, "f") === id.trim();
|
|
149
67
|
}
|
|
150
|
-
hasName(name) {
|
|
151
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f") === name.trim();
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Verifica si el segmento tiene un código específico.
|
|
155
|
-
*/
|
|
156
|
-
hasCode(code) {
|
|
157
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_code, "f") === code.trim().toUpperCase();
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Verifica si el nombre del segmento contiene una palabra específica.
|
|
161
|
-
*/
|
|
162
|
-
nameContains(keyword) {
|
|
163
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f").toLowerCase().includes(keyword.toLowerCase());
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Verifica si es un segmento de tecnología.
|
|
167
|
-
*/
|
|
168
|
-
isTechnologySegment() {
|
|
169
|
-
const techKeywords = ['tech', 'technology', 'digital', 'software', 'it', 'innovation'];
|
|
170
|
-
return techKeywords.some((keyword) => this.nameContains(keyword));
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Verifica si es un segmento financiero.
|
|
174
|
-
*/
|
|
175
|
-
isFinancialSegment() {
|
|
176
|
-
const financialKeywords = ['financial', 'bank', 'finance', 'insurance', 'investment'];
|
|
177
|
-
return financialKeywords.some((keyword) => this.nameContains(keyword));
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Verifica si es un segmento de manufactura.
|
|
181
|
-
*/
|
|
182
|
-
isManufacturingSegment() {
|
|
183
|
-
const manufacturingKeywords = ['manufacturing', 'production', 'factory', 'industrial'];
|
|
184
|
-
return manufacturingKeywords.some((keyword) => this.nameContains(keyword));
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Verifica si es un segmento de servicios.
|
|
188
|
-
*/
|
|
189
|
-
isServicesSegment() {
|
|
190
|
-
const servicesKeywords = ['services', 'consulting', 'professional', 'advisory'];
|
|
191
|
-
return servicesKeywords.some((keyword) => this.nameContains(keyword));
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Obtiene una representación formateada para mostrar al usuario.
|
|
195
|
-
*/
|
|
196
|
-
getFormattedDisplay() {
|
|
197
|
-
return `${__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_code, "f")} - ${__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f")}`;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Obtiene una versión abreviada del nombre si es muy largo.
|
|
201
|
-
*/
|
|
202
|
-
getAbbreviatedName(maxLength = 50) {
|
|
203
|
-
if (__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f").length <= maxLength) {
|
|
204
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f");
|
|
205
|
-
}
|
|
206
|
-
return `${__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f").substring(0, maxLength - 3)}...`;
|
|
207
|
-
}
|
|
208
68
|
/**
|
|
209
69
|
* Compara la igualdad semántica con otro objeto ProductConfigurationCarbonFootprintSegmentReference.
|
|
210
70
|
*/
|
|
@@ -212,9 +72,7 @@ class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObj
|
|
|
212
72
|
if (this.otherIsNotProductConfigurationCarbonFootprintSegmentReference(other)) {
|
|
213
73
|
return false;
|
|
214
74
|
}
|
|
215
|
-
return
|
|
216
|
-
&& __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_code, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSegmentReference_code, "f")
|
|
217
|
-
&& __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSegmentReference_name, "f"));
|
|
75
|
+
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_id, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSegmentReference_id, "f");
|
|
218
76
|
}
|
|
219
77
|
/**
|
|
220
78
|
* Verifica si el otro objeto no es una instancia de ProductConfigurationCarbonFootprintSegmentReference.
|
|
@@ -222,29 +80,11 @@ class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObj
|
|
|
222
80
|
otherIsNotProductConfigurationCarbonFootprintSegmentReference(other) {
|
|
223
81
|
return (other instanceof ProductConfigurationCarbonFootprintSegmentReference) === false;
|
|
224
82
|
}
|
|
225
|
-
/**
|
|
226
|
-
* Compara si dos segmentos tienen el mismo código.
|
|
227
|
-
*/
|
|
228
|
-
hasSameCode(other) {
|
|
229
|
-
if (this.otherIsNotProductConfigurationCarbonFootprintSegmentReference(other)) {
|
|
230
|
-
return false;
|
|
231
|
-
}
|
|
232
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_code, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSegmentReference_code, "f");
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Compara si dos segmentos tienen el mismo nombre.
|
|
236
|
-
*/
|
|
237
|
-
hasSameName(other) {
|
|
238
|
-
if (this.otherIsNotProductConfigurationCarbonFootprintSegmentReference(other)) {
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSegmentReference_name, "f");
|
|
242
|
-
}
|
|
243
83
|
/**
|
|
244
84
|
* Genera un hash code para usar en colecciones.
|
|
245
85
|
*/
|
|
246
86
|
hashCode() {
|
|
247
|
-
return
|
|
87
|
+
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_id, "f");
|
|
248
88
|
}
|
|
249
89
|
/**
|
|
250
90
|
* Convierte a representación primitiva para persistencia.
|
|
@@ -252,15 +92,13 @@ class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObj
|
|
|
252
92
|
toPrimitives() {
|
|
253
93
|
return {
|
|
254
94
|
id: __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_id, "f"),
|
|
255
|
-
code: __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_code, "f"),
|
|
256
|
-
name: __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_name, "f"),
|
|
257
95
|
};
|
|
258
96
|
}
|
|
259
97
|
/**
|
|
260
|
-
* Representación como string (
|
|
98
|
+
* Representación como string (id del segmento).
|
|
261
99
|
*/
|
|
262
100
|
toString() {
|
|
263
|
-
return __classPrivateFieldGet(this,
|
|
101
|
+
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSegmentReference_id, "f");
|
|
264
102
|
}
|
|
265
103
|
/**
|
|
266
104
|
* Representación JSON para serialización.
|
|
@@ -276,9 +114,5 @@ class ProductConfigurationCarbonFootprintSegmentReference extends ObjectValueObj
|
|
|
276
114
|
}
|
|
277
115
|
}
|
|
278
116
|
exports.ProductConfigurationCarbonFootprintSegmentReference = ProductConfigurationCarbonFootprintSegmentReference;
|
|
279
|
-
_ProductConfigurationCarbonFootprintSegmentReference_id = new WeakMap()
|
|
117
|
+
_ProductConfigurationCarbonFootprintSegmentReference_id = new WeakMap();
|
|
280
118
|
ProductConfigurationCarbonFootprintSegmentReference.DEFAULT_PROPERTY_NAME = 'productSegmentReference';
|
|
281
|
-
// Longitud mínima y máxima para el código de segmento
|
|
282
|
-
ProductConfigurationCarbonFootprintSegmentReference.MIN_CODE_LENGTH = 2;
|
|
283
|
-
ProductConfigurationCarbonFootprintSegmentReference.MAX_CODE_LENGTH = 10;
|
|
284
|
-
ProductConfigurationCarbonFootprintSegmentReference.MAX_NAME_LENGTH = 255;
|
|
@@ -10,13 +10,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _ProductConfigurationCarbonFootprintSubsegmentReference_id
|
|
13
|
+
var _ProductConfigurationCarbonFootprintSubsegmentReference_id;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ProductConfigurationCarbonFootprintSubsegmentReference = void 0;
|
|
16
16
|
const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
|
|
17
17
|
const ObjectValueObject_1 = require("./ObjectValueObject");
|
|
18
18
|
const String_1 = require("./String");
|
|
19
|
-
const Code_1 = require("./Code");
|
|
20
19
|
const AggregateId_1 = require("./AggregateId");
|
|
21
20
|
class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValueObject_1.ObjectValueObject {
|
|
22
21
|
/**
|
|
@@ -26,15 +25,11 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
26
25
|
constructor(value, skipDomainValidation, propertyName = ProductConfigurationCarbonFootprintSubsegmentReference.DEFAULT_PROPERTY_NAME) {
|
|
27
26
|
super(value, skipDomainValidation, propertyName, 'The provided value must be of type ProductConfigurationCarbonFootprintSubsegmentReference from the domain layer', { allowNull: false, allowUndefined: false });
|
|
28
27
|
_ProductConfigurationCarbonFootprintSubsegmentReference_id.set(this, void 0);
|
|
29
|
-
_ProductConfigurationCarbonFootprintSubsegmentReference_code.set(this, void 0);
|
|
30
|
-
_ProductConfigurationCarbonFootprintSubsegmentReference_name.set(this, void 0);
|
|
31
28
|
if (skipDomainValidation === false) {
|
|
32
29
|
ProductConfigurationCarbonFootprintSubsegmentReference
|
|
33
30
|
.validateProductConfigurationCarbonFootprintSubsegmentReference(value, propertyName);
|
|
34
31
|
}
|
|
35
32
|
__classPrivateFieldSet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, value.id.trim(), "f");
|
|
36
|
-
__classPrivateFieldSet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, value.code.trim().toUpperCase(), "f");
|
|
37
|
-
__classPrivateFieldSet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, value.name.trim(), "f");
|
|
38
33
|
}
|
|
39
34
|
/**
|
|
40
35
|
* Validación estática para reutilización en factory methods y constructores.
|
|
@@ -42,8 +37,6 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
42
37
|
static validateProductConfigurationCarbonFootprintSubsegmentReference(value, propertyName) {
|
|
43
38
|
this.guardAgainstInvalidType(value, propertyName);
|
|
44
39
|
this.guardAgainstInvalidId(value.id);
|
|
45
|
-
this.guardAgainstInvalidSubsegmentCode(value.code);
|
|
46
|
-
this.guardAgainstInvalidSubsegmentName(value.name);
|
|
47
40
|
}
|
|
48
41
|
/**
|
|
49
42
|
* Valida que el objeto tenga la estructura correcta.
|
|
@@ -55,12 +48,6 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
55
48
|
if (typeof value.id !== 'string') {
|
|
56
49
|
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
57
50
|
}
|
|
58
|
-
if (typeof value.code !== 'string') {
|
|
59
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
60
|
-
}
|
|
61
|
-
if (typeof value.name !== 'string') {
|
|
62
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
63
|
-
}
|
|
64
51
|
}
|
|
65
52
|
/**
|
|
66
53
|
* Valida si el valor principal es inválido.
|
|
@@ -72,139 +59,12 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
72
59
|
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
73
60
|
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
74
61
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Valida el código del segmento de producto.
|
|
77
|
-
*/
|
|
78
|
-
static guardAgainstInvalidSubsegmentCode(code) {
|
|
79
|
-
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
80
|
-
Code_1.Code.guardAgainstInvalidCode(code);
|
|
81
|
-
if (this.codeIsEmpty(code)) {
|
|
82
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'non-empty string', 'empty string');
|
|
83
|
-
}
|
|
84
|
-
const trimmedCode = code.trim().toUpperCase();
|
|
85
|
-
if (this.codeLengthIsInvalid(trimmedCode)) {
|
|
86
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', `string with length between ${this.MIN_CODE_LENGTH} and ${this.MAX_CODE_LENGTH} characters`, `string with ${trimmedCode.length} characters`);
|
|
87
|
-
}
|
|
88
|
-
this.codeFormatIsInvalid(trimmedCode, 'code');
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Verifica si el código de segmento está vacío.
|
|
92
|
-
*/
|
|
93
|
-
static codeIsEmpty(code) {
|
|
94
|
-
return code.trim().length === 0;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Verifica si la longitud del código de segmento es inválida.
|
|
98
|
-
*/
|
|
99
|
-
static codeLengthIsInvalid(trimmedCode) {
|
|
100
|
-
return trimmedCode.length < this.MIN_CODE_LENGTH || trimmedCode.length > this.MAX_CODE_LENGTH;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Verifica si el formato del código de segmento es inválido.
|
|
104
|
-
*/
|
|
105
|
-
static codeFormatIsInvalid(trimmedCode, propertyName) {
|
|
106
|
-
Code_1.Code.guardAgainstInvalidCode(trimmedCode, propertyName);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Valida el nombre del segmento de producto.
|
|
110
|
-
*/
|
|
111
|
-
static guardAgainstInvalidSubsegmentName(name) {
|
|
112
|
-
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
113
|
-
if (this.nameIsEmpty(name)) {
|
|
114
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'non-empty string', 'empty string');
|
|
115
|
-
}
|
|
116
|
-
if (this.nameLengthIsInvalid(name)) {
|
|
117
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', `string with maximum ${this.MAX_NAME_LENGTH} characters`, `string with ${name.trim().length} characters`);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Verifica si el nombre de segmento está vacío.
|
|
122
|
-
*/
|
|
123
|
-
static nameIsEmpty(name) {
|
|
124
|
-
return name.trim().length === 0;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Verifica si la longitud del nombre de segmento es inválida.
|
|
128
|
-
*/
|
|
129
|
-
static nameLengthIsInvalid(name) {
|
|
130
|
-
return name.trim().length > this.MAX_NAME_LENGTH;
|
|
131
|
-
}
|
|
132
62
|
get id() {
|
|
133
63
|
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f");
|
|
134
64
|
}
|
|
135
|
-
/**
|
|
136
|
-
* Código del segmento de producto.
|
|
137
|
-
*/
|
|
138
|
-
get code() {
|
|
139
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f");
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Nombre del segmento de producto.
|
|
143
|
-
*/
|
|
144
|
-
get name() {
|
|
145
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f");
|
|
146
|
-
}
|
|
147
|
-
hasName(name) {
|
|
148
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f") === name.trim();
|
|
149
|
-
}
|
|
150
65
|
hasId(id) {
|
|
151
66
|
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f") === id.trim();
|
|
152
67
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Verifica si el segmento tiene un código específico.
|
|
155
|
-
*/
|
|
156
|
-
hasCode(code) {
|
|
157
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f") === code.trim().toUpperCase();
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Verifica si el nombre del segmento contiene una palabra específica.
|
|
161
|
-
*/
|
|
162
|
-
nameContains(keyword) {
|
|
163
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f").toLowerCase().includes(keyword.toLowerCase());
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Verifica si es un segmento de tecnología.
|
|
167
|
-
*/
|
|
168
|
-
isTechnologySubsegment() {
|
|
169
|
-
const techKeywords = ['tech', 'technology', 'digital', 'software', 'it', 'innovation'];
|
|
170
|
-
return techKeywords.some((keyword) => this.nameContains(keyword));
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Verifica si es un segmento financiero.
|
|
174
|
-
*/
|
|
175
|
-
isFinancialSubsegment() {
|
|
176
|
-
const financialKeywords = ['financial', 'bank', 'finance', 'insurance', 'investment'];
|
|
177
|
-
return financialKeywords.some((keyword) => this.nameContains(keyword));
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Verifica si es un segmento de manufactura.
|
|
181
|
-
*/
|
|
182
|
-
isManufacturingSubsegment() {
|
|
183
|
-
const manufacturingKeywords = ['manufacturing', 'production', 'factory', 'industrial'];
|
|
184
|
-
return manufacturingKeywords.some((keyword) => this.nameContains(keyword));
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Verifica si es un segmento de servicios.
|
|
188
|
-
*/
|
|
189
|
-
isServicesSubsegment() {
|
|
190
|
-
const servicesKeywords = ['services', 'consulting', 'professional', 'advisory'];
|
|
191
|
-
return servicesKeywords.some((keyword) => this.nameContains(keyword));
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Obtiene una representación formateada para mostrar al usuario.
|
|
195
|
-
*/
|
|
196
|
-
getFormattedDisplay() {
|
|
197
|
-
return `${__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f")} - ${__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f")}`;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Obtiene una versión abreviada del nombre si es muy largo.
|
|
201
|
-
*/
|
|
202
|
-
getAbbreviatedName(maxLength = 50) {
|
|
203
|
-
if (__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f").length <= maxLength) {
|
|
204
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f");
|
|
205
|
-
}
|
|
206
|
-
return `${__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f").substring(0, maxLength - 3)}...`;
|
|
207
|
-
}
|
|
208
68
|
/**
|
|
209
69
|
* Compara la igualdad semántica con otro objeto ProductConfigurationCarbonFootprintSubsegmentReference.
|
|
210
70
|
*/
|
|
@@ -212,9 +72,7 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
212
72
|
if (this.otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other)) {
|
|
213
73
|
return false;
|
|
214
74
|
}
|
|
215
|
-
return
|
|
216
|
-
&& __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f")
|
|
217
|
-
&& __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f"));
|
|
75
|
+
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f");
|
|
218
76
|
}
|
|
219
77
|
/**
|
|
220
78
|
* Verifica si el otro objeto no es una instancia de ProductConfigurationCarbonFootprintSubsegmentReference.
|
|
@@ -222,29 +80,11 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
222
80
|
otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other) {
|
|
223
81
|
return (other instanceof ProductConfigurationCarbonFootprintSubsegmentReference) === false;
|
|
224
82
|
}
|
|
225
|
-
/**
|
|
226
|
-
* Compara si dos segmentos tienen el mismo código.
|
|
227
|
-
*/
|
|
228
|
-
hasSameCode(other) {
|
|
229
|
-
if (this.otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other)) {
|
|
230
|
-
return false;
|
|
231
|
-
}
|
|
232
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f");
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Compara si dos segmentos tienen el mismo nombre.
|
|
236
|
-
*/
|
|
237
|
-
hasSameName(other) {
|
|
238
|
-
if (this.otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other)) {
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f");
|
|
242
|
-
}
|
|
243
83
|
/**
|
|
244
84
|
* Genera un hash code para usar en colecciones.
|
|
245
85
|
*/
|
|
246
86
|
hashCode() {
|
|
247
|
-
return
|
|
87
|
+
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f");
|
|
248
88
|
}
|
|
249
89
|
/**
|
|
250
90
|
* Convierte a representación primitiva para persistencia.
|
|
@@ -252,15 +92,13 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
252
92
|
toPrimitives() {
|
|
253
93
|
return {
|
|
254
94
|
id: __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f"),
|
|
255
|
-
code: __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f"),
|
|
256
|
-
name: __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f"),
|
|
257
95
|
};
|
|
258
96
|
}
|
|
259
97
|
/**
|
|
260
|
-
* Representación como string (
|
|
98
|
+
* Representación como string (id del subsegmento).
|
|
261
99
|
*/
|
|
262
100
|
toString() {
|
|
263
|
-
return __classPrivateFieldGet(this,
|
|
101
|
+
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f");
|
|
264
102
|
}
|
|
265
103
|
/**
|
|
266
104
|
* Representación JSON para serialización.
|
|
@@ -276,9 +114,5 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
276
114
|
}
|
|
277
115
|
}
|
|
278
116
|
exports.ProductConfigurationCarbonFootprintSubsegmentReference = ProductConfigurationCarbonFootprintSubsegmentReference;
|
|
279
|
-
_ProductConfigurationCarbonFootprintSubsegmentReference_id = new WeakMap()
|
|
117
|
+
_ProductConfigurationCarbonFootprintSubsegmentReference_id = new WeakMap();
|
|
280
118
|
ProductConfigurationCarbonFootprintSubsegmentReference.DEFAULT_PROPERTY_NAME = 'productSubsegmentReference';
|
|
281
|
-
// Longitud mínima y máxima para el código de segmento
|
|
282
|
-
ProductConfigurationCarbonFootprintSubsegmentReference.MIN_CODE_LENGTH = 2;
|
|
283
|
-
ProductConfigurationCarbonFootprintSubsegmentReference.MAX_CODE_LENGTH = 10;
|
|
284
|
-
ProductConfigurationCarbonFootprintSubsegmentReference.MAX_NAME_LENGTH = 255;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorporateCarbonFootprintSegmentConfigurationSegment.d.ts","sourceRoot":"","sources":["../../../../../../../../src/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationSegment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qDAAqD,EAAE,MAAM,0FAA0F,CAAC;AACjK,OAAO,EAAE,+DAA+D,EAAE,MAAM,oGAAoG,CAAC;AACrL,OAAO,EAAE,qDAAqD,IAAI,uDAAuD,EAAE,MAAM,kGAAkG,CAAC;AAEpO,qBAAa,mDACX,SAAQ,uDAAuD;IAC/D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAa;IAElD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,qDAAqD,GAAG,mDAAmD;WAIzH,cAAc,CAAC,UAAU,EAAE,+DAA+D,GAAG,mDAAmD;
|
|
1
|
+
{"version":3,"file":"CorporateCarbonFootprintSegmentConfigurationSegment.d.ts","sourceRoot":"","sources":["../../../../../../../../src/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationSegment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qDAAqD,EAAE,MAAM,0FAA0F,CAAC;AACjK,OAAO,EAAE,+DAA+D,EAAE,MAAM,oGAAoG,CAAC;AACrL,OAAO,EAAE,qDAAqD,IAAI,uDAAuD,EAAE,MAAM,kGAAkG,CAAC;AAEpO,qBAAa,mDACX,SAAQ,uDAAuD;IAC/D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAa;IAElD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,qDAAqD,GAAG,mDAAmD;WAIzH,cAAc,CAAC,UAAU,EAAE,+DAA+D,GAAG,mDAAmD;IAQvJ,YAAY,IAAI,+DAA+D;CAGhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorporateConfigurationCarbonFootprintSegmentIncludedSubsegments.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentIncludedSubsegments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qDAAqD,EAAE,MAAM,6FAA6F,CAAC;AACpK,OAAO,EAAE,+DAA+D,EAAE,MAAM,uGAAuG,CAAC;AACxL,OAAO,EAAE,yCAAyC,EAAE,MAAM,sFAAsF,CAAC;AAEjJ,qBAAa,+DACX,SAAQ,yCAAyC;IACjD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,qDAAqD,EAAE,GAAG,+DAA+D;WAIvI,cAAc,CAAC,UAAU,EAAE,+DAA+D,EAAE,GAAG,+DAA+D;
|
|
1
|
+
{"version":3,"file":"CorporateConfigurationCarbonFootprintSegmentIncludedSubsegments.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentIncludedSubsegments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qDAAqD,EAAE,MAAM,6FAA6F,CAAC;AACpK,OAAO,EAAE,+DAA+D,EAAE,MAAM,uGAAuG,CAAC;AACxL,OAAO,EAAE,yCAAyC,EAAE,MAAM,sFAAsF,CAAC;AAEjJ,qBAAa,+DACX,SAAQ,yCAAyC;IACjD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,qDAAqD,EAAE,GAAG,+DAA+D;WAIvI,cAAc,CAAC,UAAU,EAAE,+DAA+D,EAAE,GAAG,+DAA+D;IAQrK,YAAY,IAAI,+DAA+D,EAAE;CAGlG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventEditionLifecycleStageConfigurationStage.d.ts","sourceRoot":"","sources":["../../../../../../../../src/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,wEAAwE,CAAC;AAC7H,OAAO,EAAE,6CAA6C,EAAE,MAAM,kFAAkF,CAAC;AACjJ,OAAO,EAAE,mCAAmC,IAAI,qCAAqC,EAAE,MAAM,gFAAgF,CAAC;AAE9K,qBAAa,4CACX,SAAQ,qCAAqC;IAC7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAW;IAEhD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,mCAAmC,GAAG,4CAA4C;WAIhG,cAAc,CAAC,UAAU,EAAE,6CAA6C,GAAG,4CAA4C;
|
|
1
|
+
{"version":3,"file":"EventEditionLifecycleStageConfigurationStage.d.ts","sourceRoot":"","sources":["../../../../../../../../src/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,wEAAwE,CAAC;AAC7H,OAAO,EAAE,6CAA6C,EAAE,MAAM,kFAAkF,CAAC;AACjJ,OAAO,EAAE,mCAAmC,IAAI,qCAAqC,EAAE,MAAM,gFAAgF,CAAC;AAE9K,qBAAa,4CACX,SAAQ,qCAAqC;IAC7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAW;IAEhD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,mCAAmC,GAAG,4CAA4C;WAIhG,cAAc,CAAC,UAAU,EAAE,6CAA6C,GAAG,4CAA4C;IAQ9H,YAAY,IAAI,6CAA6C;CAG9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventEditionLifecycleStageIncludedSubsegments.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageIncludedSubsegments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2DAA2D,EAAE,MAAM,mGAAmG,CAAC;AAChL,OAAO,EAAE,qEAAqE,EAAE,MAAM,6GAA6G,CAAC;AACpM,OAAO,EAAE,4DAA4D,EAAE,MAAM,4GAA4G,CAAC;AAE1L,qBAAa,6CACX,SAAQ,4DAA4D;IACpE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyB;IAEvD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,2DAA2D,EAAE,GAAG,6CAA6C;WAI3H,cAAc,CAAC,UAAU,EAAE,qEAAqE,EAAE,GAAG,6CAA6C;
|
|
1
|
+
{"version":3,"file":"EventEditionLifecycleStageIncludedSubsegments.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageIncludedSubsegments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2DAA2D,EAAE,MAAM,mGAAmG,CAAC;AAChL,OAAO,EAAE,qEAAqE,EAAE,MAAM,6GAA6G,CAAC;AACpM,OAAO,EAAE,4DAA4D,EAAE,MAAM,4GAA4G,CAAC;AAE1L,qBAAa,6CACX,SAAQ,4DAA4D;IACpE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyB;IAEvD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,2DAA2D,EAAE,GAAG,6CAA6C;WAI3H,cAAc,CAAC,UAAU,EAAE,qEAAqE,EAAE,GAAG,6CAA6C;IAQzJ,YAAY,IAAI,qEAAqE,EAAE;CAGxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCarbonFootprintSegmentConfigurationSegment.d.ts","sourceRoot":"","sources":["../../../../../../../../src/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationSegment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mDAAmD,EAAE,MAAM,wFAAwF,CAAC;AAC7J,OAAO,EAAE,6DAA6D,EAAE,MAAM,kGAAkG,CAAC;AACjL,OAAO,EAAE,mDAAmD,IAAI,qDAAqD,EAAE,MAAM,gGAAgG,CAAC;AAE9N,qBAAa,iDACX,SAAQ,qDAAqD;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAa;IAElD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,mDAAmD,GAAG,iDAAiD;WAIrH,cAAc,CAAC,UAAU,EAAE,6DAA6D,GAAG,iDAAiD;
|
|
1
|
+
{"version":3,"file":"ProductCarbonFootprintSegmentConfigurationSegment.d.ts","sourceRoot":"","sources":["../../../../../../../../src/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationSegment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mDAAmD,EAAE,MAAM,wFAAwF,CAAC;AAC7J,OAAO,EAAE,6DAA6D,EAAE,MAAM,kGAAkG,CAAC;AACjL,OAAO,EAAE,mDAAmD,IAAI,qDAAqD,EAAE,MAAM,gGAAgG,CAAC;AAE9N,qBAAa,iDACX,SAAQ,qDAAqD;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAa;IAElD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,mDAAmD,GAAG,iDAAiD;WAIrH,cAAc,CAAC,UAAU,EAAE,6DAA6D,GAAG,iDAAiD;IAQnJ,YAAY,IAAI,6DAA6D;CAG9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductConfigurationCarbonFootprintSegmentIncludedSubsegments.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentIncludedSubsegments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mDAAmD,EAAE,MAAM,2FAA2F,CAAC;AAChK,OAAO,EAAE,6DAA6D,EAAE,MAAM,qGAAqG,CAAC;AACpL,OAAO,EAAE,yCAAyC,EAAE,MAAM,sFAAsF,CAAC;AAEjJ,qBAAa,6DACX,SAAQ,yCAAyC;IACjD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,mDAAmD,EAAE,GAAG,6DAA6D;WAInI,cAAc,CAAC,UAAU,EAAE,6DAA6D,EAAE,GAAG,6DAA6D;
|
|
1
|
+
{"version":3,"file":"ProductConfigurationCarbonFootprintSegmentIncludedSubsegments.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentIncludedSubsegments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mDAAmD,EAAE,MAAM,2FAA2F,CAAC;AAChK,OAAO,EAAE,6DAA6D,EAAE,MAAM,qGAAqG,CAAC;AACpL,OAAO,EAAE,yCAAyC,EAAE,MAAM,sFAAsF,CAAC;AAEjJ,qBAAa,6DACX,SAAQ,yCAAyC;IACjD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,mDAAmD,EAAE,GAAG,6DAA6D;WAInI,cAAc,CAAC,UAAU,EAAE,6DAA6D,EAAE,GAAG,6DAA6D;IAQjK,YAAY,IAAI,6DAA6D,EAAE;CAGhG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class CalculationWorkflowJobSequence extends
|
|
1
|
+
import { CodeList } from '../../../../shared/domain/value-objects/CodeList';
|
|
2
|
+
export declare class CalculationWorkflowJobSequence extends CodeList {
|
|
3
3
|
private static readonly PROPERTY_NAME;
|
|
4
4
|
private constructor();
|
|
5
5
|
static create(value: string[]): CalculationWorkflowJobSequence;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalculationWorkflowJobSequence.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowJobSequence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CalculationWorkflowJobSequence.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowJobSequence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAE5E,qBAAa,8BACX,SAAQ,QAAQ;IAChB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAEtD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,8BAA8B;WAIvD,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,8BAA8B;IAM3E,YAAY,IAAI,MAAM,EAAE;CAGzC"}
|
|
@@ -8,11 +8,11 @@ export declare class CalculationWorkflowParallelJobs extends ObjectValueObject<s
|
|
|
8
8
|
getJobGroups(): string[][];
|
|
9
9
|
getTotalJobCount(): number;
|
|
10
10
|
getGroupCount(): number;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getJobGroupIndex(
|
|
14
|
-
getJobsInSameGroup(
|
|
15
|
-
canRunInParallel(
|
|
11
|
+
getAllJobCodes(): string[];
|
|
12
|
+
hasJobCode(jobCode: string): boolean;
|
|
13
|
+
getJobGroupIndex(jobCode: string): number;
|
|
14
|
+
getJobsInSameGroup(jobCode: string): string[];
|
|
15
|
+
canRunInParallel(jobCode1: string, jobCode2: string): boolean;
|
|
16
16
|
isEmpty(): boolean;
|
|
17
17
|
toPrimitives(): string[][];
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalculationWorkflowParallelJobs.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowParallelJobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"CalculationWorkflowParallelJobs.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowParallelJobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AAK9F,qBAAa,+BAAgC,SAAQ,iBAAiB,CAAC,MAAM,EAAE,EAAE,CAAC;;IAChF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAkB;IAEvD,OAAO;WAagB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,+BAA+B;WAI1D,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,GAAG,+BAA+B;IAwEvF,YAAY,IAAI,MAAM,EAAE,EAAE;IAI1B,gBAAgB,IAAI,MAAM;IAI1B,aAAa,IAAI,MAAM;IAIvB,cAAc,IAAI,MAAM,EAAE;IAI1B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIpC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIzC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAK7C,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO;IAM7D,OAAO,IAAI,OAAO;IAIT,YAAY,IAAI,MAAM,EAAE,EAAE;CAG3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorporateConfigurationCarbonFootprintSegmentReference.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSegmentReference.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qDAAqD,GAAG;IAClE,EAAE,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"CorporateConfigurationCarbonFootprintSegmentReference.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSegmentReference.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qDAAqD,GAAG;IAClE,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorporateConfigurationCarbonFootprintSegmentReferencePrimitives.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSegmentReferencePrimitives.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,+DAA+D,GAAG;IAC5E,EAAE,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"CorporateConfigurationCarbonFootprintSegmentReferencePrimitives.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/types/CorporateConfigurationCarbonFootprintSegmentReferencePrimitives.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,+DAA+D,GAAG;IAC5E,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
|