@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
@@ -226,6 +226,13 @@ export type AccountType = 'account';
226
226
  * via the `definition` "id".
227
227
  */
228
228
  export type AccountIdentity = string;
229
+ /**
230
+ * Attributes and relationships to return for each `account` that this endpoint returns.
231
+ *
232
+ * This interface was referenced by `Account`'s JSON-Schema
233
+ * via the `definition` "sparse_fieldset".
234
+ */
235
+ export type AccountSparseFieldset = string;
229
236
  /**
230
237
  * This interface was referenced by `Organization`'s JSON-Schema
231
238
  * via the `definition` "type".
@@ -241,6 +248,13 @@ export type OrganizationType = 'organization';
241
248
  * via the `definition` "id".
242
249
  */
243
250
  export type OrganizationIdentity = string;
251
+ /**
252
+ * Attributes and relationships to return for each `organization` that this endpoint returns.
253
+ *
254
+ * This interface was referenced by `Organization`'s JSON-Schema
255
+ * via the `definition` "sparse_fieldset".
256
+ */
257
+ export type OrganizationSparseFieldset = string;
244
258
  /**
245
259
  * This interface was referenced by `User`'s JSON-Schema
246
260
  * via the `me.hrefSchema` link.
@@ -457,6 +471,13 @@ export type FieldsetIdentity = string;
457
471
  * via the `definition` "type".
458
472
  */
459
473
  export type WorkflowType = 'workflow';
