@datocms/cma-client 6.7.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.
@@ -90,7 +90,7 @@ class Client {
90
90
  return this.config.baseUrl || Client.defaultBaseUrl;
91
91
  }
92
92
  request(options) {
93
- return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v6.7.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
93
+ return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v6.8.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
94
94
  ? { 'X-Environment': this.config.environment }
95
95
  : {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
96
96
  return this.jobResultsFetcher
@@ -1041,6 +1041,13 @@ export type SearchIndexEventInstancesHrefSchema = {
1041
1041
  order_by?: 'search_index_id_asc' | 'search_index_id_desc' | 'created_at_asc' | 'created_at_desc' | 'event_type_asc' | 'event_type_desc';
1042
1042
  [k: string]: unknown;
1043
1043
  };
1044
+ /**
1045
+ * Attributes and relationships to return for each `item` that this endpoint returns.
1046
+ *
1047
+ * This interface was referenced by `Item`'s JSON-Schema
1048
+ * via the `definition` "sparse_fieldset".
1049
+ */
1050
+ export type ItemSparseFieldset = string;
1044
1051
  /**
1045
1052
  * This interface was referenced by `Item`'s JSON-Schema
1046
1053
  * via the `instances.targetSchema` link.
@@ -2079,7 +2086,7 @@ export type SiteSparseFieldset = string;
2079
2086
  */
2080
2087
  export type SiteSelfHrefSchema = {
2081
2088
  /**
2082
- * 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`.
2089
+ * 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`.
2083
2090
  */
2084
2091
  include?: string;
2085
2092
  /**
@@ -2090,6 +2097,7 @@ export type SiteSelfHrefSchema = {
2090
2097
  item_type?: ItemTypeSparseFieldset;
2091
2098
  field?: FieldSparseFieldset;
2092
2099
  fieldset?: FieldsetSparseFieldset;
2100
+ item?: ItemSparseFieldset;
2093
2101
  account?: AccountSparseFieldset;
2094
2102
  organization?: OrganizationSparseFieldset;
2095
2103
  [k: string]: unknown;
@@ -6969,7 +6977,7 @@ export type Plugin = {
6969
6977
  */
6970
6978
  url: string;
6971
6979
  /**
6972
- * 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.
6980
+ * 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`.
6973
6981
  */
6974
6982
  parameters: null | {
6975
6983
  [k: string]: unknown;
@@ -7053,7 +7061,7 @@ export type PluginAttributes = {
7053
7061
  */
7054
7062
  url: string;
7055
7063
  /**
7056
- * 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.
7064
+ * 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`.
7057
7065
  */
7058
7066
  parameters: null | {
7059
7067
  [k: string]: unknown;
@@ -7570,6 +7578,12 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7570
7578
  type?: ItemType1;
7571
7579
  item_type?: ItemTypeData<D>;
7572
7580
  creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
7581
+ /**
7582
+ * Accepted so you can validate the same payload you will send to update the record, but ignored
7583
+ */
7584
+ meta?: {
7585
+ [k: string]: unknown;
7586
+ };
7573
7587
  __itemTypeId?: D['itemTypeId'];
7574
7588
  } & ToItemAttributesInRequest<D>;
7575
7589
  /**
@@ -7577,9 +7591,16 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7577
7591
  * via the `validate_new.schema` link.
7578
7592
  */
7579
7593
  export type ItemValidateNewSchema<D extends ItemTypeDefinition = ItemTypeDefinition> = {
7594
+ id?: ItemIdentity;
7580
7595
  type?: ItemType1;
7581
7596
  item_type: ItemTypeData<D>;
7582
7597
  creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
7598
+ /**
7599
+ * Accepted so you can validate the same payload you will send to create the record, but ignored
7600
+ */
7601
+ meta?: {
7602
+ [k: string]: unknown;
7603
+ };
7583
7604
  __itemTypeId?: D['itemTypeId'];
7584
7605
  } & ToItemAttributesInRequest<D>;
7585
7606
  /**
@@ -59,7 +59,7 @@ export class Client {
59
59
  ...this.config,
60
60
  ...options,
61
61
  logFn: this.config.logFn || console.log,
62
- userAgent: '@datocms/cma-client v6.7.0',
62
+ userAgent: '@datocms/cma-client v6.8.0',
63
63
  baseUrl: this.baseUrl,
64
64
  preCallStack: new Error().stack,
65
65
  extraHeaders: {
@@ -860,6 +860,13 @@ export type SearchIndexEventInstancesHrefSchema = {
860
860
  order_by?: 'search_index_id_asc' | 'search_index_id_desc' | 'created_at_asc' | 'created_at_desc' | 'event_type_asc' | 'event_type_desc';
861
861
  [k: string]: unknown;
862
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;
863
870
  /**
864
871
  * This interface was referenced by `Item`'s JSON-Schema
865
872
  * via the `instances.hrefSchema` link.
@@ -1723,7 +1730,7 @@ export type SiteSparseFieldset = string;
1723
1730
  */
1724
1731
  export type SiteSelfHrefSchema = {
1725
1732
  /**
1726
- * 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`.
1727
1734
  */
1728
1735
  include?: string;
1729
1736
  /**
@@ -1734,6 +1741,7 @@ export type SiteSelfHrefSchema = {
1734
1741
  item_type?: ItemTypeSparseFieldset;
1735
1742
  field?: FieldSparseFieldset;
1736
1743
  fieldset?: FieldsetSparseFieldset;
1744
+ item?: ItemSparseFieldset;
1737
1745
  account?: AccountSparseFieldset;
1738
1746
  organization?: OrganizationSparseFieldset;
1739
1747
  [k: string]: unknown;
@@ -3548,6 +3556,10 @@ export type AuditLogEventQueryTargetSchema = {
3548
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
3549
3557
  */
3550
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;
3551
3563
  };
3552
3564
  };
3553
3565
  /**
@@ -6801,7 +6813,7 @@ export type PluginAttributes = {
6801
6813
  */
6802
6814
  url: string;
6803
6815
  /**
6804
- * 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`.
6805
6817
  */
6806
6818
  parameters: null | {
6807
6819
  [k: string]: unknown;
@@ -7420,6 +7432,12 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7420
7432
  * The JSON data associated to the record
7421
7433
  */
7422
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
+ };
7423
7441
  relationships?: {
7424
7442
  /**
7425
7443
  * The record's model
@@ -7444,10 +7462,17 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7444
7462
  export type ItemValidateNewSchema<D extends ItemTypeDefinition = ItemTypeDefinition> = {
7445
7463
  data: {
7446
7464
  type: ItemType1;
7465
+ id?: ItemIdentity;
7447
7466
  /**
7448
7467
  * The JSON data associated to the record
7449
7468
  */
7450
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
+ };
7451
7476
  relationships: {
7452
7477
  /**
7453
7478
  * The record's model
@@ -1041,6 +1041,13 @@ export type SearchIndexEventInstancesHrefSchema = {
1041
1041
  order_by?: 'search_index_id_asc' | 'search_index_id_desc' | 'created_at_asc' | 'created_at_desc' | 'event_type_asc' | 'event_type_desc';
1042
1042
  [k: string]: unknown;
1043
1043
  };
1044
+ /**
1045
+ * Attributes and relationships to return for each `item` that this endpoint returns.
1046
+ *
1047
+ * This interface was referenced by `Item`'s JSON-Schema
1048
+ * via the `definition` "sparse_fieldset".
1049
+ */
1050
+ export type ItemSparseFieldset = string;
1044
1051
  /**
1045
1052
  * This interface was referenced by `Item`'s JSON-Schema
1046
1053
  * via the `instances.targetSchema` link.
@@ -2079,7 +2086,7 @@ export type SiteSparseFieldset = string;
2079
2086
  */
2080
2087
  export type SiteSelfHrefSchema = {
2081
2088
  /**
2082
- * 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`.
2089
+ * 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`.
2083
2090
  */
2084
2091
  include?: string;
2085
2092
  /**
@@ -2090,6 +2097,7 @@ export type SiteSelfHrefSchema = {
2090
2097
  item_type?: ItemTypeSparseFieldset;
2091
2098
  field?: FieldSparseFieldset;
2092
2099
  fieldset?: FieldsetSparseFieldset;
2100
+ item?: ItemSparseFieldset;
2093
2101
  account?: AccountSparseFieldset;
2094
2102
  organization?: OrganizationSparseFieldset;
2095
2103
  [k: string]: unknown;
@@ -6969,7 +6977,7 @@ export type Plugin = {
6969
6977
  */
6970
6978
  url: string;
6971
6979
  /**
6972
- * 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.
6980
+ * 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`.
6973
6981
  */
6974
6982
  parameters: null | {
6975
6983
  [k: string]: unknown;
@@ -7053,7 +7061,7 @@ export type PluginAttributes = {
7053
7061
  */
7054
7062
  url: string;
7055
7063
  /**
7056
- * 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.
7064
+ * 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`.
7057
7065
  */
7058
7066
  parameters: null | {
7059
7067
  [k: string]: unknown;
@@ -7570,6 +7578,12 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7570
7578
  type?: ItemType1;
7571
7579
  item_type?: ItemTypeData<D>;
7572
7580
  creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
7581
+ /**
7582
+ * Accepted so you can validate the same payload you will send to update the record, but ignored
7583
+ */
7584
+ meta?: {
7585
+ [k: string]: unknown;
7586
+ };
7573
7587
  __itemTypeId?: D['itemTypeId'];
7574
7588
  } & ToItemAttributesInRequest<D>;
7575
7589
  /**
@@ -7577,9 +7591,16 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7577
7591
  * via the `validate_new.schema` link.
7578
7592
  */
7579
7593
  export type ItemValidateNewSchema<D extends ItemTypeDefinition = ItemTypeDefinition> = {
7594
+ id?: ItemIdentity;
7580
7595
  type?: ItemType1;
7581
7596
  item_type: ItemTypeData<D>;
7582
7597
  creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
7598
+ /**
7599
+ * Accepted so you can validate the same payload you will send to create the record, but ignored
7600
+ */
7601
+ meta?: {
7602
+ [k: string]: unknown;
7603
+ };
7583
7604
  __itemTypeId?: D['itemTypeId'];
7584
7605
  } & ToItemAttributesInRequest<D>;
7585
7606
  /**
@@ -860,6 +860,13 @@ export type SearchIndexEventInstancesHrefSchema = {
860
860
  order_by?: 'search_index_id_asc' | 'search_index_id_desc' | 'created_at_asc' | 'created_at_desc' | 'event_type_asc' | 'event_type_desc';
861
861
  [k: string]: unknown;
862
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;
863
870
  /**
864
871
  * This interface was referenced by `Item`'s JSON-Schema
865
872
  * via the `instances.hrefSchema` link.
@@ -1723,7 +1730,7 @@ export type SiteSparseFieldset = string;
1723
1730
  */
1724
1731
  export type SiteSelfHrefSchema = {
1725
1732
  /**
1726
- * 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`.
1727
1734
  */
1728
1735
  include?: string;
1729
1736
  /**
@@ -1734,6 +1741,7 @@ export type SiteSelfHrefSchema = {
1734
1741
  item_type?: ItemTypeSparseFieldset;
1735
1742
  field?: FieldSparseFieldset;
1736
1743
  fieldset?: FieldsetSparseFieldset;
1744
+ item?: ItemSparseFieldset;
1737
1745
  account?: AccountSparseFieldset;
1738
1746
  organization?: OrganizationSparseFieldset;
1739
1747
  [k: string]: unknown;
@@ -3548,6 +3556,10 @@ export type AuditLogEventQueryTargetSchema = {
3548
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
3549
3557
  */
3550
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;
3551
3563
  };
3552
3564
  };
3553
3565
  /**
@@ -6801,7 +6813,7 @@ export type PluginAttributes = {
6801
6813
  */
6802
6814
  url: string;
6803
6815
  /**
6804
- * 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`.
6805
6817
  */
6806
6818
  parameters: null | {
6807
6819
  [k: string]: unknown;
@@ -7420,6 +7432,12 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7420
7432
  * The JSON data associated to the record
7421
7433
  */
7422
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
+ };
7423
7441
  relationships?: {
7424
7442
  /**
7425
7443
  * The record's model
@@ -7444,10 +7462,17 @@ export type ItemValidateExistingSchema<D extends ItemTypeDefinition = ItemTypeDe
7444
7462
  export type ItemValidateNewSchema<D extends ItemTypeDefinition = ItemTypeDefinition> = {
7445
7463
  data: {
7446
7464
  type: ItemType1;
7465
+ id?: ItemIdentity;
7447
7466
  /**
7448
7467
  * The JSON data associated to the record
7449
7468
  */
7450
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
+ };
7451
7476
  relationships: {
7452
7477
  /**
7453
7478
  * The record's model
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "6.7.0",
3
+ "version": "6.8.0",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -1115,6 +1115,13 @@ export type SearchIndexEventInstancesHrefSchema = {
1115
1115
  | 'event_type_desc';
1116
1116
  [k: string]: unknown;
1117
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;
1118
1125
  /**
1119
1126
  * This interface was referenced by `Item`'s JSON-Schema
1120
1127
  * via the `instances.targetSchema` link.
@@ -2221,7 +2228,7 @@ export type SiteSparseFieldset = string;
2221
2228
  */
2222
2229
  export type SiteSelfHrefSchema = {
2223
2230
  /**
2224
- * 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`.
2225
2232
  */
2226
2233
  include?: string;
2227
2234
  /**
@@ -2232,6 +2239,7 @@ export type SiteSelfHrefSchema = {
2232
2239
  item_type?: ItemTypeSparseFieldset;
2233
2240
  field?: FieldSparseFieldset;
2234
2241
  fieldset?: FieldsetSparseFieldset;
2242
+ item?: ItemSparseFieldset;
2235
2243
  account?: AccountSparseFieldset;
2236
2244
  organization?: OrganizationSparseFieldset;
2237
2245
  [k: string]: unknown;
@@ -7413,7 +7421,7 @@ export type Plugin = {
7413
7421
  */
7414
7422
  url: string;
7415
7423
  /**
7416
- * 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`.
7417
7425
  */
7418
7426
  parameters: null | {
7419
7427
  [k: string]: unknown;
@@ -7518,7 +7526,7 @@ export type PluginAttributes = {
7518
7526
  */
7519
7527
  url: string;
7520
7528
  /**
7521
- * 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`.
7522
7530
  */
7523
7531
  parameters: null | {
7524
7532
  [k: string]: unknown;
@@ -8136,6 +8144,12 @@ export type ItemValidateExistingSchema<
8136
8144
  | UserData
8137
8145
  | SsoUserData
8138
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
+ };
8139
8153
  __itemTypeId?: D['itemTypeId'];
8140
8154
  } & ToItemAttributesInRequest<D>;
8141
8155
  /**
@@ -8145,6 +8159,7 @@ export type ItemValidateExistingSchema<
8145
8159
  export type ItemValidateNewSchema<
8146
8160
  D extends ItemTypeDefinition = ItemTypeDefinition,
8147
8161
  > = {
8162
+ id?: ItemIdentity;
8148
8163
  type?: ItemType1;
8149
8164
  item_type: ItemTypeData<D>;
8150
8165
  creator?:
@@ -8153,6 +8168,12 @@ export type ItemValidateNewSchema<
8153
8168
  | UserData
8154
8169
  | SsoUserData
8155
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
+ };
8156
8177
  __itemTypeId?: D['itemTypeId'];
8157
8178
  } & ToItemAttributesInRequest<D>;
8158
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.7.0',
154
+ userAgent: '@datocms/cma-client v6.8.0',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {
@@ -920,6 +920,13 @@ export type SearchIndexEventInstancesHrefSchema = {
920
920
  | 'event_type_desc';
921
921
  [k: string]: unknown;
922
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;
923
930
  /**
924
931
  * This interface was referenced by `Item`'s JSON-Schema
925
932
  * via the `instances.hrefSchema` link.
@@ -1831,7 +1838,7 @@ export type SiteSparseFieldset = string;
1831
1838
  */
1832
1839
  export type SiteSelfHrefSchema = {
1833
1840
  /**
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`.
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`.
1835
1842
  */
1836
1843
  include?: string;
1837
1844
  /**
@@ -1842,6 +1849,7 @@ export type SiteSelfHrefSchema = {
1842
1849
  item_type?: ItemTypeSparseFieldset;
1843
1850
  field?: FieldSparseFieldset;
1844
1851
  fieldset?: FieldsetSparseFieldset;
1852
+ item?: ItemSparseFieldset;
1845
1853
  account?: AccountSparseFieldset;
1846
1854
  organization?: OrganizationSparseFieldset;
1847
1855
  [k: string]: unknown;
@@ -3784,6 +3792,10 @@ export type AuditLogEventQueryTargetSchema = {
3784
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
3785
3793
  */
3786
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;
3787
3799
  };
3788
3800
  };
3789
3801
  /**
@@ -7135,7 +7147,7 @@ export type PluginAttributes = {
7135
7147
  */
7136
7148
  url: string;
7137
7149
  /**
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.
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`.
7139
7151
  */
7140
7152
  parameters: null | {
7141
7153
  [k: string]: unknown;
@@ -7818,6 +7830,12 @@ export type ItemValidateExistingSchema<
7818
7830
  * The JSON data associated to the record
7819
7831
  */
7820
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
+ };
7821
7839
  relationships?: {
7822
7840
  /**
7823
7841
  * The record's model
@@ -7849,10 +7867,17 @@ export type ItemValidateNewSchema<
7849
7867
  > = {
7850
7868
  data: {
7851
7869
  type: ItemType1;
7870
+ id?: ItemIdentity;
7852
7871
  /**
7853
7872
  * The JSON data associated to the record
7854
7873
  */
7855
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
+ };
7856
7881
  relationships: {
7857
7882
  /**
7858
7883
  * The record's model