@escapenavigator/types 1.6.85 → 1.6.87
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/constants/currency-by-country.js +12 -12
- package/dist/order/order.ro.d.ts +0 -4
- package/dist/order/order.ro.js +0 -13
- package/dist/profile/enum/profile-currency.d.ts +8 -1
- package/dist/profile/enum/profile-currency.js +28 -1
- package/dist/slot/change-template-slots-form.dto.d.ts +2 -11
- package/dist/slot/change-template-slots-form.dto.js +2 -57
- package/dist/slot/create-slot-form.dto.d.ts +2 -11
- package/dist/slot/create-slot-form.dto.js +2 -56
- package/dist/slot/slot-autocomplite-form.dto.d.ts +2 -11
- package/dist/slot/slot-autocomplite-form.dto.js +2 -56
- package/dist/slot-rule/create-rule.dto.d.ts +4 -0
- package/dist/slot-rule/create-rule.dto.js +33 -0
- package/dist/slot-rule/defailt-rule.d.ts +3 -0
- package/dist/slot-rule/defailt-rule.js +3 -0
- package/dist/slot-rule/rule.ro.d.ts +3 -0
- package/dist/slot-rule/rule.ro.js +12 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/profile/initial-cusomization.dto.d.ts +0 -11
- package/dist/profile/initial-cusomization.dto.js +0 -63
|
@@ -4,26 +4,26 @@ exports.currencyByCountry = void 0;
|
|
|
4
4
|
const profile_currency_1 = require("../profile/enum/profile-currency");
|
|
5
5
|
const countries_enum_1 = require("../shared/enum/countries.enum");
|
|
6
6
|
exports.currencyByCountry = {
|
|
7
|
-
[countries_enum_1.CountriesEnum.RUSSIA]: profile_currency_1.ProfileCurrencyEnum.RUB,
|
|
8
|
-
[countries_enum_1.CountriesEnum.USA]: profile_currency_1.ProfileCurrencyEnum.USD,
|
|
9
7
|
[countries_enum_1.CountriesEnum.GERMANY]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
10
8
|
[countries_enum_1.CountriesEnum.AUSTRIA]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
11
|
-
[countries_enum_1.CountriesEnum.
|
|
9
|
+
[countries_enum_1.CountriesEnum.USA]: profile_currency_1.ProfileCurrencyEnum.USD,
|
|
10
|
+
[countries_enum_1.CountriesEnum.POLAND]: profile_currency_1.ProfileCurrencyEnum.PLN,
|
|
12
11
|
[countries_enum_1.CountriesEnum.FRANCE]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
13
|
-
[countries_enum_1.CountriesEnum.GREECE]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
14
|
-
[countries_enum_1.CountriesEnum.PORTUGAL]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
15
|
-
[countries_enum_1.CountriesEnum.ITALY]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
16
12
|
[countries_enum_1.CountriesEnum.SPAIN]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
13
|
+
[countries_enum_1.CountriesEnum.ITALY]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
14
|
+
[countries_enum_1.CountriesEnum.PORTUGAL]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
15
|
+
[countries_enum_1.CountriesEnum.GREECE]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
17
16
|
[countries_enum_1.CountriesEnum.ESTONIA]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
18
|
-
[countries_enum_1.CountriesEnum.
|
|
19
|
-
[countries_enum_1.CountriesEnum.SWITZERLAND]: profile_currency_1.ProfileCurrencyEnum.
|
|
20
|
-
[countries_enum_1.CountriesEnum.CZECH]: profile_currency_1.ProfileCurrencyEnum.
|
|
17
|
+
[countries_enum_1.CountriesEnum.RUSSIA]: profile_currency_1.ProfileCurrencyEnum.RUB,
|
|
18
|
+
[countries_enum_1.CountriesEnum.SWITZERLAND]: profile_currency_1.ProfileCurrencyEnum.CHF,
|
|
19
|
+
[countries_enum_1.CountriesEnum.CZECH]: profile_currency_1.ProfileCurrencyEnum.CZK,
|
|
20
|
+
[countries_enum_1.CountriesEnum.UK]: profile_currency_1.ProfileCurrencyEnum.GBP,
|
|
21
21
|
[countries_enum_1.CountriesEnum.NETHERLANDS]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
22
22
|
[countries_enum_1.CountriesEnum.FINLAND]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
23
|
-
[countries_enum_1.CountriesEnum.DENMARK]: profile_currency_1.ProfileCurrencyEnum.
|
|
23
|
+
[countries_enum_1.CountriesEnum.DENMARK]: profile_currency_1.ProfileCurrencyEnum.DKK,
|
|
24
24
|
[countries_enum_1.CountriesEnum.SLOVAKIA]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
25
|
-
[countries_enum_1.CountriesEnum.HUNGARY]: profile_currency_1.ProfileCurrencyEnum.
|
|
26
|
-
[countries_enum_1.CountriesEnum.SWEDEN]: profile_currency_1.ProfileCurrencyEnum.
|
|
25
|
+
[countries_enum_1.CountriesEnum.HUNGARY]: profile_currency_1.ProfileCurrencyEnum.HUF,
|
|
26
|
+
[countries_enum_1.CountriesEnum.SWEDEN]: profile_currency_1.ProfileCurrencyEnum.SEK,
|
|
27
27
|
[countries_enum_1.CountriesEnum.LATVIA]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
28
28
|
[countries_enum_1.CountriesEnum.BELGIUM]: profile_currency_1.ProfileCurrencyEnum.EUR,
|
|
29
29
|
};
|
package/dist/order/order.ro.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { QuestroomCancelationTypeEnum } from '../questroom/enum/questroom-cancel
|
|
|
4
4
|
import { Languages } from '../shared/enum/languages.enum';
|
|
5
5
|
import { RO } from '../shared/ro-class';
|
|
6
6
|
import { SourceEnum } from '../shared/source.enum';
|
|
7
|
-
import { PrepaymentTypeEnum } from '../slot/enum/prepayment-type.enum';
|
|
8
7
|
import { TransactionSourceEnum } from '../transaction/enum/transaction-source.enum';
|
|
9
8
|
import { TransactionTypeEnum } from '../transaction/enum/transaction-type.enum';
|
|
10
9
|
import { UserMessageResponseObject } from '../user-message/user-message.ro';
|
|
@@ -24,9 +23,6 @@ export declare class Participant {
|
|
|
24
23
|
email: string;
|
|
25
24
|
}
|
|
26
25
|
declare class Rule {
|
|
27
|
-
prepayment: number;
|
|
28
|
-
minHoursForBooking: number;
|
|
29
|
-
prepaymentType: PrepaymentTypeEnum;
|
|
30
26
|
cancelationRule: QuestroomCancelationTypeEnum;
|
|
31
27
|
minHoursForFreeCanceling: number;
|
|
32
28
|
}
|
package/dist/order/order.ro.js
CHANGED
|
@@ -19,7 +19,6 @@ const questroom_cancelation_type_enum_1 = require("../questroom/enum/questroom-c
|
|
|
19
19
|
const languages_enum_1 = require("../shared/enum/languages.enum");
|
|
20
20
|
const ro_class_1 = require("../shared/ro-class");
|
|
21
21
|
const source_enum_1 = require("../shared/source.enum");
|
|
22
|
-
const prepayment_type_enum_1 = require("../slot/enum/prepayment-type.enum");
|
|
23
22
|
const transaction_source_enum_1 = require("../transaction/enum/transaction-source.enum");
|
|
24
23
|
const transaction_type_enum_1 = require("../transaction/enum/transaction-type.enum");
|
|
25
24
|
const order_cancel_reson_enum_1 = require("./enum/order-cancel-reson.enum");
|
|
@@ -76,18 +75,6 @@ __decorate([
|
|
|
76
75
|
exports.Participant = Participant;
|
|
77
76
|
class Rule {
|
|
78
77
|
}
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, class_transformer_1.Expose)(),
|
|
81
|
-
__metadata("design:type", Number)
|
|
82
|
-
], Rule.prototype, "prepayment", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, class_transformer_1.Expose)(),
|
|
85
|
-
__metadata("design:type", Number)
|
|
86
|
-
], Rule.prototype, "minHoursForBooking", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, class_transformer_1.Expose)(),
|
|
89
|
-
__metadata("design:type", String)
|
|
90
|
-
], Rule.prototype, "prepaymentType", void 0);
|
|
91
78
|
__decorate([
|
|
92
79
|
(0, class_transformer_1.Expose)(),
|
|
93
80
|
__metadata("design:type", String)
|
|
@@ -4,6 +4,33 @@ exports.ProfileCurrencyEnum = void 0;
|
|
|
4
4
|
var ProfileCurrencyEnum;
|
|
5
5
|
(function (ProfileCurrencyEnum) {
|
|
6
6
|
ProfileCurrencyEnum["EUR"] = "EUR";
|
|
7
|
-
ProfileCurrencyEnum["RUB"] = "RUB";
|
|
8
7
|
ProfileCurrencyEnum["USD"] = "USD";
|
|
8
|
+
ProfileCurrencyEnum["RUB"] = "RUB";
|
|
9
|
+
ProfileCurrencyEnum["CHF"] = "CHF";
|
|
10
|
+
ProfileCurrencyEnum["CZK"] = "CZK";
|
|
11
|
+
ProfileCurrencyEnum["GBP"] = "GBP";
|
|
12
|
+
ProfileCurrencyEnum["PLN"] = "PLN";
|
|
13
|
+
ProfileCurrencyEnum["SEK"] = "SEK";
|
|
14
|
+
ProfileCurrencyEnum["DKK"] = "DKK";
|
|
15
|
+
ProfileCurrencyEnum["HUF"] = "HUF";
|
|
9
16
|
})(ProfileCurrencyEnum = exports.ProfileCurrencyEnum || (exports.ProfileCurrencyEnum = {}));
|
|
17
|
+
// export enum ProfileCurrencyEnum {
|
|
18
|
+
// EUR = 'EUR',
|
|
19
|
+
// RUB = 'RUB',
|
|
20
|
+
// USD = 'USD',
|
|
21
|
+
// GBP = 'GBP', // Фунт стерлингов
|
|
22
|
+
// CHF = 'CHF', // Швейцарский франк
|
|
23
|
+
// NOK = 'NOK', // Норвежская крона
|
|
24
|
+
// SEK = 'SEK', // Шведская крона
|
|
25
|
+
// DKK = 'DKK', // Датская крона
|
|
26
|
+
// CZK = 'CZK', // Чешская крона
|
|
27
|
+
// PLN = 'PLN', // Польский злотый
|
|
28
|
+
// HUF = 'HUF', // Венгерский форинт
|
|
29
|
+
// HRK = 'HRK', // Хорватская куна (до 2023 года)
|
|
30
|
+
// RON = 'RON', // Румынский лей
|
|
31
|
+
// BGN = 'BGN', // Болгарский лев
|
|
32
|
+
// RSD = 'RSD', // Сербский динар
|
|
33
|
+
// ALL = 'ALL', // Албанский лек
|
|
34
|
+
// MKD = 'MKD', // Македонский денар
|
|
35
|
+
// BAM = 'BAM', // Боснийская марка
|
|
36
|
+
// }
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare class ChangeTemplateSlotsFormDto {
|
|
1
|
+
import { CreateRuleDto } from '../slot-rule/create-rule.dto';
|
|
2
|
+
export declare class ChangeTemplateSlotsFormDto extends CreateRuleDto {
|
|
4
3
|
tariffId: number;
|
|
5
|
-
ruleId: number;
|
|
6
|
-
title: string;
|
|
7
|
-
saved: boolean;
|
|
8
|
-
prepayment: number;
|
|
9
|
-
prepaymentType: PrepaymentTypeEnum;
|
|
10
|
-
cancelationRule: QuestroomCancelationTypeEnum;
|
|
11
|
-
minHoursForFreeCanceling: number;
|
|
12
|
-
minHoursForBooking: number;
|
|
13
4
|
}
|
|
@@ -12,67 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ChangeTemplateSlotsFormDto = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const prepayment_type_enum_1 = require("./enum/prepayment-type.enum");
|
|
18
|
-
class ChangeTemplateSlotsFormDto {
|
|
15
|
+
const create_rule_dto_1 = require("../slot-rule/create-rule.dto");
|
|
16
|
+
class ChangeTemplateSlotsFormDto extends create_rule_dto_1.CreateRuleDto {
|
|
19
17
|
}
|
|
20
18
|
__decorate([
|
|
21
19
|
(0, class_validator_1.IsNumber)(),
|
|
22
20
|
(0, class_transformer_1.Expose)(),
|
|
23
21
|
__metadata("design:type", Number)
|
|
24
22
|
], ChangeTemplateSlotsFormDto.prototype, "tariffId", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, class_validator_1.IsOptional)(),
|
|
27
|
-
(0, class_transformer_1.Expose)(),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], ChangeTemplateSlotsFormDto.prototype, "ruleId", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, is_not_blank_1.IsNotBlank)(),
|
|
32
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.saved),
|
|
33
|
-
(0, class_transformer_1.Expose)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], ChangeTemplateSlotsFormDto.prototype, "title", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
38
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? false : value)),
|
|
39
|
-
(0, class_validator_1.IsBoolean)(),
|
|
40
|
-
(0, class_transformer_1.Expose)(),
|
|
41
|
-
__metadata("design:type", Boolean)
|
|
42
|
-
], ChangeTemplateSlotsFormDto.prototype, "saved", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.prepaymentType !== prepayment_type_enum_1.PrepaymentTypeEnum.NO),
|
|
45
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 50 : value)),
|
|
46
|
-
(0, class_validator_1.IsPositive)(),
|
|
47
|
-
(0, class_transformer_1.Expose)(),
|
|
48
|
-
__metadata("design:type", Number)
|
|
49
|
-
], ChangeTemplateSlotsFormDto.prototype, "prepayment", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
52
|
-
(0, class_validator_1.IsEnum)(prepayment_type_enum_1.PrepaymentTypeEnum),
|
|
53
|
-
(0, class_transformer_1.Transform)(({ value }) => value || prepayment_type_enum_1.PrepaymentTypeEnum.PERCENT),
|
|
54
|
-
(0, class_transformer_1.Expose)(),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], ChangeTemplateSlotsFormDto.prototype, "prepaymentType", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
59
|
-
(0, class_validator_1.IsEnum)(questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum),
|
|
60
|
-
(0, class_transformer_1.Transform)(({ value }) => value || questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum.FULL_PRICE),
|
|
61
|
-
(0, class_transformer_1.Expose)(),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], ChangeTemplateSlotsFormDto.prototype, "cancelationRule", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.cancelationRule !== questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum.NO),
|
|
66
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 24 : value)),
|
|
67
|
-
(0, class_validator_1.IsNumber)(),
|
|
68
|
-
(0, class_transformer_1.Expose)(),
|
|
69
|
-
__metadata("design:type", Number)
|
|
70
|
-
], ChangeTemplateSlotsFormDto.prototype, "minHoursForFreeCanceling", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
73
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 48 : value)),
|
|
74
|
-
(0, class_validator_1.IsNumber)(),
|
|
75
|
-
(0, class_transformer_1.Expose)(),
|
|
76
|
-
__metadata("design:type", Number)
|
|
77
|
-
], ChangeTemplateSlotsFormDto.prototype, "minHoursForBooking", void 0);
|
|
78
23
|
exports.ChangeTemplateSlotsFormDto = ChangeTemplateSlotsFormDto;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare class CreateSlotFormDto {
|
|
1
|
+
import { CreateRuleDto } from '../slot-rule/create-rule.dto';
|
|
2
|
+
export declare class CreateSlotFormDto extends CreateRuleDto {
|
|
4
3
|
date: string;
|
|
5
4
|
start: string;
|
|
6
5
|
questroomId: number;
|
|
7
6
|
tariffId: number;
|
|
8
|
-
ruleId: number;
|
|
9
|
-
title: string;
|
|
10
|
-
saved: boolean;
|
|
11
|
-
prepayment: number;
|
|
12
|
-
prepaymentType: PrepaymentTypeEnum;
|
|
13
|
-
cancelationRule: QuestroomCancelationTypeEnum;
|
|
14
|
-
minHoursForFreeCanceling: number;
|
|
15
|
-
minHoursForBooking: number;
|
|
16
7
|
}
|
|
@@ -12,10 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CreateSlotFormDto = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const questroom_cancelation_type_enum_1 = require("../questroom/enum/questroom-cancelation-type.enum");
|
|
16
15
|
const is_not_blank_1 = require("../shared/is-not-blank");
|
|
17
|
-
const
|
|
18
|
-
class CreateSlotFormDto {
|
|
16
|
+
const create_rule_dto_1 = require("../slot-rule/create-rule.dto");
|
|
17
|
+
class CreateSlotFormDto extends create_rule_dto_1.CreateRuleDto {
|
|
19
18
|
}
|
|
20
19
|
__decorate([
|
|
21
20
|
(0, is_not_blank_1.IsNotBlank)(),
|
|
@@ -37,57 +36,4 @@ __decorate([
|
|
|
37
36
|
(0, class_transformer_1.Expose)(),
|
|
38
37
|
__metadata("design:type", Number)
|
|
39
38
|
], CreateSlotFormDto.prototype, "tariffId", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, class_validator_1.IsOptional)(),
|
|
42
|
-
(0, class_transformer_1.Expose)(),
|
|
43
|
-
__metadata("design:type", Number)
|
|
44
|
-
], CreateSlotFormDto.prototype, "ruleId", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, is_not_blank_1.IsNotBlank)(),
|
|
47
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.saved),
|
|
48
|
-
(0, class_transformer_1.Expose)(),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], CreateSlotFormDto.prototype, "title", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
53
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? false : value)),
|
|
54
|
-
(0, class_validator_1.IsBoolean)(),
|
|
55
|
-
(0, class_transformer_1.Expose)(),
|
|
56
|
-
__metadata("design:type", Boolean)
|
|
57
|
-
], CreateSlotFormDto.prototype, "saved", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.prepaymentType !== prepayment_type_enum_1.PrepaymentTypeEnum.NO),
|
|
60
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 50 : value)),
|
|
61
|
-
(0, class_validator_1.IsPositive)(),
|
|
62
|
-
(0, class_transformer_1.Expose)(),
|
|
63
|
-
__metadata("design:type", Number)
|
|
64
|
-
], CreateSlotFormDto.prototype, "prepayment", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
67
|
-
(0, class_validator_1.IsEnum)(prepayment_type_enum_1.PrepaymentTypeEnum),
|
|
68
|
-
(0, class_transformer_1.Transform)(({ value }) => value || prepayment_type_enum_1.PrepaymentTypeEnum.PERCENT),
|
|
69
|
-
(0, class_transformer_1.Expose)(),
|
|
70
|
-
__metadata("design:type", String)
|
|
71
|
-
], CreateSlotFormDto.prototype, "prepaymentType", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
74
|
-
(0, class_validator_1.IsEnum)(questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum),
|
|
75
|
-
(0, class_transformer_1.Transform)(({ value }) => value || questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum.FULL_PRICE),
|
|
76
|
-
(0, class_transformer_1.Expose)(),
|
|
77
|
-
__metadata("design:type", String)
|
|
78
|
-
], CreateSlotFormDto.prototype, "cancelationRule", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.cancelationRule !== questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum.NO),
|
|
81
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 24 : value)),
|
|
82
|
-
(0, class_validator_1.IsNumber)(),
|
|
83
|
-
(0, class_transformer_1.Expose)(),
|
|
84
|
-
__metadata("design:type", Number)
|
|
85
|
-
], CreateSlotFormDto.prototype, "minHoursForFreeCanceling", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
88
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 48 : value)),
|
|
89
|
-
(0, class_validator_1.IsNumber)(),
|
|
90
|
-
(0, class_transformer_1.Expose)(),
|
|
91
|
-
__metadata("design:type", Number)
|
|
92
|
-
], CreateSlotFormDto.prototype, "minHoursForBooking", void 0);
|
|
93
39
|
exports.CreateSlotFormDto = CreateSlotFormDto;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare class SlotAutocompliteFormDto {
|
|
1
|
+
import { CreateRuleDto } from '../slot-rule/create-rule.dto';
|
|
2
|
+
export declare class SlotAutocompliteFormDto extends CreateRuleDto {
|
|
4
3
|
days: number[];
|
|
5
4
|
start: string;
|
|
6
5
|
end: string;
|
|
7
6
|
breakInterval: string;
|
|
8
7
|
tariffId: number;
|
|
9
|
-
ruleId: number;
|
|
10
|
-
title: string;
|
|
11
|
-
saved: boolean;
|
|
12
|
-
prepayment: number;
|
|
13
|
-
prepaymentType: PrepaymentTypeEnum;
|
|
14
|
-
cancelationRule: QuestroomCancelationTypeEnum;
|
|
15
|
-
minHoursForFreeCanceling: number;
|
|
16
|
-
minHoursForBooking: number;
|
|
17
8
|
}
|
|
@@ -12,10 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.SlotAutocompliteFormDto = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const questroom_cancelation_type_enum_1 = require("../questroom/enum/questroom-cancelation-type.enum");
|
|
16
15
|
const is_not_blank_1 = require("../shared/is-not-blank");
|
|
17
|
-
const
|
|
18
|
-
class SlotAutocompliteFormDto {
|
|
16
|
+
const create_rule_dto_1 = require("../slot-rule/create-rule.dto");
|
|
17
|
+
class SlotAutocompliteFormDto extends create_rule_dto_1.CreateRuleDto {
|
|
19
18
|
}
|
|
20
19
|
__decorate([
|
|
21
20
|
(0, class_validator_1.IsArray)(),
|
|
@@ -47,57 +46,4 @@ __decorate([
|
|
|
47
46
|
(0, class_transformer_1.Expose)(),
|
|
48
47
|
__metadata("design:type", Number)
|
|
49
48
|
], SlotAutocompliteFormDto.prototype, "tariffId", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, class_validator_1.IsOptional)(),
|
|
52
|
-
(0, class_transformer_1.Expose)(),
|
|
53
|
-
__metadata("design:type", Number)
|
|
54
|
-
], SlotAutocompliteFormDto.prototype, "ruleId", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, is_not_blank_1.IsNotBlank)(),
|
|
57
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.saved),
|
|
58
|
-
(0, class_transformer_1.Expose)(),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], SlotAutocompliteFormDto.prototype, "title", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
63
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? false : value)),
|
|
64
|
-
(0, class_validator_1.IsBoolean)(),
|
|
65
|
-
(0, class_transformer_1.Expose)(),
|
|
66
|
-
__metadata("design:type", Boolean)
|
|
67
|
-
], SlotAutocompliteFormDto.prototype, "saved", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.prepaymentType !== prepayment_type_enum_1.PrepaymentTypeEnum.NO),
|
|
70
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 50 : value)),
|
|
71
|
-
(0, class_validator_1.IsPositive)(),
|
|
72
|
-
(0, class_transformer_1.Expose)(),
|
|
73
|
-
__metadata("design:type", Number)
|
|
74
|
-
], SlotAutocompliteFormDto.prototype, "prepayment", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
77
|
-
(0, class_validator_1.IsEnum)(prepayment_type_enum_1.PrepaymentTypeEnum),
|
|
78
|
-
(0, class_transformer_1.Transform)(({ value }) => value || prepayment_type_enum_1.PrepaymentTypeEnum.PERCENT),
|
|
79
|
-
(0, class_transformer_1.Expose)(),
|
|
80
|
-
__metadata("design:type", String)
|
|
81
|
-
], SlotAutocompliteFormDto.prototype, "prepaymentType", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
84
|
-
(0, class_validator_1.IsEnum)(questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum),
|
|
85
|
-
(0, class_transformer_1.Transform)(({ value }) => value || questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum.FULL_PRICE),
|
|
86
|
-
(0, class_transformer_1.Expose)(),
|
|
87
|
-
__metadata("design:type", String)
|
|
88
|
-
], SlotAutocompliteFormDto.prototype, "cancelationRule", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId && o.cancelationRule !== questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum.NO),
|
|
91
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 24 : value)),
|
|
92
|
-
(0, class_validator_1.IsNumber)(),
|
|
93
|
-
(0, class_transformer_1.Expose)(),
|
|
94
|
-
__metadata("design:type", Number)
|
|
95
|
-
], SlotAutocompliteFormDto.prototype, "minHoursForFreeCanceling", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
98
|
-
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 48 : value)),
|
|
99
|
-
(0, class_validator_1.IsNumber)(),
|
|
100
|
-
(0, class_transformer_1.Expose)(),
|
|
101
|
-
__metadata("design:type", Number)
|
|
102
|
-
], SlotAutocompliteFormDto.prototype, "minHoursForBooking", void 0);
|
|
103
49
|
exports.SlotAutocompliteFormDto = SlotAutocompliteFormDto;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { QuestroomCancelationTypeEnum } from '../questroom/enum/questroom-cancelation-type.enum';
|
|
2
2
|
import { PrepaymentTypeEnum } from '../slot/enum/prepayment-type.enum';
|
|
3
3
|
export declare class CreateRuleDto {
|
|
4
|
+
ruleId?: number;
|
|
4
5
|
title: string;
|
|
5
6
|
saved: boolean;
|
|
6
7
|
prepayment: number;
|
|
@@ -8,4 +9,7 @@ export declare class CreateRuleDto {
|
|
|
8
9
|
cancelationRule: QuestroomCancelationTypeEnum;
|
|
9
10
|
minHoursForFreeCanceling: number;
|
|
10
11
|
minHoursForBooking: number;
|
|
12
|
+
blockingHours: number;
|
|
13
|
+
openSlotWhenUserInCalendar: boolean;
|
|
14
|
+
prepayForTourists: boolean;
|
|
11
15
|
}
|
|
@@ -18,17 +18,25 @@ const prepayment_type_enum_1 = require("../slot/enum/prepayment-type.enum");
|
|
|
18
18
|
class CreateRuleDto {
|
|
19
19
|
}
|
|
20
20
|
__decorate([
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], CreateRuleDto.prototype, "ruleId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
21
27
|
(0, is_not_blank_1.IsNotBlank)(),
|
|
22
28
|
(0, class_transformer_1.Expose)(),
|
|
23
29
|
__metadata("design:type", String)
|
|
24
30
|
], CreateRuleDto.prototype, "title", void 0);
|
|
25
31
|
__decorate([
|
|
32
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
26
33
|
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? true : value)),
|
|
27
34
|
(0, class_validator_1.IsBoolean)(),
|
|
28
35
|
(0, class_transformer_1.Expose)(),
|
|
29
36
|
__metadata("design:type", Boolean)
|
|
30
37
|
], CreateRuleDto.prototype, "saved", void 0);
|
|
31
38
|
__decorate([
|
|
39
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
32
40
|
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 5000 : value)),
|
|
33
41
|
(0, class_validator_1.ValidateIf)((o) => o.prepaymentType !== prepayment_type_enum_1.PrepaymentTypeEnum.NO),
|
|
34
42
|
(0, class_validator_1.IsPositive)(),
|
|
@@ -36,27 +44,52 @@ __decorate([
|
|
|
36
44
|
__metadata("design:type", Number)
|
|
37
45
|
], CreateRuleDto.prototype, "prepayment", void 0);
|
|
38
46
|
__decorate([
|
|
47
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
39
48
|
(0, class_validator_1.IsEnum)(prepayment_type_enum_1.PrepaymentTypeEnum),
|
|
40
49
|
(0, class_transformer_1.Transform)(({ value }) => value || prepayment_type_enum_1.PrepaymentTypeEnum.PERCENT),
|
|
41
50
|
(0, class_transformer_1.Expose)(),
|
|
42
51
|
__metadata("design:type", String)
|
|
43
52
|
], CreateRuleDto.prototype, "prepaymentType", void 0);
|
|
44
53
|
__decorate([
|
|
54
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
45
55
|
(0, class_validator_1.IsEnum)(questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum),
|
|
46
56
|
(0, class_transformer_1.Transform)(({ value }) => value || questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum.FULL_PRICE),
|
|
47
57
|
(0, class_transformer_1.Expose)(),
|
|
48
58
|
__metadata("design:type", String)
|
|
49
59
|
], CreateRuleDto.prototype, "cancelationRule", void 0);
|
|
50
60
|
__decorate([
|
|
61
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
51
62
|
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 24 : value)),
|
|
52
63
|
(0, class_validator_1.IsNumber)(),
|
|
53
64
|
(0, class_transformer_1.Expose)(),
|
|
54
65
|
__metadata("design:type", Number)
|
|
55
66
|
], CreateRuleDto.prototype, "minHoursForFreeCanceling", void 0);
|
|
56
67
|
__decorate([
|
|
68
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
57
69
|
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 48 : value)),
|
|
58
70
|
(0, class_validator_1.IsNumber)(),
|
|
59
71
|
(0, class_transformer_1.Expose)(),
|
|
60
72
|
__metadata("design:type", Number)
|
|
61
73
|
], CreateRuleDto.prototype, "minHoursForBooking", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
76
|
+
(0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 2 : value)),
|
|
77
|
+
(0, class_validator_1.IsNumber)(),
|
|
78
|
+
(0, class_transformer_1.Expose)(),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], CreateRuleDto.prototype, "blockingHours", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
83
|
+
(0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : true),
|
|
84
|
+
(0, class_validator_1.IsBoolean)(),
|
|
85
|
+
(0, class_transformer_1.Expose)(),
|
|
86
|
+
__metadata("design:type", Boolean)
|
|
87
|
+
], CreateRuleDto.prototype, "openSlotWhenUserInCalendar", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_validator_1.ValidateIf)((o) => !o.ruleId),
|
|
90
|
+
(0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
|
|
91
|
+
(0, class_validator_1.IsBoolean)(),
|
|
92
|
+
(0, class_transformer_1.Expose)(),
|
|
93
|
+
__metadata("design:type", Boolean)
|
|
94
|
+
], CreateRuleDto.prototype, "prepayForTourists", void 0);
|
|
62
95
|
exports.CreateRuleDto = CreateRuleDto;
|
|
@@ -10,4 +10,7 @@ exports.defaultRule = {
|
|
|
10
10
|
cancelationRule: questroom_cancelation_type_enum_1.QuestroomCancelationTypeEnum.MIN_PRICE,
|
|
11
11
|
minHoursForFreeCanceling: 8,
|
|
12
12
|
minHoursForBooking: 48,
|
|
13
|
+
blockingHours: 2,
|
|
14
|
+
openSlotWhenUserInCalendar: true,
|
|
15
|
+
prepayForTourists: false,
|
|
13
16
|
};
|
|
@@ -55,4 +55,16 @@ __decorate([
|
|
|
55
55
|
(0, class_transformer_1.Expose)(),
|
|
56
56
|
__metadata("design:type", Number)
|
|
57
57
|
], RuleRO.prototype, "minHoursForBooking", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_transformer_1.Expose)(),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], RuleRO.prototype, "blockingHours", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
__metadata("design:type", Boolean)
|
|
65
|
+
], RuleRO.prototype, "openSlotWhenUserInCalendar", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_transformer_1.Expose)(),
|
|
68
|
+
__metadata("design:type", Boolean)
|
|
69
|
+
], RuleRO.prototype, "prepayForTourists", void 0);
|
|
58
70
|
exports.RuleRO = RuleRO;
|