@datocms/cma-client 6.4.0 → 6.8.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 (37) hide show
  1. package/dist/cjs/generated/Client.js +1 -1
  2. package/dist/cjs/generated/resources/Field.js +16 -12
  3. package/dist/cjs/generated/resources/Field.js.map +1 -1
  4. package/dist/cjs/generated/resources/Fieldset.js +8 -6
  5. package/dist/cjs/generated/resources/Fieldset.js.map +1 -1
  6. package/dist/cjs/generated/resources/Item.js +4 -4
  7. package/dist/cjs/generated/resources/ItemType.js +12 -9
  8. package/dist/cjs/generated/resources/ItemType.js.map +1 -1
  9. package/dist/esm/generated/ApiTypes.d.ts +205 -3
  10. package/dist/esm/generated/Client.js +1 -1
  11. package/dist/esm/generated/RawApiTypes.d.ts +208 -2
  12. package/dist/esm/generated/resources/Field.d.ts +8 -8
  13. package/dist/esm/generated/resources/Field.js +16 -12
  14. package/dist/esm/generated/resources/Field.js.map +1 -1
  15. package/dist/esm/generated/resources/Fieldset.d.ts +4 -4
  16. package/dist/esm/generated/resources/Fieldset.js +8 -6
  17. package/dist/esm/generated/resources/Fieldset.js.map +1 -1
  18. package/dist/esm/generated/resources/Item.d.ts +4 -4
  19. package/dist/esm/generated/resources/Item.js +4 -4
  20. package/dist/esm/generated/resources/ItemType.d.ts +6 -6
  21. package/dist/esm/generated/resources/ItemType.js +12 -9
  22. package/dist/esm/generated/resources/ItemType.js.map +1 -1
  23. package/dist/types/generated/ApiTypes.d.ts +205 -3
  24. package/dist/types/generated/RawApiTypes.d.ts +208 -2
  25. package/dist/types/generated/resources/Field.d.ts +8 -8
  26. package/dist/types/generated/resources/Fieldset.d.ts +4 -4
  27. package/dist/types/generated/resources/Item.d.ts +4 -4
  28. package/dist/types/generated/resources/ItemType.d.ts +6 -6
  29. package/package.json +1 -1
  30. package/resources.json +11 -2
  31. package/src/generated/ApiTypes.ts +205 -3
  32. package/src/generated/Client.ts +1 -1
  33. package/src/generated/RawApiTypes.ts +208 -2
  34. package/src/generated/resources/Field.ts +38 -13
  35. package/src/generated/resources/Fieldset.ts +17 -5
  36. package/src/generated/resources/Item.ts +4 -4
  37. package/src/generated/resources/ItemType.ts +27 -11
@@ -297,6 +297,13 @@ export type AccountIdentity = string;
297
297
  * via the `definition` "type".
298
298
  */
299
299
  export type AccountType = 'account';
300
+ /**
301
+ * Attributes and relationships to return for each `account` that this endpoint returns.
302
+ *
303
+ * This interface was referenced by `Account`'s JSON-Schema
304
+ * via the `definition` "sparse_fieldset".
305
+ */
306
+ export type AccountSparseFieldset = string;
300
307
  /**
301
308
  * ID of organization
302
309
  *
@@ -312,6 +319,13 @@ export type OrganizationIdentity = string;
312
319
  * via the `definition` "type".
313
320
  */
314
321
  export type OrganizationType = 'organization';
322
+ /**
323
+ * Attributes and relationships to return for each `organization` that this endpoint returns.
324
+ *
325
+ * This interface was referenced by `Organization`'s JSON-Schema
326
+ * via the `definition` "sparse_fieldset".
327
+ */
328
+ export type OrganizationSparseFieldset = string;
315
329
  /**
316
330
  * This interface was referenced by `User`'s JSON-Schema
317
331
  * via the `me.hrefSchema` link.
@@ -602,6 +616,13 @@ export type FieldsetIdentity = string;
602
616
  * via the `definition` "type".
603
617
  */
604
618
  export type WorkflowType = 'workflow';
619
+ /**
620
+ * Attributes and relationships to return for each `item_type` that this endpoint returns.
621
+ *
622
+ * This interface was referenced by `ItemType`'s JSON-Schema
623
+ * via the `definition` "sparse_fieldset".
624
+ */
625
+ export type ItemTypeSparseFieldset = string;
605
626
  /**
606
627
  * This interface was referenced by `ItemType`'s JSON-Schema
607
628
  * via the `create.hrefSchema` link.
@@ -626,6 +647,42 @@ export type ItemTypeCreateHrefSchema = {
626
647
  * via the `instances.targetSchema` link.
627
648
  */
628
649
  export type ItemTypeInstancesTargetSchema = ItemType[];
650
+ /**
651
+ * This interface was referenced by `ItemType`'s JSON-Schema
652
+ * via the `instances.hrefSchema` link.
653
+ */
654
+ export type ItemTypeInstancesHrefSchema = {
655
+ /**
656
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
657
+ */
658
+ fields?: {
659
+ item_type?: ItemTypeSparseFieldset;
660
+ [k: string]: unknown;
661
+ };
662
+ [k: string]: unknown;
663
+ };
664
+ /**
665
+ * This interface was referenced by `ItemType`'s JSON-Schema
666
+ * via the `self.hrefSchema` link.
667
+ */
668
+ export type ItemTypeSelfHrefSchema = {
669
+ /**
670
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
671
+ */
672
+ fields?: {
673
+ item_type?: ItemTypeSparseFieldset;
674
+ field?: FieldSparseFieldset;
675
+ [k: string]: unknown;
676
+ };
677
+ [k: string]: unknown;
678
+ };
679
+ /**
680
+ * Attributes and relationships to return for each `field` that this endpoint returns.
681
+ *
682
+ * This interface was referenced by `Field`'s JSON-Schema
683
+ * via the `definition` "sparse_fieldset".
684
+ */
685
+ export type FieldSparseFieldset = string;
629
686
  /**
630
687
  * This interface was referenced by `ItemType`'s JSON-Schema
631
688
  * via the `destroy.hrefSchema` link.
@@ -642,6 +699,20 @@ export type ItemTypeDestroyHrefSchema = {
642
699
  * via the `referencing.targetSchema` link.
643
700
  */
644
701
  export type ItemTypeReferencingTargetSchema = ItemType[];
702
+ /**
703
+ * This interface was referenced by `ItemType`'s JSON-Schema
704
+ * via the `referencing.hrefSchema` link.
705
+ */
706
+ export type ItemTypeReferencingHrefSchema = {
707
+ /**
708
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
709
+ */
710
+ fields?: {
711
+ item_type?: ItemTypeSparseFieldset;
712
+ [k: string]: unknown;
713
+ };
714
+ [k: string]: unknown;
715
+ };
645
716
  /**
646
717
  * This interface was referenced by `ItemType`'s JSON-Schema
647
718
  * via the `reorder_fields_and_fieldsets.schema` link.
@@ -670,21 +741,112 @@ export type ItemTypeReorderFieldsAndFieldsetsSchema = (
670
741
  * via the `instances.targetSchema` link.
671
742
  */
672
743
  export type FieldInstancesTargetSchema = Field[];
744
+ /**
745
+ * This interface was referenced by `Field`'s JSON-Schema
746
+ * via the `instances.hrefSchema` link.
747
+ */
748
+ export type FieldInstancesHrefSchema = {
749
+ /**
750
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
751
+ */
752
+ fields?: {
753
+ field?: FieldSparseFieldset;
754
+ [k: string]: unknown;
755
+ };
756
+ [k: string]: unknown;
757
+ };
673
758
  /**
674
759
  * This interface was referenced by `Field`'s JSON-Schema
675
760
  * via the `referencing.targetSchema` link.
676
761
  */
677
762
  export type FieldReferencingTargetSchema = Field[];
763
+ /**
764
+ * This interface was referenced by `Field`'s JSON-Schema
765
+ * via the `referencing.hrefSchema` link.
766
+ */
767
+ export type FieldReferencingHrefSchema = {
768
+ /**
769
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
770
+ */
771
+ fields?: {
772
+ field?: FieldSparseFieldset;
773
+ [k: string]: unknown;
774
+ };
775
+ [k: string]: unknown;
776
+ };
678
777
  /**
679
778
  * This interface was referenced by `Field`'s JSON-Schema
680
779
  * via the `related.targetSchema` link.
681
780
  */
682
781
  export type FieldRelatedTargetSchema = Field[];
782
+ /**
783
+ * This interface was referenced by `Field`'s JSON-Schema
784
+ * via the `related.hrefSchema` link.
785
+ */
786
+ export type FieldRelatedHrefSchema = {
787
+ /**
788
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
789
+ */
790
+ fields?: {
791
+ field?: FieldSparseFieldset;
792
+ [k: string]: unknown;
793
+ };
794
+ [k: string]: unknown;
795
+ };
796
+ /**
797
+ * This interface was referenced by `Field`'s JSON-Schema
798
+ * via the `self.hrefSchema` link.
799
+ */
800
+ export type FieldSelfHrefSchema = {
801
+ /**
802
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
803
+ */
804
+ fields?: {
805
+ field?: FieldSparseFieldset;
806
+ [k: string]: unknown;
807
+ };
808
+ [k: string]: unknown;
809
+ };
810
+ /**
811
+ * Attributes and relationships to return for each `fieldset` that this endpoint returns.
812
+ *
813
+ * This interface was referenced by `Fieldset`'s JSON-Schema
814
+ * via the `definition` "sparse_fieldset".
815
+ */
816
+ export type FieldsetSparseFieldset = string;
683
817
  /**
684
818
  * This interface was referenced by `Fieldset`'s JSON-Schema
685
819
  * via the `instances.targetSchema` link.
686
820
  */
687
821
  export type FieldsetInstancesTargetSchema = Fieldset[];
822
+ /**
823
+ * This interface was referenced by `Fieldset`'s JSON-Schema
824
+ * via the `instances.hrefSchema` link.
825
+ */
826
+ export type FieldsetInstancesHrefSchema = {
827
+ /**
828
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
829
+ */
830
+ fields?: {
831
+ fieldset?: FieldsetSparseFieldset;
832
+ [k: string]: unknown;
833
+ };
834
+ [k: string]: unknown;
835
+ };
836
+ /**
837
+ * This interface was referenced by `Fieldset`'s JSON-Schema
838
+ * via the `self.hrefSchema` link.
839
+ */
840
+ export type FieldsetSelfHrefSchema = {
841
+ /**
842
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
843
+ */
844
+ fields?: {
845
+ fieldset?: FieldsetSparseFieldset;
846
+ [k: string]: unknown;
847
+ };
848
+ [k: string]: unknown;
849
+ };
688
850
  /**
689
851
  * This interface was referenced by `ItemType`'s JSON-Schema
690
852
  * via the `reorder_fields_and_fieldsets.jobSchema` link.
@@ -953,6 +1115,13 @@ export type SearchIndexEventInstancesHrefSchema = {
953
1115
  | 'event_type_desc';
954
1116
  [k: string]: unknown;
955
1117
  };
1118
+ /**
1119
+ * Attributes and relationships to return for each `item` that this endpoint returns.
1120
+ *
1121
+ * This interface was referenced by `Item`'s JSON-Schema
1122
+ * via the `definition` "sparse_fieldset".
1123
+ */
1124
+ export type ItemSparseFieldset = string;
956
1125
  /**
957
1126
  * This interface was referenced by `Item`'s JSON-Schema
958
1127
  * via the `instances.targetSchema` link.
@@ -2046,15 +2215,35 @@ export type SiteIdentity = string;
2046
2215
  * via the `definition` "type".
2047
2216
  */
2048
2217
  export type SiteType = 'site';
2218
+ /**
2219
+ * Attributes and relationships to return for each `site` that this endpoint returns.
2220
+ *
2221
+ * This interface was referenced by `Site`'s JSON-Schema
2222
+ * via the `definition` "sparse_fieldset".
2223
+ */
2224
+ export type SiteSparseFieldset = string;
2049
2225
  /**
2050
2226
  * This interface was referenced by `Site`'s JSON-Schema
2051
2227
  * via the `self.hrefSchema` link.
2052
2228
  */
2053
2229
  export type SiteSelfHrefSchema = {
2054
2230
  /**
2055
- * Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `item_types`, `item_types.fields`, `item_types.fieldsets`, `item_types.singleton_item`, `account`.
2231
+ * Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `item_types`, `item_types.fields`, `item_types.fieldsets`, `item_types.singleton_item`, `account`, `owner`.
2056
2232
  */
2057
2233
  include?: string;
2234
+ /**
2235
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
2236
+ */
2237
+ fields?: {
2238
+ site?: SiteSparseFieldset;
2239
+ item_type?: ItemTypeSparseFieldset;
2240
+ field?: FieldSparseFieldset;
2241
+ fieldset?: FieldsetSparseFieldset;
2242
+ item?: ItemSparseFieldset;
2243
+ account?: AccountSparseFieldset;
2244
+ organization?: OrganizationSparseFieldset;
2245
+ [k: string]: unknown;
2246
+ };
2058
2247
  [k: string]: unknown;
2059
2248
  };
2060
2249
  /**
@@ -7232,7 +7421,7 @@ export type Plugin = {
7232
7421
  */
7233
7422
  url: string;
7234
7423
  /**
7235
- * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. It returns `null` if the credentials you are using cannot edit the schema of the project.
7424
+ * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. Collaborators always receive it. API tokens and OAuth applications receive it only if they can edit the schema of the project, otherwise it returns `null`.
7236
7425
  */
7237
7426
  parameters: null | {
7238
7427
  [k: string]: unknown;
@@ -7337,7 +7526,7 @@ export type PluginAttributes = {
7337
7526
  */
7338
7527
  url: string;
7339
7528
  /**
7340
- * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. It returns `null` if the credentials you are using cannot edit the schema of the project.
7529
+ * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. Collaborators always receive it. API tokens and OAuth applications receive it only if they can edit the schema of the project, otherwise it returns `null`.
7341
7530
  */
7342
7531
  parameters: null | {
7343
7532
  [k: string]: unknown;
@@ -7955,6 +8144,12 @@ export type ItemValidateExistingSchema<
7955
8144
  | UserData
7956
8145
  | SsoUserData
7957
8146
  | OrganizationData;
8147
+ /**
8148
+ * Accepted so you can validate the same payload you will send to update the record, but ignored
8149
+ */
8150
+ meta?: {
8151
+ [k: string]: unknown;
8152
+ };
7958
8153
  __itemTypeId?: D['itemTypeId'];
7959
8154
  } & ToItemAttributesInRequest<D>;
7960
8155
  /**
@@ -7964,6 +8159,7 @@ export type ItemValidateExistingSchema<
7964
8159
  export type ItemValidateNewSchema<
7965
8160
  D extends ItemTypeDefinition = ItemTypeDefinition,
7966
8161
  > = {
8162
+ id?: ItemIdentity;
7967
8163
  type?: ItemType1;
7968
8164
  item_type: ItemTypeData<D>;
7969
8165
  creator?:
@@ -7972,6 +8168,12 @@ export type ItemValidateNewSchema<
7972
8168
  | UserData
7973
8169
  | SsoUserData
7974
8170
  | OrganizationData;
8171
+ /**
8172
+ * Accepted so you can validate the same payload you will send to create the record, but ignored
8173
+ */
8174
+ meta?: {
8175
+ [k: string]: unknown;
8176
+ };
7975
8177
  __itemTypeId?: D['itemTypeId'];
7976
8178
  } & ToItemAttributesInRequest<D>;
7977
8179
  /**
@@ -151,7 +151,7 @@ export class Client {
151
151
  ...this.config,
152
152
  ...options,
153
153
  logFn: this.config.logFn || console.log,
154
- userAgent: '@datocms/cma-client v6.4.0',
154
+ userAgent: '@datocms/cma-client v6.8.0',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {
@@ -264,6 +264,13 @@ export type AccountType = 'account';
264
264
  * via the `definition` "id".
265
265
  */
266
266
  export type AccountIdentity = string;
267
+ /**
268
+ * Attributes and relationships to return for each `account` that this endpoint returns.
269
+ *
270
+ * This interface was referenced by `Account`'s JSON-Schema
271
+ * via the `definition` "sparse_fieldset".
272
+ */
273
+ export type AccountSparseFieldset = string;
267
274
  /**
268
275
  * This interface was referenced by `Organization`'s JSON-Schema
269
276
  * via the `definition` "type".
@@ -279,6 +286,13 @@ export type OrganizationType = 'organization';
279
286
  * via the `definition` "id".
280
287
  */
281
288
  export type OrganizationIdentity = string;
289
+ /**
290
+ * Attributes and relationships to return for each `organization` that this endpoint returns.
291
+ *
292
+ * This interface was referenced by `Organization`'s JSON-Schema
293
+ * via the `definition` "sparse_fieldset".
294
+ */
295
+ export type OrganizationSparseFieldset = string;
282
296
  /**
283
297
  * This interface was referenced by `User`'s JSON-Schema
284
298
  * via the `me.hrefSchema` link.
@@ -495,6 +509,13 @@ export type FieldsetIdentity = string;
495
509
  * via the `definition` "type".
496
510
  */
497
511
  export type WorkflowType = 'workflow';
512
+ /**
513
+ * Attributes and relationships to return for each `item_type` that this endpoint returns.
514
+ *
515
+ * This interface was referenced by `ItemType`'s JSON-Schema
516
+ * via the `definition` "sparse_fieldset".
517
+ */
518
+ export type ItemTypeSparseFieldset = string;
498
519
  /**
499
520
  * This interface was referenced by `ItemType`'s JSON-Schema
500
521
  * via the `create.hrefSchema` link.
@@ -514,6 +535,42 @@ export type ItemTypeCreateHrefSchema = {
514
535
  schema_menu_item_id?: string;
515
536
  [k: string]: unknown;
516
537
  };
538
+ /**
539
+ * This interface was referenced by `ItemType`'s JSON-Schema
540
+ * via the `instances.hrefSchema` link.
541
+ */
542
+ export type ItemTypeInstancesHrefSchema = {
543
+ /**
544
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
545
+ */
546
+ fields?: {
547
+ item_type?: ItemTypeSparseFieldset;
548
+ [k: string]: unknown;
549
+ };
550
+ [k: string]: unknown;
551
+ };
552
+ /**
553
+ * This interface was referenced by `ItemType`'s JSON-Schema
554
+ * via the `self.hrefSchema` link.
555
+ */
556
+ export type ItemTypeSelfHrefSchema = {
557
+ /**
558
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
559
+ */
560
+ fields?: {
561
+ item_type?: ItemTypeSparseFieldset;
562
+ field?: FieldSparseFieldset;
563
+ [k: string]: unknown;
564
+ };
565
+ [k: string]: unknown;
566
+ };
567
+ /**
568
+ * Attributes and relationships to return for each `field` that this endpoint returns.
569
+ *
570
+ * This interface was referenced by `Field`'s JSON-Schema
571
+ * via the `definition` "sparse_fieldset".
572
+ */
573
+ export type FieldSparseFieldset = string;
517
574
  /**
518
575
  * This interface was referenced by `ItemType`'s JSON-Schema
519
576
  * via the `destroy.hrefSchema` link.
@@ -525,6 +582,111 @@ export type ItemTypeDestroyHrefSchema = {
525
582
  skip_menu_items_deletion?: boolean;
526
583
  [k: string]: unknown;
527
584
  };
585
+ /**
586
+ * This interface was referenced by `ItemType`'s JSON-Schema
587
+ * via the `referencing.hrefSchema` link.
588
+ */
589
+ export type ItemTypeReferencingHrefSchema = {
590
+ /**
591
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
592
+ */
593
+ fields?: {
594
+ item_type?: ItemTypeSparseFieldset;
595
+ [k: string]: unknown;
596
+ };
597
+ [k: string]: unknown;
598
+ };
599
+ /**
600
+ * This interface was referenced by `Field`'s JSON-Schema
601
+ * via the `instances.hrefSchema` link.
602
+ */
603
+ export type FieldInstancesHrefSchema = {
604
+ /**
605
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
606
+ */
607
+ fields?: {
608
+ field?: FieldSparseFieldset;
609
+ [k: string]: unknown;
610
+ };
611
+ [k: string]: unknown;
612
+ };
613
+ /**
614
+ * This interface was referenced by `Field`'s JSON-Schema
615
+ * via the `referencing.hrefSchema` link.
616
+ */
617
+ export type FieldReferencingHrefSchema = {
618
+ /**
619
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
620
+ */
621
+ fields?: {
622
+ field?: FieldSparseFieldset;
623
+ [k: string]: unknown;
624
+ };
625
+ [k: string]: unknown;
626
+ };
627
+ /**
628
+ * This interface was referenced by `Field`'s JSON-Schema
629
+ * via the `related.hrefSchema` link.
630
+ */
631
+ export type FieldRelatedHrefSchema = {
632
+ /**
633
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
634
+ */
635
+ fields?: {
636
+ field?: FieldSparseFieldset;
637
+ [k: string]: unknown;
638
+ };
639
+ [k: string]: unknown;
640
+ };
641
+ /**
642
+ * This interface was referenced by `Field`'s JSON-Schema
643
+ * via the `self.hrefSchema` link.
644
+ */
645
+ export type FieldSelfHrefSchema = {
646
+ /**
647
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
648
+ */
649
+ fields?: {
650
+ field?: FieldSparseFieldset;
651
+ [k: string]: unknown;
652
+ };
653
+ [k: string]: unknown;
654
+ };
655
+ /**
656
+ * Attributes and relationships to return for each `fieldset` that this endpoint returns.
657
+ *
658
+ * This interface was referenced by `Fieldset`'s JSON-Schema
659
+ * via the `definition` "sparse_fieldset".
660
+ */
661
+ export type FieldsetSparseFieldset = string;
662
+ /**
663
+ * This interface was referenced by `Fieldset`'s JSON-Schema
664
+ * via the `instances.hrefSchema` link.
665
+ */
666
+ export type FieldsetInstancesHrefSchema = {
667
+ /**
668
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
669
+ */
670
+ fields?: {
671
+ fieldset?: FieldsetSparseFieldset;
672
+ [k: string]: unknown;
673
+ };
674
+ [k: string]: unknown;
675
+ };
676
+ /**
677
+ * This interface was referenced by `Fieldset`'s JSON-Schema
678
+ * via the `self.hrefSchema` link.
679
+ */
680
+ export type FieldsetSelfHrefSchema = {
681
+ /**
682
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
683
+ */
684
+ fields?: {
685
+ fieldset?: FieldsetSparseFieldset;
686
+ [k: string]: unknown;
687
+ };
688
+ [k: string]: unknown;
689
+ };
528
690
  /**
529
691
  * This interface was referenced by `Session`'s JSON-Schema
530
692
  * via the `definition` "type".
@@ -758,6 +920,13 @@ export type SearchIndexEventInstancesHrefSchema = {
758
920
  | 'event_type_desc';
759
921
  [k: string]: unknown;
760
922
  };
923
+ /**
924
+ * Attributes and relationships to return for each `item` that this endpoint returns.
925
+ *
926
+ * This interface was referenced by `Item`'s JSON-Schema
927
+ * via the `definition` "sparse_fieldset".
928
+ */
929
+ export type ItemSparseFieldset = string;
761
930
  /**
762
931
  * This interface was referenced by `Item`'s JSON-Schema
763
932
  * via the `instances.hrefSchema` link.
@@ -1656,15 +1825,35 @@ export type SiteType = 'site';
1656
1825
  * via the `definition` "id".
1657
1826
  */
1658
1827
  export type SiteIdentity = string;
1828
+ /**
1829
+ * Attributes and relationships to return for each `site` that this endpoint returns.
1830
+ *
1831
+ * This interface was referenced by `Site`'s JSON-Schema
1832
+ * via the `definition` "sparse_fieldset".
1833
+ */
1834
+ export type SiteSparseFieldset = string;
1659
1835
  /**
1660
1836
  * This interface was referenced by `Site`'s JSON-Schema
1661
1837
  * via the `self.hrefSchema` link.
1662
1838
  */
1663
1839
  export type SiteSelfHrefSchema = {
1664
1840
  /**
1665
- * Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `item_types`, `item_types.fields`, `item_types.fieldsets`, `item_types.singleton_item`, `account`.
1841
+ * Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `item_types`, `item_types.fields`, `item_types.fieldsets`, `item_types.singleton_item`, `account`, `owner`.
1666
1842
  */
1667
1843
  include?: string;
1844
+ /**
1845
+ * Sparse fieldsets: for each entity type, the attributes and the relationships to return, separated by commas. Each entity declares its attributes and its relationships in its own schema.
1846
+ */
1847
+ fields?: {
1848
+ site?: SiteSparseFieldset;
1849
+ item_type?: ItemTypeSparseFieldset;
1850
+ field?: FieldSparseFieldset;
1851
+ fieldset?: FieldsetSparseFieldset;
1852
+ item?: ItemSparseFieldset;
1853
+ account?: AccountSparseFieldset;
1854
+ organization?: OrganizationSparseFieldset;
1855
+ [k: string]: unknown;
1856
+ };
1668
1857
  [k: string]: unknown;
1669
1858
  };
1670
1859
  /**
@@ -3603,6 +3792,10 @@ export type AuditLogEventQueryTargetSchema = {
3603
3792
  * If the response request exceeds the response payload limit DatoCMS will set this value in the response. If set, you can use that this value in the subsequent request to get the remaining results
3604
3793
  */
3605
3794
  next_token: null | string;
3795
+ /**
3796
+ * Events are searched from the most recent backwards. When a next_token is returned, this is the ISO 8601 datetime the search has reached so far: all events that occurred after it have already been examined, and the remaining results are older. Null when the search is complete
3797
+ */
3798
+ scanned_until: null | string;
3606
3799
  };
3607
3800
  };
3608
3801
  /**
@@ -6954,7 +7147,7 @@ export type PluginAttributes = {
6954
7147
  */
6955
7148
  url: string;
6956
7149
  /**
6957
- * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. It returns `null` if the credentials you are using cannot edit the schema of the project.
7150
+ * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. Collaborators always receive it. API tokens and OAuth applications receive it only if they can edit the schema of the project, otherwise it returns `null`.
6958
7151
  */
6959
7152
  parameters: null | {
6960
7153
  [k: string]: unknown;
@@ -7637,6 +7830,12 @@ export type ItemValidateExistingSchema<
7637
7830
  * The JSON data associated to the record
7638
7831
  */
7639
7832
  attributes: ToItemAttributesInRequest<D>;
7833
+ /**
7834
+ * Accepted so you can validate the same payload you will send to update the record, but ignored
7835
+ */
7836
+ meta?: {
7837
+ [k: string]: unknown;
7838
+ };
7640
7839
  relationships?: {
7641
7840
  /**
7642
7841
  * The record's model
@@ -7668,10 +7867,17 @@ export type ItemValidateNewSchema<
7668
7867
  > = {
7669
7868
  data: {
7670
7869
  type: ItemType1;
7870
+ id?: ItemIdentity;
7671
7871
  /**
7672
7872
  * The JSON data associated to the record
7673
7873
  */
7674
7874
  attributes: ToItemAttributesInRequest<D>;
7875
+ /**
7876
+ * Accepted so you can validate the same payload you will send to create the record, but ignored
7877
+ */
7878
+ meta?: {
7879
+ [k: string]: unknown;
7880
+ };
7675
7881
  relationships: {
7676
7882
  /**
7677
7883
  * The record's model