@myclub_se/data-access 1.5.2 → 1.6.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 (45) hide show
  1. package/esm2020/lib/api-models/api-booking-calendar-slot-session.mjs +2 -0
  2. package/esm2020/lib/api-models/api-booking-calendar-slot.mjs +2 -0
  3. package/esm2020/lib/api-models/api-booking-calendar.mjs +2 -0
  4. package/esm2020/lib/api-models/api-member/api-member-attribute.mjs +1 -1
  5. package/esm2020/lib/api-models/api-member-activity-invite.mjs +1 -1
  6. package/esm2020/lib/api-models/index.mjs +4 -1
  7. package/esm2020/lib/models/booking-calendar-slot-session.mjs +26 -0
  8. package/esm2020/lib/models/booking-calendar-slot.mjs +29 -0
  9. package/esm2020/lib/models/booking-calendar.mjs +28 -0
  10. package/esm2020/lib/models/index.mjs +4 -1
  11. package/esm2020/lib/models/member/member-attribute.mjs +12 -3
  12. package/esm2020/lib/models/member-activity-invite.mjs +3 -2
  13. package/esm2020/lib/services/activity.service.mjs +27 -13
  14. package/esm2020/lib/services/booking-calendar.service.mjs +143 -0
  15. package/esm2020/lib/services/factories/booking-calendar-factory.mjs +3 -0
  16. package/esm2020/lib/services/factories/booking-calendar-slot-factory.mjs +4 -0
  17. package/esm2020/lib/services/factories/booking-calendar-slot-session-factory.mjs +3 -0
  18. package/esm2020/lib/services/factories/member-attribute-factory.mjs +2 -2
  19. package/esm2020/lib/services/factories/member-invite-factory.mjs +2 -2
  20. package/esm2020/lib/services/index.mjs +2 -1
  21. package/esm2020/lib/types/booking-calendar-slot-type.mjs +2 -0
  22. package/fesm2015/myclub_se-data-access.mjs +264 -17
  23. package/fesm2015/myclub_se-data-access.mjs.map +1 -1
  24. package/fesm2020/myclub_se-data-access.mjs +263 -17
  25. package/fesm2020/myclub_se-data-access.mjs.map +1 -1
  26. package/lib/api-models/api-booking-calendar-slot-session.d.ts +10 -0
  27. package/lib/api-models/api-booking-calendar-slot.d.ts +16 -0
  28. package/lib/api-models/api-booking-calendar.d.ts +11 -0
  29. package/lib/api-models/api-member/api-member-attribute.d.ts +1 -1
  30. package/lib/api-models/api-member-activity-invite.d.ts +1 -0
  31. package/lib/api-models/index.d.ts +3 -0
  32. package/lib/models/booking-calendar-slot-session.d.ts +22 -0
  33. package/lib/models/booking-calendar-slot.d.ts +27 -0
  34. package/lib/models/booking-calendar.d.ts +24 -0
  35. package/lib/models/index.d.ts +3 -0
  36. package/lib/models/member/member-attribute.d.ts +9 -1
  37. package/lib/models/member-activity-invite.d.ts +2 -1
  38. package/lib/services/activity.service.d.ts +2 -0
  39. package/lib/services/booking-calendar.service.d.ts +27 -0
  40. package/lib/services/factories/booking-calendar-factory.d.ts +3 -0
  41. package/lib/services/factories/booking-calendar-slot-factory.d.ts +3 -0
  42. package/lib/services/factories/booking-calendar-slot-session-factory.d.ts +3 -0
  43. package/lib/services/index.d.ts +1 -0
  44. package/lib/types/booking-calendar-slot-type.d.ts +1 -0
  45. package/package.json +1 -1
@@ -218,6 +218,86 @@ class Authentication {
218
218
  }
219
219
  }
220
220
 
