@bondsports/types 2.4.26 → 2.4.27-squad-c-2

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 (97) hide show
  1. package/dist/tsconfig.build.tsbuildinfo +1 -1
  2. package/dist/types/filters/dto/filters.dto.d.ts +4 -1
  3. package/dist/types/filters/dto/filters.dto.js.map +1 -1
  4. package/dist/types/filters/entities/Filter.d.ts +2 -0
  5. package/dist/types/filters/entities/Filter.js.map +1 -1
  6. package/dist/types/filters/types/consts.d.ts +2 -0
  7. package/dist/types/filters/types/consts.js +2 -0
  8. package/dist/types/filters/types/consts.js.map +1 -1
  9. package/dist/types/filters/types/enums/filter.enums.d.ts +2 -1
  10. package/dist/types/filters/types/enums/filter.enums.js +1 -0
  11. package/dist/types/filters/types/enums/filter.enums.js.map +1 -1
  12. package/dist/types/filters/types/interfaces/filters.interfaces.d.ts +1 -0
  13. package/dist/types/index.d.ts +1 -0
  14. package/dist/types/index.js +1 -0
  15. package/dist/types/index.js.map +1 -1
  16. package/dist/types/online-booking/index.d.ts +1 -0
  17. package/dist/types/online-booking/index.js +18 -0
  18. package/dist/types/online-booking/index.js.map +1 -0
  19. package/dist/types/online-booking/types/classes/index.d.ts +1 -0
  20. package/dist/types/online-booking/types/classes/index.js +18 -0
  21. package/dist/types/online-booking/types/classes/index.js.map +1 -0
  22. package/dist/types/online-booking/types/classes/portals.classes.d.ts +20 -0
  23. package/dist/types/online-booking/types/classes/portals.classes.js +11 -0
  24. package/dist/types/online-booking/types/classes/portals.classes.js.map +1 -0
  25. package/dist/types/online-booking/types/consts/index.d.ts +1 -0
  26. package/dist/types/online-booking/types/consts/index.js +18 -0
  27. package/dist/types/online-booking/types/consts/index.js.map +1 -0
  28. package/dist/types/online-booking/types/consts/portals.consts.d.ts +4 -0
  29. package/dist/types/online-booking/types/consts/portals.consts.js +19 -0
  30. package/dist/types/online-booking/types/consts/portals.consts.js.map +1 -0
  31. package/dist/types/online-booking/types/dto/index.d.ts +1 -0
  32. package/dist/types/online-booking/types/dto/index.js +18 -0
  33. package/dist/types/online-booking/types/dto/index.js.map +1 -0
  34. package/dist/types/online-booking/types/dto/portals.dto.d.ts +59 -0
  35. package/dist/types/online-booking/types/dto/portals.dto.js +36 -0
  36. package/dist/types/online-booking/types/dto/portals.dto.js.map +1 -0
  37. package/dist/types/online-booking/types/enums/index.d.ts +1 -0
  38. package/dist/types/online-booking/types/enums/index.js +18 -0
  39. package/dist/types/online-booking/types/enums/index.js.map +1 -0
  40. package/dist/types/online-booking/types/enums/portals.enums.d.ts +12 -0
  41. package/dist/types/online-booking/types/enums/portals.enums.js +18 -0
  42. package/dist/types/online-booking/types/enums/portals.enums.js.map +1 -0
  43. package/dist/types/online-booking/types/index.d.ts +5 -0
  44. package/dist/types/online-booking/types/index.js +22 -0
  45. package/dist/types/online-booking/types/index.js.map +1 -0
  46. package/dist/types/online-booking/types/interfaces/index.d.ts +1 -0
  47. package/dist/types/online-booking/types/interfaces/index.js +18 -0
  48. package/dist/types/online-booking/types/interfaces/index.js.map +1 -0
  49. package/dist/types/online-booking/types/interfaces/portals.interfaces.d.ts +21 -0
  50. package/dist/types/online-booking/types/interfaces/portals.interfaces.js +3 -0
  51. package/dist/types/online-booking/types/interfaces/portals.interfaces.js.map +1 -0
  52. package/dist/types/product-pricing/dto/index.d.ts +1 -0
  53. package/dist/types/product-pricing/dto/index.js +1 -0
  54. package/dist/types/product-pricing/dto/index.js.map +1 -1
  55. package/dist/types/product-pricing/dto/product-categories.dto.d.ts +44 -0
  56. package/dist/types/product-pricing/dto/product-categories.dto.js +30 -0
  57. package/dist/types/product-pricing/dto/product-categories.dto.js.map +1 -0
  58. package/dist/types/product-pricing/dto/product-pricing.dto.d.ts +5 -0
  59. package/dist/types/product-pricing/dto/product-pricing.dto.js.map +1 -1
  60. package/dist/types/product-pricing/dto/product.dto.d.ts +3 -0
  61. package/dist/types/product-pricing/dto/product.dto.js.map +1 -1
  62. package/dist/types/product-pricing/dto/rental-product.dto.d.ts +6 -0
  63. package/dist/types/product-pricing/dto/rental-product.dto.js.map +1 -1
  64. package/dist/types/product-pricing/entities/index.d.ts +1 -0
  65. package/dist/types/product-pricing/entities/index.js +1 -0
  66. package/dist/types/product-pricing/entities/index.js.map +1 -1
  67. package/dist/types/product-pricing/entities/product-category.entity.d.ts +12 -0
  68. package/dist/types/product-pricing/entities/product-category.entity.js +8 -0
  69. package/dist/types/product-pricing/entities/product-category.entity.js.map +1 -0
  70. package/dist/types/product-pricing/entities/product.entity.d.ts +4 -0
  71. package/dist/types/product-pricing/entities/product.entity.js.map +1 -1
  72. package/dist/types/product-pricing/types/consts/index.d.ts +1 -0
  73. package/dist/types/product-pricing/types/consts/index.js +1 -0
  74. package/dist/types/product-pricing/types/consts/index.js.map +1 -1
  75. package/dist/types/product-pricing/types/consts/product-category.consts.d.ts +510 -0
  76. package/dist/types/product-pricing/types/consts/product-category.consts.js +124 -0
  77. package/dist/types/product-pricing/types/consts/product-category.consts.js.map +1 -0
  78. package/dist/types/product-pricing/types/enums/index.d.ts +1 -0
  79. package/dist/types/product-pricing/types/enums/index.js +1 -0
  80. package/dist/types/product-pricing/types/enums/index.js.map +1 -1
  81. package/dist/types/product-pricing/types/enums/product-categories.enums.d.ts +8 -0
  82. package/dist/types/product-pricing/types/enums/product-categories.enums.js +13 -0
  83. package/dist/types/product-pricing/types/enums/product-categories.enums.js.map +1 -0
  84. package/dist/types/product-pricing/types/enums/product.enums.d.ts +3 -1
  85. package/dist/types/product-pricing/types/enums/product.enums.js +2 -0
  86. package/dist/types/product-pricing/types/enums/product.enums.js.map +1 -1
  87. package/dist/types/product-pricing/types/interfaces/index.d.ts +1 -0
  88. package/dist/types/product-pricing/types/interfaces/index.js +1 -0
  89. package/dist/types/product-pricing/types/interfaces/index.js.map +1 -1
  90. package/dist/types/product-pricing/types/interfaces/product-categories.interfaces.d.ts +26 -0
  91. package/dist/types/product-pricing/types/interfaces/product-categories.interfaces.js +3 -0
  92. package/dist/types/product-pricing/types/interfaces/product-categories.interfaces.js.map +1 -0
  93. package/dist/types/product-pricing/types/interfaces/product-pricing.interfaces.d.ts +5 -0
  94. package/dist/types/user/types/athlete.interfaces.d.ts +3 -1
  95. package/dist/types/user/types/user.consts.js +1 -1
  96. package/dist/types/user/types/user.consts.js.map +1 -1
  97. package/package.json +4 -3
@@ -0,0 +1,510 @@
1
+ import { TimeUnit } from '@bondsports/date-time';
2
+ import { z, ZodNumber } from 'zod';
3
+ import { ResourceSubTypeEnum, ResourceTypeEnum } from '../../../services/enums.service';
4
+ export declare const RESERVATION_SETTINGS_SCHEMA: z.ZodEffects<z.ZodObject<{
5
+ resourceTypes: z.ZodArray<z.ZodNativeEnum<typeof ResourceTypeEnum>, "atleastone">;
6
+ approvalRequired: z.ZodDefault<z.ZodBoolean>;
7
+ allowResourceSelection: z.ZodDefault<z.ZodBoolean>;
8
+ prioritizedResourceAllocation: z.ZodNullable<z.ZodRecord<z.ZodNativeEnum<typeof ResourceSubTypeEnum>, z.ZodArray<z.ZodNumber, "atleastone">>>;
9
+ bookingDurations: z.ZodEffects<z.ZodObject<{
10
+ minDuration: z.ZodObject<{
11
+ amount: z.ZodNumber;
12
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ amount?: number;
15
+ unit?: TimeUnit;
16
+ }, {
17
+ amount?: number;
18
+ unit?: TimeUnit;
19
+ }>;
20
+ maxDuration: z.ZodObject<{
21
+ amount: z.ZodNumber;
22
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ amount?: number;
25
+ unit?: TimeUnit;
26
+ }, {
27
+ amount?: number;
28
+ unit?: TimeUnit;
29
+ }>;
30
+ durationStep: z.ZodObject<{
31
+ amount: z.ZodNumber;
32
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ amount?: number;
35
+ unit?: TimeUnit;
36
+ }, {
37
+ amount?: number;
38
+ unit?: TimeUnit;
39
+ }>;
40
+ defaultDuration: z.ZodObject<{
41
+ amount: z.ZodNumber;
42
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ amount?: number;
45
+ unit?: TimeUnit;
46
+ }, {
47
+ amount?: number;
48
+ unit?: TimeUnit;
49
+ }>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ minDuration?: {
52
+ amount?: number;
53
+ unit?: TimeUnit;
54
+ };
55
+ maxDuration?: {
56
+ amount?: number;
57
+ unit?: TimeUnit;
58
+ };
59
+ durationStep?: {
60
+ amount?: number;
61
+ unit?: TimeUnit;
62
+ };
63
+ defaultDuration?: {
64
+ amount?: number;
65
+ unit?: TimeUnit;
66
+ };
67
+ }, {
68
+ minDuration?: {
69
+ amount?: number;
70
+ unit?: TimeUnit;
71
+ };
72
+ maxDuration?: {
73
+ amount?: number;
74
+ unit?: TimeUnit;
75
+ };
76
+ durationStep?: {
77
+ amount?: number;
78
+ unit?: TimeUnit;
79
+ };
80
+ defaultDuration?: {
81
+ amount?: number;
82
+ unit?: TimeUnit;
83
+ };
84
+ }>, {
85
+ minDuration?: {
86
+ amount?: number;
87
+ unit?: TimeUnit;
88
+ };
89
+ maxDuration?: {
90
+ amount?: number;
91
+ unit?: TimeUnit;
92
+ };
93
+ durationStep?: {
94
+ amount?: number;
95
+ unit?: TimeUnit;
96
+ };
97
+ defaultDuration?: {
98
+ amount?: number;
99
+ unit?: TimeUnit;
100
+ };
101
+ }, {
102
+ minDuration?: {
103
+ amount?: number;
104
+ unit?: TimeUnit;
105
+ };
106
+ maxDuration?: {
107
+ amount?: number;
108
+ unit?: TimeUnit;
109
+ };
110
+ durationStep?: {
111
+ amount?: number;
112
+ unit?: TimeUnit;
113
+ };
114
+ defaultDuration?: {
115
+ amount?: number;
116
+ unit?: TimeUnit;
117
+ };
118
+ }>;
119
+ default: z.ZodObject<{
120
+ advanceBookingWindow: z.ZodObject<{
121
+ amount: z.ZodNumber;
122
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ amount?: number;
125
+ unit?: TimeUnit;
126
+ }, {
127
+ amount?: number;
128
+ unit?: TimeUnit;
129
+ }>;
130
+ minimumBookingNotice: z.ZodObject<{
131
+ amount: z.ZodNumber;
132
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ amount?: number;
135
+ unit?: TimeUnit;
136
+ }, {
137
+ amount?: number;
138
+ unit?: TimeUnit;
139
+ }>;
140
+ maxBookingHours: z.ZodNullable<z.ZodObject<{
141
+ amount: z.ZodNumber;
142
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
143
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
144
+ amount?: number;
145
+ unit?: TimeUnit;
146
+ }, {
147
+ amount?: number;
148
+ unit?: TimeUnit;
149
+ }>>;
150
+ maxSequentialBookings: z.ZodNullable<z.ZodObject<{
151
+ amount: z.ZodNumber;
152
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
153
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
154
+ amount?: number;
155
+ unit?: TimeUnit;
156
+ }, {
157
+ amount?: number;
158
+ unit?: TimeUnit;
159
+ }>>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ advanceBookingWindow?: {
162
+ amount?: number;
163
+ unit?: TimeUnit;
164
+ };
165
+ minimumBookingNotice?: {
166
+ amount?: number;
167
+ unit?: TimeUnit;
168
+ };
169
+ maxBookingHours?: {
170
+ amount?: number;
171
+ unit?: TimeUnit;
172
+ };
173
+ maxSequentialBookings?: {
174
+ amount?: number;
175
+ unit?: TimeUnit;
176
+ };
177
+ }, {
178
+ advanceBookingWindow?: {
179
+ amount?: number;
180
+ unit?: TimeUnit;
181
+ };
182
+ minimumBookingNotice?: {
183
+ amount?: number;
184
+ unit?: TimeUnit;
185
+ };
186
+ maxBookingHours?: {
187
+ amount?: number;
188
+ unit?: TimeUnit;
189
+ };
190
+ maxSequentialBookings?: {
191
+ amount?: number;
192
+ unit?: TimeUnit;
193
+ };
194
+ }>;
195
+ memberships: z.ZodNullable<z.ZodArray<z.ZodObject<{
196
+ id: z.ZodString;
197
+ name: z.ZodString;
198
+ membershipsIds: z.ZodArray<z.ZodNumber, "atleastone">;
199
+ advanceBookingWindow: z.ZodObject<{
200
+ amount: z.ZodNumber;
201
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ amount?: number;
204
+ unit?: TimeUnit;
205
+ }, {
206
+ amount?: number;
207
+ unit?: TimeUnit;
208
+ }>;
209
+ minimumBookingNotice: z.ZodObject<{
210
+ amount: z.ZodNumber;
211
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
212
+ }, "strip", z.ZodTypeAny, {
213
+ amount?: number;
214
+ unit?: TimeUnit;
215
+ }, {
216
+ amount?: number;
217
+ unit?: TimeUnit;
218
+ }>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ name?: string;
221
+ membershipsIds?: [number, ...number[]];
222
+ id?: string;
223
+ advanceBookingWindow?: {
224
+ amount?: number;
225
+ unit?: TimeUnit;
226
+ };
227
+ minimumBookingNotice?: {
228
+ amount?: number;
229
+ unit?: TimeUnit;
230
+ };
231
+ }, {
232
+ name?: string;
233
+ membershipsIds?: [number, ...number[]];
234
+ id?: string;
235
+ advanceBookingWindow?: {
236
+ amount?: number;
237
+ unit?: TimeUnit;
238
+ };
239
+ minimumBookingNotice?: {
240
+ amount?: number;
241
+ unit?: TimeUnit;
242
+ };
243
+ }>, "atleastone">>;
244
+ }, "strip", z.ZodTypeAny, {
245
+ default?: {
246
+ advanceBookingWindow?: {
247
+ amount?: number;
248
+ unit?: TimeUnit;
249
+ };
250
+ minimumBookingNotice?: {
251
+ amount?: number;
252
+ unit?: TimeUnit;
253
+ };
254
+ maxBookingHours?: {
255
+ amount?: number;
256
+ unit?: TimeUnit;
257
+ };
258
+ maxSequentialBookings?: {
259
+ amount?: number;
260
+ unit?: TimeUnit;
261
+ };
262
+ };
263
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
264
+ approvalRequired?: boolean;
265
+ allowResourceSelection?: boolean;
266
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
267
+ bookingDurations?: {
268
+ minDuration?: {
269
+ amount?: number;
270
+ unit?: TimeUnit;
271
+ };
272
+ maxDuration?: {
273
+ amount?: number;
274
+ unit?: TimeUnit;
275
+ };
276
+ durationStep?: {
277
+ amount?: number;
278
+ unit?: TimeUnit;
279
+ };
280
+ defaultDuration?: {
281
+ amount?: number;
282
+ unit?: TimeUnit;
283
+ };
284
+ };
285
+ memberships?: [{
286
+ name?: string;
287
+ membershipsIds?: [number, ...number[]];
288
+ id?: string;
289
+ advanceBookingWindow?: {
290
+ amount?: number;
291
+ unit?: TimeUnit;
292
+ };
293
+ minimumBookingNotice?: {
294
+ amount?: number;
295
+ unit?: TimeUnit;
296
+ };
297
+ }, ...{
298
+ name?: string;
299
+ membershipsIds?: [number, ...number[]];
300
+ id?: string;
301
+ advanceBookingWindow?: {
302
+ amount?: number;
303
+ unit?: TimeUnit;
304
+ };
305
+ minimumBookingNotice?: {
306
+ amount?: number;
307
+ unit?: TimeUnit;
308
+ };
309
+ }[]];
310
+ }, {
311
+ default?: {
312
+ advanceBookingWindow?: {
313
+ amount?: number;
314
+ unit?: TimeUnit;
315
+ };
316
+ minimumBookingNotice?: {
317
+ amount?: number;
318
+ unit?: TimeUnit;
319
+ };
320
+ maxBookingHours?: {
321
+ amount?: number;
322
+ unit?: TimeUnit;
323
+ };
324
+ maxSequentialBookings?: {
325
+ amount?: number;
326
+ unit?: TimeUnit;
327
+ };
328
+ };
329
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
330
+ approvalRequired?: boolean;
331
+ allowResourceSelection?: boolean;
332
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
333
+ bookingDurations?: {
334
+ minDuration?: {
335
+ amount?: number;
336
+ unit?: TimeUnit;
337
+ };
338
+ maxDuration?: {
339
+ amount?: number;
340
+ unit?: TimeUnit;
341
+ };
342
+ durationStep?: {
343
+ amount?: number;
344
+ unit?: TimeUnit;
345
+ };
346
+ defaultDuration?: {
347
+ amount?: number;
348
+ unit?: TimeUnit;
349
+ };
350
+ };
351
+ memberships?: [{
352
+ name?: string;
353
+ membershipsIds?: [number, ...number[]];
354
+ id?: string;
355
+ advanceBookingWindow?: {
356
+ amount?: number;
357
+ unit?: TimeUnit;
358
+ };
359
+ minimumBookingNotice?: {
360
+ amount?: number;
361
+ unit?: TimeUnit;
362
+ };
363
+ }, ...{
364
+ name?: string;
365
+ membershipsIds?: [number, ...number[]];
366
+ id?: string;
367
+ advanceBookingWindow?: {
368
+ amount?: number;
369
+ unit?: TimeUnit;
370
+ };
371
+ minimumBookingNotice?: {
372
+ amount?: number;
373
+ unit?: TimeUnit;
374
+ };
375
+ }[]];
376
+ }>, {
377
+ default?: {
378
+ advanceBookingWindow?: {
379
+ amount?: number;
380
+ unit?: TimeUnit;
381
+ };
382
+ minimumBookingNotice?: {
383
+ amount?: number;
384
+ unit?: TimeUnit;
385
+ };
386
+ maxBookingHours?: {
387
+ amount?: number;
388
+ unit?: TimeUnit;
389
+ };
390
+ maxSequentialBookings?: {
391
+ amount?: number;
392
+ unit?: TimeUnit;
393
+ };
394
+ };
395
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
396
+ approvalRequired?: boolean;
397
+ allowResourceSelection?: boolean;
398
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
399
+ bookingDurations?: {
400
+ minDuration?: {
401
+ amount?: number;
402
+ unit?: TimeUnit;
403
+ };
404
+ maxDuration?: {
405
+ amount?: number;
406
+ unit?: TimeUnit;
407
+ };
408
+ durationStep?: {
409
+ amount?: number;
410
+ unit?: TimeUnit;
411
+ };
412
+ defaultDuration?: {
413
+ amount?: number;
414
+ unit?: TimeUnit;
415
+ };
416
+ };
417
+ memberships?: [{
418
+ name?: string;
419
+ membershipsIds?: [number, ...number[]];
420
+ id?: string;
421
+ advanceBookingWindow?: {
422
+ amount?: number;
423
+ unit?: TimeUnit;
424
+ };
425
+ minimumBookingNotice?: {
426
+ amount?: number;
427
+ unit?: TimeUnit;
428
+ };
429
+ }, ...{
430
+ name?: string;
431
+ membershipsIds?: [number, ...number[]];
432
+ id?: string;
433
+ advanceBookingWindow?: {
434
+ amount?: number;
435
+ unit?: TimeUnit;
436
+ };
437
+ minimumBookingNotice?: {
438
+ amount?: number;
439
+ unit?: TimeUnit;
440
+ };
441
+ }[]];
442
+ }, {
443
+ default?: {
444
+ advanceBookingWindow?: {
445
+ amount?: number;
446
+ unit?: TimeUnit;
447
+ };
448
+ minimumBookingNotice?: {
449
+ amount?: number;
450
+ unit?: TimeUnit;
451
+ };
452
+ maxBookingHours?: {
453
+ amount?: number;
454
+ unit?: TimeUnit;
455
+ };
456
+ maxSequentialBookings?: {
457
+ amount?: number;
458
+ unit?: TimeUnit;
459
+ };
460
+ };
461
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
462
+ approvalRequired?: boolean;
463
+ allowResourceSelection?: boolean;
464
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
465
+ bookingDurations?: {
466
+ minDuration?: {
467
+ amount?: number;
468
+ unit?: TimeUnit;
469
+ };
470
+ maxDuration?: {
471
+ amount?: number;
472
+ unit?: TimeUnit;
473
+ };
474
+ durationStep?: {
475
+ amount?: number;
476
+ unit?: TimeUnit;
477
+ };
478
+ defaultDuration?: {
479
+ amount?: number;
480
+ unit?: TimeUnit;
481
+ };
482
+ };
483
+ memberships?: [{
484
+ name?: string;
485
+ membershipsIds?: [number, ...number[]];
486
+ id?: string;
487
+ advanceBookingWindow?: {
488
+ amount?: number;
489
+ unit?: TimeUnit;
490
+ };
491
+ minimumBookingNotice?: {
492
+ amount?: number;
493
+ unit?: TimeUnit;
494
+ };
495
+ }, ...{
496
+ name?: string;
497
+ membershipsIds?: [number, ...number[]];
498
+ id?: string;
499
+ advanceBookingWindow?: {
500
+ amount?: number;
501
+ unit?: TimeUnit;
502
+ };
503
+ minimumBookingNotice?: {
504
+ amount?: number;
505
+ unit?: TimeUnit;
506
+ };
507
+ }[]];
508
+ }>;
509
+ export type TProductCategoryOnlineBookingSettings = z.infer<typeof RESERVATION_SETTINGS_SCHEMA>;
510
+ export declare const RESERVATION_DEFAULT_SETTINGS: TProductCategoryOnlineBookingSettings;
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RESERVATION_DEFAULT_SETTINGS = exports.RESERVATION_SETTINGS_SCHEMA = void 0;
4
+ const date_time_1 = require("@bondsports/date-time");
5
+ const zod_1 = require("zod");
6
+ const enums_service_1 = require("../../../services/enums.service");
7
+ const FIFTEEN_MINUTES = 15;
8
+ const INTEGER_SCHEMA = zod_1.z.number().int().min(1);
9
+ const DURATION_SCHEMA = zod_1.z.object({
10
+ amount: INTEGER_SCHEMA,
11
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
12
+ });
13
+ exports.RESERVATION_SETTINGS_SCHEMA = zod_1.z
14
+ .object({
15
+ resourceTypes: zod_1.z.array(zod_1.z.nativeEnum(enums_service_1.ResourceTypeEnum)).nonempty(),
16
+ approvalRequired: zod_1.z.boolean().default(true),
17
+ allowResourceSelection: zod_1.z.boolean().default(false),
18
+ prioritizedResourceAllocation: zod_1.z
19
+ .record(zod_1.z.nativeEnum(enums_service_1.ResourceSubTypeEnum), zod_1.z.array(zod_1.z.number().int().min(0)).nonempty())
20
+ .nullable(),
21
+ bookingDurations: zod_1.z
22
+ .object({
23
+ minDuration: zod_1.z.object({
24
+ amount: INTEGER_SCHEMA.min(FIFTEEN_MINUTES),
25
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
26
+ }),
27
+ maxDuration: zod_1.z.object({
28
+ amount: INTEGER_SCHEMA.min(FIFTEEN_MINUTES),
29
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
30
+ }),
31
+ durationStep: zod_1.z.object({
32
+ amount: INTEGER_SCHEMA.min(FIFTEEN_MINUTES),
33
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
34
+ }),
35
+ defaultDuration: zod_1.z.object({
36
+ amount: INTEGER_SCHEMA.min(FIFTEEN_MINUTES),
37
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
38
+ }),
39
+ })
40
+ .superRefine(({ defaultDuration, durationStep, maxDuration, minDuration }, ctx) => {
41
+ const max = (0, date_time_1.getDuration)(maxDuration.amount, maxDuration.unit, date_time_1.TimeUnit.MINUTE);
42
+ const min = (0, date_time_1.getDuration)(minDuration.amount, minDuration.unit, date_time_1.TimeUnit.MINUTE);
43
+ const defaultDurationMinutes = (0, date_time_1.getDuration)(defaultDuration.amount, defaultDuration.unit, date_time_1.TimeUnit.MINUTE);
44
+ const durationStepMinutes = (0, date_time_1.getDuration)(durationStep.amount, durationStep.unit, date_time_1.TimeUnit.MINUTE);
45
+ if ((defaultDurationMinutes !== min || defaultDurationMinutes !== max) &&
46
+ defaultDurationMinutes % durationStepMinutes !== 0) {
47
+ const unitLabel = durationStep.amount === 1 ? durationStep.unit : `${durationStep.unit}s`;
48
+ ctx.addIssue({
49
+ code: zod_1.z.ZodIssueCode.custom,
50
+ message: `Default duration must be in increments of ${durationStep.amount} ${unitLabel}`,
51
+ path: ['defaultDuration'],
52
+ });
53
+ }
54
+ }),
55
+ default: zod_1.z.object({
56
+ advanceBookingWindow: zod_1.z.object({
57
+ amount: INTEGER_SCHEMA,
58
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
59
+ }),
60
+ minimumBookingNotice: zod_1.z.object({
61
+ amount: INTEGER_SCHEMA,
62
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
63
+ }),
64
+ maxBookingHours: DURATION_SCHEMA.nullable(),
65
+ maxSequentialBookings: DURATION_SCHEMA.nullable(),
66
+ }),
67
+ memberships: zod_1.z
68
+ .array(zod_1.z.object({
69
+ id: zod_1.z.string().uuid(),
70
+ name: zod_1.z.string(),
71
+ membershipsIds: zod_1.z.array(zod_1.z.number().int()).nonempty(),
72
+ advanceBookingWindow: zod_1.z.object({
73
+ amount: INTEGER_SCHEMA,
74
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
75
+ }),
76
+ minimumBookingNotice: zod_1.z.object({
77
+ amount: INTEGER_SCHEMA,
78
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
79
+ }),
80
+ }))
81
+ .nonempty()
82
+ .nullable(),
83
+ })
84
+ .superRefine((settings, ctx) => {
85
+ const membershipIds = settings.memberships?.flatMap(setting => setting.membershipsIds) ?? [];
86
+ const uniqueMembershipIds = [...new Set(membershipIds)];
87
+ });
88
+ exports.RESERVATION_DEFAULT_SETTINGS = {
89
+ default: {
90
+ advanceBookingWindow: {
91
+ amount: 14,
92
+ unit: date_time_1.TimeUnit.DAY,
93
+ },
94
+ minimumBookingNotice: {
95
+ amount: 1,
96
+ unit: date_time_1.TimeUnit.DAY,
97
+ },
98
+ maxBookingHours: null,
99
+ maxSequentialBookings: null,
100
+ },
101
+ bookingDurations: {
102
+ minDuration: {
103
+ amount: 30,
104
+ unit: date_time_1.TimeUnit.MINUTE,
105
+ },
106
+ maxDuration: {
107
+ amount: 3,
108
+ unit: date_time_1.TimeUnit.HOUR,
109
+ },
110
+ durationStep: {
111
+ amount: 30,
112
+ unit: date_time_1.TimeUnit.MINUTE,
113
+ },
114
+ defaultDuration: {
115
+ amount: 1,
116
+ unit: date_time_1.TimeUnit.HOUR,
117
+ },
118
+ },
119
+ memberships: null,
120
+ approvalRequired: true,
121
+ allowResourceSelection: true,
122
+ prioritizedResourceAllocation: null,
123
+ };
124
+ //# sourceMappingURL=product-category.consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-category.consts.js","sourceRoot":"","sources":["../../../../../src/types/product-pricing/types/consts/product-category.consts.ts"],"names":[],"mappings":";;;AAAA,qDAA8D;AAC9D,6BAAmC;AAEnC,mEAAwF;AAExF,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,MAAM,cAAc,GAAc,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAE1D,MAAM,eAAe,GAAiF,OAAC,CAAC,MAAM,CAAC;IAC9G,MAAM,EAAE,cAAc;IACtB,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAQ,CAAC;CAC5B,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,OAAC;KAC1C,MAAM,CAAC;IACP,aAAa,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,UAAU,CAAC,gCAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEjE,gBAAgB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAE3C,sBAAsB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAElD,6BAA6B,EAAE,OAAC;SAC9B,MAAM,CAAC,OAAC,CAAC,UAAU,CAAC,mCAAmB,CAAC,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;SACtF,QAAQ,EAAE;IAEZ,gBAAgB,EAAE,OAAC;SACjB,MAAM,CAAC;QACP,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACrB,MAAM,EAAE,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC;YAC3C,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAQ,CAAC;SAC5B,CAAC;QACF,WAAW,E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categories.enums';
1
2
  export * from './product.enums';
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./product-categories.enums"), exports);
17
18
  __exportStar(require("./product.enums"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/product-pricing/types/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/product-pricing/types/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,kDAAgC"}
@@ -0,0 +1,8 @@
1
+ export declare enum CategoryOrderColumnEnum {
2
+ NAME = "name",
3
+ PRODUCT_COUNT = "product_count",
4
+ /** Only for reservation categories */
5
+ APPROVAL_TYPE = "approval_type",
6
+ /** Only for reservation categories */
7
+ VIP_ENABLED = "vip_enabled"
8
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CategoryOrderColumnEnum = void 0;
4
+ var CategoryOrderColumnEnum;
5
+ (function (CategoryOrderColumnEnum) {
6
+ CategoryOrderColumnEnum["NAME"] = "name";
7
+ CategoryOrderColumnEnum["PRODUCT_COUNT"] = "product_count";
8
+ /** Only for reservation categories */
9
+ CategoryOrderColumnEnum["APPROVAL_TYPE"] = "approval_type";
10
+ /** Only for reservation categories */
11
+ CategoryOrderColumnEnum["VIP_ENABLED"] = "vip_enabled";
12
+ })(CategoryOrderColumnEnum = exports.CategoryOrderColumnEnum || (exports.CategoryOrderColumnEnum = {}));
13
+ //# sourceMappingURL=product-categories.enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-categories.enums.js","sourceRoot":"","sources":["../../../../../src/types/product-pricing/types/enums/product-categories.enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,uBASX;AATD,WAAY,uBAAuB;IAClC,wCAAa,CAAA;IACb,0DAA+B,CAAA;IAE/B,sCAAsC;IACtC,0DAA+B,CAAA;IAE/B,sCAAsC;IACtC,sDAA2B,CAAA;AAC5B,CAAC,EATW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QASlC"}
@@ -9,7 +9,9 @@ export declare enum OrderByProductEnum {
9
9
  DURATION = "duration",
10
10
  PRODUCT_SUB_TYPE = "productSubType",
11
11
  STATUS = "status",
12
- PRODUCT_STATUS = "productStatus"
12
+ PRODUCT_STATUS = "productStatus",
13
+ PRODUCT_CATEGORY = "product_category",
14
+ IS_AVAILABLE_ONLINE = "isAvailableOnline"
13
15
  }
14
16
  export declare enum ProductExpandEnum {
15
17
  PRICES = "prices",