mts-booking-library 2.4.15 → 2.4.16

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.
@@ -20,49 +20,7 @@ export declare class JourneyBooking extends Booking {
20
20
  } & {
21
21
  updateCartGuid: (cartGuid: string | undefined) => void;
22
22
  resetState: () => void;
23
- }>, "setState" | "persist"> & {
24
- setState(partial: ({
25
- cartGuid: string | undefined;
26
- } & {
27
- updateCartGuid: (cartGuid: string | undefined) => void;
28
- resetState: () => void;
29
- }) | Partial<{
30
- cartGuid: string | undefined;
31
- } & {
32
- updateCartGuid: (cartGuid: string | undefined) => void;
33
- resetState: () => void;
34
- }> | ((state: {
35
- cartGuid: string | undefined;
36
- } & {
37
- updateCartGuid: (cartGuid: string | undefined) => void;
38
- resetState: () => void;
39
- }) => ({
40
- cartGuid: string | undefined;
41
- } & {
42
- updateCartGuid: (cartGuid: string | undefined) => void;
43
- resetState: () => void;
44
- }) | Partial<{
45
- cartGuid: string | undefined;
46
- } & {
47
- updateCartGuid: (cartGuid: string | undefined) => void;
48
- resetState: () => void;
49
- }>), replace?: false | undefined): unknown;
50
- setState(state: ({
51
- cartGuid: string | undefined;
52
- } & {
53
- updateCartGuid: (cartGuid: string | undefined) => void;
54
- resetState: () => void;
55
- }) | ((state: {
56
- cartGuid: string | undefined;
57
- } & {
58
- updateCartGuid: (cartGuid: string | undefined) => void;
59
- resetState: () => void;
60
- }) => {
61
- cartGuid: string | undefined;
62
- } & {
63
- updateCartGuid: (cartGuid: string | undefined) => void;
64
- resetState: () => void;
65
- }), replace: true): unknown;
23
+ }>, "persist"> & {
66
24
  persist: {
67
25
  setOptions: (options: Partial<import("zustand/middleware").PersistOptions<{
68
26
  cartGuid: string | undefined;
@@ -74,7 +32,7 @@ export declare class JourneyBooking extends Booking {
74
32
  } & {
75
33
  updateCartGuid: (cartGuid: string | undefined) => void;
76
34
  resetState: () => void;
77
- }, unknown>>) => void;
35
+ }>>) => void;
78
36
  clearStorage: () => void;
79
37
  rehydrate: () => Promise<void> | void;
80
38
  hasHydrated: () => boolean;
@@ -100,7 +58,7 @@ export declare class JourneyBooking extends Booking {
100
58
  } & {
101
59
  updateCartGuid: (cartGuid: string | undefined) => void;
102
60
  resetState: () => void;
103
- }, unknown>>;
61
+ }>>;
104
62
  };
105
63
  }>;
106
64
  resetBooking(): void;
