@contentchef/contentchef-types 11.2.0-alpha.2 → 11.2.0-alpha.4

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.
@@ -1103,6 +1103,14 @@ export type GetContentHistoryEntryResponse = ContentHistoryEntry & {
1103
1103
  }[];
1104
1104
  restorable: boolean;
1105
1105
  violations: RestoreViolations;
1106
+ /**
1107
+ * Values of fields removed from the definition by hand since, `path` in the key format of translation
1108
+ * entries. They are left out of `payload` and `translations`, as a save leaves them out, so they do not
1109
+ * keep the version from being restored
1110
+ */
1111
+ dropped: {
1112
+ path: string;
1113
+ }[];
1106
1114
  };
1107
1115
  /**
1108
1116
  * This type represent the data needed to make a restore content API request
@@ -1,4 +1,4 @@
1
- import { ContentId, LocalizationSettings } from "./Content";
1
+ import { ContentId, LocalizationSettings, SortDirection } from "./Content";
2
2
  import { AuthorResponse } from "./Author";
3
3
  import { ContentRepositoryId } from "./ContentRepository";
4
4
  import { ContentTranslationStatus } from "./ContentTranslation";
@@ -452,3 +452,312 @@ export type ListReleaseItemsV2Response = PagedListResponse<ReleaseItemGroup> & {
452
452
  * This type represent the response of a get published content API request
453
453
  */
454
454
  export type GetPublishedContentResponse = PublishedContentResponse | undefined;
