@techstuff-dev/foundation-api-utils 1.18.0 → 1.20.0

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.
@@ -1,212 +0,0 @@
1
- import { AuthState } from '../../types/index.interfaces';
2
- export declare const authSlice: import("@reduxjs/toolkit").Slice<AuthState, {
3
- setCredentials: (state: import("immer").WritableDraft<AuthState>, data: {
4
- payload: any;
5
- type: string;
6
- }) => {
7
- session: any;
8
- authenticated: true;
9
- verifying: true;
10
- user: any;
11
- creating: import("immer").WritableDraft<{
12
- details: string;
13
- payment: string;
14
- }>;
15
- loading: boolean;
16
- error: boolean;
17
- };
18
- resetCreating: (state: import("immer").WritableDraft<AuthState>) => {
19
- creating: {
20
- details: string;
21
- payment: string;
22
- };
23
- authenticated: boolean;
24
- verifying: boolean;
25
- user: import("immer").WritableDraft<import("../../types/index.interfaces").User>;
26
- loading: boolean;
27
- error: boolean;
28
- session?: string | undefined;
29
- };
30
- updateSubscription: (state: import("immer").WritableDraft<AuthState>, data: {
31
- payload: any;
32
- type: string;
33
- }) => {
34
- user: {
35
- details: {
36
- subscription: any;
37
- subscriptionDetails: any;
38
- userSub?: string | undefined;
39
- uuid?: string | undefined;
40
- firstName?: string | undefined;
41
- lastName?: string | undefined;
42
- userEmail?: string | undefined;
43
- picture?: string | undefined;
44
- termsAccepted?: string | undefined;
45
- dateOfBirth?: string | undefined;
46
- contactPreference?: boolean | undefined;
47
- password?: string | undefined;
48
- passwordConfirm?: string | undefined;
49
- agency?: boolean | undefined;
50
- };
51
- accessToken?: string | undefined;
52
- idToken?: string | undefined;
53
- refreshToken?: string | undefined;
54
- expires?: number | undefined;
55
- accessTokenExpiry?: number | null | undefined;
56
- email?: string | undefined;
57
- info?: import("immer").WritableDraft<import("../../types/index.interfaces").Info> | undefined;
58
- sub?: string | undefined;
59
- };
60
- authenticated: boolean;
61
- verifying: boolean;
62
- creating: import("immer").WritableDraft<{
63
- details: string;
64
- payment: string;
65
- }>;
66
- loading: boolean;
67
- error: boolean;
68
- session?: string | undefined;
69
- };
70
- logout: () => AuthState;
71
- }, "auth", "auth", {
72
- isAuthenticated: (auth: AuthState) => boolean;
73
- selectAccessToken: (auth: AuthState) => string | undefined;
74
- selectRefreshToken: (auth: AuthState) => string | undefined;
75
- selectCurrentUser: (auth: AuthState) => import("../../types/index.interfaces").UserDetails | undefined;
76
- selectUserCreating: (auth: AuthState) => {
77
- details: string;
78
- payment: string;
79
- };
80
- selectUserCreatingDetails: (auth: AuthState) => string;
81
- isVerifying: (auth: AuthState) => boolean;
82
- getUserSession: (auth: AuthState) => string | false | undefined;
83
- selectCurrentUserSub: (auth: AuthState) => string | undefined;
84
- selectCurrentUserRefreshToken: (auth: AuthState) => string | undefined;
85
- selectUserTokens: (auth: AuthState) => {
86
- accessToken: string | undefined;
87
- refreshToken: string | undefined;
88
- idToken: string | undefined;
89
- };
90
- selectUserSubscriptionStatus: (auth: AuthState) => string | undefined;
91
- selectSubscription: (auth: AuthState) => {
92
- status: string;
93
- id: string;
94
- created: number;
95
- nextPayment: number;
96
- amount: number;
97
- interval: string;
98
- currency: string;
99
- cancelAt?: number | undefined;
100
- planID: string;
101
- planDescription: string;
102
- paymentDetails: {
103
- response: import("../../types/index.interfaces").PaymentResponse;
104
- formatted: import("../../types/index.interfaces").FormattedPayment;
105
- };
106
- } | undefined;
107
- selectSubscriptionPrice: (auth: AuthState) => number | undefined;
108
- }>;
109
- export declare const setCredentials: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "auth/setCredentials">, resetCreating: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"auth/resetCreating">, logout: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"auth/logout">, updateSubscription: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "auth/updateSubscription">;
110
- export declare const isAuthenticated: import("reselect").Selector<{
111
- auth: AuthState;
112
- }, boolean, []> & {
113
- unwrapped: (auth: AuthState) => boolean;
114
- }, selectAccessToken: import("reselect").Selector<{
115
- auth: AuthState;
116
- }, string | undefined, []> & {
117
- unwrapped: (auth: AuthState) => string | undefined;
118
- }, selectRefreshToken: import("reselect").Selector<{
119
- auth: AuthState;
120
- }, string | undefined, []> & {
121
- unwrapped: (auth: AuthState) => string | undefined;
122
- }, selectCurrentUser: import("reselect").Selector<{
123
- auth: AuthState;
124
- }, import("../../types/index.interfaces").UserDetails | undefined, []> & {
125
- unwrapped: (auth: AuthState) => import("../../types/index.interfaces").UserDetails | undefined;
126
- }, selectUserCreating: import("reselect").Selector<{
127
- auth: AuthState;
128
- }, {
129
- details: string;
130
- payment: string;
131
- }, []> & {
132
- unwrapped: (auth: AuthState) => {
133
- details: string;
134
- payment: string;
135
- };
136
- }, selectUserCreatingDetails: import("reselect").Selector<{
137
- auth: AuthState;
138
- }, string, []> & {
139
- unwrapped: (auth: AuthState) => string;
140
- }, isVerifying: import("reselect").Selector<{
141
- auth: AuthState;
142
- }, boolean, []> & {
143
- unwrapped: (auth: AuthState) => boolean;
144
- }, getUserSession: import("reselect").Selector<{
145
- auth: AuthState;
146
- }, string | false | undefined, []> & {
147
- unwrapped: (auth: AuthState) => string | false | undefined;
148
- }, selectCurrentUserSub: import("reselect").Selector<{
149
- auth: AuthState;
150
- }, string | undefined, []> & {
151
- unwrapped: (auth: AuthState) => string | undefined;
152
- }, selectCurrentUserRefreshToken: import("reselect").Selector<{
153
- auth: AuthState;
154
- }, string | undefined, []> & {
155
- unwrapped: (auth: AuthState) => string | undefined;
156
- }, selectUserTokens: import("reselect").Selector<{
157
- auth: AuthState;
158
- }, {
159
- accessToken: string | undefined;
160
- refreshToken: string | undefined;
161
- idToken: string | undefined;
162
- }, []> & {
163
- unwrapped: (auth: AuthState) => {
164
- accessToken: string | undefined;
165
- refreshToken: string | undefined;
166
- idToken: string | undefined;
167
- };
168
- }, selectUserSubscriptionStatus: import("reselect").Selector<{
169
- auth: AuthState;
170
- }, string | undefined, []> & {
171
- unwrapped: (auth: AuthState) => string | undefined;
172
- }, selectSubscription: import("reselect").Selector<{
173
- auth: AuthState;
174
- }, {
175
- status: string;
176
- id: string;
177
- created: number;
178
- nextPayment: number;
179
- amount: number;
180
- interval: string;
181
- currency: string;
182
- cancelAt?: number | undefined;
183
- planID: string;
184
- planDescription: string;
185
- paymentDetails: {
186
- response: import("../../types/index.interfaces").PaymentResponse;
187
- formatted: import("../../types/index.interfaces").FormattedPayment;
188
- };
189
- } | undefined, []> & {
190
- unwrapped: (auth: AuthState) => {
191
- status: string;
192
- id: string;
193
- created: number;
194
- nextPayment: number;
195
- amount: number;
196
- interval: string;
197
- currency: string;
198
- cancelAt?: number | undefined;
199
- planID: string;
200
- planDescription: string;
201
- paymentDetails: {
202
- response: import("../../types/index.interfaces").PaymentResponse;
203
- formatted: import("../../types/index.interfaces").FormattedPayment;
204
- };
205
- } | undefined;
206
- }, selectSubscriptionPrice: import("reselect").Selector<{
207
- auth: AuthState;
208
- }, number | undefined, []> & {
209
- unwrapped: (auth: AuthState) => number | undefined;
210
- };
211
- declare const _default: import("redux").Reducer<AuthState>;
212
- export default _default;