@myclub_se/data-access 2.12.1 → 2.13.1

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 (31) hide show
  1. package/esm2020/lib/api-models/api-booking-calendar-slot-session.mjs +1 -1
  2. package/esm2020/lib/api-models/api-booking-calendar.mjs +1 -1
  3. package/esm2020/lib/api-models/api-overbooked-location.mjs +2 -0
  4. package/esm2020/lib/api-models/index.mjs +2 -1
  5. package/esm2020/lib/models/booking-calendar-slot-session.mjs +6 -2
  6. package/esm2020/lib/models/booking-calendar.mjs +13 -2
  7. package/esm2020/lib/models/index.mjs +3 -1
  8. package/esm2020/lib/models/overbooked-location.mjs +10 -0
  9. package/esm2020/lib/models/search-team.mjs +8 -1
  10. package/esm2020/lib/services/booking-calendar.service.mjs +50 -2
  11. package/esm2020/lib/services/factories/booking-calendar-factory.mjs +3 -2
  12. package/esm2020/lib/services/factories/booking-calendar-slot-session-factory.mjs +2 -2
  13. package/esm2020/lib/services/factories/index.mjs +2 -1
  14. package/esm2020/lib/services/factories/overbooked-location-factory.mjs +3 -0
  15. package/fesm2015/myclub_se-data-access.mjs +113 -33
  16. package/fesm2015/myclub_se-data-access.mjs.map +1 -1
  17. package/fesm2020/myclub_se-data-access.mjs +113 -33
  18. package/fesm2020/myclub_se-data-access.mjs.map +1 -1
  19. package/lib/api-models/api-booking-calendar-slot-session.d.ts +3 -0
  20. package/lib/api-models/api-booking-calendar.d.ts +3 -0
  21. package/lib/api-models/api-overbooked-location.d.ts +7 -0
  22. package/lib/api-models/index.d.ts +1 -0
  23. package/lib/models/booking-calendar-slot-session.d.ts +5 -1
  24. package/lib/models/booking-calendar.d.ts +6 -1
  25. package/lib/models/index.d.ts +2 -0
  26. package/lib/models/overbooked-location.d.ts +8 -0
  27. package/lib/models/search-team.d.ts +5 -0
  28. package/lib/services/booking-calendar.service.d.ts +6 -0
  29. package/lib/services/factories/index.d.ts +1 -0
  30. package/lib/services/factories/overbooked-location-factory.d.ts +3 -0
  31. package/package.json +1 -1
