@techstuff-dev/foundation-api-utils 1.23.0 → 1.24.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.
@@ -44,6 +44,10 @@ export interface ESPromo {
44
44
  uuid: string[];
45
45
  video: string[];
46
46
  weight: number[];
47
+ search_api_datasource?: string[];
48
+ search_api_id?: string[];
49
+ search_api_language?: string[];
50
+ term?: string[];
47
51
  };
48
52
  sort: number[];
49
53
  }
@@ -311,6 +315,136 @@ export interface ESChallengeDay {
311
315
  };
312
316
  sort: number[];
313
317
  }
318
+ export interface ESConfig {
319
+ _index: string;
320
+ _id: string;
321
+ _score: null;
322
+ _source: {
323
+ uuid?: string[];
324
+ id?: string[];
325
+ created?: number[];
326
+ updated?: number[];
327
+ type?: string[];
328
+ cla?: string[];
329
+ enabled?: boolean[];
330
+ name?: string[];
331
+ price?: number[];
332
+ video?: string[];
333
+ image_homepage?: string[];
334
+ image_section_banner?: string[];
335
+ search_api_id?: string[];
336
+ search_api_datasource?: string[];
337
+ search_api_language?: string[];
338
+ };
339
+ sort: number[];
340
+ }
341
+ export interface ESSectionPanel {
342
+ _index: string;
343
+ _id: string;
344
+ _score: null;
345
+ _source: {
346
+ uuid?: string[];
347
+ title?: string[];
348
+ created?: number[];
349
+ updated?: number[];
350
+ weight?: number[];
351
+ item_uuid?: string[];
352
+ type?: string[];
353
+ };
354
+ sort: number[];
355
+ }
356
+ export interface ESSectionItem {
357
+ _index: string;
358
+ _id: string;
359
+ _score: null;
360
+ _source: {
361
+ uuid?: string[];
362
+ title?: string[];
363
+ created?: number[];
364
+ updated?: number[];
365
+ type?: string[];
366
+ term?: string[];
367
+ custom_image_formatted?: string[];
368
+ banner_image_formatted?: string;
369
+ };
370
+ sort: number[];
371
+ }
372
+ export interface ESTaxonomy {
373
+ _index: string;
374
+ _id: string;
375
+ _score: null;
376
+ _source: {
377
+ uuid?: string[];
378
+ updated?: number[];
379
+ vocabulary?: string[];
380
+ name?: string[];
381
+ description?: string[];
382
+ image?: string[];
383
+ image_banner?: string[];
384
+ image_banner_taxonomy?: string[];
385
+ image_large_16_9?: string[];
386
+ weight?: number[];
387
+ parent_name?: string[];
388
+ color?: string[];
389
+ };
390
+ sort: number[];
391
+ }
392
+ export interface ESSeries {
393
+ _index: string;
394
+ _id: string;
395
+ _score: null;
396
+ _source: {
397
+ uuid?: string[];
398
+ created?: number[];
399
+ updated?: number[];
400
+ display_title?: string[];
401
+ synopsis?: string[];
402
+ image_style_poster?: string[];
403
+ image_style_thumb?: string[];
404
+ category?: string[];
405
+ category_id?: string[];
406
+ seasons?: string[];
407
+ };
408
+ sort: number[];
409
+ }
410
+ export interface ESSeason {
411
+ _index: string;
412
+ _id: string;
413
+ _score: null;
414
+ _source: {
415
+ uuid?: string[];
416
+ created?: number[];
417
+ updated?: number[];
418
+ display_title?: string[];
419
+ synopsis?: string[];
420
+ image_style_poster?: string[];
421
+ image_style_thumb?: string[];
422
+ episodes?: string[];
423
+ season_number?: string[];
424
+ show?: string[];
425
+ };
426
+ sort: number[];
427
+ }
428
+ export interface ESLongform {
429
+ _index: string;
430
+ _id: string;
431
+ _score: null;
432
+ _source: {
433
+ uuid?: string[];
434
+ created?: number[];
435
+ updated?: number[];
436
+ display_title?: string[];
437
+ synopsis?: string[];
438
+ image_style_poster?: string[];
439
+ image_style_thumb?: string[];
440
+ duration?: string[];
441
+ release_date?: string[];
442
+ video?: string[];
443
+ image_url?: string[];
444
+ episode_number?: string[];
445
+ };
446
+ sort: number[];
447
+ }
314
448
  /**
315
449
  * QUERY RESPONSE INTERFACES
316
450
  **/
