@myclub_se/data-access 3.1.13 → 3.1.14

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.
@@ -5794,17 +5794,17 @@ class BookingCalendarService {
5794
5794
  params
5795
5795
  });
5796
5796
  }
5797
- clearBookingCalendarSlots(role, clubOrSectionOrTeamId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions = false, shouldDeleteRepeatingSlots = false, weekdays = [], bookingSlotFilter) {
5797
+ clearBookingCalendarSlots(role, clubOrSectionOrTeamId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions = false, shouldDeleteRepeatingSlots = false, weekdays = [], bookingSlotFilter, send_notification = false) {
5798
5798
  switch (role) {
5799
5799
  case Role.ClubAdmin:
5800
- return this.clearClubBookingCalendarSlots(clubOrSectionOrTeamId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions, shouldDeleteRepeatingSlots, weekdays, bookingSlotFilter);
5800
+ return this.clearClubBookingCalendarSlots(clubOrSectionOrTeamId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions, shouldDeleteRepeatingSlots, weekdays, bookingSlotFilter, send_notification);
5801
5801
  case Role.SectionAdmin:
5802
- return this.clearSectionBookingCalendarSlots(clubOrSectionOrTeamId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions, shouldDeleteRepeatingSlots, weekdays, bookingSlotFilter);
5802
+ return this.clearSectionBookingCalendarSlots(clubOrSectionOrTeamId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions, shouldDeleteRepeatingSlots, weekdays, bookingSlotFilter, send_notification);
5803
5803
  default:
5804
5804
  throw invalidRoleError;
5805
5805
  }
5806
5806
  }
5807
- clearClubBookingCalendarSlots(clubId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions = false, shouldDeleteRepeatingSlots = false, weekdays = [], bookingSlotFilter) {
5807
+ clearClubBookingCalendarSlots(clubId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions = false, shouldDeleteRepeatingSlots = false, weekdays = [], bookingSlotFilter, send_notification = false) {
5808
5808
  const params = bookingSlotFilter.toParams();
5809
5809
  return this.apiService
5810
5810
  .deleteResourceWithBody(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOTS_CLEAR_PATH, { clubId }, {
@@ -5814,11 +5814,12 @@ class BookingCalendarService {
5814
5814
  only_delete_sessions: onlyDeleteSessions,
5815
5815
  should_delete_repeating_slots: shouldDeleteRepeatingSlots,
5816
5816
  weekdays: weekdays,
5817
+ send_notification: send_notification,
5817
5818
  },
5818
5819
  params,
5819
5820
  });
5820
5821
  }
5821
- clearSectionBookingCalendarSlots(sectionId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions = false, shouldDeleteRepeatingSlots = false, weekdays = [], bookingSlotFilter) {
5822
+ clearSectionBookingCalendarSlots(sectionId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions = false, shouldDeleteRepeatingSlots = false, weekdays = [], bookingSlotFilter, send_notification = false) {
5822
5823
  const params = bookingSlotFilter.toParams();
5823
5824
  return this.apiService
5824
5825
  .deleteResourceWithBody(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_SLOTS_CLEAR_PATH, { sectionId }, {
@@ -5828,6 +5829,7 @@ class BookingCalendarService {
5828
5829
  only_delete_sessions: onlyDeleteSessions,
5829
5830
  should_delete_repeating_slots: shouldDeleteRepeatingSlots,
5830
5831
  weekdays: weekdays,
5832
+ send_notification: send_notification,
5831
5833
  },
5832
5834
  params,
5833
5835
  });
@@ -5892,53 +5894,53 @@ class BookingCalendarService {
5892
5894
  id: slot.id
5893
5895
  }, slot);
5894
5896
  }
5895
- deleteBookingCalendarSlot(role, clubOrSectionOrTeamId, id) {
5897
+ deleteBookingCalendarSlot(role, clubOrSectionOrTeamId, id, sendNotification = false) {
5896
5898
  switch (role) {
5897
5899
  case Role.ClubAdmin:
5898
- return this.deleteClubBookingCalendarSlot(clubOrSectionOrTeamId, id);
5900
+ return this.deleteClubBookingCalendarSlot(clubOrSectionOrTeamId, id, sendNotification);
5899
5901
  case Role.SectionAdmin:
5900
- return this.deleteSectionBookingCalendarSlot(clubOrSectionOrTeamId, id);
5902
+ return this.deleteSectionBookingCalendarSlot(clubOrSectionOrTeamId, id, sendNotification);
5901
5903
  default:
5902
5904
  throw invalidRoleError;
5903
5905
  }
5904
5906
  }
5905
- deleteClubBookingCalendarSlot(clubId, id) {
5907
+ deleteClubBookingCalendarSlot(clubId, id, sendNotification) {
5906
5908
  return this.apiService
5907
- .deleteResource(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_PATH, {
5909
+ .deleteResourceWithBody(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_PATH, {
5908
5910
  clubId,
5909
5911
  id
5910
- });
5912
+ }, { body: { send_notification: sendNotification } });
5911
5913
  }
5912
- deleteSectionBookingCalendarSlot(sectionId, id) {
5914
+ deleteSectionBookingCalendarSlot(sectionId, id, sendNotification) {
5913
5915
  return this.apiService
5914
- .deleteResource(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_SLOT_PATH, {
5916
+ .deleteResourceWithBody(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_SLOT_PATH, {
5915
5917
  sectionId,
5916
5918
  id
5917
- });
5919
+ }, { body: { send_notification: sendNotification } });
5918
5920
  }
5919
- deleteBookingCalendarSlotRepeatable(role, clubOrSectionOrTeamId, id, deleteUntilDate) {
5921
+ deleteBookingCalendarSlotRepeatable(role, clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification = false) {
5920
5922
  switch (role) {
5921
5923
  case Role.ClubAdmin:
5922
- return this.deleteClubBookingCalendarSlotRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate);
5924
+ return this.deleteClubBookingCalendarSlotRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
5923
5925
  case Role.SectionAdmin:
5924
- return this.deleteSectionBookingCalendarSlotRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate);
5926
+ return this.deleteSectionBookingCalendarSlotRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
5925
5927
  default:
5926
5928
  throw invalidRoleError;
5927
5929
  }
5928
5930
  }
5929
- deleteClubBookingCalendarSlotRepeatable(clubId, id, deleteUntilDate) {
5931
+ deleteClubBookingCalendarSlotRepeatable(clubId, id, deleteUntilDate, sendNotification = false) {
5930
5932
  return this.apiService
5931
5933
  .deleteResourceWithBody(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_REPEATABLE_SLOT_PATH, {
5932
5934
  clubId,
5933
5935
  id
5934
- }, { body: { delete_until_date: deleteUntilDate } });
5936
+ }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
5935
5937
  }
5936
- deleteSectionBookingCalendarSlotRepeatable(sectionId, id, deleteUntilDate) {
5938
+ deleteSectionBookingCalendarSlotRepeatable(sectionId, id, deleteUntilDate, sendNotification = false) {
5937
5939
  return this.apiService
5938
5940
  .deleteResourceWithBody(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_REPEATABLE_SLOT_PATH, {
5939
5941
  sectionId,
5940
5942
  id
5941
- }, { body: { delete_until_date: deleteUntilDate } });
5943
+ }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
5942
5944
  }
5943
5945
  // endregion
5944
5946
  // region Booking calendar slot session
@@ -6038,40 +6040,40 @@ class BookingCalendarService {
6038
6040
  id: session.id,
6039
6041
  }, session);
6040
6042
  }
6041
- deleteBookingCalendarSlotSession(role, itemId, id) {
6043
+ deleteBookingCalendarSlotSession(role, itemId, id, sendNotification = false) {
6042
6044
  switch (role) {
6043
6045
  case Role.ClubAdmin:
6044
- return this.deleteClubBookingCalendarSlotSession(itemId, id);
6046
+ return this.deleteClubBookingCalendarSlotSession(itemId, id, sendNotification);
6045
6047
  case Role.SectionAdmin:
6046
- return this.deleteSectionBookingCalendarSlotSession(itemId, id);
6048
+ return this.deleteSectionBookingCalendarSlotSession(itemId, id, sendNotification);
6047
6049
  case Role.TeamAdmin:
6048
- return this.deleteTeamBookingCalendarSlotSession(itemId, id);
6050
+ return this.deleteTeamBookingCalendarSlotSession(itemId, id, sendNotification);
6049
6051
  case Role.MemberAdmin:
6050
6052
  return this.deleteMemberBookingCalendarSlotSession(itemId, id);
6051
6053
  default:
6052
6054
  throw invalidRoleError;
6053
6055
  }
6054
6056
  }
6055
- deleteClubBookingCalendarSlotSession(clubId, id) {
6057
+ deleteClubBookingCalendarSlotSession(clubId, id, sendNotification = false) {
6056
6058
  return this.apiService
6057
- .deleteResource(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_SESSION_PATH, {
6059
+ .deleteResourceWithBody(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_SESSION_PATH, {
6058
6060
  clubId,
6059
6061
  id
6060
- });
6062
+ }, { body: { send_notification: sendNotification } });
6061
6063
  }
6062
- deleteSectionBookingCalendarSlotSession(sectionId, id) {
6064
+ deleteSectionBookingCalendarSlotSession(sectionId, id, sendNotification = false) {
6063
6065
  return this.apiService
6064
- .deleteResource(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_SLOT_SESSION_PATH, {
6066
+ .deleteResourceWithBody(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_SLOT_SESSION_PATH, {
6065
6067
  sectionId,
6066
6068
  id
6067
- });
6069
+ }, { body: { send_notification: sendNotification } });
6068
6070
  }
6069
- deleteTeamBookingCalendarSlotSession(teamId, id) {
6071
+ deleteTeamBookingCalendarSlotSession(teamId, id, sendNotification = false) {
6070
6072
  return this.apiService
6071
- .deleteResource(Role.TeamAdmin, TEAM_BOOKING_CALENDAR_SLOT_SESSION_PATH, {
6073
+ .deleteResourceWithBody(Role.TeamAdmin, TEAM_BOOKING_CALENDAR_SLOT_SESSION_PATH, {
6072
6074
  teamId,
6073
6075
  id
6074
- });
6076
+ }, { body: { send_notification: sendNotification } });
6075
6077
  }
6076
6078
  deleteMemberBookingCalendarSlotSession(memberId, id) {
6077
6079
  return this.apiService
@@ -6080,38 +6082,38 @@ class BookingCalendarService {
6080
6082
  id
6081
6083
  });
6082
6084
  }
6083
- deleteBookingCalendarSlotSessionRepeatable(role, clubOrSectionOrTeamId, id, deleteUntilDate) {
6085
+ deleteBookingCalendarSlotSessionRepeatable(role, clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification = false) {
6084
6086
  switch (role) {
6085
6087
  case Role.ClubAdmin:
6086
- return this.deleteClubBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate);
6088
+ return this.deleteClubBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
6087
6089
  case Role.SectionAdmin:
6088
- return this.deleteSectionBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate);
6090
+ return this.deleteSectionBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
6089
6091
  case Role.TeamAdmin:
6090
- return this.deleteTeamBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate);
6092
+ return this.deleteTeamBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
6091
6093
  default:
6092
6094
  throw invalidRoleError;
6093
6095
  }
6094
6096
  }
6095
- deleteClubBookingCalendarSlotSessionRepeatable(clubId, id, deleteUntilDate) {
6097
+ deleteClubBookingCalendarSlotSessionRepeatable(clubId, id, deleteUntilDate, sendNotification = false) {
6096
6098
  return this.apiService
6097
6099
  .deleteResourceWithBody(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH, {
6098
6100
  clubId,
6099
6101
  id
6100
- }, { body: { delete_until_date: deleteUntilDate } });
6102
+ }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
6101
6103
  }
6102
- deleteSectionBookingCalendarSlotSessionRepeatable(sectionId, id, deleteUntilDate) {
6104
+ deleteSectionBookingCalendarSlotSessionRepeatable(sectionId, id, deleteUntilDate, sendNotification = false) {
6103
6105
  return this.apiService
6104
6106
  .deleteResourceWithBody(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH, {
6105
6107
  sectionId,
6106
6108
  id
6107
- }, { body: { delete_until_date: deleteUntilDate } });
6109
+ }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
6108
6110
  }
6109
- deleteTeamBookingCalendarSlotSessionRepeatable(teamId, id, deleteUntilDate) {
6111
+ deleteTeamBookingCalendarSlotSessionRepeatable(teamId, id, deleteUntilDate, sendNotification = false) {
6110
6112
  return this.apiService
6111
6113
  .deleteResourceWithBody(Role.TeamAdmin, TEAM_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH, {
6112
6114
  teamId,
6113
6115
  id
6114
- }, { body: { delete_until_date: deleteUntilDate } });
6116
+ }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
6115
6117
  }
6116
6118
  // endregion
6117
6119
  // region Booking Setting
@@ -7932,10 +7934,10 @@ class BookingEffects {
7932
7934
  updateBookingCalendarSlot$ = createEffect(() => this.actions$.pipe(ofType(updateBookingCalendarSlotAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, slot }) => this.bookingCalendarService.updateBookingCalendarSlot(role, clubOrSectionOrTeamId, { ...slot }).pipe(mergeMap$1((slot) => [
7933
7935
  updateBookingCalendarSlotSuccessAction({ slot: slot }),
7934
7936
  ]), catchError$1((error) => of(updateBookingCalendarSlotFailureAction({ payload: error })))))));
7935
- deleteBookingCalendarSlot$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarSlotAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, slot }) => this.bookingCalendarService.deleteBookingCalendarSlot(role, clubOrSectionOrTeamId, slot.id).pipe(mergeMap$1(() => [
7937
+ deleteBookingCalendarSlot$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarSlotAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, slot, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlot(role, clubOrSectionOrTeamId, slot.id, sendNotification).pipe(mergeMap$1(() => [
7936
7938
  deleteBookingCalendarSlotSuccessAction({ slot: slot }),
7937
7939
  ]), catchError$1((error) => of(deleteBookingCalendarSlotFailureAction({ payload: error })))))));
