@techstuff-dev/foundation-api-utils 1.46.1 → 1.48.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.
Files changed (48) hide show
  1. package/dist/cjs/chunks/index-CfrYa4U_.js +9 -0
  2. package/dist/cjs/chunks/index-CfrYa4U_.js.map +1 -0
  3. package/dist/cjs/chunks/shared-DeNXjWb4.js +18 -0
  4. package/dist/cjs/chunks/shared-DeNXjWb4.js.map +1 -0
  5. package/dist/{index.js → cjs/chunks/slice-CAWa47E3.js} +662 -1377
  6. package/dist/cjs/chunks/slice-CAWa47E3.js.map +1 -0
  7. package/dist/cjs/index.js +97 -0
  8. package/dist/cjs/index.js.map +1 -0
  9. package/dist/cjs/store/index.native.js +413 -0
  10. package/dist/cjs/store/index.native.js.map +1 -0
  11. package/dist/cjs/store/index.web.js +186 -0
  12. package/dist/cjs/store/index.web.js.map +1 -0
  13. package/dist/esm/chunks/index-KjhWa1AL.js +6 -0
  14. package/dist/esm/chunks/index-KjhWa1AL.js.map +1 -0
  15. package/dist/esm/chunks/shared-CmoKpoEq.js +15 -0
  16. package/dist/esm/chunks/shared-CmoKpoEq.js.map +1 -0
  17. package/dist/{index.esm.js → esm/chunks/slice-CRuD2Hce.js} +664 -1373
  18. package/dist/esm/chunks/slice-CRuD2Hce.js.map +1 -0
  19. package/dist/esm/index.js +15 -0
  20. package/dist/esm/index.js.map +1 -0
  21. package/dist/esm/store/index.native.js +411 -0
  22. package/dist/esm/store/index.native.js.map +1 -0
  23. package/dist/esm/store/index.web.js +184 -0
  24. package/dist/esm/store/index.web.js.map +1 -0
  25. package/dist/types/index-DQ61f1lz.d.ts +1295 -0
  26. package/dist/{index.d.ts → types/index.d.ts} +64 -1404
  27. package/dist/types/store/index.d.ts +3 -0
  28. package/package.json +23 -9
  29. package/dist/index.esm.js.map +0 -1
  30. package/dist/index.js.map +0 -1
  31. package/dist/lib/api/index.d.ts +0 -21
  32. package/dist/lib/hooks/index.d.ts +0 -33
  33. package/dist/lib/hooks/useAuth.d.ts +0 -1
  34. package/dist/lib/index.d.ts +0 -6
  35. package/dist/lib/services/auth/index.d.ts +0 -2027
  36. package/dist/lib/services/auth/slice.d.ts +0 -91
  37. package/dist/lib/services/cart/slice.d.ts +0 -155
  38. package/dist/lib/services/content/content.interfaces.d.ts +0 -801
  39. package/dist/lib/services/content/index.d.ts +0 -532
  40. package/dist/lib/services/index.d.ts +0 -7
  41. package/dist/lib/services/orders/index.d.ts +0 -271
  42. package/dist/lib/services/payment/index.d.ts +0 -1063
  43. package/dist/lib/store/index.d.ts +0 -76
  44. package/dist/lib/store/storage.d.ts +0 -2
  45. package/dist/lib/types/index.interfaces.d.ts +0 -428
  46. package/dist/lib/utils/dataFormat/index.d.ts +0 -86
  47. package/dist/lib/utils/helpers/index.d.ts +0 -14
  48. package/dist/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +0 -5
