@myclub_se/data-access 3.1.7 → 3.1.9

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 (59) hide show
  1. package/esm2022/lib/api-models/api-booking-calendar-slot-session.mjs +1 -1
  2. package/esm2022/lib/api-models/api-booking-calendar.mjs +1 -1
  3. package/esm2022/lib/api-models/api-invoice/api-payment-attempt-create.mjs +12 -2
  4. package/esm2022/lib/api-models/api-invoice/api-payment-attempt.mjs +1 -1
  5. package/esm2022/lib/api-models/api-invoice/api-payment-order.mjs +1 -1
  6. package/esm2022/lib/models/booking-calendar-slot-session.mjs +6 -2
  7. package/esm2022/lib/models/booking-calendar.mjs +5 -2
  8. package/esm2022/lib/models/invoice/payment-attempt.mjs +4 -2
  9. package/esm2022/lib/models/invoice/payment-order.mjs +6 -2
  10. package/esm2022/lib/services/factories/booking-calendar-factory.mjs +2 -2
  11. package/esm2022/lib/services/factories/booking-calendar-slot-session-factory.mjs +2 -2
  12. package/esm2022/lib/services/factories/payment-attempt-factory.mjs +2 -2
  13. package/esm2022/lib/services/factories/payment-order-factory.mjs +2 -2
  14. package/esm2022/lib/services/index.mjs +2 -1
  15. package/esm2022/lib/services/invoice/payment-attempt.service.mjs +44 -19
  16. package/esm2022/lib/services/invoice/payment-order.service.mjs +13 -1
  17. package/esm2022/lib/services/member-fee.service.mjs +41 -0
  18. package/esm2022/lib/store/actions/index.mjs +2 -1
  19. package/esm2022/lib/store/actions/invoice.actions.mjs +97 -43
  20. package/esm2022/lib/store/actions/member-fee.actions.mjs +11 -0
  21. package/esm2022/lib/store/effects/data-access.effects.mjs +3 -1
  22. package/esm2022/lib/store/effects/invoice.effects.mjs +69 -28
  23. package/esm2022/lib/store/effects/member-fee.effects.mjs +18 -0
  24. package/esm2022/lib/store/reducers/data-access.reducer.mjs +3 -1
  25. package/esm2022/lib/store/reducers/invoice.reducer.mjs +3 -3
  26. package/esm2022/lib/store/reducers/member-fee.reducer.mjs +12 -0
  27. package/esm2022/lib/store/selectors/index.mjs +2 -1
  28. package/esm2022/lib/store/selectors/member-fee.selectors.mjs +5 -0
  29. package/esm2022/lib/store/state/data-access.state.mjs +1 -1
  30. package/esm2022/lib/store/state/index.mjs +2 -1
  31. package/esm2022/lib/store/state/member-fee.state.mjs +5 -0
  32. package/fesm2022/myclub_se-data-access.mjs +345 -118
  33. package/fesm2022/myclub_se-data-access.mjs.map +1 -1
  34. package/lib/api-models/api-booking-calendar-slot-session.d.ts +2 -0
  35. package/lib/api-models/api-booking-calendar.d.ts +1 -0
  36. package/lib/api-models/api-invoice/api-payment-attempt-create.d.ts +7 -1
  37. package/lib/api-models/api-invoice/api-payment-attempt.d.ts +2 -1
  38. package/lib/api-models/api-invoice/api-payment-order.d.ts +2 -0
  39. package/lib/models/booking-calendar-slot-session.d.ts +3 -1
  40. package/lib/models/booking-calendar.d.ts +3 -1
  41. package/lib/models/invoice/payment-attempt.d.ts +3 -2
  42. package/lib/models/invoice/payment-order.d.ts +3 -1
  43. package/lib/services/index.d.ts +1 -0
  44. package/lib/services/invoice/payment-attempt.service.d.ts +14 -7
  45. package/lib/services/invoice/payment-order.service.d.ts +4 -1
  46. package/lib/services/member-fee.service.d.ts +12 -0
  47. package/lib/store/actions/index.d.ts +1 -0
  48. package/lib/store/actions/invoice.actions.d.ts +296 -60
  49. package/lib/store/actions/member-fee.actions.d.ts +24 -0
  50. package/lib/store/effects/data-access.effects.d.ts +2 -1
  51. package/lib/store/effects/invoice.effects.d.ts +77 -24
  52. package/lib/store/effects/member-fee.effects.d.ts +14 -0
  53. package/lib/store/reducers/member-fee.reducer.d.ts +2 -0
  54. package/lib/store/selectors/index.d.ts +1 -0
  55. package/lib/store/selectors/member-fee.selectors.d.ts +3 -0
  56. package/lib/store/state/data-access.state.d.ts +2 -0
  57. package/lib/store/state/index.d.ts +1 -0
  58. package/lib/store/state/member-fee.state.d.ts +6 -0
  59. package/package.json +1 -1
