adamo-types 1.2.130 → 1.2.132-sit
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/dist/bss/bearingpoint/shopping-cart/shopping-cart-parameters.entity.d.ts +5 -0
- package/dist/bss/bearingpoint/shopping-cart/shopping-cart-parameters.entity.js +42 -2
- package/dist/bss/constants/bss.constants.d.ts +1 -0
- package/dist/bss/constants/bss.constants.js +2 -0
- package/dist/common/constants/error.constants.d.ts +1 -0
- package/dist/common/constants/error.constants.js +2 -1
- package/dist/common/edge-bss/shopping-cart/req/other.entity.d.ts +17 -19
- package/dist/common/edge-bss/shopping-cart/req/other.entity.js +90 -77
- package/dist/common/edge-bss/shopping-cart/res/other.entity.d.ts +6 -0
- package/dist/common/edge-bss/shopping-cart/res/other.entity.js +26 -3
- package/dist/common/helpers/helpers.d.ts +4 -0
- package/dist/common/helpers/helpers.js +8 -1
- package/dist/database/index.d.ts +1 -0
- package/dist/database/index.js +1 -0
- package/dist/database/product-mobile-profile-equivalence.entity.d.ts +11 -0
- package/dist/database/product-mobile-profile-equivalence.entity.js +62 -0
- package/dist/sys03/sale-process/sale-process.entity.js +2 -1
- package/dist/sys03/shopping-cart/index.d.ts +0 -1
- package/dist/sys03/shopping-cart/index.js +0 -1
- package/dist/sys03/shopping-cart/shopping-cart.entity.d.ts +5 -1
- package/dist/sys03/updowngrade/index.d.ts +1 -0
- package/dist/sys03/updowngrade/index.js +1 -0
- package/dist/sys03/updowngrade/product-characteristic-equivalence.entity.d.ts +17 -5
- package/dist/sys03/updowngrade/product-characteristic-equivalence.entity.js +21 -11
- package/dist/sys03/updowngrade/product-mobile-profile-equivalence.entity.d.ts +30 -0
- package/dist/sys03/updowngrade/product-mobile-profile-equivalence.entity.js +109 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/sys03/shopping-cart/internal/internal.entity.d.ts +0 -5
- package/dist/sys03/shopping-cart/internal/internal.entity.js +0 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Builder } from '../../../common/helpers/helpers';
|
|
1
2
|
import { CustomerProductInstanceAction } from '../../../sys03/customer';
|
|
2
3
|
export declare type ShoppingCartParametersShoppingCartProcess = 'sale' | 'new-extras' | 'modification' | 'termination' | 'transition' | 'transition-only-mobiles' | 'transition-shared-mobiles';
|
|
3
4
|
export declare type ShoppingCartParametersTransitionShoppingCartType = 'original-to-unbundle' | 'original-to-create' | 'original-to-delete' | 'clone' | 'configured';
|
|
@@ -51,7 +52,11 @@ export declare class ShoppingCartParametersDto {
|
|
|
51
52
|
originalServices?: string;
|
|
52
53
|
referenceProductId?: string;
|
|
53
54
|
referenceProductName?: string;
|
|
55
|
+
referenceProductServiceProfile?: string;
|
|
54
56
|
referenceProductServiceCharacteristicName?: string;
|
|
55
57
|
referenceProductServiceCharacteristicValue?: string;
|
|
56
58
|
referenceInstanceAction?: CustomerProductInstanceAction;
|
|
57
59
|
}
|
|
60
|
+
export declare class ShoppingCartParametersDtoBuilder extends Builder<ShoppingCartParametersDto> {
|
|
61
|
+
setDefaults(): ShoppingCartParametersDto;
|
|
62
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShoppingCartParametersDto = exports.ShoppingCartEntityParametersDto = void 0;
|
|
3
|
+
exports.ShoppingCartParametersDtoBuilder = exports.ShoppingCartParametersDto = exports.ShoppingCartEntityParametersDto = void 0;
|
|
4
4
|
const openapi = require("@nestjs/swagger");
|
|
5
|
+
const helpers_1 = require("../../../common/helpers/helpers");
|
|
5
6
|
class ShoppingCartEntityParametersDto {
|
|
6
7
|
static _OPENAPI_METADATA_FACTORY() {
|
|
7
8
|
return { originalId: { required: false, type: () => String }, originalAction: { required: false, type: () => String }, originalServiceCharacteristics: { required: false, type: () => String } };
|
|
@@ -10,7 +11,46 @@ class ShoppingCartEntityParametersDto {
|
|
|
10
11
|
exports.ShoppingCartEntityParametersDto = ShoppingCartEntityParametersDto;
|
|
11
12
|
class ShoppingCartParametersDto {
|
|
12
13
|
static _OPENAPI_METADATA_FACTORY() {
|
|
13
|
-
return { addressInfo: { required: false, type: () => String }, apartmentId: { required: false, type: () => String }, block: { required: false, type: () => String }, cartCreatedBy: { required: false, type: () => String }, city: { required: false, type: () => String }, competition: { required: false, type: () => String }, country: { required: false, type: () => String }, customerType: { required: false, type: () => String }, door: { required: false, type: () => String }, entrance: { required: false, type: () => String }, fiberhood: { required: false, type: () => String }, floor: { required: false, type: () => String }, lat: { required: false, type: () => String }, lng: { required: false, type: () => String }, migrationCartCreatedBy: { required: false, type: () => String }, municipality: { required: false, type: () => String }, network: { required: false, type: () => String }, postcode: { required: false, type: () => String }, projectCode: { required: false, type: () => String }, projectId: { required: false, type: () => String }, province: { required: false, type: () => String }, salesAreaId: { required: false, type: () => String }, salesAreaName: { required: false, type: () => String }, salesPerson: { required: false, type: () => String }, serviceable: { required: false, type: () => String }, serviceableAge: { required: false, type: () => String }, serviceableStatus: { required: false, type: () => String }, streetAddressId: { required: false, type: () => String }, streetName: { required: false, type: () => String }, streetNumber: { required: false, type: () => String }, streetType: { required: false, type: () => String }, technology: { required: false, type: () => String }, shoppingCartProcess: { required: false, type: () => Object }, transitionShoppingCartType: { required: false, type: () => Object }, originalId: { required: false, type: () => String }, originalAction: { required: false, type: () => String }, originalSourceProduct: { required: false, type: () => String }, originalProductOffering: { required: false, type: () => String }, originalReason: { required: false, type: () => String }, originalProducts: { required: false, type: () => String }, originalProductCharacteristics: { required: false, type: () => String }, originalServices: { required: false, type: () => String }, referenceProductId: { required: false, type: () => String }, referenceProductName: { required: false, type: () => String }, referenceProductServiceCharacteristicName: { required: false, type: () => String }, referenceProductServiceCharacteristicValue: { required: false, type: () => String }, referenceInstanceAction: { required: false, enum: require("../../../sys03/customer/customer.constants").CustomerProductInstanceAction } };
|
|
14
|
+
return { addressInfo: { required: false, type: () => String }, apartmentId: { required: false, type: () => String }, block: { required: false, type: () => String }, cartCreatedBy: { required: false, type: () => String }, city: { required: false, type: () => String }, competition: { required: false, type: () => String }, country: { required: false, type: () => String }, customerType: { required: false, type: () => String }, door: { required: false, type: () => String }, entrance: { required: false, type: () => String }, fiberhood: { required: false, type: () => String }, floor: { required: false, type: () => String }, lat: { required: false, type: () => String }, lng: { required: false, type: () => String }, migrationCartCreatedBy: { required: false, type: () => String }, municipality: { required: false, type: () => String }, network: { required: false, type: () => String }, postcode: { required: false, type: () => String }, projectCode: { required: false, type: () => String }, projectId: { required: false, type: () => String }, province: { required: false, type: () => String }, salesAreaId: { required: false, type: () => String }, salesAreaName: { required: false, type: () => String }, salesPerson: { required: false, type: () => String }, serviceable: { required: false, type: () => String }, serviceableAge: { required: false, type: () => String }, serviceableStatus: { required: false, type: () => String }, streetAddressId: { required: false, type: () => String }, streetName: { required: false, type: () => String }, streetNumber: { required: false, type: () => String }, streetType: { required: false, type: () => String }, technology: { required: false, type: () => String }, shoppingCartProcess: { required: false, type: () => Object }, transitionShoppingCartType: { required: false, type: () => Object }, originalId: { required: false, type: () => String }, originalAction: { required: false, type: () => String }, originalSourceProduct: { required: false, type: () => String }, originalProductOffering: { required: false, type: () => String }, originalReason: { required: false, type: () => String }, originalProducts: { required: false, type: () => String }, originalProductCharacteristics: { required: false, type: () => String }, originalServices: { required: false, type: () => String }, referenceProductId: { required: false, type: () => String }, referenceProductName: { required: false, type: () => String }, referenceProductServiceProfile: { required: false, type: () => String }, referenceProductServiceCharacteristicName: { required: false, type: () => String }, referenceProductServiceCharacteristicValue: { required: false, type: () => String }, referenceInstanceAction: { required: false, enum: require("../../../sys03/customer/customer.constants").CustomerProductInstanceAction } };
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
exports.ShoppingCartParametersDto = ShoppingCartParametersDto;
|
|
18
|
+
class ShoppingCartParametersDtoBuilder extends helpers_1.Builder {
|
|
19
|
+
setDefaults() {
|
|
20
|
+
return {
|
|
21
|
+
addressInfo: 'Present',
|
|
22
|
+
apartmentId: '937367',
|
|
23
|
+
block: '',
|
|
24
|
+
cartCreatedBy: 'test@adamo.es',
|
|
25
|
+
city: 'CALLDETENES',
|
|
26
|
+
competition: 'TS',
|
|
27
|
+
country: 'ES',
|
|
28
|
+
customerType: 'Residential',
|
|
29
|
+
door: '',
|
|
30
|
+
entrance: '',
|
|
31
|
+
floor: 'BA ',
|
|
32
|
+
lat: '41.9276600000000000000000',
|
|
33
|
+
lng: '2.2841700000000000000000',
|
|
34
|
+
municipality: 'CALLDETENES',
|
|
35
|
+
network: 'Adamo',
|
|
36
|
+
postcode: '08506',
|
|
37
|
+
projectCode: 'BAR.CAL.1.G',
|
|
38
|
+
projectId: '22189',
|
|
39
|
+
province: 'BARCELONA',
|
|
40
|
+
salesAreaId: '28',
|
|
41
|
+
serviceable: '2022-07-14',
|
|
42
|
+
salesAreaName: 'Area A00',
|
|
43
|
+
serviceableAge: '735',
|
|
44
|
+
serviceableStatus: 'SERVICIABLE',
|
|
45
|
+
streetAddressId: '334073',
|
|
46
|
+
streetName: 'UNIO',
|
|
47
|
+
streetNumber: '23',
|
|
48
|
+
streetType: 'CL',
|
|
49
|
+
technology: 'FIBERHOME'
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
53
|
+
return {};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.ShoppingCartParametersDtoBuilder = ShoppingCartParametersDtoBuilder;
|
|
@@ -43,6 +43,7 @@ export declare enum CacheKeyType {
|
|
|
43
43
|
JOB_SALE_PROCESS = "job-sale-process",
|
|
44
44
|
LOCK_PRODUCT_CATALOG = "lock#product-catalog",
|
|
45
45
|
PRODUCT_CHARACTERISTIC_EQUIVALENCE = "product-characteristic-equivalence",
|
|
46
|
+
PRODUCT_MOBILE_PROFILE_EQUIVALENCE_BY_TO_PRODUCT = "product-mobile-profile-equivalence-by-to-product",
|
|
46
47
|
PRODUCT_TRANSITION_CONFIGURATION = "product-transition-configuration",
|
|
47
48
|
PRODUCT_TRANSITION_GROUPS = "product-transition-groups",
|
|
48
49
|
SHOPPING_CART_AVAILABLE_PRODUCT = "shopping-cart-available-product",
|
|
@@ -63,6 +63,7 @@ var CacheKeyType;
|
|
|
63
63
|
CacheKeyType["JOB_SALE_PROCESS"] = "job-sale-process";
|
|
64
64
|
CacheKeyType["LOCK_PRODUCT_CATALOG"] = "lock#product-catalog";
|
|
65
65
|
CacheKeyType["PRODUCT_CHARACTERISTIC_EQUIVALENCE"] = "product-characteristic-equivalence";
|
|
66
|
+
CacheKeyType["PRODUCT_MOBILE_PROFILE_EQUIVALENCE_BY_TO_PRODUCT"] = "product-mobile-profile-equivalence-by-to-product";
|
|
66
67
|
CacheKeyType["PRODUCT_TRANSITION_CONFIGURATION"] = "product-transition-configuration";
|
|
67
68
|
CacheKeyType["PRODUCT_TRANSITION_GROUPS"] = "product-transition-groups";
|
|
68
69
|
CacheKeyType["SHOPPING_CART_AVAILABLE_PRODUCT"] = "shopping-cart-available-product";
|
|
@@ -111,6 +112,7 @@ exports.CacheKeyTypeTtl = {
|
|
|
111
112
|
[CacheKeyType.LOCK_PRODUCT_CATALOG]: 60 * 15,
|
|
112
113
|
[CacheKeyType.PRODUCT_TRANSITION_CONFIGURATION]: 60 * 60 * 24,
|
|
113
114
|
[CacheKeyType.PRODUCT_CHARACTERISTIC_EQUIVALENCE]: 60 * 60 * 24,
|
|
115
|
+
[CacheKeyType.PRODUCT_MOBILE_PROFILE_EQUIVALENCE_BY_TO_PRODUCT]: 60 * 60 * 24,
|
|
114
116
|
[CacheKeyType.PRODUCT_TRANSITION_GROUPS]: 60 * 60 * 24,
|
|
115
117
|
[CacheKeyType.SHOPPING_CART_AVAILABLE_PRODUCTS]: 60 * 60 * 24,
|
|
116
118
|
[CacheKeyType.SHOPPING_CART_AVAILABLE_PRODUCTS_V2]: 60 * 60 * 24,
|
|
@@ -195,4 +195,5 @@ export declare const E_APPROVAL_IBAN_VALIDATION_UNHANDLED_STATUS = "E_APPROVAL_I
|
|
|
195
195
|
export declare const E_APPROVAL_WITHOUT_VALIDATION = "E_APPROVAL_WITHOUT_VALIDATION";
|
|
196
196
|
export declare const E_APPROVAL_MODIFY_DISABLED_IBAN_VALIDATION_MAX_INTENTS_REACHED = "E_APPROVAL_MODIFY_DISABLED_IBAN_VALIDATION_MAX_INTENTS_REACHED";
|
|
197
197
|
export declare const E_SHOPPING_CART_DEPRECATED = "E_SHOPPING_CART_DEPRECATED";
|
|
198
|
+
export declare const E_PROVINCE_WITHOUT_AVAILABLE_VOIP_NUMBERS = "E_PROVINCE_WITHOUT_AVAILABLE_VOIP_NUMBERS";
|
|
198
199
|
export declare const E_SHOPPING_CART_APARTMENT_BUSINESS_RULE = "E_SHOPPING_CART_APARTMENT_BUSINESS_RULE";
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.E_CREATE_MANDATE = exports.E_UPDATE_BILLING_ACCOUNT = exports.E_CREATE_BILLING_ACCOUNT = exports.E_UPLOAD_CUSTOMER_ACCOUNT_DOCUMENT = exports.E_CREATE_CUSTOMER_ACCOUNT_NOTE = exports.E_UPDATE_CUSTOMER_ACCOUNT = exports.E_CREATE_CUSTOMER_ACCOUNT = exports.E_FETCH_CUSTOMER_ACCOUNT = exports.E_FETCH_ADDRESS = exports.E_CREATE_ADDRESS = exports.E_FIBER_NOT_AVAILABLE_FOR_THIS_NETWORK = exports.E_UPDATE_SHOPPING_CART_CONFIGURATION = exports.E_CIF_VALIDATION = exports.E_NIE_VALIDATION = exports.E_DNI_VALIDATION = exports.E_SET_SHOPPING_CART_PROMOTIONS = exports.E_SET_SHOPPING_CART_CONTRACT = exports.E_FETCH_AVAILABLE_NUMBERS_FROM_POOL = exports.E_PROVINCE_WITHOUT_PREFIXES = exports.E_SERVER = exports.E_CONNECTION_REFUSED = exports.E_VALIDATION = exports.E_BODY_NOT_OBJECT = exports.E_BODY_NOT_ARRAY = exports.E_BODY_NOT_PROVIDED = exports.E_NO_CHANNEL_SELECTED = exports.E_CHANGE_CHANNEL = exports.E_BP = exports.E_BP_INTERNAL_SERVER_ERROR = exports.E_UPDATE_SHOPPING_CART_EXTRAS = exports.E_EMPTY_SHOPPING_CART = exports.E_BUNDLE_CONFIGURATION_ATTRIBUTE_MISMATCHING = exports.E_PERSIST_SHOPPING_CART = exports.E_SAVE_SHOPPING_CART = exports.E_CREATE_SHOPPING_CART = exports.E_FETCH_PRODUCT_DEFAULT_SUMMARY = exports.E_FETCH_SHOPPING_CART_TRANSITION_ONLY_MOBILES = exports.E_FETCH_SHOPPING_CART_MODIFICATION = exports.E_FETCH_SHOPPING_CART_CONFIGURATION = exports.E_FETCH_SHOPPING_CART_SUMMARY = exports.E_FETCH_SHOPPING_CART_AVAILABLE_EXTRAS = exports.E_FETCH_SHOPPING_CART_AVAILABLE_PRODUCT = exports.E_FETCH_SHOPPING_CART_AVAILABLE_PRODUCTS = exports.E_FETCH_PRODUCT_OFFERINGS = exports.E_ASSIGN_SALESPERSON = exports.E_ASSIGN_ROLE_TENENT = exports.E_CREATE_USER = exports.E_UPDATE_PASSWORD = exports.E_ASSIGN_CHANNELS = exports.E_LOGIN = void 0;
|
|
4
4
|
exports.E_FETCH_LOOKUP_OPTIONS = exports.E_INVALID_SALE_PROCESS_STATUS = exports.E_USER_ROLE_UNKNOWN = exports.E_USER_WITHOUT_ROLE = exports.E_RESERVE_NUMBER_FROM_POOL = exports.E_WHOLESALE_APARTMENT_BLACKLISTED = exports.E_USER_SALE_PROCESS_PERMISSION = exports.E_UPDATE_CACHE_RECORD = exports.E_DELETE_CACHE_RECORD = exports.E_UPDATE_PRODUCT_CATALOG = exports.E_DELETE_PRODUCT_CATALOG = exports.E_CREATE_CUSTOMER_ACCOUNT_HISTORY = exports.E_FETCH_ORGANIZATION_PARTY = exports.E_FETCH_INDIVIDUAL_PARTY = exports.E_FETCH_PAYMENT_METHOD = exports.E_FETCH_MANDATE = exports.E_FETCH_BILLING_ACCOUNT = exports.E_FETCH_PRODUCT_INVENTORY = exports.E_FETCH_CUSTOMERS = exports.E_FETCH_ORGANIZATION_PARTIES = exports.E_FETCH_INDIVIDUAL_PARTIES = exports.E_DOWNLOAD_INVOICE = exports.E_FETCH_BILLING_ACCOUNT_DETAILS = exports.E_INVALID_IBAN_ACCOUNT_NUMBER_CONTROL_CODE = exports.E_INVALID_IBAN_MOD = exports.E_INVALID_IBAN_FORMAT = exports.E_INVALID_IBAN_LENGTH = exports.E_INVALID_IBAN_ISO_CODE = exports.E_IBAN_SUPPORTED_COUNTRIES_ARE_REQUIRED = exports.E_IBAN_IS_REQUIRED = exports.E_IBAN_COUNTRY_NOT_SUPPORTED = exports.E_SPAIN_NOT_ALLOWED = exports.E_EMAIL_INVALID_FORMAT = exports.E_PHONE_INVALID_FORMAT = exports.E_PHONE_INVALID_LENGTH = exports.E_VALIDATE_SHOPPING_CART = exports.E_FETCH_CHANNEL_USERS = exports.E_SFTP_DOWNLOAD = exports.E_SFTP_UPLOAD = exports.E_SFTP_LIST = exports.E_SFTP_CONNECT = exports.E_FTP_RENAME = exports.E_FTP_REMOVE = exports.E_FTP_DOWNLOAD = exports.E_FTP_UPLOAD = exports.E_SUBMIT_SHOPPING_CART = exports.E_FETCH_SHOPPING_CART = exports.E_UPDATE_PAYMENT_METHOD = exports.E_CREATE_PAYMENT_METHOD = exports.E_UPDATE_MANDATE = void 0;
|
|
5
5
|
exports.E_FETCH_TASK = exports.E_CREATE_TASK = exports.E_DIGITEL_PROCESS_ERROR = exports.E_APPROVAL_FORBIDDEN_VALIDATION = exports.E_APPROVAL_FORBIDDEN_STATUS = exports.E_APPROVAL_DATA_WITHOUT_CHANGES = exports.E_APPROVAL_DATA_WITHOUT_RESPONSE = exports.E_SALE_PROCESS_PENDING_APPROVAL_UNSOLVED = exports.E_SALE_PROCESS_PENDING_APPROVAL = exports.E_CSV_INVALID_RECORDS = exports.E_CSV_INVALID_RECORD_LENGTH = exports.E_PARSE_CSV = exports.E_PUT_LOOKUP_OPTIONS = exports.E_USER_INACTIVE = exports.E_USER_WITHOUT_TENANTS = exports.E_USER_WITH_EMPTY_WORKGROUP_PERMISSIONS = exports.E_USER_WITHOUT_WORKGROUPS = exports.E_USER_WITHOUT_AUTH = exports.E_BI_SALES_EXTRACTION = exports.E_CUSTOMER_WITHOUT_RELATED_PARTY = exports.E_FETCH_PRODUCT_ORDER = exports.E_FETCH_PRODUCT_ORDERS = exports.E_SALE_PROCESS_DOCUMENTS_REQUIRED = exports.E_SALE_PROCESS_UNKNOWN_COMPANY_TYPE = exports.E_SALE_PROCESS_UNKNOWN_CUSTOMER_TYPE = exports.E_SALE_PROCESS_BUSINESS_CUSTOMER_WITHOUT_INFO = exports.E_SALE_PROCESS_BUSINESS_CUSTOMER_WITHOUT_IDENTIFICATION = exports.E_SALE_PROCESS_RESIDENTIAL_CUSTOMER_WITHOUT_IDENTIFICATION = exports.E_SALE_PROCESS_WITHOUT_CHANGES = exports.E_SALE_PROCESS_WITHOUT_IBAN_VALIDATION_ID = exports.E_SALE_PROCESS_WITHOUT_SHOPPING_CART = exports.E_APPLY_CHARGE = exports.E_PRODUCT_SERVICE_MISSING = exports.E_SALE_PROCESS_APARTMENT_BREACHES_RETAIL_EXCLUSIVITY_RULES = exports.E_APARTMENT_BREACHES_RETAIL_EXCLUSIVITY_RULES = exports.E_ADDRESS_BREACHES_RETAIL_EXCLUSIVITY_RULES = exports.E_UPDATE_PRODUCT_CATALOG_CACHE = exports.E_DUPLICATE_ENTRY = exports.E_UNHANDLED_KEY = exports.E_FETCH_CUSTOMER_ACCOUNT_FINANCE_BALANCES = exports.E_LOGIN_MAX_ATTEMPTS_REACHED = exports.E_TOO_MANY_REQUESTS = exports.E_UPLOAD_SALE_PROCESS_CONTRACT = exports.E_FETCH_USER_CHANNELS = exports.E_UNAUTHORIZED = exports.E_USER_WITHOUT_CHANNELS = exports.E_FETCH_SHOPPING_CART_PROMOTIONS_AND_CONTRACTS = exports.E_FETCH_SHOPPING_CART_FEATURES = exports.E_NOT_BASE_BUNDLE = exports.E_NO_SELECTED_CHANNEL = void 0;
|
|
6
|
-
exports.E_SHOPPING_CART_APARTMENT_BUSINESS_RULE = exports.E_SHOPPING_CART_DEPRECATED = exports.E_APPROVAL_MODIFY_DISABLED_IBAN_VALIDATION_MAX_INTENTS_REACHED = exports.E_APPROVAL_WITHOUT_VALIDATION = exports.E_APPROVAL_IBAN_VALIDATION_UNHANDLED_STATUS = exports.E_APPROVAL_IBAN_VALIDATION_MAX_INTENTS_REACHED = exports.E_APPROVAL_IBAN_VALIDATION_PENDING = exports.E_APPROVAL_IBAN_VALIDATION_ERROR = exports.E_APPROVAL_IBAN_VALIDATION_UNSUPPORTED = exports.E_APPROVAL_IBAN_VALIDATION_REJECTED = exports.E_SALE_PROCESS_FORBIDDEN_APPROVAL = exports.E_SALE_PROCESS_FORBIDDEN_STATUS = exports.E_SALE_PROCESS_IBAN_VALIDATION_UNHANDLED_STATUS = exports.E_SALE_PROCESS_IBAN_VALIDATION_PENDING = exports.E_SALE_PROCESS_IBAN_VALIDATION_REJECTED = exports.E_ORDER_NOT_BELONG_TO_CUSTOMER = exports.E_CUSTOMER_CHECK_DEBT = exports.E_CHARACTERISTIC_NOT_CHANGEABLE = exports.E_BUNDLE_NOT_AVAILABLE_IN_CHANNEL = exports.E_CUSTOMER_PRODUCT_MULTIPLE_TRANSITION_PROCESS_UNKNOWN_STEP = exports.E_CUSTOMER_PRODUCT_MULTIPLE_TRANSITION_PROCESS_WITHOUT_STEPS = exports.E_CUSTOMER_NEW_EXTRAS_PROCESS_OWNER_MISMATCHING = exports.E_CUSTOMER_PRODUCT_TRANSITION_PROCESS_OWNER_MISMATCHING = exports.E_CUSTOMER_PRODUCT_MODIFICATION_PROCESS_OWNER_MISMATCHING = exports.E_REVIEW_CUSTOMER_CHARGES_AND_CREDITS_NEGATIVE_INVOICE = exports.E_REVIEW_CUSTOMER_CHARGES_AND_CREDITS = exports.E_CUSTOMER_WITHOUT_VALID_APARTMENT = exports.E_CUSTOMER_HAS_ALL_EXTRAS = exports.E_CUSTOMER_NEW_EXTRAS_PROCESS_ALREADY_EXISTS = exports.E_CUSTOMER_PRODUCT_MULTIPLE_TRANSITION_PROCESS_ALREADY_EXISTS = exports.E_CUSTOMER_PRODUCT_TRANSITION_PROCESS_ALREADY_EXISTS = exports.E_CUSTOMER_PRODUCT_MODIFICATION_PROCESS_ALREADY_EXISTS = exports.E_UNKNOWN_CACHE_KEY = exports.E_FILTER_PRODUCT_BY_PARAMETERS = exports.E_FETCH_CHARGES_AND_CREDITS = exports.E_FETCH_SERVICE_INVENTORY_BY_ID = exports.E_FETCH_PRODUCT_INVENTORY_BY_ID = exports.E_FETCH_CUSTOMER_PRODUCTS = exports.E_FETCH_BILLS = exports.E_PATCH_BILLING_STATE = exports.E_FETCH_ORDER_HIERARCHY = exports.E_FETCH_ORDERS = exports.E_FETCH_CUSTOMER_NOTES = exports.E_FILTERS_REQUIRED = exports.E_SEARCH_CUSTOMERS = exports.E_RESOLVE_TASKS = exports.E_FETCH_TASKS = exports.E_FETCH_TASK_NOTES = void 0;
|
|
6
|
+
exports.E_SHOPPING_CART_APARTMENT_BUSINESS_RULE = exports.E_PROVINCE_WITHOUT_AVAILABLE_VOIP_NUMBERS = exports.E_SHOPPING_CART_DEPRECATED = exports.E_APPROVAL_MODIFY_DISABLED_IBAN_VALIDATION_MAX_INTENTS_REACHED = exports.E_APPROVAL_WITHOUT_VALIDATION = exports.E_APPROVAL_IBAN_VALIDATION_UNHANDLED_STATUS = exports.E_APPROVAL_IBAN_VALIDATION_MAX_INTENTS_REACHED = exports.E_APPROVAL_IBAN_VALIDATION_PENDING = exports.E_APPROVAL_IBAN_VALIDATION_ERROR = exports.E_APPROVAL_IBAN_VALIDATION_UNSUPPORTED = exports.E_APPROVAL_IBAN_VALIDATION_REJECTED = exports.E_SALE_PROCESS_FORBIDDEN_APPROVAL = exports.E_SALE_PROCESS_FORBIDDEN_STATUS = exports.E_SALE_PROCESS_IBAN_VALIDATION_UNHANDLED_STATUS = exports.E_SALE_PROCESS_IBAN_VALIDATION_PENDING = exports.E_SALE_PROCESS_IBAN_VALIDATION_REJECTED = exports.E_ORDER_NOT_BELONG_TO_CUSTOMER = exports.E_CUSTOMER_CHECK_DEBT = exports.E_CHARACTERISTIC_NOT_CHANGEABLE = exports.E_BUNDLE_NOT_AVAILABLE_IN_CHANNEL = exports.E_CUSTOMER_PRODUCT_MULTIPLE_TRANSITION_PROCESS_UNKNOWN_STEP = exports.E_CUSTOMER_PRODUCT_MULTIPLE_TRANSITION_PROCESS_WITHOUT_STEPS = exports.E_CUSTOMER_NEW_EXTRAS_PROCESS_OWNER_MISMATCHING = exports.E_CUSTOMER_PRODUCT_TRANSITION_PROCESS_OWNER_MISMATCHING = exports.E_CUSTOMER_PRODUCT_MODIFICATION_PROCESS_OWNER_MISMATCHING = exports.E_REVIEW_CUSTOMER_CHARGES_AND_CREDITS_NEGATIVE_INVOICE = exports.E_REVIEW_CUSTOMER_CHARGES_AND_CREDITS = exports.E_CUSTOMER_WITHOUT_VALID_APARTMENT = exports.E_CUSTOMER_HAS_ALL_EXTRAS = exports.E_CUSTOMER_NEW_EXTRAS_PROCESS_ALREADY_EXISTS = exports.E_CUSTOMER_PRODUCT_MULTIPLE_TRANSITION_PROCESS_ALREADY_EXISTS = exports.E_CUSTOMER_PRODUCT_TRANSITION_PROCESS_ALREADY_EXISTS = exports.E_CUSTOMER_PRODUCT_MODIFICATION_PROCESS_ALREADY_EXISTS = exports.E_UNKNOWN_CACHE_KEY = exports.E_FILTER_PRODUCT_BY_PARAMETERS = exports.E_FETCH_CHARGES_AND_CREDITS = exports.E_FETCH_SERVICE_INVENTORY_BY_ID = exports.E_FETCH_PRODUCT_INVENTORY_BY_ID = exports.E_FETCH_CUSTOMER_PRODUCTS = exports.E_FETCH_BILLS = exports.E_PATCH_BILLING_STATE = exports.E_FETCH_ORDER_HIERARCHY = exports.E_FETCH_ORDERS = exports.E_FETCH_CUSTOMER_NOTES = exports.E_FILTERS_REQUIRED = exports.E_SEARCH_CUSTOMERS = exports.E_RESOLVE_TASKS = exports.E_FETCH_TASKS = exports.E_FETCH_TASK_NOTES = void 0;
|
|
7
7
|
exports.E_LOGIN = 'E_LOGIN';
|
|
8
8
|
exports.E_ASSIGN_CHANNELS = 'E_ASSIGN_CHANNELS';
|
|
9
9
|
exports.E_UPDATE_PASSWORD = 'E_UPDATE_PASSWORD';
|
|
@@ -201,4 +201,5 @@ exports.E_APPROVAL_IBAN_VALIDATION_UNHANDLED_STATUS = 'E_APPROVAL_IBAN_VALIDATIO
|
|
|
201
201
|
exports.E_APPROVAL_WITHOUT_VALIDATION = 'E_APPROVAL_WITHOUT_VALIDATION';
|
|
202
202
|
exports.E_APPROVAL_MODIFY_DISABLED_IBAN_VALIDATION_MAX_INTENTS_REACHED = 'E_APPROVAL_MODIFY_DISABLED_IBAN_VALIDATION_MAX_INTENTS_REACHED';
|
|
203
203
|
exports.E_SHOPPING_CART_DEPRECATED = 'E_SHOPPING_CART_DEPRECATED';
|
|
204
|
+
exports.E_PROVINCE_WITHOUT_AVAILABLE_VOIP_NUMBERS = 'E_PROVINCE_WITHOUT_AVAILABLE_VOIP_NUMBERS';
|
|
204
205
|
exports.E_SHOPPING_CART_APARTMENT_BUSINESS_RULE = 'E_SHOPPING_CART_APARTMENT_BUSINESS_RULE';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ShoppingCartProductType } from '../../../constants';
|
|
2
|
-
import { ServiceSpecificationType } from '../../../../bss/constants';
|
|
3
1
|
import { ShoppingCartConfigurationAddressResDto } from '..';
|
|
4
2
|
import { ShoppingCartParametersDto } from '../../../../bss/bearingpoint';
|
|
3
|
+
import { Builder } from '../../../helpers/helpers';
|
|
5
4
|
export declare class ShoppingCartUpdateInfoDto {
|
|
6
5
|
channel: string;
|
|
7
6
|
username: string;
|
|
@@ -41,11 +40,17 @@ export declare class UpdateShoppingCartCharacteristicPriceDto {
|
|
|
41
40
|
amount?: number;
|
|
42
41
|
bindingDate?: string;
|
|
43
42
|
}
|
|
43
|
+
export declare class UpdateShoppingCartCharacteristicPriceDtoBuilder extends Builder<UpdateShoppingCartCharacteristicPriceDto> {
|
|
44
|
+
setDefaults(): UpdateShoppingCartCharacteristicPriceDto;
|
|
45
|
+
}
|
|
44
46
|
export declare class UpdateShoppingCartCharacteristicDto {
|
|
45
47
|
name: string;
|
|
46
48
|
qty: number;
|
|
47
49
|
prices?: UpdateShoppingCartCharacteristicPriceDto[];
|
|
48
50
|
}
|
|
51
|
+
export declare class UpdateShoppingCartCharacteristicDtoBuilder extends Builder<UpdateShoppingCartCharacteristicDto> {
|
|
52
|
+
setDefaults(): UpdateShoppingCartCharacteristicDto;
|
|
53
|
+
}
|
|
49
54
|
export declare class UpdateShoppingCartOneBundlePromotionsDto {
|
|
50
55
|
promotions: UpdateShoppingCartCharacteristicDto[];
|
|
51
56
|
updateInfo: ShoppingCartUpdateInfoDto;
|
|
@@ -60,25 +65,16 @@ export declare class UpdateShoppingCartBundlesConfigurationDto {
|
|
|
60
65
|
parameters: ShoppingCartParametersDto;
|
|
61
66
|
updateInfo?: ShoppingCartUpdateInfoDto;
|
|
62
67
|
}
|
|
63
|
-
export declare class
|
|
64
|
-
|
|
65
|
-
parameters: ShoppingCartParametersDto;
|
|
66
|
-
updateInfo?: ShoppingCartUpdateInfoDto;
|
|
68
|
+
export declare class UpdateShoppingCartBundlesConfigurationDtoBuilder extends Builder<UpdateShoppingCartBundlesConfigurationDto> {
|
|
69
|
+
setDefaults(): UpdateShoppingCartBundlesConfigurationDto;
|
|
67
70
|
}
|
|
68
71
|
export declare class UpdateShoppingCartConfigurationBundleDto {
|
|
69
72
|
id: string;
|
|
70
73
|
name: string;
|
|
71
74
|
products: UpdateShoppingCartConfigurationProductDto[];
|
|
72
75
|
}
|
|
73
|
-
export declare class
|
|
74
|
-
|
|
75
|
-
products: UpdateWebShoppingCartConfigurationProductDto[];
|
|
76
|
-
}
|
|
77
|
-
export declare class UpdateWebShoppingCartConfigurationProductDto {
|
|
78
|
-
name: string;
|
|
79
|
-
type: ShoppingCartProductType;
|
|
80
|
-
characteristics: UpdateShoppingCartCharacteristicDto[];
|
|
81
|
-
serviceSpecification: UpdateWebShoppingCartServiceSpecificationItemDto[];
|
|
76
|
+
export declare class UpdateShoppingCartConfigurationBundleDtoBuilder extends Builder<UpdateShoppingCartConfigurationBundleDto> {
|
|
77
|
+
setDefaults(): UpdateShoppingCartConfigurationBundleDto;
|
|
82
78
|
}
|
|
83
79
|
export declare class UpdateShoppingCartConfigurationProductDto {
|
|
84
80
|
id: string;
|
|
@@ -86,14 +82,16 @@ export declare class UpdateShoppingCartConfigurationProductDto {
|
|
|
86
82
|
characteristics: UpdateShoppingCartCharacteristicDto[];
|
|
87
83
|
serviceSpecification: UpdateShoppingCartServiceSpecificationItemDto[];
|
|
88
84
|
}
|
|
85
|
+
export declare class UpdateShoppingCartConfigurationProductDtoBuilder extends Builder<UpdateShoppingCartConfigurationProductDto> {
|
|
86
|
+
setDefaults(): UpdateShoppingCartConfigurationProductDto;
|
|
87
|
+
}
|
|
89
88
|
export declare class UpdateShoppingCartServiceSpecificationItemDto {
|
|
90
89
|
name: string;
|
|
91
90
|
value?: string | ShoppingCartConfigurationAddressResDto;
|
|
92
91
|
}
|
|
93
|
-
export declare class
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
value?: string | ShoppingCartConfigurationAddressResDto;
|
|
92
|
+
export declare class UpdateShoppingCartServiceSpecificationItemDtoBuilder extends Builder<UpdateShoppingCartServiceSpecificationItemDto> {
|
|
93
|
+
setDefaults(): UpdateShoppingCartServiceSpecificationItemDto;
|
|
94
|
+
setAddressDefaults(): UpdateShoppingCartServiceSpecificationItemDto;
|
|
97
95
|
}
|
|
98
96
|
export declare class AvailableProductsQueryDto {
|
|
99
97
|
configurationAttributes: boolean;
|
|
@@ -9,14 +9,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ExtrasQueryDto = exports.AvailableProductsQueryDto = exports.
|
|
12
|
+
exports.ExtrasQueryDto = exports.AvailableProductsQueryDto = exports.UpdateShoppingCartServiceSpecificationItemDtoBuilder = exports.UpdateShoppingCartServiceSpecificationItemDto = exports.UpdateShoppingCartConfigurationProductDtoBuilder = exports.UpdateShoppingCartConfigurationProductDto = exports.UpdateShoppingCartConfigurationBundleDtoBuilder = exports.UpdateShoppingCartConfigurationBundleDto = exports.UpdateShoppingCartBundlesConfigurationDtoBuilder = exports.UpdateShoppingCartBundlesConfigurationDto = exports.UpdateShoppingCartConfigurationDto = exports.UpdateShoppingCartOneBundlePromotionsDto = exports.UpdateShoppingCartCharacteristicDtoBuilder = exports.UpdateShoppingCartCharacteristicDto = exports.UpdateShoppingCartCharacteristicPriceDtoBuilder = exports.UpdateShoppingCartCharacteristicPriceDto = exports.UpdateShoppingCartContractDto = exports.SaveShoppingCartDto = exports.UpdateShoppingCartExtraGroupDto = exports.UpdateShoppingCartExtraDto = exports.UpdateShoppingCartBundlesExtraDto = exports.UpdateShoppingCartBundleExtrasDto = exports.UpdateShoppingCartExtrasDto = exports.ShoppingCartUpdateInfoDto = void 0;
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
|
-
const
|
|
17
|
-
const constants_2 = require("../../../../bss/constants");
|
|
16
|
+
const __1 = require("..");
|
|
18
17
|
const bearingpoint_1 = require("../../../../bss/bearingpoint");
|
|
19
18
|
const _validators_1 = require("../../../../validators/index");
|
|
19
|
+
const helpers_1 = require("../../../helpers/helpers");
|
|
20
|
+
const faker_1 = require("@faker-js/faker");
|
|
20
21
|
class ShoppingCartUpdateInfoDto {
|
|
21
22
|
static _OPENAPI_METADATA_FACTORY() {
|
|
22
23
|
return { channel: { required: true, type: () => String }, username: { required: true, type: () => String } };
|
|
@@ -147,7 +148,7 @@ __decorate([
|
|
|
147
148
|
__metadata("design:type", Number)
|
|
148
149
|
], UpdateShoppingCartCharacteristicPriceDto.prototype, "amount", void 0);
|
|
149
150
|
__decorate([
|
|
150
|
-
(0, class_validator_1.IsISO8601)({}),
|
|
151
|
+
(0, class_validator_1.IsISO8601)({ strict: true }),
|
|
151
152
|
(0, class_validator_1.IsNotEmpty)(),
|
|
152
153
|
(0, _validators_1.IsNotBlank)(),
|
|
153
154
|
(0, class_validator_1.MaxLength)(10),
|
|
@@ -155,6 +156,21 @@ __decorate([
|
|
|
155
156
|
__metadata("design:type", String)
|
|
156
157
|
], UpdateShoppingCartCharacteristicPriceDto.prototype, "bindingDate", void 0);
|
|
157
158
|
exports.UpdateShoppingCartCharacteristicPriceDto = UpdateShoppingCartCharacteristicPriceDto;
|
|
159
|
+
class UpdateShoppingCartCharacteristicPriceDtoBuilder extends helpers_1.Builder {
|
|
160
|
+
setDefaults() {
|
|
161
|
+
const { key: name, productName: displayName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
162
|
+
return {
|
|
163
|
+
name,
|
|
164
|
+
displayName,
|
|
165
|
+
amount: faker_1.faker.number.float({ min: -100, max: 100 }),
|
|
166
|
+
bindingDate: faker_1.faker.date.anytime().toISOString().substring(0, 10)
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
170
|
+
return {};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.UpdateShoppingCartCharacteristicPriceDtoBuilder = UpdateShoppingCartCharacteristicPriceDtoBuilder;
|
|
158
174
|
class UpdateShoppingCartCharacteristicDto {
|
|
159
175
|
static _OPENAPI_METADATA_FACTORY() {
|
|
160
176
|
return { name: { required: true, type: () => String }, qty: { required: true, type: () => Number, minimum: 0, maximum: 99 }, prices: { required: false, type: () => [require("./other.entity").UpdateShoppingCartCharacteristicPriceDto] } };
|
|
@@ -163,6 +179,7 @@ class UpdateShoppingCartCharacteristicDto {
|
|
|
163
179
|
__decorate([
|
|
164
180
|
(0, class_validator_1.IsString)(),
|
|
165
181
|
(0, class_validator_1.IsNotEmpty)(),
|
|
182
|
+
(0, _validators_1.IsNotBlank)(),
|
|
166
183
|
__metadata("design:type", String)
|
|
167
184
|
], UpdateShoppingCartCharacteristicDto.prototype, "name", void 0);
|
|
168
185
|
__decorate([
|
|
@@ -180,6 +197,19 @@ __decorate([
|
|
|
180
197
|
__metadata("design:type", Array)
|
|
181
198
|
], UpdateShoppingCartCharacteristicDto.prototype, "prices", void 0);
|
|
182
199
|
exports.UpdateShoppingCartCharacteristicDto = UpdateShoppingCartCharacteristicDto;
|
|
200
|
+
class UpdateShoppingCartCharacteristicDtoBuilder extends helpers_1.Builder {
|
|
201
|
+
setDefaults() {
|
|
202
|
+
const { key: name } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
203
|
+
return {
|
|
204
|
+
name,
|
|
205
|
+
qty: faker_1.faker.number.int({ min: 0, max: 99 })
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
209
|
+
return {};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
exports.UpdateShoppingCartCharacteristicDtoBuilder = UpdateShoppingCartCharacteristicDtoBuilder;
|
|
183
213
|
class UpdateShoppingCartOneBundlePromotionsDto {
|
|
184
214
|
static _OPENAPI_METADATA_FACTORY() {
|
|
185
215
|
return { promotions: { required: true, type: () => [require("./other.entity").UpdateShoppingCartCharacteristicDto] }, updateInfo: { required: true, type: () => require("./other.entity").ShoppingCartUpdateInfoDto } };
|
|
@@ -224,25 +254,18 @@ __decorate([
|
|
|
224
254
|
__metadata("design:type", bearingpoint_1.ShoppingCartParametersDto)
|
|
225
255
|
], UpdateShoppingCartBundlesConfigurationDto.prototype, "parameters", void 0);
|
|
226
256
|
exports.UpdateShoppingCartBundlesConfigurationDto = UpdateShoppingCartBundlesConfigurationDto;
|
|
227
|
-
class
|
|
257
|
+
class UpdateShoppingCartBundlesConfigurationDtoBuilder extends helpers_1.Builder {
|
|
258
|
+
setDefaults() {
|
|
259
|
+
return {
|
|
260
|
+
bundles: [],
|
|
261
|
+
parameters: new bearingpoint_1.ShoppingCartParametersDtoBuilder().build()
|
|
262
|
+
};
|
|
263
|
+
}
|
|
228
264
|
static _OPENAPI_METADATA_FACTORY() {
|
|
229
|
-
return {
|
|
265
|
+
return {};
|
|
230
266
|
}
|
|
231
267
|
}
|
|
232
|
-
|
|
233
|
-
(0, class_validator_1.IsArray)(),
|
|
234
|
-
(0, class_validator_1.ArrayNotEmpty)(),
|
|
235
|
-
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
236
|
-
(0, class_transformer_1.Type)(() => UpdateWebShoppingCartConfigurationBundleDto),
|
|
237
|
-
__metadata("design:type", Array)
|
|
238
|
-
], UpdateWebShoppingCartBundlesConfigurationDto.prototype, "bundles", void 0);
|
|
239
|
-
__decorate([
|
|
240
|
-
(0, class_validator_1.IsDefined)(),
|
|
241
|
-
(0, class_validator_1.ValidateNested)(),
|
|
242
|
-
(0, class_transformer_1.Type)(() => bearingpoint_1.ShoppingCartParametersDto),
|
|
243
|
-
__metadata("design:type", bearingpoint_1.ShoppingCartParametersDto)
|
|
244
|
-
], UpdateWebShoppingCartBundlesConfigurationDto.prototype, "parameters", void 0);
|
|
245
|
-
exports.UpdateWebShoppingCartBundlesConfigurationDto = UpdateWebShoppingCartBundlesConfigurationDto;
|
|
268
|
+
exports.UpdateShoppingCartBundlesConfigurationDtoBuilder = UpdateShoppingCartBundlesConfigurationDtoBuilder;
|
|
246
269
|
class UpdateShoppingCartConfigurationBundleDto {
|
|
247
270
|
static _OPENAPI_METADATA_FACTORY() {
|
|
248
271
|
return { id: { required: true, type: () => String }, name: { required: true, type: () => String }, products: { required: true, type: () => [require("./other.entity").UpdateShoppingCartConfigurationProductDto] } };
|
|
@@ -251,11 +274,13 @@ class UpdateShoppingCartConfigurationBundleDto {
|
|
|
251
274
|
__decorate([
|
|
252
275
|
(0, class_validator_1.IsString)(),
|
|
253
276
|
(0, class_validator_1.IsNotEmpty)(),
|
|
277
|
+
(0, _validators_1.IsNotBlank)(),
|
|
254
278
|
__metadata("design:type", String)
|
|
255
279
|
], UpdateShoppingCartConfigurationBundleDto.prototype, "id", void 0);
|
|
256
280
|
__decorate([
|
|
257
281
|
(0, class_validator_1.IsString)(),
|
|
258
282
|
(0, class_validator_1.IsNotEmpty)(),
|
|
283
|
+
(0, _validators_1.IsNotBlank)(),
|
|
259
284
|
__metadata("design:type", String)
|
|
260
285
|
], UpdateShoppingCartConfigurationBundleDto.prototype, "name", void 0);
|
|
261
286
|
__decorate([
|
|
@@ -266,51 +291,20 @@ __decorate([
|
|
|
266
291
|
__metadata("design:type", Array)
|
|
267
292
|
], UpdateShoppingCartConfigurationBundleDto.prototype, "products", void 0);
|
|
268
293
|
exports.UpdateShoppingCartConfigurationBundleDto = UpdateShoppingCartConfigurationBundleDto;
|
|
269
|
-
class
|
|
270
|
-
|
|
271
|
-
|
|
294
|
+
class UpdateShoppingCartConfigurationBundleDtoBuilder extends helpers_1.Builder {
|
|
295
|
+
setDefaults() {
|
|
296
|
+
const { key: name } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
297
|
+
return {
|
|
298
|
+
id: faker_1.faker.string.uuid(),
|
|
299
|
+
name,
|
|
300
|
+
products: []
|
|
301
|
+
};
|
|
272
302
|
}
|
|
273
|
-
}
|
|
274
|
-
__decorate([
|
|
275
|
-
(0, class_validator_1.IsString)(),
|
|
276
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
277
|
-
__metadata("design:type", String)
|
|
278
|
-
], UpdateWebShoppingCartConfigurationBundleDto.prototype, "name", void 0);
|
|
279
|
-
__decorate([
|
|
280
|
-
(0, class_validator_1.IsArray)(),
|
|
281
|
-
(0, class_validator_1.ArrayNotEmpty)(),
|
|
282
|
-
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
283
|
-
(0, class_transformer_1.Type)(() => UpdateWebShoppingCartConfigurationProductDto),
|
|
284
|
-
__metadata("design:type", Array)
|
|
285
|
-
], UpdateWebShoppingCartConfigurationBundleDto.prototype, "products", void 0);
|
|
286
|
-
exports.UpdateWebShoppingCartConfigurationBundleDto = UpdateWebShoppingCartConfigurationBundleDto;
|
|
287
|
-
class UpdateWebShoppingCartConfigurationProductDto {
|
|
288
303
|
static _OPENAPI_METADATA_FACTORY() {
|
|
289
|
-
return {
|
|
304
|
+
return {};
|
|
290
305
|
}
|
|
291
306
|
}
|
|
292
|
-
|
|
293
|
-
(0, class_validator_1.IsString)(),
|
|
294
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
295
|
-
__metadata("design:type", String)
|
|
296
|
-
], UpdateWebShoppingCartConfigurationProductDto.prototype, "name", void 0);
|
|
297
|
-
__decorate([
|
|
298
|
-
(0, _validators_1.IsEnum)(constants_1.ShoppingCartProductType),
|
|
299
|
-
__metadata("design:type", String)
|
|
300
|
-
], UpdateWebShoppingCartConfigurationProductDto.prototype, "type", void 0);
|
|
301
|
-
__decorate([
|
|
302
|
-
(0, class_validator_1.IsArray)(),
|
|
303
|
-
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
304
|
-
(0, class_transformer_1.Type)(() => UpdateShoppingCartCharacteristicDto),
|
|
305
|
-
__metadata("design:type", Array)
|
|
306
|
-
], UpdateWebShoppingCartConfigurationProductDto.prototype, "characteristics", void 0);
|
|
307
|
-
__decorate([
|
|
308
|
-
(0, class_validator_1.IsArray)(),
|
|
309
|
-
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
310
|
-
(0, class_transformer_1.Type)(() => UpdateWebShoppingCartServiceSpecificationItemDto),
|
|
311
|
-
__metadata("design:type", Array)
|
|
312
|
-
], UpdateWebShoppingCartConfigurationProductDto.prototype, "serviceSpecification", void 0);
|
|
313
|
-
exports.UpdateWebShoppingCartConfigurationProductDto = UpdateWebShoppingCartConfigurationProductDto;
|
|
307
|
+
exports.UpdateShoppingCartConfigurationBundleDtoBuilder = UpdateShoppingCartConfigurationBundleDtoBuilder;
|
|
314
308
|
class UpdateShoppingCartConfigurationProductDto {
|
|
315
309
|
static _OPENAPI_METADATA_FACTORY() {
|
|
316
310
|
return { id: { required: true, type: () => String }, name: { required: true, type: () => String }, characteristics: { required: true, type: () => [require("./other.entity").UpdateShoppingCartCharacteristicDto] }, serviceSpecification: { required: true, type: () => [require("./other.entity").UpdateShoppingCartServiceSpecificationItemDto] } };
|
|
@@ -319,11 +313,13 @@ class UpdateShoppingCartConfigurationProductDto {
|
|
|
319
313
|
__decorate([
|
|
320
314
|
(0, class_validator_1.IsString)(),
|
|
321
315
|
(0, class_validator_1.IsNotEmpty)(),
|
|
316
|
+
(0, _validators_1.IsNotBlank)(),
|
|
322
317
|
__metadata("design:type", String)
|
|
323
318
|
], UpdateShoppingCartConfigurationProductDto.prototype, "id", void 0);
|
|
324
319
|
__decorate([
|
|
325
320
|
(0, class_validator_1.IsString)(),
|
|
326
321
|
(0, class_validator_1.IsNotEmpty)(),
|
|
322
|
+
(0, _validators_1.IsNotBlank)(),
|
|
327
323
|
__metadata("design:type", String)
|
|
328
324
|
], UpdateShoppingCartConfigurationProductDto.prototype, "name", void 0);
|
|
329
325
|
__decorate([
|
|
@@ -339,6 +335,21 @@ __decorate([
|
|
|
339
335
|
__metadata("design:type", Array)
|
|
340
336
|
], UpdateShoppingCartConfigurationProductDto.prototype, "serviceSpecification", void 0);
|
|
341
337
|
exports.UpdateShoppingCartConfigurationProductDto = UpdateShoppingCartConfigurationProductDto;
|
|
338
|
+
class UpdateShoppingCartConfigurationProductDtoBuilder extends helpers_1.Builder {
|
|
339
|
+
setDefaults() {
|
|
340
|
+
const { key: name } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
341
|
+
return {
|
|
342
|
+
id: faker_1.faker.string.uuid(),
|
|
343
|
+
name,
|
|
344
|
+
characteristics: [],
|
|
345
|
+
serviceSpecification: []
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
349
|
+
return {};
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
exports.UpdateShoppingCartConfigurationProductDtoBuilder = UpdateShoppingCartConfigurationProductDtoBuilder;
|
|
342
353
|
class UpdateShoppingCartServiceSpecificationItemDto {
|
|
343
354
|
static _OPENAPI_METADATA_FACTORY() {
|
|
344
355
|
return { name: { required: true, type: () => String }, value: { required: false, type: () => Object } };
|
|
@@ -347,6 +358,7 @@ class UpdateShoppingCartServiceSpecificationItemDto {
|
|
|
347
358
|
__decorate([
|
|
348
359
|
(0, class_validator_1.IsString)(),
|
|
349
360
|
(0, class_validator_1.IsNotEmpty)(),
|
|
361
|
+
(0, _validators_1.IsNotBlank)(),
|
|
350
362
|
__metadata("design:type", String)
|
|
351
363
|
], UpdateShoppingCartServiceSpecificationItemDto.prototype, "name", void 0);
|
|
352
364
|
__decorate([
|
|
@@ -354,25 +366,26 @@ __decorate([
|
|
|
354
366
|
__metadata("design:type", Object)
|
|
355
367
|
], UpdateShoppingCartServiceSpecificationItemDto.prototype, "value", void 0);
|
|
356
368
|
exports.UpdateShoppingCartServiceSpecificationItemDto = UpdateShoppingCartServiceSpecificationItemDto;
|
|
357
|
-
class
|
|
369
|
+
class UpdateShoppingCartServiceSpecificationItemDtoBuilder extends helpers_1.Builder {
|
|
370
|
+
setDefaults() {
|
|
371
|
+
const { key: name } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
372
|
+
return {
|
|
373
|
+
name,
|
|
374
|
+
value: faker_1.faker.string.alpha()
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
setAddressDefaults() {
|
|
378
|
+
const { key: name } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
379
|
+
return {
|
|
380
|
+
name,
|
|
381
|
+
value: new __1.ShoppingCartConfigurationAddressResDtoBuilder().build()
|
|
382
|
+
};
|
|
383
|
+
}
|
|
358
384
|
static _OPENAPI_METADATA_FACTORY() {
|
|
359
|
-
return {
|
|
385
|
+
return {};
|
|
360
386
|
}
|
|
361
387
|
}
|
|
362
|
-
|
|
363
|
-
(0, class_validator_1.IsString)(),
|
|
364
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
365
|
-
__metadata("design:type", String)
|
|
366
|
-
], UpdateWebShoppingCartServiceSpecificationItemDto.prototype, "name", void 0);
|
|
367
|
-
__decorate([
|
|
368
|
-
(0, _validators_1.IsEnum)(constants_2.ServiceSpecificationType),
|
|
369
|
-
__metadata("design:type", String)
|
|
370
|
-
], UpdateWebShoppingCartServiceSpecificationItemDto.prototype, "type", void 0);
|
|
371
|
-
__decorate([
|
|
372
|
-
(0, class_validator_1.IsOptional)(),
|
|
373
|
-
__metadata("design:type", Object)
|
|
374
|
-
], UpdateWebShoppingCartServiceSpecificationItemDto.prototype, "value", void 0);
|
|
375
|
-
exports.UpdateWebShoppingCartServiceSpecificationItemDto = UpdateWebShoppingCartServiceSpecificationItemDto;
|
|
388
|
+
exports.UpdateShoppingCartServiceSpecificationItemDtoBuilder = UpdateShoppingCartServiceSpecificationItemDtoBuilder;
|
|
376
389
|
class AvailableProductsQueryDto {
|
|
377
390
|
static _OPENAPI_METADATA_FACTORY() {
|
|
378
391
|
return { configurationAttributes: { required: true, type: () => Boolean } };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ShoppingCartEntityParametersDto, ShoppingCartParametersDto } from '../../../../bss/bearingpoint';
|
|
2
2
|
import { BssChargeType, ServiceSpecificationType, ShoppingCartProductAction } from '../../../../bss/constants';
|
|
3
3
|
import { ShoppingCartProductType } from '../../../constants';
|
|
4
|
+
import { Builder } from '../../../helpers/helpers';
|
|
4
5
|
export declare class ShoppingCartConfigurationAttributeDto {
|
|
5
6
|
name: string;
|
|
6
7
|
value: string;
|
|
@@ -79,6 +80,7 @@ export declare class ShoppingCartConfigurationBundleResDto {
|
|
|
79
80
|
displayName: string;
|
|
80
81
|
displayDescription: string;
|
|
81
82
|
products: ShoppingCartConfigurationProductResDto[];
|
|
83
|
+
parameters?: ShoppingCartParametersDto;
|
|
82
84
|
}
|
|
83
85
|
export declare class ShoppingCartFeaturesResDto {
|
|
84
86
|
id?: string;
|
|
@@ -174,6 +176,7 @@ export declare class ShoppingCartConfigurationProductResDto {
|
|
|
174
176
|
serviceSpecification?: ShoppingCartConfigurationServiceSpecificationItemResDto[];
|
|
175
177
|
serviceCharacteristicName?: string;
|
|
176
178
|
serviceCharacteristicValue?: string | ShoppingCartConfigurationAddressResDto;
|
|
179
|
+
parameters?: ShoppingCartParametersDto;
|
|
177
180
|
}
|
|
178
181
|
export declare class ShoppingCartConfigurationServiceSpecificationItemBssResDto {
|
|
179
182
|
name: string;
|
|
@@ -210,6 +213,9 @@ export declare class ShoppingCartConfigurationAddressResDto {
|
|
|
210
213
|
entrance?: string;
|
|
211
214
|
apartmentId?: string;
|
|
212
215
|
}
|
|
216
|
+
export declare class ShoppingCartConfigurationAddressResDtoBuilder extends Builder<ShoppingCartConfigurationAddressResDto> {
|
|
217
|
+
setDefaults(): ShoppingCartConfigurationAddressResDto;
|
|
218
|
+
}
|
|
213
219
|
export declare class ShoppingCartConfigurationServiceValueResDto {
|
|
214
220
|
name: string;
|
|
215
221
|
displayName: string;
|
|
@@ -9,8 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ShoppingCartInfoServiceCharacteristicDto = exports.ShoppingCartInfoServiceDto = exports.ShoppingCartInfoCharacteristicDto = exports.ShoppingCartInfoProductDto = exports.ShoppingCartBundleInfoDto = exports.ShoppingCartBundlesInfoDto = exports.ShoppingCartInfoDto = exports.ShoppingCartConfigurationServiceValueResDto = exports.ShoppingCartConfigurationAddressResDto = exports.ShoppingCartConfigurationServiceSpecificationItemResDto = exports.ShoppingCartConfigurationServiceSpecificationItemBssResDto = exports.ShoppingCartConfigurationProductResDto = exports.ShoppingCartConfigurationProductBssResDto = exports.ShoppingCartConfigurationChargeResDto = exports.ShoppingCartConfigurationCharacteristicResDto = exports.ShoppingCartConfigurationPriceResDto = exports.ShoppingCartConfigurationCharacteristicGroupResDto = exports.ShoppingCartConfigurationFeaturesResDto = exports.ShoppingCartBundlesConfigurationResDto = exports.ShoppingCartConfigurationResDto = exports.ShoppingCartFeaturesResDto = exports.ShoppingCartConfigurationBundleResDto = exports.ShoppingCartConfigurationBundleBssResDto = exports.ShoppingCartBundlesConfigurationBssResDto = exports.ShoppingCartConfigurationBssResDto = exports.ShoppingCartAvailableProductWithIdAndInfoResDto = exports.ShoppingCartAvailableProductWithIdResDto = exports.ShoppingCartAvailableProductBundleProductsDto = exports.ShoppingCartAvailableProductBundleProductsMobileDto = exports.ShoppingCartAvailableProductBundleProductsMobileProductDto = exports.ShoppingCartAvailableProductBundleProductsFiberDto = exports.ShoppingCartAvailableProductBundleProductsFiberProductDto = exports.ShoppingCartAvailableProductBundleProductsFiberProductBandwidthDto = exports.ShoppingCartAvailableProductInfoDto = exports.ShoppingCartAvailableProductResDto = exports.ShoppingCartConfigurationAttributeDto = void 0;
|
|
12
|
+
exports.ShoppingCartInfoServiceCharacteristicDto = exports.ShoppingCartInfoServiceDto = exports.ShoppingCartInfoCharacteristicDto = exports.ShoppingCartInfoProductDto = exports.ShoppingCartBundleInfoDto = exports.ShoppingCartBundlesInfoDto = exports.ShoppingCartInfoDto = exports.ShoppingCartConfigurationServiceValueResDto = exports.ShoppingCartConfigurationAddressResDtoBuilder = exports.ShoppingCartConfigurationAddressResDto = exports.ShoppingCartConfigurationServiceSpecificationItemResDto = exports.ShoppingCartConfigurationServiceSpecificationItemBssResDto = exports.ShoppingCartConfigurationProductResDto = exports.ShoppingCartConfigurationProductBssResDto = exports.ShoppingCartConfigurationChargeResDto = exports.ShoppingCartConfigurationCharacteristicResDto = exports.ShoppingCartConfigurationPriceResDto = exports.ShoppingCartConfigurationCharacteristicGroupResDto = exports.ShoppingCartConfigurationFeaturesResDto = exports.ShoppingCartBundlesConfigurationResDto = exports.ShoppingCartConfigurationResDto = exports.ShoppingCartFeaturesResDto = exports.ShoppingCartConfigurationBundleResDto = exports.ShoppingCartConfigurationBundleBssResDto = exports.ShoppingCartBundlesConfigurationBssResDto = exports.ShoppingCartConfigurationBssResDto = exports.ShoppingCartAvailableProductWithIdAndInfoResDto = exports.ShoppingCartAvailableProductWithIdResDto = exports.ShoppingCartAvailableProductBundleProductsDto = exports.ShoppingCartAvailableProductBundleProductsMobileDto = exports.ShoppingCartAvailableProductBundleProductsMobileProductDto = exports.ShoppingCartAvailableProductBundleProductsFiberDto = exports.ShoppingCartAvailableProductBundleProductsFiberProductDto = exports.ShoppingCartAvailableProductBundleProductsFiberProductBandwidthDto = exports.ShoppingCartAvailableProductInfoDto = exports.ShoppingCartAvailableProductResDto = exports.ShoppingCartConfigurationAttributeDto = void 0;
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
|
+
const helpers_1 = require("../../../helpers/helpers");
|
|
14
15
|
const class_transformer_1 = require("class-transformer");
|
|
15
16
|
const class_validator_1 = require("class-validator");
|
|
16
17
|
class ShoppingCartConfigurationAttributeDto {
|
|
@@ -99,7 +100,7 @@ class ShoppingCartConfigurationBundleBssResDto {
|
|
|
99
100
|
exports.ShoppingCartConfigurationBundleBssResDto = ShoppingCartConfigurationBundleBssResDto;
|
|
100
101
|
class ShoppingCartConfigurationBundleResDto {
|
|
101
102
|
static _OPENAPI_METADATA_FACTORY() {
|
|
102
|
-
return { id: { required: true, type: () => String }, name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, displayDescription: { required: true, type: () => String }, products: { required: true, type: () => [require("./other.entity").ShoppingCartConfigurationProductResDto] } };
|
|
103
|
+
return { id: { required: true, type: () => String }, name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, displayDescription: { required: true, type: () => String }, products: { required: true, type: () => [require("./other.entity").ShoppingCartConfigurationProductResDto] }, parameters: { required: false, type: () => require("../../../../bss/bearingpoint/shopping-cart/shopping-cart-parameters.entity").ShoppingCartParametersDto } };
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
exports.ShoppingCartConfigurationBundleResDto = ShoppingCartConfigurationBundleResDto;
|
|
@@ -159,7 +160,7 @@ class ShoppingCartConfigurationProductBssResDto {
|
|
|
159
160
|
exports.ShoppingCartConfigurationProductBssResDto = ShoppingCartConfigurationProductBssResDto;
|
|
160
161
|
class ShoppingCartConfigurationProductResDto {
|
|
161
162
|
static _OPENAPI_METADATA_FACTORY() {
|
|
162
|
-
return { id: { required: true, type: () => String }, name: { required: true, type: () => String }, action: { required: false, enum: require("../../../../bss/constants/bss.constants").ShoppingCartProductAction }, displayName: { required: true, type: () => String }, displayDescription: { required: true, type: () => String }, type: { required: true, enum: require("../../../constants/common.constants").ShoppingCartProductType }, enabled: { required: true, type: () => Boolean }, characteristicGroups: { required: false, type: () => [require("./other.entity").ShoppingCartConfigurationCharacteristicGroupResDto] }, characteristics: { required: true, type: () => [require("./other.entity").ShoppingCartConfigurationCharacteristicResDto] }, serviceSpecification: { required: false, type: () => [require("./other.entity").ShoppingCartConfigurationServiceSpecificationItemResDto] }, serviceCharacteristicName: { required: false, type: () => String }, serviceCharacteristicValue: { required: false, type: () => Object } };
|
|
163
|
+
return { id: { required: true, type: () => String }, name: { required: true, type: () => String }, action: { required: false, enum: require("../../../../bss/constants/bss.constants").ShoppingCartProductAction }, displayName: { required: true, type: () => String }, displayDescription: { required: true, type: () => String }, type: { required: true, enum: require("../../../constants/common.constants").ShoppingCartProductType }, enabled: { required: true, type: () => Boolean }, characteristicGroups: { required: false, type: () => [require("./other.entity").ShoppingCartConfigurationCharacteristicGroupResDto] }, characteristics: { required: true, type: () => [require("./other.entity").ShoppingCartConfigurationCharacteristicResDto] }, serviceSpecification: { required: false, type: () => [require("./other.entity").ShoppingCartConfigurationServiceSpecificationItemResDto] }, serviceCharacteristicName: { required: false, type: () => String }, serviceCharacteristicValue: { required: false, type: () => Object }, parameters: { required: false, type: () => require("../../../../bss/bearingpoint/shopping-cart/shopping-cart-parameters.entity").ShoppingCartParametersDto } };
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
exports.ShoppingCartConfigurationProductResDto = ShoppingCartConfigurationProductResDto;
|
|
@@ -239,6 +240,28 @@ __decorate([
|
|
|
239
240
|
__metadata("design:type", Object)
|
|
240
241
|
], ShoppingCartConfigurationAddressResDto.prototype, "entrance", void 0);
|
|
241
242
|
exports.ShoppingCartConfigurationAddressResDto = ShoppingCartConfigurationAddressResDto;
|
|
243
|
+
class ShoppingCartConfigurationAddressResDtoBuilder extends helpers_1.Builder {
|
|
244
|
+
setDefaults() {
|
|
245
|
+
return {
|
|
246
|
+
country: 'ES',
|
|
247
|
+
postcode: '08506',
|
|
248
|
+
province: 'BARCELONA',
|
|
249
|
+
city: 'CALLDETENES',
|
|
250
|
+
streetType: 'CL',
|
|
251
|
+
streetName: 'UNIO',
|
|
252
|
+
streetNumber: '23',
|
|
253
|
+
block: '',
|
|
254
|
+
floor: 'BA ',
|
|
255
|
+
door: '',
|
|
256
|
+
entrance: '',
|
|
257
|
+
apartmentId: '937367'
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
261
|
+
return {};
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
exports.ShoppingCartConfigurationAddressResDtoBuilder = ShoppingCartConfigurationAddressResDtoBuilder;
|
|
242
265
|
class ShoppingCartConfigurationServiceValueResDto {
|
|
243
266
|
static _OPENAPI_METADATA_FACTORY() {
|
|
244
267
|
return { name: { required: true, type: () => String }, displayName: { required: true, type: () => String } };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Builder = exports.invertEnum = void 0;
|
|
3
|
+
exports.fakerCommerceProductNameAndKey = exports.Builder = exports.invertEnum = void 0;
|
|
4
|
+
const faker_1 = require("@faker-js/faker");
|
|
4
5
|
function invertEnum({ enumObject }) {
|
|
5
6
|
const enumInvertdEntries = Object.entries(enumObject).reduce((acc, enumItem) => {
|
|
6
7
|
return [...acc, enumItem.reverse()];
|
|
@@ -30,3 +31,9 @@ class Builder {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
exports.Builder = Builder;
|
|
34
|
+
function fakerCommerceProductNameAndKey() {
|
|
35
|
+
const productName = faker_1.faker.commerce.productName();
|
|
36
|
+
const key = productName.toUpperCase().split(' ').join('_');
|
|
37
|
+
return { key, productName };
|
|
38
|
+
}
|
|
39
|
+
exports.fakerCommerceProductNameAndKey = fakerCommerceProductNameAndKey;
|