@myclub_se/data-access 2.9.1 → 2.9.3

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 (27) hide show
  1. package/esm2020/lib/api-models/api-booking-calendar-application-time.mjs +1 -1
  2. package/esm2020/lib/api-models/api-public-token.mjs +2 -0
  3. package/esm2020/lib/authentication/authentication.interceptor.mjs +7 -3
  4. package/esm2020/lib/authentication/authentication.service.mjs +26 -2
  5. package/esm2020/lib/models/booking-calendar-application-time.mjs +3 -2
  6. package/esm2020/lib/models/index.mjs +2 -1
  7. package/esm2020/lib/models/public-authentication.mjs +7 -0
  8. package/esm2020/lib/services/activity.service.mjs +39 -1
  9. package/esm2020/lib/services/factories/booking-calendar-application-time-factory.mjs +2 -2
  10. package/esm2020/lib/services/factories/index.mjs +2 -1
  11. package/esm2020/lib/services/factories/public-authentication-factory.mjs +3 -0
  12. package/esm2020/lib/services/member.service.mjs +7 -2
  13. package/fesm2015/myclub_se-data-access.mjs +188 -108
  14. package/fesm2015/myclub_se-data-access.mjs.map +1 -1
  15. package/fesm2020/myclub_se-data-access.mjs +186 -106
  16. package/fesm2020/myclub_se-data-access.mjs.map +1 -1
  17. package/lib/api-models/api-booking-calendar-application-time.d.ts +1 -0
  18. package/lib/api-models/api-public-token.d.ts +4 -0
  19. package/lib/authentication/authentication.service.d.ts +7 -2
  20. package/lib/models/booking-calendar-application-time.d.ts +2 -1
  21. package/lib/models/index.d.ts +1 -0
  22. package/lib/models/public-authentication.d.ts +5 -0
  23. package/lib/services/activity.service.d.ts +5 -0
  24. package/lib/services/factories/index.d.ts +1 -0
  25. package/lib/services/factories/public-authentication-factory.d.ts +3 -0
  26. package/lib/services/member.service.d.ts +1 -0
  27. package/package.json +1 -1
@@ -23,4 +23,5 @@ export interface ApiBookingCalendarApplicationTime {
23
23
  readonly slot_number_of_available_sessions: string;
24
24
  readonly slot_last_repeating_date: string;
25
25
  readonly created: string;
26
+ readonly location_name: string;
26
27
  }
@@ -0,0 +1,4 @@
1
+ export interface ApiPublicToken {
2
+ token: string;
3
+ token_expires: string;
4
+ }
@@ -1,9 +1,9 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { TokenService } from '../services';
3
- import { Authentication, Token } from '../models';
3
+ import { Authentication, PublicAuthentication, Token } from '../models';
4
4
  import { ApiService } from '../services/api.service';
5
5
  import { Observable } from 'rxjs';