474
+ /**
475
+ * Attributes and relationships to return for each `item_type` that this endpoint returns.
476
+ *
477
+ * This interface was referenced by `ItemType`'s JSON-Schema
478
+ * via the `definition` "sparse_fieldset".
479
+ */
480
+ export type ItemTypeSparseFieldset = string;
460
481
  /**
461
482
  * This interface was referenced by `ItemType`'s JSON-Schema
462
483
  * via the `create.hrefSchema` link.
@@ -476,6 +497,42 @@ export type ItemTypeCreateHrefSchema = {
476
497
  schema_menu_item_id?: string;
477
498
  [k: string]: unknown;
478
499
  };
500
+ /**
501
+ * This interface was referenced by `ItemType`'s JSON-Schema
502
+ * via the `instances.hrefSchema` link.
503
+ */
504
+ export type ItemTypeInstancesHrefSchema = {
505
+ /**
506
+ * 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.
507
+ */
508
+ fields?: {
509
+ item_type?: ItemTypeSparseFieldset;
510
+ [k: string]: unknown;
511
+ };
512
+ [k: string]: unknown;
513
+ };
514
+ /**
515
+ * This interface was referenced by `ItemType`'s JSON-Schema
516
+ * via the `self.hrefSchema` link.
517
+ */
518
+ export type ItemTypeSelfHrefSchema = {
519
+ /**
520
+ * 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.
521
+ */
522
+ fields?: {
523
+ item_type?: ItemTypeSparseFieldset;
524
+ field?: FieldSparseFieldset;
525
+ [k: string]: unknown;
526
+ };
527
+ [k: string]: unknown;
528
+ };
529
+ /**
530
+ * Attributes and relationships to return for each `field` that this endpoint returns.
531
+ *
532
+ * This interface was referenced by `Field`'s JSON-Schema
533
+ * via the `definition` "sparse_fieldset".
534
+ */
535
+ export type FieldSparseFieldset = string;
479
536
  /**
480
537
  * This interface was referenced by `ItemType`'s JSON-Schema
481
538
  * via the `destroy.hrefSchema` link.
@@ -487,6 +544,111 @@ export type ItemTypeDestroyHrefSchema = {
487
544
  skip_menu_items_deletion?: boolean;
488
545
  [k: string]: unknown;
489
546
  };
547
+ /**
548
+ * This interface was referenced by `ItemType`'s JSON-Schema
549
+ * via the `referencing.hrefSchema` link.
550
+ */
551
+ export type ItemTypeReferencingHrefSchema = {
552
+ /**
553
+ * 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.
554
+ */
555
+ fields?: {
556
+ item_type?: ItemTypeSparseFieldset;
557
+ [k: string]: unknown;
558
+ };
559
+ [k: string]: unknown;
560
+ };
561
+ /**
562
+ * This interface was referenced by `Field`'s JSON-Schema
563
+ * via the `instances.hrefSchema` link.
564
+ */
565
+ export type FieldInstancesHrefSchema = {
566
+ /**
567
+ * 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.
568
+ */
569
+ fields?: {
570
+ field?: FieldSparseFieldset;
571
+ [k: string]: unknown;
572
+ };
573
+ [k: string]: unknown;
574
+ };
575
+ /**
576
+ * This interface was referenced by `Field`'s JSON-Schema
577
+ * via the `referencing.hrefSchema` link.
578
+ */
579
+ export type FieldReferencingHrefSchema = {
580
+ /**
581
+ * 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.
582
+ */
583
+ fields?: {
584
+ field?: FieldSparseFieldset;
585
+ [k: string]: unknown;
586
+ };
587
+ [k: string]: unknown;
588
+ };
589
+ /**
590
+ * This interface was referenced by `Field`'s JSON-Schema
591
+ * via the `related.hrefSchema` link.
592
+ */
593
+ export type FieldRelatedHrefSchema = {
594
+ /**
595
+ * 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.
596
+ */
597
+ fields?: {
598
+ field?: FieldSparseFieldset;
599
+ [k: string]: unknown;
600
+ };
601
+ [k: string]: unknown;
602
+ };
603
+ /**
604
+ * This interface was referenced by `Field`'s JSON-Schema
605
+ * via the `self.hrefSchema` link.
606
+ */
607
+ export type FieldSelfHrefSchema = {
608
+ /**
609
+ * 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.
610
+ */
611
+ fields?: {
612
+ field?: FieldSparseFieldset;
613
+ [k: string]: unknown;
614
+ };
615
+ [k: string]: unknown;
616
+ };
617
+ /**
618
+ * Attributes and relationships to return for each `fieldset` that this endpoint returns.
619
+ *
620
+ * This interface was referenced by `Fieldset`'s JSON-Schema
621
+ * via the `definition` "sparse_fieldset".
622
+ */
623
+ export type FieldsetSparseFieldset = string;
624
+ /**
625
+ * This interface was referenced by `Fieldset`'s JSON-Schema
626
+ * via the `instances.hrefSchema` link.
627
+ */
628
+ export type FieldsetInstancesHrefSchema = {
629
+ /**
630
+ * 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.
631
+ */
632
+ fields?: {
633
+ fieldset?: FieldsetSparseFieldset;
634
+ [k: string]: unknown;
635
+ };
636
+ [k: string]: unknown;
637
+ };
638
+ /**
639
+ * This interface was referenced by `Fieldset`'s JSON-Schema
640
+ * via the `self.hrefSchema` link.
641
+ */
642
+ export type FieldsetSelfHrefSchema = {
643
+ /**
644
+ * 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.
645
+ */
646
+ fields?: {
647
+ fieldset?: FieldsetSparseFieldset;
648
+ [k: string]: unknown;
649
+ };
650
+ [k: string]: unknown;
651
+ };
490
652
  /**
491
653
  * This interface was referenced by `Session`'s JSON-Schema
492
654
  * via the `definition` "type".
@@ -698,6 +860,13 @@ export type SearchIndexEventInstancesHrefSchema = {
698
860
  order_by?: 'search_index_id_asc' | 'search_index_id_desc' | 'created_at_asc' | 'created_at_desc' | 'event_type_asc' | 'event_type_desc';
699
861
  [k: string]: unknown;
700
862
  };
863
+ /**
864
+ * Attributes and relationships to return for each `item` that this endpoint returns.
865
+ *
866
+ * This interface was referenced by `Item`'s JSON-Schema
867
+ * via the `definition` "sparse_fieldset".
868
+ */
869
+ export type ItemSparseFieldset = string;
701
870
  /**
702
871
  * This interface was referenced by `Item`'s JSON-Schema
703
872
  * via the `instances.hrefSchema` link.
@@ -1548,15 +1717,35 @@ export type SiteType = 'site';
1548
1717
  * via the `definition` "id".
1549
1718
  */