@@ -17,49 +17,7 @@ export declare class ServiceBooking extends Booking {
17
17
  } & {
18
18
  updateCartGuid: (cartGuid: string | undefined) => void;
19
19
  resetState: () => void;
20
- }>, "setState" | "persist"> & {
21
- setState(partial: ({
22
- cartGuid: string | undefined;
23
- } & {
24
- updateCartGuid: (cartGuid: string | undefined) => void;
25
- resetState: () => void;
26
- }) | Partial<{
27
- cartGuid: string | undefined;
28
- } & {
29
- updateCartGuid: (cartGuid: string | undefined) => void;
30
- resetState: () => void;
31
- }> | ((state: {
32
- cartGuid: string | undefined;
33
- } & {
34
- updateCartGuid: (cartGuid: string | undefined) => void;
35
- resetState: () => void;
36
- }) => ({
37
- cartGuid: string | undefined;
38
- } & {
39
- updateCartGuid: (cartGuid: string | undefined) => void;
40
- resetState: () => void;
41
- }) | Partial<{
42
- cartGuid: string | undefined;
43
- } & {
44
- updateCartGuid: (cartGuid: string | undefined) => void;
45
- resetState: () => void;
46
- }>), replace?: false | undefined): unknown;
47
- setState(state: ({
48
- cartGuid: string | undefined;
49
- } & {
50
- updateCartGuid: (cartGuid: string | undefined) => void;
51
- resetState: () => void;
52
- }) | ((state: {
53
- cartGuid: string | undefined;
54
- } & {
55
- updateCartGuid: (cartGuid: string | undefined) => void;
56
- resetState: () => void;
57
- }) => {
58
- cartGuid: string | undefined;
59
- } & {
60
- updateCartGuid: (cartGuid: string | undefined) => void;
61
- resetState: () => void;
62
- }), replace: true): unknown;
20
+ }>, "persist"> & {
63
21
  persist: {
64
22
  setOptions: (options: Partial<import("zustand/middleware").PersistOptions<{
65
23
  cartGuid: string | undefined;
@@ -71,7 +29,7 @@ export declare class ServiceBooking extends Booking {
71
29
  } & {
72
30
  updateCartGuid: (cartGuid: string | undefined) => void;
73
31
  resetState: () => void;
74
- }, unknown>>) => void;
32
+ }>>) => void;
75
33
  clearStorage: () => void;
76
34
  rehydrate: () => Promise<void> | void;
77
35
  hasHydrated: () => boolean;
@@ -97,7 +55,7 @@ export declare class ServiceBooking extends Booking {
97
55
  } & {
98
56
  updateCartGuid: (cartGuid: string | undefined) => void;
99
57
  resetState: () => void;
100
- }, unknown>>;
58
+ }>>;
101
59
  };
102
60
  }>;
103
61
  getCart(): ServiceCart | undefined;
@@ -18,49 +18,7 @@ export declare class SubscriptionBooking extends Booking {
18
18
  } & {
19
19
  updateCartGuid: (cartGuid: string | undefined) => void;
20
20
  resetState: () => void;
21
- }>, "setState" | "persist"> & {
22
- setState(partial: ({
23
- cartGuid: string | undefined;
24
- } & {
25
- updateCartGuid: (cartGuid: string | undefined) => void;
26
- resetState: () => void;
27
- }) | Partial<{
28
- cartGuid: string | undefined;
29
- } & {
30
- updateCartGuid: (cartGuid: string | undefined) => void;
31
- resetState: () => void;
32
- }> | ((state: {
33
- cartGuid: string | undefined;
34
- } & {
35
- updateCartGuid: (cartGuid: string | undefined) => void;
36
- resetState: () => void;
37
- }) => ({
38
- cartGuid: string | undefined;
39
- } & {
40
- updateCartGuid: (cartGuid: string | undefined) => void;
41
- resetState: () => void;
42
- }) | Partial<{
43
- cartGuid: string | undefined;
44
- } & {
45
- updateCartGuid: (cartGuid: string | undefined) => void;
46
- resetState: () => void;
47
- }>), replace?: false | undefined): unknown;
48
- setState(state: ({
49
- cartGuid: string | undefined;
50
- } & {
51
- updateCartGuid: (cartGuid: string | undefined) => void;
52
- resetState: () => void;
53
- }) | ((state: {
54
- cartGuid: string | undefined;
55
- } & {
56
- updateCartGuid: (cartGuid: string | undefined) => void;
57
- resetState: () => void;
58
- }) => {
59
- cartGuid: string | undefined;
60
- } & {
61
- updateCartGuid: (cartGuid: string | undefined) => void;
62
- resetState: () => void;
63
- }), replace: true): unknown;
21
+ }>, "persist"> & {
64
22
  persist: {
65
23
  setOptions: (options: Partial<import("zustand/middleware").PersistOptions<{
66
24
  cartGuid: string | undefined;
@@ -72,7 +30,7 @@ export declare class SubscriptionBooking extends Booking {
72
30
  } & {
73
31
  updateCartGuid: (cartGuid: string | undefined) => void;
74
32
  resetState: () => void;
75
- }, unknown>>) => void;
33
+ }>>) => void;
76
34
  clearStorage: () => void;
77
35
  rehydrate: () => Promise<void> | void;
78
36
  hasHydrated: () => boolean;
@@ -98,7 +56,7 @@ export declare class SubscriptionBooking extends Booking {
98
56
  } & {
99
57
  updateCartGuid: (cartGuid: string | undefined) => void;
100
58
  resetState: () => void;
101
- }, unknown>>;
59
+ }>>;
102
60
  };