221
+ class BookingCalendar {
222
+ constructor(id, club_id, section_id, team_id, club_name, color, name, section_name, team_name) {
223
+ this.id = id;
224
+ this.club_id = club_id;
225
+ this.section_id = section_id;
226
+ this.team_id = team_id;
227
+ this.club_name = club_name;
228
+ this.color = color;
229
+ this.name = name;
230
+ this.section_name = section_name;
231
+ this.team_name = team_name;
232
+ }
233
+ static asFormGroup(calendar) {
234
+ return new FormGroup({
235
+ id: new FormControl(calendar?.id || ''),
236
+ club_id: new FormControl(calendar?.club_id || ''),
237
+ section_id: new FormControl(calendar?.section_id || ''),
238
+ team_id: new FormControl(calendar?.team_id || ''),
239
+ club_name: new FormControl(calendar?.club_name || ''),
240
+ color: new FormControl(calendar?.color || '', Validators.required),
241
+ name: new FormControl(calendar?.name || '', Validators.required),
242
+ section_name: new FormControl(calendar?.section_name || ''),
243
+ team_name: new FormControl(calendar?.team_name || '')
244
+ });
245
+ }
246
+ }
247
+
248
+ class BookingCalendarSlot {
249
+ constructor(id, calendar_id, location_id, color, day, end_time, location_name, number_of_available_sessions, sessions, start_time, type) {
250
+ this.id = id;
251
+ this.calendar_id = calendar_id;
252
+ this.location_id = location_id;
253
+ this.color = color;
254
+ this.day = day;
255
+ this.end_time = end_time;
256
+ this.location_name = location_name;
257
+ this.number_of_available_sessions = number_of_available_sessions;
258
+ this.sessions = sessions;
259
+ this.start_time = start_time;
260
+ this.type = type;
261
+ }
262
+ static asFormGroup(slot) {
263
+ return new FormGroup({
264
+ id: new FormControl(slot?.id || ''),
265
+ calendar_id: new FormControl(slot?.calendar_id || ''),
266
+ location_id: new FormControl(slot?.location_id || '', Validators.required),
267
+ day: new FormControl(slot?.day || '', Validators.required),
268
+ end_time: new FormControl(slot?.end_time || '', Validators.required),
269
+ number_of_available_sessions: new FormControl(slot?.number_of_available_sessions || 0, Validators.required),
270
+ start_time: new FormControl(slot?.start_time || '', Validators.required),
271
+ type: new FormControl(slot?.type || '', Validators.required),
272
+ });
273
+ }
274
+ }
275
+
276
+ class BookingCalendarSlotSession {
277
+ constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name) {
278
+ this.id = id;
279
+ this.section_id = section_id;
280
+ this.slot_id = slot_id;
281
+ this.team_id = team_id;
282
+ this.end_time = end_time;
283
+ this.section_name = section_name;
284
+ this.start_time = start_time;
285
+ this.team_name = team_name;
286
+ }
287
+ static asFormGroup(session) {
288
+ return new FormGroup({
289
+ id: new FormControl(session?.id || ''),
290
+ section_id: new FormControl(session?.section_id || ''),
291
+ slot_id: new FormControl(session?.slot_id || '', Validators.required),
292
+ team_id: new FormControl(session?.team_id || ''),
293
+ end_time: new FormControl(session?.end_time || '', Validators.required),
294
+ section_name: new FormControl(session?.section_name || ''),
295
+ start_time: new FormControl(session?.start_time || '', Validators.required),
296
+ team_name: new FormControl(session?.team_name || '')
297
+ });
298
+ }
299
+ }
300
+
221
301
  class Calendar {
222
302
  constructor(id, club_id, section_id, name, types_to_show) {
223
303
  this.id = id;
@@ -807,10 +887,19 @@ class MemberAttribute {
807
887
  this.value = value;
808
888
  }
809
889
  static asFormGroup(attribute = null) {
890
+ const attributeOptions = new FormArray(attribute?.options?.map((option) => new FormGroup({
891
+ text: new FormControl(option.text),
892
+ value: new FormControl(option.value)
893
+ })) || []);
810
894
  return new FormGroup({
811
895
  field_id: new FormControl(attribute?.field_id || ''),
812
896
  member_id: new FormControl(attribute?.member_id || ''),
813
- value: new FormControl(attribute?.value || '')
897
+ leader_editable: new FormControl(attribute?.leader_editable || false),
898
+ member_editable: new FormControl(attribute?.member_editable || false),
899
+ name: new FormControl(attribute?.name || ''),
900
+ options: attributeOptions,
901
+ type: new FormControl(attribute?.type || 'text'),
902
+ value: new FormControl(attribute?.type === 'bool' ? attribute?.value : attribute?.value || '')
814
903
  });
815
904
  }
816
905
  }
@@ -886,9 +975,10 @@ class SearchMember {
886
975
  }
887
976
 
888
977
  class MemberActivityInvite {
889
- constructor(id, comment, last_invite, leader, member_email, member_id, member_name, next_invite, response_date, status) {
978
+ constructor(id, comment, current_num_attendants, last_invite, leader, member_email, member_id, member_name, next_invite, response_date, status) {
890
979
  this.id = id;
891
980
  this.comment = comment;
981
+ this.current_num_attendants = current_num_attendants;
892
982
  this.last_invite = last_invite;
893
983
  this.leader = leader;
894
984
  this.member_email = member_email;
@@ -1179,7 +1269,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
1179
1269
 
1180
1270
  const searchMemberFactory = (apiSearchMember) => new SearchMember(apiSearchMember.id, apiSearchMember.club_id, apiSearchMember.team_id, apiSearchMember.address1, apiSearchMember.address2, apiSearchMember.calendar_url, apiSearchMember.country, apiSearchMember.district, apiSearchMember.email, apiSearchMember.first_name, apiSearchMember.image, apiSearchMember.last_name, apiSearchMember.mobile_phone, apiSearchMember.name, apiSearchMember.zip);
1181
1271
 
1182
- const memberAttributeFactory = (attribute) => new MemberAttribute(attribute.display_value, attribute.field, attribute.leader_editable, attribute.member_id, attribute.member_editable, attribute.name, attribute.options, attribute.order, attribute.section_id, attribute.type, attribute.value);
1272
+ const memberAttributeFactory = (attribute) => new MemberAttribute(attribute.display_value, attribute.field_id, attribute.leader_editable, attribute.member_id, attribute.member_editable, attribute.name, attribute.options, attribute.order, attribute.section_id, attribute.type, attribute.value);
1183
1273
 
1184
1274
  const contactFactory = (contact) => new Contact(contact.id, contact.club_id, contact.member_id, contact.address1, contact.address2, contact.address3, contact.country, contact.district, contact.email, contact.first_name, contact.home_phone, contact.last_name, contact.mobile_phone, contact.work_phone, contact.zip);
1185
1275
 
@@ -1195,7 +1285,7 @@ const memberFactory = (apiMember) => new Member(apiMember.id, apiMember.club_id,
1195
1285
  const activityExtraMemberFactory = (apiActivityExtraMember) => new ActivityExtraMember(apiActivityExtraMember.id, apiActivityExtraMember.member_id, apiActivityExtraMember.team_id, apiActivityExtraMember.created, apiActivityExtraMember.leader, apiActivityExtraMember.member.birth_date ?
1196
1286
  memberFactory(apiActivityExtraMember.member) : searchMemberFactory(apiActivityExtraMember.member), apiActivityExtraMember.member_name);
1197
1287
 
1198
- const memberActivityInviteFactory = (invitedMember) => new MemberActivityInvite(invitedMember.id, invitedMember.comment, invitedMember.last_invite, invitedMember.leader, invitedMember.member_email, invitedMember.member_id, invitedMember.member_name, invitedMember.next_invite, invitedMember.response_date, invitedMember.status);
1288
+ const memberActivityInviteFactory = (invitedMember) => new MemberActivityInvite(invitedMember.id, invitedMember.comment, invitedMember.current_num_attendants, invitedMember.last_invite, invitedMember.leader, invitedMember.member_email, invitedMember.member_id, invitedMember.member_name, invitedMember.next_invite, invitedMember.response_date, invitedMember.status);
1199
1289
 
1200
1290
  const activityFactory = (apiActivity) => new Activity(apiActivity.id, apiActivity.activity_group_id, apiActivity.activity_type_id, apiActivity.club_id, apiActivity.location_id, apiActivity.team_id, apiActivity.activity_location, apiActivity.activity_type_name, apiActivity.allow_maybe, apiActivity.calendar_name, apiActivity.created, apiActivity.current_num_attendants, apiActivity.day, apiActivity.description, apiActivity.end_time, apiActivity.file, apiActivity.invitation_text, apiActivity.invite_first_days, [], apiActivity.invite_hide_before_sent, apiActivity.invite_last_response_date, apiActivity.invite_remind, apiActivity.invite_remind_receivers, apiActivity.invite_second_days, 'same_as_last', (apiActivity.invited_members && apiActivity.invited_members.length) ? apiActivity.invited_members.map((invitedMember) => memberActivityInviteFactory(invitedMember)) : [], apiActivity.last_response_date, apiActivity.max_num_attendants, apiActivity.max_num_attendants_type, apiActivity.meet_up_place, apiActivity.meet_up_time, apiActivity.meet_up_time_display, 'none', 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiActivity.show_other_invited, apiActivity.start_time, apiActivity.title, apiActivity.updated, apiActivity.use_invite, false);
1201
1291
 
@@ -1382,13 +1472,14 @@ const TEAM_ACTIVITIES_PATH = ':teamId/activities/';
1382
1472
  const TEAM_ACTIVITY_INVITES_PATH = ':teamId/activities/:activityId/invites/';
1383
1473
  const TEAM_ACTIVITY_INVITE_PATH = ':teamId/activities/:activityId/invites/:activityInviteId/';
1384
1474
  const TEAM_ACTIVITY_INVITE_RESEND_PATH = ':teamId/activities/:activityId/invites/:activityInviteId/resend-invite/';
1385
- const TEAM_ACTIVITY_LOCATIONS_PATH = ':teamId/activities/locations/';
1386
1475
  const TEAM_ACTIVITY_NEW_PATH = ':teamId/activities/new/';
1387
1476
  const TEAM_ACTIVITY_PARTICIPANTS_PATH = ':teamId/activities/:activityId/participants/';
1388
1477
  const TEAM_ACTIVITY_PATH = ':teamId/activities/:id/';
1389
1478
  const TEAM_ACTIVITY_SETTINGS_PATH = ':teamId/activities/settings/';
1390
1479
  const TEAM_ACTIVITY_TYPES_PATH = ':teamId/activities/types/';
1391
1480
  const TEAM_CALENDAR_PATH = ':teamId/activities/calendar/';
1481
+ const TEAM_ACTIVITY_LOCATIONS_PATH = ':teamId/activities/locations/';
1482
+ const CLUB_ACTIVITY_LOCATIONS_PATH = ':clubId/activities/locations/';
1392
1483
  class ActivityService {
1393
1484
  constructor(apiService) {
1394
1485
  this.apiService = apiService;
@@ -1403,19 +1494,10 @@ class ActivityService {
1403
1494
  });
1404
1495
  }
1405
1496
  createTeamActivity(teamId, data) {
1406
- if (typeof data.id !== 'undefined') {
1407
- delete data.id;
1408
- }
1409
- if (typeof data.file !== 'undefined' && !data.file) {
1410
- delete data.file;
1411
- }
1412
- if (typeof data.invite_last_response_date !== 'undefined' && !data.invite_last_response_date) {
1413
- delete data.invite_last_response_date;
1414
- }
1415
1497
  return this.apiService
1416
1498
  .postResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITIES_PATH, {
1417
1499
  teamId
1418
- }, data);
1500
+ }, this.removeUnusedActivityFields(data));
1419
1501
  }
1420
1502
  deleteTeamActivity(teamId, id) {
1421
1503
  return this.apiService
@@ -1480,6 +1562,16 @@ class ActivityService {
1480
1562
  this.activityLocationCollection = activityLocationCollection;
1481
1563
  }));
1482
1564
  }
