@escapenavigator/types 2.0.34 → 2.0.37
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/create-aggregator-order.dto.d.ts +1 -0
- package/dist/agregator/agregator-questroom.ro.d.ts +2 -0
- package/dist/agregator/agregator-questroom.ro.js +5 -0
- package/dist/certificate-sale/certificate-sale.ro.d.ts +6 -0
- package/dist/certificate-sale/certificate-sale.ro.js +4 -0
- package/dist/certificate-uploaded/certificate-uploaded.ro.d.ts +1 -1
- package/dist/client/client.ro.d.ts +13 -0
- package/dist/client/client.ro.js +21 -0
- package/dist/constants/uploading/upload-bookeo-certificate-rows.js +2 -2
- package/dist/constants/uploading/upload-certificate-rows.js +1 -1
- package/dist/location/create-location.dto.d.ts +2 -0
- package/dist/location/create-location.dto.js +7 -0
- package/dist/location/location-light.ro.d.ts +3 -1
- package/dist/location/location-light.ro.js +6 -1
- package/dist/location/update-location-for-admin.dto.d.ts +2 -0
- package/dist/location/update-location-for-admin.dto.js +7 -0
- package/dist/log/log-title.enum.d.ts +3 -0
- package/dist/log/log-title.enum.js +3 -0
- package/dist/loyalty/adjust-bonus.dto.d.ts +14 -0
- package/dist/loyalty/adjust-bonus.dto.js +35 -0
- package/dist/loyalty/assign-client-tier.dto.d.ts +9 -0
- package/dist/loyalty/assign-client-tier.dto.js +29 -0
- package/dist/loyalty/client-loyalty.ro.d.ts +30 -0
- package/dist/loyalty/client-loyalty.ro.js +71 -0
- package/dist/loyalty/enum/loyalty-bonus-type.enum.d.ts +13 -0
- package/dist/loyalty/enum/loyalty-bonus-type.enum.js +17 -0
- package/dist/loyalty/enum/loyalty-history-mode.enum.d.ts +18 -0
- package/dist/loyalty/enum/loyalty-history-mode.enum.js +22 -0
- package/dist/loyalty/enum/loyalty-metric.enum.d.ts +12 -0
- package/dist/loyalty/enum/loyalty-metric.enum.js +16 -0
- package/dist/loyalty/enum/loyalty-program-type.enum.d.ts +12 -0
- package/dist/loyalty/enum/loyalty-program-type.enum.js +16 -0
- package/dist/loyalty/enum/loyalty-stacking.enum.d.ts +14 -0
- package/dist/loyalty/enum/loyalty-stacking.enum.js +18 -0
- package/dist/loyalty/enum/loyalty-tier-color.enum.d.ts +16 -0
- package/dist/loyalty/enum/loyalty-tier-color.enum.js +20 -0
- package/dist/loyalty/enum/loyalty-tier-source.enum.d.ts +13 -0
- package/dist/loyalty/enum/loyalty-tier-source.enum.js +17 -0
- package/dist/loyalty/loyalty-bonus.ro.d.ts +20 -0
- package/dist/loyalty/loyalty-bonus.ro.js +55 -0
- package/dist/loyalty/loyalty-presets.d.ts +45 -0
- package/dist/loyalty/loyalty-presets.js +30 -0
- package/dist/loyalty/loyalty-preview.dto.d.ts +19 -0
- package/dist/loyalty/loyalty-preview.dto.js +64 -0
- package/dist/loyalty/loyalty-preview.ro.d.ts +20 -0
- package/dist/loyalty/loyalty-preview.ro.js +53 -0
- package/dist/loyalty/loyalty-settings.dto.d.ts +51 -0
- package/dist/loyalty/loyalty-settings.dto.js +103 -0
- package/dist/loyalty/loyalty-settings.ro.d.ts +33 -0
- package/dist/loyalty/loyalty-settings.ro.js +67 -0
- package/dist/loyalty/loyalty-tier.dto.d.ts +33 -0
- package/dist/loyalty/loyalty-tier.dto.js +69 -0
- package/dist/loyalty/loyalty-tier.ro.d.ts +12 -0
- package/dist/loyalty/loyalty-tier.ro.js +42 -0
- package/dist/loyalty/pay-with-bonus.dto.d.ts +10 -0
- package/dist/loyalty/pay-with-bonus.dto.js +36 -0
- package/dist/openapi/order-groups/openapi-batch-create-preorder.dto.d.ts +3 -3
- package/dist/openapi/orders/openapi-order.ro.d.ts +12 -0
- package/dist/openapi/orders/openapi-order.ro.js +8 -0
- package/dist/openapi/profiles/enum/openapi-certificate-status.enum.d.ts +29 -0
- package/dist/openapi/profiles/enum/openapi-certificate-status.enum.js +38 -0
- package/dist/openapi/profiles/openapi-annul-certificate.dto.d.ts +3 -0
- package/dist/openapi/profiles/openapi-annul-certificate.dto.js +29 -0
- package/dist/openapi/profiles/openapi-certificate.ro.d.ts +33 -0
- package/dist/openapi/profiles/openapi-certificate.ro.js +195 -0
- package/dist/openapi/profiles/openapi-create-certificate.dto.d.ts +24 -0
- package/dist/openapi/profiles/openapi-create-certificate.dto.js +208 -0
- package/dist/openapi/slots/openapi-widget-slot.ro.d.ts +3 -0
- package/dist/openapi/slots/openapi-widget-slot.ro.js +24 -2
- package/dist/order/order.ro.d.ts +23 -1
- package/dist/order/order.ro.js +19 -0
- package/dist/order-discount/enum/order-discount-source.enum.d.ts +10 -0
- package/dist/order-discount/enum/order-discount-source.enum.js +14 -0
- package/dist/packages/book-package.dto.d.ts +3 -0
- package/dist/packages/book-package.dto.js +9 -0
- package/dist/packages/create-package.dto.d.ts +23 -0
- package/dist/packages/create-package.dto.js +81 -1
- package/dist/packages/package-addon.dto.d.ts +5 -0
- package/dist/packages/package-addon.dto.js +31 -0
- package/dist/packages/package-audience.enum.d.ts +6 -0
- package/dist/packages/package-audience.enum.js +10 -0
- package/dist/packages/package-feature.dto.d.ts +12 -0
- package/dist/packages/package-feature.dto.js +41 -0
- package/dist/packages/package-pricing-mode.enum.d.ts +14 -0
- package/dist/packages/package-pricing-mode.enum.js +18 -0
- package/dist/packages/package.ro.d.ts +14 -0
- package/dist/packages/package.ro.js +48 -0
- package/dist/profile/company-ai-context.d.ts +2 -0
- package/dist/profile/notification-chanel/notification-chanel-action.enum.d.ts +16 -1
- package/dist/profile/notification-chanel/notification-chanel-action.enum.js +21 -1
- package/dist/profile/notification-chanel/notification-chanel.ro.d.ts +5 -0
- package/dist/profile/notification-chanel/notification-chanel.ro.js +4 -0
- package/dist/profile/notification-chanel/test-notification-chanel.dto.d.ts +7 -2
- package/dist/profile/notification-chanel/test-notification-chanel.dto.js +7 -0
- package/dist/questroom/questroom-ai-context.d.ts +5 -0
- package/dist/shared/enum/availability.enum.d.ts +11 -0
- package/dist/shared/enum/availability.enum.js +15 -0
- package/dist/slot/bulk-update-slots.dto.d.ts +2 -0
- package/dist/slot/bulk-update-slots.dto.js +7 -0
- package/dist/slot/change-template-slots-form.dto.d.ts +3 -0
- package/dist/slot/change-template-slots-form.dto.js +13 -0
- package/dist/slot/create-slot-form.dto.d.ts +2 -0
- package/dist/slot/create-slot-form.dto.js +7 -0
- package/dist/slot/create-slot.dto.d.ts +2 -0
- package/dist/slot/create-slot.dto.js +7 -0
- package/dist/slot/daily-window-range.validator.d.ts +15 -0
- package/dist/slot/daily-window-range.validator.js +46 -0
- package/dist/slot/enum/slot-discount-type.enum.d.ts +15 -0
- package/dist/slot/enum/slot-discount-type.enum.js +19 -0
- package/dist/slot/slot-autocomplite-form.dto.d.ts +2 -0
- package/dist/slot/slot-autocomplite-form.dto.js +7 -0
- package/dist/slot/slot-discount-range.validator.d.ts +10 -0
- package/dist/slot/slot-discount-range.validator.js +36 -0
- package/dist/slot/slot.ro.d.ts +10 -0
- package/dist/slot/update-slot-upsellings-range.dto.d.ts +17 -0
- package/dist/slot/update-slot-upsellings-range.dto.js +68 -0
- package/dist/slot/update-slot.dto.d.ts +4 -0
- package/dist/slot/update-slot.dto.js +14 -0
- package/dist/slot-template/slot-template-element.d.ts +4 -0
- package/dist/slot-template/slot-template-element.js +9 -0
- package/dist/slot-template/slot-template-flex-rule.d.ts +8 -0
- package/dist/slot-template/slot-template-flex-rule.js +15 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/user/crud/user.ro.d.ts +3 -0
- package/dist/user/crud/user.ro.js +11 -0
- package/dist/user/current/update-current-user-notifications.dto.d.ts +7 -0
- package/dist/user/current/update-current-user-notifications.dto.js +13 -0
- package/dist/user/enum/push-order-scope.enum.d.ts +15 -0
- package/dist/user/enum/push-order-scope.enum.js +19 -0
- package/dist/widget/enum/widget-type.enum.d.ts +3 -1
- package/dist/widget/enum/widget-type.enum.js +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,67 @@
|
|
|
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.LoyaltySettingsRO = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const ro_class_1 = require("../shared/ro-class");
|
|
15
|
+
const loyalty_history_mode_enum_1 = require("./enum/loyalty-history-mode.enum");
|
|
16
|
+
const loyalty_metric_enum_1 = require("./enum/loyalty-metric.enum");
|
|
17
|
+
const loyalty_program_type_enum_1 = require("./enum/loyalty-program-type.enum");
|
|
18
|
+
const loyalty_stacking_enum_1 = require("./enum/loyalty-stacking.enum");
|
|
19
|
+
const loyalty_tier_ro_1 = require("./loyalty-tier.ro");
|
|
20
|
+
class LoyaltySettingsRO extends ro_class_1.RO {
|
|
21
|
+
}
|
|
22
|
+
exports.LoyaltySettingsRO = LoyaltySettingsRO;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
__metadata("design:type", Boolean)
|
|
26
|
+
], LoyaltySettingsRO.prototype, "enabled", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], LoyaltySettingsRO.prototype, "programType", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], LoyaltySettingsRO.prototype, "metric", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], LoyaltySettingsRO.prototype, "cashbackPercent", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], LoyaltySettingsRO.prototype, "maxBonusPayPercent", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Expose)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], LoyaltySettingsRO.prototype, "cashbackFrom", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
__metadata("design:type", Boolean)
|
|
50
|
+
], LoyaltySettingsRO.prototype, "autoApplyDiscount", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_transformer_1.Expose)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], LoyaltySettingsRO.prototype, "stacking", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_transformer_1.Expose)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], LoyaltySettingsRO.prototype, "historyMode", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_transformer_1.Expose)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], LoyaltySettingsRO.prototype, "countFrom", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_transformer_1.Expose)(),
|
|
65
|
+
(0, class_transformer_1.Type)(() => loyalty_tier_ro_1.LoyaltyTierRO),
|
|
66
|
+
__metadata("design:type", Array)
|
|
67
|
+
], LoyaltySettingsRO.prototype, "tiers", void 0);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LoyaltyTierColorEnum } from './enum/loyalty-tier-color.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Больше пяти статусов клиент не удерживает в голове, а администратор не
|
|
4
|
+
* может объяснить на стойке.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MAX_LOYALTY_TIERS = 5;
|
|
7
|
+
export declare class CreateLoyaltyTierDto {
|
|
8
|
+
title: string;
|
|
9
|
+
color: LoyaltyTierColorEnum;
|
|
10
|
+
/**
|
|
11
|
+
* Порог входа: количество игр или сумма в минорных единицах — что
|
|
12
|
+
* именно, определяет метрика программы.
|
|
13
|
+
*/
|
|
14
|
+
threshold: number;
|
|
15
|
+
/**
|
|
16
|
+
* Процент скидки, целыми процентами. Не базисные пункты, в отличие
|
|
17
|
+
* от скидки слота: доли процента в статусной скидке никому не нужны,
|
|
18
|
+
* а «10» вместо «1000» читается и в базе, и в интерфейсе.
|
|
19
|
+
* 0 — статус без скидки, только бейдж и привилегии.
|
|
20
|
+
*/
|
|
21
|
+
discount: number;
|
|
22
|
+
/**
|
|
23
|
+
* Процент кэшбэка на статусе, целыми процентами. Читается только в
|
|
24
|
+
* накопительной программе — в скидочной поле лежит без дела, и
|
|
25
|
+
* наоборот: так переключение типа программы не стирает уже
|
|
26
|
+
* настроенные цифры и владелец может вернуться обратно.
|
|
27
|
+
*/
|
|
28
|
+
cashback?: number;
|
|
29
|
+
/** Свободный текст привилегий: фото в подарок, приоритетная запись. */
|
|
30
|
+
perks?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class UpdateLoyaltyTierDto extends CreateLoyaltyTierDto {
|
|
33
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.UpdateLoyaltyTierDto = exports.CreateLoyaltyTierDto = exports.MAX_LOYALTY_TIERS = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const is_not_blank_1 = require("../shared/is-not-blank");
|
|
16
|
+
const loyalty_tier_color_enum_1 = require("./enum/loyalty-tier-color.enum");
|
|
17
|
+
/**
|
|
18
|
+
* Больше пяти статусов клиент не удерживает в голове, а администратор не
|
|
19
|
+
* может объяснить на стойке.
|
|
20
|
+
*/
|
|
21
|
+
exports.MAX_LOYALTY_TIERS = 5;
|
|
22
|
+
class CreateLoyaltyTierDto {
|
|
23
|
+
}
|
|
24
|
+
exports.CreateLoyaltyTierDto = CreateLoyaltyTierDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, is_not_blank_1.IsNotBlank)(),
|
|
27
|
+
(0, class_validator_1.MaxLength)(30),
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CreateLoyaltyTierDto.prototype, "title", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsEnum)(loyalty_tier_color_enum_1.LoyaltyTierColorEnum),
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CreateLoyaltyTierDto.prototype, "color", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Transform)(({ value }) => (+value > 0 ? Math.round(+value) : 0)),
|
|
38
|
+
(0, class_validator_1.Min)(0),
|
|
39
|
+
(0, class_validator_1.IsInt)(),
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], CreateLoyaltyTierDto.prototype, "threshold", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Transform)(({ value }) => (+value > 0 ? Math.round(+value) : 0)),
|
|
45
|
+
(0, class_validator_1.Min)(0),
|
|
46
|
+
(0, class_validator_1.Max)(100),
|
|
47
|
+
(0, class_validator_1.IsInt)(),
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], CreateLoyaltyTierDto.prototype, "discount", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_transformer_1.Transform)(({ value }) => (+value > 0 ? Math.round(+value) : 0)),
|
|
54
|
+
(0, class_validator_1.Min)(0),
|
|
55
|
+
(0, class_validator_1.Max)(100),
|
|
56
|
+
(0, class_validator_1.IsInt)(),
|
|
57
|
+
(0, class_transformer_1.Expose)(),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], CreateLoyaltyTierDto.prototype, "cashback", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsString)(),
|
|
63
|
+
(0, class_validator_1.MaxLength)(200),
|
|
64
|
+
(0, class_transformer_1.Expose)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], CreateLoyaltyTierDto.prototype, "perks", void 0);
|
|
67
|
+
class UpdateLoyaltyTierDto extends CreateLoyaltyTierDto {
|
|
68
|
+
}
|
|
69
|
+
exports.UpdateLoyaltyTierDto = UpdateLoyaltyTierDto;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RO } from '../shared/ro-class';
|
|
2
|
+
import { LoyaltyTierColorEnum } from './enum/loyalty-tier-color.enum';
|
|
3
|
+
export declare class LoyaltyTierRO extends RO {
|
|
4
|
+
title: string;
|
|
5
|
+
color: LoyaltyTierColorEnum;
|
|
6
|
+
threshold: number;
|
|
7
|
+
/** Целые проценты. Работает в скидочной программе. */
|
|
8
|
+
discount: number;
|
|
9
|
+
/** Целые проценты. Работает в накопительной программе. */
|
|
10
|
+
cashback: number;
|
|
11
|
+
perks: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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.LoyaltyTierRO = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const ro_class_1 = require("../shared/ro-class");
|
|
15
|
+
const loyalty_tier_color_enum_1 = require("./enum/loyalty-tier-color.enum");
|
|
16
|
+
class LoyaltyTierRO extends ro_class_1.RO {
|
|
17
|
+
}
|
|
18
|
+
exports.LoyaltyTierRO = LoyaltyTierRO;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], LoyaltyTierRO.prototype, "title", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], LoyaltyTierRO.prototype, "color", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], LoyaltyTierRO.prototype, "threshold", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], LoyaltyTierRO.prototype, "discount", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], LoyaltyTierRO.prototype, "cashback", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], LoyaltyTierRO.prototype, "perks", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Оплата игры бонусами. Сумму присылает интерфейс, а не «списать
|
|
3
|
+
* максимум»: администратор на стойке проговаривает цифру клиенту, и она
|
|
4
|
+
* должна быть его решением, а не результатом округления на сервере.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayWithBonusDto {
|
|
7
|
+
orderId: number;
|
|
8
|
+
/** Минорные единицы. Сервер сам обрежет до доступного лимита. */
|
|
9
|
+
amount: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.PayWithBonusDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Оплата игры бонусами. Сумму присылает интерфейс, а не «списать
|
|
17
|
+
* максимум»: администратор на стойке проговаривает цифру клиенту, и она
|
|
18
|
+
* должна быть его решением, а не результатом округления на сервере.
|
|
19
|
+
*/
|
|
20
|
+
class PayWithBonusDto {
|
|
21
|
+
}
|
|
22
|
+
exports.PayWithBonusDto = PayWithBonusDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Transform)(({ value }) => Math.round(+value) || 0),
|
|
25
|
+
(0, class_validator_1.IsInt)(),
|
|
26
|
+
(0, class_validator_1.Min)(1),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], PayWithBonusDto.prototype, "orderId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Transform)(({ value }) => Math.round(+value) || 0),
|
|
32
|
+
(0, class_validator_1.IsInt)(),
|
|
33
|
+
(0, class_validator_1.Min)(1),
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], PayWithBonusDto.prototype, "amount", void 0);
|
|
@@ -25,9 +25,9 @@ export declare class OpenapiBatchCreatePreorderDto {
|
|
|
25
25
|
items: OpenapiCreatePreorderDto[];
|
|
26
26
|
/**
|
|
27
27
|
* Если группа собирается как пакетное предложение — id пакета. Бэкенд
|
|
28
|
-
* после сборки группы
|
|
29
|
-
* (см. PackageBookingService.
|
|
30
|
-
* работает как обычная мульти-бронь.
|
|
28
|
+
* после сборки группы доводит цену до пакетной: group-level скидка либо
|
|
29
|
+
* фиксированный прайс пакета (см. PackageBookingService.applyPricingToGroup).
|
|
30
|
+
* Без него batch работает как обычная мульти-бронь.
|
|
31
31
|
*/
|
|
32
32
|
packageId?: number;
|
|
33
33
|
}
|
|
@@ -73,6 +73,18 @@ export declare class OpenapiOrderRO extends QuestroomRow {
|
|
|
73
73
|
penalties: Penalty[];
|
|
74
74
|
discounts: Discount[];
|
|
75
75
|
slotDiscount: number;
|
|
76
|
+
/**
|
|
77
|
+
* Скидка по статусу клиента в программе лояльности. Клиенту в виджете
|
|
78
|
+
* и в гостевом портале показывается отдельной строкой — сам статус нет:
|
|
79
|
+
* в чужой программе лояльности он разбираться не обязан.
|
|
80
|
+
*/
|
|
81
|
+
loyaltyDiscount: number;
|
|
82
|
+
/**
|
|
83
|
+
* Бонусы, которыми администратор закрыл часть игры. Клиенту это тоже
|
|
84
|
+
* видно строкой в чеке: он должен понимать, почему к оплате меньше,
|
|
85
|
+
* чем стоит игра.
|
|
86
|
+
*/
|
|
87
|
+
bonusTotal: number;
|
|
76
88
|
upsellings: OpenapiOrderUpsellingRO[];
|
|
77
89
|
certificates: OpenapiOrderCertificateRO[];
|
|
78
90
|
promocodes: OpenapiPromocodeRO[];
|
|
@@ -218,6 +218,14 @@ __decorate([
|
|
|
218
218
|
(0, class_transformer_1.Expose)(),
|
|
219
219
|
__metadata("design:type", Number)
|
|
220
220
|
], OpenapiOrderRO.prototype, "slotDiscount", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, class_transformer_1.Expose)(),
|
|
223
|
+
__metadata("design:type", Number)
|
|
224
|
+
], OpenapiOrderRO.prototype, "loyaltyDiscount", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
(0, class_transformer_1.Expose)(),
|
|
227
|
+
__metadata("design:type", Number)
|
|
228
|
+
], OpenapiOrderRO.prototype, "bonusTotal", void 0);
|
|
221
229
|
__decorate([
|
|
222
230
|
(0, class_transformer_1.Expose)(),
|
|
223
231
|
(0, class_transformer_1.Type)(() => openapi_order_upselling_ro_1.OpenapiOrderUpsellingRO),
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Статус сертификата в публичном API. Внутри системы отдельной колонки
|
|
3
|
+
* статуса нет — он выводится из флагов продажи (`annul` / `used` / `toPay` /
|
|
4
|
+
* `balance` / `expireDate`), поэтому наружу отдаём короткий стабильный
|
|
5
|
+
* словарь вместо CRM-ного `CertificatesaleStatusEnum`, где половина значений
|
|
6
|
+
* описывает стадию доставки, а не право на погашение.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum OpenapiCertificateStatusEnum {
|
|
9
|
+
ACTIVE = "active",
|
|
10
|
+
PARTLY_USED = "partly_used",
|
|
11
|
+
USED = "used",
|
|
12
|
+
ANNULLED = "annulled",
|
|
13
|
+
EXPIRED = "expired",
|
|
14
|
+
NOT_PAID = "not_paid"
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Порядок проверок повторяет приоритет CRM-статусов (`get-certificate-data`):
|
|
18
|
+
* аннулирование перекрывает всё, затем полное погашение, затем срок, затем
|
|
19
|
+
* неоплата. Частичное погашение показываем только пока остаток можно потратить.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveOpenapiCertificateStatus({ annul, used, usedAmount, balance, toPay, expireDate, now, }: {
|
|
22
|
+
annul: boolean;
|
|
23
|
+
used: boolean;
|
|
24
|
+
usedAmount: number;
|
|
25
|
+
balance: number;
|
|
26
|
+
toPay: number;
|
|
27
|
+
expireDate: string;
|
|
28
|
+
now?: Date;
|
|
29
|
+
}): OpenapiCertificateStatusEnum;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenapiCertificateStatusEnum = void 0;
|
|
4
|
+
exports.resolveOpenapiCertificateStatus = resolveOpenapiCertificateStatus;
|
|
5
|
+
/**
|
|
6
|
+
* Статус сертификата в публичном API. Внутри системы отдельной колонки
|
|
7
|
+
* статуса нет — он выводится из флагов продажи (`annul` / `used` / `toPay` /
|
|
8
|
+
* `balance` / `expireDate`), поэтому наружу отдаём короткий стабильный
|
|
9
|
+
* словарь вместо CRM-ного `CertificatesaleStatusEnum`, где половина значений
|
|
10
|
+
* описывает стадию доставки, а не право на погашение.
|
|
11
|
+
*/
|
|
12
|
+
var OpenapiCertificateStatusEnum;
|
|
13
|
+
(function (OpenapiCertificateStatusEnum) {
|
|
14
|
+
OpenapiCertificateStatusEnum["ACTIVE"] = "active";
|
|
15
|
+
OpenapiCertificateStatusEnum["PARTLY_USED"] = "partly_used";
|
|
16
|
+
OpenapiCertificateStatusEnum["USED"] = "used";
|
|
17
|
+
OpenapiCertificateStatusEnum["ANNULLED"] = "annulled";
|
|
18
|
+
OpenapiCertificateStatusEnum["EXPIRED"] = "expired";
|
|
19
|
+
OpenapiCertificateStatusEnum["NOT_PAID"] = "not_paid";
|
|
20
|
+
})(OpenapiCertificateStatusEnum || (exports.OpenapiCertificateStatusEnum = OpenapiCertificateStatusEnum = {}));
|
|
21
|
+
/**
|
|
22
|
+
* Порядок проверок повторяет приоритет CRM-статусов (`get-certificate-data`):
|
|
23
|
+
* аннулирование перекрывает всё, затем полное погашение, затем срок, затем
|
|
24
|
+
* неоплата. Частичное погашение показываем только пока остаток можно потратить.
|
|
25
|
+
*/
|
|
26
|
+
function resolveOpenapiCertificateStatus({ annul, used, usedAmount, balance, toPay, expireDate, now = new Date(), }) {
|
|
27
|
+
if (annul)
|
|
28
|
+
return OpenapiCertificateStatusEnum.ANNULLED;
|
|
29
|
+
if (used || balance <= 0)
|
|
30
|
+
return OpenapiCertificateStatusEnum.USED;
|
|
31
|
+
if (expireDate && new Date(expireDate) < now)
|
|
32
|
+
return OpenapiCertificateStatusEnum.EXPIRED;
|
|
33
|
+
if (toPay > 0)
|
|
34
|
+
return OpenapiCertificateStatusEnum.NOT_PAID;
|
|
35
|
+
if (usedAmount > 0)
|
|
36
|
+
return OpenapiCertificateStatusEnum.PARTLY_USED;
|
|
37
|
+
return OpenapiCertificateStatusEnum.ACTIVE;
|
|
38
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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.OpenapiAnnulCertificateDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class OpenapiAnnulCertificateDto {
|
|
16
|
+
}
|
|
17
|
+
exports.OpenapiAnnulCertificateDto = OpenapiAnnulCertificateDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
required: false,
|
|
21
|
+
example: 'Refunded to the customer',
|
|
22
|
+
maxLength: 500,
|
|
23
|
+
description: 'Why the certificate is being voided. Stored on the certificate and shown to the venue staff.',
|
|
24
|
+
}),
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.Length)(1, 500),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], OpenapiAnnulCertificateDto.prototype, "reason", void 0);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ProfileCurrencyEnum } from '../../profile/enum/profile-currency';
|
|
2
|
+
import { SourceEnum } from '../../shared/source.enum';
|
|
3
|
+
import { OpenapiCertificateStatusEnum } from './enum/openapi-certificate-status.enum';
|
|
4
|
+
export declare class OpenapiCertificateClientRO {
|
|
5
|
+
name: string | null;
|
|
6
|
+
surname: string | null;
|
|
7
|
+
phone: string | null;
|
|
8
|
+
email: string | null;
|
|
9
|
+
}
|
|
10
|
+
export declare class OpenapiCertificateUsageRO {
|
|
11
|
+
orderId: number;
|
|
12
|
+
amount: number;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
}
|
|
15
|
+
export declare class OpenapiCertificateRO {
|
|
16
|
+
certificateId: number;
|
|
17
|
+
code: string;
|
|
18
|
+
externalId: string | null;
|
|
19
|
+
status: OpenapiCertificateStatusEnum;
|
|
20
|
+
nominal: number;
|
|
21
|
+
usedAmount: number;
|
|
22
|
+
balance: number;
|
|
23
|
+
currency: ProfileCurrencyEnum;
|
|
24
|
+
expireDate: string;
|
|
25
|
+
maxUsages: number;
|
|
26
|
+
annulled: boolean;
|
|
27
|
+
annulledAt: Date | null;
|
|
28
|
+
annulReason: string | null;
|
|
29
|
+
source: SourceEnum;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
client: OpenapiCertificateClientRO | null;
|
|
32
|
+
usages: OpenapiCertificateUsageRO[];
|
|
33
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
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.OpenapiCertificateRO = exports.OpenapiCertificateUsageRO = exports.OpenapiCertificateClientRO = 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 profile_currency_1 = require("../../profile/enum/profile-currency");
|
|
17
|
+
const source_enum_1 = require("../../shared/source.enum");
|
|
18
|
+
const openapi_certificate_status_enum_1 = require("./enum/openapi-certificate-status.enum");
|
|
19
|
+
class OpenapiCertificateClientRO {
|
|
20
|
+
}
|
|
21
|
+
exports.OpenapiCertificateClientRO = OpenapiCertificateClientRO;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, swagger_1.ApiProperty)({ example: 'John', nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], OpenapiCertificateClientRO.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, swagger_1.ApiProperty)({ example: 'Doe', nullable: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], OpenapiCertificateClientRO.prototype, "surname", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
(0, swagger_1.ApiProperty)({ example: '+491701234567', nullable: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], OpenapiCertificateClientRO.prototype, "phone", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, swagger_1.ApiProperty)({ example: 'john@example.com', nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], OpenapiCertificateClientRO.prototype, "email", void 0);
|
|
42
|
+
class OpenapiCertificateUsageRO {
|
|
43
|
+
}
|
|
44
|
+
exports.OpenapiCertificateUsageRO = OpenapiCertificateUsageRO;
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_transformer_1.Expose)(),
|
|
47
|
+
(0, swagger_1.ApiProperty)({ example: 12345, description: 'Booking the certificate was redeemed against.' }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], OpenapiCertificateUsageRO.prototype, "orderId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
(0, swagger_1.ApiProperty)({
|
|
53
|
+
example: 3000,
|
|
54
|
+
description: 'Amount spent on that booking, in minor currency units.',
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], OpenapiCertificateUsageRO.prototype, "amount", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_transformer_1.Expose)(),
|
|
60
|
+
(0, swagger_1.ApiProperty)({ example: '2026-04-02T10:15:00.000Z' }),
|
|
61
|
+
__metadata("design:type", Date)
|
|
62
|
+
], OpenapiCertificateUsageRO.prototype, "createdAt", void 0);
|
|
63
|
+
class OpenapiCertificateRO {
|
|
64
|
+
}
|
|
65
|
+
exports.OpenapiCertificateRO = OpenapiCertificateRO;
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_transformer_1.Expose)(),
|
|
68
|
+
(0, swagger_1.ApiProperty)({ example: 987, description: 'Escape Navigator internal certificate id.' }),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], OpenapiCertificateRO.prototype, "certificateId", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_transformer_1.Expose)(),
|
|
73
|
+
(0, swagger_1.ApiProperty)({ example: 'GIFT-2026-000145', description: 'Certificate code.' }),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], OpenapiCertificateRO.prototype, "code", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_transformer_1.Expose)(),
|
|
78
|
+
(0, swagger_1.ApiProperty)({
|
|
79
|
+
example: 'partner-sale-98211',
|
|
80
|
+
nullable: true,
|
|
81
|
+
description: 'Your own identifier, passed when the certificate was created.',
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], OpenapiCertificateRO.prototype, "externalId", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_transformer_1.Expose)(),
|
|
87
|
+
(0, swagger_1.ApiProperty)({
|
|
88
|
+
enum: openapi_certificate_status_enum_1.OpenapiCertificateStatusEnum,
|
|
89
|
+
example: openapi_certificate_status_enum_1.OpenapiCertificateStatusEnum.ACTIVE,
|
|
90
|
+
description: `Redemption status:
|
|
91
|
+
- \`active\` — can be redeemed;
|
|
92
|
+
- \`partly_used\` — redeemed at least once, balance left;
|
|
93
|
+
- \`used\` — fully redeemed or usage limit reached;
|
|
94
|
+
- \`annulled\` — voided, can no longer be redeemed;
|
|
95
|
+
- \`expired\` — past its expiry date;
|
|
96
|
+
- \`not_paid\` — issued but not settled yet (never happens for certificates created through this API).`,
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], OpenapiCertificateRO.prototype, "status", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, class_transformer_1.Expose)(),
|
|
102
|
+
(0, swagger_1.ApiProperty)({
|
|
103
|
+
example: 5000,
|
|
104
|
+
description: 'Face value in minor currency units.',
|
|
105
|
+
}),
|
|
106
|
+
__metadata("design:type", Number)
|
|
107
|
+
], OpenapiCertificateRO.prototype, "nominal", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, class_transformer_1.Expose)(),
|
|
110
|
+
(0, swagger_1.ApiProperty)({
|
|
111
|
+
example: 2000,
|
|
112
|
+
description: 'Amount already spent on bookings, in minor currency units.',
|
|
113
|
+
}),
|
|
114
|
+
__metadata("design:type", Number)
|
|
115
|
+
], OpenapiCertificateRO.prototype, "usedAmount", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_transformer_1.Expose)(),
|
|
118
|
+
(0, swagger_1.ApiProperty)({
|
|
119
|
+
example: 3000,
|
|
120
|
+
description: 'Remaining spendable amount, in minor currency units.',
|
|
121
|
+
}),
|
|
122
|
+
__metadata("design:type", Number)
|
|
123
|
+
], OpenapiCertificateRO.prototype, "balance", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, class_transformer_1.Expose)(),
|
|
126
|
+
(0, swagger_1.ApiProperty)({
|
|
127
|
+
enum: profile_currency_1.ProfileCurrencyEnum,
|
|
128
|
+
example: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
129
|
+
description: 'Currency of all monetary fields.',
|
|
130
|
+
}),
|
|
131
|
+
__metadata("design:type", String)
|
|
132
|
+
], OpenapiCertificateRO.prototype, "currency", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, class_transformer_1.Expose)(),
|
|
135
|
+
(0, swagger_1.ApiProperty)({ example: '2027-08-18', description: 'Expiry date (`YYYY-MM-DD`).' }),
|
|
136
|
+
__metadata("design:type", String)
|
|
137
|
+
], OpenapiCertificateRO.prototype, "expireDate", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_transformer_1.Expose)(),
|
|
140
|
+
(0, swagger_1.ApiProperty)({ example: 1, description: 'How many redemptions the certificate allows.' }),
|
|
141
|
+
__metadata("design:type", Number)
|
|
142
|
+
], OpenapiCertificateRO.prototype, "maxUsages", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, class_transformer_1.Expose)(),
|
|
145
|
+
(0, swagger_1.ApiProperty)({ example: false, description: 'Whether the certificate has been voided.' }),
|
|
146
|
+
__metadata("design:type", Boolean)
|
|
147
|
+
], OpenapiCertificateRO.prototype, "annulled", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, class_transformer_1.Expose)(),
|
|
150
|
+
(0, swagger_1.ApiProperty)({
|
|
151
|
+
example: null,
|
|
152
|
+
nullable: true,
|
|
153
|
+
description: 'When the certificate was voided (UTC).',
|
|
154
|
+
}),
|
|
155
|
+
__metadata("design:type", Date)
|
|
156
|
+
], OpenapiCertificateRO.prototype, "annulledAt", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, class_transformer_1.Expose)(),
|
|
159
|
+
(0, swagger_1.ApiProperty)({
|
|
160
|
+
example: null,
|
|
161
|
+
nullable: true,
|
|
162
|
+
description: 'Reason supplied when the certificate was voided.',
|
|
163
|
+
}),
|
|
164
|
+
__metadata("design:type", String)
|
|
165
|
+
], OpenapiCertificateRO.prototype, "annulReason", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, class_transformer_1.Expose)(),
|
|
168
|
+
(0, swagger_1.ApiProperty)({
|
|
169
|
+
enum: source_enum_1.SourceEnum,
|
|
170
|
+
example: source_enum_1.SourceEnum.API,
|
|
171
|
+
description: 'Where the certificate originated from.',
|
|
172
|
+
}),
|
|
173
|
+
__metadata("design:type", String)
|
|
174
|
+
], OpenapiCertificateRO.prototype, "source", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, class_transformer_1.Expose)(),
|
|
177
|
+
(0, swagger_1.ApiProperty)({ example: '2026-08-18T14:05:00.000Z' }),
|
|
178
|
+
__metadata("design:type", Date)
|
|
179
|
+
], OpenapiCertificateRO.prototype, "createdAt", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, class_transformer_1.Expose)(),
|
|
182
|
+
(0, class_transformer_1.Type)(() => OpenapiCertificateClientRO),
|
|
183
|
+
(0, swagger_1.ApiProperty)({ type: () => OpenapiCertificateClientRO, nullable: true }),
|
|
184
|
+
__metadata("design:type", OpenapiCertificateClientRO)
|
|
185
|
+
], OpenapiCertificateRO.prototype, "client", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
(0, class_transformer_1.Expose)(),
|
|
188
|
+
(0, class_transformer_1.Type)(() => OpenapiCertificateUsageRO),
|
|
189
|
+
(0, swagger_1.ApiProperty)({
|
|
190
|
+
type: () => OpenapiCertificateUsageRO,
|
|
191
|
+
isArray: true,
|
|
192
|
+
description: 'Bookings the certificate has been redeemed against.',
|
|
193
|
+
}),
|
|
194
|
+
__metadata("design:type", Array)
|
|
195
|
+
], OpenapiCertificateRO.prototype, "usages", void 0);
|