@myclub_se/data-access 2.13.1 → 2.15.0

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 (82) hide show
  1. package/esm2020/lib/api-models/api-activity-participant.mjs +2 -0
  2. package/esm2020/lib/api-models/api-bookable-group.mjs +2 -0
  3. package/esm2020/lib/api-models/api-bookable-item.mjs +2 -0
  4. package/esm2020/lib/api-models/api-bookable-part.mjs +2 -0
  5. package/esm2020/lib/api-models/api-bookable-tag.mjs +2 -0
  6. package/esm2020/lib/api-models/api-booking-calendar-application-time.mjs +1 -1
  7. package/esm2020/lib/api-models/api-booking-calendar-slot-session.mjs +1 -1
  8. package/esm2020/lib/api-models/api-booking-calendar-slot.mjs +1 -1
  9. package/esm2020/lib/api-models/api-booking-calendar.mjs +1 -1
  10. package/esm2020/lib/api-models/api-event.mjs +1 -1
  11. package/esm2020/lib/api-models/api-overbooked-bookable-item.mjs +2 -0
  12. package/esm2020/lib/api-models/index.mjs +7 -1
  13. package/esm2020/lib/models/activity-location-part.mjs +4 -4
  14. package/esm2020/lib/models/activity-participant.mjs +12 -0
  15. package/esm2020/lib/models/bookable-group.mjs +21 -0
  16. package/esm2020/lib/models/bookable-item.mjs +34 -0
  17. package/esm2020/lib/models/bookable-part.mjs +14 -0
  18. package/esm2020/lib/models/bookable-tag.mjs +17 -0
  19. package/esm2020/lib/models/booking-calendar-application-time.mjs +9 -9
  20. package/esm2020/lib/models/booking-calendar-slot-session.mjs +9 -9
  21. package/esm2020/lib/models/booking-calendar-slot.mjs +5 -5
  22. package/esm2020/lib/models/booking-calendar.mjs +9 -9
  23. package/esm2020/lib/models/event.mjs +3 -2
  24. package/esm2020/lib/models/index.mjs +7 -1
  25. package/esm2020/lib/models/overbooked-bookable-item.mjs +10 -0
  26. package/esm2020/lib/services/activity.service.mjs +2 -189
  27. package/esm2020/lib/services/bookable.service.mjs +258 -0
  28. package/esm2020/lib/services/booking-calendar.service.mjs +30 -26
  29. package/esm2020/lib/services/factories/activity-participant-factory.mjs +3 -0
  30. package/esm2020/lib/services/factories/bookable-group-factory.mjs +6 -0
  31. package/esm2020/lib/services/factories/bookable-item-factory.mjs +5 -0
  32. package/esm2020/lib/services/factories/bookable-part-factory.mjs +5 -0
  33. package/esm2020/lib/services/factories/bookable-tag-factory.mjs +5 -0
  34. package/esm2020/lib/services/factories/booking-calendar-application-time-factory.mjs +2 -2
  35. package/esm2020/lib/services/factories/booking-calendar-factory.mjs +3 -3
  36. package/esm2020/lib/services/factories/booking-calendar-slot-factory.mjs +2 -2
  37. package/esm2020/lib/services/factories/booking-calendar-slot-session-factory.mjs +2 -2
  38. package/esm2020/lib/services/factories/event-factory.mjs +3 -2
  39. package/esm2020/lib/services/factories/index.mjs +8 -1
  40. package/esm2020/lib/services/factories/overbooked-bookable-item-factory.mjs +3 -0
  41. package/esm2020/lib/services/index.mjs +2 -1
  42. package/fesm2015/myclub_se-data-access.mjs +439 -247
  43. package/fesm2015/myclub_se-data-access.mjs.map +1 -1
  44. package/fesm2020/myclub_se-data-access.mjs +439 -247
  45. package/fesm2020/myclub_se-data-access.mjs.map +1 -1
  46. package/lib/api-models/api-activity-participant.d.ts +9 -0
  47. package/lib/api-models/api-bookable-group.d.ts +9 -0
  48. package/lib/api-models/api-bookable-item.d.ts +12 -0
  49. package/lib/api-models/api-bookable-part.d.ts +4 -0
  50. package/lib/api-models/api-bookable-tag.d.ts +7 -0
  51. package/lib/api-models/api-booking-calendar-application-time.d.ts +5 -5
  52. package/lib/api-models/api-booking-calendar-slot-session.d.ts +5 -5
  53. package/lib/api-models/api-booking-calendar-slot.d.ts +2 -2
  54. package/lib/api-models/api-booking-calendar.d.ts +2 -2
  55. package/lib/api-models/api-event.d.ts +2 -0
  56. package/lib/api-models/api-overbooked-bookable-item.d.ts +7 -0
  57. package/lib/api-models/index.d.ts +6 -0
  58. package/lib/models/activity-location-part.d.ts +1 -1
  59. package/lib/models/activity-participant.d.ts +10 -0
  60. package/lib/models/bookable-group.d.ts +18 -0
  61. package/lib/models/bookable-item.d.ts +22 -0
  62. package/lib/models/bookable-part.d.ts +10 -0
  63. package/lib/models/bookable-tag.d.ts +13 -0
  64. package/lib/models/booking-calendar-application-time.d.ts +8 -8
  65. package/lib/models/booking-calendar-slot-session.d.ts +8 -8
  66. package/lib/models/booking-calendar-slot.d.ts +4 -4
  67. package/lib/models/booking-calendar.d.ts +4 -4
  68. package/lib/models/event.d.ts +3 -1
  69. package/lib/models/index.d.ts +6 -0
  70. package/lib/models/overbooked-bookable-item.d.ts +8 -0
  71. package/lib/services/activity.service.d.ts +1 -31
  72. package/lib/services/bookable.service.d.ts +44 -0
  73. package/lib/services/booking-calendar.service.d.ts +6 -5
  74. package/lib/services/factories/activity-participant-factory.d.ts +3 -0
  75. package/lib/services/factories/bookable-group-factory.d.ts +3 -0
  76. package/lib/services/factories/bookable-item-factory.d.ts +3 -0
  77. package/lib/services/factories/bookable-part-factory.d.ts +3 -0
  78. package/lib/services/factories/bookable-tag-factory.d.ts +3 -0
  79. package/lib/services/factories/index.d.ts +7 -0
  80. package/lib/services/factories/overbooked-bookable-item-factory.d.ts +3 -0
  81. package/lib/services/index.d.ts +1 -0
  82. package/package.json +1 -1
@@ -152,10 +152,10 @@ class ActivityLocationPart {
152
152
  this.id = id;
153
153
  this.name = name;
154
154
  }
155
- static asFormGroup(tag) {
155
+ static asFormGroup(part) {
156
156
  return new FormGroup({
157
- id: new FormControl((tag === null || tag === void 0 ? void 0 : tag.id) || ''),
158
- name: new FormControl((tag === null || tag === void 0 ? void 0 : tag.name) || '', Validators.required),
157
+ id: new FormControl((part === null || part === void 0 ? void 0 : part.id) || ''),
158
+ name: new FormControl((part === null || part === void 0 ? void 0 : part.name) || '', Validators.required),
159
159
  });
160
160
  }
161
161
  }
@@ -213,6 +213,18 @@ class ActivityLocationGroup {
213
213
  }
214
214
  }
215
215
 