@@ -30,4 +30,6 @@ export interface ApiBookingCalendarSlotSession {
30
30
  readonly member_email: string | null;
31
31
  readonly price: number;
32
32
  readonly payment_order_id: string | null;
33
+ readonly pay_until: string | null;
34
+ readonly is_paid: boolean | null;
33
35
  }
@@ -20,4 +20,5 @@ export interface ApiBookingCalendar {
20
20
  type_display?: string | null;
21
21
  payment_limit_in_minutes: number;
22
22
  price_per_hour: number;
23
+ member_fee_id?: string | null;
23
24
  }
@@ -1,7 +1,13 @@
1
1
  import { ApiPaymentAttempt } from './api-payment-attempt';
2
- export declare class ApiPaymentAttemptCreate implements Pick<ApiPaymentAttempt, 'type' | 'invoice_id'> {
2
+ export declare class ApiInvoicePaymentAttemptCreate implements Pick<ApiPaymentAttempt, 'type' | 'invoice_id'> {
3
3
  invoice_id: ApiPaymentAttempt['invoice_id'];
4
4
  type: ApiPaymentAttempt['type'];
5
5
  telephone_number: string;
6
6
  constructor(invoice_id: ApiPaymentAttempt['invoice_id'], type: ApiPaymentAttempt['type'], telephone_number: string);
7
7
  }
8
+ export declare class ApiPaymentOrderPaymentAttemptCreate implements Pick<ApiPaymentAttempt, 'type' | 'payment_order_id'> {
9
+ payment_order_id: ApiPaymentAttempt['payment_order_id'];
10
+ type: ApiPaymentAttempt['type'];
11
+ telephone_number: string;
12
+ constructor(payment_order_id: ApiPaymentAttempt['payment_order_id'], type: ApiPaymentAttempt['type'], telephone_number: string);
13
+ }
@@ -4,7 +4,8 @@ export interface ApiPaymentAttempt {
4
4
  readonly amount: number;
5
5
  readonly error: unknown;
6
6
  readonly id: number;
7
- invoice_id: string;
7
+ invoice_id?: string;
8
+ payment_order_id?: string;
8
9
  paid_date: string;
9
10
  readonly payment_data: ApiPaymentAttemptCreditCardDataType | ApiPaymentAttemptSwishDataType | ApiPaymentAttemptZimplerDataType | null;
10
11
  status: PaymentAttemptStatusType;
@@ -8,4 +8,6 @@ export interface ApiPaymentOrder {
8
8
  member_id: string;
9
9
  organisation_name: string;
10
10
  swish: ApiSwish | null;
11
+ full_title: string;
12
+ pay_until: string;
11
13
  }
@@ -32,6 +32,8 @@ export declare class BookingCalendarSlotSession {
32
32
  readonly member_email: string | null;
33
33
  readonly price: number;
34
34
  readonly payment_order_id: string | null;
35
+ readonly pay_until: string | null;
36
+ readonly is_paid: boolean | null;
35
37
  static asFormGroup(session?: BookingCalendarSlotSession): FormGroup<{
36
38
  id: FormControl<string | null>;
37
39
  section_id: FormControl<string | null>;
@@ -54,5 +56,5 @@ export declare class BookingCalendarSlotSession {
54
56
  bookable_part_id: FormControl<string | null>;
55
57
  member_id: FormControl<string | null>;
56
58
  }>;
57
- 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, slot_index: number, comment: string | null, day: string, repeat: boolean, activity_type_id: string | null, color: string | null, update_repeating: boolean, update_until_date: string | null, bookable_zones_taken: number, bookable_zones_taken_display: string, bookable_part_id: string | null, bookable_part_name: string | null, bookable_name: string | null, bookable_id: string, member_id: string | null, member_name: string | null, member_email: string | null, price: number, payment_order_id: string | null);
59
+ 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, slot_index: number, comment: string | null, day: string, repeat: boolean, activity_type_id: string | null, color: string | null, update_repeating: boolean, update_until_date: string | null, bookable_zones_taken: number, bookable_zones_taken_display: string, bookable_part_id: string | null, bookable_part_name: string | null, bookable_name: string | null, bookable_id: string, member_id: string | null, member_name: string | null, member_email: string | null, price: number, payment_order_id: string | null, pay_until: string | null, is_paid: boolean | null);
58
60
  }
@@ -21,6 +21,7 @@ export declare class BookingCalendar {
21
21
  bookable_groups?: BookableGroup[] | null | undefined;
22
22
  type?: string | null | undefined;
23
23
  type_display?: string | null | undefined;
24
+ member_fee_id?: string | null | undefined;
24
25
  static asFormGroup(calendar?: BookingCalendar): FormGroup<{
25
26
  id: FormControl<string | null>;
26
27
  club_id: FormControl<string | null>;
@@ -40,6 +41,7 @@ export declare class BookingCalendar {
40
41
  type: FormControl<string | null>;
41
42
  price_per_hour: FormControl<number | null>;
42
43
  payment_limit_in_minutes: FormControl<number | null>;
44
+ member_fee_id: FormControl<string | null>;
43
45
  }>;
44
- 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_hour?: number, available_for_teams?: SearchTeam[] | null | undefined, bookable_groups?: BookableGroup[] | null | undefined, type?: string | null | undefined, type_display?: string | null | undefined);
46
+ 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_hour?: number, 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);
45
47
  }