103
61
  }>;
104
62
  getCart(): SubscriptionCart | undefined;
@@ -20,49 +20,7 @@ export declare class TplBooking extends Booking {
20
20
  } & {
21
21
  updateCartGuid: (cartGuid: string | undefined) => void;
22
22
  resetState: () => void;
23
- }>, "setState" | "persist"> & {
24
- setState(partial: ({
25
- cartGuid: string | undefined;
26
- } & {
27
- updateCartGuid: (cartGuid: string | undefined) => void;
28
- resetState: () => void;
29
- }) | Partial<{
30
- cartGuid: string | undefined;
31
- } & {
32
- updateCartGuid: (cartGuid: string | undefined) => void;
33
- resetState: () => void;
34
- }> | ((state: {
35
- cartGuid: string | undefined;
36
- } & {
37
- updateCartGuid: (cartGuid: string | undefined) => void;
38
- resetState: () => void;
39
- }) => ({
40
- cartGuid: string | undefined;
41
- } & {
42
- updateCartGuid: (cartGuid: string | undefined) => void;
43
- resetState: () => void;
44
- }) | Partial<{
45
- cartGuid: string | undefined;
46
- } & {
47
- updateCartGuid: (cartGuid: string | undefined) => void;
48
- resetState: () => void;
49
- }>), replace?: false | undefined): unknown;
50
- setState(state: ({
51
- cartGuid: string | undefined;
52
- } & {
53
- updateCartGuid: (cartGuid: string | undefined) => void;
54
- resetState: () => void;
55
- }) | ((state: {
56
- cartGuid: string | undefined;
57
- } & {
58
- updateCartGuid: (cartGuid: string | undefined) => void;
59
- resetState: () => void;
60
- }) => {
61
- cartGuid: string | undefined;
62
- } & {
63
- updateCartGuid: (cartGuid: string | undefined) => void;
64
- resetState: () => void;
65
- }), replace: true): unknown;
23
+ }>, "persist"> & {
66
24
  persist: {
67
25
  setOptions: (options: Partial<import("zustand/middleware").PersistOptions<{
68
26
  cartGuid: string | undefined;
@@ -74,7 +32,7 @@ export declare class TplBooking extends Booking {
74
32
  } & {
75
33
  updateCartGuid: (cartGuid: string | undefined) => void;
76
34
  resetState: () => void;
77
- }, unknown>>) => void;
35
+ }>>) => void;
78
36
  clearStorage: () => void;
79
37
  rehydrate: () => Promise<void> | void;
80
38
  hasHydrated: () => boolean;
@@ -100,7 +58,7 @@ export declare class TplBooking extends Booking {
100
58
  } & {
101
59
  updateCartGuid: (cartGuid: string | undefined) => void;
102
60
  resetState: () => void;
103
- }, unknown>>;
61
+ }>>;
104
62
  };
105
63
  }>;
106
64
  getCart(): undefined | TplCart;
