@datocms/cma-client 6.3.0 → 6.7.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 +227 -46
  10. package/dist/esm/generated/Client.js +1 -1
  11. package/dist/esm/generated/RawApiTypes.d.ts +206 -25
  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 +227 -46
  24. package/dist/types/generated/RawApiTypes.d.ts +206 -25
  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 +2 -2
  30. package/resources.json +11 -2
  31. package/src/generated/ApiTypes.ts +227 -42
  32. package/src/generated/Client.ts +1 -1
  33. package/src/generated/RawApiTypes.ts +206 -23
  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
@@ -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".
@@ -1656,6 +1818,13 @@ export type SiteType = 'site';
1656
1818
  * via the `definition` "id".
1657
1819
  */
1658
1820
  export type SiteIdentity = string;
1821
+ /**
1822
+ * Attributes and relationships to return for each `site` that this endpoint returns.
1823
+ *
1824
+ * This interface was referenced by `Site`'s JSON-Schema
1825
+ * via the `definition` "sparse_fieldset".
1826
+ */
1827
+ export type SiteSparseFieldset = string;
1659
1828
  /**
1660
1829
  * This interface was referenced by `Site`'s JSON-Schema
1661
1830
  * via the `self.hrefSchema` link.
@@ -1665,6 +1834,18 @@ export type SiteSelfHrefSchema = {
1665
1834
  * 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`.
1666
1835
  */
1667
1836
  include?: string;
1837
+ /**
1838
+ * 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.
1839
+ */
1840
+ fields?: {
1841
+ site?: SiteSparseFieldset;
1842
+ item_type?: ItemTypeSparseFieldset;
1843
+ field?: FieldSparseFieldset;
1844
+ fieldset?: FieldsetSparseFieldset;
1845
+ account?: AccountSparseFieldset;
1846
+ organization?: OrganizationSparseFieldset;
1847
+ [k: string]: unknown;
1848
+ };
1668
1849
  [k: string]: unknown;
1669
1850
  };
1670
1851
  /**
@@ -2908,9 +3089,9 @@ export type UserAttributes = {
2908
3089
  */
2909
3090
  email: string;
2910
3091
  /**
2911
- * Whether 2-factor authentication is active for this account or not
3092
+ * Whether 2-factor authentication is active for this account or not. It returns `null` if the credentials you are using cannot manage the collaborators of the project.
2912
3093
  */
2913
- is_2fa_active: boolean;
3094
+ is_2fa_active: boolean | null;
2914
3095
  /**
2915
3096
  * Full name
2916
3097
  */