1565
+ getClubActivityLocations(clubId) {
1566
+ if (this.activityLocationResponseDate && this.activityLocationResponseDate > sub(new Date(), { hours: 1 })) {
1567
+ return of(this.activityLocationCollection);
1568
+ }
1569
+ return this.apiService
1570
+ .getCollection(activityLocationFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATIONS_PATH, { clubId }, { params: { limit: 'null' } }).pipe(tap((activityLocationCollection) => {
1571
+ this.activityLocationResponseDate = new Date();
1572
+ this.activityLocationCollection = activityLocationCollection;
1573
+ }));
1574
+ }
1483
1575
  getTeamActivityNew(teamId) {
1484
1576
  return this.apiService
1485
1577
  .getResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_NEW_PATH, { teamId });
@@ -1547,7 +1639,7 @@ class ActivityService {
1547
1639
  .updateResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_PATH, {
1548
1640
  teamId,
1549
1641
  id: activity.id
1550
- }, activity);
1642
+ }, this.removeUnusedActivityFields(activity));
1551
1643
  }
1552
1644
  updateTeamActivityInvite(teamId, activityId, activityInviteId, activityInvite) {
1553
1645
  return this.apiService
@@ -1566,6 +1658,18 @@ class ActivityService {
1566
1658
  members
1567
1659
  });