@@ -9,6 +9,7 @@ export interface ApiBookingCalendarSlotSession {
9
9
  title: string;
10
10
  readonly team_name: string;
11
11
  readonly is_overbooked: boolean;
12
+ readonly last_repeating_date: string | null;
12
13
  readonly type: string;
13
14
  location_zones_taken: number;
14
15
  readonly slot_index: number;
@@ -16,6 +17,8 @@ export interface ApiBookingCalendarSlotSession {
16
17
  location_part_id: string | null;
17
18
  readonly location_part_name: string | null;
18
19
  readonly location_id: string;
20
+ readonly location_name: string | null;
21
+ readonly day: string;
19
22
  repeat: boolean;
20
23
  activity_type_id: string | null;
21
24
  readonly color: string | null;
@@ -1,4 +1,5 @@
1
1
  import { ApiActivityLocationGroup } from "./api-activity-location-group";
2
+ import { ApiSearchTeam } from "./api-search-team";
2
3
  export interface ApiBookingCalendar {
3
4
  id: string;
4
5
  club_id: string;
@@ -10,6 +11,8 @@ export interface ApiBookingCalendar {
10
11
  readonly team_name: string | null;
11
12
  status: string;
12
13
  location_groups: Array<ApiActivityLocationGroup> | null;
14
+ available_for_teams: Array<ApiSearchTeam> | null;
15
+ is_default: boolean;
13
16
  max_application_number: number;
14
17
  allow_team_export: boolean;
15
18
  allow_repeated_bookings: boolean;
@@ -0,0 +1,7 @@
1
+ export interface ApiOverbookedLocation {
2
+ start_time: string;
3
+ end_time: string;
4
+ day: string;
5
+ location_name: string;
6
+ session_names: Array<string>;
7
+ }
@@ -38,6 +38,7 @@ export * from './api-member-type';
38
38
  export * from './api-news';
39
39
  export * from './api-open-activity';
40
40
  export * from './api-optional-fee';
41
+ export * from './api-overbooked-location';
41
42
  export * from './api-partner';
42
43
  export * from './api-registration-qr-code';
43
44
  export * from './api-search-club';
@@ -10,13 +10,16 @@ export declare class BookingCalendarSlotSession {
10
10
  start_time: string;
11
11
  team_name: string | null;
12
12
  is_overbooked: boolean;
13
+ last_repeating_date: string | null;
13
14
  type: string;
14
15
  location_zones_taken: number;
15
16
  readonly slot_index: number;
16
17
  comment: string | null;
17
18
  location_part_id: string | null;
18
19
  readonly location_part_name: string | null;
20
+ readonly location_name: string | null;
19
21
  readonly location_id: string;
22
+ readonly day: string;
20
23
  readonly repeat: boolean;
21
24
  activity_type_id: string | null;
22
25
  readonly color: string | null;
@@ -33,6 +36,7 @@ export declare class BookingCalendarSlotSession {
33
36
  start_time: FormControl<string | null>;
34
37
  team_name: FormControl<string | null>;
35
38
  is_overbooked: FormControl<boolean | null>;
39
+ last_repeating_date: FormControl<string | null>;
36
40
  type: FormControl<string | null>;
37
41
  location_zones_taken: FormControl<number | null>;
38
42
  comment: FormControl<string | null>;
@@ -42,5 +46,5 @@ export declare class BookingCalendarSlotSession {
42
46
  update_repeating: FormControl<boolean | null>;
43
47
  update_until_date: FormControl<string | null>;
44
48
  }>;
45
- constructor(id: string, section_id: string | null, slot_id: string, team_id: string | null, title: string, end_time: string, section_name: string | null, start_time: string, team_name: string | null, is_overbooked: boolean, type: string, location_zones_taken: number, slot_index: number, comment: string | null, location_part_id: string | null, location_part_name: string | null, location_id: string, repeat: boolean, activity_type_id: string | null, color: string | null, update_repeating: boolean, update_until_date?: string | null);
49
+ constructor(id: string, section_id: string | null, slot_id: string, team_id: string | null, title: string, end_time: string, section_name: string | null, start_time: string, team_name: string | null, is_overbooked: boolean, last_repeating_date: string | null, type: string, location_zones_taken: number, slot_index: number, comment: string | null, location_part_id: string | null, location_part_name: string | null, location_name: string | null, location_id: string, day: string, repeat: boolean, activity_type_id: string | null, color: string | null, update_repeating: boolean, update_until_date?: string | null);
46
50
  }
@@ -1,5 +1,6 @@
1
1
  import { FormArray, FormControl, FormGroup } from "@angular/forms";
2
2
  import { ActivityLocationGroup } from "./activity-location-group";
3
+ import { SearchTeam } from "./search-team";
3
4
  export declare class BookingCalendar {
4
5
  id: string;
5
6
  club_id: string;
@@ -13,7 +14,9 @@ export declare class BookingCalendar {
13
14
  max_application_number: number;
14
15
  allow_team_export: boolean;
15
16
  allow_repeated_bookings: boolean;
17
+ is_default: boolean;
16
18
  location_groups?: ActivityLocationGroup[] | null | undefined;
19
+ available_for_teams?: SearchTeam[] | null | undefined;
17
20
  static asFormGroup(calendar?: BookingCalendar): FormGroup<{
18
21
  id: FormControl<string | null>;
19
22
  club_id: FormControl<string | null>;
@@ -25,9 +28,11 @@ export declare class BookingCalendar {
25
28
  team_name: FormControl<string | null>;
26
29
  status: FormControl<string | null>;
27
30
  location_groups: FormArray<FormGroup<any>>;
31
+ available_for_teams: FormArray<FormGroup<any>>;
28
32
  max_application_number: FormControl<number | null>;
33
+ is_default: FormControl<boolean | null>;
29
34
  allow_team_export: FormControl<boolean | null>;
30
35
  allow_repeated_bookings: FormControl<boolean | null>;
31
36
  }>;
32
- 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, location_groups?: ActivityLocationGroup[] | null | undefined);
37
+ 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, location_groups?: ActivityLocationGroup[] | null | undefined, available_for_teams?: SearchTeam[] | null | undefined);
33
38
  }
@@ -41,6 +41,8 @@ export * from './member-team-through';
41
41
  export * from './member-type';
42
42
  export * from './news';
43
43
  export * from './open-activity';
44
+ export * from './optional-fee';
45
+ export * from './overbooked-location';
44
46
  export * from './partner';
45
47
  export * from './public-authentication';
46
48
  export * from './registration-qr-code';
@@ -0,0 +1,8 @@
1
+ export declare class OverbookedLocation {
2
+ start_time: string;
3
+ end_time: string;
4
+ day: string;
5
+ location_name: string;
6
+ session_names: Array<string>;
7
+ constructor(start_time: string, end_time: string, day: string, location_name: string, session_names: Array<string>);
8
+ }
@@ -1,5 +1,6 @@
1
1
  import { Club } from './club';
2
2
  import { Section } from './section';
3
+ import { FormControl, FormGroup } from "@angular/forms";
3
4
  export declare class SearchTeam {
4
5
  club: Club | undefined;
5
6
  section: Section | undefined;
@@ -7,5 +8,9 @@ export declare class SearchTeam {
7
8
  club_name: string;
8
9
  name: string;
9
10
  section_name: string | undefined;
11
+ static asFormGroup(team?: SearchTeam): FormGroup<{
12
+ id: FormControl<string | null>;
13
+ name: FormControl<string | null>;
14
+ }>;
10
15
  constructor(club: Club | undefined, section: Section | undefined, id: string, club_name: string, name: string, section_name: string | undefined);
11
16
  }
@@ -103,6 +103,12 @@ export declare class BookingCalendarService {
103
103
  private deleteClubBookingCalendarApplicationTime;
104
104
  private deleteSectionBookingCalendarApplicationTime;
105
105
  private deleteTeamBookingCalendarApplicationTime;
106
+ getOverbookedLocations(role: Role, clubOrSectionOrTeamId: string, bookingSlotFilter: BookingSlotFilter): import("rxjs").Observable<import("../models").Collection<import("../models").OverbookedLocation>>;
107
+ private getClubOverbookedLocations;
108
+ private getSectionOverbookedLocations;
109
+ getOverbookedSessions(role: Role, clubOrSectionOrTeamId: string, bookingSlotFilter: BookingSlotFilter): import("rxjs").Observable<import("../models").Collection<BookingCalendarSlotSession>>;
110
+ private getClubOverbookedSessions;
111
+ private getSectionOverbookedSessions;
106
112
  static ɵfac: i0.ɵɵFactoryDeclaration<BookingCalendarService, never>;
107
113
  static ɵprov: i0.ɵɵInjectableDeclaration<BookingCalendarService>;
108
114
  }
@@ -57,6 +57,7 @@ export * from './member-validation-settings-factory';
57
57
  export * from './news-factory';
58
58
  export * from './open-activity-factory';
59
59
  export * from './optional-fee-factory';
60
+ export * from './overbooked-location-factory';
60
61
  export * from './other-member-factory';
61
62
  export * from './other-member-field-factory';
62
63
  export * from './partner-factory';
@@ -0,0 +1,3 @@
1
+ import { ApiOverbookedLocation } from "../../api-models";
2
+ import { OverbookedLocation } from "../../models";
3
+ export declare const overbookedLocationFactory: (apiOverbookedLocation: ApiOverbookedLocation) => OverbookedLocation;
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": "2.12.1",
4
+ "version": "2.13.1",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
7
7
  "peerDependencies": {