@bondsports/types 2.4.35 → 2.4.36

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 (105) 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 +17 -0
  61. package/dist/types/product-pricing/dto/product.dto.js +10 -1
  62. package/dist/types/product-pricing/dto/product.dto.js.map +1 -1
  63. package/dist/types/product-pricing/dto/rental-product.dto.d.ts +6 -0
  64. package/dist/types/product-pricing/dto/rental-product.dto.js.map +1 -1
  65. package/dist/types/product-pricing/entities/index.d.ts +1 -0
  66. package/dist/types/product-pricing/entities/index.js +1 -0
  67. package/dist/types/product-pricing/entities/index.js.map +1 -1
  68. package/dist/types/product-pricing/entities/product-category.entity.d.ts +12 -0
  69. package/dist/types/product-pricing/entities/product-category.entity.js +8 -0
  70. package/dist/types/product-pricing/entities/product-category.entity.js.map +1 -0
  71. package/dist/types/product-pricing/entities/product.entity.d.ts +4 -0
  72. package/dist/types/product-pricing/entities/product.entity.js.map +1 -1
  73. package/dist/types/product-pricing/types/consts/index.d.ts +1 -0
  74. package/dist/types/product-pricing/types/consts/index.js +1 -0
  75. package/dist/types/product-pricing/types/consts/index.js.map +1 -1
  76. package/dist/types/product-pricing/types/consts/product-category.consts.d.ts +534 -0
  77. package/dist/types/product-pricing/types/consts/product-category.consts.js +107 -0
  78. package/dist/types/product-pricing/types/consts/product-category.consts.js.map +1 -0
  79. package/dist/types/product-pricing/types/enums/index.d.ts +1 -0
  80. package/dist/types/product-pricing/types/enums/index.js +1 -0
  81. package/dist/types/product-pricing/types/enums/index.js.map +1 -1
  82. package/dist/types/product-pricing/types/enums/product-categories.enums.d.ts +12 -0
  83. package/dist/types/product-pricing/types/enums/product-categories.enums.js +17 -0
  84. package/dist/types/product-pricing/types/enums/product-categories.enums.js.map +1 -0
  85. package/dist/types/product-pricing/types/enums/product.enums.d.ts +3 -1
  86. package/dist/types/product-pricing/types/enums/product.enums.js +2 -0
  87. package/dist/types/product-pricing/types/enums/product.enums.js.map +1 -1
  88. package/dist/types/product-pricing/types/interfaces/index.d.ts +1 -0
  89. package/dist/types/product-pricing/types/interfaces/index.js +1 -0
  90. package/dist/types/product-pricing/types/interfaces/index.js.map +1 -1
  91. package/dist/types/product-pricing/types/interfaces/product-categories.interfaces.d.ts +26 -0
  92. package/dist/types/product-pricing/types/interfaces/product-categories.interfaces.js +3 -0
  93. package/dist/types/product-pricing/types/interfaces/product-categories.interfaces.js.map +1 -0
  94. package/dist/types/product-pricing/types/interfaces/product-pricing.interfaces.d.ts +9 -0
  95. package/dist/types/resources/dto/instructor.dto.d.ts +0 -1
  96. package/dist/types/resources/dto/instructor.dto.js.map +1 -1
  97. package/dist/types/resources/dto/resource.dto.d.ts +2 -0
  98. package/dist/types/resources/dto/resource.dto.js.map +1 -1
  99. package/dist/types/resources/dto/space.dto.d.ts +2 -0
  100. package/dist/types/resources/dto/space.dto.js.map +1 -1
  101. package/dist/types/resources/types/enums/resources.enums.d.ts +2 -1
  102. package/dist/types/resources/types/enums/resources.enums.js +1 -0
  103. package/dist/types/resources/types/enums/resources.enums.js.map +1 -1
  104. package/dist/types/resources/types/interfaces/resource.interfaces.d.ts +1 -0
  105. package/package.json +4 -3
