@techstuff-dev/foundation-api-utils 1.30.0 → 1.32.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.
@@ -23,7 +23,7 @@ export interface UserPayload {
23
23
  export interface ESPromo {
24
24
  _index: string;
25
25
  _id: string;
26
- _score: null;
26
+ _score: number;
27
27
  _source: {
28
28
  _language: string;
29
29
  align: string[];
@@ -40,6 +40,7 @@ export interface ESPromo {
40
40
  image: string[];
41
41
  langcode: string[];
42
42
  link: string[];
43
+ link_mobile: string[];
43
44
  section: number[];
44
45
  uuid: string[];
45
46
  video: string[];
@@ -54,7 +55,7 @@ export interface ESPromo {
54
55
  export interface ESWorkout {
55
56
  _index: string;
56
57
  _id: string;
57
- _score: null;
58
+ _score: number;
58
59
  _source: {
59
60
  changed: number[];
60
61
  created: number[];
@@ -62,6 +63,7 @@ export interface ESWorkout {
62
63
  description: string[];
63
64
  duration: string[];
64
65
  duration_filter: number[];
66
+ image_16_9: string[];
65
67
  image: string[];
66
68
  level: string[];
67
69
  published: boolean[];
@@ -80,7 +82,7 @@ export interface ESWorkout {
80
82
  export interface ESShortform {
81
83
  _index: string;
82
84
  _id: string;
83
- _score: null;
85
+ _score: number;
84
86
  _source: {
85
87
  uuid?: string;
86
88
  nid?: string;
@@ -101,7 +103,7 @@ export interface ESShortform {
101
103
  export interface ESLongForm {
102
104
  _index: string;
103
105
  _id: string;
104
- _score: null;
106
+ _score: number;
105
107
  _source: {
106
108
  uuid?: string[];
107
109
  nid?: string[];
@@ -129,7 +131,7 @@ export interface ESLongForm {
129
131
  export interface ESFaq {
130
132
  _index: string;
131
133
  _id: string;
132
- _score: null;
134
+ _score: number;
133
135
  _source: {
134
136
  uuid?: string[];
135
137
  title?: string[];
@@ -142,7 +144,7 @@ export interface ESFaq {
142
144
  export interface ESPage {
143
145
  _index: string;
144
146
  _id: string;
145
- _score: null;
147
+ _score: number;
146
148
  _source: {
147
149
  uuid?: string[];
148
150
  title?: string[];
@@ -157,7 +159,7 @@ export interface ESPage {
157
159
  export interface ESSetting {
158
160
  _index: string;
159
161
  _id: string;
160
- _score: null;
162
+ _score: number;
161
163
  _source: {
162
164
  uuid?: string[];
163
165
  created?: number[];
@@ -174,7 +176,7 @@ export interface ESSetting {
174
176
  export interface ESPress {
175
177
  _index: string;
176
178
  _id: string;
177
- _score: null;
179
+ _score: number;
178
180
  _source: {
179
181
  uuid?: string[];
180
182
  title?: string[];
@@ -187,7 +189,7 @@ export interface ESPress {
187
189
  export interface ESGuest {
188
190
  _index: string;
189
191
  _id: string;
190
- _score: null;
192
+ _score: number;
191
193
  _source: {
192
194
  uuid?: string[];
193
195
  id?: string[];
@@ -202,7 +204,7 @@ export interface ESGuest {
202
204
  export interface ESVideo {
203
205
  _index: string;
204
206
  _id: string;
205
- _score: null;
207
+ _score: number;
206
208
  _source: {
207
209
  uuid: string[];
208
210
  title: string[];
@@ -222,7 +224,7 @@ export interface ESVideo {
222
224
  export interface ESSection {
223
225
  _index: string;
224
226
  _id: string;
225
- _score: null;
227
+ _score: number;
226
228
  _source: {
227
229
  uuid?: string[];
228
230
  title?: string[];
@@ -237,7 +239,7 @@ export interface ESSection {
237
239
  export interface ESSchedule {
238
240
  _index: string;
239
241
  _id: string;
240
- _score: null;
242
+ _score: number;
241
243
  _source: {
242
244
  uuid: string[];
243
245
  created: string[];
@@ -284,7 +286,7 @@ export interface ESSchedule {
284
286
  export interface ESChallenge {
285
287
  _index: string;
286
288
  _id: string;
287
- _score: null;
289
+ _score: number;
288
290
  _source: {
289
291
  uuid?: string[];
290
292
  title?: string[];
@@ -302,7 +304,7 @@ export interface ESChallenge {
302
304
  export interface ESChallengeDay {
303
305
  _index: string;
304
306
  _id: string;
305
- _score: null;
307
+ _score: number;
306
308
  _source: {
307
309
  uuid?: string[];
308
310
  title?: string[];
@@ -318,7 +320,7 @@ export interface ESChallengeDay {
318
320
  export interface ESConfig {
319
321
  _index: string;
320
322
  _id: string;
321
- _score: null;
323
+ _score: number;
322
324
  _source: {
323
325
  uuid?: string[];
324
326
  id?: string[];
@@ -341,7 +343,7 @@ export interface ESConfig {
341
343
  export interface ESSectionPanel {
342
344
  _index: string;
343
345
  _id: string;
344
- _score: null;
346
+ _score: number;
345
347
  _source: {
346
348
  uuid?: string[];
347
349
  title?: string[];
@@ -356,7 +358,7 @@ export interface ESSectionPanel {
356
358
  export interface ESSectionItem {
357
359
  _index: string;
358
360
  _id: string;
359
- _score: null;
361
+ _score: number;
360
362
  _source: {
361
363
  uuid?: string[];
362
364
  title?: string[];
@@ -372,7 +374,7 @@ export interface ESSectionItem {
372
374
  export interface ESTaxonomy {
373
375
  _index: string;
374
376
  _id: string;
375
- _score: null;
377
+ _score: number;
376
378
  _source: {
377
379
  uuid?: string[];
378
380
  updated?: number[];
@@ -392,7 +394,7 @@ export interface ESTaxonomy {
392
394
  export interface ESSeries {
393
395
  _index: string;
394
396
  _id: string;
395
- _score: null;
397
+ _score: number;
396
398
  _source: {
397
399
  uuid?: string[];
398
400
  created?: number[];
@@ -410,7 +412,7 @@ export interface ESSeries {
410
412
  export interface ESSeason {
411
413
  _index: string;
412
414
  _id: string;
413
- _score: null;
415
+ _score: number;
414
416
  _source: {
415
417
  uuid?: string[];
416
418
  created?: number[];
@@ -428,7 +430,7 @@ export interface ESSeason {
428
430
  export interface ESLongform {
429
431
  _index: string;
430
432
  _id: string;
431
- _score: null;
433
+ _score: number;
432
434
  _source: {
433
435
  uuid?: string[];
434
436
  created?: number[];
@@ -448,7 +450,7 @@ export interface ESLongform {
448
450
  export interface ESMediaItem {
449
451
  _index: string;
450
452
  _id: string;
451
- _score: null;
453
+ _score: number;
452
454
  _source: {
453
455
  changed?: number[];
454
456
  created?: number[];
@@ -491,7 +493,7 @@ export interface ESWorkoutResponse {
491
493
  };
492
494
  hits: {
493
495
  total: number;
494
- max_score: null;
496
+ max_score: number;
495
497
  hits: ESWorkout[];
496
498
  };
497
499
  }
@@ -507,7 +509,7 @@ export interface ESDataResponse {
507
509
  };
508
510
  hits: {
509
511
  total: number;
510
- max_score: null;
512
+ max_score: number;
511
513
  hits: ESDataTypes;
512
514
  };
513
515
  }
@@ -546,23 +548,15 @@ export interface Promo {
546
548
  uuid?: string;
547
549
  id?: string;
548
550
  title?: string;
549
- video?: string;
550
- align?: string;
551
- section?: number;
552
551
  image?: string;
553
552
  imageFormatted?: string;
554
- backgroundImage?: string;
555
- backgroundVideo?: string;
556
- backgroundImageFormatted?: string;
557
553
  description?: string;
558
554
  created?: number;
559
555
  updated?: number;
560
- langcode?: string;
561
556
  weight?: number;
562
- authPanel?: boolean;
563
557
  buttonText?: string;
564
558
  link?: string;
565
- term?: string;
559
+ linkMobile?: string;
566
560
  }
567
561
  export interface Workout {
568
562
  created: number;
@@ -570,6 +564,7 @@ export interface Workout {
570
564
  uuid: string;
571
565
  description: string;
572
566
  duration: number;
567
+ imageStyled: string;
573
568
  image: string;
574
569
  level: string;
575
570
  published: boolean;
package/dist/index.esm.js CHANGED
@@ -221,34 +221,35 @@ var formatUserPayload = function (payload) {
221
221
  };
222
222
  function formatPromos(data) {
223
223
  return data.map(function (item) {
224
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
224
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
225
225
  return {
226
226
  uuid: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.uuid) === null || _b === void 0 ? void 0 : _b[0],
227
227
  id: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.uuid) === null || _d === void 0 ? void 0 : _d[0],
228
228
  title: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.title) === null || _f === void 0 ? void 0 : _f[0],
229
- video: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.video) === null || _h === void 0 ? void 0 : _h[0],
230
- align: (_k = (_j = item === null || item === void 0 ? void 0 : item._source) === null || _j === void 0 ? void 0 : _j.align) === null || _k === void 0 ? void 0 : _k[0],
231
- section: (_m = (_l = item === null || item === void 0 ? void 0 : item._source) === null || _l === void 0 ? void 0 : _l.section) === null || _m === void 0 ? void 0 : _m[0],
232
- image: (_p = (_o = item === null || item === void 0 ? void 0 : item._source) === null || _o === void 0 ? void 0 : _o.image) === null || _p === void 0 ? void 0 : _p[0],
233
- imageFormatted: (_r = (_q = item === null || item === void 0 ? void 0 : item._source) === null || _q === void 0 ? void 0 : _q.image_formatted) === null || _r === void 0 ? void 0 : _r[0],
234
- backgroundImage: (_t = (_s = item === null || item === void 0 ? void 0 : item._source) === null || _s === void 0 ? void 0 : _s.background_image) === null || _t === void 0 ? void 0 : _t[0],
235
- backgroundVideo: (_v = (_u = item === null || item === void 0 ? void 0 : item._source) === null || _u === void 0 ? void 0 : _u.background_video) === null || _v === void 0 ? void 0 : _v[0],
236
- backgroundImageFormatted: (_x = (_w = item === null || item === void 0 ? void 0 : item._source) === null || _w === void 0 ? void 0 : _w.background_image_formatted) === null || _x === void 0 ? void 0 : _x[0],
237
- description: (_z = (_y = item === null || item === void 0 ? void 0 : item._source) === null || _y === void 0 ? void 0 : _y.description) === null || _z === void 0 ? void 0 : _z[0],
238
- created: (_1 = (_0 = item === null || item === void 0 ? void 0 : item._source) === null || _0 === void 0 ? void 0 : _0.created) === null || _1 === void 0 ? void 0 : _1[0],
239
- updated: (_3 = (_2 = item === null || item === void 0 ? void 0 : item._source) === null || _2 === void 0 ? void 0 : _2.updated) === null || _3 === void 0 ? void 0 : _3[0],
240
- langcode: (_5 = (_4 = item === null || item === void 0 ? void 0 : item._source) === null || _4 === void 0 ? void 0 : _4.langcode) === null || _5 === void 0 ? void 0 : _5[0],
241
- weight: (_7 = (_6 = item === null || item === void 0 ? void 0 : item._source) === null || _6 === void 0 ? void 0 : _6.weight) === null || _7 === void 0 ? void 0 : _7[0],
242
- authPanel: (_9 = (_8 = item === null || item === void 0 ? void 0 : item._source) === null || _8 === void 0 ? void 0 : _8.auth_panel) === null || _9 === void 0 ? void 0 : _9[0],
243
- buttonText: (_11 = (_10 = item === null || item === void 0 ? void 0 : item._source) === null || _10 === void 0 ? void 0 : _10.button_text) === null || _11 === void 0 ? void 0 : _11[0],
244
- link: (_13 = (_12 = item === null || item === void 0 ? void 0 : item._source) === null || _12 === void 0 ? void 0 : _12.link) === null || _13 === void 0 ? void 0 : _13[0],
245
- term: (_15 = (_14 = item === null || item === void 0 ? void 0 : item._source) === null || _14 === void 0 ? void 0 : _14.term) === null || _15 === void 0 ? void 0 : _15[0],
229
+ image: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.image) === null || _h === void 0 ? void 0 : _h[0],
230
+ imageFormatted: (_k = (_j = item === null || item === void 0 ? void 0 : item._source) === null || _j === void 0 ? void 0 : _j.image_formatted) === null || _k === void 0 ? void 0 : _k[0],
231
+ description: (_m = (_l = item === null || item === void 0 ? void 0 : item._source) === null || _l === void 0 ? void 0 : _l.description) === null || _m === void 0 ? void 0 : _m[0],
232
+ created: (_p = (_o = item === null || item === void 0 ? void 0 : item._source) === null || _o === void 0 ? void 0 : _o.created) === null || _p === void 0 ? void 0 : _p[0],
233
+ updated: (_r = (_q = item === null || item === void 0 ? void 0 : item._source) === null || _q === void 0 ? void 0 : _q.updated) === null || _r === void 0 ? void 0 : _r[0],
234
+ weight: (_t = (_s = item === null || item === void 0 ? void 0 : item._source) === null || _s === void 0 ? void 0 : _s.weight) === null || _t === void 0 ? void 0 : _t[0],
235
+ buttonText: (_v = (_u = item === null || item === void 0 ? void 0 : item._source) === null || _u === void 0 ? void 0 : _u.button_text) === null || _v === void 0 ? void 0 : _v[0],
236
+ link: (_x = (_w = item === null || item === void 0 ? void 0 : item._source) === null || _w === void 0 ? void 0 : _w.link) === null || _x === void 0 ? void 0 : _x[0],
237
+ linkMobile: (_z = (_y = item === null || item === void 0 ? void 0 : item._source) === null || _y === void 0 ? void 0 : _y.link_mobile) === null || _z === void 0 ? void 0 : _z[0],
238
+ term: (_1 = (_0 = item === null || item === void 0 ? void 0 : item._source) === null || _0 === void 0 ? void 0 : _0.term) === null || _1 === void 0 ? void 0 : _1[0],
239
+ // video: item?._source?.video?.[0],
240
+ // align: item?._source?.align?.[0],
241
+ // section: item?._source?.section?.[0],
242
+ // backgroundImage: item?._source?.background_image?.[0],
243
+ // backgroundVideo: item?._source?.background_video?.[0],
244
+ // backgroundImageFormatted: item?._source?.background_image_formatted?.[0],
245
+ // langcode: item?._source?.langcode?.[0],
246
+ // authPanel: item?._source?.auth_panel?.[0],
246
247
  };
247
248
  });
248
249
  }
249
250
  function formatWorkout(data) {
250
251
  return data.map(function (item) {
251
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
252
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
252
253
  return {
253
254
  changed: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.changed) === null || _b === void 0 ? void 0 : _b[0],
254
255
  created: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.created) === null || _d === void 0 ? void 0 : _d[0],
@@ -260,14 +261,15 @@ function formatWorkout(data) {
260
261
  published: (_p = (_o = item === null || item === void 0 ? void 0 : item._source) === null || _o === void 0 ? void 0 : _o.published) === null || _p === void 0 ? void 0 : _p[0],
261
262
  targeted_section: (_r = (_q = item === null || item === void 0 ? void 0 : item._source) === null || _q === void 0 ? void 0 : _q.targeted_section) === null || _r === void 0 ? void 0 : _r[0],
262
263
  uid: (_t = (_s = item === null || item === void 0 ? void 0 : item._source) === null || _s === void 0 ? void 0 : _s.uid) === null || _t === void 0 ? void 0 : _t[0],
263
- image: (_v = (_u = item === null || item === void 0 ? void 0 : item._source) === null || _u === void 0 ? void 0 : _u.image) === null || _v === void 0 ? void 0 : _v[0],
264
- title: (_x = (_w = item === null || item === void 0 ? void 0 : item._source) === null || _w === void 0 ? void 0 : _w.title) === null || _x === void 0 ? void 0 : _x[0],
265
- video: (_z = (_y = item === null || item === void 0 ? void 0 : item._source) === null || _y === void 0 ? void 0 : _y.video_url) === null || _z === void 0 ? void 0 : _z[0],
266
- videoDownload: (_1 = (_0 = item === null || item === void 0 ? void 0 : item._source) === null || _0 === void 0 ? void 0 : _0.video_download) === null || _1 === void 0 ? void 0 : _1[0],
267
- videoPoster: (_3 = (_2 = item === null || item === void 0 ? void 0 : item._source) === null || _2 === void 0 ? void 0 : _2.video_poster) === null || _3 === void 0 ? void 0 : _3[0],
268
- workoutCategory: (_5 = (_4 = item === null || item === void 0 ? void 0 : item._source) === null || _4 === void 0 ? void 0 : _4.workout_category) === null || _5 === void 0 ? void 0 : _5[0],
269
- workoutType: (_7 = (_6 = item === null || item === void 0 ? void 0 : item._source) === null || _6 === void 0 ? void 0 : _6.workout_type) === null || _7 === void 0 ? void 0 : _7[0],
270
- livestreamSection: (_9 = (_8 = item === null || item === void 0 ? void 0 : item._source) === null || _8 === void 0 ? void 0 : _8.livestream_section) === null || _9 === void 0 ? void 0 : _9[0],
264
+ imageStyled: (_v = (_u = item === null || item === void 0 ? void 0 : item._source) === null || _u === void 0 ? void 0 : _u.image_16_9) === null || _v === void 0 ? void 0 : _v[0],
265
+ image: (_x = (_w = item === null || item === void 0 ? void 0 : item._source) === null || _w === void 0 ? void 0 : _w.image) === null || _x === void 0 ? void 0 : _x[0],
266
+ title: (_z = (_y = item === null || item === void 0 ? void 0 : item._source) === null || _y === void 0 ? void 0 : _y.title) === null || _z === void 0 ? void 0 : _z[0],
267
+ video: (_1 = (_0 = item === null || item === void 0 ? void 0 : item._source) === null || _0 === void 0 ? void 0 : _0.video_url) === null || _1 === void 0 ? void 0 : _1[0],
268
+ videoDownload: (_3 = (_2 = item === null || item === void 0 ? void 0 : item._source) === null || _2 === void 0 ? void 0 : _2.video_download) === null || _3 === void 0 ? void 0 : _3[0],
269
+ videoPoster: (_5 = (_4 = item === null || item === void 0 ? void 0 : item._source) === null || _4 === void 0 ? void 0 : _4.video_poster) === null || _5 === void 0 ? void 0 : _5[0],
270
+ workoutCategory: (_7 = (_6 = item === null || item === void 0 ? void 0 : item._source) === null || _6 === void 0 ? void 0 : _6.workout_category) === null || _7 === void 0 ? void 0 : _7[0],
271
+ workoutType: (_9 = (_8 = item === null || item === void 0 ? void 0 : item._source) === null || _8 === void 0 ? void 0 : _8.workout_type) === null || _9 === void 0 ? void 0 : _9[0],
272
+ livestreamSection: (_11 = (_10 = item === null || item === void 0 ? void 0 : item._source) === null || _10 === void 0 ? void 0 : _10.livestream_section) === null || _11 === void 0 ? void 0 : _11[0],
271
273
  };
272
274
  });
273
275
  }