@escapenavigator/types 2.1.27 → 2.1.28
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/admin/aggregator-order/update-aggregator-order.dto.d.ts +2 -0
- package/dist/admin/aggregator-order/update-aggregator-order.dto.js +7 -0
- package/dist/fiscal/fiscal-settings.ro.d.ts +1 -0
- package/dist/fiscal/fiscal-settings.ro.js +4 -0
- package/dist/fiscal/update-fiscal-settings.dto.d.ts +1 -0
- package/dist/fiscal/update-fiscal-settings.dto.js +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/openapi/profiles/enum/openapi-promocode-applies-to.enum.d.ts +5 -0
- package/dist/openapi/profiles/enum/openapi-promocode-applies-to.enum.js +9 -0
- package/dist/openapi/profiles/openapi-create-promocode.dto.d.ts +34 -0
- package/dist/openapi/profiles/openapi-create-promocode.dto.js +330 -0
- package/dist/openapi/profiles/openapi-promocode.ro.d.ts +37 -0
- package/dist/openapi/profiles/openapi-promocode.ro.js +187 -0
- package/dist/openapi/shared/openapi-questroom.ro.d.ts +2 -0
- package/dist/openapi/shared/openapi-questroom.ro.js +8 -0
- package/dist/openapi/slots/openapi-slot-variation.ro.js +1 -1
- package/dist/openapi/slots/openapi-widget-slot.ro.d.ts +1 -0
- package/dist/openapi/slots/openapi-widget-slot.ro.js +10 -0
- package/dist/openapi/upsellings/openapi-upselling.ro.d.ts +2 -0
- package/dist/openapi/upsellings/openapi-upselling.ro.js +8 -0
- package/dist/openapi/widget/openapi-resolve-promocode.ro.d.ts +2 -0
- package/dist/openapi/widget/openapi-resolve-promocode.ro.js +4 -0
- package/dist/order/waivers/order-to-sign.ro.d.ts +5 -0
- package/dist/order/waivers/order-to-sign.ro.js +8 -0
- package/dist/order/waivers/sign-order.dto.d.ts +11 -0
- package/dist/order/waivers/sign-order.dto.js +22 -2
- package/dist/product/product-sales-query.dto.d.ts +5 -0
- package/dist/product/product-sales-query.dto.js +37 -0
- package/dist/profile/marketing-email/preflight-issue.ro.d.ts +1 -5
- package/dist/profile/marketing-email/preflight-issue.ro.js +1 -5
- package/dist/profile/notification-chanel/notification-chanel-action.enum.d.ts +13 -1
- package/dist/profile/notification-chanel/notification-chanel-action.enum.js +14 -1
- package/dist/profile/profile.ro.d.ts +2 -0
- package/dist/profile/profile.ro.js +4 -0
- package/dist/promocode/create-promocode.dto.d.ts +7 -0
- package/dist/promocode/create-promocode.dto.js +9 -0
- package/dist/promocode/emun/promocode-discount-target.enum.d.ts +17 -0
- package/dist/promocode/emun/promocode-discount-target.enum.js +34 -0
- package/dist/promocode/promocode.ro.d.ts +2 -0
- package/dist/promocode/promocode.ro.js +4 -0
- package/dist/questroom/create-questroom.dto.d.ts +3 -0
- package/dist/questroom/create-questroom.dto.js +21 -0
- package/dist/questroom/questroom.ro.d.ts +2 -0
- package/dist/questroom/questroom.ro.js +8 -0
- package/dist/salary/assign-salary-scheme.dto.d.ts +4 -0
- package/dist/salary/assign-salary-scheme.dto.js +30 -0
- package/dist/salary/create-salary-accrual.dto.d.ts +8 -0
- package/dist/salary/create-salary-accrual.dto.js +48 -0
- package/dist/salary/create-salary-scheme.dto.d.ts +13 -0
- package/dist/salary/create-salary-scheme.dto.js +59 -0
- package/dist/salary/enum/salary-accrual-source-type.enum.d.ts +11 -0
- package/dist/salary/enum/salary-accrual-source-type.enum.js +16 -0
- package/dist/salary/enum/salary-accrual-type.enum.d.ts +12 -0
- package/dist/salary/enum/salary-accrual-type.enum.js +21 -0
- package/dist/salary/index.d.ts +15 -0
- package/dist/salary/index.js +31 -0
- package/dist/salary/query-salary-period.dto.d.ts +12 -0
- package/dist/salary/query-salary-period.dto.js +66 -0
- package/dist/salary/run-salary-accruals.dto.d.ts +5 -0
- package/dist/salary/run-salary-accruals.dto.js +37 -0
- package/dist/salary/salary-accrual.ro.d.ts +23 -0
- package/dist/salary/salary-accrual.ro.js +2 -0
- package/dist/salary/salary-my.ro.d.ts +12 -0
- package/dist/salary/salary-my.ro.js +2 -0
- package/dist/salary/salary-payout.ro.d.ts +18 -0
- package/dist/salary/salary-payout.ro.js +2 -0
- package/dist/salary/salary-preview.ro.d.ts +31 -0
- package/dist/salary/salary-preview.ro.js +2 -0
- package/dist/salary/salary-scheme.ro.d.ts +25 -0
- package/dist/salary/salary-scheme.ro.js +2 -0
- package/dist/salary/salary-settings.dto.d.ts +6 -0
- package/dist/salary/salary-settings.dto.js +22 -0
- package/dist/salary/salary-summary.ro.d.ts +32 -0
- package/dist/salary/salary-summary.ro.js +2 -0
- package/dist/salary/update-salary-scheme.dto.d.ts +4 -0
- package/dist/salary/update-salary-scheme.dto.js +25 -0
- package/dist/shared/card-badge.d.ts +9 -0
- package/dist/shared/card-badge.js +18 -0
- package/dist/statistics/bookings.d.ts +14 -0
- package/dist/statistics/products.d.ts +18 -0
- package/dist/statistics/products.js +2 -0
- package/dist/transaction/create-transaction.dto.d.ts +2 -0
- package/dist/transaction/create-transaction.dto.js +14 -0
- package/dist/transaction/transaction.ro.d.ts +2 -0
- package/dist/transaction/transaction.ro.js +8 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/upselling/create-upselling.dto.d.ts +7 -1
- package/dist/upselling/create-upselling.dto.js +21 -0
- package/dist/upselling/upselling.ro.d.ts +2 -0
- package/dist/upselling/upselling.ro.js +8 -0
- package/package.json +2 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { AggregatorOrderStatusEnum } from './enum/aggregator-order-status.enum';
|
|
2
2
|
export declare class UpdateAggregatorOrderDto {
|
|
3
3
|
insideComment?: string;
|
|
4
|
+
/** Комментарий игрока. Квест правит его прямо из списка броней. */
|
|
5
|
+
comment?: string;
|
|
4
6
|
price?: number;
|
|
5
7
|
status?: AggregatorOrderStatusEnum;
|
|
6
8
|
dispute?: boolean;
|
|
@@ -22,6 +22,13 @@ __decorate([
|
|
|
22
22
|
(0, class_transformer_1.Expose)(),
|
|
23
23
|
__metadata("design:type", String)
|
|
24
24
|
], UpdateAggregatorOrderDto.prototype, "insideComment", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.MaxLength)(255),
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], UpdateAggregatorOrderDto.prototype, "comment", void 0);
|
|
25
32
|
__decorate([
|
|
26
33
|
(0, class_validator_1.IsOptional)(),
|
|
27
34
|
(0, class_validator_1.IsNumber)(),
|
|
@@ -45,6 +45,10 @@ __decorate([
|
|
|
45
45
|
(0, class_transformer_1.Expose)(),
|
|
46
46
|
__metadata("design:type", Number)
|
|
47
47
|
], FiscalMoloniRO.prototype, "certificateProductId", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_transformer_1.Expose)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], FiscalMoloniRO.prototype, "consumerCustomerNumber", void 0);
|
|
48
52
|
__decorate([
|
|
49
53
|
(0, class_transformer_1.Expose)(),
|
|
50
54
|
__metadata("design:type", String)
|
|
@@ -106,6 +106,12 @@ __decorate([
|
|
|
106
106
|
(0, class_transformer_1.Expose)(),
|
|
107
107
|
__metadata("design:type", Number)
|
|
108
108
|
], UpdateFiscalSettingsDto.prototype, "moloniCertificateProductId", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_validator_1.IsOptional)(),
|
|
111
|
+
(0, class_validator_1.IsString)(),
|
|
112
|
+
(0, class_transformer_1.Expose)(),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], UpdateFiscalSettingsDto.prototype, "moloniConsumerCustomerNumber", void 0);
|
|
109
115
|
__decorate([
|
|
110
116
|
(0, class_validator_1.IsOptional)(),
|
|
111
117
|
(0, class_validator_1.IsObject)(),
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./cashbox/cashbox.ro"), exports);
|
|
18
18
|
__exportStar(require("./cashbox/create-cashbox.dto"), exports);
|
|
19
19
|
__exportStar(require("./cashbox/enum/cashbox-type.enum"), exports);
|
|
20
|
+
__exportStar(require("./salary"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenapiPromocodeAppliesToEnum = void 0;
|
|
4
|
+
/** К чему применяется промокод, созданный через партнёрский API. */
|
|
5
|
+
var OpenapiPromocodeAppliesToEnum;
|
|
6
|
+
(function (OpenapiPromocodeAppliesToEnum) {
|
|
7
|
+
OpenapiPromocodeAppliesToEnum["BOOKINGS"] = "bookings";
|
|
8
|
+
OpenapiPromocodeAppliesToEnum["CERTIFICATES"] = "certificates";
|
|
9
|
+
})(OpenapiPromocodeAppliesToEnum || (exports.OpenapiPromocodeAppliesToEnum = OpenapiPromocodeAppliesToEnum = {}));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PromocodeCertificateModeEnum } from '../../promocode/emun/promocode-certificate-mode.enum';
|
|
2
|
+
import { PromocodeDiscountTargetEnum } from '../../promocode/emun/promocode-discount-target.enum';
|
|
3
|
+
import { PromocodeTypeEnum } from '../../promocode/emun/promocode-type.enum';
|
|
4
|
+
import { OpenapiPromocodeAppliesToEnum } from './enum/openapi-promocode-applies-to.enum';
|
|
5
|
+
export declare class OpenapiPromocodeNominalRuleDto {
|
|
6
|
+
nominalId: number;
|
|
7
|
+
amount: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class OpenapiCreatePromocodeDto {
|
|
10
|
+
code?: string;
|
|
11
|
+
description: string;
|
|
12
|
+
appliesTo?: OpenapiPromocodeAppliesToEnum;
|
|
13
|
+
type?: PromocodeTypeEnum;
|
|
14
|
+
discount?: number;
|
|
15
|
+
discountTargets?: PromocodeDiscountTargetEnum[];
|
|
16
|
+
clientDescription?: string;
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
maxApplyings?: number;
|
|
19
|
+
canUseWithOtherPromocodes?: boolean;
|
|
20
|
+
canUseWithOtherCertificates?: boolean;
|
|
21
|
+
onlinePaymentOnly?: boolean;
|
|
22
|
+
validFrom?: string;
|
|
23
|
+
validTo?: string;
|
|
24
|
+
forOrdersFrom?: string;
|
|
25
|
+
forOrdersTo?: string;
|
|
26
|
+
availableFrom?: string;
|
|
27
|
+
availableTo?: string;
|
|
28
|
+
availableDays?: number[];
|
|
29
|
+
questroomIds?: number[];
|
|
30
|
+
minPlayers?: number;
|
|
31
|
+
maxPlayers?: number;
|
|
32
|
+
certificateMode?: PromocodeCertificateModeEnum;
|
|
33
|
+
certificateNominalRules?: OpenapiPromocodeNominalRuleDto[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,330 @@
|
|
|
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.OpenapiCreatePromocodeDto = exports.OpenapiPromocodeNominalRuleDto = void 0;
|
|
13
|
+
/* eslint-disable max-classes-per-file */
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
const promocode_certificate_mode_enum_1 = require("../../promocode/emun/promocode-certificate-mode.enum");
|
|
18
|
+
const promocode_discount_target_enum_1 = require("../../promocode/emun/promocode-discount-target.enum");
|
|
19
|
+
const promocode_type_enum_1 = require("../../promocode/emun/promocode-type.enum");
|
|
20
|
+
const openapi_promocode_applies_to_enum_1 = require("./enum/openapi-promocode-applies-to.enum");
|
|
21
|
+
class OpenapiPromocodeNominalRuleDto {
|
|
22
|
+
}
|
|
23
|
+
exports.OpenapiPromocodeNominalRuleDto = OpenapiPromocodeNominalRuleDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({
|
|
26
|
+
example: 12,
|
|
27
|
+
description: 'Certificate nominal id from your company catalogue. The promocode applies only to the nominals listed here.',
|
|
28
|
+
}),
|
|
29
|
+
(0, class_validator_1.IsInt)(),
|
|
30
|
+
(0, class_validator_1.Min)(1),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], OpenapiPromocodeNominalRuleDto.prototype, "nominalId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({
|
|
35
|
+
example: 1000,
|
|
36
|
+
minimum: 1,
|
|
37
|
+
description: 'Amount in minor currency units. With `certificateMode: discount` it is taken off the purchase price. With `certificateMode: bonus` it is added to the certificate balance.',
|
|
38
|
+
}),
|
|
39
|
+
(0, class_validator_1.IsInt)(),
|
|
40
|
+
(0, class_validator_1.Min)(1),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], OpenapiPromocodeNominalRuleDto.prototype, "amount", void 0);
|
|
43
|
+
class OpenapiCreatePromocodeDto {
|
|
44
|
+
}
|
|
45
|
+
exports.OpenapiCreatePromocodeDto = OpenapiCreatePromocodeDto;
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({
|
|
48
|
+
required: false,
|
|
49
|
+
example: 'SUMMER26',
|
|
50
|
+
minLength: 5,
|
|
51
|
+
maxLength: 32,
|
|
52
|
+
description: 'Code the customer will enter. Stored uppercased. Omit it and Escape Navigator generates one. Must be unique within your company — a repeat fails with `409`.',
|
|
53
|
+
}),
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
(0, class_validator_1.Length)(5, 32),
|
|
57
|
+
(0, class_validator_1.Matches)(/^[A-Za-z0-9][A-Za-z0-9_-]*$/, {
|
|
58
|
+
message: 'code may contain letters, digits, dash and underscore only',
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], OpenapiCreatePromocodeDto.prototype, "code", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, swagger_1.ApiProperty)({
|
|
64
|
+
example: 'Summer campaign, 10% off games',
|
|
65
|
+
maxLength: 500,
|
|
66
|
+
description: 'Internal note for your staff. Customers do not see it.',
|
|
67
|
+
}),
|
|
68
|
+
(0, class_validator_1.IsString)(),
|
|
69
|
+
(0, class_validator_1.Length)(1, 500),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], OpenapiCreatePromocodeDto.prototype, "description", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, swagger_1.ApiProperty)({
|
|
74
|
+
required: false,
|
|
75
|
+
enum: openapi_promocode_applies_to_enum_1.OpenapiPromocodeAppliesToEnum,
|
|
76
|
+
default: openapi_promocode_applies_to_enum_1.OpenapiPromocodeAppliesToEnum.BOOKINGS,
|
|
77
|
+
description: 'Where the code can be used. `bookings` discounts a game order. `certificates` changes the price or balance of a gift certificate. Defaults to `bookings`.',
|
|
78
|
+
}),
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
(0, class_validator_1.IsEnum)(openapi_promocode_applies_to_enum_1.OpenapiPromocodeAppliesToEnum),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], OpenapiCreatePromocodeDto.prototype, "appliesTo", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, swagger_1.ApiProperty)({
|
|
85
|
+
required: false,
|
|
86
|
+
enum: promocode_type_enum_1.PromocodeTypeEnum,
|
|
87
|
+
example: promocode_type_enum_1.PromocodeTypeEnum.PERCENT_ALL_SUM,
|
|
88
|
+
description: `How a booking discount is calculated. Required when \`appliesTo\` is \`bookings\`. Ignored for certificates.
|
|
89
|
+
|
|
90
|
+
- \`fixed\` — a fixed amount off the selected parts of the order.
|
|
91
|
+
- \`percent_all_sum\` — a percentage. Without \`discountTargets\` it applies to the game, extras and products.
|
|
92
|
+
- \`percent_base_sum\` — the same percentage. Without \`discountTargets\` it applies to the game price only.
|
|
93
|
+
- \`flash_price\` — the players pay exactly \`discount\` for the game. Extras and products are charged on top and cannot be discounted by this code.
|
|
94
|
+
- \`promotional\` — no money off. The benefit is the text in \`clientDescription\`.`,
|
|
95
|
+
}),
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
(0, class_validator_1.IsEnum)(promocode_type_enum_1.PromocodeTypeEnum),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], OpenapiCreatePromocodeDto.prototype, "type", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, swagger_1.ApiProperty)({
|
|
102
|
+
required: false,
|
|
103
|
+
example: 1000,
|
|
104
|
+
description: `Size of a booking discount.
|
|
105
|
+
|
|
106
|
+
- \`fixed\` and \`flash_price\`: minor currency units. \`1500\` is 15.00 in your company currency. For \`flash_price\` this is the final game price, not the amount taken off.
|
|
107
|
+
- \`percent_all_sum\` and \`percent_base_sum\`: hundredths of a percent. \`1000\` is 10%, \`1550\` is 15.5%, \`10000\` is 100%.
|
|
108
|
+
- \`promotional\` and certificate promocodes: omit.`,
|
|
109
|
+
}),
|
|
110
|
+
(0, class_validator_1.IsOptional)(),
|
|
111
|
+
(0, class_validator_1.IsInt)(),
|
|
112
|
+
(0, class_validator_1.Min)(1),
|
|
113
|
+
__metadata("design:type", Number)
|
|
114
|
+
], OpenapiCreatePromocodeDto.prototype, "discount", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, swagger_1.ApiProperty)({
|
|
117
|
+
required: false,
|
|
118
|
+
enum: promocode_discount_target_enum_1.PromocodeDiscountTargetEnum,
|
|
119
|
+
isArray: true,
|
|
120
|
+
example: [promocode_discount_target_enum_1.PromocodeDiscountTargetEnum.GAME, promocode_discount_target_enum_1.PromocodeDiscountTargetEnum.UPSELLINGS],
|
|
121
|
+
description: 'Parts of a booking the discount applies to: `game`, `upsellings`, `products`. Omit it to use the default for `type`. At least one value. Not used for `flash_price`, `promotional` or certificate promocodes.',
|
|
122
|
+
}),
|
|
123
|
+
(0, class_validator_1.IsOptional)(),
|
|
124
|
+
(0, class_validator_1.IsArray)(),
|
|
125
|
+
(0, class_validator_1.ArrayNotEmpty)(),
|
|
126
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
127
|
+
(0, class_validator_1.IsEnum)(promocode_discount_target_enum_1.PromocodeDiscountTargetEnum, { each: true }),
|
|
128
|
+
__metadata("design:type", Array)
|
|
129
|
+
], OpenapiCreatePromocodeDto.prototype, "discountTargets", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, swagger_1.ApiProperty)({
|
|
132
|
+
required: false,
|
|
133
|
+
example: 'Show this ticket at the bar for a free drink',
|
|
134
|
+
maxLength: 500,
|
|
135
|
+
description: 'Text shown to the customer. Required for `promotional` booking codes. Not used for other types.',
|
|
136
|
+
}),
|
|
137
|
+
(0, class_validator_1.IsOptional)(),
|
|
138
|
+
(0, class_validator_1.IsString)(),
|
|
139
|
+
(0, class_validator_1.Length)(1, 500),
|
|
140
|
+
__metadata("design:type", String)
|
|
141
|
+
], OpenapiCreatePromocodeDto.prototype, "clientDescription", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, swagger_1.ApiProperty)({
|
|
144
|
+
required: false,
|
|
145
|
+
default: true,
|
|
146
|
+
description: 'When `true` (default) the code can be used again until `maxApplyings` is reached. When `false` the code works once.',
|
|
147
|
+
}),
|
|
148
|
+
(0, class_validator_1.IsOptional)(),
|
|
149
|
+
(0, class_validator_1.IsBoolean)(),
|
|
150
|
+
__metadata("design:type", Boolean)
|
|
151
|
+
], OpenapiCreatePromocodeDto.prototype, "multiple", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, swagger_1.ApiProperty)({
|
|
154
|
+
required: false,
|
|
155
|
+
example: 100,
|
|
156
|
+
minimum: 1,
|
|
157
|
+
description: 'How many times the code may be applied in total. Omit it for no limit. Only together with `multiple: true`.',
|
|
158
|
+
}),
|
|
159
|
+
(0, class_validator_1.IsOptional)(),
|
|
160
|
+
(0, class_validator_1.IsInt)(),
|
|
161
|
+
(0, class_validator_1.Min)(1),
|
|
162
|
+
__metadata("design:type", Number)
|
|
163
|
+
], OpenapiCreatePromocodeDto.prototype, "maxApplyings", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, swagger_1.ApiProperty)({
|
|
166
|
+
required: false,
|
|
167
|
+
default: false,
|
|
168
|
+
description: 'Whether the code can be stacked with another promocode on the same order. Defaults to `false`. A flash price cannot be stacked.',
|
|
169
|
+
}),
|
|
170
|
+
(0, class_validator_1.IsOptional)(),
|
|
171
|
+
(0, class_validator_1.IsBoolean)(),
|
|
172
|
+
__metadata("design:type", Boolean)
|
|
173
|
+
], OpenapiCreatePromocodeDto.prototype, "canUseWithOtherPromocodes", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, swagger_1.ApiProperty)({
|
|
176
|
+
required: false,
|
|
177
|
+
default: true,
|
|
178
|
+
description: 'Whether the code can be used on an order that also redeems a gift certificate. Defaults to `true`.',
|
|
179
|
+
}),
|
|
180
|
+
(0, class_validator_1.IsOptional)(),
|
|
181
|
+
(0, class_validator_1.IsBoolean)(),
|
|
182
|
+
__metadata("design:type", Boolean)
|
|
183
|
+
], OpenapiCreatePromocodeDto.prototype, "canUseWithOtherCertificates", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, swagger_1.ApiProperty)({
|
|
186
|
+
required: false,
|
|
187
|
+
default: false,
|
|
188
|
+
description: 'When `true`, a booking with this code can only be paid online. Pay-at-the-venue is hidden. Booking promocodes only. Defaults to `false`.',
|
|
189
|
+
}),
|
|
190
|
+
(0, class_validator_1.IsOptional)(),
|
|
191
|
+
(0, class_validator_1.IsBoolean)(),
|
|
192
|
+
__metadata("design:type", Boolean)
|
|
193
|
+
], OpenapiCreatePromocodeDto.prototype, "onlinePaymentOnly", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, swagger_1.ApiProperty)({
|
|
196
|
+
required: false,
|
|
197
|
+
example: '2026-06-01',
|
|
198
|
+
description: 'First day the code can be entered, `YYYY-MM-DD`. Omit for no start.',
|
|
199
|
+
}),
|
|
200
|
+
(0, class_validator_1.IsOptional)(),
|
|
201
|
+
(0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
|
|
202
|
+
__metadata("design:type", String)
|
|
203
|
+
], OpenapiCreatePromocodeDto.prototype, "validFrom", void 0);
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, swagger_1.ApiProperty)({
|
|
206
|
+
required: false,
|
|
207
|
+
example: '2026-08-31',
|
|
208
|
+
description: 'Last day the code can be entered, `YYYY-MM-DD`. Omit for no end.',
|
|
209
|
+
}),
|
|
210
|
+
(0, class_validator_1.IsOptional)(),
|
|
211
|
+
(0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
|
|
212
|
+
__metadata("design:type", String)
|
|
213
|
+
], OpenapiCreatePromocodeDto.prototype, "validTo", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
(0, swagger_1.ApiProperty)({
|
|
216
|
+
required: false,
|
|
217
|
+
example: '2026-06-01',
|
|
218
|
+
description: 'The booking date must be on or after this day, `YYYY-MM-DD`. Booking promocodes only.',
|
|
219
|
+
}),
|
|
220
|
+
(0, class_validator_1.IsOptional)(),
|
|
221
|
+
(0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
|
|
222
|
+
__metadata("design:type", String)
|
|
223
|
+
], OpenapiCreatePromocodeDto.prototype, "forOrdersFrom", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
(0, swagger_1.ApiProperty)({
|
|
226
|
+
required: false,
|
|
227
|
+
example: '2026-08-31',
|
|
228
|
+
description: 'The booking date must be on or before this day, `YYYY-MM-DD`. Booking promocodes only.',
|
|
229
|
+
}),
|
|
230
|
+
(0, class_validator_1.IsOptional)(),
|
|
231
|
+
(0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
|
|
232
|
+
__metadata("design:type", String)
|
|
233
|
+
], OpenapiCreatePromocodeDto.prototype, "forOrdersTo", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, swagger_1.ApiProperty)({
|
|
236
|
+
required: false,
|
|
237
|
+
example: '10:00',
|
|
238
|
+
description: 'Slot start must be at or after this time, `HH:mm` in the venue timezone. Booking promocodes only. Defaults to `00:00`.',
|
|
239
|
+
}),
|
|
240
|
+
(0, class_validator_1.IsOptional)(),
|
|
241
|
+
(0, class_validator_1.Matches)(/^([01]\d|2[0-3]):[0-5]\d$/),
|
|
242
|
+
__metadata("design:type", String)
|
|
243
|
+
], OpenapiCreatePromocodeDto.prototype, "availableFrom", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
(0, swagger_1.ApiProperty)({
|
|
246
|
+
required: false,
|
|
247
|
+
example: '22:00',
|
|
248
|
+
description: 'Slot start must be at or before this time, `HH:mm` in the venue timezone. Booking promocodes only. Defaults to `23:55`.',
|
|
249
|
+
}),
|
|
250
|
+
(0, class_validator_1.IsOptional)(),
|
|
251
|
+
(0, class_validator_1.Matches)(/^([01]\d|2[0-3]):[0-5]\d$/),
|
|
252
|
+
__metadata("design:type", String)
|
|
253
|
+
], OpenapiCreatePromocodeDto.prototype, "availableTo", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
(0, swagger_1.ApiProperty)({
|
|
256
|
+
required: false,
|
|
257
|
+
example: [0, 1, 2, 3, 4],
|
|
258
|
+
description: 'Weekdays the booking may fall on. `0` is Monday … `6` is Sunday. Booking promocodes only. Defaults to every day.',
|
|
259
|
+
}),
|
|
260
|
+
(0, class_validator_1.IsOptional)(),
|
|
261
|
+
(0, class_validator_1.IsArray)(),
|
|
262
|
+
(0, class_validator_1.ArrayNotEmpty)(),
|
|
263
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
264
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
|
265
|
+
(0, class_validator_1.Min)(0, { each: true }),
|
|
266
|
+
(0, class_validator_1.Max)(6, { each: true }),
|
|
267
|
+
__metadata("design:type", Array)
|
|
268
|
+
], OpenapiCreatePromocodeDto.prototype, "availableDays", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
(0, swagger_1.ApiProperty)({
|
|
271
|
+
required: false,
|
|
272
|
+
example: [4, 9],
|
|
273
|
+
description: 'Quest room ids the code is limited to (`GET /api/questrooms`). Omit it to allow every room. Booking promocodes only.',
|
|
274
|
+
}),
|
|
275
|
+
(0, class_validator_1.IsOptional)(),
|
|
276
|
+
(0, class_validator_1.IsArray)(),
|
|
277
|
+
(0, class_validator_1.ArrayNotEmpty)(),
|
|
278
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
279
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
|
280
|
+
(0, class_validator_1.Min)(1, { each: true }),
|
|
281
|
+
__metadata("design:type", Array)
|
|
282
|
+
], OpenapiCreatePromocodeDto.prototype, "questroomIds", void 0);
|
|
283
|
+
__decorate([
|
|
284
|
+
(0, swagger_1.ApiProperty)({
|
|
285
|
+
required: false,
|
|
286
|
+
example: 2,
|
|
287
|
+
minimum: 1,
|
|
288
|
+
description: 'Minimum players on the booking. Booking promocodes only.',
|
|
289
|
+
}),
|
|
290
|
+
(0, class_validator_1.IsOptional)(),
|
|
291
|
+
(0, class_validator_1.IsInt)(),
|
|
292
|
+
(0, class_validator_1.Min)(1),
|
|
293
|
+
__metadata("design:type", Number)
|
|
294
|
+
], OpenapiCreatePromocodeDto.prototype, "minPlayers", void 0);
|
|
295
|
+
__decorate([
|
|
296
|
+
(0, swagger_1.ApiProperty)({
|
|
297
|
+
required: false,
|
|
298
|
+
example: 6,
|
|
299
|
+
minimum: 1,
|
|
300
|
+
description: 'Maximum players on the booking. Booking promocodes only.',
|
|
301
|
+
}),
|
|
302
|
+
(0, class_validator_1.IsOptional)(),
|
|
303
|
+
(0, class_validator_1.IsInt)(),
|
|
304
|
+
(0, class_validator_1.Min)(1),
|
|
305
|
+
__metadata("design:type", Number)
|
|
306
|
+
], OpenapiCreatePromocodeDto.prototype, "maxPlayers", void 0);
|
|
307
|
+
__decorate([
|
|
308
|
+
(0, swagger_1.ApiProperty)({
|
|
309
|
+
required: false,
|
|
310
|
+
enum: promocode_certificate_mode_enum_1.PromocodeCertificateModeEnum,
|
|
311
|
+
default: promocode_certificate_mode_enum_1.PromocodeCertificateModeEnum.DISCOUNT,
|
|
312
|
+
description: 'How `certificateNominalRules.amount` is applied. `discount` lowers the purchase price. `bonus` adds to the certificate balance. Certificate promocodes only. Defaults to `discount`.',
|
|
313
|
+
}),
|
|
314
|
+
(0, class_validator_1.IsOptional)(),
|
|
315
|
+
(0, class_validator_1.IsEnum)(promocode_certificate_mode_enum_1.PromocodeCertificateModeEnum),
|
|
316
|
+
__metadata("design:type", String)
|
|
317
|
+
], OpenapiCreatePromocodeDto.prototype, "certificateMode", void 0);
|
|
318
|
+
__decorate([
|
|
319
|
+
(0, swagger_1.ApiProperty)({
|
|
320
|
+
required: false,
|
|
321
|
+
type: [OpenapiPromocodeNominalRuleDto],
|
|
322
|
+
description: 'Per-nominal amount for a certificate promocode. Required when `appliesTo` is `certificates`. A nominal that is not listed cannot use the code.',
|
|
323
|
+
}),
|
|
324
|
+
(0, class_validator_1.IsOptional)(),
|
|
325
|
+
(0, class_validator_1.IsArray)(),
|
|
326
|
+
(0, class_validator_1.ArrayNotEmpty)(),
|
|
327
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
328
|
+
(0, class_transformer_1.Type)(() => OpenapiPromocodeNominalRuleDto),
|
|
329
|
+
__metadata("design:type", Array)
|
|
330
|
+
], OpenapiCreatePromocodeDto.prototype, "certificateNominalRules", void 0);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PromocodeCertificateModeEnum } from '../../promocode/emun/promocode-certificate-mode.enum';
|
|
2
|
+
import { PromocodeDiscountTargetEnum } from '../../promocode/emun/promocode-discount-target.enum';
|
|
3
|
+
import { PromocodeTypeEnum } from '../../promocode/emun/promocode-type.enum';
|
|
4
|
+
import { OpenapiPromocodeAppliesToEnum } from './enum/openapi-promocode-applies-to.enum';
|
|
5
|
+
export declare class OpenapiPromocodeNominalRuleRO {
|
|
6
|
+
nominalId: number;
|
|
7
|
+
amount: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class OpenapiPromocodeRO {
|
|
10
|
+
promocodeId: number;
|
|
11
|
+
code: string;
|
|
12
|
+
description: string;
|
|
13
|
+
appliesTo: OpenapiPromocodeAppliesToEnum;
|
|
14
|
+
type: PromocodeTypeEnum;
|
|
15
|
+
discount: number;
|
|
16
|
+
discountTargets: PromocodeDiscountTargetEnum[];
|
|
17
|
+
multiple: boolean;
|
|
18
|
+
maxApplyings: number | null;
|
|
19
|
+
canUseWithOtherPromocodes: boolean;
|
|
20
|
+
canUseWithOtherCertificates: boolean;
|
|
21
|
+
onlinePaymentOnly: boolean;
|
|
22
|
+
validFrom: string | null;
|
|
23
|
+
validTo: string | null;
|
|
24
|
+
forOrdersFrom: string | null;
|
|
25
|
+
forOrdersTo: string | null;
|
|
26
|
+
availableFrom: string;
|
|
27
|
+
availableTo: string;
|
|
28
|
+
availableDays: number[];
|
|
29
|
+
allQuestrooms: boolean;
|
|
30
|
+
questroomIds: number[];
|
|
31
|
+
minPlayers: number | null;
|
|
32
|
+
maxPlayers: number | null;
|
|
33
|
+
clientDescription: string | null;
|
|
34
|
+
certificateMode: PromocodeCertificateModeEnum | null;
|
|
35
|
+
certificateNominalRules: OpenapiPromocodeNominalRuleRO[];
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
}
|