6
- import { GrantType } from "../types/grant-type";
6
+ import { GrantType } from '../types';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare const APP: InjectionToken<App>;
9
9
  export interface App {
@@ -18,16 +18,21 @@ export declare class AuthenticationService {
18
18
  private tokenService;
19
19
  private currentTokenSubject;
20
20
  authentication: Authentication | null;
21
+ publicAuthentication: PublicAuthentication | null;
21
22
  currentToken$: Observable<Token | null>;
22
23
  get isAuthenticated(): boolean;
23
24
  constructor(apiService: ApiService, app: App, tokenService: TokenService);
24
25
  authenticateByCredentials(username: string, password: string): Observable<Token>;
25
26
  authenticateByToken(token: string): Observable<Token>;
26
27
  clearAuthentication(): void;
28
+ getLoginCode(email: string, clubId: string | null): Observable<import("../models").Collection<import("../models").SearchClub>>;
29
+ getPublicToken(email: string, code: string, clubId: string): Observable<PublicAuthentication>;
30
+ changePublicToken(memberId: string): Observable<PublicAuthentication>;
27
31
  getSessionToken(): Observable<Token | null>;
28
32
  logout(): Observable<void>;
29
33
  reauthenticate(grantType?: GrantType | null): Observable<Token>;
30
34
  setAuthentication(accessToken: string, refreshToken: string): void;
35
+ setPublicToken(token: PublicAuthentication): void;
31
36
  setToken(token: Token): void;
32
37
  static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, never>;
33
38
  static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationService>;
@@ -24,6 +24,7 @@ export declare class BookingCalendarApplicationTime {
24
24
  readonly slot_number_of_available_sessions: string;
25
25
  readonly slot_last_repeating_date: string | null;
26
26
  readonly created: string;
27
+ readonly location_name: string;
27
28
  static asFormGroup(session?: BookingCalendarApplicationTime): FormGroup<{
28
29
  id: FormControl<string | null>;
29
30
  section_id: FormControl<string | null>;
@@ -41,5 +42,5 @@ export declare class BookingCalendarApplicationTime {
41
42
  repeat: FormControl<boolean | null>;
42
43
  activity_type_id: FormControl<string | null>;
43
44
  }>;
44
- constructor(id: string, section_id: string | null, slot_id: string, team_id: string | null, end_time: string, section_name: string | null, start_time: string, team_name: string | null, location_zones_taken: number, applicant_comment: string | null, reviewer_comment: string | null, status: string, location_part_id: string | null, location_part_name: string | null, location_id: string, repeat: boolean, activity_type_id: string | null, color: string | null, slot_start_time: string, slot_end_time: string, slot_day: string, slot_number_of_available_sessions: string, slot_last_repeating_date: string | null, created: string);
45
+ constructor(id: string, section_id: string | null, slot_id: string, team_id: string | null, end_time: string, section_name: string | null, start_time: string, team_name: string | null, location_zones_taken: number, applicant_comment: string | null, reviewer_comment: string | null, status: string, location_part_id: string | null, location_part_name: string | null, location_id: string, repeat: boolean, activity_type_id: string | null, color: string | null, slot_start_time: string, slot_end_time: string, slot_day: string, slot_number_of_available_sessions: string, slot_last_repeating_date: string | null, created: string, location_name: string);
45
46
  }
@@ -42,6 +42,7 @@ export * from './member-type';
42
42
  export * from './news';
43
43
  export * from './open-activity';
44
44
  export * from './partner';
45
+ export * from './public-authentication';
45
46
  export * from './role';
46
47
  export * from './search-club';
47
48
  export * from './search-team';
@@ -0,0 +1,5 @@
1
+ export declare class PublicAuthentication {
2
+ token: string;
3
+ tokenExpires: string;
4
+ constructor(token: string, tokenExpires: string);
5
+ }
@@ -18,6 +18,8 @@ export declare class ActivityService {
18
18
  getMemberOpenActivities(memberId: string, startDate: string, endDate: string): import("rxjs").Observable<Collection<import("../models").OpenActivity>>;
19
19
  getMemberOpenActivity(memberId: string, activityId: string): import("rxjs").Observable<import("../models").OpenActivity>;
20
20
  getPublicActivityInvite(id: string, token: string): import("rxjs").Observable<import("../models").ActivityInvite>;
21
+ getPublicOpenActivities(startDate: string, endDate: string): import("rxjs").Observable<Collection<import("../models").OpenActivity>>;
22
+ getPublicOpenActivity(activityId: string): import("rxjs").Observable<import("../models").OpenActivity>;
21
23
  getTeamActivity(teamId: string, id: string): import("rxjs").Observable<Activity>;
22
24
  getActivityLocations(role: Role, clubOrSectionOrTeamId: string, force?: boolean): import("rxjs").Observable<Collection<ActivityLocation> | undefined>;
23
25
  getTeamActivityLocations(teamId: string, force?: boolean): import("rxjs").Observable<Collection<ActivityLocation> | undefined>;
@@ -70,9 +72,12 @@ export declare class ActivityService {
70
72
  getTeamCalendarEvents(teamId: string, startDate?: string | null, endDate?: string | null): import("rxjs").Observable<Collection<import("../models").Event>>;
71
73
  resendInvite(teamId: string, activityId: string, activityInviteId: string): import("rxjs").Observable<import("../models").ActivityInvite>;
72
74
  removeMemberOpenActivity(memberId: string, activityId: string): import("rxjs").Observable<boolean>;
75
+ removePublicOpenActivity(activityId: string): import("rxjs").Observable<boolean>;
73
76
  signUpMemberOpenActivity(memberId: string, activityId: string, comment: string, optionalFees: Array<string>): import("rxjs").Observable<boolean>;
77
+ signUpPublicOpenActivity(activityId: string, comment: string, optionalFees: Array<string>): import("rxjs").Observable<boolean>;
74
78
  updateMemberActivity(memberId: string, activityInviteId: string, activityInvite: unknown): import("rxjs").Observable<import("../models").ActivityInvite>;
75
79
  updatePublicActivityInvite(id: string, token: string, activityInvite: unknown): import("rxjs").Observable<import("../models").ActivityInvite>;
80
+ updatePublicOpenActivityInvite(id: string, activityInvite: unknown): import("rxjs").Observable<import("../models").ActivityInvite>;
76
81
  updateTeamActivity(teamId: string, activity: Activity): import("rxjs").Observable<Activity>;
77
82
  updateTeamActivityInvite(teamId: string, activityId: string, activityInviteId: string, activityInvite: MemberActivityInvite): import("rxjs").Observable<MemberActivityInvite>;
78
83
  updateTeamActivityParticipants(teamId: string, activityId: string, members: Array<string>): import("rxjs").Observable<void>;
@@ -61,6 +61,7 @@ export * from './other-member-factory';
61
61
  export * from './other-member-field-factory';
62
62
  export * from './partner-factory';
63
63
  export * from './payment-attempt-factory';
64
+ export * from './public-authentication-factory';
64
65
  export * from './search-club-factory';
65
66
  export * from './search-member-card-factory';
66
67
  export * from './search-member-factory';
@@ -0,0 +1,3 @@
1
+ import { ApiPublicToken } from '../../api-models/api-public-token';
2
+ import { PublicAuthentication } from '../../models';
3
+ export declare const publicAuthenticationFactory: (publicToken: ApiPublicToken) => PublicAuthentication;
@@ -7,6 +7,7 @@ export declare class MemberService {
7
7
  getMemberProfile(memberId: string): import("rxjs").Observable<Member>;
8
8
  getMemberOtherMember(memberId: string, id: string): import("rxjs").Observable<OtherMember>;
9
9
  getTeamOtherMember(teamId: string, id: string): import("rxjs").Observable<OtherMember>;
10
+ listPublicMembers(): import("rxjs").Observable<import("../models").Collection<import("../models").SearchMember>>;
10
11
  removeMemberProfileContact(memberId: string, contactId: string): import("rxjs").Observable<boolean>;
11
12
  removeTeamMemberContact(teamId: string, memberId: string, contactId: string): import("rxjs").Observable<boolean>;
12
13
  searchMemberOtherMembers(memberId: string, searchTerm: string): import("rxjs").Observable<import("../models").Collection<OtherMember>>;
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.9.1",
4
+ "version": "2.9.3",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
7
7
  "peerDependencies": {