216
+ class ActivityParticipant {
217
+ constructor(id, activityId, memberId, teamId, memberEmail, memberName, rfLeader) {
218
+ this.id = id;
219
+ this.activityId = activityId;
220
+ this.memberId = memberId;
221
+ this.teamId = teamId;
222
+ this.memberEmail = memberEmail;
223
+ this.memberName = memberName;
224
+ this.rfLeader = rfLeader;
225
+ }
226
+ }
227
+
216
228
  class ActivitySettings {
217
229
  constructor(dayOptions, hourOptions, inviteGroupOptions, inviteSettingsOptions, maxAttendanceOptions, meetUpTimeOptions, remindReceiverOptions, repeatOptions, repeatTypeOptions) {
218
230
  this.dayOptions = dayOptions;
@@ -307,6 +319,86 @@ class Authentication {
307
319
  }
308
320
  }
309
321
 
322
+ class BookableGroup {
323
+ constructor(id, club_id, section_id, active, name, bookable_items) {
324
+ this.id = id;
325
+ this.club_id = club_id;
326
+ this.section_id = section_id;
327
+ this.active = active;
328
+ this.name = name;
329
+ this.bookable_items = bookable_items;
330
+ }
331
+ static asFormGroup(bookableGroup) {
332
+ return new FormGroup({
333
+ id: new FormControl((bookableGroup === null || bookableGroup === void 0 ? void 0 : bookableGroup.id) || ''),
334
+ club_id: new FormControl((bookableGroup === null || bookableGroup === void 0 ? void 0 : bookableGroup.club_id) || '', Validators.required),
335
+ section_id: new FormControl((bookableGroup === null || bookableGroup === void 0 ? void 0 : bookableGroup.section_id) || ''),
336
+ name: new FormControl((bookableGroup === null || bookableGroup === void 0 ? void 0 : bookableGroup.name) || '', Validators.required),
337
+ active: new FormControl(typeof (bookableGroup === null || bookableGroup === void 0 ? void 0 : bookableGroup.active) !== 'undefined' ? bookableGroup === null || bookableGroup === void 0 ? void 0 : bookableGroup.active : false),
338
+ });
339
+ }
340
+ }
341
+
342
+ class BookableTag {
343
+ constructor(id, club_id, section_id, name, bookable_item_names = []) {
344
+ this.id = id;
345
+ this.club_id = club_id;
346
+ this.section_id = section_id;
347
+ this.name = name;
348
+ this.bookable_item_names = bookable_item_names;
349
+ }
350
+ static asFormGroup(tag) {
351
+ return new FormGroup({
352
+ id: new FormControl((tag === null || tag === void 0 ? void 0 : tag.id) || ''),
353
+ name: new FormControl((tag === null || tag === void 0 ? void 0 : tag.name) || '', Validators.required),
354
+ });
355
+ }
356
+ }
357
+
358
+ class BookablePart {
359
+ constructor(id, name) {
360
+ this.id = id;
361
+ this.name = name;
362
+ }
363
+ static asFormGroup(part) {
364
+ return new FormGroup({
365
+ id: new FormControl((part === null || part === void 0 ? void 0 : part.id) || ''),
366
+ name: new FormControl((part === null || part === void 0 ? void 0 : part.name) || '', Validators.required),
367
+ });
368
+ }
369
+ }
370
+
371
+ class BookableItem {
372
+ constructor(id, club_id, section_id, group_id, active, name, tags, parts) {
373
+ this.id = id;
374
+ this.club_id = club_id;
375
+ this.section_id = section_id;
376
+ this.group_id = group_id;
377
+ this.active = active;
378
+ this.name = name;
379
+ this.tags = tags;
380
+ this.parts = parts;
381
+ }
382
+ static asFormGroup(bookable) {
383
+ const tags = [];
384
+ const parts = [];
385
+ if (bookable === null || bookable === void 0 ? void 0 : bookable.tags) {
386
+ bookable.tags.forEach((tag) => tags.push(BookableTag.asFormGroup(tag)));
387
+ }
388
+ if (bookable === null || bookable === void 0 ? void 0 : bookable.parts) {
389
+ bookable.parts.forEach((part) => parts.push(BookablePart.asFormGroup(part)));
390
+ }
391
+ return new FormGroup({
392
+ id: new FormControl((bookable === null || bookable === void 0 ? void 0 : bookable.id) || ''),
393
+ club_id: new FormControl((bookable === null || bookable === void 0 ? void 0 : bookable.club_id) || '', Validators.required),
394
+ active: new FormControl(typeof (bookable === null || bookable === void 0 ? void 0 : bookable.active) !== 'undefined' ? bookable === null || bookable === void 0 ? void 0 : bookable.active : false),
395
+ group_id: new FormControl((bookable === null || bookable === void 0 ? void 0 : bookable.group_id) || ''),
396
+ tags: new FormArray(tags),
397
+ parts: new FormArray(parts),
398
+ });
399
+ }
400
+ }
401
+
310
402
  class SearchTeam {
311
403
  constructor(club, section, id, club_name, name, section_name) {
312
404
  this.club = club;
@@ -325,7 +417,7 @@ class SearchTeam {
325
417
  }
326
418
 
327
419
  class BookingCalendar {
328
- constructor(id, club_id, section_id, team_id, club_name, name, section_name, team_name, status, max_application_number, allow_team_export, allow_repeated_bookings, is_default, location_groups, available_for_teams) {
420
+ constructor(id, club_id, section_id, team_id, club_name, name, section_name, team_name, status, max_application_number, allow_team_export, allow_repeated_bookings, is_default, available_for_teams, bookable_groups) {
329
421
  this.id = id;
330
422
  this.club_id = club_id;
331
423
  this.section_id = section_id;
@@ -339,15 +431,15 @@ class BookingCalendar {
339
431
  this.allow_team_export = allow_team_export;
340
432
  this.allow_repeated_bookings = allow_repeated_bookings;
341
433
  this.is_default = is_default;
342
- this.location_groups = location_groups;
343
434
  this.available_for_teams = available_for_teams;
435
+ this.bookable_groups = bookable_groups;
344
436
  }
345
437
  static asFormGroup(calendar) {
346
- const locationGroups = [];
438
+ const bookableGroups = [];
347
439
  const availableForTeams = [];
348
- if (calendar === null || calendar === void 0 ? void 0 : calendar.location_groups) {
349
- calendar.location_groups.forEach((locationGroup) => {
350
- locationGroups.push(ActivityLocationGroup.asFormGroup(locationGroup));
440
+ if (calendar === null || calendar === void 0 ? void 0 : calendar.bookable_groups) {
441
+ calendar.bookable_groups.forEach((bookableGroup) => {
442
+ bookableGroups.push(BookableGroup.asFormGroup(bookableGroup));
351
443
  });
352
444
  }
353
445
  if (calendar === null || calendar === void 0 ? void 0 : calendar.available_for_teams) {
@@ -365,7 +457,7 @@ class BookingCalendar {
365
457
  section_name: new FormControl((calendar === null || calendar === void 0 ? void 0 : calendar.section_name) || ''),
366
458
  team_name: new FormControl((calendar === null || calendar === void 0 ? void 0 : calendar.team_name) || ''),
367
459
  status: new FormControl((calendar === null || calendar === void 0 ? void 0 : calendar.status) || 'preliminary'),
368
- location_groups: new FormArray(locationGroups),
460
+ bookable_groups: new FormArray(bookableGroups),
369
461
  available_for_teams: new FormArray(availableForTeams),
370
462
  max_application_number: new FormControl((calendar === null || calendar === void 0 ? void 0 : calendar.max_application_number) || 0),
371
463
  is_default: new FormControl((calendar === null || calendar === void 0 ? void 0 : calendar.is_default) || false),
@@ -376,7 +468,7 @@ class BookingCalendar {
376
468
  }
377
469
 
378
470
  class BookingCalendarApplicationTime {
379
- constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, location_zones_taken, applicant_comment, reviewer_comment, status, location_part_id, location_part_name, location_id, repeat, activity_type_id, color = null, slot_start_time, slot_end_time, slot_day, slot_number_of_available_sessions, slot_last_repeating_date, created, location_name) {
471
+ constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, applicant_comment, reviewer_comment, status, repeat, activity_type_id, color = null, slot_start_time, slot_end_time, slot_day, slot_number_of_available_sessions, slot_last_repeating_date, created, bookable_zones_taken, bookable_part_id, bookable_part_name, bookable_id, bookable_name) {
380
472
  this.id = id;
381
473
  this.section_id = section_id;
382
474
  this.slot_id = slot_id;
@@ -386,13 +478,9 @@ class BookingCalendarApplicationTime {
386
478
  this.section_name = section_name;
387
479
  this.start_time = start_time;
388
480
  this.team_name = team_name;
389
- this.location_zones_taken = location_zones_taken;
390
481
  this.applicant_comment = applicant_comment;
391
482
  this.reviewer_comment = reviewer_comment;
392
483
  this.status = status;
393
- this.location_part_id = location_part_id;
394
- this.location_part_name = location_part_name;
395
- this.location_id = location_id;
396
484
  this.repeat = repeat;
397
485
  this.activity_type_id = activity_type_id;
398
486
  this.color = color;
@@ -402,7 +490,11 @@ class BookingCalendarApplicationTime {
402
490
  this.slot_number_of_available_sessions = slot_number_of_available_sessions;
403
491
  this.slot_last_repeating_date = slot_last_repeating_date;
404
492
  this.created = created;
405
- this.location_name = location_name;
493
+ this.bookable_zones_taken = bookable_zones_taken;
494
+ this.bookable_part_id = bookable_part_id;
495
+ this.bookable_part_name = bookable_part_name;
496
+ this.bookable_id = bookable_id;
497
+ this.bookable_name = bookable_name;
406
498
  }
407
499
  static asFormGroup(session) {
408
500
  return new FormGroup({
@@ -415,28 +507,26 @@ class BookingCalendarApplicationTime {
415
507
  section_name: new FormControl((session === null || session === void 0 ? void 0 : session.section_name) || ''),
416
508
  start_time: new FormControl((session === null || session === void 0 ? void 0 : session.start_time) || '', Validators.required),
417
509
  team_name: new FormControl((session === null || session === void 0 ? void 0 : session.team_name) || ''),
418
- location_zones_taken: new FormControl((session === null || session === void 0 ? void 0 : session.location_zones_taken) || 1, [Validators.min(1), Validators.required]),
419
510
  applicant_comment: new FormControl((session === null || session === void 0 ? void 0 : session.applicant_comment) || null),
420
511
  reviewer_comment: new FormControl((session === null || session === void 0 ? void 0 : session.reviewer_comment) || null),
421
512
  status: new FormControl((session === null || session === void 0 ? void 0 : session.status) || ''),
422
- location_part_id: new FormControl((session === null || session === void 0 ? void 0 : session.location_part_id) || ''),
423
513
  repeat: new FormControl((session === null || session === void 0 ? void 0 : session.repeat) || false),
424
514
  activity_type_id: new FormControl((session === null || session === void 0 ? void 0 : session.activity_type_id) || null),
515
+ bookable_zones_taken: new FormControl((session === null || session === void 0 ? void 0 : session.bookable_zones_taken) || 1, [Validators.min(1), Validators.required]),
516
+ bookable_part_id: new FormControl((session === null || session === void 0 ? void 0 : session.bookable_part_id) || ''),
425
517
  });
426
518
  }
427
519
  }
428
520
 
429
521
  class BookingCalendarSlot {
430
- constructor(id, calendar_id, calendar_status, location_id, color, day, end_time, group_id, location_name, number_of_available_sessions, sessions, open_sessions, start_time, type, repeat, update_repeating, update_until_date = null, reserved_time_enabled, repeat_num, repeat_to_day, repeat_type, reserved_time, reserved_time_position, application_times, last_repeating_date) {
522
+ constructor(id, calendar_id, calendar_status, color, day, end_time, group_id, number_of_available_sessions, sessions, open_sessions, start_time, type, repeat, update_repeating, update_until_date = null, reserved_time_enabled, repeat_num, repeat_to_day, repeat_type, reserved_time, reserved_time_position, application_times, last_repeating_date, bookable_name, bookable_id) {
431
523
  this.id = id;
432
524
  this.calendar_id = calendar_id;
433
525
  this.calendar_status = calendar_status;
434
- this.location_id = location_id;
435
526
  this.color = color;
436
527
  this.day = day;
437
528
  this.end_time = end_time;
438
529
  this.group_id = group_id;
439
- this.location_name = location_name;
440
530
  this.number_of_available_sessions = number_of_available_sessions;
441
531
  this.sessions = sessions;
442
532
  this.open_sessions = open_sessions;
@@ -453,12 +543,13 @@ class BookingCalendarSlot {
453
543
  this.reserved_time_position = reserved_time_position;
454
544
  this.application_times = application_times;
455
545
  this.last_repeating_date = last_repeating_date;
546
+ this.bookable_name = bookable_name;
547
+ this.bookable_id = bookable_id;
456
548
  }
457
549
  static asFormGroup(slot) {
458
550
  return new FormGroup({
459
551
  id: new FormControl((slot === null || slot === void 0 ? void 0 : slot.id) || ''),
460
552
  calendar_id: new FormControl((slot === null || slot === void 0 ? void 0 : slot.calendar_id) || '', Validators.required),
461
- location_id: new FormControl((slot === null || slot === void 0 ? void 0 : slot.location_id) || '', Validators.required),
462
553
  day: new FormControl((slot === null || slot === void 0 ? void 0 : slot.day) || '', Validators.required),
463
554
  end_time: new FormControl((slot === null || slot === void 0 ? void 0 : slot.end_time) || '', Validators.required),
464
555
  group_id: new FormControl((slot === null || slot === void 0 ? void 0 : slot.group_id) || null, { nonNullable: false }),
@@ -474,12 +565,13 @@ class BookingCalendarSlot {
474
565
  reserved_time_enabled: new FormControl(typeof (slot === null || slot === void 0 ? void 0 : slot.reserved_time_enabled) !== 'undefined' ? slot === null || slot === void 0 ? void 0 : slot.reserved_time_enabled : false),
475
566
  reserved_time: new FormControl((slot === null || slot === void 0 ? void 0 : slot.reserved_time) || '00:00'),
476
567
  reserved_time_position: new FormControl((slot === null || slot === void 0 ? void 0 : slot.reserved_time_position) || ''),
568
+ bookable_id: new FormControl((slot === null || slot === void 0 ? void 0 : slot.bookable_id) || '', Validators.required),
477
569
  });
478
570
  }
479
571
  }
480
572
 
481
573
  class BookingCalendarSlotSession {
482
- constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, is_overbooked, last_repeating_date, type, location_zones_taken, slot_index, comment, location_part_id, location_part_name, location_name, location_id, day, repeat, activity_type_id, color = null, update_repeating, update_until_date = null) {
574
+ constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, is_overbooked, last_repeating_date, type, slot_index, comment, day, repeat, activity_type_id, color = null, update_repeating, update_until_date = null, bookable_zones_taken, bookable_part_id, bookable_part_name, bookable_name, bookable_id) {
483
575
  this.id = id;
484
576
  this.section_id = section_id;
485
577
  this.slot_id = slot_id;
@@ -492,19 +584,19 @@ class BookingCalendarSlotSession {
492
584
  this.is_overbooked = is_overbooked;
493
585
  this.last_repeating_date = last_repeating_date;
494
586
  this.type = type;
495
- this.location_zones_taken = location_zones_taken;
496
587
  this.slot_index = slot_index;
497
588
  this.comment = comment;
498
- this.location_part_id = location_part_id;
499
- this.location_part_name = location_part_name;
500
- this.location_name = location_name;
501
- this.location_id = location_id;
502
589
  this.day = day;
503
590
  this.repeat = repeat;
504
591
  this.activity_type_id = activity_type_id;
505
592
  this.color = color;
506
593
  this.update_repeating = update_repeating;
507
594
  this.update_until_date = update_until_date;
595
+ this.bookable_zones_taken = bookable_zones_taken;
596
+ this.bookable_part_id = bookable_part_id;
597
+ this.bookable_part_name = bookable_part_name;
598
+ this.bookable_name = bookable_name;
599
+ this.bookable_id = bookable_id;
508
600
  }
509
601
  static asFormGroup(session) {
510
602
  return new FormGroup({
@@ -520,13 +612,13 @@ class BookingCalendarSlotSession {
520
612
  is_overbooked: new FormControl((session === null || session === void 0 ? void 0 : session.is_overbooked) || false),
521
613
  last_repeating_date: new FormControl((session === null || session === void 0 ? void 0 : session.last_repeating_date) || null),
522
614
  type: new FormControl((session === null || session === void 0 ? void 0 : session.type) || ''),
523
- location_zones_taken: new FormControl((session === null || session === void 0 ? void 0 : session.location_zones_taken) || 1, [Validators.min(1), Validators.required]),
524
615
  comment: new FormControl((session === null || session === void 0 ? void 0 : session.comment) || ''),
525
- location_part_id: new FormControl((session === null || session === void 0 ? void 0 : session.location_part_id) || ''),
526
616
  repeat: new FormControl((session === null || session === void 0 ? void 0 : session.repeat) || false),
527
617
  activity_type_id: new FormControl((session === null || session === void 0 ? void 0 : session.activity_type_id) || null),
528
618
  update_repeating: new FormControl(!!(session === null || session === void 0 ? void 0 : session.update_repeating) || false),
529
619
  update_until_date: new FormControl(null),
620
+ bookable_zones_taken: new FormControl((session === null || session === void 0 ? void 0 : session.bookable_zones_taken) || 1, [Validators.min(1), Validators.required]),
621
+ bookable_part_id: new FormControl((session === null || session === void 0 ? void 0 : session.bookable_part_id) || ''),
530
622
  });
531
623
  }
532
624
  }
@@ -835,7 +927,7 @@ class Email {
835
927
  }
836
928
 
837
929
  class Event {
838
- constructor(id, activity_id, activity_type, base_background_color, base_color, base_name, calendar_name, description, end, invitation_id, invitation_response, invited_members, location, meet_up_place, meet_up_time, member_id, open_activity, start, title, type) {
930
+ constructor(id, activity_id, activity_type, base_background_color, base_color, base_name, calendar_name, description, end, invitation_id, invitation_response, invited_members, location, meet_up_place, meet_up_time, member_id, open_activity, participants, start, title, type) {
839
931
  this.id = id;
840
932
  this.activity_id = activity_id;
841
933
  this.activity_type = activity_type;
@@ -853,6 +945,7 @@ class Event {
853
945
  this.meet_up_time = meet_up_time;
854
946
  this.member_id = member_id;
855
947
  this.open_activity = open_activity;
948
+ this.participants = participants;
856
949
  this.start = start;
857
950
  this.title = title;
858
951
  this.type = type;
@@ -1500,6 +1593,16 @@ class OptionalFee {
1500
1593
  }
1501
1594
  }
1502
1595
 
1596
+ class OverbookedBookableItem {
1597
+ constructor(start_time, end_time, day, bookable_name, session_names) {
1598
+ this.start_time = start_time;
1599
+ this.end_time = end_time;
1600
+ this.day = day;
1601
+ this.bookable_name = bookable_name;
1602
+ this.session_names = session_names;
1603
+ }
1604
+ }
1605
+
1503
1606
  class OverbookedLocation {
1504
1607
  constructor(start_time, end_time, day, location_name, session_names) {
1505
1608
  this.start_time = start_time;
@@ -1660,6 +1763,8 @@ const activityLocationGroupFactory = (apiActivityLocationGroup) => {
1660
1763
  return new ActivityLocationGroup(apiActivityLocationGroup.id, apiActivityLocationGroup.club_id, apiActivityLocationGroup.section_id, apiActivityLocationGroup.active, apiActivityLocationGroup.name, apiActivityLocationGroup.locations && apiActivityLocationGroup.locations.length ? apiActivityLocationGroup.locations.map((apiActivityLocation) => activityLocationFactory(apiActivityLocation)) : []);
1661
1764
  };
1662
1765
 
1766
+ const activityParticipantFactory = (apiActivityParticipant) => new ActivityParticipant(apiActivityParticipant.id, apiActivityParticipant.activity_id, apiActivityParticipant.member_id, apiActivityParticipant.team_id, apiActivityParticipant.member_email, apiActivityParticipant.member_name, apiActivityParticipant.rf_leader);
1767
+
1663
1768
  const activitySettingsFactory = (apiActivitySettings) => new ActivitySettings(apiActivitySettings.day_options, apiActivitySettings.hour_options, apiActivitySettings.invite_group_options, apiActivitySettings.invite_settings_options, apiActivitySettings.max_attendance_options, apiActivitySettings.meet_up_time_options, apiActivitySettings.remind_receiver_options, apiActivitySettings.repeat_options, apiActivitySettings.repeat_type_options);
1664
1769
 
1665
1770
  const activityTypeFactory = (apiActivityType) => new ActivityType(apiActivityType.id, apiActivityType.club_id, apiActivityType.section_id, apiActivityType.active, apiActivityType.base_type, apiActivityType.name, apiActivityType.is_available_for_booking, apiActivityType.color);
@@ -1674,19 +1779,33 @@ const authTeamFactory = (apiAuthTeam) => new AuthTeam(apiAuthTeam.id, apiAuthTea
1674
1779
 
1675
1780
  const authFactory = (apiAuth) => new Auth(apiAuth.id, apiAuth.name, apiAuth.club_admin, apiAuth.is_section_club, apiAuth.members.map((apiAuthMember) => authMemberFactory(apiAuthMember)), apiAuth.registration_enabled, apiAuth.sections.map((apiAuthSection) => authSectionFactory(apiAuthSection)), apiAuth.site_enabled, apiAuth.teams.map((apiAuthTeam) => authTeamFactory(apiAuthTeam)), apiAuth.user_name);
1676
1781
 
1782
+ const bookablePartFactory = (apiBookablePart) => {
1783
+ return new BookablePart(apiBookablePart.id, apiBookablePart.name);
1784
+ };
1785
+
1786
+ const bookableTagFactory = (apiBookableTag) => {
1787
+ return new BookableTag(apiBookableTag.id, apiBookableTag.club_id, apiBookableTag.section_id, apiBookableTag.name, apiBookableTag.bookable_item_names);
1788
+ };
1789
+
1790
+ const bookableItemFactory = (apiBookableItem) => new BookableItem(apiBookableItem.id, apiBookableItem.club_id, apiBookableItem.section_id, apiBookableItem.group_id, apiBookableItem.active, apiBookableItem.name, apiBookableItem.tags && apiBookableItem.tags.length > 0 ? apiBookableItem.tags.map((apiBookableTag) => bookableTagFactory(apiBookableTag)) : [], apiBookableItem.parts && apiBookableItem.parts.length > 0 ? apiBookableItem.parts.map((apiBookablePart) => bookablePartFactory(apiBookablePart)) : []);
1791
+
1792
+ const bookableGroupFactory = (apiBookableGroup) => {
1793
+ return new BookableGroup(apiBookableGroup.id, apiBookableGroup.club_id, apiBookableGroup.section_id, apiBookableGroup.active, apiBookableGroup.name, apiBookableGroup.bookable_items && apiBookableGroup.bookable_items.length ? apiBookableGroup.bookable_items.map((apiBookableItem) => bookableItemFactory(apiBookableItem)) : []);
1794
+ };
1795
+
1677
1796
  const clubFactory = (apiClub) => new Club(apiClub.id, apiClub.name);
1678
1797
 
1679
1798
  const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
1680
1799
 
1681
1800
  const searchTeamFactory = (apiSearchTeam) => new SearchTeam(apiSearchTeam.club ? clubFactory(apiSearchTeam.club) : undefined, apiSearchTeam.section ? sectionFactory(apiSearchTeam.section) : undefined, apiSearchTeam.id, apiSearchTeam.club_name, apiSearchTeam.name, apiSearchTeam.section_name);
1682
1801
 
1683
- const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBookingCalendar.id, apiBookingCalendar.club_id, apiBookingCalendar.section_id, apiBookingCalendar.team_id, apiBookingCalendar.club_name, apiBookingCalendar.name, apiBookingCalendar.section_name, apiBookingCalendar.team_name, apiBookingCalendar.status, apiBookingCalendar.max_application_number, apiBookingCalendar.allow_team_export, apiBookingCalendar.allow_repeated_bookings, apiBookingCalendar.is_default, apiBookingCalendar.location_groups && apiBookingCalendar.location_groups.length ? apiBookingCalendar.location_groups.map((apiActivityLocationGroup) => activityLocationGroupFactory(apiActivityLocationGroup)) : [], apiBookingCalendar.available_for_teams && apiBookingCalendar.available_for_teams.length ? apiBookingCalendar.available_for_teams.map((apiSearchTeam) => searchTeamFactory(apiSearchTeam)) : []);
1802
+ const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBookingCalendar.id, apiBookingCalendar.club_id, apiBookingCalendar.section_id, apiBookingCalendar.team_id, apiBookingCalendar.club_name, apiBookingCalendar.name, apiBookingCalendar.section_name, apiBookingCalendar.team_name, apiBookingCalendar.status, apiBookingCalendar.max_application_number, apiBookingCalendar.allow_team_export, apiBookingCalendar.allow_repeated_bookings, apiBookingCalendar.is_default, apiBookingCalendar.available_for_teams && apiBookingCalendar.available_for_teams.length ? apiBookingCalendar.available_for_teams.map((apiSearchTeam) => searchTeamFactory(apiSearchTeam)) : [], apiBookingCalendar.bookable_groups && apiBookingCalendar.bookable_groups.length ? apiBookingCalendar.bookable_groups.map((apiBookableGroup) => bookableGroupFactory(apiBookableGroup)) : []);
1684
1803
 
1685
- const bookingCalendarApplicationTimeFactory = (apiBookingApplicationTime) => new BookingCalendarApplicationTime(apiBookingApplicationTime.id, apiBookingApplicationTime.section_id, apiBookingApplicationTime.slot_id, apiBookingApplicationTime.team_id, apiBookingApplicationTime.title, apiBookingApplicationTime.end_time, apiBookingApplicationTime.section_name, apiBookingApplicationTime.start_time, apiBookingApplicationTime.team_name, apiBookingApplicationTime.location_zones_taken, apiBookingApplicationTime.applicant_comment, apiBookingApplicationTime.reviewer_comment, apiBookingApplicationTime.status, apiBookingApplicationTime.location_part_id, apiBookingApplicationTime.location_part_name, apiBookingApplicationTime.location_id, apiBookingApplicationTime.repeat, apiBookingApplicationTime.activity_type_id, apiBookingApplicationTime.color, apiBookingApplicationTime.slot_start_time, apiBookingApplicationTime.slot_end_time, apiBookingApplicationTime.slot_day, apiBookingApplicationTime.slot_number_of_available_sessions, apiBookingApplicationTime.slot_last_repeating_date, apiBookingApplicationTime.created, apiBookingApplicationTime.location_name);
1804
+ const bookingCalendarApplicationTimeFactory = (apiBookingApplicationTime) => new BookingCalendarApplicationTime(apiBookingApplicationTime.id, apiBookingApplicationTime.section_id, apiBookingApplicationTime.slot_id, apiBookingApplicationTime.team_id, apiBookingApplicationTime.title, apiBookingApplicationTime.end_time, apiBookingApplicationTime.section_name, apiBookingApplicationTime.start_time, apiBookingApplicationTime.team_name, apiBookingApplicationTime.applicant_comment, apiBookingApplicationTime.reviewer_comment, apiBookingApplicationTime.status, apiBookingApplicationTime.repeat, apiBookingApplicationTime.activity_type_id, apiBookingApplicationTime.color, apiBookingApplicationTime.slot_start_time, apiBookingApplicationTime.slot_end_time, apiBookingApplicationTime.slot_day, apiBookingApplicationTime.slot_number_of_available_sessions, apiBookingApplicationTime.slot_last_repeating_date, apiBookingApplicationTime.created, apiBookingApplicationTime.bookable_zones_taken, apiBookingApplicationTime.bookable_part_id, apiBookingApplicationTime.bookable_part_name, apiBookingApplicationTime.bookable_id, apiBookingApplicationTime.bookable_name);
1686
1805
 
1687
- const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.title, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name, apiBookingSlotSession.is_overbooked, apiBookingSlotSession.last_repeating_date, apiBookingSlotSession.type, apiBookingSlotSession.location_zones_taken, apiBookingSlotSession.slot_index, apiBookingSlotSession.comment, apiBookingSlotSession.location_part_id, apiBookingSlotSession.location_part_name, apiBookingSlotSession.location_name, apiBookingSlotSession.location_id, apiBookingSlotSession.day, apiBookingSlotSession.repeat, apiBookingSlotSession.activity_type_id, apiBookingSlotSession.color, apiBookingSlotSession.update_repeating, apiBookingSlotSession.update_until_date);
1806
+ const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.title, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name, apiBookingSlotSession.is_overbooked, apiBookingSlotSession.last_repeating_date, apiBookingSlotSession.type, apiBookingSlotSession.slot_index, apiBookingSlotSession.comment, apiBookingSlotSession.day, apiBookingSlotSession.repeat, apiBookingSlotSession.activity_type_id, apiBookingSlotSession.color, apiBookingSlotSession.update_repeating, apiBookingSlotSession.update_until_date, apiBookingSlotSession.bookable_zones_taken, apiBookingSlotSession.bookable_part_id, apiBookingSlotSession.bookable_part_name, apiBookingSlotSession.bookable_name, apiBookingSlotSession.bookable_id);
1688
1807
 
1689
- const bookingCalendarSlotFactory = (apiBookingSlot) => new BookingCalendarSlot(apiBookingSlot.id, apiBookingSlot.calendar_id, apiBookingSlot.calendar_status, apiBookingSlot.location_id, apiBookingSlot.color, apiBookingSlot.day, apiBookingSlot.end_time, apiBookingSlot.group_id, apiBookingSlot.location_name, apiBookingSlot.number_of_available_sessions, apiBookingSlot.sessions && apiBookingSlot.sessions.length ? apiBookingSlot.sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.open_sessions && apiBookingSlot.open_sessions.length ? apiBookingSlot.open_sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.start_time, apiBookingSlot.type, 'none', apiBookingSlot.update_repeating, apiBookingSlot.update_until_date, false, 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiBookingSlot.reserved_time, apiBookingSlot.reserved_time_position, apiBookingSlot.application_times && apiBookingSlot.application_times.length ? apiBookingSlot.application_times.map((apiBookingApplicationTime) => bookingCalendarApplicationTimeFactory(apiBookingApplicationTime)) : [], apiBookingSlot.last_repeating_date);
1808
+ const bookingCalendarSlotFactory = (apiBookingSlot) => new BookingCalendarSlot(apiBookingSlot.id, apiBookingSlot.calendar_id, apiBookingSlot.calendar_status, apiBookingSlot.color, apiBookingSlot.day, apiBookingSlot.end_time, apiBookingSlot.group_id, apiBookingSlot.number_of_available_sessions, apiBookingSlot.sessions && apiBookingSlot.sessions.length ? apiBookingSlot.sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.open_sessions && apiBookingSlot.open_sessions.length ? apiBookingSlot.open_sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.start_time, apiBookingSlot.type, 'none', apiBookingSlot.update_repeating, apiBookingSlot.update_until_date, false, 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiBookingSlot.reserved_time, apiBookingSlot.reserved_time_position, apiBookingSlot.application_times && apiBookingSlot.application_times.length ? apiBookingSlot.application_times.map((apiBookingApplicationTime) => bookingCalendarApplicationTimeFactory(apiBookingApplicationTime)) : [], apiBookingSlot.last_repeating_date, apiBookingSlot.bookable_name, apiBookingSlot.bookable_id);
1690
1809
 
1691
1810
  const bookingSettingsFactory = (apiBookingSettings) => new BookingSettings(apiBookingSettings.id, apiBookingSettings.calendar_step, apiBookingSettings.calendar_min_time, apiBookingSettings.calendar_max_time, apiBookingSettings.calendar_session_duration, apiBookingSettings.should_split_booking_into_zones);
1692
1811
 
@@ -1724,7 +1843,7 @@ const fileFactory = (file) => new FileObject(file.id, file.created, null, typeof
1724
1843
 
1725
1844
  const directoryFactory = (directory) => new Directory(directory.id, directory.club_id, directory.section_id, directory.team_id, directory.created, directory.files.map((file) => fileFactory(file)), directory.name, directory.location_name, directory.updated);
1726
1845
 
1727
- const eventFactory = (apiEvent) => new Event(apiEvent.id, apiEvent.activity_id, apiEvent.activity_type, apiEvent.base_background_color, apiEvent.base_color, apiEvent.base_name, apiEvent.calendar_name, apiEvent.description, apiEvent.end, apiEvent.invitation_id, apiEvent.invitation_response, (apiEvent.invited_members && apiEvent.invited_members.length) ? apiEvent.invited_members.map((invitedMember) => memberActivityInviteFactory(invitedMember)) : [], apiEvent.location, apiEvent.meet_up_place, apiEvent.meet_up_time, apiEvent.member_id, apiEvent.open_activity, apiEvent.start, apiEvent.title, apiEvent.type);
1846
+ const eventFactory = (apiEvent) => new Event(apiEvent.id, apiEvent.activity_id, apiEvent.activity_type, apiEvent.base_background_color, apiEvent.base_color, apiEvent.base_name, apiEvent.calendar_name, apiEvent.description, apiEvent.end, apiEvent.invitation_id, apiEvent.invitation_response, (apiEvent.invited_members && apiEvent.invited_members.length) ? apiEvent.invited_members.map((invitedMember) => memberActivityInviteFactory(invitedMember)) : [], apiEvent.location, apiEvent.meet_up_place, apiEvent.meet_up_time, apiEvent.member_id, apiEvent.open_activity, (apiEvent.participants && apiEvent.participants.length) ? apiEvent.participants.map((participant) => activityParticipantFactory(participant)) : [], apiEvent.start, apiEvent.title, apiEvent.type);
1728
1847
 
1729
1848
  const externalLinkFactory = (apiExternalLink) => new ExternalLink(apiExternalLink.text, apiExternalLink.value);
1730
1849
 
@@ -1782,6 +1901,8 @@ const optionalFeeFactory = (apiOptionalFee) => new OptionalFee(apiOptionalFee.id
1782
1901
 
1783
1902
  const openActivityFactory = (apiOpenActivity) => new OpenActivity(apiOpenActivity.id, apiOpenActivity.activity_group_id, apiOpenActivity.activity_type_id, apiOpenActivity.club_id, apiOpenActivity.location_id, apiOpenActivity.member_id, apiOpenActivity.team_id, apiOpenActivity.activity_location, apiOpenActivity.activity_type_name, apiOpenActivity.allow_maybe, apiOpenActivity.calendar_name, apiOpenActivity.created, apiOpenActivity.current_num_attendants, apiOpenActivity.day, apiOpenActivity.default_fee, apiOpenActivity.description, apiOpenActivity.end, apiOpenActivity.end_time, apiOpenActivity.file, apiOpenActivity.invitation_text, apiOpenActivity.invite_first_days, [], apiOpenActivity.invite_hide_before_sent, apiOpenActivity.invite_last_response_date, apiOpenActivity.invite_remind, apiOpenActivity.invite_remind_receivers, apiOpenActivity.invite_second_days, 'same_as_last', (apiOpenActivity.invited_members && apiOpenActivity.invited_members.length) ? apiOpenActivity.invited_members.map((invitedMember) => memberActivityInviteFactory(invitedMember)) : [], apiOpenActivity.last_response_date, apiOpenActivity.location_name, apiOpenActivity.max_num_attendants, apiOpenActivity.max_num_attendants_type, apiOpenActivity.meet_up_place, apiOpenActivity.meet_up_time, apiOpenActivity.meet_up_time_display, apiOpenActivity.meet_up_time_show, apiOpenActivity.member_invoice, apiOpenActivity.member_name, apiOpenActivity.open_activity, (apiOpenActivity.optional_fees && apiOpenActivity.optional_fees.length) ? apiOpenActivity.optional_fees.map((fee) => optionalFeeFactory(fee)) : [], apiOpenActivity.optional_fee_required, apiOpenActivity.optional_fee_type, 'none', 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiOpenActivity.show_other_invited, apiOpenActivity.start, apiOpenActivity.start_time, apiOpenActivity.status, apiOpenActivity.title, apiOpenActivity.updated, apiOpenActivity.use_invite, false);
1784
1903
 
1904
+ const overbookedBookableItemFactory = (apiOverbookedBookableItem) => new OverbookedBookableItem(apiOverbookedBookableItem.start_time, apiOverbookedBookableItem.end_time, apiOverbookedBookableItem.day, apiOverbookedBookableItem.bookable_name, apiOverbookedBookableItem.session_names);
1905
+
1785
1906
  const overbookedLocationFactory = (apiOverbookedLocation) => new OverbookedLocation(apiOverbookedLocation.start_time, apiOverbookedLocation.end_time, apiOverbookedLocation.day, apiOverbookedLocation.location_name, apiOverbookedLocation.session_names);
1786
1907
 
1787
1908
  const otherMemberFieldFactory = (apiOtherMemberFieldFactory) => new OtherMemberField(apiOtherMemberFieldFactory.display_name, apiOtherMemberFieldFactory.field_name, apiOtherMemberFieldFactory.value);
@@ -2018,24 +2139,11 @@ const TEAM_ACTIVITY_TYPES_PATH = ':teamId/activities/types/';
2018
2139
  const TEAM_CALENDAR_PATH = ':teamId/activities/calendar/';
2019
2140
  const CLUB_ACTIVITY_LOCATIONS_PATH = ':clubId/activities/locations/';
2020
2141
  const CLUB_ACTIVITY_LOCATION_PATH = ':clubId/activities/locations/:locationId/';
2021
- const CLUB_ACTIVITY_LOCATION_GROUPS_PATH = ':clubId/activities/locations/groups/';
2022
- const CLUB_ACTIVITY_LOCATION_GROUP_PATH = ':clubId/activities/locations/groups/:groupId/';
2023
- const CLUB_ACTIVITY_LOCATION_TAGS_PATH = ':clubId/activities/locations/tags/';
2024
- const CLUB_ACTIVITY_LOCATION_TAG_PATH = ':clubId/activities/locations/tags/:tagId/';
2025
- const CLUB_ACTIVITY_LOCATION_PARTS_PATH = ':clubId/activities/locations/:locationId/parts/';
2026
2142
  const CLUB_ACTIVITY_TYPES_PATH = ':clubId/activities/types/';
2027
2143
  const CLUB_ACTIVITY_TYPE_PATH = ':clubId/activities/types/:typeId/';
2028
2144
  const TEAM_ACTIVITY_LOCATIONS_PATH = ':teamId/activities/locations/';
2029
- const TEAM_ACTIVITY_LOCATION_GROUPS_PATH = ':teamId/activities/locations/groups/';
2030
- const TEAM_ACTIVITY_LOCATION_TAGS_PATH = ':teamId/activities/locations/tags/';
2031
- const TEAM_ACTIVITY_LOCATION_PARTS_PATH = ':teamId/activities/locations/:locationId/parts/';
2032
2145
  const SECTION_ACTIVITY_LOCATIONS_PATH = ':sectionId/activities/locations/';
2033
2146
  const SECTION_ACTIVITY_LOCATION_PATH = ':sectionId/activities/locations/:locationId/';
2034
- const SECTION_ACTIVITY_LOCATION_GROUPS_PATH = ':sectionId/activities/locations/groups/';
2035
- const SECTION_ACTIVITY_LOCATION_GROUP_PATH = ':sectionId/activities/locations/groups/:groupId/';
2036
- const SECTION_ACTIVITY_LOCATION_TAGS_PATH = ':sectionId/activities/locations/tags/';
2037
- const SECTION_ACTIVITY_LOCATION_TAG_PATH = ':sectionId/activities/locations/tags/:tagId/';
2038
- const SECTION_ACTIVITY_LOCATION_PARTS_PATH = ':sectionId/activities/locations/:locationId/parts/';
2039
2147
  const SECTION_ACTIVITY_TYPES_PATH = ':sectionId/activities/types/';
2040
2148
  const SECTION_ACTIVITY_TYPE_PATH = ':sectionId/activities/types/:typeId/';
2041
2149
  class ActivityService {
@@ -2236,179 +2344,6 @@ class ActivityService {
2236
2344
  locationId: location.id
2237
2345
  }, location);
2238
2346
  }
2239
- getActivityLocationGroups(role, clubOrSectionOrTeamId) {
2240
- if (role == Role.ClubAdmin) {
2241
- return this.getClubActivityLocationGroups(clubOrSectionOrTeamId);
2242
- }
2243
- else if (role == Role.SectionAdmin) {
2244
- return this.getSectionActivityLocationGroups(clubOrSectionOrTeamId);
2245
- }
2246
- return this.getTeamActivityLocationGroups(clubOrSectionOrTeamId);
2247
- }
2248
- getClubActivityLocationGroups(clubId) {
2249
- return this.apiService
2250
- .getCollection(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUPS_PATH, { clubId }, { params: { limit: 'null' } });
2251
- }
2252
- getSectionActivityLocationGroups(sectionId) {
2253
- return this.apiService
2254
- .getCollection(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUPS_PATH, { sectionId }, { params: { limit: 'null' } });
2255
- }
2256
- getTeamActivityLocationGroups(teamId) {
2257
- return this.apiService
2258
- .getCollection(activityLocationGroupFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_GROUPS_PATH, { teamId }, { params: { limit: 'null' } });
2259
- }
2260
- updateActivityLocationGroup(role, clubOrSectionOrTeamId, locationGroup) {
2261
- if (role === Role.ClubAdmin) {
2262
- return this.updateClubActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2263
- }
2264
- return this.updateSectionActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2265
- }
2266
- updateClubActivityLocationGroup(clubId, locationGroup) {
2267
- return this.apiService
2268
- .updateResource(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUP_PATH, {
2269
- clubId,
2270
- groupId: locationGroup.id
2271
- }, locationGroup);
2272
- }
2273
- updateSectionActivityLocationGroup(sectionId, locationGroup) {
2274
- return this.apiService
2275
- .updateResource(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUP_PATH, {
2276
- sectionId,
2277
- groupId: locationGroup.id
2278
- }, locationGroup);
2279
- }
2280
- createActivityLocationGroup(role, clubOrSectionOrTeamId, locationGroup) {
2281
- if (role === Role.ClubAdmin) {
2282
- return this.createClubActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2283
- }
2284
- return this.createSectionActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2285
- }
2286
- createClubActivityLocationGroup(clubId, locationGroup) {
2287
- delete locationGroup.id;
2288
- return this.apiService
2289
- .postResource(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUPS_PATH, {
2290
- clubId,
2291
- }, locationGroup);
2292
- }
2293
- createSectionActivityLocationGroup(sectionId, locationGroup) {
2294
- delete locationGroup.id;
2295
- return this.apiService
2296
- .postResource(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUPS_PATH, {
2297
- sectionId,
2298
- }, locationGroup);
2299
- }
2300
- getActivityLocationTags(role, clubOrSectionOrTeamId) {
2301
- if (role == Role.ClubAdmin) {
2302
- return this.getClubActivityLocationTags(clubOrSectionOrTeamId);
2303
- }
2304
- else if (role == Role.SectionAdmin) {
2305
- return this.getSectionActivityLocationTags(clubOrSectionOrTeamId);
2306
- }
2307
- return this.getTeamActivityLocationTags(clubOrSectionOrTeamId);
2308
- }
2309
- getClubActivityLocationTags(clubId) {
2310
- return this.apiService
2311
- .getCollection(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAGS_PATH, { clubId }, { params: { limit: 'null' } });
2312
- }
2313
- getSectionActivityLocationTags(sectionId) {
2314
- return this.apiService
2315
- .getCollection(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAGS_PATH, { sectionId }, { params: { limit: 'null' } });
2316
- }
2317
- getTeamActivityLocationTags(teamId) {
2318
- return this.apiService
2319
- .getCollection(activityLocationTagFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_TAGS_PATH, { teamId }, { params: { limit: 'null' } });
2320
- }
2321
- createActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2322
- if (role == Role.ClubAdmin) {
2323
- return this.createClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2324
- }
2325
- else if (role == Role.SectionAdmin) {
2326
- return this.createSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2327
- }
2328
- return this.createTeamActivityLocationTag(clubOrSectionOrTeamId, tag);
2329
- }
2330
- createClubActivityLocationTag(clubId, tag) {
2331
- delete tag.id;
2332
- return this.apiService
2333
- .postResource(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAGS_PATH, {
2334
- clubId,
2335
- }, tag);
2336
- }
2337
- createSectionActivityLocationTag(sectionId, tag) {
2338
- delete tag.id;
2339
- return this.apiService
2340
- .postResource(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAGS_PATH, {
2341
- sectionId,
2342
- }, tag);
2343
- }
2344
- createTeamActivityLocationTag(teamId, tag) {
2345
- delete tag.id;
2346
- return this.apiService
2347
- .postResource(activityLocationTagFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_TAGS_PATH, {
2348
- teamId,
2349
- }, tag);
2350
- }
2351
- updateActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2352
- if (role == Role.ClubAdmin) {
2353
- return this.updateClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2354
- }
2355
- return this.updateSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2356
- }
2357
- updateClubActivityLocationTag(clubId, tag) {
2358
- return this.apiService
2359
- .updateResource(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAG_PATH, {
2360
- clubId,
2361
- tagId: tag.id,
2362
- }, tag);
2363
- }
2364
- updateSectionActivityLocationTag(sectionId, tag) {
2365
- return this.apiService
2366
- .updateResource(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAG_PATH, {
2367
- sectionId,
2368
- tagId: tag.id,
2369
- }, tag);
2370
- }
2371
- deleteActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2372
- if (role == Role.ClubAdmin) {
2373
- return this.deleteClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2374
- }
2375
- return this.deleteSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2376
- }
2377
- deleteClubActivityLocationTag(clubId, tag) {
2378
- return this.apiService
2379
- .deleteResource(Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAG_PATH, {
2380
- clubId,
2381
- tagId: tag.id,
2382
- });
2383
- }
2384
- deleteSectionActivityLocationTag(sectionId, tag) {
2385
- return this.apiService
2386
- .deleteResource(Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAG_PATH, {
2387
- sectionId,
2388
- tagId: tag.id,
2389
- });
2390
- }
2391
- getActivityLocationParts(role, clubOrSectionOrTeamId, locationId) {
2392
- if (role == Role.ClubAdmin) {
2393
- return this.getClubActivityLocationParts(clubOrSectionOrTeamId, locationId);
2394
- }
2395
- else if (role == Role.SectionAdmin) {
2396
- return this.getSectionActivityLocationParts(clubOrSectionOrTeamId, locationId);
2397
- }
2398
- return this.getTeamActivityLocationParts(clubOrSectionOrTeamId, locationId);
2399
- }
2400
- getClubActivityLocationParts(clubId, locationId) {
2401
- return this.apiService
2402
- .getCollection(activityLocationPartFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_PARTS_PATH, { clubId, locationId }, { params: { limit: 'null' } });
2403
- }
2404
- getSectionActivityLocationParts(sectionId, locationId) {
2405
- return this.apiService
2406
- .getCollection(activityLocationPartFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_PARTS_PATH, { sectionId, locationId }, { params: { limit: 'null' } });
2407
- }
2408
- getTeamActivityLocationParts(teamId, locationId) {
2409
- return this.apiService
2410
- .getCollection(activityLocationPartFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_PARTS_PATH, { teamId, locationId }, { params: { limit: 'null' } });
2411
- }
2412
2347
  getTeamActivityNew(teamId) {
2413
2348
  return this.apiService
2414
2349
  .getResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_NEW_PATH, { teamId });
@@ -2634,6 +2569,259 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
2634
2569
  }]
2635
2570
  }], ctorParameters: function () { return [{ type: ApiService }]; } });
2636
2571
 
2572
+ const CLUB_BOOKABLES_PATH = ':clubId/activities/bookables/';
2573
+ const CLUB_BOOKABLE_PATH = ':clubId/activities/bookables/:bookableId/';
2574
+ const CLUB_BOOKABLE_GROUPS_PATH = ':clubId/activities/bookables/groups/';
2575
+ const CLUB_BOOKABLE_GROUP_PATH = ':clubId/activities/bookables/groups/:groupId/';
2576
+ const CLUB_BOOKABLE_TAGS_PATH = ':clubId/activities/bookables/tags/';
2577
+ const CLUB_BOOKABLE_TAG_PATH = ':clubId/activities/bookables/tags/:tagId/';
2578
+ const CLUB_BOOKABLE_PARTS_PATH = ':clubId/activities/bookables/:bookableId/parts/';
2579
+ const TEAM_BOOKABLES_PATH = ':teamId/activities/bookables/';
2580
+ const TEAM_BOOKABLE_GROUPS_PATH = ':teamId/activities/bookables/groups/';
2581
+ const TEAM_BOOKABLE_TAGS_PATH = ':teamId/activities/bookables/tags/';
2582
+ const TEAM_BOOKABLE_PARTS_PATH = ':teamId/activities/bookables/:bookableId/parts/';
2583
+ const SECTION_BOOKABLES_PATH = ':sectionId/activities/bookables/';
2584
+ const SECTION_BOOKABLE_PATH = ':sectionId/activities/bookables/:bookableId/';
2585
+ const SECTION_BOOKABLE_GROUPS_PATH = ':sectionId/activities/bookables/groups/';
2586
+ const SECTION_BOOKABLE_GROUP_PATH = ':sectionId/activities/bookables/groups/:groupId/';
2587
+ const SECTION_BOOKABLE_TAGS_PATH = ':sectionId/activities/bookables/tags/';
2588
+ const SECTION_BOOKABLE_TAG_PATH = ':sectionId/activities/bookables/tags/:tagId/';
2589
+ const SECTION_BOOKABLE_PARTS_PATH = ':sectionId/activities/bookables/:bookableId/parts/';
2590
+ class BookableService {
2591
+ constructor(apiService) {
2592
+ this.apiService = apiService;
2593
+ }
2594
+ // region Bookable Items
2595
+ getBookableItems(role, clubOrSectionOrTeamId) {
2596
+ if (role == Role.ClubAdmin) {
2597
+ return this.getClubBookableItems(clubOrSectionOrTeamId);
2598
+ }
2599
+ else if (role == Role.SectionAdmin) {
2600
+ return this.getSectionBookableItems(clubOrSectionOrTeamId);
2601
+ }
2602
+ return this.getTeamBookableItems(clubOrSectionOrTeamId);
2603
+ }
2604
+ getTeamBookableItems(teamId) {
2605
+ return this.apiService
2606
+ .getCollection(bookableItemFactory, Role.TeamAdmin, TEAM_BOOKABLES_PATH, { teamId }, { params: { limit: 'null' } });
2607
+ }
2608
+ getClubBookableItems(clubId) {
2609
+ return this.apiService
2610
+ .getCollection(bookableItemFactory, Role.ClubAdmin, CLUB_BOOKABLES_PATH, { clubId }, { params: { limit: 'null' } });
2611
+ }
2612
+ getSectionBookableItems(sectionId) {
2613
+ return this.apiService
2614
+ .getCollection(bookableItemFactory, Role.SectionAdmin, SECTION_BOOKABLES_PATH, { sectionId }, { params: { limit: 'null' } });
2615
+ }
2616
+ updateBookableItem(role, clubOrSectionOrTeamId, bookableItem) {
2617
+ if (role === Role.ClubAdmin) {
2618
+ return this.updateClubBookableItem(clubOrSectionOrTeamId, bookableItem);
2619
+ }
2620
+ return this.updateSectionBookableItem(clubOrSectionOrTeamId, bookableItem);
2621
+ }
2622
+ updateClubBookableItem(clubId, bookableItem) {
2623
+ return this.apiService
2624
+ .updateResource(bookableItemFactory, Role.ClubAdmin, CLUB_BOOKABLE_PATH, {
2625
+ clubId,
2626
+ bookableId: bookableItem.id
2627
+ }, bookableItem);
2628
+ }
2629
+ updateSectionBookableItem(sectionId, bookableItem) {
2630
+ return this.apiService
2631
+ .updateResource(bookableItemFactory, Role.SectionAdmin, SECTION_BOOKABLE_PATH, {
2632
+ sectionId,
2633
+ bookableId: bookableItem.id
2634
+ }, bookableItem);
2635
+ }
2636
+ // endregion
2637
+ // region Bookable Groups
2638
+ getBookableGroups(role, clubOrSectionOrTeamId) {
2639
+ if (role == Role.ClubAdmin) {
2640
+ return this.getClubBookableGroups(clubOrSectionOrTeamId);
2641
+ }
2642
+ else if (role == Role.SectionAdmin) {
2643
+ return this.getSectionBookableGroups(clubOrSectionOrTeamId);
2644
+ }
2645
+ return this.getTeamBookableGroups(clubOrSectionOrTeamId);
2646
+ }
2647
+ getClubBookableGroups(clubId) {
2648
+ return this.apiService
2649
+ .getCollection(bookableGroupFactory, Role.ClubAdmin, CLUB_BOOKABLE_GROUPS_PATH, { clubId }, { params: { limit: 'null' } });
2650
+ }
2651
+ getSectionBookableGroups(sectionId) {
2652
+ return this.apiService
2653
+ .getCollection(bookableGroupFactory, Role.SectionAdmin, SECTION_BOOKABLE_GROUPS_PATH, { sectionId }, { params: { limit: 'null' } });
2654
+ }
2655
+ getTeamBookableGroups(teamId) {
2656
+ return this.apiService
2657
+ .getCollection(bookableGroupFactory, Role.TeamAdmin, TEAM_BOOKABLE_GROUPS_PATH, { teamId }, { params: { limit: 'null' } });
2658
+ }
2659
+ updateBookableGroup(role, clubOrSectionOrTeamId, bookableGroup) {
2660
+ if (role === Role.ClubAdmin) {
2661
+ return this.updateClubBookableGroup(clubOrSectionOrTeamId, bookableGroup);
2662
+ }
2663
+ return this.updateSectionBookableGroup(clubOrSectionOrTeamId, bookableGroup);
2664
+ }
2665
+ updateClubBookableGroup(clubId, bookableGroup) {
2666
+ return this.apiService
2667
+ .updateResource(bookableGroupFactory, Role.ClubAdmin, CLUB_BOOKABLE_GROUP_PATH, {
2668
+ clubId,
2669
+ groupId: bookableGroup.id
2670
+ }, bookableGroup);
2671
+ }
2672
+ updateSectionBookableGroup(sectionId, bookableGroup) {
2673
+ return this.apiService
2674
+ .updateResource(bookableGroupFactory, Role.SectionAdmin, SECTION_BOOKABLE_GROUP_PATH, {
2675
+ sectionId,
2676
+ groupId: bookableGroup.id
2677
+ }, bookableGroup);
2678
+ }
2679
+ createBookableGroup(role, clubOrSectionOrTeamId, bookableGroup) {
2680
+ if (role === Role.ClubAdmin) {
2681
+ return this.createClubBookableGroup(clubOrSectionOrTeamId, bookableGroup);
2682
+ }
2683
+ return this.createSectionBookableGroup(clubOrSectionOrTeamId, bookableGroup);
2684
+ }
2685
+ createClubBookableGroup(clubId, bookableGroup) {
2686
+ delete bookableGroup.id;
2687
+ return this.apiService
2688
+ .postResource(bookableGroupFactory, Role.ClubAdmin, CLUB_BOOKABLE_GROUPS_PATH, {
2689
+ clubId,
2690
+ }, bookableGroup);
2691
+ }
2692
+ createSectionBookableGroup(sectionId, bookableGroup) {
2693
+ delete bookableGroup.id;
2694
+ return this.apiService
2695
+ .postResource(bookableGroupFactory, Role.SectionAdmin, SECTION_BOOKABLE_GROUPS_PATH, {
2696
+ sectionId,
2697
+ }, bookableGroup);
2698
+ }
2699
+ // endregion
2700
+ // region Bookable Tags
2701
+ getBookableTags(role, clubOrSectionOrTeamId) {
2702
+ if (role == Role.ClubAdmin) {
2703
+ return this.getClubBookableTags(clubOrSectionOrTeamId);
2704
+ }
2705
+ else if (role == Role.SectionAdmin) {
2706
+ return this.getSectionBookableTags(clubOrSectionOrTeamId);
2707
+ }
2708
+ return this.getTeamBookableTags(clubOrSectionOrTeamId);
2709
+ }
2710
+ getClubBookableTags(clubId) {
2711
+ return this.apiService
2712
+ .getCollection(bookableTagFactory, Role.ClubAdmin, CLUB_BOOKABLE_TAGS_PATH, { clubId }, { params: { limit: 'null' } });
2713
+ }
2714
+ getSectionBookableTags(sectionId) {
2715
+ return this.apiService
2716
+ .getCollection(bookableTagFactory, Role.SectionAdmin, SECTION_BOOKABLE_TAGS_PATH, { sectionId }, { params: { limit: 'null' } });
2717
+ }
2718
+ getTeamBookableTags(teamId) {
2719
+ return this.apiService
2720
+ .getCollection(bookableTagFactory, Role.TeamAdmin, TEAM_BOOKABLE_TAGS_PATH, { teamId }, { params: { limit: 'null' } });
2721
+ }
2722
+ createBookableTag(role, clubOrSectionOrTeamId, tag) {
2723
+ if (role == Role.ClubAdmin) {
2724
+ return this.createClubBookableTag(clubOrSectionOrTeamId, tag);
2725
+ }
2726
+ else if (role == Role.SectionAdmin) {
2727
+ return this.createSectionBookableTag(clubOrSectionOrTeamId, tag);
2728
+ }
2729
+ return this.createTeamBookableTag(clubOrSectionOrTeamId, tag);
2730
+ }
2731
+ createClubBookableTag(clubId, tag) {
2732
+ delete tag.id;
2733
+ return this.apiService
2734
+ .postResource(bookableTagFactory, Role.ClubAdmin, CLUB_BOOKABLE_TAGS_PATH, {
2735
+ clubId,
2736
+ }, tag);
2737
+ }
2738
+ createSectionBookableTag(sectionId, tag) {
2739
+ delete tag.id;
2740
+ return this.apiService
2741
+ .postResource(bookableTagFactory, Role.SectionAdmin, SECTION_BOOKABLE_TAGS_PATH, {
2742
+ sectionId,
2743
+ }, tag);
2744
+ }
2745
+ createTeamBookableTag(teamId, tag) {
2746
+ delete tag.id;
2747
+ return this.apiService
2748
+ .postResource(bookableTagFactory, Role.TeamAdmin, TEAM_BOOKABLE_TAGS_PATH, {
2749
+ teamId,
2750
+ }, tag);
2751
+ }
2752
+ updateBookableTag(role, clubOrSectionOrTeamId, tag) {
2753
+ if (role == Role.ClubAdmin) {
2754
+ return this.updateClubBookableTag(clubOrSectionOrTeamId, tag);
2755
+ }
2756
+ return this.updateSectionBookableTag(clubOrSectionOrTeamId, tag);
2757
+ }
2758
+ updateClubBookableTag(clubId, tag) {
2759
+ return this.apiService
2760
+ .updateResource(bookableTagFactory, Role.ClubAdmin, CLUB_BOOKABLE_TAG_PATH, {
2761
+ clubId,
2762
+ tagId: tag.id,
2763
+ }, tag);
2764
+ }
2765
+ updateSectionBookableTag(sectionId, tag) {
2766
+ return this.apiService
2767
+ .updateResource(bookableTagFactory, Role.SectionAdmin, SECTION_BOOKABLE_TAG_PATH, {
2768
+ sectionId,
2769
+ tagId: tag.id,
2770
+ }, tag);
2771
+ }
2772
+ deleteBookableTag(role, clubOrSectionOrTeamId, tag) {
2773
+ if (role == Role.ClubAdmin) {
2774
+ return this.deleteClubBookableTag(clubOrSectionOrTeamId, tag);
2775
+ }
2776
+ return this.deleteSectionBookableTag(clubOrSectionOrTeamId, tag);
2777
+ }
2778
+ deleteClubBookableTag(clubId, tag) {
2779
+ return this.apiService
2780
+ .deleteResource(Role.ClubAdmin, CLUB_BOOKABLE_TAG_PATH, {
2781
+ clubId,
2782
+ tagId: tag.id,
2783
+ });
2784
+ }
2785
+ deleteSectionBookableTag(sectionId, tag) {
2786
+ return this.apiService
2787
+ .deleteResource(Role.SectionAdmin, SECTION_BOOKABLE_TAG_PATH, {
2788
+ sectionId,
2789
+ tagId: tag.id,
2790
+ });
2791
+ }
2792
+ // endregion
2793
+ // region Bookable Parts
2794
+ getBookableParts(role, clubOrSectionOrTeamId, bookableId) {
2795
+ if (role == Role.ClubAdmin) {
2796
+ return this.getClubBookableParts(clubOrSectionOrTeamId, bookableId);
2797
+ }
2798
+ else if (role == Role.SectionAdmin) {
2799
+ return this.getSectionBookableParts(clubOrSectionOrTeamId, bookableId);
2800
+ }
2801
+ return this.getTeamBookableParts(clubOrSectionOrTeamId, bookableId);
2802
+ }
2803
+ getClubBookableParts(clubId, bookableId) {
2804
+ return this.apiService
2805
+ .getCollection(bookablePartFactory, Role.ClubAdmin, CLUB_BOOKABLE_PARTS_PATH, { clubId, bookableId }, { params: { limit: 'null' } });
2806
+ }
2807
+ getSectionBookableParts(sectionId, bookableId) {
2808
+ return this.apiService
2809
+ .getCollection(bookablePartFactory, Role.SectionAdmin, SECTION_BOOKABLE_PARTS_PATH, { sectionId, bookableId }, { params: { limit: 'null' } });
2810
+ }
2811
+ getTeamBookableParts(teamId, bookableId) {
2812
+ return this.apiService
2813
+ .getCollection(bookablePartFactory, Role.TeamAdmin, TEAM_BOOKABLE_PARTS_PATH, { teamId, bookableId }, { params: { limit: 'null' } });
2814
+ }
2815
+ }
2816
+ BookableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookableService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2817
+ BookableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookableService, providedIn: 'root' });
2818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookableService, decorators: [{
2819
+ type: Injectable,
2820
+ args: [{
2821
+ providedIn: 'root'
2822
+ }]
2823
+ }], ctorParameters: function () { return [{ type: ApiService }]; } });
2824
+
2637
2825
  const CLUB_BOOKING_CALENDARS_PATH = ':clubId/activities/calendars/';
2638
2826
  const CLUB_BOOKING_CALENDAR_PATH = ':clubId/activities/calendars/:id/';
2639
2827
  const CLUB_BOOKING_CALENDAR_SLOTS_PATH = ':clubId/activities/slots/';
@@ -2649,8 +2837,8 @@ const CLUB_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':clubId/activities/sessio
2649
2837
  const CLUB_BOOKING_SETTINGS_PATH = ':clubId/activities/booking-settings/';
2650
2838
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':clubId/activities/application-times/:id/';
2651
2839
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':clubId/activities/application-times/';
2652
- const CLUB_BOOKING_OVERBOOKED_LOCATIONS_PATH = ':clubId/activities/overbooked/locations/';
2653
2840
  const CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH = ':clubId/activities/overbooked/sessions/';
2841
+ const CLUB_BOOKING_OVERBOOKED_BOOKABLES_PATH = ':clubId/activities/overbooked/bookables/';
2654
2842
  const SECTION_BOOKING_CALENDARS_PATH = ':sectionId/activities/calendars/';
2655
2843
  const SECTION_BOOKING_CALENDAR_PATH = ':sectionId/activities/calendars/:id/';
2656
2844
  const SECTION_BOOKING_CALENDAR_SLOTS_PATH = ':sectionId/activities/slots/';
@@ -2666,8 +2854,8 @@ const SECTION_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':sectionId/activities/
2666
2854
  const SECTION_BOOKING_SETTINGS_PATH = ':sectionId/activities/booking-settings/';
2667
2855
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':sectionId/activities/application-times/:id/';
2668
2856
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':sectionId/activities/application-times/';
2669
- const SECTION_BOOKING_OVERBOOKED_LOCATIONS_PATH = ':sectionId/activities/overbooked/locations/';
2670
2857
  const SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH = ':sectionId/activities/overbooked/sessions/';
2858
+ const SECTION_BOOKING_OVERBOOKED_BOOKABLES_PATH = ':sectionId/activities/overbooked/bookables/';
2671
2859
  const TEAM_BOOKING_CALENDARS_PATH = ':teamId/activities/calendars/';
2672
2860
  const TEAM_BOOKING_CALENDAR_SLOTS_PATH = ':teamId/activities/slots/';
2673
2861
  const TEAM_BOOKING_CALENDAR_SLOTS_SYNC_PATH = ':teamId/activities/slots/sync/';
@@ -2679,21 +2867,22 @@ const TEAM_BOOKING_CALENDAR_SLOT_PATH = ':teamId/activities/slots/:id/';
2679
2867
  const TEAM_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':teamId/activities/application-times/';
2680
2868
  const TEAM_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':teamId/activities/application-times/:id/';
2681
2869
  class BookingSlotFilter {
2682
- constructor(startDate = null, endDate = null, calendarIds = [], locationIds = [], tagIds = [], teamIds = [], locationGroupIds = [], activityTypeIds = [], hasOpenSessions = null, showApplicationTimes = null, sortBy = null) {
2870
+ constructor(startDate = null, endDate = null, calendarIds = [], locationIds = [], bookableItemIds = [], tagIds = [], teamIds = [], bookableGroupIds = [], activityTypeIds = [], hasOpenSessions = null, showApplicationTimes = null, sortBy = null) {
2683
2871
  this.startDate = startDate;
2684
2872
  this.endDate = endDate;
2685
2873
  this.calendarIds = calendarIds;
2686
2874
  this.locationIds = locationIds;
2875
+ this.bookableItemIds = bookableItemIds;
2687
2876
  this.tagIds = tagIds;
2688
2877
  this.teamIds = teamIds;
2689
- this.locationGroupIds = locationGroupIds;
2878
+ this.bookableGroupIds = bookableGroupIds;
2690
2879
  this.activityTypeIds = activityTypeIds;
2691
2880
  this.hasOpenSessions = hasOpenSessions;
2692
2881
  this.showApplicationTimes = showApplicationTimes;
2693
2882
  this.sortBy = sortBy;
2694
2883
  }
2695
2884
  static fromFilter(filter) {
2696
- return new this(filter.startDate, filter.endDate, filter.calendarIds, filter.locationIds, filter.tagIds, filter.teamIds, filter.locationGroupIds, filter.activityTypeIds, filter.hasOpenSessions, filter.showApplicationTimes, filter.sortBy);
2885
+ return new this(filter.startDate, filter.endDate, filter.calendarIds, filter.locationIds, filter.bookableItemIds, filter.tagIds, filter.teamIds, filter.bookableGroupIds, filter.activityTypeIds, filter.hasOpenSessions, filter.showApplicationTimes, filter.sortBy);
2697
2886
  }
2698
2887
  toParams() {
2699
2888
  const params = { limit: 'null' };
@@ -2709,11 +2898,14 @@ class BookingSlotFilter {
2709
2898
  if (this.locationIds && this.locationIds.length) {
2710
2899
  params['location_id'] = this.locationIds.join(',');
2711
2900
  }
2712
- if (this.locationGroupIds && this.locationGroupIds.length) {
2713
- params['location_group_id'] = this.locationGroupIds.join(',');
2901
+ if (this.bookableItemIds && this.bookableItemIds.length) {
2902
+ params['bookable_id'] = this.bookableItemIds.join(',');
2903
+ }
2904
+ if (this.bookableGroupIds && this.bookableGroupIds.length) {
2905
+ params['bookable_group_id'] = this.bookableGroupIds.join(',');
2714
2906
  }
2715
2907
  if (this.tagIds && this.tagIds.length) {
2716
- params['tag_id'] = this.tagIds.join(',');
2908
+ params['bookable_tag_id'] = this.tagIds.join(',');
2717
2909
  }
2718
2910
  if (this.teamIds && this.teamIds.length) {
2719
2911
  params['team_id'] = this.teamIds.join(',');
@@ -3366,46 +3558,46 @@ class BookingCalendarService {
3366
3558
  });
3367
3559
  }
3368
3560
  // endregion
3369
- // region Overbooked locations
3370
- getOverbookedLocations(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3561
+ // region Overbooked sessions
3562
+ getOverbookedSessions(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3371
3563
  if (role == Role.ClubAdmin) {
3372
- return this.getClubOverbookedLocations(clubOrSectionOrTeamId, bookingSlotFilter);
3564
+ return this.getClubOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3373
3565
  }
3374
- return this.getSectionOverbookedLocations(clubOrSectionOrTeamId, bookingSlotFilter);
3566
+ return this.getSectionOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3375
3567
  }
3376
- getClubOverbookedLocations(clubId, bookingSlotFilter) {
3568
+ getClubOverbookedSessions(clubId, bookingSlotFilter) {
3377
3569
  const params = bookingSlotFilter.toParams();
3378
3570
  return this.apiService
3379
- .getCollection(overbookedLocationFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_LOCATIONS_PATH, { clubId }, {
3571
+ .getCollection(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH, { clubId }, {
3380
3572
  params
3381
3573
  });
3382
3574
  }
3383
- getSectionOverbookedLocations(sectionId, bookingSlotFilter) {
3575
+ getSectionOverbookedSessions(sectionId, bookingSlotFilter) {
3384
3576
  const params = bookingSlotFilter.toParams();
3385
3577
  return this.apiService
3386
- .getCollection(overbookedLocationFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_LOCATIONS_PATH, { sectionId }, {
3578
+ .getCollection(bookingCalendarSlotSessionFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH, { sectionId }, {
3387
3579
  params
3388
3580
  });
3389
3581
  }
3390
3582
  // endregion
3391
- // region Overbooked sessions
3392
- getOverbookedSessions(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3583
+ // region Overbooked bookables
3584
+ getOverbookedBookables(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3393
3585
  if (role == Role.ClubAdmin) {
3394
- return this.getClubOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3586
+ return this.getClubOverbookedBookables(clubOrSectionOrTeamId, bookingSlotFilter);
3395
3587
  }
3396
- return this.getSectionOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3588
+ return this.getSectionOverbookedBookables(clubOrSectionOrTeamId, bookingSlotFilter);
3397
3589
  }
3398
- getClubOverbookedSessions(clubId, bookingSlotFilter) {
3590
+ getClubOverbookedBookables(clubId, bookingSlotFilter) {
3399
3591
  const params = bookingSlotFilter.toParams();
3400
3592
  return this.apiService
3401
- .getCollection(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH, { clubId }, {
3593
+ .getCollection(overbookedBookableItemFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_BOOKABLES_PATH, { clubId }, {
3402
3594
  params
3403
3595
  });
3404
3596
  }
3405
- getSectionOverbookedSessions(sectionId, bookingSlotFilter) {
3597
+ getSectionOverbookedBookables(sectionId, bookingSlotFilter) {
3406
3598
  const params = bookingSlotFilter.toParams();
3407
3599
  return this.apiService
3408
- .getCollection(bookingCalendarSlotSessionFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH, { sectionId }, {
3600
+ .getCollection(overbookedBookableItemFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_BOOKABLES_PATH, { sectionId }, {
3409
3601
  params
3410
3602
  });
3411
3603
  }
@@ -4614,5 +4806,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
4614
4806
  * Generated bundle index. Do not edit.
4615
4807
  */
4616
4808
 
4617
- export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityLocationPart, ActivityLocationTag, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookingCalendar, BookingCalendarApplicationTime, BookingCalendarService, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, BookingSlotFilter, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, GroupRole, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, MaintenanceModeService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormField, MemberPublicFormFieldOption, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberType, MemberValidationSettings, News, NewsService, OpenActivity, OptionalFee, OtherMember, OtherMemberField, OverbookedLocation, Partner, PaymentAttempt, PaymentAttemptService, PublicAuthentication, RegistrationQRCode, RegistrationQRCodeService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
4809
+ export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityLocationPart, ActivityLocationTag, ActivityParticipant, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookableGroup, BookableItem, BookablePart, BookableService, BookableTag, BookingCalendar, BookingCalendarApplicationTime, BookingCalendarService, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, BookingSlotFilter, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, GroupRole, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, MaintenanceModeService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormField, MemberPublicFormFieldOption, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberType, MemberValidationSettings, News, NewsService, OpenActivity, OptionalFee, OtherMember, OtherMemberField, OverbookedBookableItem, OverbookedLocation, Partner, PaymentAttempt, PaymentAttemptService, PublicAuthentication, RegistrationQRCode, RegistrationQRCodeService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
4618
4810
  //# sourceMappingURL=myclub_se-data-access.mjs.map