455
+ /**
456
+ * This enum represent how the items of [[PropFilters]] combine
457
+ */
458
+ export declare enum LogicalOperators {
459
+ AND = "AND",
460
+ OR = "OR"
461
+ }
462
+ /**
463
+ * This enum represent how a [[PropFilterItem]] compares an indexed field with its value. The `_IC`
464
+ * variants ignore case
465
+ */
466
+ export declare enum ConditionOperators {
467
+ CONTAINS = "CONTAINS",
468
+ CONTAINS_IC = "CONTAINS_IC",
469
+ EQUALS = "EQUALS",
470
+ EQUALS_IC = "EQUALS_IC",
471
+ IN = "IN",
472
+ IN_IC = "IN_IC",
473
+ STARTS_WITH = "STARTS_WITH",
474
+ STARTS_WITH_IC = "STARTS_WITH_IC"
475
+ }
476
+ /**
477
+ * This type represent one condition over an indexed field of a published content, as the delivery API
478
+ * takes it
479
+ */
480
+ export type PropFilterItem = {
481
+ field: string;
482
+ operator: ConditionOperators;
483
+ /**
484
+ * An array for [[ConditionOperators.IN]] and [[ConditionOperators.IN_IC]]
485
+ */
486
+ value: string | string[];
487
+ };
488
+ /**
489
+ * This type represent the delivery API's property filters, over the indexed fields of a published content
490
+ */
491
+ export type PropFilters = {
492
+ condition: LogicalOperators;
493
+ /**
494
+ * From 1 to 10
495
+ */
496
+ items: PropFilterItem[];
497
+ };
498
+ /**
499
+ * This type represent which date of a content's online window has to fall within a timeline's range:
500
+ * `overlap`, online at some point of it, `starts`, its online date, or `ends`, its offline date
501
+ */
502
+ export type TimelineMatch = "overlap" | "starts" | "ends";
503
+ /**
504
+ * This type represent the range and filters of the timeline API requests. Every filter given applies,
505
+ * together, and a list filter matches a content that has one of its values
506
+ */
507
+ export type TimelineFilters = {
508
+ /**
509
+ * The range's start, as an ISO 8601 string. With `from` equal to `to`, what is online at that instant
510
+ */
511
+ from: string;
512
+ /**
513
+ * The range's end, as an ISO 8601 string, not before `from` and at most 400 days after it
514
+ */
515
+ to: string;
516
+ /**
517
+ * `overlap` by default
518
+ */
519
+ match?: TimelineMatch;
520
+ /**
521
+ * Whether the contents with neither date, online all the time, are left out, by default, or included
522
+ */
523
+ undated?: "exclude" | "include";
524
+ /**
525
+ * From 2 to 100 characters, matched anywhere in the name, the public id or the external identifier,
526
+ * ignoring case
527
+ */
528
+ search?: string;
529
+ /**
530
+ * Up to 500
531
+ */
532
+ publicIds?: string[];
533
+ /**
534
+ * Up to 500
535
+ */
536
+ contentIds?: ContentId[];
537
+ /**
538
+ * Content definition mnemonic ids, up to 100
539
+ */
540
+ definitions?: string[];
541
+ /**
542
+ * Content repository mnemonic ids, up to 100
543
+ */
544
+ repositories?: string[];
545
+ /**
546
+ * Up to 100
547
+ */
548
+ channels?: string[];
549
+ /**
550
+ * Up to 100
551
+ */
552
+ tags?: string[];
553
+ /**
554
+ * Up to 100
555
+ */
556
+ locales?: string[];
557
+ propFilters?: PropFilters;
558
+ };
559
+ /**
560
+ * This type represent a version of a content on the timeline: `live`, the one delivery serves, or
561
+ * `pending`, the one published to stage and not promoted yet
562
+ */
563
+ export type TimelineVersionKind = "live" | "pending";
564
+ /**
565
+ * This type represent what the timeline can be sorted by. With both versions, a content sorts by the
566
+ * earlier online date, the later offline date and the latest publish of the two
567
+ */
568
+ export type TimelineSort = "onlineDate" | "offlineDate" | "name" | "publicId" | "definition" | "lastPublished";
569
+ /**
570
+ * This type represent the data needed to make a list timeline API request
571
+ */
572
+ export type ListTimelineRequest = TimelineFilters & {
573
+ /**
574
+ * Both by default
575
+ */
576
+ versions?: TimelineVersionKind[];
577
+ /**
578
+ * `onlineDate` by default
579
+ */
580
+ sort?: TimelineSort;
581
+ /**
582
+ * Ascending by default
583
+ */
584
+ order?: SortDirection;
585
+ /**
586
+ * true counts the filtered contents per definition, repository, channel, tag and locale
587
+ */
588
+ facets?: boolean;
589
+ /**
590
+ * 0 by default
591
+ */
592
+ skip?: number;
593
+ /**
594
+ * 50 by default, at most 200, counted in contents
595
+ */
596
+ take?: number;
597
+ };
598
+ /**
599
+ * This type represent one version of a content on the timeline, as its default locale has it
600
+ */
601
+ export type TimelineVersion = {
602
+ version: number;
603
+ /**
604
+ * As an ISO 8601 string, null without one
605
+ */
606
+ onlineDate: string | null;
607
+ /**
608
+ * As an ISO 8601 string, null without one
609
+ */
610
+ offlineDate: string | null;
611
+ /**
612
+ * When the version was published to stage, as an ISO 8601 string
613
+ */
614
+ publishedDate: string;
615
+ channels: string[];
616
+ tags: string[];
617
+ /**
618
+ * Every locale of the version
619
+ */
620
+ locales: string[];
621
+ };
622
+ /**
623
+ * This type represent a content on the timeline, with each of its versions asked for
624
+ */
625
+ export type TimelineItem = {
626
+ contentId: ContentId;
627
+ /**
628
+ * The pending version's when there is one, as `name` and `externalIdentifier`
629
+ */
630
+ publicId: string;
631
+ name: string;
632
+ externalIdentifier: string | null;
633
+ /**
634
+ * The content definition mnemonic id
635
+ */
636
+ definition: string;
637
+ /**
638
+ * The content repository mnemonic id
639
+ */
640
+ repository: string;
641
+ /**
642
+ * null for a content only in stage
643
+ */
644
+ live: TimelineVersion | null;
645
+ /**
646
+ * null for a content whose staged version is the live one
647
+ */
648
+ pending: TimelineVersion | null;
649
+ };
650
+ /**
651
+ * This type represent, per value, how many of the filtered contents have it. A content with two versions
652
+ * counts once per value either has
653
+ */
654
+ export type TimelineFacets = {
655
+ definitions: {
656
+ [mnemonicId: string]: number;
657
+ };
658
+ repositories: {
659
+ [mnemonicId: string]: number;
660
+ };
661
+ channels: {
662
+ [channel: string]: number;
663
+ };
664
+ tags: {
665
+ [tag: string]: number;
666
+ };
667
+ locales: {
668
+ [locale: string]: number;
669
+ };
670
+ };
671
+ /**
672
+ * This type represent the response of a list timeline API request
673
+ */
674
+ export type ListTimelineResponse = {
675
+ items: TimelineItem[];
676
+ total: number;
677
+ /**
678
+ * The contents with neither date, whether `undated` excludes them or not
679
+ */
680
+ undated: number;
681
+ /**
682
+ * Only when asked for
683
+ */
684
+ facets?: TimelineFacets;
685
+ };
686
+ /**
687
+ * This type represent the size of a timeline summary's buckets. A week starts on Monday
688
+ */
689
+ export type TimelineBucket = "day" | "week" | "month";
690
+ /**
691
+ * This type represent what a timeline summary counts: `live`, what delivery serves, or `afterRelease`,
692
+ * what it would serve were the staged versions promoted
693
+ */
694
+ export type TimelineState = "live" | "afterRelease";
695
+ /**
696
+ * This type represent the data needed to make a get timeline summary API request
697
+ */
698
+ export type GetTimelineSummaryRequest = TimelineFilters & {
699
+ bucket: TimelineBucket;
700
+ /**
701
+ * An IANA time zone, `UTC` by default: buckets start at its midnights
702
+ */
703
+ timeZone?: string;
704
+ /**
705
+ * `live` by default
706
+ */
707
+ state?: TimelineState;
708
+ };
709
+ /**
710
+ * This type represent the counts of one bucket of a timeline summary
711
+ */
712
+ export type TimelineBucketCount = {
713
+ /**
714
+ * The bucket's first day in the time zone, as `YYYY-MM-DD`
715
+ */
716
+ date: string;
717
+ /**
718
+ * The bucket's start, as an ISO 8601 string in UTC
719
+ */
720
+ from: string;
721
+ /**
722
+ * The bucket's end, as an ISO 8601 string in UTC
723
+ */
724
+ to: string;
725
+ /**
726
+ * The contents online at some point of the bucket
727
+ */
728
+ online: number;
729
+ /**
730
+ * The contents whose online date falls within the bucket
731
+ */
732
+ comingOnline: number;
733
+ /**
734
+ * The contents whose offline date falls within the bucket
735
+ */
736
+ goingOffline: number;
737
+ };
738
+ /**
739
+ * This type represent the response of a get timeline summary API request: one entry per bucket, from the
740
+ * one holding `from` to the one holding `to`
741
+ */
742
+ export type GetTimelineSummaryResponse = TimelineBucketCount[];
743
+ /**
744
+ * Thin enum represent the error types of the timeline API requests. Each is the `type` of a
745
+ * `RequestError`, whose `details` is a [[TimelineError]]
746
+ */
747
+ export declare enum TimelineErrorTypes {
748
+ /**
749
+ * `to` before `from`, a range over 400 days, or an unknown time zone
750
+ */
751
+ invalidTimelineQuery = "InvalidTimelineQuery",
752
+ /**
753
+ * The query took over 4 seconds and was stopped: narrow the range or the filters
754
+ */
755
+ timelineTooSlow = "TimelineTooSlow"
756
+ }
757
+ /**
758
+ * This type represent the `details` of a `RequestError` whose `type` is one of [[TimelineErrorTypes]]
759
+ */
760
+ export type TimelineError = {
761
+ type: TimelineErrorTypes;
762
+ message: string;
763
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateFilterOperator = void 0;
3
+ exports.TimelineErrorTypes = exports.ConditionOperators = exports.LogicalOperators = exports.DateFilterOperator = void 0;
4
4
  /**
5
5
  * This enum represent the comparison operators available to a release item date filter
6
6
  */
@@ -9,3 +9,41 @@ var DateFilterOperator;
9
9
  DateFilterOperator["lte"] = "lte";
10
10
  DateFilterOperator["gte"] = "gte";
11
11
  })(DateFilterOperator || (exports.DateFilterOperator = DateFilterOperator = {}));
12
+ /**
13
+ * This enum represent how the items of [[PropFilters]] combine
14
+ */
15
+ var LogicalOperators;
16
+ (function (LogicalOperators) {
17
+ LogicalOperators["AND"] = "AND";
18
+ LogicalOperators["OR"] = "OR";
19
+ })(LogicalOperators || (exports.LogicalOperators = LogicalOperators = {}));
20
+ /**
21
+ * This enum represent how a [[PropFilterItem]] compares an indexed field with its value. The `_IC`
22
+ * variants ignore case
23
+ */
24
+ var ConditionOperators;
25
+ (function (ConditionOperators) {
26
+ ConditionOperators["CONTAINS"] = "CONTAINS";
27
+ ConditionOperators["CONTAINS_IC"] = "CONTAINS_IC";
28
+ ConditionOperators["EQUALS"] = "EQUALS";
29
+ ConditionOperators["EQUALS_IC"] = "EQUALS_IC";
30
+ ConditionOperators["IN"] = "IN";
31
+ ConditionOperators["IN_IC"] = "IN_IC";
32
+ ConditionOperators["STARTS_WITH"] = "STARTS_WITH";
33
+ ConditionOperators["STARTS_WITH_IC"] = "STARTS_WITH_IC";
34
+ })(ConditionOperators || (exports.ConditionOperators = ConditionOperators = {}));
35
+ /**
36
+ * Thin enum represent the error types of the timeline API requests. Each is the `type` of a
37
+ * `RequestError`, whose `details` is a [[TimelineError]]
38
+ */
39
+ var TimelineErrorTypes;
40
+ (function (TimelineErrorTypes) {
41
+ /**
42
+ * `to` before `from`, a range over 400 days, or an unknown time zone
43
+ */
44
+ TimelineErrorTypes["invalidTimelineQuery"] = "InvalidTimelineQuery";
45
+ /**
46
+ * The query took over 4 seconds and was stopped: narrow the range or the filters
47
+ */
48
+ TimelineErrorTypes["timelineTooSlow"] = "TimelineTooSlow";
49
+ })(TimelineErrorTypes || (exports.TimelineErrorTypes = TimelineErrorTypes = {}));
@@ -1180,6 +1180,12 @@ export type GetContentHistoryEntryResponse = ContentHistoryEntry & {
1180
1180
  translations: { locale: string; translations: FieldTranslation[] }[];
1181
1181
  restorable: boolean;
1182
1182
  violations: RestoreViolations;
1183
+ /**
1184
+ * Values of fields removed from the definition by hand since, `path` in the key format of translation
1185
+ * entries. They are left out of `payload` and `translations`, as a save leaves them out, so they do not
1186
+ * keep the version from being restored
1187
+ */
1188
+ dropped: { path: string }[];
1183
1189
  };
1184
1190
 
1185
1191
  /**
@@ -1,4 +1,4 @@
1
- import { ContentId, LocalizationSettings } from "./Content";
1
+ import { ContentId, LocalizationSettings, SortDirection } from "./Content";
2
2
  import { AuthorResponse } from "./Author";
3
3
  import { ContentRepositoryId } from "./ContentRepository";
4
4
  import { ContentTranslationStatus } from "./ContentTranslation";
@@ -477,3 +477,325 @@ export type ListReleaseItemsV2Response = PagedListResponse<ReleaseItemGroup> & {
477
477
  * This type represent the response of a get published content API request
478
478
  */
479
479
  export type GetPublishedContentResponse = PublishedContentResponse | undefined;
480
+
481
+ /**
482
+ * This enum represent how the items of [[PropFilters]] combine
483
+ */
484
+ export enum LogicalOperators {
485
+ AND = "AND",
486
+ OR = "OR",
487
+ }
488
+
489
+ /**
490
+ * This enum represent how a [[PropFilterItem]] compares an indexed field with its value. The `_IC`
491
+ * variants ignore case
492
+ */
493
+ export enum ConditionOperators {
494
+ CONTAINS = "CONTAINS",
495
+ CONTAINS_IC = "CONTAINS_IC",
496
+ EQUALS = "EQUALS",
497
+ EQUALS_IC = "EQUALS_IC",
498
+ IN = "IN",
499
+ IN_IC = "IN_IC",
500
+ STARTS_WITH = "STARTS_WITH",
501
+ STARTS_WITH_IC = "STARTS_WITH_IC",
502
+ }
503
+
504
+ /**
505
+ * This type represent one condition over an indexed field of a published content, as the delivery API
506
+ * takes it
507
+ */
508
+ export type PropFilterItem = {
509
+ field: string;
510
+ operator: ConditionOperators;
511
+ /**
512
+ * An array for [[ConditionOperators.IN]] and [[ConditionOperators.IN_IC]]
513
+ */
514
+ value: string | string[];
515
+ };
516
+
517
+ /**
518
+ * This type represent the delivery API's property filters, over the indexed fields of a published content
519
+ */
520
+ export type PropFilters = {
521
+ condition: LogicalOperators;
522
+ /**
523
+ * From 1 to 10
524
+ */
525
+ items: PropFilterItem[];
526
+ };
527
+
528
+ /**
529
+ * This type represent which date of a content's online window has to fall within a timeline's range:
530
+ * `overlap`, online at some point of it, `starts`, its online date, or `ends`, its offline date
531
+ */
532
+ export type TimelineMatch = "overlap" | "starts" | "ends";
533
+
534
+ /**
535
+ * This type represent the range and filters of the timeline API requests. Every filter given applies,
536
+ * together, and a list filter matches a content that has one of its values
537
+ */
538
+ export type TimelineFilters = {
539
+ /**
540
+ * The range's start, as an ISO 8601 string. With `from` equal to `to`, what is online at that instant
541
+ */
542
+ from: string;
543
+ /**
544
+ * The range's end, as an ISO 8601 string, not before `from` and at most 400 days after it
545
+ */
546
+ to: string;
547
+ /**
548
+ * `overlap` by default
549
+ */
550
+ match?: TimelineMatch;
551
+ /**
552
+ * Whether the contents with neither date, online all the time, are left out, by default, or included
553
+ */
554
+ undated?: "exclude" | "include";
555
+ /**
556
+ * From 2 to 100 characters, matched anywhere in the name, the public id or the external identifier,
557
+ * ignoring case
558
+ */
559
+ search?: string;
560
+ /**
561
+ * Up to 500
562
+ */
563
+ publicIds?: string[];
564
+ /**
565
+ * Up to 500
566
+ */
567
+ contentIds?: ContentId[];
568
+ /**
569
+ * Content definition mnemonic ids, up to 100
570
+ */
571
+ definitions?: string[];
572
+ /**
573
+ * Content repository mnemonic ids, up to 100
574
+ */
575
+ repositories?: string[];
576
+ /**
577
+ * Up to 100
578
+ */
579
+ channels?: string[];
580
+ /**
581
+ * Up to 100
582
+ */
583
+ tags?: string[];
584
+ /**
585
+ * Up to 100
586
+ */
587
+ locales?: string[];
588
+ propFilters?: PropFilters;
589
+ };
590
+
591
+ /**
592
+ * This type represent a version of a content on the timeline: `live`, the one delivery serves, or
593
+ * `pending`, the one published to stage and not promoted yet
594
+ */
595
+ export type TimelineVersionKind = "live" | "pending";
596
+
597
+ /**
598
+ * This type represent what the timeline can be sorted by. With both versions, a content sorts by the
599
+ * earlier online date, the later offline date and the latest publish of the two
600
+ */
601
+ export type TimelineSort =
602
+ | "onlineDate"
603
+ | "offlineDate"
604
+ | "name"
605
+ | "publicId"
606
+ | "definition"
607
+ | "lastPublished";
608
+
609
+ /**
610
+ * This type represent the data needed to make a list timeline API request
611
+ */
612
+ export type ListTimelineRequest = TimelineFilters & {
613
+ /**
614
+ * Both by default
615
+ */
616
+ versions?: TimelineVersionKind[];
617
+ /**
618
+ * `onlineDate` by default
619
+ */
620
+ sort?: TimelineSort;
621
+ /**
622
+ * Ascending by default
623
+ */
624
+ order?: SortDirection;
625
+ /**
626
+ * true counts the filtered contents per definition, repository, channel, tag and locale
627
+ */
628
+ facets?: boolean;
629
+ /**
630
+ * 0 by default
631
+ */
632
+ skip?: number;
633
+ /**
634
+ * 50 by default, at most 200, counted in contents
635
+ */
636
+ take?: number;
637
+ };
638
+
639
+ /**
640
+ * This type represent one version of a content on the timeline, as its default locale has it
641
+ */
642
+ export type TimelineVersion = {
643
+ version: number;
644
+ /**
645
+ * As an ISO 8601 string, null without one
646
+ */
647
+ onlineDate: string | null;
648
+ /**
649
+ * As an ISO 8601 string, null without one
650
+ */
651
+ offlineDate: string | null;
652
+ /**
653
+ * When the version was published to stage, as an ISO 8601 string
654
+ */
655
+ publishedDate: string;
656
+ channels: string[];
657
+ tags: string[];
658
+ /**
659
+ * Every locale of the version
660
+ */
661
+ locales: string[];
662
+ };
663
+
664
+ /**
665
+ * This type represent a content on the timeline, with each of its versions asked for
666
+ */
667
+ export type TimelineItem = {
668
+ contentId: ContentId;
669
+ /**
670
+ * The pending version's when there is one, as `name` and `externalIdentifier`
671
+ */
672
+ publicId: string;
673
+ name: string;
674
+ externalIdentifier: string | null;
675
+ /**
676
+ * The content definition mnemonic id
677
+ */
678
+ definition: string;
679
+ /**
680
+ * The content repository mnemonic id
681
+ */
682
+ repository: string;
683
+ /**
684
+ * null for a content only in stage
685
+ */
686
+ live: TimelineVersion | null;
687
+ /**
688
+ * null for a content whose staged version is the live one
689
+ */
690
+ pending: TimelineVersion | null;
691
+ };
692
+
693
+ /**
694
+ * This type represent, per value, how many of the filtered contents have it. A content with two versions
695
+ * counts once per value either has
696
+ */
697
+ export type TimelineFacets = {
698
+ definitions: { [mnemonicId: string]: number };
699
+ repositories: { [mnemonicId: string]: number };
700
+ channels: { [channel: string]: number };
701
+ tags: { [tag: string]: number };
702
+ locales: { [locale: string]: number };
703
+ };
704
+
705
+ /**
706
+ * This type represent the response of a list timeline API request
707
+ */
708
+ export type ListTimelineResponse = {
709
+ items: TimelineItem[];
710
+ total: number;
711
+ /**
712
+ * The contents with neither date, whether `undated` excludes them or not
713
+ */
714
+ undated: number;
715
+ /**
716
+ * Only when asked for
717
+ */
718
+ facets?: TimelineFacets;
719
+ };
720
+
721
+ /**
722
+ * This type represent the size of a timeline summary's buckets. A week starts on Monday
723
+ */
724
+ export type TimelineBucket = "day" | "week" | "month";
725
+
726
+ /**
727
+ * This type represent what a timeline summary counts: `live`, what delivery serves, or `afterRelease`,
728
+ * what it would serve were the staged versions promoted
729
+ */
730
+ export type TimelineState = "live" | "afterRelease";
731
+
732
+ /**
733
+ * This type represent the data needed to make a get timeline summary API request
734
+ */
735
+ export type GetTimelineSummaryRequest = TimelineFilters & {
736
+ bucket: TimelineBucket;
737
+ /**
738
+ * An IANA time zone, `UTC` by default: buckets start at its midnights
739
+ */
740
+ timeZone?: string;
741
+ /**
742
+ * `live` by default
743
+ */
744
+ state?: TimelineState;
745
+ };
746
+
747
+ /**
748
+ * This type represent the counts of one bucket of a timeline summary
749
+ */
750
+ export type TimelineBucketCount = {
751
+ /**
752
+ * The bucket's first day in the time zone, as `YYYY-MM-DD`
753
+ */
754
+ date: string;
755
+ /**
756
+ * The bucket's start, as an ISO 8601 string in UTC
757
+ */
758
+ from: string;
759
+ /**
760
+ * The bucket's end, as an ISO 8601 string in UTC
761
+ */
762
+ to: string;
763
+ /**
764
+ * The contents online at some point of the bucket
765
+ */
766
+ online: number;
767
+ /**
768
+ * The contents whose online date falls within the bucket
769
+ */
770
+ comingOnline: number;
771
+ /**
772
+ * The contents whose offline date falls within the bucket
773
+ */
774
+ goingOffline: number;
775
+ };
776
+
777
+ /**
778
+ * This type represent the response of a get timeline summary API request: one entry per bucket, from the
779
+ * one holding `from` to the one holding `to`
780
+ */
781
+ export type GetTimelineSummaryResponse = TimelineBucketCount[];
782
+
783
+ /**
784
+ * Thin enum represent the error types of the timeline API requests. Each is the `type` of a
785
+ * `RequestError`, whose `details` is a [[TimelineError]]
786
+ */
787
+ export enum TimelineErrorTypes {
788
+ /**
789
+ * `to` before `from`, a range over 400 days, or an unknown time zone
790
+ */
791
+ invalidTimelineQuery = "InvalidTimelineQuery",
792
+ /**
793
+ * The query took over 4 seconds and was stopped: narrow the range or the filters
794
+ */
795
+ timelineTooSlow = "TimelineTooSlow",
796
+ }
797
+
798
+ /**
799
+ * This type represent the `details` of a `RequestError` whose `type` is one of [[TimelineErrorTypes]]
800
+ */
801
+ export type TimelineError = { type: TimelineErrorTypes; message: string };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentchef/contentchef-types",
3
- "version": "11.2.0-alpha.2",
3
+ "version": "11.2.0-alpha.4",
4
4
  "description": "ContentChef types",
5
5
  "author": "PierpaoloIannone <piannone@byte-code.com>",
6
6
  "homepage": "https://github.com/ContentChef/contentchef-management-js-client#readme",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "typescript": "^5.9.3"
36
36
  },
37
- "gitHead": "d5eafaf4b1b7a4d7add4d6c1153e3391e713c712"
37
+ "gitHead": "4768ad3fee441d17e997f7461a28ec12dbe19b5e"
38
38
  }