@carbonbox/domain 0.4.8 → 0.4.9
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/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/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 _ProductConfigurationCarbonFootprintSubsegmentReference_id, _ProductConfigurationCarbonFootprintSubsegmentReference_code, _ProductConfigurationCarbonFootprintSubsegmentReference_name;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ProductConfigurationCarbonFootprintSubsegmentReference = void 0;
|
|
16
16
|
const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
|
|
@@ -23,14 +23,13 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
23
23
|
* Constructor protegido para que solo clases hijas puedan instanciar.
|
|
24
24
|
* Aplica todas las validaciones de dominio al momento de construcción.
|
|
25
25
|
*/
|
|
26
|
-
constructor(value, skipDomainValidation, propertyName =
|
|
26
|
+
constructor(value, skipDomainValidation, propertyName = ProductConfigurationCarbonFootprintSubsegmentReference.DEFAULT_PROPERTY_NAME) {
|
|
27
27
|
super(value, skipDomainValidation, propertyName, 'The provided value must be of type ProductConfigurationCarbonFootprintSubsegmentReference from the domain layer', { allowNull: false, allowUndefined: false });
|
|
28
|
-
_ProductConfigurationCarbonFootprintSubsegmentReference_instances.add(this);
|
|
29
28
|
_ProductConfigurationCarbonFootprintSubsegmentReference_id.set(this, void 0);
|
|
30
29
|
_ProductConfigurationCarbonFootprintSubsegmentReference_code.set(this, void 0);
|
|
31
30
|
_ProductConfigurationCarbonFootprintSubsegmentReference_name.set(this, void 0);
|
|
32
31
|
if (skipDomainValidation === false) {
|
|
33
|
-
|
|
32
|
+
ProductConfigurationCarbonFootprintSubsegmentReference
|
|
34
33
|
.validateProductConfigurationCarbonFootprintSubsegmentReference(value, propertyName);
|
|
35
34
|
}
|
|
36
35
|
__classPrivateFieldSet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, value.id.trim(), "f");
|
|
@@ -41,10 +40,94 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
41
40
|
* Validación estática para reutilización en factory methods y constructores.
|
|
42
41
|
*/
|
|
43
42
|
static validateProductConfigurationCarbonFootprintSubsegmentReference(value, propertyName) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
this.guardAgainstInvalidType(value, propertyName);
|
|
44
|
+
this.guardAgainstInvalidId(value.id);
|
|
45
|
+
this.guardAgainstInvalidSubsegmentCode(value.code);
|
|
46
|
+
this.guardAgainstInvalidSubsegmentName(value.name);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Valida que el objeto tenga la estructura correcta.
|
|
50
|
+
*/
|
|
51
|
+
static guardAgainstInvalidType(value, propertyName) {
|
|
52
|
+
if (this.valueIsInvalid(value)) {
|
|
53
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ProductConfigurationCarbonFootprintSubsegmentReference object', typeof value);
|
|
54
|
+
}
|
|
55
|
+
if (typeof value.id !== 'string') {
|
|
56
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
57
|
+
}
|
|
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
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Valida si el valor principal es inválido.
|
|
67
|
+
*/
|
|
68
|
+
static valueIsInvalid(value) {
|
|
69
|
+
return value === null || value === undefined || typeof value !== 'object';
|
|
70
|
+
}
|
|
71
|
+
static guardAgainstInvalidId(id) {
|
|
72
|
+
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
73
|
+
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
74
|
+
}
|
|
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;
|
|
48
131
|
}
|
|
49
132
|
get id() {
|
|
50
133
|
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f");
|
|
@@ -126,18 +209,24 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
126
209
|
* Compara la igualdad semántica con otro objeto ProductConfigurationCarbonFootprintSubsegmentReference.
|
|
127
210
|
*/
|
|
128
211
|
equals(other) {
|
|
129
|
-
if (
|
|
212
|
+
if (this.otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other)) {
|
|
130
213
|
return false;
|
|
131
214
|
}
|
|
132
215
|
return (__classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_id, "f")
|
|
133
216
|
&& __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f")
|
|
134
217
|
&& __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f"));
|
|
135
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* Verifica si el otro objeto no es una instancia de ProductConfigurationCarbonFootprintSubsegmentReference.
|
|
221
|
+
*/
|
|
222
|
+
otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other) {
|
|
223
|
+
return (other instanceof ProductConfigurationCarbonFootprintSubsegmentReference) === false;
|
|
224
|
+
}
|
|
136
225
|
/**
|
|
137
226
|
* Compara si dos segmentos tienen el mismo código.
|
|
138
227
|
*/
|
|
139
228
|
hasSameCode(other) {
|
|
140
|
-
if (
|
|
229
|
+
if (this.otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other)) {
|
|
141
230
|
return false;
|
|
142
231
|
}
|
|
143
232
|
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_code, "f");
|
|
@@ -146,7 +235,7 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
146
235
|
* Compara si dos segmentos tienen el mismo nombre.
|
|
147
236
|
*/
|
|
148
237
|
hasSameName(other) {
|
|
149
|
-
if (
|
|
238
|
+
if (this.otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other)) {
|
|
150
239
|
return false;
|
|
151
240
|
}
|
|
152
241
|
return __classPrivateFieldGet(this, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f") === __classPrivateFieldGet(other, _ProductConfigurationCarbonFootprintSubsegmentReference_name, "f");
|
|
@@ -187,56 +276,7 @@ class ProductConfigurationCarbonFootprintSubsegmentReference extends ObjectValue
|
|
|
187
276
|
}
|
|
188
277
|
}
|
|
189
278
|
exports.ProductConfigurationCarbonFootprintSubsegmentReference = ProductConfigurationCarbonFootprintSubsegmentReference;
|
|
190
|
-
|
|
191
|
-
if (__classPrivateFieldGet(this, _a, "m", _ProductConfigurationCarbonFootprintSubsegmentReference_valueIsInvalid).call(this, value)) {
|
|
192
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ProductConfigurationCarbonFootprintSubsegmentReference object', typeof value);
|
|
193
|
-
}
|
|
194
|
-
if (typeof value.id !== 'string') {
|
|
195
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
196
|
-
}
|
|
197
|
-
if (typeof value.code !== 'string') {
|
|
198
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
199
|
-
}
|
|
200
|
-
if (typeof value.name !== 'string') {
|
|
201
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
202
|
-
}
|
|
203
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_valueIsInvalid = function _ProductConfigurationCarbonFootprintSubsegmentReference_valueIsInvalid(value) {
|
|
204
|
-
return value === null || value === undefined || typeof value !== 'object';
|
|
205
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_guardAgainstInvalidId = function _ProductConfigurationCarbonFootprintSubsegmentReference_guardAgainstInvalidId(id) {
|
|
206
|
-
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
207
|
-
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
208
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_guardAgainstInvalidSubsegmentCode = function _ProductConfigurationCarbonFootprintSubsegmentReference_guardAgainstInvalidSubsegmentCode(code) {
|
|
209
|
-
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
210
|
-
Code_1.Code.guardAgainstInvalidCode(code);
|
|
211
|
-
if (__classPrivateFieldGet(this, _a, "m", _ProductConfigurationCarbonFootprintSubsegmentReference_codeIsEmpty).call(this, code)) {
|
|
212
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'non-empty string', 'empty string');
|
|
213
|
-
}
|
|
214
|
-
const trimmedCode = code.trim().toUpperCase();
|
|
215
|
-
if (__classPrivateFieldGet(this, _a, "m", _ProductConfigurationCarbonFootprintSubsegmentReference_codeLengthIsInvalid).call(this, trimmedCode)) {
|
|
216
|
-
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`);
|
|
217
|
-
}
|
|
218
|
-
__classPrivateFieldGet(this, _a, "m", _ProductConfigurationCarbonFootprintSubsegmentReference_codeFormatIsInvalid).call(this, trimmedCode, 'code');
|
|
219
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_codeIsEmpty = function _ProductConfigurationCarbonFootprintSubsegmentReference_codeIsEmpty(code) {
|
|
220
|
-
return code.trim().length === 0;
|
|
221
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_codeLengthIsInvalid = function _ProductConfigurationCarbonFootprintSubsegmentReference_codeLengthIsInvalid(trimmedCode) {
|
|
222
|
-
return trimmedCode.length < this.MIN_CODE_LENGTH || trimmedCode.length > this.MAX_CODE_LENGTH;
|
|
223
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_codeFormatIsInvalid = function _ProductConfigurationCarbonFootprintSubsegmentReference_codeFormatIsInvalid(trimmedCode, propertyName) {
|
|
224
|
-
Code_1.Code.guardAgainstInvalidCode(trimmedCode, propertyName);
|
|
225
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_guardAgainstInvalidSubsegmentName = function _ProductConfigurationCarbonFootprintSubsegmentReference_guardAgainstInvalidSubsegmentName(name) {
|
|
226
|
-
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
227
|
-
if (__classPrivateFieldGet(this, _a, "m", _ProductConfigurationCarbonFootprintSubsegmentReference_nameIsEmpty).call(this, name)) {
|
|
228
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'non-empty string', 'empty string');
|
|
229
|
-
}
|
|
230
|
-
if (__classPrivateFieldGet(this, _a, "m", _ProductConfigurationCarbonFootprintSubsegmentReference_nameLengthIsInvalid).call(this, name)) {
|
|
231
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', `string with maximum ${this.MAX_NAME_LENGTH} characters`, `string with ${name.trim().length} characters`);
|
|
232
|
-
}
|
|
233
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_nameIsEmpty = function _ProductConfigurationCarbonFootprintSubsegmentReference_nameIsEmpty(name) {
|
|
234
|
-
return name.trim().length === 0;
|
|
235
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_nameLengthIsInvalid = function _ProductConfigurationCarbonFootprintSubsegmentReference_nameLengthIsInvalid(name) {
|
|
236
|
-
return name.trim().length > this.MAX_NAME_LENGTH;
|
|
237
|
-
}, _ProductConfigurationCarbonFootprintSubsegmentReference_otherIsNotProductConfigurationCarbonFootprintSubsegmentReference = function _ProductConfigurationCarbonFootprintSubsegmentReference_otherIsNotProductConfigurationCarbonFootprintSubsegmentReference(other) {
|
|
238
|
-
return (other instanceof _a) === false;
|
|
239
|
-
};
|
|
279
|
+
_ProductConfigurationCarbonFootprintSubsegmentReference_id = new WeakMap(), _ProductConfigurationCarbonFootprintSubsegmentReference_code = new WeakMap(), _ProductConfigurationCarbonFootprintSubsegmentReference_name = new WeakMap();
|
|
240
280
|
ProductConfigurationCarbonFootprintSubsegmentReference.DEFAULT_PROPERTY_NAME = 'productSubsegmentReference';
|
|
241
281
|
// Longitud mínima y máxima para el código de segmento
|
|
242
282
|
ProductConfigurationCarbonFootprintSubsegmentReference.MIN_CODE_LENGTH = 2;
|
package/build/carbonbox/shared/domain/value-objects/ProductConfigurationSystemBoundaryReference.js
CHANGED
|
@@ -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 _ProductConfigurationSystemBoundaryReference_id, _ProductConfigurationSystemBoundaryReference_code, _ProductConfigurationSystemBoundaryReference_name, _ProductConfigurationSystemBoundaryReference_type;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ProductConfigurationSystemBoundaryReference = void 0;
|
|
16
16
|
const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
|
|
@@ -24,14 +24,14 @@ class ProductConfigurationSystemBoundaryReference extends ObjectValueObject_1.Ob
|
|
|
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 = ProductConfigurationSystemBoundaryReference.DEFAULT_PROPERTY_NAME) {
|
|
28
28
|
super(value, skipDomainValidation, propertyName, 'The provided value must be of type ProductConfigurationSystemBoundaryReference from the domain layer', { allowNull: false, allowUndefined: false });
|
|
29
29
|
_ProductConfigurationSystemBoundaryReference_id.set(this, void 0);
|
|
30
30
|
_ProductConfigurationSystemBoundaryReference_code.set(this, void 0);
|
|
31
31
|
_ProductConfigurationSystemBoundaryReference_name.set(this, void 0);
|
|
32
32
|
_ProductConfigurationSystemBoundaryReference_type.set(this, void 0);
|
|
33
33
|
if (skipDomainValidation === false) {
|
|
34
|
-
|
|
34
|
+
ProductConfigurationSystemBoundaryReference
|
|
35
35
|
.validateProductConfigurationSystemBoundaryReference(value, propertyName);
|
|
36
36
|
}
|
|
37
37
|
__classPrivateFieldSet(this, _ProductConfigurationSystemBoundaryReference_id, value.id.trim(), "f");
|
|
@@ -43,11 +43,60 @@ class ProductConfigurationSystemBoundaryReference extends ObjectValueObject_1.Ob
|
|
|
43
43
|
* Validación estática para reutilización en factory methods y constructores.
|
|
44
44
|
*/
|
|
45
45
|
static validateProductConfigurationSystemBoundaryReference(value, propertyName) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
this.guardAgainstInvalidType(value, propertyName);
|
|
47
|
+
this.guardAgainstInvalidId(value.id);
|
|
48
|
+
this.guardAgainstInvalidBoundaryCode(value.code);
|
|
49
|
+
this.guardAgainstInvalidBoundaryName(value.name);
|
|
50
|
+
this.guardAgainstInvalidBoundaryType(value.type);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Valida que el objeto tenga la estructura correcta.
|
|
54
|
+
*/
|
|
55
|
+
static guardAgainstInvalidType(value, propertyName) {
|
|
56
|
+
if (!value || typeof value !== 'object') {
|
|
57
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ProductConfigurationSystemBoundaryReference object', typeof value);
|
|
58
|
+
}
|
|
59
|
+
if (typeof value.id !== 'string') {
|
|
60
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
61
|
+
}
|
|
62
|
+
if (typeof value.code !== 'string') {
|
|
63
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
64
|
+
}
|
|
65
|
+
if (typeof value.name !== 'string') {
|
|
66
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
67
|
+
}
|
|
68
|
+
if (typeof value.type !== 'string') {
|
|
69
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'ProductConfigurationSystemBoundary', typeof value.type);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
static guardAgainstInvalidId(id) {
|
|
73
|
+
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
74
|
+
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Valida el código de límite del sistema usando las validaciones de Code.
|
|
78
|
+
* El código debe ser un UUID válido.
|
|
79
|
+
*/
|
|
80
|
+
static guardAgainstInvalidBoundaryCode(code) {
|
|
81
|
+
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
82
|
+
Code_1.Code.guardAgainstInvalidCode(code);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Valida el nombre del límite del sistema.
|
|
86
|
+
* No debe ser vacío después de aplicar trim.
|
|
87
|
+
*/
|
|
88
|
+
static guardAgainstInvalidBoundaryName(name) {
|
|
89
|
+
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Valida el tipo de límite del sistema.
|
|
93
|
+
* Debe ser un valor válido del enum ProductConfigurationSystemBoundary.
|
|
94
|
+
*/
|
|
95
|
+
static guardAgainstInvalidBoundaryType(type) {
|
|
96
|
+
const validTypes = Object.values(SystemBoundary_1.SystemBoundary);
|
|
97
|
+
if (!validTypes.includes(type)) {
|
|
98
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'valid SystemBoundary', type);
|
|
99
|
+
}
|
|
51
100
|
}
|
|
52
101
|
get id() {
|
|
53
102
|
return __classPrivateFieldGet(this, _ProductConfigurationSystemBoundaryReference_id, "f");
|
|
@@ -211,7 +260,7 @@ class ProductConfigurationSystemBoundaryReference extends ObjectValueObject_1.Ob
|
|
|
211
260
|
* Dos referencias son iguales si tienen el mismo código, nombre y tipo.
|
|
212
261
|
*/
|
|
213
262
|
equals(other) {
|
|
214
|
-
if (!(other instanceof
|
|
263
|
+
if (!(other instanceof ProductConfigurationSystemBoundaryReference)) {
|
|
215
264
|
return false;
|
|
216
265
|
}
|
|
217
266
|
return (__classPrivateFieldGet(this, _ProductConfigurationSystemBoundaryReference_id, "f") === __classPrivateFieldGet(other, _ProductConfigurationSystemBoundaryReference_id, "f")
|
|
@@ -224,7 +273,7 @@ class ProductConfigurationSystemBoundaryReference extends ObjectValueObject_1.Ob
|
|
|
224
273
|
* basándose únicamente en el código (identificador único).
|
|
225
274
|
*/
|
|
226
275
|
hasSameBoundary(other) {
|
|
227
|
-
if (!(other instanceof
|
|
276
|
+
if (!(other instanceof ProductConfigurationSystemBoundaryReference)) {
|
|
228
277
|
return false;
|
|
229
278
|
}
|
|
230
279
|
return __classPrivateFieldGet(this, _ProductConfigurationSystemBoundaryReference_code, "f") === __classPrivateFieldGet(other, _ProductConfigurationSystemBoundaryReference_code, "f");
|
|
@@ -261,34 +310,5 @@ class ProductConfigurationSystemBoundaryReference extends ObjectValueObject_1.Ob
|
|
|
261
310
|
}
|
|
262
311
|
}
|
|
263
312
|
exports.ProductConfigurationSystemBoundaryReference = ProductConfigurationSystemBoundaryReference;
|
|
264
|
-
|
|
265
|
-
if (!value || typeof value !== 'object') {
|
|
266
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ProductConfigurationSystemBoundaryReference object', typeof value);
|
|
267
|
-
}
|
|
268
|
-
if (typeof value.id !== 'string') {
|
|
269
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
270
|
-
}
|
|
271
|
-
if (typeof value.code !== 'string') {
|
|
272
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
273
|
-
}
|
|
274
|
-
if (typeof value.name !== 'string') {
|
|
275
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
276
|
-
}
|
|
277
|
-
if (typeof value.type !== 'string') {
|
|
278
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'ProductConfigurationSystemBoundary', typeof value.type);
|
|
279
|
-
}
|
|
280
|
-
}, _ProductConfigurationSystemBoundaryReference_guardAgainstInvalidId = function _ProductConfigurationSystemBoundaryReference_guardAgainstInvalidId(id) {
|
|
281
|
-
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
282
|
-
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
283
|
-
}, _ProductConfigurationSystemBoundaryReference_guardAgainstInvalidBoundaryCode = function _ProductConfigurationSystemBoundaryReference_guardAgainstInvalidBoundaryCode(code) {
|
|
284
|
-
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
285
|
-
Code_1.Code.guardAgainstInvalidCode(code);
|
|
286
|
-
}, _ProductConfigurationSystemBoundaryReference_guardAgainstInvalidBoundaryName = function _ProductConfigurationSystemBoundaryReference_guardAgainstInvalidBoundaryName(name) {
|
|
287
|
-
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
288
|
-
}, _ProductConfigurationSystemBoundaryReference_guardAgainstInvalidBoundaryType = function _ProductConfigurationSystemBoundaryReference_guardAgainstInvalidBoundaryType(type) {
|
|
289
|
-
const validTypes = Object.values(SystemBoundary_1.SystemBoundary);
|
|
290
|
-
if (!validTypes.includes(type)) {
|
|
291
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'valid SystemBoundary', type);
|
|
292
|
-
}
|
|
293
|
-
};
|
|
313
|
+
_ProductConfigurationSystemBoundaryReference_id = new WeakMap(), _ProductConfigurationSystemBoundaryReference_code = new WeakMap(), _ProductConfigurationSystemBoundaryReference_name = new WeakMap(), _ProductConfigurationSystemBoundaryReference_type = new WeakMap();
|
|
294
314
|
ProductConfigurationSystemBoundaryReference.DEFAULT_PROPERTY_NAME = 'systemBoundaryReference';
|
|
@@ -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 _ProductReference_id, _ProductReference_code, _ProductReference_name;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ProductReference = void 0;
|
|
16
16
|
const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
|
|
@@ -23,13 +23,13 @@ class ProductReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
23
23
|
* Constructor protegido para que solo clases hijas puedan instanciar.
|
|
24
24
|
* Aplica todas las validaciones de dominio al momento de construcción.
|
|
25
25
|
*/
|
|
26
|
-
constructor(value, skipDomainValidation, propertyName =
|
|
26
|
+
constructor(value, skipDomainValidation, propertyName = ProductReference.DEFAULT_PROPERTY_NAME) {
|
|
27
27
|
super(value, skipDomainValidation, propertyName, 'The provided value must be of type ProductReference from the domain layer', { allowNull: false, allowUndefined: false });
|
|
28
28
|
_ProductReference_id.set(this, void 0);
|
|
29
29
|
_ProductReference_code.set(this, void 0);
|
|
30
30
|
_ProductReference_name.set(this, void 0);
|
|
31
31
|
if (skipDomainValidation === false) {
|
|
32
|
-
|
|
32
|
+
ProductReference.validateProductReference(value, propertyName);
|
|
33
33
|
}
|
|
34
34
|
__classPrivateFieldSet(this, _ProductReference_id, value.id.trim(), "f");
|
|
35
35
|
__classPrivateFieldSet(this, _ProductReference_code, value.code.trim().toUpperCase(), "f");
|
|
@@ -39,10 +39,46 @@ class ProductReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
39
39
|
* Validación estática para reutilización en factory methods y constructores.
|
|
40
40
|
*/
|
|
41
41
|
static validateProductReference(value, propertyName) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
this.guardAgainstInvalidType(value, propertyName);
|
|
43
|
+
this.guardAgainstInvalidId(value.id);
|
|
44
|
+
this.guardAgainstInvalidProductCode(value.code);
|
|
45
|
+
this.guardAgainstInvalidProductName(value.name);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Valida que el objeto tenga la estructura correcta.
|
|
49
|
+
*/
|
|
50
|
+
static guardAgainstInvalidType(value, propertyName) {
|
|
51
|
+
if (!value || typeof value !== 'object') {
|
|
52
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ProductReference object', typeof value);
|
|
53
|
+
}
|
|
54
|
+
if (typeof value.id !== 'string') {
|
|
55
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
56
|
+
}
|
|
57
|
+
if (typeof value.code !== 'string') {
|
|
58
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
59
|
+
}
|
|
60
|
+
if (typeof value.name !== 'string') {
|
|
61
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static guardAgainstInvalidId(id) {
|
|
65
|
+
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
66
|
+
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Valida el código de producto usando las validaciones de Code.
|
|
70
|
+
* El código debe ser un UUID válido.
|
|
71
|
+
*/
|
|
72
|
+
static guardAgainstInvalidProductCode(code) {
|
|
73
|
+
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
74
|
+
Code_1.Code.guardAgainstInvalidCode(code);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Valida el nombre del producto.
|
|
78
|
+
* No debe ser vacío después de aplicar trim.
|
|
79
|
+
*/
|
|
80
|
+
static guardAgainstInvalidProductName(name) {
|
|
81
|
+
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
46
82
|
}
|
|
47
83
|
get id() {
|
|
48
84
|
return __classPrivateFieldGet(this, _ProductReference_id, "f");
|
|
@@ -107,7 +143,7 @@ class ProductReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
107
143
|
* Dos referencias son iguales si tienen el mismo código y nombre.
|
|
108
144
|
*/
|
|
109
145
|
equals(other) {
|
|
110
|
-
if (!(other instanceof
|
|
146
|
+
if (!(other instanceof ProductReference)) {
|
|
111
147
|
return false;
|
|
112
148
|
}
|
|
113
149
|
return (__classPrivateFieldGet(this, _ProductReference_id, "f") === __classPrivateFieldGet(other, _ProductReference_id, "f")
|
|
@@ -119,7 +155,7 @@ class ProductReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
119
155
|
* basándose únicamente en el código (identificador único).
|
|
120
156
|
*/
|
|
121
157
|
hasSameProduct(other) {
|
|
122
|
-
if (!(other instanceof
|
|
158
|
+
if (!(other instanceof ProductReference)) {
|
|
123
159
|
return false;
|
|
124
160
|
}
|
|
125
161
|
return __classPrivateFieldGet(this, _ProductReference_code, "f") === __classPrivateFieldGet(other, _ProductReference_code, "f");
|
|
@@ -155,26 +191,5 @@ class ProductReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
155
191
|
}
|
|
156
192
|
}
|
|
157
193
|
exports.ProductReference = ProductReference;
|
|
158
|
-
|
|
159
|
-
if (!value || typeof value !== 'object') {
|
|
160
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ProductReference object', typeof value);
|
|
161
|
-
}
|
|
162
|
-
if (typeof value.id !== 'string') {
|
|
163
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
164
|
-
}
|
|
165
|
-
if (typeof value.code !== 'string') {
|
|
166
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
167
|
-
}
|
|
168
|
-
if (typeof value.name !== 'string') {
|
|
169
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
170
|
-
}
|
|
171
|
-
}, _ProductReference_guardAgainstInvalidId = function _ProductReference_guardAgainstInvalidId(id) {
|
|
172
|
-
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
173
|
-
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
174
|
-
}, _ProductReference_guardAgainstInvalidProductCode = function _ProductReference_guardAgainstInvalidProductCode(code) {
|
|
175
|
-
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
176
|
-
Code_1.Code.guardAgainstInvalidCode(code);
|
|
177
|
-
}, _ProductReference_guardAgainstInvalidProductName = function _ProductReference_guardAgainstInvalidProductName(name) {
|
|
178
|
-
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
179
|
-
};
|
|
194
|
+
_ProductReference_id = new WeakMap(), _ProductReference_code = new WeakMap(), _ProductReference_name = new WeakMap();
|
|
180
195
|
ProductReference.DEFAULT_PROPERTY_NAME = 'productReference';
|
|
@@ -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 _ServiceCatalogReference_id, _ServiceCatalogReference_code, _ServiceCatalogReference_name, _ServiceCatalogReference_type;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ServiceCatalogReference = void 0;
|
|
16
16
|
const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
|
|
@@ -24,14 +24,14 @@ class ServiceCatalogReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
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 = ServiceCatalogReference.DEFAULT_PROPERTY_NAME) {
|
|
28
28
|
super(value, skipDomainValidation, propertyName, 'The provided value must be of type ServiceCatalogReference from the domain layer', { allowNull: false, allowUndefined: false });
|
|
29
29
|
_ServiceCatalogReference_id.set(this, void 0);
|
|
30
30
|
_ServiceCatalogReference_code.set(this, void 0);
|
|
31
31
|
_ServiceCatalogReference_name.set(this, void 0);
|
|
32
32
|
_ServiceCatalogReference_type.set(this, void 0);
|
|
33
33
|
if (skipDomainValidation === false) {
|
|
34
|
-
|
|
34
|
+
ServiceCatalogReference.validateServiceCatalogReference(value, propertyName);
|
|
35
35
|
}
|
|
36
36
|
__classPrivateFieldSet(this, _ServiceCatalogReference_id, value.id.trim(), "f");
|
|
37
37
|
__classPrivateFieldSet(this, _ServiceCatalogReference_code, value.code.trim().toUpperCase(), "f");
|
|
@@ -42,11 +42,59 @@ class ServiceCatalogReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
42
42
|
* Validación estática para reutilización en factory methods y constructores.
|
|
43
43
|
*/
|
|
44
44
|
static validateServiceCatalogReference(value, propertyName) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
this.guardAgainstInvalidType(value, propertyName);
|
|
46
|
+
this.guardAgainstInvalidId(value.id);
|
|
47
|
+
this.guardAgainstInvalidServiceCatalogCode(value.code);
|
|
48
|
+
this.guardAgainstInvalidServiceCatalogName(value.name);
|
|
49
|
+
this.guardAgainstInvalidServiceCatalogType(value.type);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Valida que el objeto tenga la estructura correcta.
|
|
53
|
+
*/
|
|
54
|
+
static guardAgainstInvalidType(value, propertyName) {
|
|
55
|
+
if (!value || typeof value !== 'object') {
|
|
56
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ServiceCatalogReference object', typeof value);
|
|
57
|
+
}
|
|
58
|
+
if (typeof value.id !== 'string') {
|
|
59
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
60
|
+
}
|
|
61
|
+
if (typeof value.code !== 'string') {
|
|
62
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
63
|
+
}
|
|
64
|
+
if (typeof value.name !== 'string') {
|
|
65
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
66
|
+
}
|
|
67
|
+
if (typeof value.type !== 'string') {
|
|
68
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'string', typeof value.type);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
static guardAgainstInvalidId(id) {
|
|
72
|
+
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
73
|
+
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Valida el código de servicio usando las validaciones de Code.
|
|
77
|
+
* El código debe ser un UUID válido.
|
|
78
|
+
*/
|
|
79
|
+
static guardAgainstInvalidServiceCatalogCode(code) {
|
|
80
|
+
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
81
|
+
Code_1.Code.guardAgainstInvalidCode(code);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Valida el nombre del servicio.
|
|
85
|
+
* No debe ser vacío después de aplicar trim.
|
|
86
|
+
*/
|
|
87
|
+
static guardAgainstInvalidServiceCatalogName(name) {
|
|
88
|
+
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Valida el tipo de servicio.
|
|
92
|
+
* Debe ser un valor válido del enum ServiceCatalogType.
|
|
93
|
+
*/
|
|
94
|
+
static guardAgainstInvalidServiceCatalogType(type) {
|
|
95
|
+
if (!Object.values(ServiceCatalogType_1.ServiceCatalogType).includes(type)) {
|
|
96
|
+
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'valid ServiceCatalogType', type);
|
|
97
|
+
}
|
|
50
98
|
}
|
|
51
99
|
get id() {
|
|
52
100
|
return __classPrivateFieldGet(this, _ServiceCatalogReference_id, "f");
|
|
@@ -196,7 +244,7 @@ class ServiceCatalogReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
196
244
|
* Dos referencias son iguales si tienen el mismo código, nombre y tipo.
|
|
197
245
|
*/
|
|
198
246
|
equals(other) {
|
|
199
|
-
if (!(other instanceof
|
|
247
|
+
if (!(other instanceof ServiceCatalogReference)) {
|
|
200
248
|
return false;
|
|
201
249
|
}
|
|
202
250
|
return (__classPrivateFieldGet(this, _ServiceCatalogReference_id, "f") === __classPrivateFieldGet(other, _ServiceCatalogReference_id, "f")
|
|
@@ -209,7 +257,7 @@ class ServiceCatalogReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
209
257
|
* basándose únicamente en el código (identificador único).
|
|
210
258
|
*/
|
|
211
259
|
hasSameServiceCatalog(other) {
|
|
212
|
-
if (!(other instanceof
|
|
260
|
+
if (!(other instanceof ServiceCatalogReference)) {
|
|
213
261
|
return false;
|
|
214
262
|
}
|
|
215
263
|
return __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f") === __classPrivateFieldGet(other, _ServiceCatalogReference_code, "f");
|
|
@@ -218,7 +266,7 @@ class ServiceCatalogReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
218
266
|
* Verifica si es compatible con otro servicio para bundling.
|
|
219
267
|
*/
|
|
220
268
|
isCompatibleForBundling(other) {
|
|
221
|
-
if (!(other instanceof
|
|
269
|
+
if (!(other instanceof ServiceCatalogReference)) {
|
|
222
270
|
return false;
|
|
223
271
|
}
|
|
224
272
|
// Un servicio no puede ser bundled consigo mismo
|
|
@@ -269,33 +317,5 @@ class ServiceCatalogReference extends ObjectValueObject_1.ObjectValueObject {
|
|
|
269
317
|
}
|
|
270
318
|
}
|
|
271
319
|
exports.ServiceCatalogReference = ServiceCatalogReference;
|
|
272
|
-
|
|
273
|
-
if (!value || typeof value !== 'object') {
|
|
274
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ServiceCatalogReference object', typeof value);
|
|
275
|
-
}
|
|
276
|
-
if (typeof value.id !== 'string') {
|
|
277
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
|
|
278
|
-
}
|
|
279
|
-
if (typeof value.code !== 'string') {
|
|
280
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
|
|
281
|
-
}
|
|
282
|
-
if (typeof value.name !== 'string') {
|
|
283
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
|
|
284
|
-
}
|
|
285
|
-
if (typeof value.type !== 'string') {
|
|
286
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'string', typeof value.type);
|
|
287
|
-
}
|
|
288
|
-
}, _ServiceCatalogReference_guardAgainstInvalidId = function _ServiceCatalogReference_guardAgainstInvalidId(id) {
|
|
289
|
-
String_1.String.guardAgainstEmptyValue(id, 'id');
|
|
290
|
-
AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
|
|
291
|
-
}, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode = function _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode(code) {
|
|
292
|
-
String_1.String.guardAgainstEmptyValue(code, 'code');
|
|
293
|
-
Code_1.Code.guardAgainstInvalidCode(code);
|
|
294
|
-
}, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName = function _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName(name) {
|
|
295
|
-
String_1.String.guardAgainstEmptyValue(name, 'name');
|
|
296
|
-
}, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogType = function _ServiceCatalogReference_guardAgainstInvalidServiceCatalogType(type) {
|
|
297
|
-
if (!Object.values(ServiceCatalogType_1.ServiceCatalogType).includes(type)) {
|
|
298
|
-
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'valid ServiceCatalogType', type);
|
|
299
|
-
}
|
|
300
|
-
};
|
|
320
|
+
_ServiceCatalogReference_id = new WeakMap(), _ServiceCatalogReference_code = new WeakMap(), _ServiceCatalogReference_name = new WeakMap(), _ServiceCatalogReference_type = new WeakMap();
|
|
301
321
|
ServiceCatalogReference.DEFAULT_PROPERTY_NAME = 'serviceCatalogReference';
|