@techstuff-dev/foundation-api-utils 1.12.0 → 1.14.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.
@@ -35,7 +35,7 @@ export declare const authSlice: import("@reduxjs/toolkit").Slice<AuthState, {
35
35
  details: {
36
36
  subscription: any;
37
37
  subscriptionDetails: any;
38
- userSub: string;
38
+ userSub?: string | undefined;
39
39
  uuid?: string | undefined;
40
40
  firstName?: string | undefined;
41
41
  lastName?: string | undefined;
@@ -43,17 +43,19 @@ export declare const authSlice: import("@reduxjs/toolkit").Slice<AuthState, {
43
43
  avatar?: string | undefined;
44
44
  termsAccepted?: string | undefined;
45
45
  dateOfBirth?: string | undefined;
46
- contactPreference: boolean;
46
+ contactPreference?: boolean | undefined;
47
47
  password?: string | undefined;
48
48
  passwordConfirm?: string | undefined;
49
49
  agency?: boolean | undefined;
50
50
  };
51
- accessToken: string;
52
- idToken: string;
53
- refreshToken: string;
54
- accessTokenExpiry: number | null;
55
- email: string;
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;
56
57
  info?: import("immer").WritableDraft<import("../../types/index.interfaces").Info> | undefined;
58
+ sub: string;
57
59
  };
58
60
  authenticated: boolean;
59
61
  verifying: boolean;
@@ -68,9 +70,9 @@ export declare const authSlice: import("@reduxjs/toolkit").Slice<AuthState, {
68
70
  logout: () => AuthState;
69
71
  }, "auth", "auth", {
70
72
  isAuthenticated: (auth: AuthState) => boolean;
71
- selectAccessToken: (auth: AuthState) => string;
72
- selectRefreshToken: (auth: AuthState) => string;
73
- selectCurrentUser: (auth: AuthState) => import("../../types/index.interfaces").UserDetails;
73
+ selectAccessToken: (auth: AuthState) => string | undefined;
74
+ selectRefreshToken: (auth: AuthState) => string | undefined;
75
+ selectCurrentUser: (auth: AuthState) => import("../../types/index.interfaces").UserDetails | undefined;
74
76
  selectUserCreating: (auth: AuthState) => {
75
77
  details: string;
76
78
  payment: string;
@@ -78,79 +80,28 @@ export declare const authSlice: import("@reduxjs/toolkit").Slice<AuthState, {
78
80
  selectUserCreatingDetails: (auth: AuthState) => string;
79
81
  isVerifying: (auth: AuthState) => boolean;
80
82
  getUserSession: (auth: AuthState) => string | false | undefined;
81
- selectCurrentUserSub: (auth: AuthState) => string | undefined;
82
- selectCurrentUserRefreshToken: (auth: AuthState) => string;
83
+ selectCurrentUserSub: (auth: AuthState) => string;
84
+ selectCurrentUserRefreshToken: (auth: AuthState) => string | undefined;
83
85
  selectUserTokens: (auth: AuthState) => {
84
- accessToken: string;
85
- refreshToken: string;
86
- idToken: string;
86
+ accessToken: string | undefined;
87
+ refreshToken: string | undefined;
88
+ idToken: string | undefined;
87
89
  };
88
90
  selectUserSubscriptionStatus: (auth: AuthState) => string | undefined;
89
91
  selectSubscription: (auth: AuthState) => {
92
+ status: string;
90
93
  id: string;
91
94
  created: number;
92
- status: string;
93
95
  nextPayment: number;
94
96
  amount: number;
95
97
  interval: string;
96
98
  currency: string;
97
- cancelAt: string;
99
+ cancelAt?: number | undefined;
98
100
  planID: string;
99
101
  planDescription: string;
100
102
  paymentDetails: {
101
- response: {
102
- id: string;
103
- object: string;
104
- allow_redisplay: string;
105
- billing_details: {
106
- address: {
107
- city: null;
108
- country: null;
109
- line1: null;
110
- line2: null;
111
- postal_code: null;
112
- state: null;
113
- };
114
- email: null;
115
- name: string;
116
- phone: null;
117
- };
118
- card: {
119
- brand: string;
120
- checks: {
121
- address_line1_check: null;
122
- address_postal_code_check: null;
123
- cvc_check: string;
124
- };
125
- country: string;
126
- display_brand: string;
127
- exp_month: number;
128
- exp_year: number;
129
- fingerprint: string;
130
- funding: string;
131
- generated_from: null;
132
- last4: string;
133
- networks: {
134
- available: string[];
135
- preferred: null;
136
- };
137
- three_d_secure_usage: {
138
- supported: boolean;
139
- };
140
- wallet: null;
141
- };
142
- created: number;
143
- customer: string;
144
- livemode: boolean;
145
- metadata: {};
146
- type: string;
147
- };
148
- formatted: {
149
- id: string;
150
- maskedNumber: string;
151
- expirationDate: string;
152
- cardType: string;
153
- };
103
+ response: import("../../types/index.interfaces").PaymentResponse;
104
+ formatted: import("../../types/index.interfaces").FormattedPayment;
154
105
  };
155
106
  } | undefined;
156
107
  selectSubscriptionPrice: (auth: AuthState) => number | undefined;
@@ -162,16 +113,16 @@ export declare const isAuthenticated: import("reselect").Selector<{
162
113
  unwrapped: (auth: AuthState) => boolean;
163
114
  }, selectAccessToken: import("reselect").Selector<{
164
115
  auth: AuthState;
165
- }, string, []> & {
166
- unwrapped: (auth: AuthState) => string;
116
+ }, string | undefined, []> & {
117
+ unwrapped: (auth: AuthState) => string | undefined;
167
118
  }, selectRefreshToken: import("reselect").Selector<{
168
119
  auth: AuthState;
169
- }, string, []> & {
170
- unwrapped: (auth: AuthState) => string;
120
+ }, string | undefined, []> & {
121
+ unwrapped: (auth: AuthState) => string | undefined;
171
122
  }, selectCurrentUser: import("reselect").Selector<{
172
123
  auth: AuthState;
173
- }, import("../../types/index.interfaces").UserDetails, []> & {
174
- unwrapped: (auth: AuthState) => import("../../types/index.interfaces").UserDetails;
124
+ }, import("../../types/index.interfaces").UserDetails | undefined, []> & {
125
+ unwrapped: (auth: AuthState) => import("../../types/index.interfaces").UserDetails | undefined;
175
126
  }, selectUserCreating: import("reselect").Selector<{
176
127
  auth: AuthState;
177
128
  }, {
@@ -196,23 +147,23 @@ export declare const isAuthenticated: import("reselect").Selector<{
196
147
  unwrapped: (auth: AuthState) => string | false | undefined;
197
148
  }, selectCurrentUserSub: import("reselect").Selector<{
198
149
  auth: AuthState;
199
- }, string | undefined, []> & {
200
- unwrapped: (auth: AuthState) => string | undefined;
201
- }, selectCurrentUserRefreshToken: import("reselect").Selector<{
202
- auth: AuthState;
203
150
  }, string, []> & {
204
151
  unwrapped: (auth: AuthState) => string;
152
+ }, selectCurrentUserRefreshToken: import("reselect").Selector<{
153
+ auth: AuthState;
154
+ }, string | undefined, []> & {
155
+ unwrapped: (auth: AuthState) => string | undefined;
205
156
  }, selectUserTokens: import("reselect").Selector<{
206
157
  auth: AuthState;
207
158
  }, {
208
- accessToken: string;
209
- refreshToken: string;
210
- idToken: string;
159
+ accessToken: string | undefined;
160
+ refreshToken: string | undefined;
161
+ idToken: string | undefined;
211
162
  }, []> & {
212
163
  unwrapped: (auth: AuthState) => {
213
- accessToken: string;
214
- refreshToken: string;
215
- idToken: string;
164
+ accessToken: string | undefined;
165
+ refreshToken: string | undefined;
166
+ idToken: string | undefined;
216
167
  };
217
168
  }, selectUserSubscriptionStatus: import("reselect").Selector<{
218
169
  auth: AuthState;
@@ -221,137 +172,35 @@ export declare const isAuthenticated: import("reselect").Selector<{
221
172
  }, selectSubscription: import("reselect").Selector<{
222
173
  auth: AuthState;
223
174
  }, {
175
+ status: string;
224
176
  id: string;
225
177
  created: number;
226
- status: string;
227
178
  nextPayment: number;
228
179
  amount: number;
229
180
  interval: string;
230
181
  currency: string;
231
- cancelAt: string;
182
+ cancelAt?: number | undefined;
232
183
  planID: string;
233
184
  planDescription: string;
234
185
  paymentDetails: {
235
- response: {
236
- id: string;
237
- object: string;
238
- allow_redisplay: string;
239
- billing_details: {
240
- address: {
241
- city: null;
242
- country: null;
243
- line1: null;
244
- line2: null;
245
- postal_code: null;
246
- state: null;
247
- };
248
- email: null;
249
- name: string;
250
- phone: null;
251
- };
252
- card: {
253
- brand: string;
254
- checks: {
255
- address_line1_check: null;
256
- address_postal_code_check: null;
257
- cvc_check: string;
258
- };
259
- country: string;
260
- display_brand: string;
261
- exp_month: number;
262
- exp_year: number;
263
- fingerprint: string;
264
- funding: string;
265
- generated_from: null;
266
- last4: string;
267
- networks: {
268
- available: string[];
269
- preferred: null;
270
- };
271
- three_d_secure_usage: {
272
- supported: boolean;
273
- };
274
- wallet: null;
275
- };
276
- created: number;
277
- customer: string;
278
- livemode: boolean;
279
- metadata: {};
280
- type: string;
281
- };
282
- formatted: {
283
- id: string;
284
- maskedNumber: string;
285
- expirationDate: string;
286
- cardType: string;
287
- };
186
+ response: import("../../types/index.interfaces").PaymentResponse;
187
+ formatted: import("../../types/index.interfaces").FormattedPayment;
288
188
  };
289
189
  } | undefined, []> & {
290
190
  unwrapped: (auth: AuthState) => {
191
+ status: string;
291
192
  id: string;
292
193
  created: number;
293
- status: string;
294
194
  nextPayment: number;
295
195
  amount: number;
296
196
  interval: string;
297
197
  currency: string;
298
- cancelAt: string;
198
+ cancelAt?: number | undefined;
299
199
  planID: string;
300
200
  planDescription: string;
301
201
  paymentDetails: {
302
- response: {
303
- id: string;
304
- object: string;
305
- allow_redisplay: string;
306
- billing_details: {
307
- address: {
308
- city: null;
309
- country: null;
310
- line1: null;
311
- line2: null;
312
- postal_code: null;
313
- state: null;
314
- };
315
- email: null;
316
- name: string;
317
- phone: null;
318
- };
319
- card: {
320
- brand: string;
321
- checks: {
322
- address_line1_check: null;
323
- address_postal_code_check: null;
324
- cvc_check: string;
325
- };
326
- country: string;
327
- display_brand: string;
328
- exp_month: number;
329
- exp_year: number;
330
- fingerprint: string;
331
- funding: string;
332
- generated_from: null;
333
- last4: string;
334
- networks: {
335
- available: string[];
336
- preferred: null;
337
- };
338
- three_d_secure_usage: {
339
- supported: boolean;
340
- };
341
- wallet: null;
342
- };
343
- created: number;
344
- customer: string;
345
- livemode: boolean;
346
- metadata: {};
347
- type: string;
348
- };
349
- formatted: {
350
- id: string;
351
- maskedNumber: string;
352
- expirationDate: string;
353
- cardType: string;
354
- };
202
+ response: import("../../types/index.interfaces").PaymentResponse;
203
+ formatted: import("../../types/index.interfaces").FormattedPayment;
355
204
  };
356
205
  } | undefined;
357
206
  }, selectSubscriptionPrice: import("reselect").Selector<{
@@ -56,7 +56,7 @@ interface ESWorkout {
56
56
  uuid: string[];
57
57
  description: string[];
58
58
  duration: string[];
59
- duration_filter: string[];
59
+ duration_filter: number[];
60
60
  image: string[];
61
61
  level: string[];
62
62
  published: boolean[];
@@ -106,7 +106,7 @@ interface ESLongForm {
106
106
  image_promo_large?: string[];
107
107
  image_poster?: string[];
108
108
  summary?: string[];
109
- created?: string[];
109
+ created?: number[];
110
110
  revision_timestamp?: string[];
111
111
  video_manifest?: string[];
112
112
  rating?: string[];
@@ -129,8 +129,8 @@ interface ESFaq {
129
129
  uuid?: string[];
130
130
  title?: string[];
131
131
  answer?: string[];
132
- created?: string[];
133
- updated?: string[];
132
+ created?: number[];
133
+ updated?: number[];
134
134
  };
135
135
  sort: number[];
136
136
  }
@@ -142,8 +142,8 @@ interface ESPage {
142
142
  uuid?: string[];
143
143
  title?: string[];
144
144
  body?: string[];
145
- created?: string[];
146
- updated?: string[];
145
+ created?: number[];
146
+ updated?: number[];
147
147
  langcode?: string;
148
148
  url?: string[];
149
149
  };
@@ -155,8 +155,8 @@ interface ESSetting {
155
155
  _score: null;
156
156
  _source: {
157
157
  uuid?: string[];
158
- created?: string[];
159
- updated?: string[];
158
+ created?: number[];
159
+ updated?: number[];
160
160
  status?: string[];
161
161
  type?: string[];
162
162
  video?: string[];
@@ -174,8 +174,8 @@ interface ESPress {
174
174
  uuid?: string[];
175
175
  title?: string[];
176
176
  image?: string[];
177
- created?: string[];
178
- updated?: string[];
177
+ created?: number[];
178
+ updated?: number[];
179
179
  };
180
180
  sort: number[];
181
181
  }
@@ -190,7 +190,7 @@ interface ESGuest {
190
190
  description?: string[];
191
191
  image_16_9?: string[];
192
192
  display?: string[];
193
- updated?: string[];
193
+ updated?: number[];
194
194
  };
195
195
  sort: number[];
196
196
  }
@@ -286,11 +286,11 @@ interface ESChallenge {
286
286
  body?: string[];
287
287
  image?: string[];
288
288
  challenge_key?: string[];
289
- created?: string[];
289
+ created?: number[];
290
290
  days?: string[];
291
- updated?: string[];
291
+ updated?: number[];
292
292
  purchase_button_label?: string[];
293
- price?: string[];
293
+ price?: number[];
294
294
  };
295
295
  sort: number[];
296
296
  }
@@ -303,8 +303,8 @@ interface ESChallengeDay {
303
303
  title?: string[];
304
304
  body?: string[];
305
305
  image?: string[];
306
- created?: string[];
307
- updated?: string[];
306
+ created?: number[];
307
+ updated?: number[];
308
308
  video?: string[];
309
309
  workout?: string[];
310
310
  };
@@ -368,6 +368,15 @@ interface DataArgs {
368
368
  /**
369
369
  * FORMATTED INTERFACES
370
370
  **/
371
+ interface Page {
372
+ uuid?: string;
373
+ title?: string;
374
+ body?: string;
375
+ created?: number;
376
+ updated?: number;
377
+ langcode?: string;
378
+ url?: string;
379
+ }
371
380
  interface Promo {
372
381
  uuid: string;
373
382
  id: string;
@@ -390,11 +399,11 @@ interface Promo {
390
399
  link: string;
391
400
  }
392
401
  interface Workout {
402
+ created: number;
393
403
  changed: number;
394
404
  uuid: string;
395
405
  description: string;
396
- duration: string;
397
- duration_filter: string;
406
+ duration: number;
398
407
  image: string;
399
408
  level: string;
400
409
  published: boolean;
@@ -406,7 +415,7 @@ interface Workout {
406
415
  videoDownload: string;
407
416
  workoutCategory: string;
408
417
  workoutType: string;
409
- livestream_section: string;
418
+ livestreamSection: string;
410
419
  }
411
420
  interface Video {
412
421
  uuid?: string;
@@ -418,7 +427,7 @@ interface Video {
418
427
  duration: number;
419
428
  section: string;
420
429
  videoPoster: string;
421
- videoUrl: string;
430
+ video: string;
422
431
  videoDownload: string;
423
432
  sectionId: number;
424
433
  }
@@ -439,6 +448,15 @@ interface Series {
439
448
  nid: string;
440
449
  season: string;
441
450
  }
451
+ interface Section {
452
+ uuid?: string;
453
+ title?: string;
454
+ description?: string;
455
+ image?: string;
456
+ display?: string;
457
+ challenge?: string;
458
+ id?: string;
459
+ }
442
460
  interface Schedule {
443
461
  uuid: string;
444
462
  created: string;
@@ -496,3 +514,25 @@ interface Schedule {
496
514
  }[];
497
515
  }[];
498
516
  }
517
+ interface Challenge {
518
+ uuid?: string;
519
+ title?: string;
520
+ body?: string;
521
+ image?: string;
522
+ challengeKey?: string;
523
+ created?: number;
524
+ days?: string[];
525
+ updated?: number;
526
+ purchaseButtonLabel?: string;
527
+ price?: number;
528
+ }
529
+ interface ChallengeDay {
530
+ uuid?: string;
531
+ title?: string;
532
+ body?: string;
533
+ image?: string;
534
+ created?: number;
535
+ updated?: number;
536
+ video?: string;
537
+ workout?: string;
538
+ }
@@ -1,5 +1,5 @@
1
1
  export declare const contentApi: import("@reduxjs/toolkit/query/react").Api<import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, {
2
2
  getData: import("@reduxjs/toolkit/query/react").QueryDefinition<DataArgs, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", ESDataTypes, "contentApi">;
3
- getWorkoutById: import("@reduxjs/toolkit/query/react").QueryDefinition<IdArg, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", Workout, "contentApi">;
3
+ getDataById: import("@reduxjs/toolkit/query/react").QueryDefinition<IdArg, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", ESDataTypes, "contentApi">;
4
4
  }, "contentApi", "Data" | "Workout", typeof import("@reduxjs/toolkit/query/react").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
5
- export declare const useGetDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<DataArgs, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", ESDataTypes, "contentApi">>, useLazyGetDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<DataArgs, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", ESDataTypes, "contentApi">>, useGetWorkoutByIdQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<IdArg, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", Workout, "contentApi">>, useLazyGetWorkoutByIdQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<IdArg, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", Workout, "contentApi">>;
5
+ export declare const useGetDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<DataArgs, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", ESDataTypes, "contentApi">>, useLazyGetDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<DataArgs, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", ESDataTypes, "contentApi">>, useGetDataByIdQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<IdArg, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", ESDataTypes, "contentApi">>, useLazyGetDataByIdQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<IdArg, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "Data" | "Workout", ESDataTypes, "contentApi">>;
@@ -1,4 +1,5 @@
1
1
  export { authApi } from './auth';
2
+ export * from './auth';
2
3
  export * from './auth/slice';
3
4
  export { contentApi } from './content';
4
5
  export { paymentApi } from './payment';