@@ -2942,7 +3123,7 @@ export type UserRelationships = {
2942
3123
  */
2943
3124
  export type UserMeta = {
2944
3125
  /**
2945
- * Date of last reading/interaction
3126
+ * Date of last reading/interaction. It returns `null` if the credentials you are using cannot manage the collaborators of the project.
2946
3127
  */
2947
3128
  last_access: string | null;
2948
3129
  };
@@ -3035,7 +3216,7 @@ export type SsoUserAttributes = {
3035
3216
  */
3036
3217
  username: string;
3037
3218
  /**
3038
- * Identity provider ID
3219
+ * Identity provider ID. It returns `null` if the credentials you are using cannot manage the SSO users of the project.
3039
3220
  */
3040
3221
  external_id: string | null;
3041
3222
  /**
@@ -3089,7 +3270,7 @@ export type SsoGroupData = {
3089
3270
  */
3090
3271
  export type SsoUserMeta = {
3091
3272
  /**
3092
- * Date of last reading/interaction
3273
+ * Date of last reading/interaction. It returns `null` if the credentials you are using cannot manage the SSO users of the project.
3093
3274
  */
3094
3275
  last_access: string | null;
3095
3276
  };
@@ -3184,9 +3365,10 @@ export type AccessTokenAttributes = {
3184
3365
  */
3185
3366
  hardcoded_type: null | string;
3186
3367
  /**
3187
- * When this API token was last used to access the Content Management API
3368
+ * When this API token was last used to access the Content Management API. It returns `null` if the credentials you are using cannot manage the API tokens of the project.
3188
3369
  */
3189
3370
  last_cma_access:
3371
+ | null
3190
3372
  | 'today'
3191
3373
  | 'yesterday'
3192
3374
  | 'this_week'
@@ -3195,9 +3377,10 @@ export type AccessTokenAttributes = {
3195
3377
  | 'last_month'
3196
3378
  | 'never';
3197
3379
  /**
3198
- * When this API token was last used to access the Content Delivery API
3380
+ * When this API token was last used to access the Content Delivery API. It returns `null` if the credentials you are using cannot manage the API tokens of the project.
3199
3381
  */
3200
3382
  last_cda_access:
3383
+ | null
3201
3384
  | 'today'
3202
3385
  | 'yesterday'
3203
3386
  | 'this_week'
@@ -6952,9 +7135,9 @@ export type PluginAttributes = {
6952
7135
  */
6953
7136
  url: string;
6954
7137
  /**
6955
- * 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.
7138
+ * 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.
6956
7139
  */
6957
- parameters: {
7140
+ parameters: null | {
6958
7141
  [k: string]: unknown;
6959
7142
  };
6960
7143
  /**
@@ -9704,13 +9887,13 @@ export type WebhookAttributes = {
9704
9887
  */
9705
9888
  http_basic_user: string | null;
9706
9889
  /**
9707
- * HTTP Basic Authorization password
9890
+ * HTTP Basic Authorization password. It is `null` when the webhook has no basic auth, or when the credentials you are using cannot manage the webhooks of the project.
9708
9891
  */
9709
9892
  http_basic_password: string | null;
9710
9893
  /**
9711
- * Additional headers that will be sent
9894
+ * Additional headers that will be sent. It returns `null` if the credentials you are using cannot manage the webhooks of the project.
9712
9895
  */
9713
- headers: {
9896
+ headers: null | {
9714
9897
  [k: string]: string;
9715
9898
  };
9716
9899
  events: {
@@ -9843,7 +10026,7 @@ export type WebhookCreateSchema = {
9843
10026
  */
9844
10027
  http_basic_user: string | null;
9845
10028
  /**
9846
- * HTTP Basic Authorization password
10029
+ * HTTP Basic Authorization password. It is `null` when the webhook has no basic auth, or when the credentials you are using cannot manage the webhooks of the project.
9847
10030
  */
9848
10031
  http_basic_password: string | null;
9849
10032
  /**
@@ -9942,7 +10125,7 @@ export type WebhookUpdateSchema = {
9942
10125
  */
9943
10126
  http_basic_user?: string | null;
9944
10127
  /**
9945
- * HTTP Basic Authorization password
10128
+ * HTTP Basic Authorization password. It is `null` when the webhook has no basic auth, or when the credentials you are using cannot manage the webhooks of the project.
9946
10129
  */
9947
10130
  http_basic_password?: string | null;
9948
10131
  /**
@@ -10161,9 +10344,9 @@ export type BuildTriggerAttributes = {
10161
10344
  */
10162
10345
  adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab';
10163
10346
  /**
10164
- * Additional settings for the build trigger. The value depends on the `adapter`.
10347
+ * Additional settings for the build trigger. The value depends on the `adapter`. It returns `null` if the credentials you are using cannot manage the build triggers of the project.
10165
10348
  */
10166
- adapter_settings: {
10349
+ adapter_settings: null | {
10167
10350
  [k: string]: unknown;
10168
10351
  };
10169
10352
  /**
@@ -10175,13 +10358,13 @@ export type BuildTriggerAttributes = {
10175
10358
  */
10176
10359
  build_status: string;
10177
10360
  /**
10178
- * Unique token for the webhook (it's the same token present in `webhook_url`)
10361
+ * Unique token for the webhook (it's the same token present in `webhook_url`). It returns `null` if the credentials you are using cannot manage the build triggers of the project.
10179
10362
  */
10180
- webhook_token?: string;
10363
+ webhook_token: null | string;
10181
10364
  /**
10182
- * The URL of the webhook your service has to call when the build completes to report it's status (success or error)
10365
+ * The URL of the webhook your service has to call when the build completes to report it's status (success or error). It returns `null` if the credentials you are using cannot manage the build triggers of the project.
10183
10366
  */
10184
- webhook_url: string;
10367
+ webhook_url: null | string;
10185
10368
  /**
10186
10369
  * Status of Site Search for the frontend
10187
10370
  */
@@ -12037,7 +12220,7 @@ export type SiteAttributes = {
12037
12220
  */
12038
12221
  imgix_host: string | null;
12039
12222
  /**
12040
- * DatoCMS internal domain for the administrative area. Returns `null` if the credentials you are using cannot change the project's settings.
12223
+ * DatoCMS internal domain for the administrative area. Returns `null` if the credentials you are using cannot read the configuration of the project.
12041
12224
  */
12042
12225
  internal_domain: string | null;
12043
12226
  /**
@@ -12061,11 +12244,11 @@ export type SiteAttributes = {
12061
12244
  */
12062
12245
  last_data_change_at: null | string;
12063
12246
  /**
12064
- * Specifies whether all users of this site need to authenticate using two-factor authentication. Returns `null` if the credentials you are using cannot change the project's settings.
12247
+ * Specifies whether all users of this site need to authenticate using two-factor authentication. Returns `null` if the credentials you are using cannot read the configuration of the project.
12065
12248
  */
12066
12249
  require_2fa: boolean | null;
12067
12250
  /**
12068
- * Specifies whether you want IPs to be tracked in the Project usages section. Returns `null` if the credentials you are using cannot change the project's settings.
12251
+ * Specifies whether you want IPs to be tracked in the Project usages section. Returns `null` if the credentials you are using cannot read the configuration of the project.
12069
12252
  */
12070
12253
  ip_tracking_enabled: boolean | null;
12071
12254
  /**
@@ -127,8 +127,11 @@ export default class Field extends BaseResource {
127
127
  * @throws {ApiError}
128
128
  * @throws {TimeoutError}
129
129
  */
130
- list(itemTypeId: string | ApiTypes.ItemTypeData) {
131
- return this.rawList(Utils.toId(itemTypeId)).then((body) =>
130
+ list(
131
+ itemTypeId: string | ApiTypes.ItemTypeData,
132
+ queryParams?: ApiTypes.FieldInstancesHrefSchema,
133
+ ) {
134
+ return this.rawList(Utils.toId(itemTypeId), queryParams).then((body) =>
132
135
  Utils.deserializeResponseBody<ApiTypes.FieldInstancesTargetSchema>(body),
133
136
  );
134
137
  }
@@ -141,10 +144,14 @@ export default class Field extends BaseResource {
141
144
  * @throws {ApiError}
142
145
  * @throws {TimeoutError}
143
146
  */
144
- rawList(itemTypeId: string): Promise<RawApiTypes.FieldInstancesTargetSchema> {
147
+ rawList(
148
+ itemTypeId: string,
149
+ queryParams?: RawApiTypes.FieldInstancesHrefSchema,
150
+ ): Promise<RawApiTypes.FieldInstancesTargetSchema> {
145
151
  return this.client.request<RawApiTypes.FieldInstancesTargetSchema>({
146
152
  method: 'GET',
147
153
  url: `/item-types/${itemTypeId}/fields`,
154
+ queryParams,
148
155
  });
149
156
  }
150
157
 
@@ -156,11 +163,15 @@ export default class Field extends BaseResource {
156
163
  * @throws {ApiError}
157
164
  * @throws {TimeoutError}
158
165
  */
159
- referencing(itemTypeId: string | ApiTypes.ItemTypeData) {
160
- return this.rawReferencing(Utils.toId(itemTypeId)).then((body) =>
161
- Utils.deserializeResponseBody<ApiTypes.FieldReferencingTargetSchema>(
162
- body,
163
- ),
166
+ referencing(
167
+ itemTypeId: string | ApiTypes.ItemTypeData,
168
+ queryParams?: ApiTypes.FieldReferencingHrefSchema,
169
+ ) {
170
+ return this.rawReferencing(Utils.toId(itemTypeId), queryParams).then(
171
+ (body) =>
172
+ Utils.deserializeResponseBody<ApiTypes.FieldReferencingTargetSchema>(
173
+ body,
174
+ ),
164
175
  );
165
176
  }
166
177
 
@@ -174,10 +185,12 @@ export default class Field extends BaseResource {
174
185
  */
175
186
  rawReferencing(
176
187
  itemTypeId: string,
188
+ queryParams?: RawApiTypes.FieldReferencingHrefSchema,
177
189
  ): Promise<RawApiTypes.FieldReferencingTargetSchema> {
178
190
  return this.client.request<RawApiTypes.FieldReferencingTargetSchema>({
179
191
  method: 'GET',
180
192
  url: `/item-types/${itemTypeId}/fields/referencing`,
193
+ queryParams,
181
194
  });
182
195
  }
183
196
 
@@ -191,8 +204,11 @@ export default class Field extends BaseResource {
191
204
  *
192
205
  * @deprecated This API call is to be considered private and might change without notice
193
206
  */
194
- related(itemTypeId: string | ApiTypes.ItemTypeData) {
195
- return this.rawRelated(Utils.toId(itemTypeId)).then((body) =>
207
+ related(
208
+ itemTypeId: string | ApiTypes.ItemTypeData,
209
+ queryParams?: ApiTypes.FieldRelatedHrefSchema,
210
+ ) {
211
+ return this.rawRelated(Utils.toId(itemTypeId), queryParams).then((body) =>
196
212
  Utils.deserializeResponseBody<ApiTypes.FieldRelatedTargetSchema>(body),
197
213
  );
198
214
  }
@@ -209,10 +225,12 @@ export default class Field extends BaseResource {
209
225
  */
210
226
  rawRelated(
211
227
  itemTypeId: string,
228
+ queryParams?: RawApiTypes.FieldRelatedHrefSchema,
212
229
  ): Promise<RawApiTypes.FieldRelatedTargetSchema> {
213
230
  return this.client.request<RawApiTypes.FieldRelatedTargetSchema>({
214
231
  method: 'GET',
215
232
  url: `/item-types/${itemTypeId}/fields/related`,
233
+ queryParams,
216
234
  });
217
235
  }
218
236
 
@@ -224,8 +242,11 @@ export default class Field extends BaseResource {
224
242
  * @throws {ApiError}
225
243
  * @throws {TimeoutError}
226
244
  */
227
- find(fieldId: string | ApiTypes.FieldData) {
228
- return this.rawFind(Utils.toId(fieldId)).then((body) =>
245
+ find(
246
+ fieldId: string | ApiTypes.FieldData,
247
+ queryParams?: ApiTypes.FieldSelfHrefSchema,
248
+ ) {
249
+ return this.rawFind(Utils.toId(fieldId), queryParams).then((body) =>
229
250
  Utils.deserializeResponseBody<ApiTypes.FieldSelfTargetSchema>(body),
230
251
  );
231
252
  }
@@ -238,10 +259,14 @@ export default class Field extends BaseResource {
238
259
  * @throws {ApiError}
239
260
  * @throws {TimeoutError}
240
261
  */
241
- rawFind(fieldId: string): Promise<RawApiTypes.FieldSelfTargetSchema> {
262
+ rawFind(
263
+ fieldId: string,
264
+ queryParams?: RawApiTypes.FieldSelfHrefSchema,
265
+ ): Promise<RawApiTypes.FieldSelfTargetSchema> {
242
266
  return this.client.request<RawApiTypes.FieldSelfTargetSchema>({
243
267
  method: 'GET',
244
268
  url: `/fields/${fieldId}`,
269
+ queryParams,
245
270
  });
246
271
  }
247
272
 
@@ -113,8 +113,11 @@ export default class Fieldset extends BaseResource {
113
113
  * @throws {ApiError}
114
114
  * @throws {TimeoutError}
115
115
  */
116
- list(itemTypeId: string | ApiTypes.ItemTypeData) {
117
- return this.rawList(Utils.toId(itemTypeId)).then((body) =>
116
+ list(
117
+ itemTypeId: string | ApiTypes.ItemTypeData,
118
+ queryParams?: ApiTypes.FieldsetInstancesHrefSchema,
119
+ ) {
120
+ return this.rawList(Utils.toId(itemTypeId), queryParams).then((body) =>
118
121
  Utils.deserializeResponseBody<ApiTypes.FieldsetInstancesTargetSchema>(
119
122
  body,
120
123
  ),
@@ -131,10 +134,12 @@ export default class Fieldset extends BaseResource {
131
134
  */
132
135
  rawList(
133
136
  itemTypeId: string,
137
+ queryParams?: RawApiTypes.FieldsetInstancesHrefSchema,
134
138
  ): Promise<RawApiTypes.FieldsetInstancesTargetSchema> {
135
139
  return this.client.request<RawApiTypes.FieldsetInstancesTargetSchema>({
136
140
  method: 'GET',
137
141
  url: `/item-types/${itemTypeId}/fieldsets`,
142
+ queryParams,
138
143
  });
139
144
  }
140
145
 
@@ -146,8 +151,11 @@ export default class Fieldset extends BaseResource {
146
151
  * @throws {ApiError}
147
152
  * @throws {TimeoutError}
148
153
  */
149
- find(fieldsetId: string | ApiTypes.FieldsetData) {
150
- return this.rawFind(Utils.toId(fieldsetId)).then((body) =>
154
+ find(
155
+ fieldsetId: string | ApiTypes.FieldsetData,
156
+ queryParams?: ApiTypes.FieldsetSelfHrefSchema,
157
+ ) {
158
+ return this.rawFind(Utils.toId(fieldsetId), queryParams).then((body) =>
151
159
  Utils.deserializeResponseBody<ApiTypes.FieldsetSelfTargetSchema>(body),
152
160
  );
153
161
  }
@@ -160,10 +168,14 @@ export default class Fieldset extends BaseResource {
160
168
  * @throws {ApiError}
161
169
  * @throws {TimeoutError}
162
170
  */
163
- rawFind(fieldsetId: string): Promise<RawApiTypes.FieldsetSelfTargetSchema> {
171
+ rawFind(
172
+ fieldsetId: string,
173
+ queryParams?: RawApiTypes.FieldsetSelfHrefSchema,
174
+ ): Promise<RawApiTypes.FieldsetSelfTargetSchema> {
164
175
  return this.client.request<RawApiTypes.FieldsetSelfTargetSchema>({
165
176
  method: 'GET',
166
177
  url: `/fieldsets/${fieldsetId}`,
178
+ queryParams,
167
179
  });
168
180
  }
169
181
 
@@ -180,7 +180,7 @@ export default class Item extends BaseResource {
180
180
  }
181
181
 
182
182
  /**
183
- * Validates an existing record field
183
+ * Validate an existing record
184
184
  *
185
185
  * Read more: https://www.datocms.com/docs/content-management-api/resources/item/validate_existing
186
186
  *
@@ -207,7 +207,7 @@ export default class Item extends BaseResource {
207
207
  }
208
208
 
209
209
  /**
210
- * Validates an existing record field
210
+ * Validate an existing record
211
211
  *
212
212
  * Read more: https://www.datocms.com/docs/content-management-api/resources/item/validate_existing
213
213
  *
@@ -228,7 +228,7 @@ export default class Item extends BaseResource {
228
228
  }
229
229
 
230
230
  /**
231
- * Validates a record field
231
+ * Validate a new record
232
232
  *
233
233
  * Read more: https://www.datocms.com/docs/content-management-api/resources/item/validate_new
234
234
  *
@@ -253,7 +253,7 @@ export default class Item extends BaseResource {
253
253
  }
254
254
 
255
255
  /**
256
- * Validates a record field
256
+ * Validate a new record
257
257
  *
258
258
  * Read more: https://www.datocms.com/docs/content-management-api/resources/item/validate_new
259
259
  *
@@ -151,8 +151,8 @@ export default class ItemType extends BaseResource {
151
151
  * @throws {ApiError}
152
152
  * @throws {TimeoutError}
153
153
  */
154
- list() {
155
- return this.rawList().then((body) =>
154
+ list(queryParams?: ApiTypes.ItemTypeInstancesHrefSchema) {
155
+ return this.rawList(queryParams).then((body) =>
156
156
  Utils.deserializeResponseBody<ApiTypes.ItemTypeInstancesTargetSchema>(
157
157
  body,
158
158
  ),
@@ -167,10 +167,13 @@ export default class ItemType extends BaseResource {
167
167
  * @throws {ApiError}
168
168
  * @throws {TimeoutError}
169
169
  */
170
- rawList(): Promise<RawApiTypes.ItemTypeInstancesTargetSchema> {
170
+ rawList(
171
+ queryParams?: RawApiTypes.ItemTypeInstancesHrefSchema,
172
+ ): Promise<RawApiTypes.ItemTypeInstancesTargetSchema> {
171
173
  return this.client.request<RawApiTypes.ItemTypeInstancesTargetSchema>({
172
174
  method: 'GET',
173
175
  url: '/item-types',
176
+ queryParams,
174
177
  });
175
178
  }
176
179
 
@@ -182,8 +185,11 @@ export default class ItemType extends BaseResource {
182
185
  * @throws {ApiError}
183
186
  * @throws {TimeoutError}
184
187
  */
185
- find(itemTypeId: string | ApiTypes.ItemTypeData) {
186
- return this.rawFind(Utils.toId(itemTypeId)).then((body) =>
188
+ find(
189
+ itemTypeId: string | ApiTypes.ItemTypeData,
190
+ queryParams?: ApiTypes.ItemTypeSelfHrefSchema,
191
+ ) {
192
+ return this.rawFind(Utils.toId(itemTypeId), queryParams).then((body) =>
187
193
  Utils.deserializeResponseBody<ApiTypes.ItemTypeSelfTargetSchema>(body),
188
194
  );
189
195
  }
@@ -196,10 +202,14 @@ export default class ItemType extends BaseResource {
196
202
  * @throws {ApiError}
197
203
  * @throws {TimeoutError}
198
204
  */
199
- rawFind(itemTypeId: string): Promise<RawApiTypes.ItemTypeSelfTargetSchema> {
205
+ rawFind(
206
+ itemTypeId: string,
207
+ queryParams?: RawApiTypes.ItemTypeSelfHrefSchema,
208
+ ): Promise<RawApiTypes.ItemTypeSelfTargetSchema> {
200
209
  return this.client.request<RawApiTypes.ItemTypeSelfTargetSchema>({
201
210
  method: 'GET',
202
211
  url: `/item-types/${itemTypeId}`,
212
+ queryParams,
203
213
  });
204
214
  }
205
215
 
@@ -280,11 +290,15 @@ export default class ItemType extends BaseResource {
280
290
  * @throws {ApiError}
281
291
  * @throws {TimeoutError}
282
292
  */
283
- referencing(itemTypeId: string | ApiTypes.ItemTypeData) {
284
- return this.rawReferencing(Utils.toId(itemTypeId)).then((body) =>
285
- Utils.deserializeResponseBody<ApiTypes.ItemTypeReferencingTargetSchema>(
286
- body,
287
- ),
293
+ referencing(
294
+ itemTypeId: string | ApiTypes.ItemTypeData,
295
+ queryParams?: ApiTypes.ItemTypeReferencingHrefSchema,
296
+ ) {
297
+ return this.rawReferencing(Utils.toId(itemTypeId), queryParams).then(
298
+ (body) =>
299
+ Utils.deserializeResponseBody<ApiTypes.ItemTypeReferencingTargetSchema>(
300
+ body,
301
+ ),
288
302
  );
289
303
  }
290
304
 
@@ -298,10 +312,12 @@ export default class ItemType extends BaseResource {
298
312
  */
299
313
  rawReferencing(
300
314
  itemTypeId: string,
315
+ queryParams?: RawApiTypes.ItemTypeReferencingHrefSchema,
301
316
  ): Promise<RawApiTypes.ItemTypeReferencingTargetSchema> {
302
317
  return this.client.request<RawApiTypes.ItemTypeReferencingTargetSchema>({
303
318
  method: 'GET',
304
319
  url: `/item-types/${itemTypeId}/referencing`,
320
+ queryParams,
305
321
  });
306
322
  }
307
323