@myclub_se/data-access 3.2.3 → 3.3.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 (41) hide show
  1. package/esm2022/lib/api-models/api-invoice/api-invoice-payment-post-data.mjs +2 -0
  2. package/esm2022/lib/api-models/api-invoice/api-member-invoice.mjs +1 -1
  3. package/esm2022/lib/api-models/api-invoice/api-payment-attempt-create.mjs +4 -4
  4. package/esm2022/lib/api-models/api-invoice/index.mjs +2 -1
  5. package/esm2022/lib/interfaces/index.mjs +2 -1
  6. package/esm2022/lib/interfaces/payment-attempt-data.interface.mjs +2 -0
  7. package/esm2022/lib/models/booking-calendar-slot.mjs +2 -1
  8. package/esm2022/lib/models/invoice/member-invoice.mjs +4 -2
  9. package/esm2022/lib/models/invoice/payment-attempt-data-types/index.mjs +2 -1
  10. package/esm2022/lib/models/invoice/payment-attempt-data-types/payment-attempt-fritidskortet-data-type.mjs +2 -0
  11. package/esm2022/lib/models/invoice/payment-attempt.mjs +1 -1
  12. package/esm2022/lib/services/booking-calendar.service.mjs +29 -1
  13. package/esm2022/lib/services/factories/member-invoice-factory.mjs +2 -2
  14. package/esm2022/lib/services/factories/payment-attempt-factory.mjs +4 -1
  15. package/esm2022/lib/services/invoice/payment-attempt.service.mjs +20 -6
  16. package/esm2022/lib/store/actions/booking.actions.mjs +7 -1
  17. package/esm2022/lib/store/actions/invoice.actions.mjs +9 -1
  18. package/esm2022/lib/store/effects/booking.effects.mjs +11 -2
  19. package/esm2022/lib/store/effects/invoice.effects.mjs +26 -8
  20. package/esm2022/lib/types/payment-attempt-type.mjs +1 -1
  21. package/fesm2022/myclub_se-data-access.mjs +105 -17
  22. package/fesm2022/myclub_se-data-access.mjs.map +1 -1
  23. package/lib/api-models/api-invoice/api-invoice-payment-post-data.d.ts +8 -0
  24. package/lib/api-models/api-invoice/api-member-invoice.d.ts +1 -0
  25. package/lib/api-models/api-invoice/api-payment-attempt-create.d.ts +3 -2
  26. package/lib/api-models/api-invoice/index.d.ts +1 -0
  27. package/lib/interfaces/index.d.ts +1 -0
  28. package/lib/interfaces/payment-attempt-data.interface.d.ts +8 -0
  29. package/lib/models/booking-calendar-slot.d.ts +1 -0
  30. package/lib/models/invoice/member-invoice.d.ts +2 -1
  31. package/lib/models/invoice/payment-attempt-data-types/index.d.ts +1 -0
  32. package/lib/models/invoice/payment-attempt-data-types/payment-attempt-fritidskortet-data-type.d.ts +1 -0
  33. package/lib/models/invoice/payment-attempt.d.ts +3 -3
  34. package/lib/services/booking-calendar.service.d.ts +3 -0
  35. package/lib/services/invoice/payment-attempt.service.d.ts +3 -2
  36. package/lib/store/actions/booking.actions.d.ts +18 -0
  37. package/lib/store/actions/invoice.actions.d.ts +44 -0
  38. package/lib/store/effects/booking.effects.d.ts +5 -0
  39. package/lib/store/effects/invoice.effects.d.ts +10 -0
  40. package/lib/types/payment-attempt-type.d.ts +1 -1
  41. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ export interface ApiInvoicePaymentPostData {
2
+ invoice_id: string;
3
+ type: string;
4
+ public: boolean;
5
+ adult_personal_id?: string;
6
+ child_personal_id?: string;
7
+ phone_number?: string;
8
+ }
@@ -21,4 +21,5 @@ export interface ApiMemberInvoice {
21
21
  reference: string;
22
22
  swish: ApiSwish | null;
23
23
  zimpler: ApiZimpler | null;
24
+ fritidskortet_allowed: boolean;
24
25
  }