7938
- deleteBookingCalendarRepeatableSlot$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarRepeatableSlotAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, slot, deleteUntilDate }) => this.bookingCalendarService.deleteBookingCalendarSlotRepeatable(role, clubOrSectionOrTeamId, slot.id, deleteUntilDate).pipe(mergeMap$1(() => [
7940
+ deleteBookingCalendarRepeatableSlot$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarRepeatableSlotAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, slot, deleteUntilDate, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlotRepeatable(role, clubOrSectionOrTeamId, slot.id, deleteUntilDate, sendNotification).pipe(mergeMap$1(() => [
7939
7941
  deleteBookingCalendarRepeatableSlotSuccessAction({ slot: slot }),
7940
7942
  ]), catchError$1((error) => of(deleteBookingCalendarRepeatableSlotFailureAction({ payload: error })))))));
7941
7943
  createBookingCalendarSlotSession$ = createEffect(() => this.actions$.pipe(ofType(createBookingCalendarSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session }) => this.bookingCalendarService.createBookingCalendarSlotSession(role, clubOrSectionOrTeamId, { ...session }).pipe(mergeMap$1((session) => [
@@ -7944,10 +7946,10 @@ class BookingEffects {
7944
7946
  updateBookingCalendarSlotSession$ = createEffect(() => this.actions$.pipe(ofType(updateBookingCalendarSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session }) => this.bookingCalendarService.updateBookingCalendarSlotSession(role, clubOrSectionOrTeamId, { ...session }).pipe(mergeMap$1((session) => [
7945
7947
  updateBookingCalendarSlotSessionSuccessAction({ session: session }),
7946
7948
  ]), catchError$1((error) => of(updateBookingCalendarSlotSessionFailureAction({ payload: error })))))));
7947
- deleteBookingCalendarSlotSession$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session }) => this.bookingCalendarService.deleteBookingCalendarSlotSession(role, clubOrSectionOrTeamId, session.id).pipe(mergeMap$1(() => [
7949
+ deleteBookingCalendarSlotSession$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlotSession(role, clubOrSectionOrTeamId, session.id, sendNotification).pipe(mergeMap$1(() => [
7948
7950
  deleteBookingCalendarSlotSessionSuccessAction({ session: session }),
7949
7951
  ]), catchError$1((error) => of(deleteBookingCalendarSlotSessionFailureAction({ payload: error })))))));
7950
- deleteBookingCalendarRepeatableSlotSession$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarRepeatableSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session, deleteUntilDate }) => this.bookingCalendarService.deleteBookingCalendarSlotSessionRepeatable(role, clubOrSectionOrTeamId, session.id, deleteUntilDate).pipe(mergeMap$1(() => [
7952
+ deleteBookingCalendarRepeatableSlotSession$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarRepeatableSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session, deleteUntilDate, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlotSessionRepeatable(role, clubOrSectionOrTeamId, session.id, deleteUntilDate, sendNotification).pipe(mergeMap$1(() => [
7951
7953
  deleteBookingCalendarRepeatableSlotSessionSuccessAction({ session: session }),
7952
7954
  ]), catchError$1((error) => of(deleteBookingCalendarRepeatableSlotSessionFailureAction({ payload: error })))))));
7953
7955
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: BookingEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable });