@datocms/cma-client 3.0.5 → 3.0.6

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.
@@ -127,7 +127,7 @@ var Client = /** @class */ (function () {
127
127
  });
128
128
  Client.prototype.request = function (options) {
129
129
  var _this = this;
130
- return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.0.5', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
130
+ return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.0.6', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
131
131
  ? { 'X-Environment': this.config.environment }
132
132
  : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
133
133
  return _this.jobResultsFetcher
@@ -101,7 +101,7 @@ var Client = /** @class */ (function () {
101
101
  });
102
102
  Client.prototype.request = function (options) {
103
103
  var _this = this;
104
- return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.0.5', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
104
+ return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.0.6', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
105
105
  ? { 'X-Environment': this.config.environment }
106
106
  : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
107
107
  return _this.jobResultsFetcher
@@ -3328,6 +3328,7 @@ export declare type MenuItemData = {
3328
3328
  */
3329
3329
  export declare type MenuItemCreateSchema = {
3330
3330
  data: {
3331
+ id?: MenuItemIdentity;
3331
3332
  type: MenuItemType;
3332
3333
  /**
3333
3334
  * JSON API attributes
@@ -3653,6 +3654,7 @@ export declare type ItemTypeMeta = {
3653
3654
  */
3654
3655
  export declare type ItemTypeCreateSchema = {
3655
3656
  data: {
3657
+ id?: ItemTypeIdentity;
3656
3658
  type: ItemTypeType;
3657
3659
  /**
3658
3660
  * JSON API attributes
@@ -4931,6 +4933,7 @@ export declare type FieldRelationships = {
4931
4933
  */
4932
4934
  export declare type FieldCreateSchema = {
4933
4935
  data: {
4936
+ id?: FieldIdentity;
4934
4937
  type: FieldType;
4935
4938
  /**
4936
4939
  * JSON API attributes
@@ -5295,6 +5298,7 @@ export declare type FieldsetRelationships = {
5295
5298
  */
5296
5299
  export declare type FieldsetCreateSchema = {
5297
5300
  data: {
5301
+ id?: FieldsetIdentity;
5298
5302
  type: FieldsetType;
5299
5303
  /**
5300
5304
  * JSON API attributes
@@ -5556,6 +5560,7 @@ export declare type PluginData = {
5556
5560
  */
5557
5561
  export declare type PluginCreateSchema = {
5558
5562
  data: {
5563
+ id?: PluginIdentity;
5559
5564
  type: PluginType;
5560
5565
  attributes: {
5561
5566
  /**
@@ -6090,6 +6095,7 @@ export declare type ItemValidateNewSchema = {
6090
6095
  */
6091
6096
  export declare type ItemCreateSchema = {
6092
6097
  data: {
6098
+ id?: ItemIdentity;
6093
6099
  type: ItemType1;
6094
6100
  /**
6095
6101
  * The JSON data associated to the record
@@ -7122,6 +7128,7 @@ export declare type UploadData = {
7122
7128
  */
7123
7129
  export declare type UploadCreateSchema = {
7124
7130
  data: {
7131
+ id?: UploadIdentity;
7125
7132
  type: UploadType;
7126
7133
  attributes: {
7127
7134
  /**
@@ -8336,6 +8343,7 @@ export declare type ItemTypeFilterRelationships = {
8336
8343
  */
8337
8344
  export declare type ItemTypeFilterCreateSchema = {
8338
8345
  data: {
8346
+ id?: ItemTypeFilterIdentity;
8339
8347
  type: ItemTypeFilterType;
8340
8348
  attributes: {
8341
8349
  /**
@@ -8542,6 +8550,7 @@ export declare type UploadFilterData = {
8542
8550
  */
8543
8551
  export declare type UploadFilterCreateSchema = {
8544
8552
  data: {
8553
+ id?: UploadFilterIdentity;
8545
8554
  type: UploadFilterType;
8546
8555
  /**
8547
8556
  * JSON API attributes
@@ -10021,6 +10030,7 @@ export declare type WorkflowAttributes = {
10021
10030
  */
10022
10031
  export declare type WorkflowCreateSchema = {
10023
10032
  data: {
10033
+ id?: WorkflowIdentity;
10024
10034
  type: WorkflowType;
10025
10035
  /**
10026
10036
  * JSON API attributes
@@ -3929,6 +3929,7 @@ export declare type MenuItemRelationships = {
3929
3929
  * via the `create.schema` link.
3930
3930
  */
3931
3931
  export declare type MenuItemCreateSchema = {
3932
+ id?: MenuItemIdentity;
3932
3933
  type?: MenuItemType;
3933
3934
  /**
3934
3935
  * The label of the menu item
@@ -4202,6 +4203,7 @@ export declare type ItemTypeRelationships = {
4202
4203
  * via the `create.schema` link.
4203
4204
  */
4204
4205
  export declare type ItemTypeCreateSchema = {
4206
+ id?: ItemTypeIdentity;
4205
4207
  type?: ItemTypeType;
4206
4208
  /**
4207
4209
  * Name of the model
@@ -5533,6 +5535,7 @@ export declare type FieldRelationships = {
5533
5535
  * via the `create.schema` link.
5534
5536
  */
5535
5537
  export declare type FieldCreateSchema = {
5538
+ id?: FieldIdentity;
5536
5539
  type?: FieldType;
5537
5540
  /**
5538
5541
  * The label of the field
@@ -5796,6 +5799,7 @@ export declare type FieldsetRelationships = {
5796
5799
  * via the `create.schema` link.
5797
5800
  */
5798
5801
  export declare type FieldsetCreateSchema = {
5802
+ id?: FieldsetIdentity;
5799
5803
  type?: FieldsetType;
5800
5804
  /**
5801
5805
  * The title of the fieldset
@@ -6039,6 +6043,7 @@ export declare type PluginAttributes = {
6039
6043
  * via the `create.schema` link.
6040
6044
  */
6041
6045
  export declare type PluginCreateSchema = {
6046
+ id?: PluginIdentity;
6042
6047
  type?: PluginType;
6043
6048
  /**
6044
6049
  * NPM package name of the public plugin you want to install. For public plugins, that's the only attribute you need to pass.
@@ -6481,6 +6486,7 @@ export declare type ItemValidateNewSchema = {
6481
6486
  * via the `create.schema` link.
6482
6487
  */
6483
6488
  export declare type ItemCreateSchema = {
6489
+ id?: ItemIdentity;
6484
6490
  type?: ItemType1;
6485
6491
  item_type: ItemTypeData;
6486
6492
  creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
@@ -7167,6 +7173,7 @@ export declare type UploadRelationships = {
7167
7173
  * via the `create.schema` link.
7168
7174
  */
7169
7175
  export declare type UploadCreateSchema = {
7176
+ id?: UploadIdentity;
7170
7177
  type?: UploadType;
7171
7178
  /**
7172
7179
  * Upload path
@@ -8370,6 +8377,7 @@ export declare type ItemTypeFilterRelationships = {
8370
8377
  * via the `create.schema` link.
8371
8378
  */
8372
8379
  export declare type ItemTypeFilterCreateSchema = {
8380
+ id?: ItemTypeFilterIdentity;
8373
8381
  type?: ItemTypeFilterType;
8374
8382
  /**
8375
8383
  * The name of the filter
@@ -8533,6 +8541,7 @@ export declare type UploadFilterAttributes = {
8533
8541
  * via the `create.schema` link.
8534
8542
  */
8535
8543
  export declare type UploadFilterCreateSchema = {
8544
+ id?: UploadFilterIdentity;
8536
8545
  type?: UploadFilterType;
8537
8546
  /**
8538
8547
  * The name of the filter
@@ -9942,6 +9951,7 @@ export declare type WorkflowAttributes = {
9942
9951
  * via the `create.schema` link.
9943
9952
  */
9944
9953
  export declare type WorkflowCreateSchema = {
9954
+ id?: WorkflowIdentity;
9945
9955
  type?: WorkflowType;
9946
9956
  /**
9947
9957
  * The name of the workflow
@@ -3328,6 +3328,7 @@ export declare type MenuItemData = {
3328
3328
  */
3329
3329
  export declare type MenuItemCreateSchema = {
3330
3330
  data: {
3331
+ id?: MenuItemIdentity;
3331
3332
  type: MenuItemType;
3332
3333
  /**
3333
3334
  * JSON API attributes
@@ -3653,6 +3654,7 @@ export declare type ItemTypeMeta = {
3653
3654
  */
3654
3655
  export declare type ItemTypeCreateSchema = {
3655
3656
  data: {
3657
+ id?: ItemTypeIdentity;
3656
3658
  type: ItemTypeType;
3657
3659
  /**
3658
3660
  * JSON API attributes
@@ -4931,6 +4933,7 @@ export declare type FieldRelationships = {
4931
4933
  */
4932
4934
  export declare type FieldCreateSchema = {
4933
4935
  data: {
4936
+ id?: FieldIdentity;
4934
4937
  type: FieldType;
4935
4938
  /**
4936
4939
  * JSON API attributes
@@ -5295,6 +5298,7 @@ export declare type FieldsetRelationships = {
5295
5298
  */
5296
5299
  export declare type FieldsetCreateSchema = {
5297
5300
  data: {
5301
+ id?: FieldsetIdentity;
5298
5302
  type: FieldsetType;
5299
5303
  /**
5300
5304
  * JSON API attributes
@@ -5556,6 +5560,7 @@ export declare type PluginData = {
5556
5560
  */
5557
5561
  export declare type PluginCreateSchema = {
5558
5562
  data: {
5563
+ id?: PluginIdentity;
5559
5564
  type: PluginType;
5560
5565
  attributes: {
5561
5566
  /**
@@ -6090,6 +6095,7 @@ export declare type ItemValidateNewSchema = {
6090
6095
  */
6091
6096
  export declare type ItemCreateSchema = {
6092
6097
  data: {
6098
+ id?: ItemIdentity;
6093
6099
  type: ItemType1;
6094
6100
  /**
6095
6101
  * The JSON data associated to the record
@@ -7122,6 +7128,7 @@ export declare type UploadData = {
7122
7128
  */
7123
7129
  export declare type UploadCreateSchema = {
7124
7130
  data: {
7131
+ id?: UploadIdentity;
7125
7132
  type: UploadType;
7126
7133
  attributes: {
7127
7134
  /**
@@ -8336,6 +8343,7 @@ export declare type ItemTypeFilterRelationships = {
8336
8343
  */
8337
8344
  export declare type ItemTypeFilterCreateSchema = {
8338
8345
  data: {
8346
+ id?: ItemTypeFilterIdentity;
8339
8347
  type: ItemTypeFilterType;
8340
8348
  attributes: {
8341
8349
  /**
@@ -8542,6 +8550,7 @@ export declare type UploadFilterData = {
8542
8550
  */
8543
8551
  export declare type UploadFilterCreateSchema = {
8544
8552
  data: {
8553
+ id?: UploadFilterIdentity;
8545
8554
  type: UploadFilterType;
8546
8555
  /**
8547
8556
  * JSON API attributes
@@ -10021,6 +10030,7 @@ export declare type WorkflowAttributes = {
10021
10030
  */
10022
10031
  export declare type WorkflowCreateSchema = {
10023
10032
  data: {
10033
+ id?: WorkflowIdentity;
10024
10034
  type: WorkflowType;
10025
10035
  /**
10026
10036
  * JSON API attributes
@@ -3929,6 +3929,7 @@ export declare type MenuItemRelationships = {
3929
3929
  * via the `create.schema` link.
3930
3930
  */
3931
3931
  export declare type MenuItemCreateSchema = {
3932
+ id?: MenuItemIdentity;
3932
3933
  type?: MenuItemType;
3933
3934
  /**
3934
3935
  * The label of the menu item
@@ -4202,6 +4203,7 @@ export declare type ItemTypeRelationships = {
4202
4203
  * via the `create.schema` link.
4203
4204
  */
4204
4205
  export declare type ItemTypeCreateSchema = {
4206
+ id?: ItemTypeIdentity;
4205
4207
  type?: ItemTypeType;
4206
4208
  /**
4207
4209
  * Name of the model
@@ -5533,6 +5535,7 @@ export declare type FieldRelationships = {
5533
5535
  * via the `create.schema` link.
5534
5536
  */
5535
5537
  export declare type FieldCreateSchema = {
5538
+ id?: FieldIdentity;
5536
5539
  type?: FieldType;
5537
5540
  /**
5538
5541
  * The label of the field
@@ -5796,6 +5799,7 @@ export declare type FieldsetRelationships = {
5796
5799
  * via the `create.schema` link.
5797
5800
  */
5798
5801
  export declare type FieldsetCreateSchema = {
5802
+ id?: FieldsetIdentity;
5799
5803
  type?: FieldsetType;
5800
5804
  /**
5801
5805
  * The title of the fieldset
@@ -6039,6 +6043,7 @@ export declare type PluginAttributes = {
6039
6043
  * via the `create.schema` link.
6040
6044
  */
6041
6045
  export declare type PluginCreateSchema = {
6046
+ id?: PluginIdentity;
6042
6047
  type?: PluginType;
6043
6048
  /**
6044
6049
  * NPM package name of the public plugin you want to install. For public plugins, that's the only attribute you need to pass.
@@ -6481,6 +6486,7 @@ export declare type ItemValidateNewSchema = {
6481
6486
  * via the `create.schema` link.
6482
6487
  */
6483
6488
  export declare type ItemCreateSchema = {
6489
+ id?: ItemIdentity;
6484
6490
  type?: ItemType1;
6485
6491
  item_type: ItemTypeData;
6486
6492
  creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
@@ -7167,6 +7173,7 @@ export declare type UploadRelationships = {
7167
7173
  * via the `create.schema` link.
7168
7174
  */
7169
7175
  export declare type UploadCreateSchema = {
7176
+ id?: UploadIdentity;
7170
7177
  type?: UploadType;
7171
7178
  /**
7172
7179
  * Upload path
@@ -8370,6 +8377,7 @@ export declare type ItemTypeFilterRelationships = {
8370
8377
  * via the `create.schema` link.
8371
8378
  */
8372
8379
  export declare type ItemTypeFilterCreateSchema = {
8380
+ id?: ItemTypeFilterIdentity;
8373
8381
  type?: ItemTypeFilterType;
8374
8382
  /**
8375
8383
  * The name of the filter
@@ -8533,6 +8541,7 @@ export declare type UploadFilterAttributes = {
8533
8541
  * via the `create.schema` link.
8534
8542
  */
8535
8543
  export declare type UploadFilterCreateSchema = {
8544
+ id?: UploadFilterIdentity;
8536
8545
  type?: UploadFilterType;
8537
8546
  /**
8538
8547
  * The name of the filter
@@ -9942,6 +9951,7 @@ export declare type WorkflowAttributes = {
9942
9951
  * via the `create.schema` link.
9943
9952
  */
9944
9953
  export declare type WorkflowCreateSchema = {
9954
+ id?: WorkflowIdentity;
9945
9955
  type?: WorkflowType;
9946
9956
  /**
9947
9957
  * The name of the workflow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -44,5 +44,5 @@
44
44
  "@datocms/dashboard-client": "^3.0.5",
45
45
  "@types/uuid": "^9.0.7"
46
46
  },
47
- "gitHead": "ac36c1649815c85b27d86f7a9fc87b9bb44e1596"
47
+ "gitHead": "cee3f805421882ded88e56e4a76a4710df5ce2d9"
48
48
  }
@@ -135,7 +135,7 @@ export class Client {
135
135
  ...this.config,
136
136
  ...options,
137
137
  logFn: this.config.logFn || console.log,
138
- userAgent: '@datocms/cma-client v3.0.5',
138
+ userAgent: '@datocms/cma-client v3.0.6',
139
139
  baseUrl: this.baseUrl,
140
140
  preCallStack: new Error().stack,
141
141
  extraHeaders: {
@@ -3553,6 +3553,7 @@ export type MenuItemData = {
3553
3553
  */
3554
3554
  export type MenuItemCreateSchema = {
3555
3555
  data: {
3556
+ id?: MenuItemIdentity;
3556
3557
  type: MenuItemType;
3557
3558
  /**
3558
3559
  * JSON API attributes
@@ -3898,6 +3899,7 @@ export type ItemTypeMeta = {
3898
3899
  */
3899
3900
  export type ItemTypeCreateSchema = {
3900
3901
  data: {
3902
+ id?: ItemTypeIdentity;
3901
3903
  type: ItemTypeType;
3902
3904
  /**
3903
3905
  * JSON API attributes
@@ -5225,6 +5227,7 @@ export type FieldRelationships = {
5225
5227
  */
5226
5228
  export type FieldCreateSchema = {
5227
5229
  data: {
5230
+ id?: FieldIdentity;
5228
5231
  type: FieldType;
5229
5232
  /**
5230
5233
  * JSON API attributes
@@ -5654,6 +5657,7 @@ export type FieldsetRelationships = {
5654
5657
  */
5655
5658
  export type FieldsetCreateSchema = {
5656
5659
  data: {
5660
+ id?: FieldsetIdentity;
5657
5661
  type: FieldsetType;
5658
5662
  /**
5659
5663
  * JSON API attributes
@@ -5952,6 +5956,7 @@ export type PluginData = {
5952
5956
  */
5953
5957
  export type PluginCreateSchema = {
5954
5958
  data: {
5959
+ id?: PluginIdentity;
5955
5960
  type: PluginType;
5956
5961
  attributes: {
5957
5962
  /**
@@ -6564,6 +6569,7 @@ export type ItemValidateNewSchema = {
6564
6569
  */
6565
6570
  export type ItemCreateSchema = {
6566
6571
  data: {
6572
+ id?: ItemIdentity;
6567
6573
  type: ItemType1;
6568
6574
  /**
6569
6575
  * The JSON data associated to the record
@@ -7678,6 +7684,7 @@ export type UploadData = {
7678
7684
  */
7679
7685
  export type UploadCreateSchema = {
7680
7686
  data: {
7687
+ id?: UploadIdentity;
7681
7688
  type: UploadType;
7682
7689
  attributes: {
7683
7690
  /**
@@ -8972,6 +8979,7 @@ export type ItemTypeFilterRelationships = {
8972
8979
  */
8973
8980
  export type ItemTypeFilterCreateSchema = {
8974
8981
  data: {
8982
+ id?: ItemTypeFilterIdentity;
8975
8983
  type: ItemTypeFilterType;
8976
8984
  attributes: {
8977
8985
  /**
@@ -9192,6 +9200,7 @@ export type UploadFilterData = {
9192
9200
  */
9193
9201
  export type UploadFilterCreateSchema = {
9194
9202
  data: {
9203
+ id?: UploadFilterIdentity;
9195
9204
  type: UploadFilterType;
9196
9205
  /**
9197
9206
  * JSON API attributes
@@ -10765,6 +10774,7 @@ export type WorkflowAttributes = {
10765
10774
  */
10766
10775
  export type WorkflowCreateSchema = {
10767
10776
  data: {
10777
+ id?: WorkflowIdentity;
10768
10778
  type: WorkflowType;
10769
10779
  /**
10770
10780
  * JSON API attributes
@@ -4168,6 +4168,7 @@ export type MenuItemRelationships = {
4168
4168
  * via the `create.schema` link.
4169
4169
  */
4170
4170
  export type MenuItemCreateSchema = {
4171
+ id?: MenuItemIdentity;
4171
4172
  type?: MenuItemType;
4172
4173
  /**
4173
4174
  * The label of the menu item
@@ -4460,6 +4461,7 @@ export type ItemTypeRelationships = {
4460
4461
  * via the `create.schema` link.
4461
4462
  */
4462
4463
  export type ItemTypeCreateSchema = {
4464
+ id?: ItemTypeIdentity;
4463
4465
  type?: ItemTypeType;
4464
4466
  /**
4465
4467
  * Name of the model
@@ -5854,6 +5856,7 @@ export type FieldRelationships = {
5854
5856
  * via the `create.schema` link.
5855
5857
  */
5856
5858
  export type FieldCreateSchema = {
5859
+ id?: FieldIdentity;
5857
5860
  type?: FieldType;
5858
5861
  /**
5859
5862
  * The label of the field
@@ -6169,6 +6172,7 @@ export type FieldsetRelationships = {
6169
6172
  * via the `create.schema` link.
6170
6173
  */
6171
6174
  export type FieldsetCreateSchema = {
6175
+ id?: FieldsetIdentity;
6172
6176
  type?: FieldsetType;
6173
6177
  /**
6174
6178
  * The title of the fieldset
@@ -6462,6 +6466,7 @@ export type PluginAttributes = {
6462
6466
  * via the `create.schema` link.
6463
6467
  */
6464
6468
  export type PluginCreateSchema = {
6469
+ id?: PluginIdentity;
6465
6470
  type?: PluginType;
6466
6471
  /**
6467
6472
  * NPM package name of the public plugin you want to install. For public plugins, that's the only attribute you need to pass.
@@ -6979,6 +6984,7 @@ export type ItemValidateNewSchema = {
6979
6984
  * via the `create.schema` link.
6980
6985
  */
6981
6986
  export type ItemCreateSchema = {
6987
+ id?: ItemIdentity;
6982
6988
  type?: ItemType1;
6983
6989
  item_type: ItemTypeData;
6984
6990
  creator?:
@@ -7714,6 +7720,7 @@ export type UploadRelationships = {
7714
7720
  * via the `create.schema` link.
7715
7721
  */
7716
7722
  export type UploadCreateSchema = {
7723
+ id?: UploadIdentity;
7717
7724
  type?: UploadType;
7718
7725
  /**
7719
7726
  * Upload path
@@ -8960,6 +8967,7 @@ export type ItemTypeFilterRelationships = {
8960
8967
  * via the `create.schema` link.
8961
8968
  */
8962
8969
  export type ItemTypeFilterCreateSchema = {
8970
+ id?: ItemTypeFilterIdentity;
8963
8971
  type?: ItemTypeFilterType;
8964
8972
  /**
8965
8973
  * The name of the filter
@@ -9131,6 +9139,7 @@ export type UploadFilterAttributes = {
9131
9139
  * via the `create.schema` link.
9132
9140
  */
9133
9141
  export type UploadFilterCreateSchema = {
9142
+ id?: UploadFilterIdentity;
9134
9143
  type?: UploadFilterType;
9135
9144
  /**
9136
9145
  * The name of the filter
@@ -10584,6 +10593,7 @@ export type WorkflowAttributes = {
10584
10593
  * via the `create.schema` link.
10585
10594
  */
10586
10595
  export type WorkflowCreateSchema = {
10596
+ id?: WorkflowIdentity;
10587
10597
  type?: WorkflowType;
10588
10598
  /**
10589
10599
  * The name of the workflow