@@ -4,10 +4,11 @@ export declare class PaymentAttempt {
4
4
  readonly id: number;
5
5
  readonly amount: number;
6
6
  readonly error: unknown;
7
- invoiceId: string;
7
+ invoiceId: string | undefined | null;
8
+ paymentOrderId: string | undefined | null;
8
9
  paidDate: string;
9
10
  readonly paymentData: PaymentAttemptCreditCardDataType | PaymentAttemptSwishDataType | PaymentAttemptZimplerDataType;
10
11
  status: PaymentAttemptStatusType;
11
12
  readonly type: PaymentAttemptType;
12
- constructor(id: number, amount: number, error: unknown, invoiceId: string, paidDate: string, paymentData: PaymentAttemptCreditCardDataType | PaymentAttemptSwishDataType | PaymentAttemptZimplerDataType, status: PaymentAttemptStatusType, type: PaymentAttemptType);
13
+ constructor(id: number, amount: number, error: unknown, invoiceId: string | undefined | null, paymentOrderId: string | undefined | null, paidDate: string, paymentData: PaymentAttemptCreditCardDataType | PaymentAttemptSwishDataType | PaymentAttemptZimplerDataType, status: PaymentAttemptStatusType, type: PaymentAttemptType);
13
14
  }
@@ -8,5 +8,7 @@ export declare class PaymentOrder {
8
8
  memberId: string;
9
9
  organisationName: string;
10
10
  swish: Swish | null;
11
- constructor(id: string, amount: number, creditCard: CreditCard | null, clubName: string, isPaid: boolean, memberId: string, organisationName: string, swish: Swish | null);
11
+ full_title: string;
12
+ pay_until: string;
13
+ constructor(id: string, amount: number, creditCard: CreditCard | null, clubName: string, isPaid: boolean, memberId: string, organisationName: string, swish: Swish | null, full_title: string, pay_until: string);
12
14
  }
@@ -12,6 +12,7 @@ export * from './invoice';
12
12
  export * from './maintenance-mode.service';
13
13
  export * from './member.service';
14
14
  export * from './member-card.service';
15
+ export * from './member-fee.service';
15
16
  export * from './member-public-form.service';
16
17
  export * from './news.service';
17
18
  export * from './registration-qr-code.service';