@@ -1,9 +1,10 @@
1
1
  import { ApiPaymentAttempt } from './api-payment-attempt';
2
+ import { PaymentAttemptData } from '@myclub/data-access';
2
3
  export declare class ApiInvoicePaymentAttemptCreate implements Pick<ApiPaymentAttempt, 'type' | 'invoice_id'> {
3
4
  invoice_id: ApiPaymentAttempt['invoice_id'];
4
5
  type: ApiPaymentAttempt['type'];
5
- telephone_number: string;
6
- constructor(invoice_id: ApiPaymentAttempt['invoice_id'], type: ApiPaymentAttempt['type'], telephone_number: string);
6
+ data: PaymentAttemptData;
7
+ constructor(invoice_id: ApiPaymentAttempt['invoice_id'], type: ApiPaymentAttempt['type'], data: PaymentAttemptData);
7
8
  }
8
9
  export declare class ApiPaymentOrderPaymentAttemptCreate implements Pick<ApiPaymentAttempt, 'type' | 'payment_order_id'> {
9
10
  payment_order_id: ApiPaymentAttempt['payment_order_id'];
@@ -1,5 +1,6 @@
1
1
  export * from './api-invoice-payments';
2
2
  export * from './payment-attempt-data-types';
3
+ export * from './api-invoice-payment-post-data';
3
4
  export * from './api-member-fee';
4
5
  export * from './api-member-invoice';
5
6
  export * from './api-member-invoice-row';
@@ -2,4 +2,5 @@ export * from './email-recipient.interface';
2
2
  export * from './new-account.interface';
3
3
  export * from './open-activity-search-params.interface';
4
4
  export * from './option.interface';
5
+ export * from './payment-attempt-data.interface';
5
6
  export * from './sms-recipient.interface';
@@ -0,0 +1,8 @@
1
+ import { PaymentAttempt } from '../models';
2
+ export interface PaymentAttemptData {
3
+ type: PaymentAttempt['type'];
4
+ phone_number?: string;
5
+ childPersonalId?: string;
6
+ adultPersonalId?: string;
7
+ public?: boolean;
8
+ }
@@ -51,6 +51,7 @@ export declare class BookingCalendarSlot {
51
51
  reserved_time_position: FormControl<string | null>;
52
52
  bookable_id: FormControl<string | null>;
53
53
  price: FormControl<number | null>;
54
+ split: FormControl<string | null>;
54
55
  }>;
55
56
  constructor(id: string, calendar_id: string, calendar_status: string, color: string, day: string, end_time: string, group_id: string | null, number_of_available_sessions: number, sessions: Array<BookingCalendarSlotSession>, open_sessions: Array<BookingCalendarSlotSession>, start_time: string, type: BookingCalendarSlotType, repeat: string, update_repeating: boolean, update_until_date: string | null, reserved_time_enabled: boolean, repeat_num?: number | null | undefined, repeat_to_day?: string | null | undefined, repeat_type?: string | null | undefined, reserved_time?: string | null | undefined, reserved_time_position?: BookingCalendarSlotReservedTimePosition | null | undefined, application_times?: BookingCalendarApplicationTime[] | null | undefined, last_repeating_date?: string | null | undefined, bookable_name?: string | null | undefined, bookable_id?: string | undefined, price?: number | null);
56
57
  }