1568
1660
  }
1661
+ removeUnusedActivityFields(activity) {
1662
+ if (typeof activity.id !== 'undefined') {
1663
+ delete activity.id;
1664
+ }
1665
+ if (typeof activity.file !== 'undefined' && !activity.file) {
1666
+ delete activity.file;
1667
+ }
1668
+ if (typeof activity.invite_last_response_date !== 'undefined' && !activity.invite_last_response_date) {
1669
+ delete activity.invite_last_response_date;
1670
+ }
1671
+ return activity;
1672
+ }
1569
1673
  }
1570
1674
  ActivityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ActivityService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1571
1675
  ActivityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ActivityService, providedIn: 'root' });
@@ -1576,6 +1680,148 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
1576
1680
  }]
1577
1681
  }], ctorParameters: function () { return [{ type: ApiService }]; } });
1578
1682
 
1683
+ const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBookingCalendar.id, apiBookingCalendar.club_id, apiBookingCalendar.section_id, apiBookingCalendar.team_id, apiBookingCalendar.club_name, apiBookingCalendar.color, apiBookingCalendar.name, apiBookingCalendar.section_name, apiBookingCalendar.team_name);
1684
+
1685
+ const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name);
1686
+
1687
+ const bookingCalendarSlotFactory = (apiBookingSlot) => new BookingCalendarSlot(apiBookingSlot.id, apiBookingSlot.calendar_id, apiBookingSlot.location_id, apiBookingSlot.color, apiBookingSlot.day, apiBookingSlot.end_time, apiBookingSlot.location_name, apiBookingSlot.number_of_available_sessions, apiBookingSlot.sessions && apiBookingSlot.sessions.length ? apiBookingSlot.sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.start_time, apiBookingSlot.type);
1688
+
1689
+ const CLUB_BOOKING_CALENDARS_PATH = ':clubId/activities/calendars/';
1690
+ const CLUB_BOOKING_CALENDAR_PATH = ':clubId/activities/calendars/:id/';
1691
+ const CLUB_BOOKING_CALENDAR_SLOTS_PATH = ':clubId/activities/slots/';
1692
+ const CLUB_BOOKING_CALENDAR_SLOT_PATH = ':clubId/activities/slots/:id/';
1693
+ const CLUB_BOOKING_CALENDAR_SLOT_SESSIONS_PATH = ':clubId/activities/sessions/';
1694
+ const CLUB_BOOKING_CALENDAR_SLOT_SESSION_PATH = ':clubId/activities/sessions/:id/';
1695
+ class BookingCalendarService {
1696
+ constructor(apiService) {
1697
+ this.apiService = apiService;
1698
+ }
1699
+ // region Booking calendar
1700
+ createClubBookingCalendar(clubId, calendar) {
1701
+ delete calendar.id;
1702
+ return this.apiService
1703
+ .postResource(bookingCalendarFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDARS_PATH, {
1704
+ clubId,
1705
+ }, calendar);
1706
+ }
1707
+ getClubBookingCalendars(clubId, name = null) {
1708
+ const params = { limit: 'null' };
1709
+ if (name) {
1710
+ params['name'] = name;
1711
+ }
1712
+ return this.apiService
1713
+ .getCollection(bookingCalendarFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDARS_PATH, { clubId }, {
1714
+ params
1715
+ });
1716
+ }
1717
+ getClubBookingCalendar(clubId, id) {
1718
+ return this.apiService
1719
+ .getResource(bookingCalendarFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_PATH, { clubId, id });
1720
+ }
1721
+ updateClubBookingCalendar(clubId, calendar) {
1722
+ return this.apiService
1723
+ .updateResource(bookingCalendarFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_PATH, {
1724
+ clubId,
1725
+ id: calendar.id
1726
+ }, calendar);
1727
+ }
1728
+ deleteClubBookingCalendar(clubId, id) {
1729
+ return this.apiService
1730
+ .deleteResource(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_PATH, {
1731
+ clubId,
1732
+ id
1733
+ });
1734
+ }
1735
+ // endregion
1736
+ // region Booking calendar slot
1737
+ createClubBookingCalendarSlot(clubId, slot) {
1738
+ delete slot.id;
1739
+ return this.apiService
1740
+ .postResource(bookingCalendarSlotFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOTS_PATH, {
1741
+ clubId,
1742
+ }, slot);
1743
+ }
1744
+ getClubBookingCalendarSlots(clubId, startDate = null, endDate = null) {
1745
+ const params = { limit: 'null' };
1746
+ if (startDate) {
1747
+ params['day__gte'] = startDate;
1748
+ }
1749
+ if (endDate) {
1750
+ params['day__lte'] = endDate;
1751
+ }
1752
+ return this.apiService
1753
+ .getCollection(bookingCalendarSlotFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOTS_PATH, { clubId }, {
1754
+ params
1755
+ });
1756
+ }
1757
+ getClubBookingCalendarSlot(clubId, id) {
1758
+ return this.apiService
1759
+ .getResource(bookingCalendarSlotFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_PATH, { clubId, id });
1760
+ }
1761
+ updateClubBookingCalendarSlot(clubId, slot) {
1762
+ return this.apiService
1763
+ .updateResource(bookingCalendarSlotFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_PATH, {
1764
+ clubId,
1765
+ id: slot.id
1766
+ }, slot);
1767
+ }
1768
+ deleteClubBookingCalendarSlot(clubId, id) {
1769
+ return this.apiService
1770
+ .deleteResource(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_PATH, {
1771
+ clubId,
1772
+ id
1773
+ });
1774
+ }
1775
+ // endregion
1776
+ // region Booking calendar slot session
1777
+ createClubBookingCalendarSlotSession(clubId, session) {
1778
+ delete session.id;
1779
+ return this.apiService
1780
+ .postResource(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_SESSIONS_PATH, {
1781
+ clubId,
1782
+ }, session);
1783
+ }
1784
+ getClubBookingCalendarSlotSessions(clubId, startDate = null, endDate = null) {
1785
+ const params = { limit: 'null' };
1786
+ if (startDate) {
1787
+ params['day__gte'] = startDate;
1788
+ }
1789
+ if (endDate) {
1790
+ params['day__lte'] = endDate;
1791
+ }
1792
+ return this.apiService
1793
+ .getCollection(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_SESSIONS_PATH, { clubId }, {
1794
+ params
1795
+ });
1796
+ }
1797
+ getClubBookingCalendarSlotSession(clubId, id) {
1798
+ return this.apiService
1799
+ .getResource(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_SESSION_PATH, { clubId, id });
1800
+ }
1801
+ updateClubBookingCalendarSlotSession(clubId, session) {
1802
+ return this.apiService
1803
+ .updateResource(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_SESSION_PATH, {
1804
+ clubId,
1805
+ id: session.id
1806
+ }, session);
1807
+ }
1808
+ deleteClubBookingCalendarSlotSession(clubId, id) {
1809
+ return this.apiService
1810
+ .deleteResource(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_SESSION_PATH, {
1811
+ clubId,
1812
+ id
1813
+ });
1814
+ }
1815
+ }
1816
+ BookingCalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookingCalendarService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1817
+ BookingCalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookingCalendarService, providedIn: 'root' });
1818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookingCalendarService, decorators: [{
1819
+ type: Injectable,
1820
+ args: [{
1821
+ providedIn: 'root'
1822
+ }]
1823
+ }], ctorParameters: function () { return [{ type: ApiService }]; } });
1824
+
1579
1825
  const MEMBER_CLUB_INFO = ':memberId/club-info/';
1580
1826
  const TEAM_CLUB_INFO = ':teamId/club-info/';
1581
1827
  class ClubService {
@@ -2615,5 +2861,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
2615
2861
  * Generated bundle index. Do not edit.
2616
2862
  */
2617
2863
 
2618
- export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, ClubTeam, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailRecipient, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberValidationSettings, News, NewsService, Partner, PaymentAttempt, PaymentAttemptService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchMemberTeam, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
2864
+ export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookingCalendar, BookingCalendarService, BookingCalendarSlot, BookingCalendarSlotSession, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, ClubTeam, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailRecipient, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberValidationSettings, News, NewsService, Partner, PaymentAttempt, PaymentAttemptService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchMemberTeam, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
2619
2865
  //# sourceMappingURL=myclub_se-data-access.mjs.map