@escapenavigator/types 2.0.33 → 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.
Files changed (144) hide show
  1. package/dist/admin/aggregator-order/create-aggregator-order.dto.d.ts +1 -0
  2. package/dist/agregator/agregator-questroom.ro.d.ts +2 -0
  3. package/dist/agregator/agregator-questroom.ro.js +5 -0
  4. package/dist/certificate-sale/certificate-sale.ro.d.ts +6 -0
  5. package/dist/certificate-sale/certificate-sale.ro.js +4 -0
  6. package/dist/certificate-uploaded/certificate-uploaded.ro.d.ts +1 -1
  7. package/dist/client/client-form.dto.d.ts +5 -0
  8. package/dist/client/client-form.dto.js +9 -8
  9. package/dist/client/client.ro.d.ts +13 -0
  10. package/dist/client/client.ro.js +21 -0
  11. package/dist/constants/uploading/upload-bookeo-certificate-rows.js +2 -2
  12. package/dist/constants/uploading/upload-certificate-rows.js +1 -1
  13. package/dist/location/create-location.dto.d.ts +2 -0
  14. package/dist/location/create-location.dto.js +7 -0
  15. package/dist/location/location-light.ro.d.ts +3 -1
  16. package/dist/location/location-light.ro.js +6 -1
  17. package/dist/location/update-location-for-admin.dto.d.ts +2 -0
  18. package/dist/location/update-location-for-admin.dto.js +7 -0
  19. package/dist/log/log-title.enum.d.ts +3 -0
  20. package/dist/log/log-title.enum.js +3 -0
  21. package/dist/loyalty/adjust-bonus.dto.d.ts +14 -0
  22. package/dist/loyalty/adjust-bonus.dto.js +35 -0
  23. package/dist/loyalty/assign-client-tier.dto.d.ts +9 -0
  24. package/dist/loyalty/assign-client-tier.dto.js +29 -0
  25. package/dist/loyalty/client-loyalty.ro.d.ts +30 -0
  26. package/dist/loyalty/client-loyalty.ro.js +71 -0
  27. package/dist/loyalty/enum/loyalty-bonus-type.enum.d.ts +13 -0
  28. package/dist/loyalty/enum/loyalty-bonus-type.enum.js +17 -0
  29. package/dist/loyalty/enum/loyalty-history-mode.enum.d.ts +18 -0
  30. package/dist/loyalty/enum/loyalty-history-mode.enum.js +22 -0
  31. package/dist/loyalty/enum/loyalty-metric.enum.d.ts +12 -0
  32. package/dist/loyalty/enum/loyalty-metric.enum.js +16 -0
  33. package/dist/loyalty/enum/loyalty-program-type.enum.d.ts +12 -0
  34. package/dist/loyalty/enum/loyalty-program-type.enum.js +16 -0
  35. package/dist/loyalty/enum/loyalty-stacking.enum.d.ts +14 -0
  36. package/dist/loyalty/enum/loyalty-stacking.enum.js +18 -0
  37. package/dist/loyalty/enum/loyalty-tier-color.enum.d.ts +16 -0
  38. package/dist/loyalty/enum/loyalty-tier-color.enum.js +20 -0
  39. package/dist/loyalty/enum/loyalty-tier-source.enum.d.ts +13 -0
  40. package/dist/loyalty/enum/loyalty-tier-source.enum.js +17 -0
  41. package/dist/loyalty/loyalty-bonus.ro.d.ts +20 -0
  42. package/dist/loyalty/loyalty-bonus.ro.js +55 -0
  43. package/dist/loyalty/loyalty-presets.d.ts +45 -0
  44. package/dist/loyalty/loyalty-presets.js +30 -0
  45. package/dist/loyalty/loyalty-preview.dto.d.ts +19 -0
  46. package/dist/loyalty/loyalty-preview.dto.js +64 -0
  47. package/dist/loyalty/loyalty-preview.ro.d.ts +20 -0
  48. package/dist/loyalty/loyalty-preview.ro.js +53 -0
  49. package/dist/loyalty/loyalty-settings.dto.d.ts +51 -0
  50. package/dist/loyalty/loyalty-settings.dto.js +103 -0
  51. package/dist/loyalty/loyalty-settings.ro.d.ts +33 -0
  52. package/dist/loyalty/loyalty-settings.ro.js +67 -0
  53. package/dist/loyalty/loyalty-tier.dto.d.ts +33 -0
  54. package/dist/loyalty/loyalty-tier.dto.js +69 -0
  55. package/dist/loyalty/loyalty-tier.ro.d.ts +12 -0
  56. package/dist/loyalty/loyalty-tier.ro.js +42 -0
  57. package/dist/loyalty/pay-with-bonus.dto.d.ts +10 -0
  58. package/dist/loyalty/pay-with-bonus.dto.js +36 -0
  59. package/dist/openapi/order-groups/openapi-batch-create-preorder.dto.d.ts +3 -3
  60. package/dist/openapi/orders/openapi-order.ro.d.ts +12 -0
  61. package/dist/openapi/orders/openapi-order.ro.js +8 -0
  62. package/dist/openapi/profiles/enum/openapi-certificate-status.enum.d.ts +29 -0
  63. package/dist/openapi/profiles/enum/openapi-certificate-status.enum.js +38 -0
  64. package/dist/openapi/profiles/openapi-annul-certificate.dto.d.ts +3 -0
  65. package/dist/openapi/profiles/openapi-annul-certificate.dto.js +29 -0
  66. package/dist/openapi/profiles/openapi-certificate.ro.d.ts +33 -0
  67. package/dist/openapi/profiles/openapi-certificate.ro.js +195 -0
  68. package/dist/openapi/profiles/openapi-create-certificate.dto.d.ts +24 -0
  69. package/dist/openapi/profiles/openapi-create-certificate.dto.js +208 -0
  70. package/dist/openapi/slots/openapi-widget-slot.ro.d.ts +3 -0
  71. package/dist/openapi/slots/openapi-widget-slot.ro.js +24 -2
  72. package/dist/order/order.ro.d.ts +23 -1
  73. package/dist/order/order.ro.js +19 -0
  74. package/dist/order-discount/enum/order-discount-source.enum.d.ts +10 -0
  75. package/dist/order-discount/enum/order-discount-source.enum.js +14 -0
  76. package/dist/packages/book-package.dto.d.ts +3 -0
  77. package/dist/packages/book-package.dto.js +9 -0
  78. package/dist/packages/create-package.dto.d.ts +23 -0
  79. package/dist/packages/create-package.dto.js +81 -1
  80. package/dist/packages/package-addon.dto.d.ts +5 -0
  81. package/dist/packages/package-addon.dto.js +31 -0
  82. package/dist/packages/package-audience.enum.d.ts +6 -0
  83. package/dist/packages/package-audience.enum.js +10 -0
  84. package/dist/packages/package-feature.dto.d.ts +12 -0
  85. package/dist/packages/package-feature.dto.js +41 -0
  86. package/dist/packages/package-pricing-mode.enum.d.ts +14 -0
  87. package/dist/packages/package-pricing-mode.enum.js +18 -0
  88. package/dist/packages/package.ro.d.ts +14 -0
  89. package/dist/packages/package.ro.js +48 -0
  90. package/dist/parse-results/parse-result-payload.d.ts +23 -2
  91. package/dist/profile/company-ai-context.d.ts +2 -0
  92. package/dist/profile/contacts/create-profile-contact.dto.d.ts +5 -0
  93. package/dist/profile/contacts/create-profile-contact.dto.js +2 -1
  94. package/dist/profile/marketing-automation/marketing-automation-capabilities.js +5 -2
  95. package/dist/profile/marketing-automation/marketing-automation-config.dto.d.ts +8 -2
  96. package/dist/profile/marketing-automation/marketing-automation-config.dto.js +3 -3
  97. package/dist/profile/marketing-automation/marketing-automation-timing.d.ts +2 -2
  98. package/dist/profile/marketing-automation/marketing-automation-timing.js +2 -2
  99. package/dist/profile/notification-chanel/notification-chanel-action.enum.d.ts +16 -1
  100. package/dist/profile/notification-chanel/notification-chanel-action.enum.js +21 -1
  101. package/dist/profile/notification-chanel/notification-chanel.ro.d.ts +5 -0
  102. package/dist/profile/notification-chanel/notification-chanel.ro.js +4 -0
  103. package/dist/profile/notification-chanel/test-notification-chanel.dto.d.ts +7 -2
  104. package/dist/profile/notification-chanel/test-notification-chanel.dto.js +7 -0
  105. package/dist/profile/query-admin-profile.dto.d.ts +2 -1
  106. package/dist/profile/query-admin-profile.dto.js +1 -1
  107. package/dist/questroom/questroom-ai-context.d.ts +5 -0
  108. package/dist/shared/enum/availability.enum.d.ts +11 -0
  109. package/dist/shared/enum/availability.enum.js +15 -0
  110. package/dist/slot/bulk-update-slots.dto.d.ts +2 -0
  111. package/dist/slot/bulk-update-slots.dto.js +7 -0
  112. package/dist/slot/change-template-slots-form.dto.d.ts +3 -0
  113. package/dist/slot/change-template-slots-form.dto.js +13 -0
  114. package/dist/slot/create-slot-form.dto.d.ts +2 -0
  115. package/dist/slot/create-slot-form.dto.js +7 -0
  116. package/dist/slot/create-slot.dto.d.ts +2 -0
  117. package/dist/slot/create-slot.dto.js +7 -0
  118. package/dist/slot/daily-window-range.validator.d.ts +15 -0
  119. package/dist/slot/daily-window-range.validator.js +46 -0
  120. package/dist/slot/enum/slot-discount-type.enum.d.ts +15 -0
  121. package/dist/slot/enum/slot-discount-type.enum.js +19 -0
  122. package/dist/slot/slot-autocomplite-form.dto.d.ts +2 -0
  123. package/dist/slot/slot-autocomplite-form.dto.js +7 -0
  124. package/dist/slot/slot-discount-range.validator.d.ts +10 -0
  125. package/dist/slot/slot-discount-range.validator.js +36 -0
  126. package/dist/slot/slot.ro.d.ts +10 -0
  127. package/dist/slot/update-slot-upsellings-range.dto.d.ts +17 -0
  128. package/dist/slot/update-slot-upsellings-range.dto.js +68 -0
  129. package/dist/slot/update-slot.dto.d.ts +4 -0
  130. package/dist/slot/update-slot.dto.js +14 -0
  131. package/dist/slot-template/slot-template-element.d.ts +4 -0
  132. package/dist/slot-template/slot-template-element.js +9 -0
  133. package/dist/slot-template/slot-template-flex-rule.d.ts +8 -0
  134. package/dist/slot-template/slot-template-flex-rule.js +15 -2
  135. package/dist/tsconfig.build.tsbuildinfo +1 -1
  136. package/dist/user/crud/user.ro.d.ts +3 -0
  137. package/dist/user/crud/user.ro.js +11 -0
  138. package/dist/user/current/update-current-user-notifications.dto.d.ts +7 -0
  139. package/dist/user/current/update-current-user-notifications.dto.js +13 -0
  140. package/dist/user/enum/push-order-scope.enum.d.ts +15 -0
  141. package/dist/user/enum/push-order-scope.enum.js +19 -0
  142. package/dist/widget/enum/widget-type.enum.d.ts +3 -1
  143. package/dist/widget/enum/widget-type.enum.js +2 -0
  144. package/package.json +2 -2