1550
1719
  export type SiteIdentity = string;
1720
+ /**
1721
+ * Attributes and relationships to return for each `site` that this endpoint returns.
1722
+ *
1723
+ * This interface was referenced by `Site`'s JSON-Schema
1724
+ * via the `definition` "sparse_fieldset".
1725
+ */
1726
+ export type SiteSparseFieldset = string;
1551
1727
  /**
1552
1728
  * This interface was referenced by `Site`'s JSON-Schema
1553
1729
  * via the `self.hrefSchema` link.
1554
1730
  */
1555
1731
  export type SiteSelfHrefSchema = {
1556
1732
  /**
1557
- * 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`.
1733
+ * 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`.
1558
1734
  */
1559
1735
  include?: string;
1736
+ /**
1737
+ * 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.
1738
+ */
1739
+ fields?: {
1740
+ site?: SiteSparseFieldset;
1741
+ item_type?: ItemTypeSparseFieldset;
1742
+ field?: FieldSparseFieldset;
1743
+ fieldset?: FieldsetSparseFieldset;
1744
+ item?: ItemSparseFieldset;
1745
+ account?: AccountSparseFieldset;
1746
+ organization?: OrganizationSparseFieldset;
1747
+ [k: string]: unknown;
1748
+ };
1560
1749
  [k: string]: unknown;
1561
1750
  };
1562
1751
  /**
@@ -3367,6 +3556,10 @@ export type AuditLogEventQueryTargetSchema = {
3367
3556
  * 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
3368
3557
  */
3369
3558
  next_token: null | string;
3559
+ /**
3560
+ * 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
3561
+ */
3562
+ scanned_until: null | string;
3370
3563
  };
3371
3564
  };
3372
3565
  /**
@@ -6620,7 +6813,7 @@ export type PluginAttributes = {
6620
6813
  */
6621
6814
  url: string;
6622
6815
  /**
6623
- * 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.
6816
+ * 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`.
6624
6817
  */
6625
6818
  parameters: null | {
6626
6819
  [k: string]: unknown;
@@ -7239,6 +7432,12 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7239
7432
  * The JSON data associated to the record
7240
7433
  */
7241
7434
  attributes: ToItemAttributesInRequest<D>;
7435
+ /**
7436
+ * Accepted so you can validate the same payload you will send to update the record, but ignored
7437
+ */
7438
+ meta?: {
7439
+ [k: string]: unknown;
7440
+ };
7242
7441
  relationships?: {
7243
7442
  /**
7244
7443
  * The record's model
@@ -7263,10 +7462,17 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7263
7462
  export type ItemValidateNewSchema<D extends ItemTypeDefinition = ItemTypeDefinition> = {
7264
7463
  data: {
7265
7464
  type: ItemType1;
7465
+ id?: ItemIdentity;
7266
7466
  /**
7267
7467
  * The JSON data associated to the record
7268
7468
  */
7269
7469
  attributes: ToItemAttributesInRequest<D>;
7470
+ /**
7471
+ * Accepted so you can validate the same payload you will send to create the record, but ignored
7472
+ */
7473
+ meta?: {
7474
+ [k: string]: unknown;
7475
+ };
7270
7476
  relationships: {
7271
7477
  /**
7272
7478
  * The record's model
@@ -1647,7 +1647,7 @@ export default class Field extends BaseResource {
1647
1647
  * @throws {ApiError}
1648
1648
  * @throws {TimeoutError}
1649
1649
  */
1650
- list(itemTypeId: string | ApiTypes.ItemTypeData): Promise<ApiTypes.FieldInstancesTargetSchema>;
1650
+ list(itemTypeId: string | ApiTypes.ItemTypeData, queryParams?: ApiTypes.FieldInstancesHrefSchema): Promise<ApiTypes.FieldInstancesTargetSchema>;
1651
1651
  /**
1652
1652
  * List all fields of a model/block
1653
1653
  *
@@ -1656,7 +1656,7 @@ export default class Field extends BaseResource {
1656
1656
  * @throws {ApiError}
1657
1657
  * @throws {TimeoutError}
1658
1658
  */
1659
- rawList(itemTypeId: string): Promise<RawApiTypes.FieldInstancesTargetSchema>;
1659
+ rawList(itemTypeId: string, queryParams?: RawApiTypes.FieldInstancesHrefSchema): Promise<RawApiTypes.FieldInstancesTargetSchema>;
1660
1660
  /**
1661
1661
  * List fields referencing a model/block
1662
1662
  *
@@ -1665,7 +1665,7 @@ export default class Field extends BaseResource {
1665
1665
  * @throws {ApiError}
1666
1666
  * @throws {TimeoutError}
1667
1667
  */
1668
- referencing(itemTypeId: string | ApiTypes.ItemTypeData): Promise<ApiTypes.FieldReferencingTargetSchema>;
1668
+ referencing(itemTypeId: string | ApiTypes.ItemTypeData, queryParams?: ApiTypes.FieldReferencingHrefSchema): Promise<ApiTypes.FieldReferencingTargetSchema>;
1669
1669
  /**
1670
1670
  * List fields referencing a model/block
1671
1671
  *
@@ -1674,7 +1674,7 @@ export default class Field extends BaseResource {
1674
1674
  * @throws {ApiError}
1675
1675
  * @throws {TimeoutError}
1676
1676
  */
1677
- rawReferencing(itemTypeId: string): Promise<RawApiTypes.FieldReferencingTargetSchema>;
1677
+ rawReferencing(itemTypeId: string, queryParams?: RawApiTypes.FieldReferencingHrefSchema): Promise<RawApiTypes.FieldReferencingTargetSchema>;
1678
1678
  /**
1679
1679
  * List related fields
1680
1680
  *
@@ -1685,7 +1685,7 @@ export default class Field extends BaseResource {
1685
1685
  *
1686
1686
  * @deprecated This API call is to be considered private and might change without notice
1687
1687
  */
1688
- related(itemTypeId: string | ApiTypes.ItemTypeData): Promise<ApiTypes.FieldRelatedTargetSchema>;
1688
+ related(itemTypeId: string | ApiTypes.ItemTypeData, queryParams?: ApiTypes.FieldRelatedHrefSchema): Promise<ApiTypes.FieldRelatedTargetSchema>;
1689
1689
  /**
1690
1690
  * List related fields
1691
1691
  *
@@ -1696,7 +1696,7 @@ export default class Field extends BaseResource {
1696
1696
  *
1697
1697
  * @deprecated This API call is to be considered private and might change without notice
1698
1698
  */
1699
- rawRelated(itemTypeId: string): Promise<RawApiTypes.FieldRelatedTargetSchema>;
1699
+ rawRelated(itemTypeId: string, queryParams?: RawApiTypes.FieldRelatedHrefSchema): Promise<RawApiTypes.FieldRelatedTargetSchema>;
1700
1700
  /**
1701
1701
  * Retrieve a field
1702
1702
  *
@@ -1705,7 +1705,7 @@ export default class Field extends BaseResource {
1705
1705
  * @throws {ApiError}
1706
1706
  * @throws {TimeoutError}
1707
1707
  */
1708
- find(fieldId: string | ApiTypes.FieldData): Promise<(Omit<ApiTypes.FieldStableShell, "field_type" | "default_value" | "validators" | "appearance" | "localized"> & {
1708
+ find(fieldId: string | ApiTypes.FieldData, queryParams?: ApiTypes.FieldSelfHrefSchema): Promise<(Omit<ApiTypes.FieldStableShell, "field_type" | "default_value" | "validators" | "appearance" | "localized"> & {
1709
1709
  field_type: "boolean";
1710
1710
  localized: false;
1711
1711
  default_value: import("../../index.js").BooleanFieldValue;
@@ -2514,7 +2514,7 @@ export default class Field extends BaseResource {
2514
2514
  * @throws {ApiError}
2515
2515
  * @throws {TimeoutError}
2516
2516
  */
2517
- rawFind(fieldId: string): Promise<RawApiTypes.FieldSelfTargetSchema>;
2517
+ rawFind(fieldId: string, queryParams?: RawApiTypes.FieldSelfHrefSchema): Promise<RawApiTypes.FieldSelfTargetSchema>;
2518
2518
  /**
2519
2519
  * Delete a field
2520
2520
  *
@@ -47,7 +47,7 @@ export default class Fieldset extends BaseResource {
47
47
  * @throws {ApiError}
48
48
  * @throws {TimeoutError}
49
49
  */
50
- list(itemTypeId: string | ApiTypes.ItemTypeData): Promise<ApiTypes.FieldsetInstancesTargetSchema>;
50
+ list(itemTypeId: string | ApiTypes.ItemTypeData, queryParams?: ApiTypes.FieldsetInstancesHrefSchema): Promise<ApiTypes.FieldsetInstancesTargetSchema>;
51
51
  /**
52
52
  * List all fieldsets of a model/block
53
53
  *
@@ -56,7 +56,7 @@ export default class Fieldset extends BaseResource {
56
56
  * @throws {ApiError}
57
57
  * @throws {TimeoutError}
58
58
  */
59
- rawList(itemTypeId: string): Promise<RawApiTypes.FieldsetInstancesTargetSchema>;
59
+ rawList(itemTypeId: string, queryParams?: RawApiTypes.FieldsetInstancesHrefSchema): Promise<RawApiTypes.FieldsetInstancesTargetSchema>;
60
60
  /**
61
61
  * Retrieve a fieldset
62
62
  *
@@ -65,7 +65,7 @@ export default class Fieldset extends BaseResource {
65
65
  * @throws {ApiError}
66
66
  * @throws {TimeoutError}
67
67
  */
68
- find(fieldsetId: string | ApiTypes.FieldsetData): Promise<ApiTypes.Fieldset>;
68
+ find(fieldsetId: string | ApiTypes.FieldsetData, queryParams?: ApiTypes.FieldsetSelfHrefSchema): Promise<ApiTypes.Fieldset>;
69
69
  /**
70
70
  * Retrieve a fieldset
71
71
  *
@@ -74,7 +74,7 @@ export default class Fieldset extends BaseResource {
74
74
  * @throws {ApiError}
75
75
  * @throws {TimeoutError}
76
76
  */
77
- rawFind(fieldsetId: string): Promise<RawApiTypes.FieldsetSelfTargetSchema>;
77
+ rawFind(fieldsetId: string, queryParams?: RawApiTypes.FieldsetSelfHrefSchema): Promise<RawApiTypes.FieldsetSelfTargetSchema>;
78
78
  /**
79
79
  * Delete a fieldset
80
80
  *
@@ -65,7 +65,7 @@ export default class Item extends BaseResource {
65
65
  }, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.ItemInstancesTargetSchema<NoInfer<D>, false>['data'][0]>;
66
66
  rawListPagedIterator<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.ItemInstancesHrefSchema<D>, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.ItemInstancesTargetSchema<NoInfer<D>, true>['data'][0]>;
67
67
  /**
68
- * Validates an existing record field
68
+ * Validate an existing record
69
69
  *
70
70
  * Read more: https://www.datocms.com/docs/content-management-api/resources/item/validate_existing
71
71
  *
@@ -76,7 +76,7 @@ export default class Item extends BaseResource {
76
76
  */
77
77
  validateExisting<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, body: ApiTypes.ItemValidateExistingSchema<NoInfer<D>>): Promise<void>;
78
78
  /**
79
- * Validates an existing record field
79
+ * Validate an existing record
80
80
  *
81
81
  * Read more: https://www.datocms.com/docs/content-management-api/resources/item/validate_existing
82
82
  *
@@ -87,7 +87,7 @@ export default class Item extends BaseResource {
87
87
  */
88
88
  rawValidateExisting<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string, body: RawApiTypes.ItemValidateExistingSchema<NoInfer<D>>): Promise<void>;
89
89
  /**
90
- * Validates a record field
90
+ * Validate a new record
91
91
  *
92
92
  * Read more: https://www.datocms.com/docs/content-management-api/resources/item/validate_new
93
93
  *
@@ -98,7 +98,7 @@ export default class Item extends BaseResource {
98
98
  */
99
99
  validateNew<D extends ItemTypeDefinition = ItemTypeDefinition>(body: ApiTypes.ItemValidateNewSchema<NoInfer<D>>): Promise<void>;
100
100
  /**
101
- * Validates a record field
101
+ * Validate a new record
102
102
  *
103
103
  * Read more: https://www.datocms.com/docs/content-management-api/resources/item/validate_new
104
104
  *
@@ -47,7 +47,7 @@ export default class ItemType extends BaseResource {
47
47
  * @throws {ApiError}
48
48
  * @throws {TimeoutError}
49
49
  */
50
- list(): Promise<ApiTypes.ItemTypeInstancesTargetSchema>;
50
+ list(queryParams?: ApiTypes.ItemTypeInstancesHrefSchema): Promise<ApiTypes.ItemTypeInstancesTargetSchema>;
51
51
  /**
52
52
  * List all models/block models
53
53
  *
@@ -56,7 +56,7 @@ export default class ItemType extends BaseResource {
56
56
  * @throws {ApiError}
57
57
  * @throws {TimeoutError}
58
58
  */
59
- rawList(): Promise<RawApiTypes.ItemTypeInstancesTargetSchema>;
59
+ rawList(queryParams?: RawApiTypes.ItemTypeInstancesHrefSchema): Promise<RawApiTypes.ItemTypeInstancesTargetSchema>;
60
60
  /**
61
61
  * Retrieve a model/block model
62
62
  *
@@ -65,7 +65,7 @@ export default class ItemType extends BaseResource {
65
65
  * @throws {ApiError}
66
66
  * @throws {TimeoutError}
67
67
  */
68
- find(itemTypeId: string | ApiTypes.ItemTypeData): Promise<ApiTypes.ItemType>;
68
+ find(itemTypeId: string | ApiTypes.ItemTypeData, queryParams?: ApiTypes.ItemTypeSelfHrefSchema): Promise<ApiTypes.ItemType>;
69
69
  /**
70
70
  * Retrieve a model/block model
71
71
  *
@@ -74,7 +74,7 @@ export default class ItemType extends BaseResource {
74
74
  * @throws {ApiError}
75
75
  * @throws {TimeoutError}
76
76
  */
77
- rawFind(itemTypeId: string): Promise<RawApiTypes.ItemTypeSelfTargetSchema>;
77
+ rawFind(itemTypeId: string, queryParams?: RawApiTypes.ItemTypeSelfHrefSchema): Promise<RawApiTypes.ItemTypeSelfTargetSchema>;
78
78
  /**
79
79
  * Duplicate model/block model
80
80
  *
@@ -119,7 +119,7 @@ export default class ItemType extends BaseResource {
119
119
  * @throws {ApiError}
120
120
  * @throws {TimeoutError}
121
121
  */
122
- referencing(itemTypeId: string | ApiTypes.ItemTypeData): Promise<ApiTypes.ItemTypeReferencingTargetSchema>;
122
+ referencing(itemTypeId: string | ApiTypes.ItemTypeData, queryParams?: ApiTypes.ItemTypeReferencingHrefSchema): Promise<ApiTypes.ItemTypeReferencingTargetSchema>;
123
123
  /**
124
124
  * List models referencing another model/block
125
125
  *
@@ -128,7 +128,7 @@ export default class ItemType extends BaseResource {
128
128
  * @throws {ApiError}
129
129
  * @throws {TimeoutError}
130
130
  */
131
- rawReferencing(itemTypeId: string): Promise<RawApiTypes.ItemTypeReferencingTargetSchema>;
131
+ rawReferencing(itemTypeId: string, queryParams?: RawApiTypes.ItemTypeReferencingHrefSchema): Promise<RawApiTypes.ItemTypeReferencingTargetSchema>;
132
132
  /**
133
133
  * Reorders a set of fields and fieldsets within the model
134
134
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "6.4.0",
3
+ "version": "6.8.0",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
package/resources.json CHANGED
@@ -1074,6 +1074,7 @@
1074
1074
  "comment": "List all models/block models",
1075
1075
  "urlPlaceholders": [],
1076
1076
  "optionalRequestBody": false,
1077
+ "queryParamsType": "ItemTypeInstancesHrefSchema",
1077
1078
  "queryParamsRequired": false,
1078
1079
  "responseType": "ItemTypeInstancesTargetSchema",
1079
1080
  "name": "list",
@@ -1101,6 +1102,7 @@
1101
1102
  "relType": "ItemTypeData"
1102
1103
  },
1103
1104
  "optionalRequestBody": false,
1105
+ "queryParamsType": "ItemTypeSelfHrefSchema",
1104
1106
  "queryParamsRequired": false,
1105
1107
  "responseType": "ItemTypeSelfTargetSchema",
1106
1108
  "name": "find",
@@ -1183,6 +1185,7 @@
1183
1185
  "relType": "ItemTypeData"
1184
1186
  },
1185
1187
  "optionalRequestBody": false,
1188
+ "queryParamsType": "ItemTypeReferencingHrefSchema",
1186
1189
  "queryParamsRequired": false,
1187
1190
  "responseType": "ItemTypeReferencingTargetSchema",
1188
1191
  "name": "referencing",
@@ -1334,6 +1337,7 @@
1334
1337
  }
1335
1338
  ],
1336
1339
  "optionalRequestBody": false,
1340
+ "queryParamsType": "FieldInstancesHrefSchema",
1337
1341
  "queryParamsRequired": false,
1338
1342
  "responseType": "FieldInstancesTargetSchema",
1339
1343
  "name": "list",
@@ -1356,6 +1360,7 @@
1356
1360
  }
1357
1361
  ],
1358
1362
  "optionalRequestBody": false,
1363
+ "queryParamsType": "FieldReferencingHrefSchema",
1359
1364
  "queryParamsRequired": false,
1360
1365
  "responseType": "FieldReferencingTargetSchema",
1361
1366
  "name": "referencing",
@@ -1378,6 +1383,7 @@
1378
1383
  }
1379
1384
  ],
1380
1385
  "optionalRequestBody": false,
1386
+ "queryParamsType": "FieldRelatedHrefSchema",
1381
1387
  "queryParamsRequired": false,
1382
1388
  "responseType": "FieldRelatedTargetSchema",
1383
1389
  "deprecated": "This API call is to be considered private and might change without notice",
@@ -1406,6 +1412,7 @@
1406
1412
  "relType": "FieldData"
1407
1413
  },
1408
1414
  "optionalRequestBody": false,
1415
+ "queryParamsType": "FieldSelfHrefSchema",
1409
1416
  "queryParamsRequired": false,
1410
1417
  "responseType": "FieldSelfTargetSchema",
1411
1418
  "name": "find",
@@ -1563,6 +1570,7 @@
1563
1570
  }
1564
1571
  ],
1565
1572
  "optionalRequestBody": false,
1573
+ "queryParamsType": "FieldsetInstancesHrefSchema",
1566
1574
  "queryParamsRequired": false,
1567
1575
  "responseType": "FieldsetInstancesTargetSchema",
1568
1576
  "name": "list",
@@ -1590,6 +1598,7 @@
1590
1598
  "relType": "FieldsetData"
1591
1599
  },
1592
1600
  "optionalRequestBody": false,
1601
+ "queryParamsType": "FieldsetSelfHrefSchema",
1593
1602
  "queryParamsRequired": false,
1594
1603
  "responseType": "FieldsetSelfTargetSchema",
1595
1604
  "name": "find",
@@ -2272,7 +2281,7 @@
2272
2281
  "rel": "validate_existing",
2273
2282
  "urlTemplate": "/items/${itemId}/validate",
2274
2283
  "method": "POST",
2275
- "comment": "Validates an existing record field",
2284
+ "comment": "Validate an existing record",
2276
2285
  "urlPlaceholders": [
2277
2286
  {
2278
2287
  "variableName": "itemId",
@@ -2306,7 +2315,7 @@
2306
2315
  "rel": "validate_new",
2307
2316
  "urlTemplate": "/items/validate",
2308
2317
  "method": "POST",
2309
- "comment": "Validates a record field",
2318
+ "comment": "Validate a new record",
2310
2319
  "urlPlaceholders": [],
2311
2320
  "requestBodyType": "ItemValidateNewSchema",
2312
2321
  "optionalRequestBody": false,