@myclub_se/data-access 3.5.3 → 3.5.5

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 (43) hide show
  1. package/esm2022/lib/api-models/api-bookable-item.mjs +1 -1
  2. package/esm2022/lib/api-models/api-bookable-tag.mjs +1 -1
  3. package/esm2022/lib/api-models/api-booking-calendar.mjs +1 -1
  4. package/esm2022/lib/api-models/index.mjs +1 -2
  5. package/esm2022/lib/models/bookable-item.mjs +2 -5
  6. package/esm2022/lib/models/bookable-tag.mjs +6 -4
  7. package/esm2022/lib/models/booking-calendar.mjs +10 -10
  8. package/esm2022/lib/models/booking-slot-filter.mjs +4 -9
  9. package/esm2022/lib/models/index.mjs +1 -2
  10. package/esm2022/lib/services/bookable.service.mjs +2 -88
  11. package/esm2022/lib/services/factories/bookable-item-factory.mjs +2 -2
  12. package/esm2022/lib/services/factories/bookable-tag-factory.mjs +2 -2
  13. package/esm2022/lib/services/factories/booking-calendar-factory.mjs +3 -3
  14. package/esm2022/lib/services/factories/index.mjs +1 -2
  15. package/esm2022/lib/store/actions/booking.actions.mjs +1 -19
  16. package/esm2022/lib/store/effects/booking.effects.mjs +2 -13
  17. package/esm2022/lib/store/reducers/booking.reducers.mjs +2 -11
  18. package/esm2022/lib/store/selectors/booking.selectors.mjs +1 -2
  19. package/esm2022/lib/store/state/booking.state.mjs +1 -2
  20. package/fesm2022/myclub_se-data-access.mjs +21 -183
  21. package/fesm2022/myclub_se-data-access.mjs.map +1 -1
  22. package/lib/api-models/api-bookable-item.d.ts +0 -1
  23. package/lib/api-models/api-bookable-tag.d.ts +4 -1
  24. package/lib/api-models/api-booking-calendar.d.ts +2 -2
  25. package/lib/api-models/index.d.ts +0 -1
  26. package/lib/models/bookable-item.d.ts +1 -3
  27. package/lib/models/bookable-tag.d.ts +10 -2
  28. package/lib/models/booking-calendar.d.ts +4 -4
  29. package/lib/models/booking-slot-filter.d.ts +1 -2
  30. package/lib/models/index.d.ts +0 -1
  31. package/lib/services/bookable.service.d.ts +1 -12
  32. package/lib/services/factories/index.d.ts +0 -1
  33. package/lib/store/actions/booking.actions.d.ts +1 -65
  34. package/lib/store/effects/booking.effects.d.ts +1 -28
  35. package/lib/store/selectors/booking.selectors.d.ts +0 -1
  36. package/lib/store/state/booking.state.d.ts +1 -2
  37. package/package.json +1 -1
  38. package/esm2022/lib/api-models/api-bookable-group.mjs +0 -2
  39. package/esm2022/lib/models/bookable-group.mjs +0 -27
  40. package/esm2022/lib/services/factories/bookable-group-factory.mjs +0 -6
  41. package/lib/api-models/api-bookable-group.d.ts +0 -9
  42. package/lib/models/bookable-group.d.ts +0 -18
  43. package/lib/services/factories/bookable-group-factory.d.ts +0 -3