@@ -0,0 +1,534 @@
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.ZodEffects<z.ZodObject<{
11
+ amount: z.ZodNumber;
12
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
13
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
14
+ amount?: number;
15
+ unit?: TimeUnit;
16
+ }, {
17
+ amount?: number;
18
+ unit?: TimeUnit;
19
+ }>, {
20
+ amount?: number;
21
+ unit?: TimeUnit;
22
+ }, {
23
+ amount?: number;
24
+ unit?: TimeUnit;
25
+ }>;
26
+ maxDuration: z.ZodEffects<z.ZodObject<{
27
+ amount: z.ZodNumber;
28
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
29
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
30
+ amount?: number;
31
+ unit?: TimeUnit;
32
+ }, {
33
+ amount?: number;
34
+ unit?: TimeUnit;
35
+ }>, {
36
+ amount?: number;
37
+ unit?: TimeUnit;
38
+ }, {
39
+ amount?: number;
40
+ unit?: TimeUnit;
41
+ }>;
42
+ durationStep: z.ZodEffects<z.ZodObject<{
43
+ amount: z.ZodNumber;
44
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
45
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
46
+ amount?: number;
47
+ unit?: TimeUnit;
48
+ }, {
49
+ amount?: number;
50
+ unit?: TimeUnit;
51
+ }>, {
52
+ amount?: number;
53
+ unit?: TimeUnit;
54
+ }, {
55
+ amount?: number;
56
+ unit?: TimeUnit;
57
+ }>;
58
+ defaultDuration: z.ZodEffects<z.ZodObject<{
59
+ amount: z.ZodNumber;
60
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
61
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
62
+ amount?: number;
63
+ unit?: TimeUnit;
64
+ }, {
65
+ amount?: number;
66
+ unit?: TimeUnit;
67
+ }>, {
68
+ amount?: number;
69
+ unit?: TimeUnit;
70
+ }, {
71
+ amount?: number;
72
+ unit?: TimeUnit;
73
+ }>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ minDuration?: {
76
+ amount?: number;
77
+ unit?: TimeUnit;
78
+ };
79
+ maxDuration?: {
80
+ amount?: number;
81
+ unit?: TimeUnit;
82
+ };
83
+ durationStep?: {
84
+ amount?: number;
85
+ unit?: TimeUnit;
86
+ };
87
+ defaultDuration?: {
88
+ amount?: number;
89
+ unit?: TimeUnit;
90
+ };
91
+ }, {
92
+ minDuration?: {
93
+ amount?: number;
94
+ unit?: TimeUnit;
95
+ };
96
+ maxDuration?: {
97
+ amount?: number;
98
+ unit?: TimeUnit;
99
+ };
100
+ durationStep?: {
101
+ amount?: number;
102
+ unit?: TimeUnit;
103
+ };
104
+ defaultDuration?: {
105
+ amount?: number;
106
+ unit?: TimeUnit;
107
+ };
108
+ }>, {
109
+ minDuration?: {
110
+ amount?: number;
111
+ unit?: TimeUnit;
112
+ };
113
+ maxDuration?: {
114
+ amount?: number;
115
+ unit?: TimeUnit;
116
+ };
117
+ durationStep?: {
118
+ amount?: number;
119
+ unit?: TimeUnit;
120
+ };
121
+ defaultDuration?: {
122
+ amount?: number;
123
+ unit?: TimeUnit;
124
+ };
125
+ }, {
126
+ minDuration?: {
127
+ amount?: number;
128
+ unit?: TimeUnit;
129
+ };
130
+ maxDuration?: {
131
+ amount?: number;
132
+ unit?: TimeUnit;
133
+ };
134
+ durationStep?: {
135
+ amount?: number;
136
+ unit?: TimeUnit;
137
+ };
138
+ defaultDuration?: {
139
+ amount?: number;
140
+ unit?: TimeUnit;
141
+ };
142
+ }>;
143
+ default: z.ZodObject<{
144
+ advanceBookingWindow: z.ZodObject<{
145
+ amount: z.ZodNumber;
146
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ amount?: number;
149
+ unit?: TimeUnit;
150
+ }, {
151
+ amount?: number;
152
+ unit?: TimeUnit;
153
+ }>;
154
+ minimumBookingNotice: z.ZodObject<{
155
+ amount: z.ZodNumber;
156
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ amount?: number;
159
+ unit?: TimeUnit;
160
+ }, {
161
+ amount?: number;
162
+ unit?: TimeUnit;
163
+ }>;
164
+ maxBookingHours: z.ZodNullable<z.ZodObject<{
165
+ amount: z.ZodNumber;
166
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
167
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
168
+ amount?: number;
169
+ unit?: TimeUnit;
170
+ }, {
171
+ amount?: number;
172
+ unit?: TimeUnit;
173
+ }>>;
174
+ maxSequentialBookings: z.ZodNullable<z.ZodObject<{
175
+ amount: z.ZodNumber;
176
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
177
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
178
+ amount?: number;
179
+ unit?: TimeUnit;
180
+ }, {
181
+ amount?: number;
182
+ unit?: TimeUnit;
183
+ }>>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ advanceBookingWindow?: {
186
+ amount?: number;
187
+ unit?: TimeUnit;
188
+ };
189
+ minimumBookingNotice?: {
190
+ amount?: number;
191
+ unit?: TimeUnit;
192
+ };
193
+ maxBookingHours?: {
194
+ amount?: number;
195
+ unit?: TimeUnit;
196
+ };
197
+ maxSequentialBookings?: {
198
+ amount?: number;
199
+ unit?: TimeUnit;
200
+ };
201
+ }, {
202
+ advanceBookingWindow?: {
203
+ amount?: number;
204
+ unit?: TimeUnit;
205
+ };
206
+ minimumBookingNotice?: {
207
+ amount?: number;
208
+ unit?: TimeUnit;
209
+ };
210
+ maxBookingHours?: {
211
+ amount?: number;
212
+ unit?: TimeUnit;
213
+ };
214
+ maxSequentialBookings?: {
215
+ amount?: number;
216
+ unit?: TimeUnit;
217
+ };
218
+ }>;
219
+ memberships: z.ZodNullable<z.ZodArray<z.ZodObject<{
220
+ id: z.ZodString;
221
+ name: z.ZodString;
222
+ membershipsIds: z.ZodArray<z.ZodNumber, "atleastone">;
223
+ advanceBookingWindow: z.ZodObject<{
224
+ amount: z.ZodNumber;
225
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
226
+ }, "strip", z.ZodTypeAny, {
227
+ amount?: number;
228
+ unit?: TimeUnit;
229
+ }, {
230
+ amount?: number;
231
+ unit?: TimeUnit;
232
+ }>;
233
+ minimumBookingNotice: z.ZodObject<{
234
+ amount: z.ZodNumber;
235
+ unit: z.ZodNativeEnum<typeof TimeUnit>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ amount?: number;
238
+ unit?: TimeUnit;
239
+ }, {
240
+ amount?: number;
241
+ unit?: TimeUnit;
242
+ }>;
243
+ }, "strip", z.ZodTypeAny, {
244
+ name?: string;
245
+ membershipsIds?: [number, ...number[]];
246
+ id?: string;
247
+ advanceBookingWindow?: {
248
+ amount?: number;
249
+ unit?: TimeUnit;
250
+ };
251
+ minimumBookingNotice?: {
252
+ amount?: number;
253
+ unit?: TimeUnit;
254
+ };
255
+ }, {
256
+ name?: string;
257
+ membershipsIds?: [number, ...number[]];
258
+ id?: string;
259
+ advanceBookingWindow?: {
260
+ amount?: number;
261
+ unit?: TimeUnit;
262
+ };
263
+ minimumBookingNotice?: {
264
+ amount?: number;
265
+ unit?: TimeUnit;
266
+ };
267
+ }>, "atleastone">>;
268
+ }, "strip", z.ZodTypeAny, {
269
+ default?: {
270
+ advanceBookingWindow?: {
271
+ amount?: number;
272
+ unit?: TimeUnit;
273
+ };
274
+ minimumBookingNotice?: {
275
+ amount?: number;
276
+ unit?: TimeUnit;
277
+ };
278
+ maxBookingHours?: {
279
+ amount?: number;
280
+ unit?: TimeUnit;
281
+ };
282
+ maxSequentialBookings?: {
283
+ amount?: number;
284
+ unit?: TimeUnit;
285
+ };
286
+ };
287
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
288
+ approvalRequired?: boolean;
289
+ allowResourceSelection?: boolean;
290
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
291
+ bookingDurations?: {
292
+ minDuration?: {
293
+ amount?: number;
294
+ unit?: TimeUnit;
295
+ };
296
+ maxDuration?: {
297
+ amount?: number;
298
+ unit?: TimeUnit;
299
+ };
300
+ durationStep?: {
301
+ amount?: number;
302
+ unit?: TimeUnit;
303
+ };
304
+ defaultDuration?: {
305
+ amount?: number;
306
+ unit?: TimeUnit;
307
+ };
308
+ };
309
+ memberships?: [{
310
+ name?: string;
311
+ membershipsIds?: [number, ...number[]];
312
+ id?: string;
313
+ advanceBookingWindow?: {
314
+ amount?: number;
315
+ unit?: TimeUnit;
316
+ };
317
+ minimumBookingNotice?: {
318
+ amount?: number;
319
+ unit?: TimeUnit;
320
+ };
321
+ }, ...{
322
+ name?: string;
323
+ membershipsIds?: [number, ...number[]];
324
+ id?: string;
325
+ advanceBookingWindow?: {
326
+ amount?: number;
327
+ unit?: TimeUnit;
328
+ };
329
+ minimumBookingNotice?: {
330
+ amount?: number;
331
+ unit?: TimeUnit;
332
+ };
333
+ }[]];
334
+ }, {
335
+ default?: {
336
+ advanceBookingWindow?: {
337
+ amount?: number;
338
+ unit?: TimeUnit;
339
+ };
340
+ minimumBookingNotice?: {
341
+ amount?: number;
342
+ unit?: TimeUnit;
343
+ };
344
+ maxBookingHours?: {
345
+ amount?: number;
346
+ unit?: TimeUnit;
347
+ };
348
+ maxSequentialBookings?: {
349
+ amount?: number;
350
+ unit?: TimeUnit;
351
+ };
352
+ };
353
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
354
+ approvalRequired?: boolean;
355
+ allowResourceSelection?: boolean;
356
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
357
+ bookingDurations?: {
358
+ minDuration?: {
359
+ amount?: number;
360
+ unit?: TimeUnit;
361
+ };
362
+ maxDuration?: {
363
+ amount?: number;
364
+ unit?: TimeUnit;
365
+ };
366
+ durationStep?: {
367
+ amount?: number;
368
+ unit?: TimeUnit;
369
+ };
370
+ defaultDuration?: {
371
+ amount?: number;
372
+ unit?: TimeUnit;
373
+ };
374
+ };
375
+ memberships?: [{
376
+ name?: string;
377
+ membershipsIds?: [number, ...number[]];
378
+ id?: string;
379
+ advanceBookingWindow?: {
380
+ amount?: number;
381
+ unit?: TimeUnit;
382
+ };
383
+ minimumBookingNotice?: {
384
+ amount?: number;
385
+ unit?: TimeUnit;
386
+ };
387
+ }, ...{
388
+ name?: string;
389
+ membershipsIds?: [number, ...number[]];
390
+ id?: string;
391
+ advanceBookingWindow?: {
392
+ amount?: number;
393
+ unit?: TimeUnit;
394
+ };
395
+ minimumBookingNotice?: {
396
+ amount?: number;
397
+ unit?: TimeUnit;
398
+ };
399
+ }[]];
400
+ }>, {
401
+ default?: {
402
+ advanceBookingWindow?: {
403
+ amount?: number;
404
+ unit?: TimeUnit;
405
+ };
406
+ minimumBookingNotice?: {
407
+ amount?: number;
408
+ unit?: TimeUnit;
409
+ };
410
+ maxBookingHours?: {
411
+ amount?: number;
412
+ unit?: TimeUnit;
413
+ };
414
+ maxSequentialBookings?: {
415
+ amount?: number;
416
+ unit?: TimeUnit;
417
+ };
418
+ };
419
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
420
+ approvalRequired?: boolean;
421
+ allowResourceSelection?: boolean;
422
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
423
+ bookingDurations?: {
424
+ minDuration?: {
425
+ amount?: number;
426
+ unit?: TimeUnit;
427
+ };
428
+ maxDuration?: {
429
+ amount?: number;
430
+ unit?: TimeUnit;
431
+ };
432
+ durationStep?: {
433
+ amount?: number;
434
+ unit?: TimeUnit;
435
+ };
436
+ defaultDuration?: {
437
+ amount?: number;
438
+ unit?: TimeUnit;
439
+ };
440
+ };
441
+ memberships?: [{
442
+ name?: string;
443
+ membershipsIds?: [number, ...number[]];
444
+ id?: string;
445
+ advanceBookingWindow?: {
446
+ amount?: number;
447
+ unit?: TimeUnit;
448
+ };
449
+ minimumBookingNotice?: {
450
+ amount?: number;
451
+ unit?: TimeUnit;
452
+ };
453
+ }, ...{
454
+ name?: string;
455
+ membershipsIds?: [number, ...number[]];
456
+ id?: string;
457
+ advanceBookingWindow?: {
458
+ amount?: number;
459
+ unit?: TimeUnit;
460
+ };
461
+ minimumBookingNotice?: {
462
+ amount?: number;
463
+ unit?: TimeUnit;
464
+ };
465
+ }[]];
466
+ }, {
467
+ default?: {
468
+ advanceBookingWindow?: {
469
+ amount?: number;
470
+ unit?: TimeUnit;
471
+ };
472
+ minimumBookingNotice?: {
473
+ amount?: number;
474
+ unit?: TimeUnit;
475
+ };
476
+ maxBookingHours?: {
477
+ amount?: number;
478
+ unit?: TimeUnit;
479
+ };
480
+ maxSequentialBookings?: {
481
+ amount?: number;
482
+ unit?: TimeUnit;
483
+ };
484
+ };
485
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
486
+ approvalRequired?: boolean;
487
+ allowResourceSelection?: boolean;
488
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
489
+ bookingDurations?: {
490
+ minDuration?: {
491
+ amount?: number;
492
+ unit?: TimeUnit;
493
+ };
494
+ maxDuration?: {
495
+ amount?: number;
496
+ unit?: TimeUnit;
497
+ };
498
+ durationStep?: {
499
+ amount?: number;
500
+ unit?: TimeUnit;
501
+ };
502
+ defaultDuration?: {
503
+ amount?: number;
504
+ unit?: TimeUnit;
505
+ };
506
+ };
507
+ memberships?: [{
508
+ name?: string;
509
+ membershipsIds?: [number, ...number[]];
510
+ id?: string;
511
+ advanceBookingWindow?: {
512
+ amount?: number;
513
+ unit?: TimeUnit;
514
+ };
515
+ minimumBookingNotice?: {
516
+ amount?: number;
517
+ unit?: TimeUnit;
518
+ };
519
+ }, ...{
520
+ name?: string;
521
+ membershipsIds?: [number, ...number[]];
522
+ id?: string;
523
+ advanceBookingWindow?: {
524
+ amount?: number;
525
+ unit?: TimeUnit;
526
+ };
527
+ minimumBookingNotice?: {
528
+ amount?: number;
529
+ unit?: TimeUnit;
530
+ };
531
+ }[]];
532
+ }>;
533
+ export type TProductCategoryOnlineBookingSettings = z.infer<typeof RESERVATION_SETTINGS_SCHEMA>;
534
+ export declare const RESERVATION_DEFAULT_SETTINGS: TProductCategoryOnlineBookingSettings;
@@ -0,0 +1,107 @@
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 MINIMUM_DURATION_IN_MINUTES = (0, date_time_1.getDuration)(FIFTEEN_MINUTES, date_time_1.TimeUnit.MINUTE, date_time_1.TimeUnit.MINUTE);
9
+ const INTEGER_SCHEMA = zod_1.z.number().int().min(1);
10
+ const DURATION_SCHEMA = zod_1.z.object({
11
+ amount: INTEGER_SCHEMA,
12
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
13
+ });
14
+ const DURATION_WITH_LIMIT_SCHEMA = DURATION_SCHEMA.superRefine((value, ctx) => {
15
+ const durationInMinutes = (0, date_time_1.getDuration)(value.amount, value.unit, date_time_1.TimeUnit.MINUTE);
16
+ });
17
+ exports.RESERVATION_SETTINGS_SCHEMA = zod_1.z
18
+ .object({
19
+ resourceTypes: zod_1.z.array(zod_1.z.nativeEnum(enums_service_1.ResourceTypeEnum)).nonempty(),
20
+ approvalRequired: zod_1.z.boolean().default(true),
21
+ allowResourceSelection: zod_1.z.boolean().default(false),
22
+ prioritizedResourceAllocation: zod_1.z
23
+ .record(zod_1.z.nativeEnum(enums_service_1.ResourceSubTypeEnum), zod_1.z.array(zod_1.z.number().int().min(0)).nonempty())
24
+ .nullable(),
25
+ bookingDurations: zod_1.z
26
+ .object({
27
+ minDuration: DURATION_WITH_LIMIT_SCHEMA,
28
+ maxDuration: DURATION_WITH_LIMIT_SCHEMA,
29
+ durationStep: DURATION_WITH_LIMIT_SCHEMA,
30
+ defaultDuration: DURATION_WITH_LIMIT_SCHEMA,
31
+ })
32
+ .superRefine(({ defaultDuration, durationStep, maxDuration, minDuration }, ctx) => {
33
+ const max = (0, date_time_1.getDuration)(maxDuration.amount, maxDuration.unit, date_time_1.TimeUnit.MINUTE);
34
+ const min = (0, date_time_1.getDuration)(minDuration.amount, minDuration.unit, date_time_1.TimeUnit.MINUTE);
35
+ const defaultDurationMinutes = (0, date_time_1.getDuration)(defaultDuration.amount, defaultDuration.unit, date_time_1.TimeUnit.MINUTE);
36
+ const durationStepMinutes = (0, date_time_1.getDuration)(durationStep.amount, durationStep.unit, date_time_1.TimeUnit.MINUTE);
37
+ }),
38
+ default: zod_1.z.object({
39
+ advanceBookingWindow: zod_1.z.object({
40
+ amount: INTEGER_SCHEMA,
41
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
42
+ }),
43
+ minimumBookingNotice: zod_1.z.object({
44
+ amount: INTEGER_SCHEMA,
45
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
46
+ }),
47
+ maxBookingHours: DURATION_SCHEMA.nullable(),
48
+ maxSequentialBookings: DURATION_SCHEMA.nullable(),
49
+ }),
50
+ memberships: zod_1.z
51
+ .array(zod_1.z.object({
52
+ id: zod_1.z.string().uuid(),
53
+ name: zod_1.z.string(),
54
+ membershipsIds: zod_1.z.array(zod_1.z.number().int()).nonempty(),
55
+ advanceBookingWindow: zod_1.z.object({
56
+ amount: INTEGER_SCHEMA,
57
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
58
+ }),
59
+ minimumBookingNotice: zod_1.z.object({
60
+ amount: INTEGER_SCHEMA,
61
+ unit: zod_1.z.nativeEnum(date_time_1.TimeUnit),
62
+ }),
63
+ }))
64
+ .nonempty()
65
+ .nullable(),
66
+ })
67
+ .superRefine((settings, ctx) => {
68
+ const membershipIds = settings.memberships?.flatMap(setting => setting.membershipsIds) ?? [];
69
+ const uniqueMembershipIds = [...new Set(membershipIds)];
70
+ });
71
+ exports.RESERVATION_DEFAULT_SETTINGS = {
72
+ default: {
73
+ advanceBookingWindow: {
74
+ amount: 14,
75
+ unit: date_time_1.TimeUnit.DAY,
76
+ },
77
+ minimumBookingNotice: {
78
+ amount: 1,
79
+ unit: date_time_1.TimeUnit.DAY,
80
+ },
81
+ maxBookingHours: null,
82
+ maxSequentialBookings: null,
83
+ },
84
+ bookingDurations: {
85
+ minDuration: {
86
+ amount: 30,
87
+ unit: date_time_1.TimeUnit.MINUTE,
88
+ },
89
+ maxDuration: {
90
+ amount: 3,
91
+ unit: date_time_1.TimeUnit.HOUR,
92
+ },
93
+ durationStep: {
94
+ amount: 30,
95
+ unit: date_time_1.TimeUnit.MINUTE,
96
+ },
97
+ defaultDuration: {
98
+ amount: 1,
99
+ unit: date_time_1.TimeUnit.HOUR,
100
+ },
101
+ },
102
+ memberships: null,
103
+ approvalRequired: true,
104
+ allowResourceSelection: true,
105
+ prioritizedResourceAllocation: null,
106
+ };
107
+ //# 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,2BAA2B,GAAW,IAAA,uBAAW,EAAC,eAAe,EAAE,oBAAQ,CAAC,MAAM,EAAE,oBAAQ,CAAC,MAAM,CAAC,CAAC;AAE3G,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;AAEH,MAAM,0BAA0B,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC7E,MAAM,iBAAiB,GAAG,IAAA,uBAAW,EAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,oBAAQ,CAAC,MAAM,CAAC,CAAC;AAElF,CAAC,CAAC,CAAC;AAE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AAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IAEvG,MAAM,mBAAmB,GAAa,CAAC,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;AAEnE,CAAC,CAAC,CAAC;AAIS,QAAA,4BAA4B,GAA0C;IAClF,OAAO,EAAE;QACR,oBAAoB,EAAE;YACrB,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,oBAAQ,CAAC,GAAG;SAClB;QACD,oBAAoB,EAAE;YACrB,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,oBAAQ,CAAC,GAAG;SAClB;QACD,eAAe,EAAE,IAAI;QACrB,qBAAqB,EAAE,IAAI;KAC3B;IACD,gBAAgB,EAAE;QACjB,WAAW,EAAE;YACZ,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,oBAAQ,CAAC,MAAM;SACrB;QACD,WAAW,EAAE;YACZ,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,oBAAQ,CAAC,IAAI;SACnB;QACD,YAAY,EAAE;YACb,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,oBAAQ,CAAC,MAAM;SACrB;QACD,eAAe,EAAE;YAChB,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,oBAAQ,CAAC,IAAI;SACnB;KACD;IACD,WAAW,EAAE,IAAI;IACjB,gBAAgB,EAAE,IAAI;IACtB,sBAAsB,EAAE,IAAI;IAC5B,6BAA6B,EAAE,IAAI;CACnC,CAAC"}
@@ -1 +1,2 @@
1
+ export * from './product-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,12 @@
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
+ /** Only for reservation categories */
9
+ DURATION = "duration",
10
+ /** Only for reservation categories */
11
+ RESOURCE_TYPES = "resource_types"
12
+ }
@@ -0,0 +1,17 @@
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
+ /** Only for reservation categories */
13
+ CategoryOrderColumnEnum["DURATION"] = "duration";
14
+ /** Only for reservation categories */
15
+ CategoryOrderColumnEnum["RESOURCE_TYPES"] = "resource_types";
16
+ })(CategoryOrderColumnEnum = exports.CategoryOrderColumnEnum || (exports.CategoryOrderColumnEnum = {}));
17
+ //# 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,uBAeX;AAfD,WAAY,uBAAuB;IAClC,wCAAa,CAAA;IACb,0DAA+B,CAAA;IAE/B,sCAAsC;IACtC,0DAA+B,CAAA;IAE/B,sCAAsC;IACtC,sDAA2B,CAAA;IAE3B,sCAAsC;IACtC,gDAAqB,CAAA;IAErB,sCAAsC;IACtC,4DAAiC,CAAA;AAClC,CAAC,EAfW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAelC"}