@@ -21,5 +21,6 @@ export declare class MemberInvoice {
21
21
  reference: string;
22
22
  swish: Swish | null;
23
23
  zimpler: Zimpler | null;
24
- constructor(id: string, amount: number, amountPaid: number, balance: number, clubBillId: number, clubName: string, creditCard: CreditCard | null, datePaid: string, dueDate: string, giro: Giro | null, invoiceRows: Array<MemberInvoiceRow>, invoiceText: string, isPaid: boolean, memberId: string, organisationName: string, payee: string, paymentUrl: string, reference: string, swish: Swish | null, zimpler: Zimpler | null);
24
+ fritidskortetAllowed: boolean;
25
+ constructor(id: string, amount: number, amountPaid: number, balance: number, clubBillId: number, clubName: string, creditCard: CreditCard | null, datePaid: string, dueDate: string, giro: Giro | null, invoiceRows: Array<MemberInvoiceRow>, invoiceText: string, isPaid: boolean, memberId: string, organisationName: string, payee: string, paymentUrl: string, reference: string, swish: Swish | null, zimpler: Zimpler | null, fritidskortetAllowed: boolean);
25
26
  }
@@ -1,3 +1,4 @@
1
1
  export * from './payment-attempt-credit-card-data-type';
2
+ export * from './payment-attempt-fritidskortet-data-type';
2
3
  export * from './payment-attempt-swish-data-type';
3
4
  export * from './payment-attempt-zimpler-data-type';
@@ -0,0 +1 @@
1
+ export type PaymentAttemptFritidskortetDataType = {};
@@ -1,5 +1,5 @@
1
1
  import { PaymentAttemptStatusType, PaymentAttemptType } from '../../types';