@@ -3,7 +3,6 @@ import { ApiBookableTag } from "./api-bookable-tag";
3
3
  export interface ApiBookableItem {
4
4
  active: boolean;
5
5
  club_id: string;
6
- group_id: string | null;
7
6
  id: string;
8
7
  name: string;
9
8
  section_id: string | null;
@@ -3,5 +3,8 @@ export interface ApiBookableTag {
3
3
  id: string;
4
4
  name: string;
5
5
  section_id: string | null;
6
- bookable_item_names: Array<string>;
6
+ bookable_items: Array<{
7
+ id: string;
8
+ name: string;
9
+ }>;
7
10
  }
@@ -1,5 +1,5 @@
1
1
  import { ApiSearchTeam } from "./api-search-team";
2
- import { ApiBookableGroup } from "./api-bookable-group";
2
+ import { ApiBookableItem } from "./api-bookable-item";
3
3
  export interface ApiBookingCalendar {
4
4
  id: string;
5
5
  club_id: string;
@@ -10,7 +10,7 @@ export interface ApiBookingCalendar {
10
10
  team_id: string | null;
11
11
  readonly team_name: string | null;
12
12
  status: string;
13
- bookable_groups: Array<ApiBookableGroup> | null;
13
+ bookable_items: Array<ApiBookableItem> | null;
14
14
  available_for_teams: Array<ApiSearchTeam> | null;
15
15
  is_default: boolean;
16
16
  max_application_number: number;
@@ -8,7 +8,6 @@ export * from './api-activity-location-part';
8
8
  export * from './api-activity-participant';
9
9
  export * from './api-activity-type';
10
10
  export * from './api-auth';
11
- export * from './api-bookable-group';
12
11
  export * from './api-bookable-item';
13
12
  export * from './api-bookable-part';
14
13
  export * from './api-bookable-tag';
@@ -5,7 +5,6 @@ export declare class BookableItem {
5
5
  id: string;
6
6
  club_id: string;
7
7
  section_id: string | null;
8
- group_id: string | null;
9
8
  active: boolean;
10
9
  name: string;
11
10
  location_id: string | null;
@@ -17,12 +16,11 @@ export declare class BookableItem {
17
16
  id: FormControl<string | null>;
18
17
  club_id: FormControl<string | null>;
19
18
  active: FormControl<boolean | null>;
20
- group_id: FormControl<string | null>;
21
19
  location_id: FormControl<string | null | undefined>;
22
20
  name: FormControl<string | null>;
23
21
  description: FormControl<string | null>;
24
22
  tags: FormArray<FormGroup<any>>;
25
23
  parts: FormArray<FormGroup<any>>;
26
24
  }>;
27
- constructor(id: string, club_id: string, section_id: string | null, group_id: string | null, active: boolean, name: string, location_id: string | null, description: string, tags?: BookableTag[] | null | undefined, parts?: BookablePart[] | null | undefined, next_available_datetime?: string | null | undefined);
25
+ constructor(id: string, club_id: string, section_id: string | null, active: boolean, name: string, location_id: string | null, description: string, tags?: BookableTag[] | null | undefined, parts?: BookablePart[] | null | undefined, next_available_datetime?: string | null | undefined);
28
26
  }
@@ -4,10 +4,18 @@ export declare class BookableTag {
4
4
  club_id: string;
5
5
  section_id: string | null;
6
6
  name: string;
7
- bookable_item_names: Array<string>;
7
+ bookable_items: Array<{
8
+ id: string;
9
+ name: string;
10
+ }>;
8
11
  static asFormGroup(tag?: BookableTag): FormGroup<{
9
12
  id: FormControl<string | null>;
13
+ club_id: FormControl<string | null>;
14
+ section_id: FormControl<string | null>;
10
15
  name: FormControl<string | null>;
11
16
  }>;
12
- constructor(id: string, club_id: string, section_id: string | null, name: string, bookable_item_names?: Array<string>);
17
+ constructor(id: string, club_id: string, section_id: string | null, name: string, bookable_items?: Array<{
18
+ id: string;
19
+ name: string;
20
+ }>);
13
21
  }
@@ -1,6 +1,6 @@
1
1
  import { FormArray, FormControl, FormGroup } from "@angular/forms";
2
2
  import { SearchTeam } from "./search-team";
3
- import { BookableGroup } from "./bookable-group";
3
+ import { BookableItem } from "./bookable-item";
4
4
  export declare class BookingCalendar {
5
5
  id: string;
6
6
  club_id: string;
@@ -25,7 +25,7 @@ export declare class BookingCalendar {
25
25
  send_member_booking_created: boolean;
26
26
  send_member_booking_deleted: boolean;
27
27
  available_for_teams?: SearchTeam[] | null | undefined;
28
- bookable_groups?: BookableGroup[] | null | undefined;
28
+ bookable_items?: BookableItem[] | null | undefined;
29
29
  type?: string | null | undefined;
30
30
  type_display?: string | null | undefined;
31
31
  member_fee_id?: string | null | undefined;
@@ -42,7 +42,7 @@ export declare class BookingCalendar {
42
42
  section_name: FormControl<string | null>;
43
43
  team_name: FormControl<string | null>;
44
44
  status: FormControl<string | null>;
45
- bookable_groups: FormArray<FormGroup<any>>;
45
+ bookable_items: FormArray<FormGroup<any>>;
46
46
  available_for_teams: FormArray<FormGroup<any>>;
47
47
  max_application_number: FormControl<number | null>;
48
48
  is_default: FormControl<boolean | null>;
@@ -63,5 +63,5 @@ export declare class BookingCalendar {
63
63
  send_member_booking_created: FormControl<boolean | null>;
64
64
  send_member_booking_deleted: FormControl<boolean | null>;
65
65
  }>;
66
- constructor(id: string, club_id: string, section_id: string | null, team_id: string | null, club_name: string, name: string, section_name: string | null, team_name: string | null, status: string | null, max_application_number: number, allow_team_export: boolean, allow_repeated_bookings: boolean, is_default: boolean, payment_limit_in_minutes?: number, price_per_slot?: number, send_team_application_created?: boolean, send_team_application_updated?: boolean, send_admin_team_booking_created?: boolean, send_team_booking_created?: boolean, send_team_booking_deleted?: boolean, send_member_booking_created?: boolean, send_member_booking_deleted?: boolean, available_for_teams?: SearchTeam[] | null | undefined, bookable_groups?: BookableGroup[] | null | undefined, type?: string | null | undefined, type_display?: string | null | undefined, member_fee_id?: string | null | undefined, service_fee_id?: string | null | undefined, info_email?: string | null | undefined, saved_search_id?: string | null | undefined);
66
+ constructor(id: string, club_id: string, section_id: string | null, team_id: string | null, club_name: string, name: string, section_name: string | null, team_name: string | null, status: string | null, max_application_number: number, allow_team_export: boolean, allow_repeated_bookings: boolean, is_default: boolean, payment_limit_in_minutes?: number, price_per_slot?: number, send_team_application_created?: boolean, send_team_application_updated?: boolean, send_admin_team_booking_created?: boolean, send_team_booking_created?: boolean, send_team_booking_deleted?: boolean, send_member_booking_created?: boolean, send_member_booking_deleted?: boolean, available_for_teams?: SearchTeam[] | null | undefined, bookable_items?: BookableItem[] | null | undefined, type?: string | null | undefined, type_display?: string | null | undefined, member_fee_id?: string | null | undefined, service_fee_id?: string | null | undefined, info_email?: string | null | undefined, saved_search_id?: string | null | undefined);
67
67
  }
@@ -6,12 +6,11 @@ export declare class BookingSlotFilter {
6
6
  bookableItemIds: string[] | null;
7
7
  tagIds: string[] | null;
8
8
  teamIds: string[] | null;
9
- bookableGroupIds: string[] | null;
10
9
  activityTypeIds: string[] | null;
11
10
  hasOpenSessions: boolean | null;
12
11
  showApplicationTimes: boolean | null;
13
12
  sortBy: string | null;
14
- constructor(startDate?: string | null, endDate?: string | null, calendarIds?: string[] | null, locationIds?: string[] | null, bookableItemIds?: string[] | null, tagIds?: string[] | null, teamIds?: string[] | null, bookableGroupIds?: string[] | null, activityTypeIds?: string[] | null, hasOpenSessions?: boolean | null, showApplicationTimes?: boolean | null, sortBy?: string | null);
13
+ constructor(startDate?: string | null, endDate?: string | null, calendarIds?: string[] | null, locationIds?: string[] | null, bookableItemIds?: string[] | null, tagIds?: string[] | null, teamIds?: string[] | null, activityTypeIds?: string[] | null, hasOpenSessions?: boolean | null, showApplicationTimes?: boolean | null, sortBy?: string | null);
15
14
  static fromFilter(filter: BookingSlotFilter): BookingSlotFilter;
16
15
  static fromDates(startDate: string, endDate: string, calendarIds: string[], hasOpenSessions?: boolean | null, showApplicationTimes?: boolean | null): BookingSlotFilter;
17
16
  toParams(): any;
@@ -10,7 +10,6 @@ export * from './activity-settings';
10
10
  export * from './activity-type';
11
11
  export * from './auth';
12
12
  export * from './authentication';
13
- export * from './bookable-group';
14
13
  export * from './bookable-item';
15
14
  export * from './bookable-part';
16
15
  export * from './bookable-tag';
@@ -1,5 +1,5 @@
1
1
  import { ApiService } from './api.service';
2
- import { BookableGroup, BookableItem, BookableTag, Role } from '../models';
2
+ import { BookableItem, BookableTag, Role } from '../models';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class BookableService {
5
5
  private apiService;
@@ -17,17 +17,6 @@ export declare class BookableService {
17
17
  createBookableItem(role: Role, clubOrSectionOrTeamId: string, bookableItem: Partial<BookableItem>): import("rxjs").Observable<BookableItem>;
18
18
  createClubBookableItem(clubId: string, bookableItem: Partial<BookableItem>): import("rxjs").Observable<BookableItem>;
19
19
  createSectionBookableItem(sectionId: string, bookableItem: Partial<BookableItem>): import("rxjs").Observable<BookableItem>;
20
- getBookableGroups(role: Role, itemId: string): import("rxjs").Observable<import("../models").Collection<BookableGroup>>;
21
- getClubBookableGroups(clubId: string): import("rxjs").Observable<import("../models").Collection<BookableGroup>>;
22
- getSectionBookableGroups(sectionId: string): import("rxjs").Observable<import("../models").Collection<BookableGroup>>;
23
- getTeamBookableGroups(teamId: string): import("rxjs").Observable<import("../models").Collection<BookableGroup>>;
24
- getMemberBookableGroups(memberId: string): import("rxjs").Observable<import("../models").Collection<BookableGroup>>;
25
- updateBookableGroup(role: Role, clubOrSectionOrTeamId: string, bookableGroup: Partial<BookableGroup>): import("rxjs").Observable<BookableGroup>;
26
- updateClubBookableGroup(clubId: string, bookableGroup: Partial<BookableGroup>): import("rxjs").Observable<BookableGroup>;
27
- updateSectionBookableGroup(sectionId: string, bookableGroup: Partial<BookableGroup>): import("rxjs").Observable<BookableGroup>;
28
- createBookableGroup(role: Role, clubOrSectionOrTeamId: string, bookableGroup: Partial<BookableGroup>): import("rxjs").Observable<BookableGroup>;
29
- createClubBookableGroup(clubId: string, bookableGroup: Partial<BookableGroup>): import("rxjs").Observable<BookableGroup>;
30
- createSectionBookableGroup(sectionId: string, bookableGroup: Partial<BookableGroup>): import("rxjs").Observable<BookableGroup>;
31
20
  getBookableTags(role: Role, itemId: string): import("rxjs").Observable<import("../models").Collection<BookableTag>>;
32
21
  getClubBookableTags(clubId: string): import("rxjs").Observable<import("../models").Collection<BookableTag>>;
33
22
  getSectionBookableTags(sectionId: string): import("rxjs").Observable<import("../models").Collection<BookableTag>>;
@@ -13,7 +13,6 @@ export * from './auth-member-factory';
13
13
  export * from './auth-section-factory';
14
14
  export * from './auth-team-factory';
15
15
  export * from './auth-team-section-factory';
16
- export * from './bookable-group-factory';
17
16
  export * from './bookable-item-factory';
18
17
  export * from './bookable-part-factory';
19
18
  export * from './bookable-tag-factory';
@@ -1,4 +1,4 @@
1
- import { ActivityLocation, ActivitySettings, ActivityType, AuthTeam, BookableGroup, BookableItem, BookableTag, BookingCalendar, BookingCalendarApplicationTime, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, BookingSlotFilter, Role, SearchTeam } from '../../models';
1
+ import { ActivityLocation, ActivitySettings, ActivityType, AuthTeam, BookableItem, BookableTag, BookingCalendar, BookingCalendarApplicationTime, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, BookingSlotFilter, Role, SearchTeam } from '../../models';
2
2
  import { HttpErrorResponse } from '@angular/common/http';
3
3
  export declare enum BookingActionTypes {
4
4
  ListCalendar = "[Booking] List calendars",
@@ -10,9 +10,6 @@ export declare enum BookingActionTypes {
10
10
  ListLocation = "[Booking] List locations",
11
11
  ListLocationSuccess = "[Booking] List locations success",
12
12
  ListLocationFailure = "[Booking] List locations failure",
13
- ListBookableGroup = "[Booking] List bookable groups",
14
- ListBookableGroupSuccess = "[Booking] List bookable groups success",
15
- ListBookableGroupFailure = "[Booking] List bookable groups failure",
16
13
  ListBookableItem = "[Booking] List bookable items",
17
14
  ListBookableItemSuccess = "[Booking] List bookable items success",
18
15
  ListBookableItemFailure = "[Booking] List bookable items failure",
@@ -46,12 +43,6 @@ export declare enum BookingActionTypes {
46
43
  DeleteBookableTag = "[Booking] Delete bookable tag",
47
44
  DeleteBookableTagSuccess = "[Booking] Delete bookable tag success",
48
45
  DeleteBookableTagFailure = "[Booking] Delete bookable tag failure",
49
- CreateBookableGroup = "[Booking] Create bookable group",
50
- CreateBookableGroupSuccess = "[Booking] Create bookable group success",
51
- CreateBookableGroupFailure = "[Booking] Create bookable group failure",
52
- UpdateBookableGroup = "[Booking] Update bookable group",
53
- UpdateBookableGroupSuccess = "[Booking] Update bookable group success",
54
- UpdateBookableGroupFailure = "[Booking] Update bookable group failure",
55
46
  CreateBookableItem = "[Booking] Create bookable item",
56
47
  CreateBookableItemSuccess = "[Booking] Create bookable item success",
57
48
  CreateBookableItemFailure = "[Booking] Create bookable item failure",
@@ -174,23 +165,6 @@ export declare const listBookableItemFailureAction: import("@ngrx/store").Action
174
165
  }) => {
175
166
  payload: HttpErrorResponse;
176
167
  } & import("@ngrx/store").Action<BookingActionTypes.ListBookableItemFailure>>;
177
- export declare const listBookableGroupAction: import("@ngrx/store").ActionCreator<BookingActionTypes.ListBookableGroup, (props: {
178
- role: Role;
179
- clubOrSectionOrTeamId: string;
180
- }) => {
181
- role: Role;
182
- clubOrSectionOrTeamId: string;
183
- } & import("@ngrx/store").Action<BookingActionTypes.ListBookableGroup>>;
184
- export declare const listBookableGroupSuccessAction: import("@ngrx/store").ActionCreator<BookingActionTypes.ListBookableGroupSuccess, (props: {
185
- groups: Array<BookableGroup>;
186
- }) => {
187
- groups: Array<BookableGroup>;
188
- } & import("@ngrx/store").Action<BookingActionTypes.ListBookableGroupSuccess>>;
189
- export declare const listBookableGroupFailureAction: import("@ngrx/store").ActionCreator<BookingActionTypes.ListBookableGroupFailure, (props: {
190
- payload: HttpErrorResponse;
191
- }) => {
192
- payload: HttpErrorResponse;
193
- } & import("@ngrx/store").Action<BookingActionTypes.ListBookableGroupFailure>>;
194
168
  export declare const listBookableTagAction: import("@ngrx/store").ActionCreator<BookingActionTypes.ListBookableTag, (props: {
195
169
  role: Role;
196
170
  clubOrSectionOrTeamId: string;
@@ -390,44 +364,6 @@ export declare const deleteBookableTagFailureAction: import("@ngrx/store").Actio
390
364
  }) => {
391
365
  payload: HttpErrorResponse;
392
366
  } & import("@ngrx/store").Action<BookingActionTypes.DeleteBookableTagFailure>>;
393
- export declare const createBookableGroupAction: import("@ngrx/store").ActionCreator<BookingActionTypes.CreateBookableGroup, (props: {
394
- role: Role;
395
- clubOrSectionOrTeamId: string;
396
- group: Partial<BookableGroup>;
397
- }) => {
398
- role: Role;
399
- clubOrSectionOrTeamId: string;
400
- group: Partial<BookableGroup>;
401
- } & import("@ngrx/store").Action<BookingActionTypes.CreateBookableGroup>>;
402
- export declare const createBookableGroupSuccessAction: import("@ngrx/store").ActionCreator<BookingActionTypes.CreateBookableGroupSuccess, (props: {
403
- group: BookableGroup;
404
- }) => {
405
- group: BookableGroup;
406
- } & import("@ngrx/store").Action<BookingActionTypes.CreateBookableGroupSuccess>>;
407
- export declare const createBookableGroupFailureAction: import("@ngrx/store").ActionCreator<BookingActionTypes.CreateBookableGroupFailure, (props: {
408
- payload: HttpErrorResponse;
409
- }) => {
410
- payload: HttpErrorResponse;
411
- } & import("@ngrx/store").Action<BookingActionTypes.CreateBookableGroupFailure>>;
412
- export declare const updateBookableGroupAction: import("@ngrx/store").ActionCreator<BookingActionTypes.UpdateBookableGroup, (props: {
413
- role: Role;
414
- clubOrSectionOrTeamId: string;
415
- group: Partial<BookableGroup>;
416
- }) => {
417
- role: Role;
418
- clubOrSectionOrTeamId: string;
419
- group: Partial<BookableGroup>;
420
- } & import("@ngrx/store").Action<BookingActionTypes.UpdateBookableGroup>>;
421
- export declare const updateBookableGroupSuccessAction: import("@ngrx/store").ActionCreator<BookingActionTypes.UpdateBookableGroupSuccess, (props: {
422
- group: BookableGroup;
423
- }) => {
424
- group: BookableGroup;
425
- } & import("@ngrx/store").Action<BookingActionTypes.UpdateBookableGroupSuccess>>;
426
- export declare const updateBookableGroupFailureAction: import("@ngrx/store").ActionCreator<BookingActionTypes.UpdateBookableGroupFailure, (props: {
427
- payload: HttpErrorResponse;
428
- }) => {
429
- payload: HttpErrorResponse;
430
- } & import("@ngrx/store").Action<BookingActionTypes.UpdateBookableGroupFailure>>;
431
367
  export declare const createBookingCalendarAction: import("@ngrx/store").ActionCreator<BookingActionTypes.CreateBookingCalendar, (props: {
432
368
  role: Role;
433
369
  clubOrSectionOrTeamId: string;
@@ -1,4 +1,4 @@
1
- import { ActivityLocation, ActivitySettings, ActivityType, BookableGroup, BookableItem, BookableTag, BookingCalendar, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, Role, SearchTeam } from '../../models';
1
+ import { ActivityLocation, ActivitySettings, ActivityType, BookableItem, BookableTag, BookingCalendar, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, Role, SearchTeam } from '../../models';
2
2
  import { HttpErrorResponse } from '@angular/common/http';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class BookingEffects {
@@ -37,11 +37,6 @@ export declare class BookingEffects {
37
37
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableItemSuccess>) | ({
38
38
  payload: HttpErrorResponse;
39
39
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableItemFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
40
- listBookableGroups$: import("rxjs").Observable<({
41
- groups: BookableGroup[];
42
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableGroupSuccess>) | ({
43
- payload: HttpErrorResponse;
44
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableGroupFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
45
40
  listBookableTags$: import("rxjs").Observable<({
46
41
  tags: BookableTag[];
47
42
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableTagSuccess>) | ({
@@ -87,9 +82,6 @@ export declare class BookingEffects {
87
82
  role: Role;
88
83
  clubOrSectionOrTeamId: string;
89
84
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableItem>) | ({
90
- role: Role;
91
- clubOrSectionOrTeamId: string;
92
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableGroup>) | ({
93
85
  item: BookableItem;
94
86
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.UpdateBookableItemSuccess>) | ({
95
87
  payload: HttpErrorResponse;
@@ -115,25 +107,6 @@ export declare class BookingEffects {
115
107
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.DeleteBookableTagSuccess>) | ({
116
108
  payload: HttpErrorResponse;
117
109
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.DeleteBookableTagFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
118
- createBookableGroup$: import("rxjs").Observable<({
119
- role: Role;
120
- clubOrSectionOrTeamId: string;
121
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableGroup>) | ({
122
- group: BookableGroup;
123
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.CreateBookableGroupSuccess>) | ({
124
- payload: HttpErrorResponse;
125
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.CreateBookableGroupFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
126
- updateBookableGroup$: import("rxjs").Observable<({
127
- role: Role;
128
- clubOrSectionOrTeamId: string;
129
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListCalendar>) | ({
130
- role: Role;
131
- clubOrSectionOrTeamId: string;
132
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.ListBookableGroup>) | ({
133
- group: BookableGroup;
134
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.UpdateBookableGroupSuccess>) | ({
135
- payload: HttpErrorResponse;
136
- } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.UpdateBookableGroupFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
137
110
  createBookingCalendar$: import("rxjs").Observable<({
138
111
  role: Role;
139
112
  clubOrSectionOrTeamId: string;
@@ -3,7 +3,6 @@ export declare const bookingState: import("@ngrx/store").MemoizedSelector<object
3
3
  export declare const selectBookingTeams: import("@ngrx/store").MemoizedSelector<object, import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").AuthTeam | import("@myclub_se/data-access").SearchTeam> | null, (s1: BookingState) => import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").AuthTeam | import("@myclub_se/data-access").SearchTeam> | null>;
4
4
  export declare const selectLocations: import("@ngrx/store").MemoizedSelector<object, import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").ActivityLocation> | null, (s1: BookingState) => import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").ActivityLocation> | null>;
5
5
  export declare const selectBookableItems: import("@ngrx/store").MemoizedSelector<object, import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").BookableItem> | null, (s1: BookingState) => import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").BookableItem> | null>;
6
- export declare const selectBookableGroups: import("@ngrx/store").MemoizedSelector<object, import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").BookableGroup> | null, (s1: BookingState) => import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").BookableGroup> | null>;
7
6
  export declare const selectBookableTags: import("@ngrx/store").MemoizedSelector<object, import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").BookableTag> | null, (s1: BookingState) => import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").BookableTag> | null>;
8
7
  export declare const selectCalendars: import("@ngrx/store").MemoizedSelector<object, import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").BookingCalendar> | null, (s1: BookingState) => import("@myclub_se/data-access").ListResultInterface<import("@myclub_se/data-access").BookingCalendar> | null>;
9
8
  export declare const selectMemberCalendars: import("@ngrx/store").MemoizedSelector<object, import("@myclub_se/data-access").RetrieveResultInterface<Map<string, import("@myclub_se/data-access").BookingCalendar[]>> | undefined, (s1: BookingState) => import("@myclub_se/data-access").RetrieveResultInterface<Map<string, import("@myclub_se/data-access").BookingCalendar[]>> | undefined>;
@@ -1,11 +1,10 @@
1
- import { ActivityLocation, ActivitySettings, ActivityType, AuthTeam, BookableGroup, BookableItem, BookableTag, BookingCalendar, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, BookingSlotFilter, SearchTeam } from '../../models';
1
+ import { ActivityLocation, ActivitySettings, ActivityType, AuthTeam, BookableItem, BookableTag, BookingCalendar, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, BookingSlotFilter, SearchTeam } from '../../models';
2
2
  import { ListResultInterface, RetrieveResultInterface } from '../interfaces';
3
3
  export interface BookingState {
4
4
  calendars: ListResultInterface<BookingCalendar> | null;
5
5
  memberCalendars: RetrieveResultInterface<Map<string, Array<BookingCalendar>>> | undefined;
6
6
  locations: ListResultInterface<ActivityLocation> | null;
7
7
  bookableItems: ListResultInterface<BookableItem> | null;
8
- bookableGroups: ListResultInterface<BookableGroup> | null;
9
8
  bookableTags: ListResultInterface<BookableTag> | null;
10
9
  bookingTeams: ListResultInterface<SearchTeam | AuthTeam> | null;
11
10
  bookingActivitySettings: RetrieveResultInterface<ActivitySettings> | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myclub_se/data-access",
3
3
  "description": "This is the package required to access the api for the MyClub Member API V3 from angular",
4
- "version": "3.5.3",
4
+ "version": "3.5.5",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
7
7
  "peerDependencies": {
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLWJvb2thYmxlLWdyb3VwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGF0YS1hY2Nlc3Mvc3JjL2xpYi9hcGktbW9kZWxzL2FwaS1ib29rYWJsZS1ncm91cC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtBcGlCb29rYWJsZUl0ZW19IGZyb20gXCIuL2FwaS1ib29rYWJsZS1pdGVtXCI7XG5cbmV4cG9ydCBpbnRlcmZhY2UgQXBpQm9va2FibGVHcm91cCB7XG4gIGFjdGl2ZTogYm9vbGVhbjtcbiAgY2x1Yl9pZDogc3RyaW5nO1xuICBpZDogc3RyaW5nO1xuICBuYW1lOiBzdHJpbmc7XG4gIHNlY3Rpb25faWQ6IHN0cmluZyB8IG51bGw7XG4gIGJvb2thYmxlX2l0ZW1zOiBBcnJheTxBcGlCb29rYWJsZUl0ZW0+IHwgbnVsbDtcbn1cbiJdfQ==
@@ -1,27 +0,0 @@
1
- import { FormControl, FormGroup, Validators } from "@angular/forms";
2
- export class BookableGroup {
3
- id;
4
- club_id;
5
- section_id;
6
- active;
7
- name;
8
- bookable_items;
9
- static asFormGroup(bookableGroup) {
10
- return new FormGroup({
11
- id: new FormControl(bookableGroup?.id || ''),
12
- club_id: new FormControl(bookableGroup?.club_id || '', Validators.required),
13
- section_id: new FormControl(bookableGroup?.section_id || ''),
14
- name: new FormControl(bookableGroup?.name || '', Validators.required),
15
- active: new FormControl(typeof bookableGroup?.active !== 'undefined' ? bookableGroup?.active : false),
16
- });
17
- }
18
- constructor(id, club_id, section_id, active, name, bookable_items) {
19
- this.id = id;
20
- this.club_id = club_id;
21
- this.section_id = section_id;
22
- this.active = active;
23
- this.name = name;
24
- this.bookable_items = bookable_items;
25
- }
26
- }
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9va2FibGUtZ3JvdXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kYXRhLWFjY2Vzcy9zcmMvbGliL21vZGVscy9ib29rYWJsZS1ncm91cC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsV0FBVyx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gICBwdWJsaWMgc2VjdGlvbl9pZDogc3RyaW5nIHwgbnVsbCxcbiAgICBwdWJsaWMgYWN0aXZlOiBib29sZWFuLFxuICAgIHB1YmxpYyBuYW1lOiBzdHJpbmcsXG4gICAgcHVibGljIGJvb2thYmxlX2l0ZW1zOiBBcnJheTxCb29rYWJsZUl0ZW0+IHwgbnVsbCxcbiAgKSB7XG4gIH1cbn1cbiJdfQ==
@@ -1,6 +0,0 @@
1
- import { BookableGroup } from "../../models";
2
- import { bookableItemFactory } from "./bookable-item-factory";
3
- export const bookableGroupFactory = (apiBookableGroup) => {
4
- 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)) : []);
5
- };
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9va2FibGUtZ3JvdXAtZmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2RhdGEtYWNjZXNzL3NyYy9saWIvc2VydmljZXMvZmFjdG9yaWVzL2Jvb2thYmxlLWdyb3VwLWZhY3RvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLGNBQWMsQ0FBQztBQUMzQyxPQUFPLEVBQUMsbUJBQW1CLEVBQUMsTUFBTSx5QkFBeUIsQ0FBQztBQUU1RCxNQUFNLENBQUMsTUFBTSxvQkFBb0IsR0FBRyxDQUFDLGdCQUFrQyxFQUFFLEVBQUU7SUFDekUsT0FBTyxJQUFJLGFBQWEsQ0FDdEIsZ0JBQWdCLENBQUMsRUFBRSxFQUNuQixnQkFBZ0IsQ0FBQyxPQUFPLEVBQ3hCLGdC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8gYXBpQm9va2FibGVHcm91cC5ib29rYWJsZV9pdGVtcy5tYXAoXG4gICAgICAoYXBpQm9va2FibGVJdGVtOiBBcGlCb29rYWJsZUl0ZW0pID0+IGJvb2thYmxlSXRlbUZhY3RvcnkoYXBpQm9va2FibGVJdGVtKVxuICAgICkgOiBbXSxcbiAgKTtcbn07XG4iXX0=
@@ -1,9 +0,0 @@
1
- import { ApiBookableItem } from "./api-bookable-item";
2
- export interface ApiBookableGroup {
3
- active: boolean;
4
- club_id: string;
5
- id: string;
6
- name: string;
7
- section_id: string | null;
8
- bookable_items: Array<ApiBookableItem> | null;
9
- }
@@ -1,18 +0,0 @@
1
- import { FormControl, FormGroup } from "@angular/forms";
2
- import { BookableItem } from "./bookable-item";
3
- export declare class BookableGroup {
4
- id: string;
5
- club_id: string;
6
- section_id: string | null;
7
- active: boolean;
8
- name: string;
9
- bookable_items: Array<BookableItem> | null;
10
- static asFormGroup(bookableGroup?: BookableGroup): FormGroup<{
11
- id: FormControl<string | null>;
12
- club_id: FormControl<string | null>;
13
- section_id: FormControl<string | null>;
14
- name: FormControl<string | null>;
15
- active: FormControl<boolean | null>;
16
- }>;
17
- constructor(id: string, club_id: string, section_id: string | null, active: boolean, name: string, bookable_items: Array<BookableItem> | null);
18
- }
@@ -1,3 +0,0 @@
1
- import { ApiBookableGroup } from "../../api-models";
2
- import { BookableGroup } from "../../models";
3
- export declare const bookableGroupFactory: (apiBookableGroup: ApiBookableGroup) => BookableGroup;