@@ -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);
@@ -0,0 +1,24 @@
1
+ export declare class OpenapiCertificateClientDto {
2
+ name?: string;
3
+ surname?: string;
4
+ phone?: string;
5
+ email?: string;
6
+ }
7
+ export declare class OpenapiCertificateRecipientDto {
8
+ name?: string;
9
+ surname?: string;
10
+ email?: string;
11
+ phone?: string;
12
+ message?: string;
13
+ }
14
+ export declare class OpenapiCreateCertificateDto {
15
+ code: string;
16
+ nominal: number;
17
+ expireDate?: string;
18
+ maxUsages?: number;
19
+ designId?: number;
20
+ comment?: string;
21
+ externalId?: string;
22
+ client?: OpenapiCertificateClientDto;
23
+ recipient?: OpenapiCertificateRecipientDto;
24
+ }
@@ -0,0 +1,208 @@
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.OpenapiCreateCertificateDto = exports.OpenapiCertificateRecipientDto = exports.OpenapiCertificateClientDto = void 0;
13
+ /* eslint-disable max-classes-per-file */
14
+ const swagger_1 = require("@nestjs/swagger");
15
+ const class_transformer_1 = require("class-transformer");
16
+ const class_validator_1 = require("class-validator");
17
+ class OpenapiCertificateClientDto {
18
+ }
19
+ exports.OpenapiCertificateClientDto = OpenapiCertificateClientDto;
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)({
22
+ required: false,
23
+ example: 'John',
24
+ description: "Buyer's first name.",
25
+ }),
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_validator_1.IsString)(),
28
+ __metadata("design:type", String)
29
+ ], OpenapiCertificateClientDto.prototype, "name", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({
32
+ required: false,
33
+ example: 'Doe',
34
+ description: "Buyer's last name.",
35
+ }),
36
+ (0, class_validator_1.IsOptional)(),
37
+ (0, class_validator_1.IsString)(),
38
+ __metadata("design:type", String)
39
+ ], OpenapiCertificateClientDto.prototype, "surname", void 0);
40
+ __decorate([
41
+ (0, swagger_1.ApiProperty)({
42
+ required: false,
43
+ example: '+49 151 23456789',
44
+ description: 'Buyer phone number. Used to match an existing client (dedup) before creating a new one.',
45
+ }),
46
+ (0, class_validator_1.IsOptional)(),
47
+ (0, class_validator_1.IsString)(),
48
+ __metadata("design:type", String)
49
+ ], OpenapiCertificateClientDto.prototype, "phone", void 0);
50
+ __decorate([
51
+ (0, swagger_1.ApiProperty)({
52
+ required: false,
53
+ example: 'john.doe@example.com',
54
+ description: 'Buyer email. Used to match an existing client (dedup) before creating a new one.',
55
+ }),
56
+ (0, class_validator_1.IsOptional)(),
57
+ (0, class_validator_1.IsEmail)(),
58
+ __metadata("design:type", String)
59
+ ], OpenapiCertificateClientDto.prototype, "email", void 0);
60
+ class OpenapiCertificateRecipientDto {
61
+ }
62
+ exports.OpenapiCertificateRecipientDto = OpenapiCertificateRecipientDto;
63
+ __decorate([
64
+ (0, swagger_1.ApiProperty)({ required: false, example: 'Anna' }),
65
+ (0, class_validator_1.IsOptional)(),
66
+ (0, class_validator_1.IsString)(),
67
+ __metadata("design:type", String)
68
+ ], OpenapiCertificateRecipientDto.prototype, "name", void 0);
69
+ __decorate([
70
+ (0, swagger_1.ApiProperty)({ required: false, example: 'Smith' }),
71
+ (0, class_validator_1.IsOptional)(),
72
+ (0, class_validator_1.IsString)(),
73
+ __metadata("design:type", String)
74
+ ], OpenapiCertificateRecipientDto.prototype, "surname", void 0);
75
+ __decorate([
76
+ (0, swagger_1.ApiProperty)({ required: false, example: 'anna@example.com' }),
77
+ (0, class_validator_1.IsOptional)(),
78
+ (0, class_validator_1.IsEmail)(),
79
+ __metadata("design:type", String)
80
+ ], OpenapiCertificateRecipientDto.prototype, "email", void 0);
81
+ __decorate([
82
+ (0, swagger_1.ApiProperty)({ required: false, example: '+49 151 98765432' }),
83
+ (0, class_validator_1.IsOptional)(),
84
+ (0, class_validator_1.IsString)(),
85
+ __metadata("design:type", String)
86
+ ], OpenapiCertificateRecipientDto.prototype, "phone", void 0);
87
+ __decorate([
88
+ (0, swagger_1.ApiProperty)({
89
+ required: false,
90
+ example: 'Happy birthday!',
91
+ description: 'Gift message shown to the recipient in the company CRM.',
92
+ }),
93
+ (0, class_validator_1.IsOptional)(),
94
+ (0, class_validator_1.IsString)(),
95
+ __metadata("design:type", String)
96
+ ], OpenapiCertificateRecipientDto.prototype, "message", void 0);
97
+ class OpenapiCreateCertificateDto {
98
+ }
99
+ exports.OpenapiCreateCertificateDto = OpenapiCreateCertificateDto;
100
+ __decorate([
101
+ (0, swagger_1.ApiProperty)({
102
+ example: 'GIFT-2026-000145',
103
+ minLength: 3,
104
+ maxLength: 64,
105
+ description: `The certificate code your customer will present at the venue. You own this value — Escape Navigator does not generate one.
106
+
107
+ Must be unique within your company: the request fails with \`409\` if the code is already taken by another certificate (including codes issued by the widget or the CRM).
108
+
109
+ Spaces are stripped before the code is stored, so \`1111 2222 3333 4444\` and \`1111222233334444\` are the same certificate. Staff and customers may type the code either way when redeeming it.`,
110
+ }),
111
+ (0, class_validator_1.IsString)(),
112
+ (0, class_validator_1.Length)(3, 64),
113
+ (0, class_validator_1.Matches)(/^[A-Za-z0-9][A-Za-z0-9 _.-]*$/, {
114
+ message: 'code may contain letters, digits, spaces, dot, dash and underscore only',
115
+ }),
116
+ __metadata("design:type", String)
117
+ ], OpenapiCreateCertificateDto.prototype, "code", void 0);
118
+ __decorate([
119
+ (0, swagger_1.ApiProperty)({
120
+ example: 5000,
121
+ minimum: 1,
122
+ description: "Certificate face value in minor currency units of the company's currency (e.g. 5000 = 50.00 EUR). This is the amount the holder can spend on bookings.",
123
+ }),
124
+ (0, class_validator_1.IsInt)(),
125
+ (0, class_validator_1.Min)(1),
126
+ __metadata("design:type", Number)
127
+ ], OpenapiCreateCertificateDto.prototype, "nominal", void 0);
128
+ __decorate([
129
+ (0, swagger_1.ApiProperty)({
130
+ required: false,
131
+ example: '2027-08-18',
132
+ description: 'Expiry date (`YYYY-MM-DD`). Defaults to the validity period configured in the company certificate settings.',
133
+ }),
134
+ (0, class_validator_1.IsOptional)(),
135
+ (0, class_validator_1.IsISO8601)(),
136
+ __metadata("design:type", String)
137
+ ], OpenapiCreateCertificateDto.prototype, "expireDate", void 0);
138
+ __decorate([
139
+ (0, swagger_1.ApiProperty)({
140
+ required: false,
141
+ default: 100,
142
+ example: 100,
143
+ minimum: 1,
144
+ description: `How many bookings the certificate may be spread across. Each booking spends part of the balance until the balance runs out or this limit is reached.
145
+
146
+ Defaults to \`100\`, which effectively means "until the balance is empty" — the usual behaviour for a gift card. Pass \`1\` for a single-use certificate that is written off in full on its first booking, even when the booking is cheaper than the face value.`,
147
+ }),
148
+ (0, class_validator_1.IsOptional)(),
149
+ (0, class_validator_1.IsInt)(),
150
+ (0, class_validator_1.Min)(1),
151
+ __metadata("design:type", Number)
152
+ ], OpenapiCreateCertificateDto.prototype, "maxUsages", void 0);
153
+ __decorate([
154
+ (0, swagger_1.ApiProperty)({
155
+ required: false,
156
+ example: 12,
157
+ description: 'Design from the company certificate catalogue (`GET /v2/certificate-designs` in the CRM). Only affects how the certificate is presented to staff — omit it for a plain external certificate.',
158
+ }),
159
+ (0, class_validator_1.IsOptional)(),
160
+ (0, class_validator_1.IsInt)(),
161
+ __metadata("design:type", Number)
162
+ ], OpenapiCreateCertificateDto.prototype, "designId", void 0);
163
+ __decorate([
164
+ (0, swagger_1.ApiProperty)({
165
+ required: false,
166
+ example: 'Sold in the shopping mall kiosk',
167
+ description: 'Free-text note attached to the certificate and visible to the venue staff.',
168
+ }),
169
+ (0, class_validator_1.IsOptional)(),
170
+ (0, class_validator_1.IsString)(),
171
+ __metadata("design:type", String)
172
+ ], OpenapiCreateCertificateDto.prototype, "comment", void 0);
173
+ __decorate([
174
+ (0, swagger_1.ApiProperty)({
175
+ required: false,
176
+ example: 'partner-sale-98211',
177
+ maxLength: 128,
178
+ description: `Your own identifier for this sale. Stored as-is and returned in every response and webhook.
179
+
180
+ Doubles as an idempotency key: repeating the request with the same \`externalId\` returns the already created certificate instead of creating a second one.`,
181
+ }),
182
+ (0, class_validator_1.IsOptional)(),
183
+ (0, class_validator_1.IsString)(),
184
+ (0, class_validator_1.Length)(1, 128),
185
+ __metadata("design:type", String)
186
+ ], OpenapiCreateCertificateDto.prototype, "externalId", void 0);
187
+ __decorate([
188
+ (0, swagger_1.ApiProperty)({
189
+ required: false,
190
+ type: OpenapiCertificateClientDto,
191
+ description: 'Buyer details. An existing client is reused when matched by phone/email; otherwise a new one is created. Omit it and the certificate is attached to the company API client.',
192
+ }),
193
+ (0, class_validator_1.IsOptional)(),
194
+ (0, class_validator_1.ValidateNested)(),
195
+ (0, class_transformer_1.Type)(() => OpenapiCertificateClientDto),
196
+ __metadata("design:type", OpenapiCertificateClientDto)
197
+ ], OpenapiCreateCertificateDto.prototype, "client", void 0);
198
+ __decorate([
199
+ (0, swagger_1.ApiProperty)({
200
+ required: false,
201
+ type: OpenapiCertificateRecipientDto,
202
+ description: 'Gift recipient details, when the certificate was bought as a present.',
203
+ }),
204
+ (0, class_validator_1.IsOptional)(),
205
+ (0, class_validator_1.ValidateNested)(),
206
+ (0, class_transformer_1.Type)(() => OpenapiCertificateRecipientDto),
207
+ __metadata("design:type", OpenapiCertificateRecipientDto)
208
+ ], OpenapiCreateCertificateDto.prototype, "recipient", void 0);
@@ -1,3 +1,4 @@
1
+ import { SlotDiscountTypeEnum } from '../../slot/enum/slot-discount-type.enum';
1
2
  import { OpenapiBokingRuleRO } from '../shared/openapi-booking-rule.ro';
2
3
  import { OpenapiSlotTariffRO } from './openapi-slot-tariff.ro';
3
4
  export type SlotType = 'bookeo' | 'crm' | 'myerp' | 'kvestadmin' | 'partner';
@@ -14,9 +15,11 @@ export declare class OpenapiSlotRO {
14
15
  end?: string;
15
16
  numSeatsAvailable?: number;
16
17
  discount?: number;
18
+ discountType?: SlotDiscountTypeEnum;
17
19
  onlyPhone?: boolean;
18
20
  tariff?: OpenapiSlotTariffRO;
19
21
  status?: 'bussy' | 'call' | 'free' | 'hold' | 'selected' | 'done' | 'no-resources';
20
22
  rule?: OpenapiBokingRuleRO;
21
23
  privateEvent?: boolean;
24
+ excludedUpsellingIds?: number[];
22
25
  }
@@ -14,6 +14,7 @@ exports.OpenapiSlotRO = void 0;
14
14
  /* eslint-disable max-classes-per-file */
15
15
  const swagger_1 = require("@nestjs/swagger");
16
16
  const class_transformer_1 = require("class-transformer");
17
+ const slot_discount_type_enum_1 = require("../../slot/enum/slot-discount-type.enum");
17
18
  const openapi_booking_rule_ro_1 = require("../shared/openapi-booking-rule.ro");
18
19
  const openapi_slot_tariff_ro_1 = require("./openapi-slot-tariff.ro");
19
20
  var SType;
@@ -126,13 +127,23 @@ __decorate([
126
127
  ], OpenapiSlotRO.prototype, "numSeatsAvailable", void 0);
127
128
  __decorate([
128
129
  (0, swagger_1.ApiProperty)({
129
- description: 'Discount applied to the slot, in percent.',
130
+ description: 'Discount applied to the slot. With `discountType: percent` the value is in basis points (1500 = 15%); with `discountType: fixed` it is an amount in minor currency units subtracted once per booking.',
130
131
  required: false,
131
- example: 10,
132
+ example: 1500,
132
133
  }),
133
134
  (0, class_transformer_1.Expose)(),
134
135
  __metadata("design:type", Number)
135
136
  ], OpenapiSlotRO.prototype, "discount", void 0);
137
+ __decorate([
138
+ (0, swagger_1.ApiProperty)({
139
+ description: 'How to read `discount`. Omitted for slots created before fixed discounts existed, which means `percent`.',
140
+ required: false,
141
+ enum: slot_discount_type_enum_1.SlotDiscountTypeEnum,
142
+ example: slot_discount_type_enum_1.SlotDiscountTypeEnum.PERCENT,
143
+ }),
144
+ (0, class_transformer_1.Expose)(),
145
+ __metadata("design:type", String)
146
+ ], OpenapiSlotRO.prototype, "discountType", void 0);
136
147
  __decorate([
137
148
  (0, swagger_1.ApiProperty)({
138
149
  description: 'When true, the slot can only be booked by phone (no online booking).',
@@ -182,3 +193,14 @@ __decorate([
182
193
  (0, class_transformer_1.Transform)(({ value }) => (value === undefined ? true : value)),
183
194
  __metadata("design:type", Boolean)
184
195
  ], OpenapiSlotRO.prototype, "privateEvent", void 0);
196
+ __decorate([
197
+ (0, swagger_1.ApiProperty)({
198
+ description: 'Upselling ids that must not be offered for this slot. Omitted when nothing is restricted.',
199
+ required: false,
200
+ isArray: true,
201
+ type: Number,
202
+ example: [42],
203
+ }),
204
+ (0, class_transformer_1.Expose)(),
205
+ __metadata("design:type", Array)
206
+ ], OpenapiSlotRO.prototype, "excludedUpsellingIds", void 0);
@@ -1,4 +1,6 @@
1
1
  import { ClientRO } from '../client/client.ro';
2
+ import { LoyaltyBonusRO } from '../loyalty/loyalty-bonus.ro';
3
+ import { OrderDiscountSourceEnum } from '../order-discount/enum/order-discount-source.enum';
2
4
  import { OrderPenaltyTypeEnum } from '../order-penalty/enum/order-penalty-type.enum';
3
5
  import { OrderProductRO } from '../order-product/order-product.ro';
4
6
  import { PromocodeKindEnum } from '../promocode/emun/promocode-kind.enum';
@@ -66,6 +68,12 @@ export declare class Discounts extends RO {
66
68
  reason: string;
67
69
  amount: number;
68
70
  userId: number;
71
+ /**
72
+ * Ручная скидка администратора или автоматическая по статусу клиента.
73
+ * Необязательное: этот же класс описывает скидки на продаже
74
+ * сертификата, где источник один и колонки под него нет.
75
+ */
76
+ source?: OrderDiscountSourceEnum;
69
77
  }
70
78
  export declare class PromocodeIssuer {
71
79
  id: number;
@@ -205,12 +213,20 @@ export declare class OrderRO extends RO {
205
213
  toPay: number;
206
214
  /** Реально полученные деньги. v2: payed = cashReceived. */
207
215
  cashReceived: number;
208
- /** Сумма скидок (slotDiscount + ручные). v2: уже вычтено из total. */
216
+ /** Сумма скидок (slotDiscount + ручные + по лояльности). v2: уже вычтено из total. */
209
217
  discountTotal: number;
218
+ /** Часть `discountTotal`, пришедшая от статуса клиента в программе лояльности. */
219
+ loyaltyDiscount: number;
210
220
  /** Сумма промокодов − returnedPromocode.discount. v2: уже вычтено из total. */
211
221
  promocodeTotal: number;
212
222
  /** Сумма сертификатов. v2: уже вычтено из total. */
213
223
  certificateTotal: number;
224
+ /**
225
+ * Сумма бонусов, которыми закрыта игра. v2: уже вычтено из total и,
226
+ * как сертификат, НЕ входит в `payed` — живых денег бонусы не
227
+ * приносят.
228
+ */
229
+ bonusTotal: number;
214
230
  /** Сумма допуслуг (Σ amount × count). Денорм для бейджа на слоте. */
215
231
  upsellingsTotal: number;
216
232
  /**
@@ -253,6 +269,12 @@ export declare class OrderRO extends RO {
253
269
  questroomId: number;
254
270
  certificates: Certificates[];
255
271
  uploadedCertificates: Certificates[];
272
+ /**
273
+ * Списания бонусов по этой игре. Отдельными строками, а не одной
274
+ * суммой: администратору нужно видеть, кто и когда списал, и иметь
275
+ * возможность снять конкретную операцию.
276
+ */
277
+ bonuses: LoyaltyBonusRO[];
256
278
  upsellings: Upsellings[];
257
279
  discounts: Discounts[];
258
280
  promocodes: Promocodes[];
@@ -14,6 +14,8 @@ exports.OrderRO = exports.Transactions = exports.Promocodes = exports.PromocodeI
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
16
16
  const client_ro_1 = require("../client/client.ro");
17
+ const loyalty_bonus_ro_1 = require("../loyalty/loyalty-bonus.ro");
18
+ const order_discount_source_enum_1 = require("../order-discount/enum/order-discount-source.enum");
17
19
  const order_penalty_type_enum_1 = require("../order-penalty/enum/order-penalty-type.enum");
18
20
  const order_product_ro_1 = require("../order-product/order-product.ro");
19
21
  const promocode_kind_enum_1 = require("../promocode/emun/promocode-kind.enum");
@@ -173,6 +175,10 @@ __decorate([
173
175
  (0, class_transformer_1.Expose)(),
174
176
  __metadata("design:type", Number)
175
177
  ], Discounts.prototype, "userId", void 0);
178
+ __decorate([
179
+ (0, class_transformer_1.Expose)(),
180
+ __metadata("design:type", String)
181
+ ], Discounts.prototype, "source", void 0);
176
182
  class PromocodeIssuer {
177
183
  }
178
184
  exports.PromocodeIssuer = PromocodeIssuer;
@@ -498,6 +504,10 @@ __decorate([
498
504
  (0, class_transformer_1.Expose)(),
499
505
  __metadata("design:type", Number)
500
506
  ], OrderRO.prototype, "discountTotal", void 0);
507
+ __decorate([
508
+ (0, class_transformer_1.Expose)(),
509
+ __metadata("design:type", Number)
510
+ ], OrderRO.prototype, "loyaltyDiscount", void 0);
501
511
  __decorate([
502
512
  (0, class_transformer_1.Expose)(),
503
513
  __metadata("design:type", Number)
@@ -506,6 +516,10 @@ __decorate([
506
516
  (0, class_transformer_1.Expose)(),
507
517
  __metadata("design:type", Number)
508
518
  ], OrderRO.prototype, "certificateTotal", void 0);
519
+ __decorate([
520
+ (0, class_transformer_1.Expose)(),
521
+ __metadata("design:type", Number)
522
+ ], OrderRO.prototype, "bonusTotal", void 0);
509
523
  __decorate([
510
524
  (0, class_transformer_1.Expose)(),
511
525
  __metadata("design:type", Number)
@@ -610,6 +624,11 @@ __decorate([
610
624
  (0, class_transformer_1.Type)(() => Certificates),
611
625
  __metadata("design:type", Array)
612
626
  ], OrderRO.prototype, "uploadedCertificates", void 0);
627
+ __decorate([
628
+ (0, class_transformer_1.Expose)(),
629
+ (0, class_transformer_1.Type)(() => loyalty_bonus_ro_1.LoyaltyBonusRO),
630
+ __metadata("design:type", Array)
631
+ ], OrderRO.prototype, "bonuses", void 0);
613
632
  __decorate([
614
633
  (0, class_transformer_1.Expose)(),
615
634
  (0, class_transformer_1.Type)(() => Upsellings),
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Кто поставил скидку на игру. Строка с `LOYALTY` принадлежит программе
3
+ * лояльности: её пересобирает система при каждом пересчёте чека, и
4
+ * администратор не должен править её руками — правка всё равно
5
+ * потеряется на следующем пересчёте.
6
+ */
7
+ export declare enum OrderDiscountSourceEnum {
8
+ MANUAL = "manual",
9
+ LOYALTY = "loyalty"
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderDiscountSourceEnum = void 0;
4
+ /**
5
+ * Кто поставил скидку на игру. Строка с `LOYALTY` принадлежит программе
6
+ * лояльности: её пересобирает система при каждом пересчёте чека, и
7
+ * администратор не должен править её руками — правка всё равно
8
+ * потеряется на следующем пересчёте.
9
+ */
10
+ var OrderDiscountSourceEnum;
11
+ (function (OrderDiscountSourceEnum) {
12
+ OrderDiscountSourceEnum["MANUAL"] = "manual";
13
+ OrderDiscountSourceEnum["LOYALTY"] = "loyalty";
14
+ })(OrderDiscountSourceEnum || (exports.OrderDiscountSourceEnum = OrderDiscountSourceEnum = {}));
@@ -1,3 +1,4 @@
1
+ import { PackageAddonSelectionDto } from './package-addon.dto';
1
2
  /** Выбранный клиентом слот под конкретную позицию пакета. */
2
3
  export declare class BookPackageSelectionDto {
3
4
  positionId: string;
@@ -16,6 +17,8 @@ export declare class BookPackageDto {
16
17
  selections: BookPackageSelectionDto[];
17
18
  /** Апселлы пакета, которые клиент оставил (positionId → добавить к 1-му заказу). */
18
19
  keptUpsellingPositionIds?: string[];
20
+ /** Платные допы сверх пакета («добавьте к празднику»). */
21
+ addons?: PackageAddonSelectionDto[];
19
22
  language?: string;
20
23
  comment?: string;
21
24
  /** hold текущей widget-сессии (для идемпотентности preorder). */
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.BookPackageDto = exports.BookPackageSelectionDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
+ const package_addon_dto_1 = require("./package-addon.dto");
15
16
  /** Выбранный клиентом слот под конкретную позицию пакета. */
16
17
  class BookPackageSelectionDto {
17
18
  }
@@ -90,6 +91,14 @@ __decorate([
90
91
  (0, class_transformer_1.Expose)(),
91
92
  __metadata("design:type", Array)
92
93
  ], BookPackageDto.prototype, "keptUpsellingPositionIds", void 0);
94
+ __decorate([
95
+ (0, class_validator_1.IsOptional)(),
96
+ (0, class_validator_1.IsArray)(),
97
+ (0, class_validator_1.ValidateNested)({ each: true }),
98
+ (0, class_transformer_1.Type)(() => package_addon_dto_1.PackageAddonSelectionDto),
99
+ (0, class_transformer_1.Expose)(),
100
+ __metadata("design:type", Array)
101
+ ], BookPackageDto.prototype, "addons", void 0);
93
102
  __decorate([
94
103
  (0, class_validator_1.IsOptional)(),
95
104
  (0, class_validator_1.IsString)(),