@@ -1,76 +0,0 @@
1
- import type { Action, ThunkAction, ThunkDispatch } from '@reduxjs/toolkit';
2
- declare const rootReducer: import("@reduxjs/toolkit").CombinedSliceReducer<{
3
- "": import("..").AuthState & CartState;
4
- authApi: import("@reduxjs/toolkit/query").CombinedState<{
5
- resetPassword: import("@reduxjs/toolkit/query").MutationDefinition<import("..").ResetPasswordRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").ResetPasswordResponse, "authApi", unknown>;
6
- resetPasswordAuth: import("@reduxjs/toolkit/query").MutationDefinition<import("..").ResetPasswordAuthRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").ResetPasswordAuthResponse, "authApi", unknown>;
7
- forgottenPassword: import("@reduxjs/toolkit/query").MutationDefinition<import("..").ForgottenPasswordRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").ForgottenPasswordResponse, "authApi", unknown>;
8
- register: import("@reduxjs/toolkit/query").MutationDefinition<import("..").RegisterRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").RegisterResponse, "authApi", unknown>;
9
- verifyUser: import("@reduxjs/toolkit/query").QueryDefinition<import("..").VerifyUserRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", any, "authApi", unknown>;
10
- verifyUserAttributes: import("@reduxjs/toolkit/query").QueryDefinition<import("..").VerifyUserAttributesRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").VerifyUserAttributesResponse, "authApi", unknown>;
11
- verifyUserResend: import("@reduxjs/toolkit/query").QueryDefinition<import("..").VerifyUserResendRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").VerifyUserAttributesResponse, "authApi", unknown>;
12
- getUserInfo: import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", any, "authApi", unknown>;
13
- updateUserInfo: import("@reduxjs/toolkit/query").MutationDefinition<import("..").UpdateUserInfoRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", any, "authApi", unknown>;
14
- updateUser: import("@reduxjs/toolkit/query").MutationDefinition<import("..").UpdateUserRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", any, "authApi", unknown>;
15
- }, "UserToken" | "UserData", "authApi">;
16
- contentApi: import("@reduxjs/toolkit/query").CombinedState<{
17
- getData: import("@reduxjs/toolkit/query").QueryDefinition<import("..").DataArgs, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Data" | "Workout", import("..").ESDataTypes, "contentApi", unknown>;
18
- getDataById: import("@reduxjs/toolkit/query").QueryDefinition<import("..").IdArg, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Data" | "Workout", import("..").ESDataTypes, "contentApi", unknown>;
19
- }, "Data" | "Workout", "contentApi">;
20
- paymentApi: import("@reduxjs/toolkit/query").CombinedState<{
21
- checkUserSubscription: import("@reduxjs/toolkit/query").QueryDefinition<import("..").UserSubRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", import("..").UserSubResponse, "paymentApi", unknown>;
22
- getPaymentPlans: import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", import("..").PaymentPlansResponse, "paymentApi", unknown>;
23
- getTaxRates: import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", any, "paymentApi", unknown>;
24
- checkPromoCode: import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", any, "paymentApi", unknown>;
25
- }, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", "paymentApi">;
26
- ordersApi: import("@reduxjs/toolkit/query").CombinedState<{
27
- fetchOrders: import("@reduxjs/toolkit/query").QueryDefinition<string[], import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "Orders", any, "ordersApi", unknown>;
28
- }, "Orders", "ordersApi">;
29
- }, {
30
- "": import("..").AuthState & CartState;
31
- authApi: import("@reduxjs/toolkit/query").CombinedState<{
32
- resetPassword: import("@reduxjs/toolkit/query").MutationDefinition<import("..").ResetPasswordRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").ResetPasswordResponse, "authApi", unknown>;
33
- resetPasswordAuth: import("@reduxjs/toolkit/query").MutationDefinition<import("..").ResetPasswordAuthRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").ResetPasswordAuthResponse, "authApi", unknown>;
34
- forgottenPassword: import("@reduxjs/toolkit/query").MutationDefinition<import("..").ForgottenPasswordRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").ForgottenPasswordResponse, "authApi", unknown>;
35
- register: import("@reduxjs/toolkit/query").MutationDefinition<import("..").RegisterRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").RegisterResponse, "authApi", unknown>;
36
- verifyUser: import("@reduxjs/toolkit/query").QueryDefinition<import("..").VerifyUserRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", any, "authApi", unknown>;
37
- verifyUserAttributes: import("@reduxjs/toolkit/query").QueryDefinition<import("..").VerifyUserAttributesRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").VerifyUserAttributesResponse, "authApi", unknown>;
38
- verifyUserResend: import("@reduxjs/toolkit/query").QueryDefinition<import("..").VerifyUserResendRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", import("..").VerifyUserAttributesResponse, "authApi", unknown>;
39
- getUserInfo: import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", any, "authApi", unknown>;
40
- updateUserInfo: import("@reduxjs/toolkit/query").MutationDefinition<import("..").UpdateUserInfoRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", any, "authApi", unknown>;
41
- updateUser: import("@reduxjs/toolkit/query").MutationDefinition<import("..").UpdateUserRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "UserToken" | "UserData", any, "authApi", unknown>;
42
- }, "UserToken" | "UserData", "authApi">;
43
- contentApi: import("@reduxjs/toolkit/query").CombinedState<{
44
- getData: import("@reduxjs/toolkit/query").QueryDefinition<import("..").DataArgs, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Data" | "Workout", import("..").ESDataTypes, "contentApi", unknown>;
45
- getDataById: import("@reduxjs/toolkit/query").QueryDefinition<import("..").IdArg, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Data" | "Workout", import("..").ESDataTypes, "contentApi", unknown>;
46
- }, "Data" | "Workout", "contentApi">;
47
- paymentApi: import("@reduxjs/toolkit/query").CombinedState<{
48
- checkUserSubscription: import("@reduxjs/toolkit/query").QueryDefinition<import("..").UserSubRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", import("..").UserSubResponse, "paymentApi", unknown>;
49
- getPaymentPlans: import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", import("..").PaymentPlansResponse, "paymentApi", unknown>;
50
- getTaxRates: import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", any, "paymentApi", unknown>;
51
- checkPromoCode: import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", any, "paymentApi", unknown>;
52
- }, "UserSubscription" | "Plans" | "TaxRates" | "PromoCodes", "paymentApi">;
53
- ordersApi: import("@reduxjs/toolkit/query").CombinedState<{
54
- fetchOrders: import("@reduxjs/toolkit/query").QueryDefinition<string[], import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "Orders", any, "ordersApi", unknown>;
55
- }, "Orders", "ordersApi">;
56
- }>;
57
- export type RootState = ReturnType<typeof rootReducer>;
58
- declare const makeNativeStore: () => import("@reduxjs/toolkit").EnhancedStore<any, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
59
- dispatch: ThunkDispatch<any, undefined, import("redux").UnknownAction>;
60
- }>, ...any[]]>>;
61
- declare const makeWebStore: () => import("@reduxjs/toolkit").EnhancedStore<any, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
62
- dispatch: ThunkDispatch<any, undefined, import("redux").UnknownAction>;
63
- }>, ...any[]]>>;
64
- export declare const nativeStore: import("@reduxjs/toolkit").EnhancedStore<any, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
65
- dispatch: ThunkDispatch<any, undefined, import("redux").UnknownAction>;
66
- }>, ...any[]]>> | undefined;
67
- export declare const webStore: import("@reduxjs/toolkit").EnhancedStore<any, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
68
- dispatch: ThunkDispatch<any, undefined, import("redux").UnknownAction>;
69
- }>, ...any[]]>> | undefined;
70
- export type AppStoreNative = ReturnType<typeof makeNativeStore>;
71
- export type AppStoreWeb = ReturnType<typeof makeWebStore>;
72
- export type AppDispatchNative = AppStoreNative['dispatch'];
73
- export type AppDispatchWeb = AppStoreWeb['dispatch'];
74
- export type TypedDispatch = ThunkDispatch<RootState, unknown, Action>;
75
- export type AppThunk<ThunkReturnType = void> = ThunkAction<ThunkReturnType, RootState, unknown, Action>;
76
- export {};
@@ -1,2 +0,0 @@
1
- import { WebStorage } from 'redux-persist/lib/types';
2
- export declare function createPersistStorage(): WebStorage;
@@ -1,428 +0,0 @@
1
- export {};
2
- export type UsersState = {
3
- verifying: boolean;
4
- authenticated: boolean;
5
- user: User;
6
- creating: {
7
- details: string;
8
- payment: string;
9
- };
10
- loading: boolean;
11
- error: boolean;
12
- session: string;
13
- };
14
- export type UserCreating = {
15
- details: UserDetails;
16
- };
17
- export type User = {
18
- accessToken?: string;
19
- idToken?: string;
20
- refreshToken?: string;
21
- expires?: number;
22
- accessTokenExpiry?: number | null;
23
- details?: UserDetails;
24
- email?: string;
25
- info?: Info;
26
- sub?: string;
27
- socialSignin?: boolean;
28
- };
29
- export type UserDetails = {
30
- userSub?: string;
31
- uuid?: string;
32
- subscriptionDetails?: {
33
- status: string;
34
- id: string;
35
- created: number;
36
- nextPayment: number;
37
- amount: number;
38
- interval: string;
39
- currency: string;
40
- cancelAt?: number;
41
- planID: string;
42
- planDescription: string;
43
- paymentDetails: {
44
- response: PaymentResponse;
45
- formatted: FormattedPayment;
46
- };
47
- };
48
- firstName?: string;
49
- lastName?: string;
50
- userEmail?: string;
51
- picture?: string;
52
- termsAccepted?: string;
53
- dateOfBirth?: string;
54
- contactPreference?: boolean;
55
- password?: string;
56
- passwordConfirm?: string;
57
- agency?: boolean;
58
- 'cognito:username'?: string;
59
- 'custom:termsAccepted'?: string;
60
- 'custom:subscriptionId'?: string;
61
- 'custom:contactPreferences'?: string;
62
- 'custom:customerId'?: string;
63
- customerId?: string;
64
- [key: string]: any;
65
- };
66
- export type Info = {
67
- orders?: string[];
68
- };
69
- export type UserVerify = {
70
- route: string;
71
- message: string;
72
- };
73
- export interface ApiError {
74
- status: string;
75
- message: string;
76
- }
77
- export interface RegisterRequest {
78
- email: string;
79
- password: string;
80
- passwordConfirm?: string;
81
- companyName?: string;
82
- agency?: boolean;
83
- agencyName?: string;
84
- contactPreference?: boolean;
85
- privacy?: boolean;
86
- }
87
- export interface RegisterResponse {
88
- userSub: string;
89
- }
90
- export interface VerifyUserRequest {
91
- code: string;
92
- sub: string;
93
- email: string;
94
- }
95
- export interface VerifyUserAttributesRequest {
96
- attributes: boolean;
97
- code: string;
98
- email: string;
99
- sub: string;
100
- }
101
- export interface VerifyUserAttributesResponse {
102
- result: string;
103
- }
104
- export interface VerifyUserResendRequest {
105
- email: string | (string | null)[] | null;
106
- }
107
- export interface VerifyUserAttributesResponse {
108
- message: string;
109
- }
110
- export interface VerifyUserResponse {
111
- route: string;
112
- message: string;
113
- status?: number;
114
- }
115
- export interface AuthState {
116
- authenticated: boolean;
117
- verifying: boolean;
118
- user: User;
119
- loading: boolean;
120
- error: boolean;
121
- session?: string;
122
- }
123
- export interface LoginRequest {
124
- email: string;
125
- password: string;
126
- }
127
- export interface LoginResponse {
128
- accessToken: string;
129
- accessTokenExpiry: number;
130
- idToken: string;
131
- refreshToken: string;
132
- }
133
- export interface ResetPasswordAuthRequest {
134
- email: string | undefined;
135
- currentPassword: string;
136
- newPassword: string;
137
- }
138
- export interface ResetPasswordAuthResponse {
139
- message: string;
140
- }
141
- export interface ResetPasswordRequest {
142
- sub: string | (string | null)[] | null;
143
- code: string | (string | null)[] | null;
144
- currentPassword: string;
145
- newPassword: string;
146
- }
147
- export interface ResetPasswordResponse {
148
- message: string;
149
- }
150
- export interface RefreshRequest {
151
- sub: string;
152
- refreshToken: string;
153
- }
154
- export interface RefreshResponse {
155
- accessToken: string;
156
- accessTokenExpiry: number;
157
- idToken: string;
158
- refreshToken: string;
159
- }
160
- export interface LogoutResponse {
161
- message: string;
162
- }
163
- export interface UpdateUserInfoRequest {
164
- sub: string;
165
- expressions: {
166
- [key: string]: {
167
- KEY: string;
168
- VALUE: any[];
169
- };
170
- };
171
- }
172
- export interface PaymentTokenRequest {
173
- amount: number;
174
- metaData: any;
175
- description: string;
176
- }
177
- export interface ForgottenPasswordRequest {
178
- email: string;
179
- }
180
- export interface ForgottenPasswordResponse {
181
- message: string;
182
- }
183
- export interface UpdateUserRequest {
184
- contactPreference: boolean;
185
- dateOfBirth: string;
186
- email: string;
187
- firstName: string;
188
- lastName: string;
189
- termsAccepted: string;
190
- userEmail: string;
191
- picture: string;
192
- uuid: string;
193
- }
194
- export interface UpdateUserResponse {
195
- results: string;
196
- }
197
- export interface UserSubRequest {
198
- id?: string;
199
- email: string;
200
- sub: string;
201
- }
202
- export interface UserSubResponse {
203
- response: {
204
- id: string;
205
- object: string;
206
- address: null;
207
- balance: number;
208
- created: number;
209
- currency: string;
210
- default_currency: string;
211
- default_source: null;
212
- delinquent: boolean;
213
- description: null;
214
- discount: null;
215
- email: string;
216
- invoice_prefix: string;
217
- invoice_settings: {
218
- custom_fields: null;
219
- default_payment_method: string;
220
- footer: null;
221
- rendering_options: null;
222
- };
223
- livemode: boolean;
224
- metadata: {};
225
- name: string;
226
- phone: null;
227
- preferred_locales: [];
228
- shipping: null;
229
- sources: {
230
- object: string;
231
- data: [];
232
- has_more: boolean;
233
- total_count: number;
234
- url: string;
235
- };
236
- subscriptions: {
237
- object: string;
238
- data: [];
239
- has_more: boolean;
240
- total_count: number;
241
- url: string;
242
- };
243
- tax_exempt: string;
244
- tax_ids: {
245
- object: string;
246
- data: [];
247
- has_more: boolean;
248
- total_count: number;
249
- url: string;
250
- };
251
- test_clock: null;
252
- };
253
- customerId: string;
254
- subscription: {
255
- amount: number;
256
- cancelAt: null;
257
- created: number;
258
- currency: string;
259
- id: string;
260
- interval: string;
261
- nextPayment: number;
262
- planDescription: string;
263
- planID: string;
264
- status: string;
265
- };
266
- payment: {
267
- response: PaymentResponse;
268
- formatted: FormattedPayment;
269
- };
270
- }
271
- export interface FormattedPayment {
272
- id: string;
273
- maskedNumber: string;
274
- expirationDate: string;
275
- cardType: string;
276
- }
277
- export interface PaymentResponse {
278
- id: string;
279
- object: string;
280
- allow_redisplay: string;
281
- billing_details: {
282
- address: {
283
- city: null;
284
- country: null;
285
- line1: null;
286
- line2: null;
287
- postal_code: null;
288
- state: null;
289
- };
290
- email: null;
291
- name: string;
292
- phone: null;
293
- };
294
- card: {
295
- brand: string;
296
- checks: {
297
- address_line1_check: null;
298
- address_postal_code_check: null;
299
- cvc_check: string;
300
- };
301
- country: string;
302
- display_brand: string;
303
- exp_month: number;
304
- exp_year: number;
305
- fingerprint: string;
306
- funding: string;
307
- generated_from: null;
308
- last4: string;
309
- networks: {
310
- available: string[];
311
- preferred: null;
312
- };
313
- three_d_secure_usage: {
314
- supported: boolean;
315
- };
316
- wallet: null;
317
- };
318
- created: number;
319
- customer: string;
320
- livemode: boolean;
321
- metadata: {};
322
- type: string;
323
- }
324
- export interface DecodedIdToken {
325
- at_hash: string;
326
- sub: string;
327
- 'cognito:groups': string[];
328
- email_verified: boolean;
329
- iss: string;
330
- 'cognito:username': string;
331
- given_name: string;
332
- nonce: string;
333
- aud: string;
334
- identities: {
335
- userId: string;
336
- providerName: string;
337
- providerType: string;
338
- issuer: string;
339
- primary: string;
340
- dateCreated: string;
341
- }[];
342
- token_use: string;
343
- auth_time: number;
344
- name: string;
345
- exp: number;
346
- iat: number;
347
- family_name: string;
348
- email: string;
349
- birthdate?: string;
350
- picture?: string;
351
- [key: string]: any;
352
- }
353
- export interface SocialTokens {
354
- accessToken: string;
355
- idToken: string;
356
- refreshToken: string;
357
- }
358
- export interface FederatedSession {
359
- accessToken: {
360
- jwtToken: string;
361
- payload: {
362
- auth_time: number;
363
- client_id: string;
364
- 'cognito:groups': string[];
365
- exp: number;
366
- iat: number;
367
- iss: string;
368
- jti: string;
369
- scope: string;
370
- sub: string;
371
- token_use: string;
372
- username: string;
373
- version: number;
374
- };
375
- };
376
- idToken: {
377
- jwtToken: string;
378
- payload: {
379
- at_hash: string;
380
- aud: string;
381
- auth_time: number;
382
- 'cognito:groups': string[];
383
- email: string;
384
- email_verified: boolean;
385
- exp: number;
386
- family_name?: string;
387
- given_name?: string;
388
- birthdate?: string;
389
- iat: number;
390
- identities: {
391
- dateCreated: string;
392
- issuer: string;
393
- primary: string;
394
- providerName: string;
395
- providerType: string;
396
- userId: string;
397
- }[];
398
- iss: string;
399
- name: string;
400
- nonce: string;
401
- picture?: string;
402
- sub: string;
403
- token_use: string;
404
- 'custom:termsAccepted'?: string;
405
- 'custom:subscriptionId'?: string;
406
- 'custom:contactPreferences'?: string;
407
- 'custom:customerId'?: string;
408
- };
409
- };
410
- refreshToken: {
411
- token: string;
412
- };
413
- }
414
- export interface Plan {
415
- id: string;
416
- planID: string;
417
- description: string;
418
- amount: number;
419
- nickname: string;
420
- metadata: {
421
- icon: string;
422
- description: string;
423
- number: string;
424
- };
425
- }
426
- export interface PaymentPlansResponse {
427
- plans: Plan[];
428
- }
@@ -1,86 +0,0 @@
1
- import { FederatedSession, SocialTokens, User } from '../../types/index.interfaces';
2
- import { ESPromo, Promo, UserPayload, ESWorkout, Workout, ESShortform, ESFaq, ESPage, Page, ESSetting, ESPress, ESGuest, ESVideo, Video, ESSection, Section, ESSchedule, Schedule, ESChallenge, Challenge, ESChallengeDay, ChallengeDay, ESConfig, Config, ESSectionPanel, SectionPanel, ESSectionItem, SectionItem, ESTaxonomy, Taxonomy, ESSeries, Series, ESSeason, Season, ESLongform, LongForm, ESMediaItem, MediaItem } from '../../services/content/content.interfaces';
3
- export declare const formatUserPayload: (payload: UserPayload) => {
4
- userEmail: string;
5
- lastName: string;
6
- firstName: string;
7
- dateOfBirth: string;
8
- /** Handles the auth micro service/Cognito serving boolean options as a string. */
9
- termsAccepted: any;
10
- contactPreference: any;
11
- uuid: string;
12
- subscription: string | null;
13
- customerId: string;
14
- picture: string;
15
- };
16
- export declare function formatPromos(data: ESPromo[]): Promo[];
17
- export declare function formatWorkout(data: ESWorkout[]): Workout[];
18
- export declare function formatShortform(data: ESShortform[]): {
19
- uuid: string | undefined;
20
- id: string | undefined;
21
- nid: string | undefined;
22
- title: string | undefined;
23
- thumb: string | undefined;
24
- mainImage: string | undefined;
25
- description: string | undefined;
26
- body: string | undefined;
27
- channel: string | undefined;
28
- updated: string | undefined;
29
- langcode: string | undefined;
30
- video: string | undefined;
31
- duration: string | undefined;
32
- category: string | undefined;
33
- }[];
34
- export declare function formatFaqs(data: ESFaq[]): {
35
- uuid: string | undefined;
36
- id: string | undefined;
37
- title: string | undefined;
38
- answer: string | undefined;
39
- created: number | undefined;
40
- updated: number | undefined;
41
- }[];
42
- export declare function formatPages(data: ESPage[]): Page[];
43
- export declare function formatSettings(data: ESSetting[]): {
44
- uuid: string | undefined;
45
- created: number | undefined;
46
- updated: number | undefined;
47
- status: string | undefined;
48
- type: string | undefined;
49
- video: string | undefined;
50
- number: string | undefined;
51
- pass: string | undefined;
52
- fieldset: string | undefined;
53
- }[];
54
- export declare function formatPress(data: ESPress[]): {
55
- uuid: string | undefined;
56
- created: number | undefined;
57
- updated: number | undefined;
58
- image: string | undefined;
59
- title: string | undefined;
60
- }[];
61
- export declare function formatGuests(data: ESGuest[]): {
62
- uuid: string | undefined;
63
- id: string | undefined;
64
- title: string | undefined;
65
- updated: number | undefined;
66
- description: string | undefined;
67
- image: string | undefined;
68
- display: string | undefined;
69
- }[];
70
- export declare function formatVideos(data: ESVideo[]): Video[];
71
- export declare function formatSections(data: ESSection[]): Section[];
72
- export declare function formatSchedule(data: ESSchedule[]): Schedule[];
73
- export declare function formatChallenges(data: ESChallenge[]): Challenge[];
74
- export declare function formatChallengeDays(data: ESChallengeDay[]): ChallengeDay[];
75
- export declare function formatSecondsToISO8601Duration(seconds?: number): string;
76
- export declare function formatAuthSession(session: any): User;
77
- export declare function formatFedaratedSession(session: FederatedSession): User;
78
- export declare function formatSocialAuthSession(tokens: SocialTokens): User;
79
- export declare function formatConfig(data: ESConfig[]): Config[];
80
- export declare function formatSectionPanels(data: ESSectionPanel[]): SectionPanel[];
81
- export declare function formatSectionItems(data: ESSectionItem[]): SectionItem[];
82
- export declare const formatTaxonomies: (data: ESTaxonomy[]) => Taxonomy[];
83
- export declare const formatSeries: (data: ESSeries[]) => Series[];
84
- export declare const formatSeasons: (data: ESSeason[]) => Season[];
85
- export declare const formatLongform: (data: ESLongform[]) => LongForm[];
86
- export declare const formatMediaItem: (data: ESMediaItem[]) => MediaItem[];
@@ -1,14 +0,0 @@
1
- export declare function onlyUnique(value: any, index: number, self: any): boolean;
2
- export declare function applyCoupon(coupon: {
3
- discount: string;
4
- code: string;
5
- }, netTotal: number): {
6
- discountedTotal: number;
7
- discountedAmount: number;
8
- discount: string;
9
- code: string;
10
- };
11
- export declare function applyTax(taxRate: {
12
- percentage: number;
13
- }, netTotal: number): number;
14
- export declare function toCamelCaseObject(obj: any): any;
@@ -1,5 +0,0 @@
1
- type IfMaybeUndefined<T, True, False> = [undefined] extends [T] ? True : False;
2
- declare const testAccess: 0;
3
- export type IfUncheckedIndexedAccess<True, False> = IfMaybeUndefined<typeof testAccess, True, False>;
4
- export type UncheckedIndexedAccess<T> = IfUncheckedIndexedAccess<T | undefined, T>;
5
- export {};