@carbonbox/domain 0.4.8 → 0.4.10
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/shared/domain/value-objects/ActivityDataSubmissionReference.js +97 -61
- package/build/carbonbox/shared/domain/value-objects/Address.js +63 -52
- package/build/carbonbox/shared/domain/value-objects/AggregateId.js +13 -18
- package/build/carbonbox/shared/domain/value-objects/Boolean.js +29 -30
- package/build/carbonbox/shared/domain/value-objects/CalculationProcessReference.js +36 -32
- package/build/carbonbox/shared/domain/value-objects/CalculationVariableReferences.js +82 -62
- package/build/carbonbox/shared/domain/value-objects/CarbonClientReference.js +181 -114
- package/build/carbonbox/shared/domain/value-objects/CarbonClientReferences.js +109 -74
- package/build/carbonbox/shared/domain/value-objects/CarbonFootprintConfigurationReference.js +37 -27
- package/build/carbonbox/shared/domain/value-objects/CarbonFootprintIntensityIndicatorReference.js +101 -68
- package/build/carbonbox/shared/domain/value-objects/CarbonFootprintSegmentReferences.js +95 -60
- package/build/carbonbox/shared/domain/value-objects/CodeList.js +57 -41
- package/build/carbonbox/shared/domain/value-objects/CollectionFieldReference.js +74 -49
- package/build/carbonbox/shared/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationReferences.js +171 -116
- package/build/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentReference.js +70 -43
- package/build/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentReference.js +70 -43
- package/build/carbonbox/shared/domain/value-objects/Currency.js +10 -15
- package/build/carbonbox/shared/domain/value-objects/DateString.js +15 -20
- package/build/carbonbox/shared/domain/value-objects/DateTimeString.js +17 -22
- package/build/carbonbox/shared/domain/value-objects/Email.js +9 -14
- package/build/carbonbox/shared/domain/value-objects/EmissionCalculationFormulaReference.js +46 -31
- package/build/carbonbox/shared/domain/value-objects/EmissionCalculationReference.js +102 -77
- package/build/carbonbox/shared/domain/value-objects/EmissionFactorReference.js +56 -40
- package/build/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReference.js +58 -38
- package/build/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReferences.js +95 -60
- package/build/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageConfigurationReferences.js +171 -116
- package/build/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageReference.js +43 -30
- package/build/carbonbox/shared/domain/value-objects/EventEditionReference.js +49 -33
- package/build/carbonbox/shared/domain/value-objects/EventEditionReferences.js +65 -49
- package/build/carbonbox/shared/domain/value-objects/EventReference.js +41 -31
- package/build/carbonbox/shared/domain/value-objects/ExecutionPeriod.js +95 -79
- package/build/carbonbox/shared/domain/value-objects/FacilityReference.js +34 -24
- package/build/carbonbox/shared/domain/value-objects/Gender.js +11 -16
- package/build/carbonbox/shared/domain/value-objects/GlobalWarmingPotentialReference.js +72 -53
- package/build/carbonbox/shared/domain/value-objects/Image.js +46 -38
- package/build/carbonbox/shared/domain/value-objects/Integer.js +13 -18
- package/build/carbonbox/shared/domain/value-objects/NullableCode.js +17 -22
- package/build/carbonbox/shared/domain/value-objects/NullableCorporateConfigurationCarbonFootprintSubsegmentReference.js +49 -31
- package/build/carbonbox/shared/domain/value-objects/NullableDate.js +25 -27
- package/build/carbonbox/shared/domain/value-objects/NullableDateTimeString.js +34 -37
- package/build/carbonbox/shared/domain/value-objects/NullableEventEditionConfigurationCarbonFootprintSubsegmentReference.js +49 -31
- package/build/carbonbox/shared/domain/value-objects/NullableNumeric.js +60 -63
- package/build/carbonbox/shared/domain/value-objects/NullablePositiveInteger.js +4 -11
- package/build/carbonbox/shared/domain/value-objects/NullableProductConfigurationCarbonFootprintSubsegmentReference.js +49 -31
- package/build/carbonbox/shared/domain/value-objects/NullableStakeholderReference.js +8 -8
- package/build/carbonbox/shared/domain/value-objects/NullableString.js +22 -25
- package/build/carbonbox/shared/domain/value-objects/NullableTaxIdentificationNumber.js +43 -35
- package/build/carbonbox/shared/domain/value-objects/Numeric.js +72 -69
- package/build/carbonbox/shared/domain/value-objects/Phone.js +66 -47
- package/build/carbonbox/shared/domain/value-objects/ProductCarbonFootprintSegmentConfigurationReferences.js +176 -121
- package/build/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSegmentReference.js +101 -61
- package/build/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentReference.js +101 -61
- package/build/carbonbox/shared/domain/value-objects/ProductConfigurationSystemBoundaryReference.js +60 -40
- package/build/carbonbox/shared/domain/value-objects/ProductReference.js +46 -31
- package/build/carbonbox/shared/domain/value-objects/ServiceCatalogReference.js +60 -40
- package/build/carbonbox/shared/domain/value-objects/StakeholderReference.js +123 -75
- package/build/carbonbox/shared/domain/value-objects/StakeholderReferences.js +124 -81
- package/build/carbonbox/shared/domain/value-objects/String.js +13 -17
- package/build/carbonbox/shared/domain/value-objects/StringList.js +35 -35
- package/build/carbonbox/shared/domain/value-objects/TaxIdentification.js +121 -85
- package/build/carbonbox/shared/domain/value-objects/TaxIdentificationNumberList.js +57 -52
- package/build/carbonbox/shared/domain/value-objects/Url.js +14 -19
- package/build/carbonbox/shared/domain/value-objects/UrlList.js +57 -41
- package/build/carbonbox/shared/domain/value-objects/UserBusinessStatus.js +17 -22
- package/build/carbonbox/shared/domain/value-objects/UserEmail.js +48 -40
- package/build/carbonbox/shared/domain/value-objects/UserPassword.js +29 -32
- package/build/carbonbox/shared/domain/value-objects/UserPermissions.js +47 -46
- package/build/carbonbox/shared/domain/value-objects/UserType.js +17 -22
- package/build/carbonbox/shared/domain/value-objects/ValueObject.js +17 -16
- package/build/main/index.js +6 -2
- package/build/types/carbonbox/shared/domain/value-objects/ActivityDataSubmissionReference.d.ts +37 -1
- package/build/types/carbonbox/shared/domain/value-objects/ActivityDataSubmissionReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Address.d.ts +22 -4
- package/build/types/carbonbox/shared/domain/value-objects/Address.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/AggregateId.d.ts +4 -3
- package/build/types/carbonbox/shared/domain/value-objects/AggregateId.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/AggregateIdList.d.ts +2 -2
- package/build/types/carbonbox/shared/domain/value-objects/AggregateIdList.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Boolean.d.ts +5 -1
- package/build/types/carbonbox/shared/domain/value-objects/Boolean.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CalculationProcessReference.d.ts +5 -1
- package/build/types/carbonbox/shared/domain/value-objects/CalculationProcessReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CalculationVariableReferences.d.ts +24 -4
- package/build/types/carbonbox/shared/domain/value-objects/CalculationVariableReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CarbonClientReference.d.ts +70 -2
- package/build/types/carbonbox/shared/domain/value-objects/CarbonClientReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CarbonClientReferences.d.ts +39 -2
- package/build/types/carbonbox/shared/domain/value-objects/CarbonClientReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CarbonFootprintConfigurationReference.d.ts +11 -1
- package/build/types/carbonbox/shared/domain/value-objects/CarbonFootprintConfigurationReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CarbonFootprintIntensityIndicatorReference.d.ts +35 -1
- package/build/types/carbonbox/shared/domain/value-objects/CarbonFootprintIntensityIndicatorReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CarbonFootprintSegmentReferences.d.ts +38 -2
- package/build/types/carbonbox/shared/domain/value-objects/CarbonFootprintSegmentReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Code.d.ts +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Code.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CodeList.d.ts +18 -2
- package/build/types/carbonbox/shared/domain/value-objects/CodeList.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CollectionFieldReference.d.ts +26 -1
- package/build/types/carbonbox/shared/domain/value-objects/CollectionFieldReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationReferences.d.ts +64 -2
- 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 +30 -2
- 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 +30 -2
- package/build/types/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Currency.d.ts +3 -2
- package/build/types/carbonbox/shared/domain/value-objects/Currency.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/DateString.d.ts +5 -3
- package/build/types/carbonbox/shared/domain/value-objects/DateString.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/DateTimeString.d.ts +5 -3
- package/build/types/carbonbox/shared/domain/value-objects/DateTimeString.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Email.d.ts +3 -2
- package/build/types/carbonbox/shared/domain/value-objects/Email.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionCalculationFormulaReference.d.ts +16 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionCalculationFormulaReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionCalculationReference.d.ts +26 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionCalculationReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionFactorReference.d.ts +17 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionFactorReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionSource.d.ts +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionSource.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EmissionSources.d.ts +3 -3
- package/build/types/carbonbox/shared/domain/value-objects/EmissionSources.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts +22 -2
- 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 +38 -2
- 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 +64 -2
- 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 +14 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionReference.d.ts +17 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionReferences.d.ts +20 -4
- package/build/types/carbonbox/shared/domain/value-objects/EventEditionReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventReference.d.ts +11 -1
- package/build/types/carbonbox/shared/domain/value-objects/EventReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ExecutionPeriod.d.ts +16 -1
- package/build/types/carbonbox/shared/domain/value-objects/ExecutionPeriod.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/FacilityReference.d.ts +11 -1
- package/build/types/carbonbox/shared/domain/value-objects/FacilityReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Gender.d.ts +4 -3
- package/build/types/carbonbox/shared/domain/value-objects/Gender.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/GlobalWarmingPotentialReference.d.ts +21 -2
- package/build/types/carbonbox/shared/domain/value-objects/GlobalWarmingPotentialReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Image.d.ts +12 -0
- package/build/types/carbonbox/shared/domain/value-objects/Image.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Integer.d.ts +4 -2
- package/build/types/carbonbox/shared/domain/value-objects/Integer.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableCode.d.ts +4 -2
- package/build/types/carbonbox/shared/domain/value-objects/NullableCode.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableCorporateConfigurationCarbonFootprintSubsegmentReference.d.ts +19 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableCorporateConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableDate.d.ts +6 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableDate.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableDateTimeString.d.ts +5 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableDateTimeString.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableEventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts +19 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableEventEditionConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableNumeric.d.ts +6 -2
- package/build/types/carbonbox/shared/domain/value-objects/NullableNumeric.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullablePositiveInteger.d.ts +3 -2
- package/build/types/carbonbox/shared/domain/value-objects/NullablePositiveInteger.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableProductConfigurationCarbonFootprintSubsegmentReference.d.ts +19 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableProductConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableStakeholderReference.d.ts +2 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableStakeholderReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableString.d.ts +5 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableString.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/NullableTaxIdentificationNumber.d.ts +20 -5
- package/build/types/carbonbox/shared/domain/value-objects/NullableTaxIdentificationNumber.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Numeric.d.ts +11 -2
- package/build/types/carbonbox/shared/domain/value-objects/Numeric.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Phone.d.ts +21 -2
- package/build/types/carbonbox/shared/domain/value-objects/Phone.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/PositiveInteger.d.ts +2 -1
- package/build/types/carbonbox/shared/domain/value-objects/PositiveInteger.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ProductCarbonFootprintSegmentConfigurationReferences.d.ts +60 -2
- 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 +45 -4
- 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 +45 -4
- package/build/types/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ProductConfigurationSystemBoundaryReference.d.ts +21 -1
- package/build/types/carbonbox/shared/domain/value-objects/ProductConfigurationSystemBoundaryReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ProductReference.d.ts +16 -1
- package/build/types/carbonbox/shared/domain/value-objects/ProductReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ServiceCatalogReference.d.ts +21 -1
- package/build/types/carbonbox/shared/domain/value-objects/ServiceCatalogReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/StakeholderReference.d.ts +51 -2
- package/build/types/carbonbox/shared/domain/value-objects/StakeholderReference.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/StakeholderReferences.d.ts +46 -2
- package/build/types/carbonbox/shared/domain/value-objects/StakeholderReferences.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/String.d.ts +3 -1
- package/build/types/carbonbox/shared/domain/value-objects/String.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/StringList.d.ts +7 -1
- package/build/types/carbonbox/shared/domain/value-objects/StringList.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/TaxIdentification.d.ts +41 -3
- package/build/types/carbonbox/shared/domain/value-objects/TaxIdentification.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/TaxIdentificationNumber.d.ts +4 -4
- package/build/types/carbonbox/shared/domain/value-objects/TaxIdentificationNumber.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/TaxIdentificationNumberList.d.ts +16 -4
- package/build/types/carbonbox/shared/domain/value-objects/TaxIdentificationNumberList.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/Url.d.ts +2 -1
- package/build/types/carbonbox/shared/domain/value-objects/Url.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/UrlList.d.ts +18 -2
- package/build/types/carbonbox/shared/domain/value-objects/UrlList.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/UserBusinessStatus.d.ts +4 -2
- package/build/types/carbonbox/shared/domain/value-objects/UserBusinessStatus.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/UserEmail.d.ts +10 -1
- package/build/types/carbonbox/shared/domain/value-objects/UserEmail.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/UserPassword.d.ts +7 -3
- package/build/types/carbonbox/shared/domain/value-objects/UserPassword.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/UserPermissions.d.ts +11 -3
- package/build/types/carbonbox/shared/domain/value-objects/UserPermissions.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/UserType.d.ts +4 -2
- package/build/types/carbonbox/shared/domain/value-objects/UserType.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/ValueObject.d.ts +2 -0
- package/build/types/carbonbox/shared/domain/value-objects/ValueObject.d.ts.map +1 -1
- package/build/types/main/index.d.ts +2 -0
- package/build/types/main/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ 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
|
|
13
|
+
var _EventEditionConfigurationCarbonFootprintSubsegmentReferences_subsegmentReferences, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_options;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.EventEditionConfigurationCarbonFootprintSubsegmentReferences = void 0;
|
|
16
16
|
const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
|
|
@@ -24,14 +24,13 @@ class EventEditionConfigurationCarbonFootprintSubsegmentReferences extends Value
|
|
|
24
24
|
* Constructor protegido para que solo clases hijas puedan instanciar.
|
|
25
25
|
* Aplica todas las validaciones de dominio al momento de construcción.
|
|
26
26
|
*/
|
|
27
|
-
constructor(value, skipDomainValidation, propertyName =
|
|
27
|
+
constructor(value, skipDomainValidation, propertyName = EventEditionConfigurationCarbonFootprintSubsegmentReferences.DEFAULT_PROPERTY_NAME, options = EventEditionConfigurationCarbonFootprintSubsegmentReferences.DEFAULT_OPTIONS) {
|
|
28
28
|
super(value, skipDomainValidation, propertyName, 'The provided value must be of type EventEditionConfigurationCarbonFootprintSubsegmentReference[] from the domain layer', { allowNull: false, allowUndefined: false });
|
|
29
|
-
_EventEditionConfigurationCarbonFootprintSubsegmentReferences_instances.add(this);
|
|
30
29
|
_EventEditionConfigurationCarbonFootprintSubsegmentReferences_subsegmentReferences.set(this, void 0);
|
|
31
30
|
_EventEditionConfigurationCarbonFootprintSubsegmentReferences_options.set(this, void 0);
|
|
32
|
-
const finalOptions = { ...
|
|
31
|
+
const finalOptions = { ...EventEditionConfigurationCarbonFootprintSubsegmentReferences.DEFAULT_OPTIONS, ...options };
|
|
33
32
|
if (skipDomainValidation === false) {
|
|
34
|
-
|
|
33
|
+
EventEditionConfigurationCarbonFootprintSubsegmentReferences
|
|
35
34
|
.validateSubsegmentReferences(value, propertyName, finalOptions);
|
|
36
35
|
}
|
|
37
36
|
__classPrivateFieldSet(this, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_subsegmentReferences, [...value], "f"); // Create defensive copy
|
|
@@ -41,13 +40,86 @@ class EventEditionConfigurationCarbonFootprintSubsegmentReferences extends Value
|
|
|
41
40
|
* Validación estática para reutilización en factory methods y constructores.
|
|
42
41
|
*/
|
|
43
42
|
static validateSubsegmentReferences(value, propertyName, options) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
this.guardAgainstInvalidArrayType(value, propertyName);
|
|
44
|
+
this.guardAgainstInvalidEmptyArray(value, options, propertyName);
|
|
45
|
+
this.guardAgainstDuplicateSubsegmentIds(value, propertyName);
|
|
47
46
|
value.forEach((subsegmentReference, index) => {
|
|
48
|
-
|
|
47
|
+
this.guardAgainstInvalidSubsegmentReference(subsegmentReference, index, propertyName);
|
|
49
48
|
});
|
|
50
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Valida que el valor sea un array.
|
|
52
|
+
*/
|
|
53
|
+
static guardAgainstInvalidArrayType(value, propertyName) {
|
|
54
|
+
if (!Array.isArray(value)) {
|
|
55
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'array', typeof value);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Valida que el array no esté vacío si no se permite.
|
|
60
|
+
*/
|
|
61
|
+
static guardAgainstInvalidEmptyArray(value, options, propertyName) {
|
|
62
|
+
if (!options.allowEmpty && value.length === 0) {
|
|
63
|
+
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(propertyName, 'non-empty array', 'empty array');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Valida que no haya códigos de subsegmento duplicados.
|
|
68
|
+
*/
|
|
69
|
+
static guardAgainstDuplicateSubsegmentIds(value, propertyName) {
|
|
70
|
+
const subsegmentIds = value.map((subsegment) => subsegment.id);
|
|
71
|
+
const uniqueIds = new Set(subsegmentIds);
|
|
72
|
+
if (subsegmentIds.length !== uniqueIds.size) {
|
|
73
|
+
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${propertyName}.id`, 'unique subsegment IDs', 'duplicate IDs found');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Valida una referencia de subsegmento individual.
|
|
78
|
+
*/
|
|
79
|
+
static guardAgainstInvalidSubsegmentReference(subsegmentReference, index, basePropertyName) {
|
|
80
|
+
const propertyName = `${basePropertyName}[${index}]`;
|
|
81
|
+
this.guardAgainstInvalidSubsegmentStructure(subsegmentReference, propertyName);
|
|
82
|
+
this.guardAgainstInvalidSubsegmentId(subsegmentReference.id, `${propertyName}.id`);
|
|
83
|
+
this.guardAgainstInvalidSubsegmentCode(subsegmentReference.code, `${propertyName}.code`);
|
|
84
|
+
this.guardAgainstInvalidSubsegmentName(subsegmentReference.name, `${propertyName}.name`);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Valida que el objeto de referencia de subsegmento tenga la estructura correcta.
|
|
88
|
+
*/
|
|
89
|
+
static guardAgainstInvalidSubsegmentStructure(subsegmentReference, propertyName) {
|
|
90
|
+
if (!subsegmentReference || typeof subsegmentReference !== 'object') {
|
|
91
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'EventEditionConfigurationCarbonFootprintSubsegmentReference object', typeof subsegmentReference);
|
|
92
|
+
}
|
|
93
|
+
if (typeof subsegmentReference.id !== 'string') {
|
|
94
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.id`, 'string', typeof subsegmentReference.id);
|
|
95
|
+
}
|
|
96
|
+
if (typeof subsegmentReference.code !== 'string') {
|
|
97
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.code`, 'string', typeof subsegmentReference.code);
|
|
98
|
+
}
|
|
99
|
+
if (typeof subsegmentReference.name !== 'string') {
|
|
100
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.name`, 'string', typeof subsegmentReference.name);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Valida el ID de subsegmento usando las validaciones de AggregateId.
|
|
105
|
+
*/
|
|
106
|
+
static guardAgainstInvalidSubsegmentId(id, propertyName) {
|
|
107
|
+
String_1.String.guardAgainstEmptyValue(id, propertyName);
|
|
108
|
+
AggregateId_1.AggregateId.guardAgainstInvalidId(id, propertyName);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Valida el código de subsegmento usando las validaciones de Code.
|
|
112
|
+
*/
|
|
113
|
+
static guardAgainstInvalidSubsegmentCode(code, propertyName) {
|
|
114
|
+
String_1.String.guardAgainstEmptyValue(code, propertyName);
|
|
115
|
+
Code_1.Code.guardAgainstInvalidCode(code, propertyName);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Valida el nombre del subsegmento.
|
|
119
|
+
*/
|
|
120
|
+
static guardAgainstInvalidSubsegmentName(name, propertyName) {
|
|
121
|
+
String_1.String.guardAgainstEmptyValue(name, propertyName);
|
|
122
|
+
}
|
|
51
123
|
/**
|
|
52
124
|
* Referencias de subsegmentos de etapa de edición de evento (inmutable).
|
|
53
125
|
*/
|
|
@@ -297,7 +369,7 @@ class EventEditionConfigurationCarbonFootprintSubsegmentReferences extends Value
|
|
|
297
369
|
* Compara la igualdad semántica con otra colección de referencias de subsegmento.
|
|
298
370
|
*/
|
|
299
371
|
equals(other) {
|
|
300
|
-
if (!(other instanceof
|
|
372
|
+
if (!(other instanceof EventEditionConfigurationCarbonFootprintSubsegmentReferences)) {
|
|
301
373
|
return false;
|
|
302
374
|
}
|
|
303
375
|
if (__classPrivateFieldGet(this, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_options, "f").allowEmpty !== __classPrivateFieldGet(other, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_options, "f").allowEmpty) {
|
|
@@ -308,9 +380,17 @@ class EventEditionConfigurationCarbonFootprintSubsegmentReferences extends Value
|
|
|
308
380
|
}
|
|
309
381
|
return __classPrivateFieldGet(this, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_subsegmentReferences, "f").every((subsegment, index) => {
|
|
310
382
|
const otherSubsegment = __classPrivateFieldGet(other, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_subsegmentReferences, "f")[index];
|
|
311
|
-
return
|
|
383
|
+
return this.subsegmentReferencesAreEqual(subsegment, otherSubsegment);
|
|
312
384
|
});
|
|
313
385
|
}
|
|
386
|
+
/**
|
|
387
|
+
* Compara si dos referencias de subsegmento son iguales.
|
|
388
|
+
*/
|
|
389
|
+
subsegmentReferencesAreEqual(subsegment1, subsegment2) {
|
|
390
|
+
return (subsegment1.id === subsegment2.id
|
|
391
|
+
&& subsegment1.code === subsegment2.code
|
|
392
|
+
&& subsegment1.name === subsegment2.name);
|
|
393
|
+
}
|
|
314
394
|
/**
|
|
315
395
|
* Genera un hash code para usar en colecciones.
|
|
316
396
|
*/
|
|
@@ -347,10 +427,10 @@ class EventEditionConfigurationCarbonFootprintSubsegmentReferences extends Value
|
|
|
347
427
|
/**
|
|
348
428
|
* Método estático para validar si un array es válido.
|
|
349
429
|
*/
|
|
350
|
-
static isValidSubsegmentReferences(value, options =
|
|
430
|
+
static isValidSubsegmentReferences(value, options = EventEditionConfigurationCarbonFootprintSubsegmentReferences.DEFAULT_OPTIONS) {
|
|
351
431
|
try {
|
|
352
|
-
const finalOptions = { ...
|
|
353
|
-
|
|
432
|
+
const finalOptions = { ...EventEditionConfigurationCarbonFootprintSubsegmentReferences.DEFAULT_OPTIONS, ...options };
|
|
433
|
+
EventEditionConfigurationCarbonFootprintSubsegmentReferences.validateSubsegmentReferences(value, 'test', finalOptions);
|
|
354
434
|
return true;
|
|
355
435
|
}
|
|
356
436
|
catch {
|
|
@@ -359,52 +439,7 @@ class EventEditionConfigurationCarbonFootprintSubsegmentReferences extends Value
|
|
|
359
439
|
}
|
|
360
440
|
}
|
|
361
441
|
exports.EventEditionConfigurationCarbonFootprintSubsegmentReferences = EventEditionConfigurationCarbonFootprintSubsegmentReferences;
|
|
362
|
-
|
|
363
|
-
if (!Array.isArray(value)) {
|
|
364
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'array', typeof value);
|
|
365
|
-
}
|
|
366
|
-
}, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidEmptyArray = function _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidEmptyArray(value, options, propertyName) {
|
|
367
|
-
if (!options.allowEmpty && value.length === 0) {
|
|
368
|
-
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(propertyName, 'non-empty array', 'empty array');
|
|
369
|
-
}
|
|
370
|
-
}, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstDuplicateSubsegmentIds = function _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstDuplicateSubsegmentIds(value, propertyName) {
|
|
371
|
-
const subsegmentIds = value.map((subsegment) => subsegment.id);
|
|
372
|
-
const uniqueIds = new Set(subsegmentIds);
|
|
373
|
-
if (subsegmentIds.length !== uniqueIds.size) {
|
|
374
|
-
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${propertyName}.id`, 'unique subsegment IDs', 'duplicate IDs found');
|
|
375
|
-
}
|
|
376
|
-
}, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentReference = function _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentReference(subsegmentReference, index, basePropertyName) {
|
|
377
|
-
const propertyName = `${basePropertyName}[${index}]`;
|
|
378
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentStructure).call(this, subsegmentReference, propertyName);
|
|
379
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentId).call(this, subsegmentReference.id, `${propertyName}.id`);
|
|
380
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentCode).call(this, subsegmentReference.code, `${propertyName}.code`);
|
|
381
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentName).call(this, subsegmentReference.name, `${propertyName}.name`);
|
|
382
|
-
}, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentStructure = function _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentStructure(subsegmentReference, propertyName) {
|
|
383
|
-
if (!subsegmentReference || typeof subsegmentReference !== 'object') {
|
|
384
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'EventEditionConfigurationCarbonFootprintSubsegmentReference object', typeof subsegmentReference);
|
|
385
|
-
}
|
|
386
|
-
if (typeof subsegmentReference.id !== 'string') {
|
|
387
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.id`, 'string', typeof subsegmentReference.id);
|
|
388
|
-
}
|
|
389
|
-
if (typeof subsegmentReference.code !== 'string') {
|
|
390
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.code`, 'string', typeof subsegmentReference.code);
|
|
391
|
-
}
|
|
392
|
-
if (typeof subsegmentReference.name !== 'string') {
|
|
393
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.name`, 'string', typeof subsegmentReference.name);
|
|
394
|
-
}
|
|
395
|
-
}, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentId = function _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentId(id, propertyName) {
|
|
396
|
-
String_1.String.guardAgainstEmptyValue(id, propertyName);
|
|
397
|
-
AggregateId_1.AggregateId.guardAgainstInvalidId(id, propertyName);
|
|
398
|
-
}, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentCode = function _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentCode(code, propertyName) {
|
|
399
|
-
String_1.String.guardAgainstEmptyValue(code, propertyName);
|
|
400
|
-
Code_1.Code.guardAgainstInvalidCode(code, propertyName);
|
|
401
|
-
}, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentName = function _EventEditionConfigurationCarbonFootprintSubsegmentReferences_guardAgainstInvalidSubsegmentName(name, propertyName) {
|
|
402
|
-
String_1.String.guardAgainstEmptyValue(name, propertyName);
|
|
403
|
-
}, _EventEditionConfigurationCarbonFootprintSubsegmentReferences_subsegmentReferencesAreEqual = function _EventEditionConfigurationCarbonFootprintSubsegmentReferences_subsegmentReferencesAreEqual(subsegment1, subsegment2) {
|
|
404
|
-
return (subsegment1.id === subsegment2.id
|
|
405
|
-
&& subsegment1.code === subsegment2.code
|
|
406
|
-
&& subsegment1.name === subsegment2.name);
|
|
407
|
-
};
|
|
442
|
+
_EventEditionConfigurationCarbonFootprintSubsegmentReferences_subsegmentReferences = new WeakMap(), _EventEditionConfigurationCarbonFootprintSubsegmentReferences_options = new WeakMap();
|
|
408
443
|
EventEditionConfigurationCarbonFootprintSubsegmentReferences.DEFAULT_PROPERTY_NAME = 'eventEditionStageSubsegmentReferences';
|
|
409
444
|
EventEditionConfigurationCarbonFootprintSubsegmentReferences.DEFAULT_OPTIONS = {
|
|
410
445
|
allowEmpty: true,
|
|
@@ -10,7 +10,7 @@ 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
|
|
13
|
+
var _EventEditionLifecycleStageConfigurationReferences_configurations, _EventEditionLifecycleStageConfigurationReferences_options;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.EventEditionLifecycleStageConfigurationReferences = void 0;
|
|
16
16
|
const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
|
|
@@ -25,14 +25,13 @@ class EventEditionLifecycleStageConfigurationReferences extends ValueObject_1.Va
|
|
|
25
25
|
* Constructor protegido para que solo clases hijas puedan instanciar.
|
|
26
26
|
* Aplica todas las validaciones de dominio al momento de construcción.
|
|
27
27
|
*/
|
|
28
|
-
constructor(value, skipDomainValidation, propertyName =
|
|
28
|
+
constructor(value, skipDomainValidation, propertyName = EventEditionLifecycleStageConfigurationReferences.DEFAULT_PROPERTY_NAME, options = EventEditionLifecycleStageConfigurationReferences.DEFAULT_OPTIONS) {
|
|
29
29
|
super(value, skipDomainValidation, propertyName, 'The provided value must be of type EventEditionLifecycleStageConfigurationReference[] from the domain layer', { allowNull: false, allowUndefined: false });
|
|
30
|
-
_EventEditionLifecycleStageConfigurationReferences_instances.add(this);
|
|
31
30
|
_EventEditionLifecycleStageConfigurationReferences_configurations.set(this, void 0);
|
|
32
31
|
_EventEditionLifecycleStageConfigurationReferences_options.set(this, void 0);
|
|
33
|
-
const finalOptions = { ...
|
|
32
|
+
const finalOptions = { ...EventEditionLifecycleStageConfigurationReferences.DEFAULT_OPTIONS, ...options };
|
|
34
33
|
if (skipDomainValidation === false) {
|
|
35
|
-
|
|
34
|
+
EventEditionLifecycleStageConfigurationReferences
|
|
36
35
|
.validateConfigurations(value, propertyName, finalOptions);
|
|
37
36
|
}
|
|
38
37
|
__classPrivateFieldSet(this, _EventEditionLifecycleStageConfigurationReferences_configurations, [...value], "f"); // Create defensive copy
|
|
@@ -42,13 +41,132 @@ class EventEditionLifecycleStageConfigurationReferences extends ValueObject_1.Va
|
|
|
42
41
|
* Validación estática para reutilización en factory methods y constructores.
|
|
43
42
|
*/
|
|
44
43
|
static validateConfigurations(value, propertyName, options) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
this.guardAgainstInvalidArrayType(value, propertyName);
|
|
45
|
+
this.guardAgainstInvalidEmptyArray(value, options, propertyName);
|
|
46
|
+
this.guardAgainstDuplicateConfigurationIds(value, propertyName);
|
|
48
47
|
value.forEach((configuration, index) => {
|
|
49
|
-
|
|
48
|
+
this.guardAgainstInvalidConfiguration(configuration, index, propertyName);
|
|
50
49
|
});
|
|
51
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Valida que el valor sea un array.
|
|
53
|
+
*/
|
|
54
|
+
static guardAgainstInvalidArrayType(value, propertyName) {
|
|
55
|
+
if (!Array.isArray(value)) {
|
|
56
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'array', typeof value);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Valida que el array no esté vacío si no se permite.
|
|
61
|
+
*/
|
|
62
|
+
static guardAgainstInvalidEmptyArray(value, options, propertyName) {
|
|
63
|
+
if (!options.allowEmpty && value.length === 0) {
|
|
64
|
+
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(propertyName, 'non-empty array', 'empty array');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Valida que no haya combinaciones duplicadas de etapa y subsegmento.
|
|
69
|
+
*/
|
|
70
|
+
static guardAgainstDuplicateConfigurationIds(value, propertyName) {
|
|
71
|
+
const configurationIds = value.map((config) => config.id);
|
|
72
|
+
const uniqueIds = new Set(configurationIds);
|
|
73
|
+
if (configurationIds.length !== uniqueIds.size) {
|
|
74
|
+
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${propertyName}.id`, 'unique configuration IDs', 'duplicate IDs found');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Valida una configuración individual.
|
|
79
|
+
*/
|
|
80
|
+
static guardAgainstInvalidConfiguration(configuration, index, basePropertyName) {
|
|
81
|
+
const propertyName = `${basePropertyName}[${index}]`;
|
|
82
|
+
this.guardAgainstInvalidConfigurationStructure(configuration, propertyName);
|
|
83
|
+
this.guardAgainstInvalidConfigurationId(configuration.id, `${propertyName}.id`);
|
|
84
|
+
this.guardAgainstInvalidEventEditionStage(configuration.stage, `${propertyName}.stage`);
|
|
85
|
+
this.guardAgainstInvalidEventEditionStageSubsegment(configuration.subsegment, `${propertyName}.subsegment`);
|
|
86
|
+
this.guardAgainstInvalidEmissionSources(configuration.emissionSources, `${propertyName}.emissionSources`);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Valida que el objeto de configuración tenga la estructura correcta.
|
|
90
|
+
*/
|
|
91
|
+
static guardAgainstInvalidConfigurationStructure(configuration, propertyName) {
|
|
92
|
+
if (!configuration || typeof configuration !== 'object') {
|
|
93
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'EventEditionLifecycleStageConfigurationReference object', typeof configuration);
|
|
94
|
+
}
|
|
95
|
+
if (typeof configuration.id !== 'string') {
|
|
96
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.id`, 'string', typeof configuration.id);
|
|
97
|
+
}
|
|
98
|
+
if (!configuration.stage || typeof configuration.stage !== 'object') {
|
|
99
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.stage`, 'EventEditionLifecycleStageReference object', typeof configuration.stage);
|
|
100
|
+
}
|
|
101
|
+
if (configuration.subsegment !== null && typeof configuration.subsegment !== 'object') {
|
|
102
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.subsegment`, 'EventEditionConfigurationCarbonFootprintSubsegmentReference object or null', typeof configuration.subsegment);
|
|
103
|
+
}
|
|
104
|
+
if (!Array.isArray(configuration.emissionSources)) {
|
|
105
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.emissionSources`, 'EmissionSource array', typeof configuration.emissionSources);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Valida el ID de configuración usando las validaciones de AggregateId.
|
|
110
|
+
*/
|
|
111
|
+
static guardAgainstInvalidConfigurationId(id, propertyName) {
|
|
112
|
+
String_1.String.guardAgainstEmptyValue(id, propertyName);
|
|
113
|
+
AggregateId_1.AggregateId.guardAgainstInvalidId(id, propertyName);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Valida la referencia de etapa de edición de evento.
|
|
117
|
+
*/
|
|
118
|
+
static guardAgainstInvalidEventEditionStage(stage, propertyName) {
|
|
119
|
+
this.guardAgainstInvalidStageReference(stage, propertyName, 'EventEditionLifecycleStageReference');
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Valida la referencia de subsegmento de etapa de edición de evento.
|
|
123
|
+
*/
|
|
124
|
+
static guardAgainstInvalidEventEditionStageSubsegment(subsegment, propertyName) {
|
|
125
|
+
if (subsegment !== null) {
|
|
126
|
+
this.guardAgainstInvalidStageReference(subsegment, propertyName, 'EventEditionConfigurationCarbonFootprintSubsegmentReference');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Valida el array de fuentes de emisión.
|
|
131
|
+
*/
|
|
132
|
+
static guardAgainstInvalidEmissionSources(emissionSources, propertyName) {
|
|
133
|
+
if (!Array.isArray(emissionSources)) {
|
|
134
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'EmissionSource array', typeof emissionSources);
|
|
135
|
+
}
|
|
136
|
+
if (emissionSources.length === 0) {
|
|
137
|
+
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(propertyName, 'non-empty EmissionSource array', 'empty array');
|
|
138
|
+
}
|
|
139
|
+
emissionSources.forEach((emissionSource, index) => {
|
|
140
|
+
if (typeof emissionSource !== 'string') {
|
|
141
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}[${index}]`, 'EmissionSource enum value', typeof emissionSource);
|
|
142
|
+
}
|
|
143
|
+
if (!Object.values(EmissionSource_1.EmissionSource).includes(emissionSource)) {
|
|
144
|
+
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${propertyName}[${index}]`, `valid EmissionSource enum value (${Object.values(EmissionSource_1.EmissionSource).join(', ')})`, emissionSource);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Valida una referencia de etapa genérica.
|
|
150
|
+
*/
|
|
151
|
+
static guardAgainstInvalidStageReference(reference, propertyName, typeName) {
|
|
152
|
+
if (!reference || typeof reference !== 'object') {
|
|
153
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, `${typeName} object`, typeof reference);
|
|
154
|
+
}
|
|
155
|
+
if (typeof reference.id !== 'string') {
|
|
156
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.id`, 'string', typeof reference.id);
|
|
157
|
+
}
|
|
158
|
+
if (typeof reference.code !== 'string') {
|
|
159
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.code`, 'string', typeof reference.code);
|
|
160
|
+
}
|
|
161
|
+
if (typeof reference.name !== 'string') {
|
|
162
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.name`, 'string', typeof reference.name);
|
|
163
|
+
}
|
|
164
|
+
String_1.String.guardAgainstEmptyValue(reference.id, `${propertyName}.id`);
|
|
165
|
+
AggregateId_1.AggregateId.guardAgainstInvalidId(reference.id, `${propertyName}.id`);
|
|
166
|
+
String_1.String.guardAgainstEmptyValue(reference.code, `${propertyName}.code`);
|
|
167
|
+
Code_1.Code.guardAgainstInvalidCode(reference.code);
|
|
168
|
+
String_1.String.guardAgainstEmptyValue(reference.name, `${propertyName}.name`);
|
|
169
|
+
}
|
|
52
170
|
/**
|
|
53
171
|
* Configuraciones de etapa del ciclo de vida de edición de evento (inmutable).
|
|
54
172
|
*/
|
|
@@ -257,7 +375,7 @@ class EventEditionLifecycleStageConfigurationReferences extends ValueObject_1.Va
|
|
|
257
375
|
* Compara la igualdad semántica con otra colección de configuraciones.
|
|
258
376
|
*/
|
|
259
377
|
equals(other) {
|
|
260
|
-
if (!(other instanceof
|
|
378
|
+
if (!(other instanceof EventEditionLifecycleStageConfigurationReferences)) {
|
|
261
379
|
return false;
|
|
262
380
|
}
|
|
263
381
|
if (__classPrivateFieldGet(this, _EventEditionLifecycleStageConfigurationReferences_options, "f").allowEmpty !== __classPrivateFieldGet(other, _EventEditionLifecycleStageConfigurationReferences_options, "f").allowEmpty) {
|
|
@@ -268,9 +386,47 @@ class EventEditionLifecycleStageConfigurationReferences extends ValueObject_1.Va
|
|
|
268
386
|
}
|
|
269
387
|
return __classPrivateFieldGet(this, _EventEditionLifecycleStageConfigurationReferences_configurations, "f").every((config, index) => {
|
|
270
388
|
const otherConfig = __classPrivateFieldGet(other, _EventEditionLifecycleStageConfigurationReferences_configurations, "f")[index];
|
|
271
|
-
return
|
|
389
|
+
return this.configurationsAreEqual(config, otherConfig);
|
|
272
390
|
});
|
|
273
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
* Compara si dos configuraciones son iguales.
|
|
394
|
+
*/
|
|
395
|
+
configurationsAreEqual(config1, config2) {
|
|
396
|
+
return (config1.id === config2.id
|
|
397
|
+
&& this.stageReferencesAreEqual(config1.stage, config2.stage)
|
|
398
|
+
&& this.subsegmentReferencesAreEqual(config1.subsegment, config2.subsegment)
|
|
399
|
+
&& this.emissionSourcesAreEqual(config1.emissionSources, config2.emissionSources));
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Compara referencias de etapa.
|
|
403
|
+
*/
|
|
404
|
+
stageReferencesAreEqual(stage1, stage2) {
|
|
405
|
+
return stage1.id === stage2.id && stage1.code === stage2.code && stage1.name === stage2.name;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Compara referencias de subsegmento.
|
|
409
|
+
*/
|
|
410
|
+
subsegmentReferencesAreEqual(subseg1, subseg2) {
|
|
411
|
+
if (subseg1 === null && subseg2 === null) {
|
|
412
|
+
return true;
|
|
413
|
+
}
|
|
414
|
+
if (subseg1 === null || subseg2 === null) {
|
|
415
|
+
return false;
|
|
416
|
+
}
|
|
417
|
+
return subseg1.id === subseg2.id && subseg1.code === subseg2.code && subseg1.name === subseg2.name;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Compara arrays de fuentes de emisión.
|
|
421
|
+
*/
|
|
422
|
+
emissionSourcesAreEqual(sources1, sources2) {
|
|
423
|
+
if (sources1.length !== sources2.length) {
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
const sorted1 = [...sources1].sort();
|
|
427
|
+
const sorted2 = [...sources2].sort();
|
|
428
|
+
return sorted1.every((source, index) => source === sorted2[index]);
|
|
429
|
+
}
|
|
274
430
|
/**
|
|
275
431
|
* Genera un hash code para usar en colecciones.
|
|
276
432
|
*/
|
|
@@ -316,10 +472,10 @@ class EventEditionLifecycleStageConfigurationReferences extends ValueObject_1.Va
|
|
|
316
472
|
/**
|
|
317
473
|
* Método estático para validar si un array es válido.
|
|
318
474
|
*/
|
|
319
|
-
static isValidConfigurations(value, options =
|
|
475
|
+
static isValidConfigurations(value, options = EventEditionLifecycleStageConfigurationReferences.DEFAULT_OPTIONS) {
|
|
320
476
|
try {
|
|
321
|
-
const finalOptions = { ...
|
|
322
|
-
|
|
477
|
+
const finalOptions = { ...EventEditionLifecycleStageConfigurationReferences.DEFAULT_OPTIONS, ...options };
|
|
478
|
+
EventEditionLifecycleStageConfigurationReferences.validateConfigurations(value, 'test', finalOptions);
|
|
323
479
|
return true;
|
|
324
480
|
}
|
|
325
481
|
catch {
|
|
@@ -328,108 +484,7 @@ class EventEditionLifecycleStageConfigurationReferences extends ValueObject_1.Va
|
|
|
328
484
|
}
|
|
329
485
|
}
|
|
330
486
|
exports.EventEditionLifecycleStageConfigurationReferences = EventEditionLifecycleStageConfigurationReferences;
|
|
331
|
-
|
|
332
|
-
if (!Array.isArray(value)) {
|
|
333
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'array', typeof value);
|
|
334
|
-
}
|
|
335
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEmptyArray = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEmptyArray(value, options, propertyName) {
|
|
336
|
-
if (!options.allowEmpty && value.length === 0) {
|
|
337
|
-
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(propertyName, 'non-empty array', 'empty array');
|
|
338
|
-
}
|
|
339
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstDuplicateConfigurationIds = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstDuplicateConfigurationIds(value, propertyName) {
|
|
340
|
-
const configurationIds = value.map((config) => config.id);
|
|
341
|
-
const uniqueIds = new Set(configurationIds);
|
|
342
|
-
if (configurationIds.length !== uniqueIds.size) {
|
|
343
|
-
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${propertyName}.id`, 'unique configuration IDs', 'duplicate IDs found');
|
|
344
|
-
}
|
|
345
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidConfiguration = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidConfiguration(configuration, index, basePropertyName) {
|
|
346
|
-
const propertyName = `${basePropertyName}[${index}]`;
|
|
347
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidConfigurationStructure).call(this, configuration, propertyName);
|
|
348
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidConfigurationId).call(this, configuration.id, `${propertyName}.id`);
|
|
349
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEventEditionStage).call(this, configuration.stage, `${propertyName}.stage`);
|
|
350
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEventEditionStageSubsegment).call(this, configuration.subsegment, `${propertyName}.subsegment`);
|
|
351
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEmissionSources).call(this, configuration.emissionSources, `${propertyName}.emissionSources`);
|
|
352
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidConfigurationStructure = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidConfigurationStructure(configuration, propertyName) {
|
|
353
|
-
if (!configuration || typeof configuration !== 'object') {
|
|
354
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'EventEditionLifecycleStageConfigurationReference object', typeof configuration);
|
|
355
|
-
}
|
|
356
|
-
if (typeof configuration.id !== 'string') {
|
|
357
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.id`, 'string', typeof configuration.id);
|
|
358
|
-
}
|
|
359
|
-
if (!configuration.stage || typeof configuration.stage !== 'object') {
|
|
360
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.stage`, 'EventEditionLifecycleStageReference object', typeof configuration.stage);
|
|
361
|
-
}
|
|
362
|
-
if (configuration.subsegment !== null && typeof configuration.subsegment !== 'object') {
|
|
363
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.subsegment`, 'EventEditionConfigurationCarbonFootprintSubsegmentReference object or null', typeof configuration.subsegment);
|
|
364
|
-
}
|
|
365
|
-
if (!Array.isArray(configuration.emissionSources)) {
|
|
366
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.emissionSources`, 'EmissionSource array', typeof configuration.emissionSources);
|
|
367
|
-
}
|
|
368
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidConfigurationId = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidConfigurationId(id, propertyName) {
|
|
369
|
-
String_1.String.guardAgainstEmptyValue(id, propertyName);
|
|
370
|
-
AggregateId_1.AggregateId.guardAgainstInvalidId(id, propertyName);
|
|
371
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEventEditionStage = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEventEditionStage(stage, propertyName) {
|
|
372
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidStageReference).call(this, stage, propertyName, 'EventEditionLifecycleStageReference');
|
|
373
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEventEditionStageSubsegment = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEventEditionStageSubsegment(subsegment, propertyName) {
|
|
374
|
-
if (subsegment !== null) {
|
|
375
|
-
__classPrivateFieldGet(this, _a, "m", _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidStageReference).call(this, subsegment, propertyName, 'EventEditionConfigurationCarbonFootprintSubsegmentReference');
|
|
376
|
-
}
|
|
377
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEmissionSources = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidEmissionSources(emissionSources, propertyName) {
|
|
378
|
-
if (!Array.isArray(emissionSources)) {
|
|
379
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'EmissionSource array', typeof emissionSources);
|
|
380
|
-
}
|
|
381
|
-
if (emissionSources.length === 0) {
|
|
382
|
-
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(propertyName, 'non-empty EmissionSource array', 'empty array');
|
|
383
|
-
}
|
|
384
|
-
emissionSources.forEach((emissionSource, index) => {
|
|
385
|
-
if (typeof emissionSource !== 'string') {
|
|
386
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}[${index}]`, 'EmissionSource enum value', typeof emissionSource);
|
|
387
|
-
}
|
|
388
|
-
if (!Object.values(EmissionSource_1.EmissionSource).includes(emissionSource)) {
|
|
389
|
-
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${propertyName}[${index}]`, `valid EmissionSource enum value (${Object.values(EmissionSource_1.EmissionSource).join(', ')})`, emissionSource);
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
}, _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidStageReference = function _EventEditionLifecycleStageConfigurationReferences_guardAgainstInvalidStageReference(reference, propertyName, typeName) {
|
|
393
|
-
if (!reference || typeof reference !== 'object') {
|
|
394
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, `${typeName} object`, typeof reference);
|
|
395
|
-
}
|
|
396
|
-
if (typeof reference.id !== 'string') {
|
|
397
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.id`, 'string', typeof reference.id);
|
|
398
|
-
}
|
|
399
|
-
if (typeof reference.code !== 'string') {
|
|
400
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.code`, 'string', typeof reference.code);
|
|
401
|
-
}
|
|
402
|
-
if (typeof reference.name !== 'string') {
|
|
403
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.name`, 'string', typeof reference.name);
|
|
404
|
-
}
|
|
405
|
-
String_1.String.guardAgainstEmptyValue(reference.id, `${propertyName}.id`);
|
|
406
|
-
AggregateId_1.AggregateId.guardAgainstInvalidId(reference.id, `${propertyName}.id`);
|
|
407
|
-
String_1.String.guardAgainstEmptyValue(reference.code, `${propertyName}.code`);
|
|
408
|
-
Code_1.Code.guardAgainstInvalidCode(reference.code);
|
|
409
|
-
String_1.String.guardAgainstEmptyValue(reference.name, `${propertyName}.name`);
|
|
410
|
-
}, _EventEditionLifecycleStageConfigurationReferences_configurationsAreEqual = function _EventEditionLifecycleStageConfigurationReferences_configurationsAreEqual(config1, config2) {
|
|
411
|
-
return (config1.id === config2.id
|
|
412
|
-
&& __classPrivateFieldGet(this, _EventEditionLifecycleStageConfigurationReferences_instances, "m", _EventEditionLifecycleStageConfigurationReferences_stageReferencesAreEqual).call(this, config1.stage, config2.stage)
|
|
413
|
-
&& __classPrivateFieldGet(this, _EventEditionLifecycleStageConfigurationReferences_instances, "m", _EventEditionLifecycleStageConfigurationReferences_subsegmentReferencesAreEqual).call(this, config1.subsegment, config2.subsegment)
|
|
414
|
-
&& __classPrivateFieldGet(this, _EventEditionLifecycleStageConfigurationReferences_instances, "m", _EventEditionLifecycleStageConfigurationReferences_emissionSourcesAreEqual).call(this, config1.emissionSources, config2.emissionSources));
|
|
415
|
-
}, _EventEditionLifecycleStageConfigurationReferences_stageReferencesAreEqual = function _EventEditionLifecycleStageConfigurationReferences_stageReferencesAreEqual(stage1, stage2) {
|
|
416
|
-
return stage1.id === stage2.id && stage1.code === stage2.code && stage1.name === stage2.name;
|
|
417
|
-
}, _EventEditionLifecycleStageConfigurationReferences_subsegmentReferencesAreEqual = function _EventEditionLifecycleStageConfigurationReferences_subsegmentReferencesAreEqual(subseg1, subseg2) {
|
|
418
|
-
if (subseg1 === null && subseg2 === null) {
|
|
419
|
-
return true;
|
|
420
|
-
}
|
|
421
|
-
if (subseg1 === null || subseg2 === null) {
|
|
422
|
-
return false;
|
|
423
|
-
}
|
|
424
|
-
return subseg1.id === subseg2.id && subseg1.code === subseg2.code && subseg1.name === subseg2.name;
|
|
425
|
-
}, _EventEditionLifecycleStageConfigurationReferences_emissionSourcesAreEqual = function _EventEditionLifecycleStageConfigurationReferences_emissionSourcesAreEqual(sources1, sources2) {
|
|
426
|
-
if (sources1.length !== sources2.length) {
|
|
427
|
-
return false;
|
|
428
|
-
}
|
|
429
|
-
const sorted1 = [...sources1].sort();
|
|
430
|
-
const sorted2 = [...sources2].sort();
|
|
431
|
-
return sorted1.every((source, index) => source === sorted2[index]);
|
|
432
|
-
};
|
|
487
|
+
_EventEditionLifecycleStageConfigurationReferences_configurations = new WeakMap(), _EventEditionLifecycleStageConfigurationReferences_options = new WeakMap();
|
|
433
488
|
EventEditionLifecycleStageConfigurationReferences.DEFAULT_PROPERTY_NAME = 'eventEditionLifecycleStageConfigurationReferences';
|
|
434
489
|
EventEditionLifecycleStageConfigurationReferences.DEFAULT_OPTIONS = {
|
|
435
490
|
allowEmpty: false, // Por defecto no permite estar vacío
|