@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,31 @@
|
|
|
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.PackageAddonSelectionDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Платная допуслуга, выбранная клиентом сверх пакета («добавьте к празднику»). */
|
|
16
|
+
class PackageAddonSelectionDto {
|
|
17
|
+
}
|
|
18
|
+
exports.PackageAddonSelectionDto = PackageAddonSelectionDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsInt)(),
|
|
21
|
+
(0, class_transformer_1.Transform)(({ value }) => +value),
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], PackageAddonSelectionDto.prototype, "upsellingId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsInt)(),
|
|
27
|
+
(0, class_validator_1.Min)(1),
|
|
28
|
+
(0, class_transformer_1.Transform)(({ value }) => (value === undefined || value === null ? 1 : +value)),
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], PackageAddonSelectionDto.prototype, "count", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PackageAudienceEnum = void 0;
|
|
4
|
+
/** Для кого пакет — используется фильтром «кто празднует» в виджете. */
|
|
5
|
+
var PackageAudienceEnum;
|
|
6
|
+
(function (PackageAudienceEnum) {
|
|
7
|
+
PackageAudienceEnum["ANY"] = "any";
|
|
8
|
+
PackageAudienceEnum["KIDS"] = "kids";
|
|
9
|
+
PackageAudienceEnum["ADULTS"] = "adults";
|
|
10
|
+
})(PackageAudienceEnum || (exports.PackageAudienceEnum = PackageAudienceEnum = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Строка чек-листа «что входит в тариф» на витрине пакета.
|
|
3
|
+
*
|
|
4
|
+
* Это чистая витрина: `included: false` рисуется зачёркнутым, чтобы клиент
|
|
5
|
+
* видел разницу между пакетами одной линейки. Состав, который реально
|
|
6
|
+
* бронируется и попадает в заказ, живёт в `PackageEntity.positions`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PackageFeatureDto {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
included: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.PackageFeatureDto = 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
|
+
/**
|
|
17
|
+
* Строка чек-листа «что входит в тариф» на витрине пакета.
|
|
18
|
+
*
|
|
19
|
+
* Это чистая витрина: `included: false` рисуется зачёркнутым, чтобы клиент
|
|
20
|
+
* видел разницу между пакетами одной линейки. Состав, который реально
|
|
21
|
+
* бронируется и попадает в заказ, живёт в `PackageEntity.positions`.
|
|
22
|
+
*/
|
|
23
|
+
class PackageFeatureDto {
|
|
24
|
+
}
|
|
25
|
+
exports.PackageFeatureDto = PackageFeatureDto;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], PackageFeatureDto.prototype, "id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, is_not_blank_1.IsNotBlank)(),
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], PackageFeatureDto.prototype, "title", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsBoolean)(),
|
|
38
|
+
(0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : true),
|
|
39
|
+
(0, class_transformer_1.Expose)(),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], PackageFeatureDto.prototype, "included", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Как считается цена пакета.
|
|
3
|
+
*
|
|
4
|
+
* `DISCOUNT` — исторический режим «комбо»: цена собирается из тарифов слотов,
|
|
5
|
+
* пакет лишь кладёт групповую скидку.
|
|
6
|
+
*
|
|
7
|
+
* `FIXED` — пакет сам является товаром с прайсом: фиксированная цена за
|
|
8
|
+
* будний/выходной день, N игроков включено, доплата за каждого сверх. Тарифы
|
|
9
|
+
* слотов при этом на итог не влияют.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum PackagePricingModeEnum {
|
|
12
|
+
DISCOUNT = "discount",
|
|
13
|
+
FIXED = "fixed"
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PackagePricingModeEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Как считается цена пакета.
|
|
6
|
+
*
|
|
7
|
+
* `DISCOUNT` — исторический режим «комбо»: цена собирается из тарифов слотов,
|
|
8
|
+
* пакет лишь кладёт групповую скидку.
|
|
9
|
+
*
|
|
10
|
+
* `FIXED` — пакет сам является товаром с прайсом: фиксированная цена за
|
|
11
|
+
* будний/выходной день, N игроков включено, доплата за каждого сверх. Тарифы
|
|
12
|
+
* слотов при этом на итог не влияют.
|
|
13
|
+
*/
|
|
14
|
+
var PackagePricingModeEnum;
|
|
15
|
+
(function (PackagePricingModeEnum) {
|
|
16
|
+
PackagePricingModeEnum["DISCOUNT"] = "discount";
|
|
17
|
+
PackagePricingModeEnum["FIXED"] = "fixed";
|
|
18
|
+
})(PackagePricingModeEnum || (exports.PackagePricingModeEnum = PackagePricingModeEnum = {}));
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { RO } from '../shared/ro-class';
|
|
2
|
+
import { PackageAudienceEnum } from './package-audience.enum';
|
|
2
3
|
import { PackageCancelScopeEnum } from './package-cancel-scope.enum';
|
|
3
4
|
import { PackageCapacityModelEnum } from './package-capacity-model.enum';
|
|
4
5
|
import { PackageDiscountTypeEnum } from './package-discount-type.enum';
|
|
6
|
+
import { PackageFeatureDto } from './package-feature.dto';
|
|
5
7
|
import { PackagePositionDto } from './package-position.dto';
|
|
8
|
+
import { PackagePricingModeEnum } from './package-pricing-mode.enum';
|
|
6
9
|
import { PackageSplitModeEnum } from './package-split-mode.enum';
|
|
7
10
|
import { PackageTimingModeEnum } from './package-timing-mode.enum';
|
|
8
11
|
export declare class PackageResponseObject extends RO {
|
|
@@ -12,6 +15,9 @@ export declare class PackageResponseObject extends RO {
|
|
|
12
15
|
photo?: string;
|
|
13
16
|
color?: string;
|
|
14
17
|
sortPosition: number;
|
|
18
|
+
badge?: string | null;
|
|
19
|
+
audience: PackageAudienceEnum;
|
|
20
|
+
features: PackageFeatureDto[];
|
|
15
21
|
availableInWidget: boolean;
|
|
16
22
|
saved: boolean;
|
|
17
23
|
activeFrom?: string | null;
|
|
@@ -32,6 +38,14 @@ export declare class PackageResponseObject extends RO {
|
|
|
32
38
|
splitMode: PackageSplitModeEnum;
|
|
33
39
|
playersMin?: number | null;
|
|
34
40
|
playersMax?: number | null;
|
|
41
|
+
pricingMode: PackagePricingModeEnum;
|
|
42
|
+
price: number;
|
|
43
|
+
weekendPrice?: number | null;
|
|
44
|
+
weekendDays: number[];
|
|
45
|
+
includedPlayers: number;
|
|
46
|
+
extraPlayerPrice: number;
|
|
47
|
+
prepayment: number;
|
|
48
|
+
addonUpsellingIds: number[];
|
|
35
49
|
discountType: PackageDiscountTypeEnum;
|
|
36
50
|
discountAmount: number;
|
|
37
51
|
salesLimit?: number | null;
|
|
@@ -12,10 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PackageResponseObject = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const ro_class_1 = require("../shared/ro-class");
|
|
15
|
+
const package_audience_enum_1 = require("./package-audience.enum");
|
|
15
16
|
const package_cancel_scope_enum_1 = require("./package-cancel-scope.enum");
|
|
16
17
|
const package_capacity_model_enum_1 = require("./package-capacity-model.enum");
|
|
17
18
|
const package_discount_type_enum_1 = require("./package-discount-type.enum");
|
|
19
|
+
const package_feature_dto_1 = require("./package-feature.dto");
|
|
18
20
|
const package_position_dto_1 = require("./package-position.dto");
|
|
21
|
+
const package_pricing_mode_enum_1 = require("./package-pricing-mode.enum");
|
|
19
22
|
const package_split_mode_enum_1 = require("./package-split-mode.enum");
|
|
20
23
|
const package_timing_mode_enum_1 = require("./package-timing-mode.enum");
|
|
21
24
|
class PackageResponseObject extends ro_class_1.RO {
|
|
@@ -45,6 +48,19 @@ __decorate([
|
|
|
45
48
|
(0, class_transformer_1.Expose)(),
|
|
46
49
|
__metadata("design:type", Number)
|
|
47
50
|
], PackageResponseObject.prototype, "sortPosition", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_transformer_1.Expose)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], PackageResponseObject.prototype, "badge", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_transformer_1.Expose)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], PackageResponseObject.prototype, "audience", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_transformer_1.Expose)(),
|
|
61
|
+
(0, class_transformer_1.Type)(() => package_feature_dto_1.PackageFeatureDto),
|
|
62
|
+
__metadata("design:type", Array)
|
|
63
|
+
], PackageResponseObject.prototype, "features", void 0);
|
|
48
64
|
__decorate([
|
|
49
65
|
(0, class_transformer_1.Expose)(),
|
|
50
66
|
__metadata("design:type", Boolean)
|
|
@@ -122,6 +138,38 @@ __decorate([
|
|
|
122
138
|
(0, class_transformer_1.Expose)(),
|
|
123
139
|
__metadata("design:type", Number)
|
|
124
140
|
], PackageResponseObject.prototype, "playersMax", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, class_transformer_1.Expose)(),
|
|
143
|
+
__metadata("design:type", String)
|
|
144
|
+
], PackageResponseObject.prototype, "pricingMode", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, class_transformer_1.Expose)(),
|
|
147
|
+
__metadata("design:type", Number)
|
|
148
|
+
], PackageResponseObject.prototype, "price", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, class_transformer_1.Expose)(),
|
|
151
|
+
__metadata("design:type", Number)
|
|
152
|
+
], PackageResponseObject.prototype, "weekendPrice", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, class_transformer_1.Expose)(),
|
|
155
|
+
__metadata("design:type", Array)
|
|
156
|
+
], PackageResponseObject.prototype, "weekendDays", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, class_transformer_1.Expose)(),
|
|
159
|
+
__metadata("design:type", Number)
|
|
160
|
+
], PackageResponseObject.prototype, "includedPlayers", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, class_transformer_1.Expose)(),
|
|
163
|
+
__metadata("design:type", Number)
|
|
164
|
+
], PackageResponseObject.prototype, "extraPlayerPrice", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, class_transformer_1.Expose)(),
|
|
167
|
+
__metadata("design:type", Number)
|
|
168
|
+
], PackageResponseObject.prototype, "prepayment", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, class_transformer_1.Expose)(),
|
|
171
|
+
__metadata("design:type", Array)
|
|
172
|
+
], PackageResponseObject.prototype, "addonUpsellingIds", void 0);
|
|
125
173
|
__decorate([
|
|
126
174
|
(0, class_transformer_1.Expose)(),
|
|
127
175
|
__metadata("design:type", String)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { QuestroomCancelationTypeEnum } from '../questroom/enum/questroom-cancelation-type.enum';
|
|
2
|
+
import { AvailabilityEnum } from '../shared/enum/availability.enum';
|
|
2
3
|
import { Languages } from '../shared/enum/languages.enum';
|
|
3
4
|
import { PrepaymentTypeEnum } from '../slot/enum/prepayment-type.enum';
|
|
4
5
|
/**
|
|
@@ -39,6 +40,7 @@ export type CompanyAiContext = {
|
|
|
39
40
|
timeZone?: string;
|
|
40
41
|
amenities: {
|
|
41
42
|
wifi: boolean;
|
|
43
|
+
airConditioning: AvailabilityEnum;
|
|
42
44
|
wardrobe: boolean;
|
|
43
45
|
freeParking: boolean;
|
|
44
46
|
parking: boolean;
|
|
@@ -6,5 +6,20 @@ export declare enum NotificationTriggerEnum {
|
|
|
6
6
|
CERTIFICATE_SALES = "certificate-sale",
|
|
7
7
|
UNASSIGNMENTS = "unassigments",
|
|
8
8
|
/** Оплата игры через orders (orders.escapenavigator) */
|
|
9
|
-
ORDER_PAID_VIA_ORDERS = "order-paid-via-orders"
|
|
9
|
+
ORDER_PAID_VIA_ORDERS = "order-paid-via-orders",
|
|
10
|
+
/**
|
|
11
|
+
* Любое изменение выпущенного сертификата: гашение в заказе, доплата или
|
|
12
|
+
* возврат, отгрузка и трек-номер, срок действия, скидки и промокоды,
|
|
13
|
+
* ручная пометка «использован». Payload несёт `changedFields` и `oldData`
|
|
14
|
+
* с прежними значениями только изменившихся полей.
|
|
15
|
+
*/
|
|
16
|
+
CERTIFICATE_UPDATED = "certificate-updated",
|
|
17
|
+
/** Аннулирование сертификата (сотрудником, клиентом или по API). */
|
|
18
|
+
CERTIFICATE_ANNUL = "certificate-annul"
|
|
10
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* События, payload которых строится вокруг продажи сертификата, а не заказа.
|
|
22
|
+
* Тест канала и UI спрашивают для них код сертификата вместо номера заказа.
|
|
23
|
+
*/
|
|
24
|
+
export declare const CERTIFICATE_NOTIFICATION_TRIGGERS: NotificationTriggerEnum[];
|
|
25
|
+
export declare const isCertificateNotificationTrigger: (trigger: NotificationTriggerEnum) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotificationTriggerEnum = void 0;
|
|
3
|
+
exports.isCertificateNotificationTrigger = exports.CERTIFICATE_NOTIFICATION_TRIGGERS = exports.NotificationTriggerEnum = void 0;
|
|
4
4
|
var NotificationTriggerEnum;
|
|
5
5
|
(function (NotificationTriggerEnum) {
|
|
6
6
|
NotificationTriggerEnum["NEW_ORDER"] = "new-order";
|
|
@@ -11,4 +11,24 @@ var NotificationTriggerEnum;
|
|
|
11
11
|
NotificationTriggerEnum["UNASSIGNMENTS"] = "unassigments";
|
|
12
12
|
/** Оплата игры через orders (orders.escapenavigator) */
|
|
13
13
|
NotificationTriggerEnum["ORDER_PAID_VIA_ORDERS"] = "order-paid-via-orders";
|
|
14
|
+
/**
|
|
15
|
+
* Любое изменение выпущенного сертификата: гашение в заказе, доплата или
|
|
16
|
+
* возврат, отгрузка и трек-номер, срок действия, скидки и промокоды,
|
|
17
|
+
* ручная пометка «использован». Payload несёт `changedFields` и `oldData`
|
|
18
|
+
* с прежними значениями только изменившихся полей.
|
|
19
|
+
*/
|
|
20
|
+
NotificationTriggerEnum["CERTIFICATE_UPDATED"] = "certificate-updated";
|
|
21
|
+
/** Аннулирование сертификата (сотрудником, клиентом или по API). */
|
|
22
|
+
NotificationTriggerEnum["CERTIFICATE_ANNUL"] = "certificate-annul";
|
|
14
23
|
})(NotificationTriggerEnum || (exports.NotificationTriggerEnum = NotificationTriggerEnum = {}));
|
|
24
|
+
/**
|
|
25
|
+
* События, payload которых строится вокруг продажи сертификата, а не заказа.
|
|
26
|
+
* Тест канала и UI спрашивают для них код сертификата вместо номера заказа.
|
|
27
|
+
*/
|
|
28
|
+
exports.CERTIFICATE_NOTIFICATION_TRIGGERS = [
|
|
29
|
+
NotificationTriggerEnum.CERTIFICATE_SALES,
|
|
30
|
+
NotificationTriggerEnum.CERTIFICATE_UPDATED,
|
|
31
|
+
NotificationTriggerEnum.CERTIFICATE_ANNUL,
|
|
32
|
+
];
|
|
33
|
+
const isCertificateNotificationTrigger = (trigger) => exports.CERTIFICATE_NOTIFICATION_TRIGGERS.includes(trigger);
|
|
34
|
+
exports.isCertificateNotificationTrigger = isCertificateNotificationTrigger;
|
|
@@ -13,4 +13,9 @@ export declare class NotificationChanelRO extends RO {
|
|
|
13
13
|
profileId: number;
|
|
14
14
|
/** Здоровье доставки — только для каналов типа WEBHOOK. */
|
|
15
15
|
health?: WebhookHealthRO;
|
|
16
|
+
/**
|
|
17
|
+
* Момент автоотключения канала после серии неудачных доставок.
|
|
18
|
+
* `null` — канал активен.
|
|
19
|
+
*/
|
|
20
|
+
disabledAt?: Date | null;
|
|
16
21
|
}
|
|
@@ -54,3 +54,7 @@ __decorate([
|
|
|
54
54
|
(0, class_transformer_1.Type)(() => webhook_health_ro_1.WebhookHealthRO),
|
|
55
55
|
__metadata("design:type", webhook_health_ro_1.WebhookHealthRO)
|
|
56
56
|
], NotificationChanelRO.prototype, "health", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_transformer_1.Expose)(),
|
|
59
|
+
__metadata("design:type", Date)
|
|
60
|
+
], NotificationChanelRO.prototype, "disabledAt", void 0);
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { NotificationTriggerEnum } from './notification-chanel-action.enum';
|
|
2
2
|
export declare class TestNotificationChanelDto {
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* ID заказа, на котором прогоняется тестовое событие. Не нужен для событий
|
|
5
|
+
* по сертификатам — там payload строится по `certificateCode`.
|
|
6
|
+
*/
|
|
7
|
+
orderId?: number;
|
|
8
|
+
/** Код сертификата для тестов событий `certificate-*`. */
|
|
9
|
+
certificateCode?: string;
|
|
5
10
|
trigger?: NotificationTriggerEnum;
|
|
6
11
|
}
|
|
@@ -17,10 +17,17 @@ class TestNotificationChanelDto {
|
|
|
17
17
|
}
|
|
18
18
|
exports.TestNotificationChanelDto = TestNotificationChanelDto;
|
|
19
19
|
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
20
21
|
(0, class_validator_1.IsInt)(),
|
|
21
22
|
(0, class_transformer_1.Expose)(),
|
|
22
23
|
__metadata("design:type", Number)
|
|
23
24
|
], TestNotificationChanelDto.prototype, "orderId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], TestNotificationChanelDto.prototype, "certificateCode", void 0);
|
|
24
31
|
__decorate([
|
|
25
32
|
(0, class_validator_1.IsOptional)(),
|
|
26
33
|
(0, class_validator_1.IsEnum)(notification_chanel_action_enum_1.NotificationTriggerEnum),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AvailabilityEnum } from '../shared/enum/availability.enum';
|
|
1
2
|
import { Languages } from '../shared/enum/languages.enum';
|
|
2
3
|
import { TagsEnum } from '../shared/enum/tags.enum';
|
|
3
4
|
import { QuestroomActorsEnum } from './enum/questroom-actors.enum';
|
|
@@ -31,6 +32,7 @@ export type QuestroomAiContext = {
|
|
|
31
32
|
prepareText?: string;
|
|
32
33
|
amenities?: {
|
|
33
34
|
wifi: boolean;
|
|
35
|
+
airConditioning: AvailabilityEnum;
|
|
34
36
|
wardrobe: boolean;
|
|
35
37
|
freeParking: boolean;
|
|
36
38
|
parking: boolean;
|
|
@@ -105,6 +107,9 @@ export type QuestroomAiIndexItem = {
|
|
|
105
107
|
currency?: string;
|
|
106
108
|
tags: TagsEnum[];
|
|
107
109
|
languages: Languages[];
|
|
110
|
+
fear: QuestroomAiScale;
|
|
111
|
+
difficulty: QuestroomAiScale;
|
|
112
|
+
teaserShort?: string;
|
|
108
113
|
isClosed: boolean;
|
|
109
114
|
shared: boolean;
|
|
110
115
|
bookableOnline: boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Общий трёхсостоянийный статус «есть / нет / неизвестно».
|
|
3
|
+
* Переиспользуется для удобств локации и других сущностей,
|
|
4
|
+
* где булево «да/нет» недостаточно — у существующих записей
|
|
5
|
+
* факт часто просто не заполнен.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum AvailabilityEnum {
|
|
8
|
+
YES = "yes",
|
|
9
|
+
NO = "no",
|
|
10
|
+
UNKNOWN = "unknown"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AvailabilityEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Общий трёхсостоянийный статус «есть / нет / неизвестно».
|
|
6
|
+
* Переиспользуется для удобств локации и других сущностей,
|
|
7
|
+
* где булево «да/нет» недостаточно — у существующих записей
|
|
8
|
+
* факт часто просто не заполнен.
|
|
9
|
+
*/
|
|
10
|
+
var AvailabilityEnum;
|
|
11
|
+
(function (AvailabilityEnum) {
|
|
12
|
+
AvailabilityEnum["YES"] = "yes";
|
|
13
|
+
AvailabilityEnum["NO"] = "no";
|
|
14
|
+
AvailabilityEnum["UNKNOWN"] = "unknown";
|
|
15
|
+
})(AvailabilityEnum || (exports.AvailabilityEnum = AvailabilityEnum = {}));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlotDiscountTypeEnum } from './enum/slot-discount-type.enum';
|
|
1
2
|
export type BulkUpdateSlotsType = 'addBreak' | 'removeBreak' | 'updatePricing';
|
|
2
3
|
export declare class BulkUpdateSlotsDto {
|
|
3
4
|
slotIds: number[];
|
|
@@ -5,4 +6,5 @@ export declare class BulkUpdateSlotsDto {
|
|
|
5
6
|
breakReason?: string;
|
|
6
7
|
tariffId?: number;
|
|
7
8
|
discount?: number;
|
|
9
|
+
discountType?: SlotDiscountTypeEnum;
|
|
8
10
|
}
|
|
@@ -13,6 +13,7 @@ exports.BulkUpdateSlotsDto = void 0;
|
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const is_not_blank_1 = require("../shared/is-not-blank");
|
|
16
|
+
const slot_discount_type_enum_1 = require("./enum/slot-discount-type.enum");
|
|
16
17
|
class BulkUpdateSlotsDto {
|
|
17
18
|
}
|
|
18
19
|
exports.BulkUpdateSlotsDto = BulkUpdateSlotsDto;
|
|
@@ -43,3 +44,9 @@ __decorate([
|
|
|
43
44
|
(0, class_transformer_1.Expose)(),
|
|
44
45
|
__metadata("design:type", Number)
|
|
45
46
|
], BulkUpdateSlotsDto.prototype, "discount", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
(0, class_validator_1.IsEnum)(slot_discount_type_enum_1.SlotDiscountTypeEnum),
|
|
50
|
+
(0, class_transformer_1.Expose)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], BulkUpdateSlotsDto.prototype, "discountType", void 0);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { CreateRuleDto } from '../slot-rule/create-rule.dto';
|
|
2
|
+
import { SlotDiscountTypeEnum } from './enum/slot-discount-type.enum';
|
|
2
3
|
export declare class ChangeTemplateSlotsFormDto extends CreateRuleDto {
|
|
3
4
|
tariffId: number;
|
|
4
5
|
onlyPhone: boolean;
|
|
5
6
|
discount: number;
|
|
7
|
+
discountType?: SlotDiscountTypeEnum;
|
|
6
8
|
variationIds?: number[];
|
|
9
|
+
excludedUpsellingIds?: number[];
|
|
7
10
|
}
|
|
@@ -13,6 +13,7 @@ exports.ChangeTemplateSlotsFormDto = void 0;
|
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const create_rule_dto_1 = require("../slot-rule/create-rule.dto");
|
|
16
|
+
const slot_discount_type_enum_1 = require("./enum/slot-discount-type.enum");
|
|
16
17
|
class ChangeTemplateSlotsFormDto extends create_rule_dto_1.CreateRuleDto {
|
|
17
18
|
}
|
|
18
19
|
exports.ChangeTemplateSlotsFormDto = ChangeTemplateSlotsFormDto;
|
|
@@ -31,9 +32,21 @@ __decorate([
|
|
|
31
32
|
(0, class_transformer_1.Expose)(),
|
|
32
33
|
__metadata("design:type", Number)
|
|
33
34
|
], ChangeTemplateSlotsFormDto.prototype, "discount", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsEnum)(slot_discount_type_enum_1.SlotDiscountTypeEnum),
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ChangeTemplateSlotsFormDto.prototype, "discountType", void 0);
|
|
34
41
|
__decorate([
|
|
35
42
|
(0, class_validator_1.IsOptional)(),
|
|
36
43
|
(0, class_validator_1.IsArray)(),
|
|
37
44
|
(0, class_transformer_1.Expose)(),
|
|
38
45
|
__metadata("design:type", Array)
|
|
39
46
|
], ChangeTemplateSlotsFormDto.prototype, "variationIds", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
(0, class_validator_1.IsArray)(),
|
|
50
|
+
(0, class_transformer_1.Expose)(),
|
|
51
|
+
__metadata("design:type", Array)
|
|
52
|
+
], ChangeTemplateSlotsFormDto.prototype, "excludedUpsellingIds", void 0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CreateRuleDto } from '../slot-rule/create-rule.dto';
|
|
2
|
+
import { SlotDiscountTypeEnum } from './enum/slot-discount-type.enum';
|
|
2
3
|
export declare class CreateSlotFormDto extends CreateRuleDto {
|
|
3
4
|
date: string;
|
|
4
5
|
start: string;
|
|
@@ -6,5 +7,6 @@ export declare class CreateSlotFormDto extends CreateRuleDto {
|
|
|
6
7
|
tariffId: number;
|
|
7
8
|
onlyPhone: boolean;
|
|
8
9
|
discount: number;
|
|
10
|
+
discountType?: SlotDiscountTypeEnum;
|
|
9
11
|
forceOnlineBooking: boolean;
|
|
10
12
|
}
|
|
@@ -14,6 +14,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const is_not_blank_1 = require("../shared/is-not-blank");
|
|
16
16
|
const create_rule_dto_1 = require("../slot-rule/create-rule.dto");
|
|
17
|
+
const slot_discount_type_enum_1 = require("./enum/slot-discount-type.enum");
|
|
17
18
|
class CreateSlotFormDto extends create_rule_dto_1.CreateRuleDto {
|
|
18
19
|
}
|
|
19
20
|
exports.CreateSlotFormDto = CreateSlotFormDto;
|
|
@@ -47,6 +48,12 @@ __decorate([
|
|
|
47
48
|
(0, class_transformer_1.Expose)(),
|
|
48
49
|
__metadata("design:type", Number)
|
|
49
50
|
], CreateSlotFormDto.prototype, "discount", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsEnum)(slot_discount_type_enum_1.SlotDiscountTypeEnum),
|
|
54
|
+
(0, class_transformer_1.Expose)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], CreateSlotFormDto.prototype, "discountType", void 0);
|
|
50
57
|
__decorate([
|
|
51
58
|
(0, class_validator_1.IsOptional)(),
|
|
52
59
|
(0, class_transformer_1.Expose)(),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlotDiscountTypeEnum } from './enum/slot-discount-type.enum';
|
|
1
2
|
export declare class CreateSlotDto {
|
|
2
3
|
date: string;
|
|
3
4
|
start: string;
|
|
@@ -6,5 +7,6 @@ export declare class CreateSlotDto {
|
|
|
6
7
|
ruleId: number;
|
|
7
8
|
onlyPhone: boolean;
|
|
8
9
|
discount: number;
|
|
10
|
+
discountType?: SlotDiscountTypeEnum;
|
|
9
11
|
forceOnlineBooking: boolean;
|
|
10
12
|
}
|
|
@@ -13,6 +13,7 @@ exports.CreateSlotDto = void 0;
|
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const is_not_blank_1 = require("../shared/is-not-blank");
|
|
16
|
+
const slot_discount_type_enum_1 = require("./enum/slot-discount-type.enum");
|
|
16
17
|
class CreateSlotDto {
|
|
17
18
|
}
|
|
18
19
|
exports.CreateSlotDto = CreateSlotDto;
|
|
@@ -51,6 +52,12 @@ __decorate([
|
|
|
51
52
|
(0, class_transformer_1.Expose)(),
|
|
52
53
|
__metadata("design:type", Number)
|
|
53
54
|
], CreateSlotDto.prototype, "discount", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsOptional)(),
|
|
57
|
+
(0, class_validator_1.IsEnum)(slot_discount_type_enum_1.SlotDiscountTypeEnum),
|
|
58
|
+
(0, class_transformer_1.Expose)(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], CreateSlotDto.prototype, "discountType", void 0);
|
|
54
61
|
__decorate([
|
|
55
62
|
(0, class_validator_1.IsOptional)(),
|
|
56
63
|
(0, class_transformer_1.Expose)(),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Окно `startTime … endTime` применяется к КАЖДОМУ дню диапазона («утренние
|
|
4
|
+
* часы всю следующую неделю»), а не как один непрерывный интервал — поэтому
|
|
5
|
+
* время сравнивается отдельно от дат (в отличие от
|
|
6
|
+
* `BreakRangeEndAfterStartConstraint`, где интервал сквозной).
|
|
7
|
+
*/
|
|
8
|
+
export declare class DailyWindowEndTimeAfterStartTimeConstraint implements ValidatorConstraintInterface {
|
|
9
|
+
validate(_value: unknown, args: ValidationArguments): boolean;
|
|
10
|
+
defaultMessage(): string;
|
|
11
|
+
}
|
|
12
|
+
export declare class DailyWindowEndDateNotBeforeStartDateConstraint implements ValidatorConstraintInterface {
|
|
13
|
+
validate(_value: unknown, args: ValidationArguments): boolean;
|
|
14
|
+
defaultMessage(): string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DailyWindowEndDateNotBeforeStartDateConstraint = exports.DailyWindowEndTimeAfterStartTimeConstraint = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
/**
|
|
12
|
+
* Окно `startTime … endTime` применяется к КАЖДОМУ дню диапазона («утренние
|
|
13
|
+
* часы всю следующую неделю»), а не как один непрерывный интервал — поэтому
|
|
14
|
+
* время сравнивается отдельно от дат (в отличие от
|
|
15
|
+
* `BreakRangeEndAfterStartConstraint`, где интервал сквозной).
|
|
16
|
+
*/
|
|
17
|
+
let DailyWindowEndTimeAfterStartTimeConstraint = class DailyWindowEndTimeAfterStartTimeConstraint {
|
|
18
|
+
validate(_value, args) {
|
|
19
|
+
const { startTime, endTime } = args.object;
|
|
20
|
+
if (!startTime || !endTime)
|
|
21
|
+
return true;
|
|
22
|
+
return startTime < endTime;
|
|
23
|
+
}
|
|
24
|
+
defaultMessage() {
|
|
25
|
+
return 'dailyWindowEndTimeMustBeAfterStartTime';
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.DailyWindowEndTimeAfterStartTimeConstraint = DailyWindowEndTimeAfterStartTimeConstraint;
|
|
29
|
+
exports.DailyWindowEndTimeAfterStartTimeConstraint = DailyWindowEndTimeAfterStartTimeConstraint = __decorate([
|
|
30
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'dailyWindowEndTimeAfterStartTime', async: false })
|
|
31
|
+
], DailyWindowEndTimeAfterStartTimeConstraint);
|
|
32
|
+
let DailyWindowEndDateNotBeforeStartDateConstraint = class DailyWindowEndDateNotBeforeStartDateConstraint {
|
|
33
|
+
validate(_value, args) {
|
|
34
|
+
const { startDate, endDate } = args.object;
|
|
35
|
+
if (!startDate || !endDate)
|
|
36
|
+
return true;
|
|
37
|
+
return startDate <= endDate;
|
|
38
|
+
}
|
|
39
|
+
defaultMessage() {
|
|
40
|
+
return 'dailyWindowEndDateMustNotBeBeforeStartDate';
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.DailyWindowEndDateNotBeforeStartDateConstraint = DailyWindowEndDateNotBeforeStartDateConstraint;
|
|
44
|
+
exports.DailyWindowEndDateNotBeforeStartDateConstraint = DailyWindowEndDateNotBeforeStartDateConstraint = __decorate([
|
|
45
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'dailyWindowEndDateNotBeforeStartDate', async: false })
|
|
46
|
+
], DailyWindowEndDateNotBeforeStartDateConstraint);
|