adamo-types 1.2.132-sit → 1.2.134-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/billing/customer-bill.entity.d.ts +1 -0
- package/dist/bss/bearingpoint/billing/customer-bill.entity.js +1 -1
- package/dist/bss/bearingpoint/customer/customer-account.entity.js +3 -2
- package/dist/bss/billing/billing.entity.d.ts +1 -0
- package/dist/bss/billing/billing.entity.js +1 -1
- package/dist/bss/customer/customer-product.entity.d.ts +4 -0
- package/dist/bss/customer/customer-product.entity.js +32 -1
- package/dist/bss/product/product.entity.js +1 -1
- package/dist/common/helpers/helpers.d.ts +1 -0
- package/dist/common/helpers/helpers.js +5 -1
- package/dist/database/product-transition-configuration.entity.d.ts +1 -1
- package/dist/database/product-transition-configuration.entity.js +1 -1
- package/dist/sys03/customer/customer.entity.d.ts +3 -0
- package/dist/sys03/customer/customer.entity.js +8 -2
- package/dist/sys03/updowngrade/index.d.ts +2 -2
- package/dist/sys03/updowngrade/index.js +2 -2
- package/dist/sys03/updowngrade/product-transition-configuration.entity.d.ts +25 -0
- package/dist/sys03/updowngrade/product-transition-configuration.entity.js +96 -0
- package/dist/sys03/updowngrade/product-transition-group.entity.d.ts +85 -0
- package/dist/sys03/updowngrade/product-transition-group.entity.js +163 -0
- package/dist/sys03/updowngrade/updowngrade.constants.d.ts +16 -1
- package/dist/sys03/updowngrade/updowngrade.constants.js +18 -1
- package/dist/sys03/updowngrade/updowngrade.entity.d.ts +10 -25
- package/dist/sys03/updowngrade/updowngrade.entity.js +1 -81
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/sys03/updowngrade/internal.d.ts +0 -10
- package/dist/sys03/updowngrade/internal.js +0 -2
- package/dist/sys03/updowngrade/product-transition.entity.d.ts +0 -41
- package/dist/sys03/updowngrade/product-transition.entity.js +0 -40
|
@@ -28,6 +28,7 @@ export declare class BpCustomerBillDto {
|
|
|
28
28
|
customerBillConfiguration: BpCustomerBillConfigurationDto;
|
|
29
29
|
externalTaxCalculated: boolean;
|
|
30
30
|
suppressionCalculationAmount: BpChargeValueDto;
|
|
31
|
+
documentId: string;
|
|
31
32
|
}
|
|
32
33
|
export declare class BpCustomerBillSettlementDto {
|
|
33
34
|
id: string;
|
|
@@ -10,7 +10,7 @@ class BpCustomerBillConfigurationDto {
|
|
|
10
10
|
exports.BpCustomerBillConfigurationDto = BpCustomerBillConfigurationDto;
|
|
11
11
|
class BpCustomerBillDto {
|
|
12
12
|
static _OPENAPI_METADATA_FACTORY() {
|
|
13
|
-
return { id: { required: true, type: () => String }, billNo: { required: true, type: () => String }, billingAccount: { required: true, type: () => String }, runType: { required: true, type: () => String }, state: { required: true, type: () => String }, category: { required: true, type: () => String }, billDate: { required: true, type: () => String }, dueDate: { required: true, type: () => String }, validFor: { required: true, type: () => require("../common/common.entity").BpValidForDto }, billingPeriod: { required: true, type: () => String }, taxExcludedAmount: { required: true, type: () => require("../common/common.entity").BpChargeValueDto }, taxIncludedAmount: { required: true, type: () => require("../common/common.entity").BpChargeValueDto }, billingCycle: { required: true, type: () => String }, final: { required: true, type: () => Boolean }, latest: { required: true, type: () => Boolean }, detailsAvailable: { required: true, type: () => Boolean }, displayItemized: { required: true, type: () => Boolean }, priceDisplayIncludingTax: { required: true, type: () => Boolean }, timezone: { required: true, enum: require("../../constants/bp.constants").Timezone }, customerBillConfiguration: { required: true, type: () => require("./customer-bill.entity").BpCustomerBillConfigurationDto }, externalTaxCalculated: { required: true, type: () => Boolean }, suppressionCalculationAmount: { required: true, type: () => require("../common/common.entity").BpChargeValueDto } };
|
|
13
|
+
return { id: { required: true, type: () => String }, billNo: { required: true, type: () => String }, billingAccount: { required: true, type: () => String }, runType: { required: true, type: () => String }, state: { required: true, type: () => String }, category: { required: true, type: () => String }, billDate: { required: true, type: () => String }, dueDate: { required: true, type: () => String }, validFor: { required: true, type: () => require("../common/common.entity").BpValidForDto }, billingPeriod: { required: true, type: () => String }, taxExcludedAmount: { required: true, type: () => require("../common/common.entity").BpChargeValueDto }, taxIncludedAmount: { required: true, type: () => require("../common/common.entity").BpChargeValueDto }, billingCycle: { required: true, type: () => String }, final: { required: true, type: () => Boolean }, latest: { required: true, type: () => Boolean }, detailsAvailable: { required: true, type: () => Boolean }, displayItemized: { required: true, type: () => Boolean }, priceDisplayIncludingTax: { required: true, type: () => Boolean }, timezone: { required: true, enum: require("../../constants/bp.constants").Timezone }, customerBillConfiguration: { required: true, type: () => require("./customer-bill.entity").BpCustomerBillConfigurationDto }, externalTaxCalculated: { required: true, type: () => Boolean }, suppressionCalculationAmount: { required: true, type: () => require("../common/common.entity").BpChargeValueDto }, documentId: { required: true, type: () => String } };
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
exports.BpCustomerBillDto = BpCustomerBillDto;
|
|
@@ -79,9 +79,10 @@ __decorate([
|
|
|
79
79
|
exports.BpCustomerAccountDto = BpCustomerAccountDto;
|
|
80
80
|
class BpCustomerAccountDtoBuilder extends helpers_1.Builder {
|
|
81
81
|
setDefaults() {
|
|
82
|
+
const id = (0, helpers_1.fakerCustomerId)();
|
|
82
83
|
return {
|
|
83
|
-
id
|
|
84
|
-
billingAccount:
|
|
84
|
+
id,
|
|
85
|
+
billingAccount: id,
|
|
85
86
|
state: faker_1.faker.helpers.enumValue(constants_1.AccountState),
|
|
86
87
|
type: faker_1.faker.helpers.enumValue(constants_1.CustomerType),
|
|
87
88
|
preferredLanguage: faker_1.faker.helpers.enumValue(constants_1.PreferredLanguage),
|
|
@@ -18,7 +18,7 @@ class BillInvoicePeriodDto extends common_1.BpValidForDto {
|
|
|
18
18
|
exports.BillInvoicePeriodDto = BillInvoicePeriodDto;
|
|
19
19
|
class BillDto {
|
|
20
20
|
static _OPENAPI_METADATA_FACTORY() {
|
|
21
|
-
return { id: { required: true, type: () => String }, billNumber: { required: true, type: () => String }, period: { required: true, type: () => require("./billing.entity").BillInvoicePeriodDto }, dueDate: { required: true, type: () => String }, totalIncludedAmount: { required: true, type: () => Number }, totalExcludedAmount: { required: true, type: () => Number }, category: { required: true, type: () => String }, type: { required: true, enum: require("./billing.constants").BillType }, state: { required: true, enum: require("./billing.constants").BillState }, financialState: { required: false, type: () => String } };
|
|
21
|
+
return { id: { required: true, type: () => String }, billNumber: { required: true, type: () => String }, period: { required: true, type: () => require("./billing.entity").BillInvoicePeriodDto }, dueDate: { required: true, type: () => String }, totalIncludedAmount: { required: true, type: () => Number }, totalExcludedAmount: { required: true, type: () => Number }, category: { required: true, type: () => String }, type: { required: true, enum: require("./billing.constants").BillType }, state: { required: true, enum: require("./billing.constants").BillState }, financialState: { required: false, type: () => String }, documentId: { required: false, type: () => String } };
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
exports.BillDto = BillDto;
|
|
@@ -3,6 +3,7 @@ import { ShoppingCartProductType } from '../../common/constants';
|
|
|
3
3
|
import { ArsAddressDto, ShoppingCartConfigurationAttributeDto } from '../../common/edge-bss';
|
|
4
4
|
import { CustomerProductActionType } from './customer.constants';
|
|
5
5
|
import { MobileVisibilityType } from '..';
|
|
6
|
+
import { Builder } from '../../common/helpers/helpers';
|
|
6
7
|
export declare class CustomerProductCharacteristicDto {
|
|
7
8
|
id: string;
|
|
8
9
|
name: string;
|
|
@@ -56,6 +57,9 @@ export declare class CustomerProductDto extends CustomerProductServiceDataDto {
|
|
|
56
57
|
characteristics?: CustomerProductCharacteristicDto[];
|
|
57
58
|
products?: CustomerProductDto[];
|
|
58
59
|
}
|
|
60
|
+
export declare class CustomerProductDtoBuilder extends Builder<CustomerProductDto> {
|
|
61
|
+
setDefaults(): CustomerProductDto;
|
|
62
|
+
}
|
|
59
63
|
export declare class CustomerProductsDto {
|
|
60
64
|
records: CustomerProductDto[];
|
|
61
65
|
total: number;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CustomerProductsDto = exports.CustomerProductDto = exports.CustomerProductServiceDto = exports.CustomerProductServiceCharacteristicDto = exports.CustomerProductServiceDataDto = exports.CustomerProductCharacteristicDto = void 0;
|
|
3
|
+
exports.CustomerProductsDto = exports.CustomerProductDtoBuilder = exports.CustomerProductDto = exports.CustomerProductServiceDto = exports.CustomerProductServiceCharacteristicDto = exports.CustomerProductServiceDataDto = exports.CustomerProductCharacteristicDto = void 0;
|
|
4
4
|
const openapi = require("@nestjs/swagger");
|
|
5
|
+
const product_1 = require("../product");
|
|
6
|
+
const __1 = require("..");
|
|
7
|
+
const helpers_1 = require("../../common/helpers/helpers");
|
|
8
|
+
const faker_1 = require("@faker-js/faker");
|
|
5
9
|
class CustomerProductCharacteristicDto {
|
|
6
10
|
static _OPENAPI_METADATA_FACTORY() {
|
|
7
11
|
return { id: { required: true, type: () => String }, name: { required: true, type: () => String }, displayName: { required: false, type: () => String }, displayDescription: { required: false, type: () => String }, configurationAttributes: { required: false, type: () => [require("../../common/edge-bss/shopping-cart/res/other.entity").ShoppingCartConfigurationAttributeDto] }, bindingMonths: { required: false, type: () => Number }, bindingDays: { required: false, type: () => Number }, activatedAt: { required: true, type: () => String }, terminatedAt: { required: false, type: () => String }, completedPercentage: { required: false, type: () => Number }, displayAmount: { required: false, type: () => Number }, includedAmount: { required: false, type: () => Number }, excludedAmount: { required: false, type: () => Number } };
|
|
@@ -36,6 +40,33 @@ class CustomerProductDto extends CustomerProductServiceDataDto {
|
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
42
|
exports.CustomerProductDto = CustomerProductDto;
|
|
43
|
+
class CustomerProductDtoBuilder extends helpers_1.Builder {
|
|
44
|
+
setDefaults() {
|
|
45
|
+
const { key: name, productName: displayName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
46
|
+
const bundle = faker_1.faker.datatype.boolean({ probability: 0.9 });
|
|
47
|
+
const isMainBundle = bundle ? faker_1.faker.datatype.boolean({ probability: 0.75 }) : false;
|
|
48
|
+
const configurationType = bundle ? faker_1.faker.helpers.enumValue(__1.MobileVisibilityType) : undefined;
|
|
49
|
+
return {
|
|
50
|
+
id: faker_1.faker.string.uuid(),
|
|
51
|
+
customerId: (0, helpers_1.fakerCustomerId)(),
|
|
52
|
+
instanceName: faker_1.faker.string.uuid(),
|
|
53
|
+
name,
|
|
54
|
+
displayName,
|
|
55
|
+
displayDescription: faker_1.faker.commerce.productDescription(),
|
|
56
|
+
bundle,
|
|
57
|
+
isMainBundle,
|
|
58
|
+
configurationType,
|
|
59
|
+
enabled: true,
|
|
60
|
+
actions: [],
|
|
61
|
+
state: faker_1.faker.helpers.enumValue(product_1.ProductInventoryState),
|
|
62
|
+
activatedAt: faker_1.faker.date.anytime().toISOString()
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
66
|
+
return {};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.CustomerProductDtoBuilder = CustomerProductDtoBuilder;
|
|
39
70
|
class CustomerProductsDto {
|
|
40
71
|
static _OPENAPI_METADATA_FACTORY() {
|
|
41
72
|
return { records: { required: true, type: () => [require("./customer-product.entity").CustomerProductDto] }, total: { required: true, type: () => Number } };
|
|
@@ -36,7 +36,7 @@ class ProductInventoryItemDtoBuilder extends helpers_1.Builder {
|
|
|
36
36
|
setDefaults() {
|
|
37
37
|
return {
|
|
38
38
|
id: faker_1.faker.string.numeric(4),
|
|
39
|
-
billingAccount:
|
|
39
|
+
billingAccount: (0, helpers_1.fakerCustomerId)(),
|
|
40
40
|
bundle: faker_1.faker.datatype.boolean(),
|
|
41
41
|
state: faker_1.faker.helpers.enumValue(product_constants_1.ProductInventoryState),
|
|
42
42
|
completenessState: faker_1.faker.string.alpha(10),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fakerCommerceProductNameAndKey = exports.Builder = exports.invertEnum = void 0;
|
|
3
|
+
exports.fakerCustomerId = exports.fakerCommerceProductNameAndKey = exports.Builder = exports.invertEnum = void 0;
|
|
4
4
|
const faker_1 = require("@faker-js/faker");
|
|
5
5
|
function invertEnum({ enumObject }) {
|
|
6
6
|
const enumInvertdEntries = Object.entries(enumObject).reduce((acc, enumItem) => {
|
|
@@ -37,3 +37,7 @@ function fakerCommerceProductNameAndKey() {
|
|
|
37
37
|
return { key, productName };
|
|
38
38
|
}
|
|
39
39
|
exports.fakerCommerceProductNameAndKey = fakerCommerceProductNameAndKey;
|
|
40
|
+
function fakerCustomerId() {
|
|
41
|
+
return faker_1.faker.string.numeric(10);
|
|
42
|
+
}
|
|
43
|
+
exports.fakerCustomerId = fakerCustomerId;
|
|
@@ -12,7 +12,7 @@ export declare class ProductTransitionGroupEntity {
|
|
|
12
12
|
export declare class ProductTransitionCombinationEntity {
|
|
13
13
|
id: number;
|
|
14
14
|
groupId: number;
|
|
15
|
-
group
|
|
15
|
+
group?: ProductTransitionGroupEntity;
|
|
16
16
|
product: string;
|
|
17
17
|
productPriority: number;
|
|
18
18
|
fiberProduct?: string;
|
|
@@ -60,7 +60,7 @@ ProductTransitionGroupEntity = __decorate([
|
|
|
60
60
|
exports.ProductTransitionGroupEntity = ProductTransitionGroupEntity;
|
|
61
61
|
let ProductTransitionCombinationEntity = class ProductTransitionCombinationEntity {
|
|
62
62
|
static _OPENAPI_METADATA_FACTORY() {
|
|
63
|
-
return { id: { required: true, type: () => Number }, groupId: { required: true, type: () => Number }, group: { required:
|
|
63
|
+
return { id: { required: true, type: () => Number }, groupId: { required: true, type: () => Number }, group: { required: false, type: () => require("./product-transition-configuration.entity").ProductTransitionGroupEntity }, product: { required: true, type: () => String }, productPriority: { required: true, type: () => Number }, fiberProduct: { required: false, type: () => String }, fiberBandwidth: { required: false, type: () => String }, voipMin: { required: true, type: () => Number }, voipMax: { required: true, type: () => Number }, mobileProduct: { required: false, type: () => String }, mobileData: { required: true, type: () => Number }, mobileType: { required: true, type: () => String }, active: { required: true, type: () => Boolean } };
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
__decorate([
|
|
@@ -37,6 +37,8 @@ export declare class CustomerOrdersFiltersDto extends CustomerNotesFiltersDto {
|
|
|
37
37
|
}
|
|
38
38
|
export declare class CustomerBillsFiltersDto extends CustomerNotesFiltersDto {
|
|
39
39
|
}
|
|
40
|
+
export declare class CustomerFinanceFiltersDto extends PaginationQueryDto {
|
|
41
|
+
}
|
|
40
42
|
export declare class DashboardCustomerDto {
|
|
41
43
|
customerId: string;
|
|
42
44
|
customerType?: CustomerType;
|
|
@@ -92,6 +94,7 @@ export declare class CustomerChargesAndCreditsDto extends BssCustomerChargesAndC
|
|
|
92
94
|
export declare class CustomerFinanceDto {
|
|
93
95
|
balance: number;
|
|
94
96
|
invoices: BillDto[];
|
|
97
|
+
total: number;
|
|
95
98
|
}
|
|
96
99
|
export declare class CustomerDashboardFiltersDto extends PaginationQueryDto {
|
|
97
100
|
customerId?: string;
|
|
@@ -9,7 +9,7 @@ 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.CustomerDashboardFiltersDto = exports.CustomerFinanceDto = exports.CustomerChargesAndCreditsDto = exports.CustomerOrdersDto = exports.CustomerTaskDto = exports.CustomerTasksDto = exports.CustomerOrderDto = exports.CustomerTaskAdditionalFieldsDto = exports.CustomerNotesDto = exports.DashboardCustomersDto = exports.DashboardCustomerCsvDto = exports.DashboardCustomerDto = exports.CustomerBillsFiltersDto = exports.CustomerOrdersFiltersDto = exports.CustomerTasksFiltersDto = exports.CustomerNotesFiltersDto = exports.DashboardCustomersFiltersDto = exports.CustomerDto = void 0;
|
|
12
|
+
exports.CustomerDashboardFiltersDto = exports.CustomerFinanceDto = exports.CustomerChargesAndCreditsDto = exports.CustomerOrdersDto = exports.CustomerTaskDto = exports.CustomerTasksDto = exports.CustomerOrderDto = exports.CustomerTaskAdditionalFieldsDto = exports.CustomerNotesDto = exports.DashboardCustomersDto = exports.DashboardCustomerCsvDto = exports.DashboardCustomerDto = exports.CustomerFinanceFiltersDto = exports.CustomerBillsFiltersDto = exports.CustomerOrdersFiltersDto = exports.CustomerTasksFiltersDto = exports.CustomerNotesFiltersDto = exports.DashboardCustomersFiltersDto = exports.CustomerDto = void 0;
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const customer_1 = require("../../bss/customer");
|
|
15
15
|
const task_1 = require("../../bss/task");
|
|
@@ -109,6 +109,12 @@ class CustomerBillsFiltersDto extends CustomerNotesFiltersDto {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
exports.CustomerBillsFiltersDto = CustomerBillsFiltersDto;
|
|
112
|
+
class CustomerFinanceFiltersDto extends common_entity_1.PaginationQueryDto {
|
|
113
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
114
|
+
return {};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.CustomerFinanceFiltersDto = CustomerFinanceFiltersDto;
|
|
112
118
|
class DashboardCustomerDto {
|
|
113
119
|
static _OPENAPI_METADATA_FACTORY() {
|
|
114
120
|
return { customerId: { required: true, type: () => String }, customerType: { required: false, enum: require("../shopping-cart/shopping-cart.constants").CustomerType }, state: { required: true, enum: require("../../bss/constants/bp.constants").AccountState }, firstName: { required: false, type: () => String }, lastName: { required: false, type: () => String }, identification: { required: false, type: () => require("../../common/edge-bss/customer/req/create.entity").ArsCustomerAccountIdentificationDto }, mobileNumber: { required: false, type: () => String }, voipNumber: { required: false, type: () => String }, email: { required: false, type: () => String }, address: { required: false, type: () => String } };
|
|
@@ -171,7 +177,7 @@ class CustomerChargesAndCreditsDto extends customer_1.CustomerChargesAndCreditsD
|
|
|
171
177
|
exports.CustomerChargesAndCreditsDto = CustomerChargesAndCreditsDto;
|
|
172
178
|
class CustomerFinanceDto {
|
|
173
179
|
static _OPENAPI_METADATA_FACTORY() {
|
|
174
|
-
return { balance: { required: true, type: () => Number }, invoices: { required: true, type: () => [require("../../bss/billing/billing.entity").BillDto] } };
|
|
180
|
+
return { balance: { required: true, type: () => Number }, invoices: { required: true, type: () => [require("../../bss/billing/billing.entity").BillDto] }, total: { required: true, type: () => Number } };
|
|
175
181
|
}
|
|
176
182
|
}
|
|
177
183
|
exports.CustomerFinanceDto = CustomerFinanceDto;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './bundle-products.entity';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './product-transition.entity';
|
|
2
|
+
export * from './product-transition-group.entity';
|
|
4
3
|
export * from './product-characteristic-equivalence.entity';
|
|
5
4
|
export * from './product-mobile-profile-equivalence.entity';
|
|
5
|
+
export * from './product-transition-configuration.entity';
|
|
6
6
|
export * from './updowngrade.constants';
|
|
7
7
|
export * from './updowngrade.entity';
|
|
@@ -15,9 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./bundle-products.entity"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./product-transition.entity"), exports);
|
|
18
|
+
__exportStar(require("./product-transition-group.entity"), exports);
|
|
20
19
|
__exportStar(require("./product-characteristic-equivalence.entity"), exports);
|
|
21
20
|
__exportStar(require("./product-mobile-profile-equivalence.entity"), exports);
|
|
21
|
+
__exportStar(require("./product-transition-configuration.entity"), exports);
|
|
22
22
|
__exportStar(require("./updowngrade.constants"), exports);
|
|
23
23
|
__exportStar(require("./updowngrade.entity"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ShoppingCartItemAction } from '../../bss/constants';
|
|
2
|
+
import { AuditFieldsDto } from '../common';
|
|
3
|
+
export declare class ProductTransitionConfigurationSummaryCharacteristicDto {
|
|
4
|
+
name: string;
|
|
5
|
+
action: ShoppingCartItemAction;
|
|
6
|
+
to?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class ProductTransitionConfigurationSummaryDto {
|
|
9
|
+
characteristics: ProductTransitionConfigurationSummaryCharacteristicDto[];
|
|
10
|
+
}
|
|
11
|
+
export declare class ProductTransitionConfigurationDto {
|
|
12
|
+
id?: number;
|
|
13
|
+
product: string;
|
|
14
|
+
configuration: ProductTransitionConfigurationSummaryDto;
|
|
15
|
+
created: AuditFieldsDto;
|
|
16
|
+
updated?: AuditFieldsDto;
|
|
17
|
+
}
|
|
18
|
+
export declare class CreateProductTransitionConfigurationDto {
|
|
19
|
+
product: string;
|
|
20
|
+
configuration?: ProductTransitionConfigurationSummaryDto;
|
|
21
|
+
}
|
|
22
|
+
export declare class PatchProductTransitionConfigurationDto {
|
|
23
|
+
product?: string;
|
|
24
|
+
configuration?: ProductTransitionConfigurationSummaryDto;
|
|
25
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PatchProductTransitionConfigurationDto = exports.CreateProductTransitionConfigurationDto = exports.ProductTransitionConfigurationDto = exports.ProductTransitionConfigurationSummaryDto = exports.ProductTransitionConfigurationSummaryCharacteristicDto = void 0;
|
|
13
|
+
const openapi = require("@nestjs/swagger");
|
|
14
|
+
const constants_1 = require("../../bss/constants");
|
|
15
|
+
const _validators_1 = require("../../validators/index");
|
|
16
|
+
const class_transformer_1 = require("class-transformer");
|
|
17
|
+
const class_validator_1 = require("class-validator");
|
|
18
|
+
class ProductTransitionConfigurationSummaryCharacteristicDto {
|
|
19
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
20
|
+
return { name: { required: true, type: () => String }, action: { required: true, enum: require("../../bss/constants/bp.constants").ShoppingCartItemAction }, to: { required: false, type: () => String } };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
(0, _validators_1.IsNotBlank)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ProductTransitionConfigurationSummaryCharacteristicDto.prototype, "name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsEnum)(constants_1.ShoppingCartItemAction),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], ProductTransitionConfigurationSummaryCharacteristicDto.prototype, "action", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
36
|
+
(0, _validators_1.IsNotBlank)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], ProductTransitionConfigurationSummaryCharacteristicDto.prototype, "to", void 0);
|
|
40
|
+
exports.ProductTransitionConfigurationSummaryCharacteristicDto = ProductTransitionConfigurationSummaryCharacteristicDto;
|
|
41
|
+
class ProductTransitionConfigurationSummaryDto {
|
|
42
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
43
|
+
return { characteristics: { required: true, type: () => [require("./product-transition-configuration.entity").ProductTransitionConfigurationSummaryCharacteristicDto] } };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsArray)(),
|
|
48
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
49
|
+
(0, class_transformer_1.Type)(() => ProductTransitionConfigurationSummaryCharacteristicDto),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], ProductTransitionConfigurationSummaryDto.prototype, "characteristics", void 0);
|
|
52
|
+
exports.ProductTransitionConfigurationSummaryDto = ProductTransitionConfigurationSummaryDto;
|
|
53
|
+
class ProductTransitionConfigurationDto {
|
|
54
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
55
|
+
return { id: { required: false, type: () => Number }, product: { required: true, type: () => String }, configuration: { required: true, type: () => require("./product-transition-configuration.entity").ProductTransitionConfigurationSummaryDto }, created: { required: true, type: () => require("../common/common.entity").AuditFieldsDto }, updated: { required: false, type: () => require("../common/common.entity").AuditFieldsDto } };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.ProductTransitionConfigurationDto = ProductTransitionConfigurationDto;
|
|
59
|
+
class CreateProductTransitionConfigurationDto {
|
|
60
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
61
|
+
return { product: { required: true, type: () => String }, configuration: { required: false, type: () => require("./product-transition-configuration.entity").ProductTransitionConfigurationSummaryDto } };
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
67
|
+
(0, _validators_1.IsNotBlank)(),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], CreateProductTransitionConfigurationDto.prototype, "product", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_validator_1.ValidateNested)(),
|
|
72
|
+
(0, class_transformer_1.Type)(() => ProductTransitionConfigurationSummaryDto),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
__metadata("design:type", ProductTransitionConfigurationSummaryDto)
|
|
75
|
+
], CreateProductTransitionConfigurationDto.prototype, "configuration", void 0);
|
|
76
|
+
exports.CreateProductTransitionConfigurationDto = CreateProductTransitionConfigurationDto;
|
|
77
|
+
class PatchProductTransitionConfigurationDto {
|
|
78
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
79
|
+
return { product: { required: false, type: () => String }, configuration: { required: false, type: () => require("./product-transition-configuration.entity").ProductTransitionConfigurationSummaryDto } };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_validator_1.IsString)(),
|
|
84
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
85
|
+
(0, _validators_1.IsNotBlank)(),
|
|
86
|
+
(0, class_validator_1.IsOptional)(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], PatchProductTransitionConfigurationDto.prototype, "product", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.ValidateNested)(),
|
|
91
|
+
(0, class_transformer_1.Type)(() => ProductTransitionConfigurationSummaryDto),
|
|
92
|
+
(0, class_validator_1.IsDefined)(),
|
|
93
|
+
(0, class_validator_1.IsOptional)(),
|
|
94
|
+
__metadata("design:type", ProductTransitionConfigurationSummaryDto)
|
|
95
|
+
], PatchProductTransitionConfigurationDto.prototype, "configuration", void 0);
|
|
96
|
+
exports.PatchProductTransitionConfigurationDto = PatchProductTransitionConfigurationDto;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ProductTransitionCombinationEntity, ProductTransitionGroupEntity } from '../../database/index';
|
|
2
|
+
import { CustomerType } from '../shopping-cart';
|
|
3
|
+
import { ProductTransitionGroupName } from './updowngrade.constants';
|
|
4
|
+
import { Builder } from '../../common/helpers/helpers';
|
|
5
|
+
export declare class ProductTransitionGroupCombinationDto implements ProductTransitionCombinationEntity {
|
|
6
|
+
id: number;
|
|
7
|
+
groupId: number;
|
|
8
|
+
product: string;
|
|
9
|
+
productPriority: number;
|
|
10
|
+
fiberProduct?: string;
|
|
11
|
+
fiberBandwidth?: string;
|
|
12
|
+
mobileProduct?: string;
|
|
13
|
+
mobileData: number;
|
|
14
|
+
mobileType: string;
|
|
15
|
+
voipMin: number;
|
|
16
|
+
voipMax: number;
|
|
17
|
+
active: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare class ProductTransitionGroupCombinationDtoBuilder extends Builder<ProductTransitionGroupCombinationDto> {
|
|
20
|
+
setDefaults(): ProductTransitionGroupCombinationDto;
|
|
21
|
+
}
|
|
22
|
+
export declare class ProductTransitionGroupDto implements ProductTransitionGroupEntity {
|
|
23
|
+
id: number;
|
|
24
|
+
customerType: CustomerType;
|
|
25
|
+
name: string;
|
|
26
|
+
displayName: string;
|
|
27
|
+
displayOrder: number;
|
|
28
|
+
onlyMobilesProductName: string;
|
|
29
|
+
sharedMobilesProductName: string;
|
|
30
|
+
intermediateProductName: string;
|
|
31
|
+
combinations?: ProductTransitionGroupCombinationDto[];
|
|
32
|
+
}
|
|
33
|
+
export declare class ProductTransitionGroupDtoBuilder extends Builder<ProductTransitionGroupDto> {
|
|
34
|
+
setDefaults(): ProductTransitionGroupDto;
|
|
35
|
+
}
|
|
36
|
+
export declare class ProductTransitionGroupOptionsFiberDto {
|
|
37
|
+
bandwidths: string[];
|
|
38
|
+
}
|
|
39
|
+
export declare class ProductTransitionGroupOptionsFiberDtoBuilder extends Builder<ProductTransitionGroupOptionsFiberDto> {
|
|
40
|
+
setDefaults(): ProductTransitionGroupOptionsFiberDto;
|
|
41
|
+
}
|
|
42
|
+
export declare class ProductTransitionGroupOptionsVoipDto {
|
|
43
|
+
min: number;
|
|
44
|
+
max: number;
|
|
45
|
+
}
|
|
46
|
+
export declare class ProductTransitionGroupOptionsVoipDtoBuilder extends Builder<ProductTransitionGroupOptionsVoipDto> {
|
|
47
|
+
setDefaults(): ProductTransitionGroupOptionsVoipDto;
|
|
48
|
+
}
|
|
49
|
+
export declare class ProductTransitionGroupOptionsMobileDto {
|
|
50
|
+
data: number;
|
|
51
|
+
type: string;
|
|
52
|
+
}
|
|
53
|
+
export declare class ProductTransitionGroupOptionsMobileDtoBuilder extends Builder<ProductTransitionGroupOptionsMobileDto> {
|
|
54
|
+
setDefaults(): ProductTransitionGroupOptionsMobileDto;
|
|
55
|
+
}
|
|
56
|
+
export declare class ProductTransitionGroupOptionsDto {
|
|
57
|
+
id: number;
|
|
58
|
+
name: ProductTransitionGroupName;
|
|
59
|
+
onlyMobilesProductName: string;
|
|
60
|
+
sharedMobilesProductName: string;
|
|
61
|
+
intermediateProductName: string;
|
|
62
|
+
displayName: string;
|
|
63
|
+
customerType: CustomerType;
|
|
64
|
+
fiber?: ProductTransitionGroupOptionsFiberDto;
|
|
65
|
+
voip: ProductTransitionGroupOptionsVoipDto;
|
|
66
|
+
mobile: ProductTransitionGroupOptionsMobileDto[];
|
|
67
|
+
combinations?: ProductTransitionCombinationEntity[];
|
|
68
|
+
}
|
|
69
|
+
export declare class ProductTransitionGroupOptionsDtoBuilder extends Builder<ProductTransitionGroupOptionsDto> {
|
|
70
|
+
setDefaults(): ProductTransitionGroupOptionsDto;
|
|
71
|
+
}
|
|
72
|
+
export declare class ProductTransitionGroupOptionProductDto {
|
|
73
|
+
name: string;
|
|
74
|
+
priority: number;
|
|
75
|
+
}
|
|
76
|
+
export declare class ProductTransitionGroupOptionDto {
|
|
77
|
+
products: ProductTransitionGroupOptionProductDto[];
|
|
78
|
+
fiberProduct?: string;
|
|
79
|
+
fiberBandwidth?: string;
|
|
80
|
+
voipMin: number;
|
|
81
|
+
voipMax: number;
|
|
82
|
+
mobileProduct?: string;
|
|
83
|
+
mobileData: number;
|
|
84
|
+
mobileType: string;
|
|
85
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductTransitionGroupOptionDto = exports.ProductTransitionGroupOptionProductDto = exports.ProductTransitionGroupOptionsDtoBuilder = exports.ProductTransitionGroupOptionsDto = exports.ProductTransitionGroupOptionsMobileDtoBuilder = exports.ProductTransitionGroupOptionsMobileDto = exports.ProductTransitionGroupOptionsVoipDtoBuilder = exports.ProductTransitionGroupOptionsVoipDto = exports.ProductTransitionGroupOptionsFiberDtoBuilder = exports.ProductTransitionGroupOptionsFiberDto = exports.ProductTransitionGroupDtoBuilder = exports.ProductTransitionGroupDto = exports.ProductTransitionGroupCombinationDtoBuilder = exports.ProductTransitionGroupCombinationDto = void 0;
|
|
4
|
+
const openapi = require("@nestjs/swagger");
|
|
5
|
+
const shopping_cart_1 = require("../shopping-cart");
|
|
6
|
+
const updowngrade_constants_1 = require("./updowngrade.constants");
|
|
7
|
+
const helpers_1 = require("../../common/helpers/helpers");
|
|
8
|
+
const faker_1 = require("@faker-js/faker");
|
|
9
|
+
class ProductTransitionGroupCombinationDto {
|
|
10
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
11
|
+
return { id: { required: true, type: () => Number }, groupId: { required: true, type: () => Number }, product: { required: true, type: () => String }, productPriority: { required: true, type: () => Number }, fiberProduct: { required: false, type: () => String }, fiberBandwidth: { required: false, type: () => String }, mobileProduct: { required: false, type: () => String }, mobileData: { required: true, type: () => Number }, mobileType: { required: true, type: () => String }, voipMin: { required: true, type: () => Number }, voipMax: { required: true, type: () => Number }, active: { required: true, type: () => Boolean } };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ProductTransitionGroupCombinationDto = ProductTransitionGroupCombinationDto;
|
|
15
|
+
class ProductTransitionGroupCombinationDtoBuilder extends helpers_1.Builder {
|
|
16
|
+
setDefaults() {
|
|
17
|
+
const { key: product } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
18
|
+
const { key: fiberProduct } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
19
|
+
const { key: mobileProduct } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
20
|
+
const voipMin = faker_1.faker.number.int({ min: 0, max: 1 });
|
|
21
|
+
const voipMax = faker_1.faker.number.int({ min: voipMin, max: voipMin + 2 });
|
|
22
|
+
return {
|
|
23
|
+
id: faker_1.faker.number.int(),
|
|
24
|
+
groupId: faker_1.faker.number.int(),
|
|
25
|
+
product,
|
|
26
|
+
productPriority: faker_1.faker.number.int({ min: 1, max: 10 }),
|
|
27
|
+
fiberProduct,
|
|
28
|
+
fiberBandwidth: faker_1.faker.commerce.productAdjective(),
|
|
29
|
+
mobileProduct,
|
|
30
|
+
mobileData: faker_1.faker.number.int({ min: 20, max: 150 }),
|
|
31
|
+
mobileType: faker_1.faker.commerce.productAdjective(),
|
|
32
|
+
voipMin,
|
|
33
|
+
voipMax,
|
|
34
|
+
active: true
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ProductTransitionGroupCombinationDtoBuilder = ProductTransitionGroupCombinationDtoBuilder;
|
|
42
|
+
class ProductTransitionGroupDto {
|
|
43
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
44
|
+
return { id: { required: true, type: () => Number }, customerType: { required: true, enum: require("../shopping-cart/shopping-cart.constants").CustomerType }, name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, displayOrder: { required: true, type: () => Number }, onlyMobilesProductName: { required: true, type: () => String }, sharedMobilesProductName: { required: true, type: () => String }, intermediateProductName: { required: true, type: () => String }, combinations: { required: false, type: () => [require("./product-transition-group.entity").ProductTransitionGroupCombinationDto] } };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.ProductTransitionGroupDto = ProductTransitionGroupDto;
|
|
48
|
+
class ProductTransitionGroupDtoBuilder extends helpers_1.Builder {
|
|
49
|
+
setDefaults() {
|
|
50
|
+
const { key: name, productName: displayName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
51
|
+
const { key: onlyMobilesProductName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
52
|
+
const { key: sharedMobilesProductName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
53
|
+
const { key: intermediateProductName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
54
|
+
return {
|
|
55
|
+
id: faker_1.faker.number.int(),
|
|
56
|
+
customerType: faker_1.faker.helpers.enumValue(shopping_cart_1.CustomerType),
|
|
57
|
+
displayOrder: faker_1.faker.number.int({ min: 1, max: 10 }),
|
|
58
|
+
displayName,
|
|
59
|
+
name,
|
|
60
|
+
onlyMobilesProductName,
|
|
61
|
+
sharedMobilesProductName,
|
|
62
|
+
intermediateProductName
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
66
|
+
return {};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.ProductTransitionGroupDtoBuilder = ProductTransitionGroupDtoBuilder;
|
|
70
|
+
class ProductTransitionGroupOptionsFiberDto {
|
|
71
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
72
|
+
return { bandwidths: { required: true, type: () => [String] } };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.ProductTransitionGroupOptionsFiberDto = ProductTransitionGroupOptionsFiberDto;
|
|
76
|
+
class ProductTransitionGroupOptionsFiberDtoBuilder extends helpers_1.Builder {
|
|
77
|
+
setDefaults() {
|
|
78
|
+
return {
|
|
79
|
+
bandwidths: faker_1.faker.helpers.multiple(() => faker_1.faker.commerce.productAdjective(), { count: 2 })
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
83
|
+
return {};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.ProductTransitionGroupOptionsFiberDtoBuilder = ProductTransitionGroupOptionsFiberDtoBuilder;
|
|
87
|
+
class ProductTransitionGroupOptionsVoipDto {
|
|
88
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
89
|
+
return { min: { required: true, type: () => Number }, max: { required: true, type: () => Number } };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.ProductTransitionGroupOptionsVoipDto = ProductTransitionGroupOptionsVoipDto;
|
|
93
|
+
class ProductTransitionGroupOptionsVoipDtoBuilder extends helpers_1.Builder {
|
|
94
|
+
setDefaults() {
|
|
95
|
+
const min = faker_1.faker.number.int({ min: 0, max: 1 });
|
|
96
|
+
const max = faker_1.faker.number.int({ min: min, max: min + 2 });
|
|
97
|
+
return { min, max };
|
|
98
|
+
}
|
|
99
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
100
|
+
return {};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.ProductTransitionGroupOptionsVoipDtoBuilder = ProductTransitionGroupOptionsVoipDtoBuilder;
|
|
104
|
+
class ProductTransitionGroupOptionsMobileDto {
|
|
105
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
106
|
+
return { data: { required: true, type: () => Number }, type: { required: true, type: () => String } };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.ProductTransitionGroupOptionsMobileDto = ProductTransitionGroupOptionsMobileDto;
|
|
110
|
+
class ProductTransitionGroupOptionsMobileDtoBuilder extends helpers_1.Builder {
|
|
111
|
+
setDefaults() {
|
|
112
|
+
return {
|
|
113
|
+
data: faker_1.faker.number.int({ min: 20, max: 150 }),
|
|
114
|
+
type: faker_1.faker.helpers.maybe(() => faker_1.faker.commerce.productAdjective(), { probability: 0.5 })
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
118
|
+
return {};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.ProductTransitionGroupOptionsMobileDtoBuilder = ProductTransitionGroupOptionsMobileDtoBuilder;
|
|
122
|
+
class ProductTransitionGroupOptionsDto {
|
|
123
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
124
|
+
return { id: { required: true, type: () => Number }, name: { required: true, enum: require("./updowngrade.constants").ProductTransitionGroupName }, onlyMobilesProductName: { required: true, type: () => String }, sharedMobilesProductName: { required: true, type: () => String }, intermediateProductName: { required: true, type: () => String }, displayName: { required: true, type: () => String }, customerType: { required: true, enum: require("../shopping-cart/shopping-cart.constants").CustomerType }, fiber: { required: false, type: () => require("./product-transition-group.entity").ProductTransitionGroupOptionsFiberDto }, voip: { required: true, type: () => require("./product-transition-group.entity").ProductTransitionGroupOptionsVoipDto }, mobile: { required: true, type: () => [require("./product-transition-group.entity").ProductTransitionGroupOptionsMobileDto] }, combinations: { required: false, type: () => [require("../../database/product-transition-configuration.entity").ProductTransitionCombinationEntity] } };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.ProductTransitionGroupOptionsDto = ProductTransitionGroupOptionsDto;
|
|
128
|
+
class ProductTransitionGroupOptionsDtoBuilder extends helpers_1.Builder {
|
|
129
|
+
setDefaults() {
|
|
130
|
+
const { key: onlyMobilesProductName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
131
|
+
const { key: sharedMobilesProductName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
132
|
+
const { key: intermediateProductName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
133
|
+
const { productName: displayName } = (0, helpers_1.fakerCommerceProductNameAndKey)();
|
|
134
|
+
return {
|
|
135
|
+
id: faker_1.faker.number.int(),
|
|
136
|
+
name: faker_1.faker.helpers.enumValue(updowngrade_constants_1.ProductTransitionGroupName),
|
|
137
|
+
displayName,
|
|
138
|
+
customerType: faker_1.faker.helpers.enumValue(shopping_cart_1.CustomerType),
|
|
139
|
+
onlyMobilesProductName,
|
|
140
|
+
sharedMobilesProductName,
|
|
141
|
+
intermediateProductName,
|
|
142
|
+
fiber: new ProductTransitionGroupOptionsFiberDtoBuilder().build(),
|
|
143
|
+
voip: new ProductTransitionGroupOptionsVoipDtoBuilder().build(),
|
|
144
|
+
mobile: faker_1.faker.helpers.multiple(() => new ProductTransitionGroupOptionsMobileDtoBuilder().build(), { count: 2 })
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
148
|
+
return {};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.ProductTransitionGroupOptionsDtoBuilder = ProductTransitionGroupOptionsDtoBuilder;
|
|
152
|
+
class ProductTransitionGroupOptionProductDto {
|
|
153
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
154
|
+
return { name: { required: true, type: () => String }, priority: { required: true, type: () => Number } };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
exports.ProductTransitionGroupOptionProductDto = ProductTransitionGroupOptionProductDto;
|
|
158
|
+
class ProductTransitionGroupOptionDto {
|
|
159
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
160
|
+
return { products: { required: true, type: () => [require("./product-transition-group.entity").ProductTransitionGroupOptionProductDto] }, fiberProduct: { required: false, type: () => String }, fiberBandwidth: { required: false, type: () => String }, voipMin: { required: true, type: () => Number }, voipMax: { required: true, type: () => Number }, mobileProduct: { required: false, type: () => String }, mobileData: { required: true, type: () => Number }, mobileType: { required: true, type: () => String } };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
exports.ProductTransitionGroupOptionDto = ProductTransitionGroupOptionDto;
|