@@ -8,30 +8,26 @@ type MtsBookingAction = {
8
8
  /**
9
9
  * This hook will return the correct Zustand state based on the application which runs the library
10
10
  */
11
- export declare const useMtsBookingState: () => import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<MtsBookingState & MtsBookingAction>, "setState" | "persist"> & {
12
- setState(partial: (MtsBookingState & MtsBookingAction) | Partial<MtsBookingState & MtsBookingAction> | ((state: MtsBookingState & MtsBookingAction) => (MtsBookingState & MtsBookingAction) | Partial<MtsBookingState & MtsBookingAction>), replace?: false | undefined): unknown;
13
- setState(state: (MtsBookingState & MtsBookingAction) | ((state: MtsBookingState & MtsBookingAction) => MtsBookingState & MtsBookingAction), replace: true): unknown;
11
+ export declare const useMtsBookingState: () => import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<MtsBookingState & MtsBookingAction>, "persist"> & {
14
12
  persist: {
15
- setOptions: (options: Partial<import("zustand/middleware").PersistOptions<MtsBookingState & MtsBookingAction, MtsBookingState & MtsBookingAction, unknown>>) => void;
13
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<MtsBookingState & MtsBookingAction, MtsBookingState & MtsBookingAction>>) => void;
16
14
  clearStorage: () => void;
17
15
  rehydrate: () => Promise<void> | void;
18
16
  hasHydrated: () => boolean;
19
17
  onHydrate: (fn: (state: MtsBookingState & MtsBookingAction) => void) => () => void;
20
18
  onFinishHydration: (fn: (state: MtsBookingState & MtsBookingAction) => void) => () => void;
21
- getOptions: () => Partial<import("zustand/middleware").PersistOptions<MtsBookingState & MtsBookingAction, MtsBookingState & MtsBookingAction, unknown>>;
19
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<MtsBookingState & MtsBookingAction, MtsBookingState & MtsBookingAction>>;
22
20
  };
23
21
  }>;
24
- export declare const useTestState: () => import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<MtsBookingState & MtsBookingAction>, "setState" | "persist"> & {
25
- setState(partial: (MtsBookingState & MtsBookingAction) | Partial<MtsBookingState & MtsBookingAction> | ((state: MtsBookingState & MtsBookingAction) => (MtsBookingState & MtsBookingAction) | Partial<MtsBookingState & MtsBookingAction>), replace?: false | undefined): unknown;
26
- setState(state: (MtsBookingState & MtsBookingAction) | ((state: MtsBookingState & MtsBookingAction) => MtsBookingState & MtsBookingAction), replace: true): unknown;
22
+ export declare const useTestState: () => import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<MtsBookingState & MtsBookingAction>, "persist"> & {
27
23
  persist: {
28
- setOptions: (options: Partial<import("zustand/middleware").PersistOptions<MtsBookingState & MtsBookingAction, MtsBookingState & MtsBookingAction, unknown>>) => void;
24
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<MtsBookingState & MtsBookingAction, MtsBookingState & MtsBookingAction>>) => void;
29
25
  clearStorage: () => void;
30
26
  rehydrate: () => Promise<void> | void;
31
27
  hasHydrated: () => boolean;
32
28
  onHydrate: (fn: (state: MtsBookingState & MtsBookingAction) => void) => () => void;
33
29
  onFinishHydration: (fn: (state: MtsBookingState & MtsBookingAction) => void) => () => void;
34
- getOptions: () => Partial<import("zustand/middleware").PersistOptions<MtsBookingState & MtsBookingAction, MtsBookingState & MtsBookingAction, unknown>>;
30
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<MtsBookingState & MtsBookingAction, MtsBookingState & MtsBookingAction>>;
35
31
  };
36
32
  }>;
37
33
  export {};
@@ -14,12 +14,4 @@ export type JourneyInfo = {
14
14
  bookingProcessMessage: string;
15
15
  /** Indicates whether the journey is bookable (true) or not (false). */
16
16
  isBookable: boolean;
17
- /** The id of the route for the journey. */
18
- routeId: number;
19
- /** The name of the route for the journey. */
20
- routeName: string;
21
- /** The id of the line for the journey. */
22
- lineId: number;
23
- /** The name of the line for the journey. */
24
- lineName: string;
25
17
  };
@@ -7,6 +7,14 @@ export type Trip = {
7
7
  tariffsMatrix: TariffsMatrix;
8
8
  tariffTypes: TariffType[];
9
9
  termsTypes: TermsType[];
10
+ /** The id of the route for the journey. */
11
+ routeId: number;
12
+ /** The name of the route for the journey. */
13
+ routeName: string;
14
+ /** The id of the line for the journey. */
15
+ lineId: number;
16
+ /** The name of the line for the journey. */
17
+ lineName: string;
10
18
  };
11
19
  /**
12
20
  * This type is used to represent a trip for the reduction page. This only makes sense for a JourneyBooking,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mts-booking-library",
3
- "version": "2.4.15",
3
+ "version": "2.4.16",
4
4
  "description": "Library for using MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",