@@ -329,7 +463,7 @@ export interface ESWorkoutResponse {
329
463
  hits: ESWorkout[];
330
464
  };
331
465
  }
332
- export type ESDataTypes = ESWorkout[] | ESPromo[] | ESShortform[] | ESLongForm[] | ESFaq[] | ESPage[] | ESSetting[] | ESPress[] | ESGuest[] | ESVideo[] | ESSection[] | ESSchedule[] | ESChallenge[] | ESChallengeDay[];
466
+ export type ESDataTypes = ESWorkout[] | ESPromo[] | ESShortform[] | ESLongForm[] | ESFaq[] | ESPage[] | ESSetting[] | ESPress[] | ESGuest[] | ESVideo[] | ESSection[] | ESSchedule[] | ESChallenge[] | ESChallengeDay[] | ESConfig[];
333
467
  export interface ESDataResponse {
334
468
  took: number;
335
469
  timed_out: boolean;
@@ -379,25 +513,26 @@ export interface Page {
379
513
  url?: string;
380
514
  }
381
515
  export interface Promo {
382
- uuid: string;
383
- id: string;
384
- title: string;
385
- video: string;
386
- align: string;
387
- section: number;
388
- image: string;
389
- imageFormatted: string;
390
- backgroundImage: string;
391
- backgroundVideo: string;
392
- backgroundImageFormatted: string;
393
- description: string;
394
- created: number;
395
- updated: number;
396
- langcode: string;
397
- weight: number;
398
- authPanel: boolean;
399
- buttonText: string;
400
- link: string;
516
+ uuid?: string;
517
+ id?: string;
518
+ title?: string;
519
+ video?: string;
520
+ align?: string;
521
+ section?: number;
522
+ image?: string;
523
+ imageFormatted?: string;
524
+ backgroundImage?: string;
525
+ backgroundVideo?: string;
526
+ backgroundImageFormatted?: string;
527
+ description?: string;
528
+ created?: number;
529
+ updated?: number;
530
+ langcode?: string;
531
+ weight?: number;
532
+ authPanel?: boolean;
533
+ buttonText?: string;
534
+ link?: string;
535
+ term?: string;
401
536
  }
402
537
  export interface Workout {
403
538
  created: number;
@@ -432,23 +567,6 @@ export interface Video {
432
567
  videoDownload: string;
433
568
  sectionId: number;
434
569
  }
435
- export interface Series {
436
- uuid: string;
437
- id: string;
438
- title: string;
439
- subtitle: string;
440
- imageThumbnailURL: string;
441
- imageURL: string;
442
- description: string;
443
- summary: {
444
- value: string[];
445
- };
446
- body: {
447
- value: string[];
448
- };
449
- nid: string;
450
- season: string;
451
- }
452
570
  export interface Section {
453
571
  uuid?: string;
454
572
  title?: string;
@@ -537,3 +655,95 @@ export interface ChallengeDay {
537
655
  video?: string;
538
656
  workout?: string;
539
657
  }
658
+ export interface Config {
659
+ uuid?: string;
660
+ id?: string;
661
+ created?: number;
662
+ updated?: number;
663
+ type?: string;
664
+ cla?: string;
665
+ enabled?: boolean;
666
+ name?: string;
667
+ price?: number;
668
+ video?: string;
669
+ imageHomepage?: string;
670
+ imageSectionBanner?: string;
671
+ searchApiId?: string;
672
+ searchApiDatasource?: string;
673
+ searchApiLanguage?: string;
674
+ }
675
+ export interface SectionPanel {
676
+ uuid?: string;
677
+ title?: string;
678
+ created?: number;
679
+ updated?: number;
680
+ weight?: number;
681
+ items?: string[];
682
+ type?: string;
683
+ }
684
+ export interface SectionItem {
685
+ uuid?: string;
686
+ title?: string;
687
+ created?: number;
688
+ updated?: number;
689
+ type?: string;
690
+ term?: string;
691
+ image?: string;
692
+ bannerImage?: string;
693
+ }
694
+ export interface Taxonomy {
695
+ id?: string;
696
+ uuid?: string;
697
+ updated?: number;
698
+ vocabulary?: string;
699
+ name?: string;
700
+ description?: string;
701
+ image?: string;
702
+ imageBanner?: string;
703
+ imageBannerTaxonomy?: string;
704
+ imageLarge?: string;
705
+ weight?: number;
706
+ parentName?: string;
707
+ color?: string;
708
+ }
709
+ export interface Series {
710
+ id?: string;
711
+ uuid?: string;
712
+ created?: number;
713
+ updated?: number;
714
+ displayTitle?: string;
715
+ synopsis?: string;
716
+ imagePoster?: string;
717
+ imageThumb?: string;
718
+ category?: string;
719
+ categoryId?: string;
720
+ seasons?: string[];
721
+ }
722
+ export interface Season {
723
+ id?: string;
724
+ uuid?: string;
725
+ created?: number;
726
+ updated?: number;
727
+ displayTitle?: string;
728
+ synopsis?: string;
729
+ imagePoster?: string;
730
+ imageThumb?: string;
731
+ episodes?: string[];
732
+ seasonNumber?: string;
733
+ showId?: string;
734
+ }
735
+ export interface LongForm {
736
+ id?: string;
737
+ uuid?: string;
738
+ created?: number;
739
+ updated?: number;
740
+ displayTitle?: string;
741
+ synopsis?: string;
742
+ imagePoster?: string;
743
+ imageThumb?: string;
744
+ duration?: string;
745
+ releaseDate?: string;
746
+ video?: string;
747
+ imageUrl?: string;
748
+ episodeNumber?: string;
749
+ }
@@ -1,5 +1,5 @@
1
1
  import { FederatedSession, SocialTokens, User } from '../../types/index.interfaces';
2
- import { ESPromo, Promo, UserPayload, ESWorkout, Workout, Series, ESShortform, ESLongForm, ESFaq, ESPage, Page, ESSetting, ESPress, ESGuest, ESVideo, Video, ESSection, Section, ESSchedule, Schedule, ESChallenge, Challenge, ESChallengeDay, ChallengeDay } from '../../services/content/content.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 } from '../../services/content/content.interfaces';
3
3
  export declare const formatUserPayload: (payload: UserPayload) => {
4
4
  userEmail: string;
5
5
  lastName: string;
@@ -15,19 +15,6 @@ export declare const formatUserPayload: (payload: UserPayload) => {
15
15
  };
16
16
  export declare function formatPromos(data: ESPromo[]): Promo[];
17
17
  export declare function formatWorkout(data: ESWorkout[]): Workout[];
18
- export declare function formatSeries(data: Series[], channel: string): {
19
- uuid: string;
20
- id: string;
21
- title: string;
22
- subtitle: string;
23
- thumb: string;
24
- mainImage: string;
25
- description: string[];
26
- body: string[];
27
- nid: string;
28
- seasonList: string;
29
- channel: string;
30
- }[];
31
18
  export declare function formatShortform(data: ESShortform[]): {
32
19
  uuid: string | undefined;
33
20
  id: string | undefined;
@@ -44,29 +31,6 @@ export declare function formatShortform(data: ESShortform[]): {
44
31
  duration: string | undefined;
45
32
  category: string | undefined;
46
33
  }[];
47
- export declare function formatLongform(data: ESLongForm[]): {
48
- uuid: string | undefined;
49
- id: string | undefined;
50
- nid: string | undefined;
51
- title: string | undefined;
52
- image: string | undefined;
53
- image_promo: string | undefined;
54
- image_promo_large: string | undefined;
55
- image_poster: string | undefined;
56
- summary: string | undefined;
57
- created: number | undefined;
58
- updated: string | undefined;
59
- video: string | undefined;
60
- rating: string | undefined;
61
- released: string | undefined;
62
- source_id: string | undefined;
63
- director: string | undefined;
64
- duration: string | undefined;
65
- path: string | undefined;
66
- genres: string[] | undefined;
67
- actors: string[] | undefined;
68
- writers: string[] | undefined;
69
- }[];
70
34
  export declare function formatFaqs(data: ESFaq[]): {
71
35
  uuid: string | undefined;
72
36
  id: string | undefined;
@@ -112,3 +76,10 @@ export declare function formatSecondsToISO8601Duration(seconds?: number): string
112
76
  export declare function formatAuthSession(session: any): User;
113
77
  export declare function formatFedaratedSession(session: FederatedSession): User;
114
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[];