2
- import { PaymentAttemptCreditCardDataType, PaymentAttemptSwishDataType, PaymentAttemptZimplerDataType } from './payment-attempt-data-types';
2
+ import { PaymentAttemptCreditCardDataType, PaymentAttemptSwishDataType, PaymentAttemptZimplerDataType, PaymentAttemptFritidskortetDataType } from './payment-attempt-data-types';
3
3
  export declare class PaymentAttempt {
4
4
  readonly id: number;
5
5
  readonly amount: number;
@@ -7,8 +7,8 @@ export declare class PaymentAttempt {
7
7
  invoiceId: string | undefined | null;
8
8
  paymentOrderId: string | undefined | null;
9
9
  paidDate: string;
10
- readonly paymentData: PaymentAttemptCreditCardDataType | PaymentAttemptSwishDataType | PaymentAttemptZimplerDataType;
10
+ readonly paymentData: PaymentAttemptCreditCardDataType | PaymentAttemptSwishDataType | PaymentAttemptZimplerDataType | PaymentAttemptFritidskortetDataType;
11
11
  status: PaymentAttemptStatusType;
12
12
  readonly 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
+ constructor(id: number, amount: number, error: unknown, invoiceId: string | undefined | null, paymentOrderId: string | undefined | null, paidDate: string, paymentData: PaymentAttemptCreditCardDataType | PaymentAttemptSwishDataType | PaymentAttemptZimplerDataType | PaymentAttemptFritidskortetDataType, status: PaymentAttemptStatusType, type: PaymentAttemptType);
14
14
  }
@@ -21,6 +21,9 @@ export declare class BookingCalendarService {
21
21
  createBookingCalendarSlot(role: Role, clubOrSectionOrTeamId: string, slot: Partial<BookingCalendarSlot>): import("rxjs").Observable<BookingCalendarSlot>;
22
22
  private createClubBookingCalendarSlot;
23
23
  private createSectionBookingCalendarSlot;
24
+ createBulkBookingCalendarSlots(role: Role, clubOrSectionOrTeamId: string, slots: Array<Partial<BookingCalendarSlot>>): import("rxjs").Observable<boolean>;
25
+ private createBulkClubBookingCalendarSlots;
26
+ private createBulkSectionBookingCalendarSlot;
24
27
  getBookingCalendarSlots(role: Role, itemId: string, bookingSlotFilter: BookingSlotFilter): import("rxjs").Observable<import("../models").Collection<BookingCalendarSlot>>;
25
28
  private getClubBookingCalendarSlots;
26
29
  private getSectionBookingCalendarSlots;
@@ -1,12 +1,13 @@
1
1
  import { ApiService } from '../api.service';
2
2
  import { PaymentAttempt, SwishQrCode } from '../../models';
3
3
  import { PaymentAttemptType } from '../../types';
4
+ import { PaymentAttemptData } from '../../interfaces';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class PaymentAttemptService {
6
7
  private apiService;
7
8
  constructor(apiService: ApiService);
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>;
9
+ createMemberInvoicePaymentAttempt(memberId: string, invoiceId: string, data: PaymentAttemptData): import("rxjs").Observable<PaymentAttempt>;
10
+ createPublicInvoicePaymentAttempt(invoiceId: string, token: string, data: PaymentAttemptData): import("rxjs").Observable<PaymentAttempt>;
10
11
  getMemberInvoicePaymentAttempt(memberId: string, invoiceId: string, id: number): import("rxjs").Observable<PaymentAttempt>;
11
12
  getMemberInvoiceSwishQRCode(memberId: string, invoiceId: string, id: number): import("rxjs").Observable<SwishQrCode>;
12
13
  getPublicInvoicePaymentAttempt(invoiceId: string, token: string, id: number): import("rxjs").Observable<PaymentAttempt>;
@@ -70,6 +70,9 @@ export declare enum BookingActionTypes {
70
70
  CreateBookingCalendarSlot = "[Booking] Create booking calendar slot",
71
71
  CreateBookingCalendarSlotSuccess = "[Booking] Create booking calendar slot success",
72
72
  CreateBookingCalendarSlotFailure = "[Booking] Create booking calendar slot failure",
73
+ CreateBulkBookingCalendarSlot = "[Booking] Bulk Create booking calendar slot",
74
+ CreateBulkBookingCalendarSlotSuccess = "[Booking] Bulk Create booking calendar slot success",
75
+ CreateBulkBookingCalendarSlotFailure = "[Booking] Bulk Create booking calendar slot failure",
73
76
  UpdateBookingCalendarSlot = "[Booking] Update booking calendar slot",
74
77
  UpdateBookingCalendarSlotSuccess = "[Booking] Update booking calendar slot success",
75
78
  UpdateBookingCalendarSlotFailure = "[Booking] Update booking calendar slot failure",
@@ -517,6 +520,21 @@ export declare const createBookingCalendarSlotFailureAction: import("@ngrx/store
517
520
  }) => {
518
521
  payload: HttpErrorResponse;
519
522
  } & import("@ngrx/store").Action<BookingActionTypes.CreateBookingCalendarSlotFailure>>;
523
+ export declare const createBulkBookingCalendarSlotAction: import("@ngrx/store").ActionCreator<BookingActionTypes.CreateBulkBookingCalendarSlot, (props: {
524
+ role: Role;
525
+ clubOrSectionOrTeamId: string;
526
+ slots: Array<Partial<BookingCalendarSlot>>;
527
+ }) => {
528
+ role: Role;
529
+ clubOrSectionOrTeamId: string;
530
+ slots: Array<Partial<BookingCalendarSlot>>;
531
+ } & import("@ngrx/store").Action<BookingActionTypes.CreateBulkBookingCalendarSlot>>;
532
+ export declare const createBulkBookingCalendarSlotSuccessAction: import("@ngrx/store").ActionCreator<BookingActionTypes.CreateBulkBookingCalendarSlotSuccess, () => import("@ngrx/store").Action<BookingActionTypes.CreateBulkBookingCalendarSlotSuccess>>;
533
+ export declare const createBulkBookingCalendarSlotFailureAction: import("@ngrx/store").ActionCreator<BookingActionTypes.CreateBulkBookingCalendarSlotFailure, (props: {
534
+ payload: HttpErrorResponse;
535
+ }) => {
536
+ payload: HttpErrorResponse;
537
+ } & import("@ngrx/store").Action<BookingActionTypes.CreateBulkBookingCalendarSlotFailure>>;
520
538
  export declare const updateBookingCalendarSlotAction: import("@ngrx/store").ActionCreator<BookingActionTypes.UpdateBookingCalendarSlot, (props: {
521
539
  role: Role;
522
540
  clubOrSectionOrTeamId: string;
@@ -3,6 +3,10 @@ import { ClubImage, MemberInvoice, PaymentAttempt, PaymentOrder, SearchMemberInv
3
3
  export declare enum InvoiceActionType {
4
4
  ClearMemberInvoice = "[Invoice] Clear member invoice",
5
5
  ClearPaymentOrder = "[Invoice] Clear payment order",
6
+ CreateFritidskortetMemberInvoicePayment = "[Invoice] Create Fritidskortet member invoice payment",
7
+ CreateFritidskortetPublicInvoicePayment = "[Invoice] Create Fritidskortet public invoice payment",
8
+ CreateFritidskortetInvoicePaymentFailure = "[Invoice] Create Fritidskortet invoice payment failure",
9
+ CreateFritidskortetInvoicePaymentSuccess = "[Invoice] Create Fritidskortet invoice payment success",
6
10
  CreateMondidoMemberInvoicePayment = "[Invoice] Create Mondido member payment",
7
11
  CreateMondidoPublicInvoicePayment = "[Invoice] Create Mondido public payment",
8
12
  CreateMondidoInvoicePaymentFailure = "[Invoice] Create Mondido payment failure",
@@ -73,6 +77,46 @@ export declare enum InvoiceActionType {
73
77
  }
74
78
  export declare const clearMemberInvoiceAction: import("@ngrx/store").ActionCreator<InvoiceActionType.ClearMemberInvoice, () => import("@ngrx/store").Action<InvoiceActionType.ClearMemberInvoice>>;
75
79
  export declare const clearPaymentOrderAction: import("@ngrx/store").ActionCreator<InvoiceActionType.ClearPaymentOrder, () => import("@ngrx/store").Action<InvoiceActionType.ClearPaymentOrder>>;
80
+ export declare const createFritidskortetMemberInvoicePaymentAction: import("@ngrx/store").ActionCreator<InvoiceActionType.CreateFritidskortetMemberInvoicePayment, (props: {
81
+ payload: {
82
+ invoiceId: string;
83
+ memberId: string;
84
+ childPersonalId: string;
85
+ adultPersonalId: string;
86
+ };
87
+ }) => {
88
+ payload: {
89
+ invoiceId: string;
90
+ memberId: string;
91
+ childPersonalId: string;
92
+ adultPersonalId: string;
93
+ };
94
+ } & import("@ngrx/store").Action<InvoiceActionType.CreateFritidskortetMemberInvoicePayment>>;
95
+ export declare const createFritidskortetPublicInvoicePaymentAction: import("@ngrx/store").ActionCreator<InvoiceActionType.CreateFritidskortetPublicInvoicePayment, (props: {
96
+ payload: {
97
+ invoiceId: string;
98
+ token: string;
99
+ childPersonalId: string;
100
+ adultPersonalId: string;
101
+ };
102
+ }) => {
103
+ payload: {
104
+ invoiceId: string;
105
+ token: string;
106
+ childPersonalId: string;
107
+ adultPersonalId: string;
108
+ };
109
+ } & import("@ngrx/store").Action<InvoiceActionType.CreateFritidskortetPublicInvoicePayment>>;
110
+ export declare const createFritidskortetInvoicePaymentFailureAction: import("@ngrx/store").ActionCreator<InvoiceActionType.CreateFritidskortetInvoicePaymentFailure, (props: {
111
+ payload: HttpErrorResponse;
112
+ }) => {
113
+ payload: HttpErrorResponse;
114
+ } & import("@ngrx/store").Action<InvoiceActionType.CreateFritidskortetInvoicePaymentFailure>>;
115
+ export declare const createFritidskortetInvoicePaymentSuccessAction: import("@ngrx/store").ActionCreator<InvoiceActionType.CreateFritidskortetInvoicePaymentSuccess, (props: {
116
+ payload: PaymentAttempt;
117
+ }) => {
118
+ payload: PaymentAttempt;
119
+ } & import("@ngrx/store").Action<InvoiceActionType.CreateFritidskortetInvoicePaymentSuccess>>;
76
120
  export declare const createMondidoMemberInvoicePaymentAction: import("@ngrx/store").ActionCreator<InvoiceActionType.CreateMondidoMemberInvoicePayment, (props: {
77
121
  payload: {
78
122
  memberId: string;
@@ -171,6 +171,11 @@ export declare class BookingEffects {
171
171
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.CreateBookingCalendarSlotSuccess>) | ({
172
172
  payload: HttpErrorResponse;
173
173
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.CreateBookingCalendarSlotFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
174
+ createBulkBookingCalendarSlot$: import("rxjs").Observable<import("@ngrx/store").Action<import("../actions").BookingActionTypes.CreateBulkBookingCalendarSlotSuccess> | ({
175
+ payload: HttpErrorResponse;
176
+ } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.CreateBookingCalendarSlotFailure>) | ({
177
+ payload: HttpErrorResponse;
178
+ } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.CreateBulkBookingCalendarSlotFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
174
179
  updateBookingCalendarSlot$: import("rxjs").Observable<({
175
180
  slot: BookingCalendarSlot;
176
181
  } & import("@ngrx/store").Action<import("../actions").BookingActionTypes.UpdateBookingCalendarSlotSuccess>) | ({
@@ -6,6 +6,11 @@ export declare class InvoiceEffects {
6
6
  private invoiceService;
7
7
  private paymentOrderService;
8
8
  private paymentAttemptService;
9
+ createMemberInvoiceFritidskortetPayment$: import("rxjs").Observable<({
10
+ payload: PaymentAttempt;
11
+ } & import("@ngrx/store").Action<import("../actions").InvoiceActionType.CreateFritidskortetInvoicePaymentSuccess>) | ({
12
+ payload: HttpErrorResponse;
13
+ } & import("@ngrx/store").Action<import("../actions").InvoiceActionType.CreateFritidskortetInvoicePaymentFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
9
14
  createMemberInvoiceMondidoPayment$: import("rxjs").Observable<({
10
15
  payload: PaymentAttempt;
11
16
  } & import("@ngrx/store").Action<import("../actions").InvoiceActionType.CreateMondidoInvoicePaymentSuccess>) | ({
@@ -31,6 +36,11 @@ export declare class InvoiceEffects {
31
36
  } & import("@ngrx/store").Action<import("../actions").InvoiceActionType.CreateZimplerPaymentSuccess>) | ({
32
37
  payload: HttpErrorResponse;
33
38
  } & import("@ngrx/store").Action<import("../actions").InvoiceActionType.CreateZimplerPaymentFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
39
+ createPublicInvoiceFritidskortPayment$: import("rxjs").Observable<({
40
+ payload: PaymentAttempt;
41
+ } & import("@ngrx/store").Action<import("../actions").InvoiceActionType.CreateFritidskortetInvoicePaymentSuccess>) | ({
42
+ payload: HttpErrorResponse;
43
+ } & import("@ngrx/store").Action<import("../actions").InvoiceActionType.CreateFritidskortetInvoicePaymentFailure>)> & import("@ngrx/effects").CreateEffectMetadata;
34
44
  createPublicInvoiceMondidoPayment$: import("rxjs").Observable<({
35
45
  payload: PaymentAttempt;
36
46
  } & import("@ngrx/store").Action<import("../actions").InvoiceActionType.CreateMondidoInvoicePaymentSuccess>) | ({
@@ -1 +1 @@
1
- export type PaymentAttemptType = 'zimpler' | 'mondido' | 'swish';
1
+ export type PaymentAttemptType = 'zimpler' | 'mondido' | 'swish' | 'fritidskortet';
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.2.3",
4
+ "version": "3.3.1",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
7
7
  "peerDependencies": {