@@ -5,13 +5,20 @@ import * as i0 from "@angular/core";
5
5
  export declare class PaymentAttemptService {
6
6
  private apiService;
7
7
  constructor(apiService: ApiService);
8
- createMemberPaymentAttempt(memberId: string, invoiceId: string, type: PaymentAttemptType, phoneNumber?: string): import("rxjs").Observable<PaymentAttempt>;
9
- createPublicPaymentAttempt(invoiceId: string, token: string, type: PaymentAttemptType, phoneNumber?: string): import("rxjs").Observable<PaymentAttempt>;
10
- getMemberPaymentAttempt(memberId: string, invoiceId: string, id: number): import("rxjs").Observable<PaymentAttempt>;
11
- getMemberSwishQRCode(memberId: string, invoiceId: string, id: number): import("rxjs").Observable<SwishQrCode>;
12
- getPublicPaymentAttempt(invoiceId: string, token: string, id: number): import("rxjs").Observable<PaymentAttempt>;
13
- getPublicSwishQRCode(invoiceId: string, token: string, id: number): import("rxjs").Observable<SwishQrCode>;
14
- private createPaymentAttempt;
8
+ createMemberInvoicePaymentAttempt(memberId: string, invoiceId: string, type: PaymentAttemptType, phoneNumber?: string): import("rxjs").Observable<PaymentAttempt>;
9
+ createPublicInvoicePaymentAttempt(invoiceId: string, token: string, type: PaymentAttemptType, phoneNumber?: string): import("rxjs").Observable<PaymentAttempt>;
10
+ getMemberInvoicePaymentAttempt(memberId: string, invoiceId: string, id: number): import("rxjs").Observable<PaymentAttempt>;
11
+ getMemberInvoiceSwishQRCode(memberId: string, invoiceId: string, id: number): import("rxjs").Observable<SwishQrCode>;
12
+ getPublicInvoicePaymentAttempt(invoiceId: string, token: string, id: number): import("rxjs").Observable<PaymentAttempt>;
13
+ getPublicInvoiceSwishQRCode(invoiceId: string, token: string, id: number): import("rxjs").Observable<SwishQrCode>;
14
+ createMemberPaymentOrderPaymentAttempt(memberId: string, paymentOrderId: string, type: PaymentAttemptType, phoneNumber?: string): import("rxjs").Observable<PaymentAttempt>;
15
+ createPublicPaymentOrderPaymentAttempt(paymentOrderId: string, token: string, type: PaymentAttemptType, phoneNumber?: string): import("rxjs").Observable<PaymentAttempt>;
16
+ getMemberPaymentOrderPaymentAttempt(memberId: string, paymentOrderId: string, id: number): import("rxjs").Observable<PaymentAttempt>;
17
+ getMemberPaymentOrderSwishQRCode(memberId: string, paymentOrderId: string, id: number): import("rxjs").Observable<SwishQrCode>;
18
+ getPublicPaymentOrderPaymentAttempt(paymentOrderId: string, token: string, id: number): import("rxjs").Observable<PaymentAttempt>;
19
+ getPublicPaymentOrderSwishQRCode(paymentOrderId: string, token: string, id: number): import("rxjs").Observable<SwishQrCode>;
20
+ private createInvoicePaymentAttempt;
21
+ private createPaymentOrderPaymentAttempt;
15
22
  private getPaymentAttempt;
16
23
  private getSwishQRCode;
17
24
  static ɵfac: i0.ɵɵFactoryDeclaration<PaymentAttemptService, never>;
@@ -1,13 +1,16 @@
1
1
  import { ApiService } from '../api.service';
2
- import { PaymentOrder } from '../../models';
2
+ import { ClubImage, PaymentOrder } from '../../models';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class PaymentOrderService {
5
5
  private apiService;
6
6
  constructor(apiService: ApiService);
7
7
  getMemberPaymentOrder(memberId: string, paymentOrderId: string): import("rxjs").Observable<PaymentOrder>;
8
+ deleteMemberPaymentOrder(memberId: string, paymentOrderId: string): import("rxjs").Observable<boolean>;
8
9
  getMemberPaymentOrders(memberId: string, filterParams?: {
9
10
  [key: string]: string;
10
11
  }): import("rxjs").Observable<import("../../models").Collection<PaymentOrder>>;
12
+ getPublicPaymentOrder(paymentOrderId: string, token: string): import("rxjs").Observable<PaymentOrder>;
13
+ getPublicPaymentOrderLogo(paymentOrderId: string, token: string): import("rxjs").Observable<ClubImage>;
11
14
  private getPaymentOrder;
12
15
  private getPaymentOrders;
13
16
  static ɵfac: i0.ɵɵFactoryDeclaration<PaymentOrderService, never>;
@@ -0,0 +1,12 @@
1
+ import { ApiService } from './api.service';
2
+ import { Role } from '../models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class MemberFeeService {
5
+ private apiService;
6
+ constructor(apiService: ApiService);
7
+ getMemberFees(role: Role, itemId: string): import("rxjs").Observable<import("../models").Collection<import("../models").MemberFee>>;
8
+ getClubMemberFees(clubId: string): import("rxjs").Observable<import("../models").Collection<import("../models").MemberFee>>;
9
+ getSectionMemberFees(sectionId: string): import("rxjs").Observable<import("../models").Collection<import("../models").MemberFee>>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<MemberFeeService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<MemberFeeService>;
12
+ }
@@ -10,6 +10,7 @@ export * from './file.actions';
10
10
  export * from './invoice.actions';
11
11
  export * from './member.actions';
12
12
  export * from './member-card.actions';
13
+ export * from './member-fee.actions';
13
14
  export * from './news.actions';
14
15
  export * from './public-form.actions';
15
16
  export * from './store.actions';