@datocms/cma-client 1.1.12 → 1.1.13

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 v1.1.12', 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 v1.1.13', 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 v1.1.12', 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 v1.1.13', 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
@@ -3315,6 +3315,7 @@ export declare type ItemType = {
3315
3315
  id: ItemTypeIdentity;
3316
3316
  attributes: ItemTypeAttributes;
3317
3317
  relationships: ItemTypeRelationships;
3318
+ meta: ItemTypeMeta;
3318
3319
  };
3319
3320
  /**
3320
3321
  * JSON API attributes
@@ -3334,7 +3335,7 @@ export declare type ItemTypeAttributes = {
3334
3335
  /**
3335
3336
  * The way the model collection should be presented to the editors
3336
3337
  */
3337
- collection_appeareance: 'compact' | 'table';
3338
+ collection_appeareance?: 'compact' | 'table';
3338
3339
  /**
3339
3340
  * The way the model collection should be presented to the editors
3340
3341
  */
@@ -3480,6 +3481,18 @@ export declare type WorkflowData = {
3480
3481
  type: WorkflowType;
3481
3482
  id: WorkflowIdentity;
3482
3483
  };
3484
+ /**
3485
+ * Meta information regarding the item type
3486
+ *
3487
+ * This interface was referenced by `ItemType`'s JSON-Schema
3488
+ * via the `definition` "meta".
3489
+ */
3490
+ export declare type ItemTypeMeta = {
3491
+ /**
3492
+ * If this model is single-instance, this tells the single-instance record has already been created or not
3493
+ */
3494
+ has_singleton_item: boolean;
3495
+ };
3483
3496
  /**
3484
3497
  * This interface was referenced by `ItemType`'s JSON-Schema
3485
3498
  * via the `create.schema` link.
@@ -3695,6 +3708,12 @@ export declare type ItemTypeUpdateSchema = {
3695
3708
  data: WorkflowData | null;
3696
3709
  };
3697
3710
  };
3711
+ meta?: {
3712
+ /**
3713
+ * If this model is single-instance, this tells the single-instance record has already been created or not
3714
+ */
3715
+ has_singleton_item?: boolean;
3716
+ };
3698
3717
  };
3699
3718
  };
3700
3719
  /**
@@ -4651,7 +4670,7 @@ export declare type FieldAttributes = {
4651
4670
  /**
4652
4671
  * Field appearance
4653
4672
  */
4654
- appeareance: {
4673
+ appeareance?: {
4655
4674
  editor: string;
4656
4675
  parameters: {
4657
4676
  [k: string]: unknown;
@@ -3839,7 +3839,7 @@ export declare type ItemType = {
3839
3839
  /**
3840
3840
  * The way the model collection should be presented to the editors
3841
3841
  */
3842
- collection_appeareance: 'compact' | 'table';
3842
+ collection_appeareance?: 'compact' | 'table';
3843
3843
  /**
3844
3844
  * The way the model collection should be presented to the editors
3845
3845
  */
@@ -3896,6 +3896,7 @@ export declare type ItemType = {
3896
3896
  excerpt_field: FieldData | null;
3897
3897
  ordering_field: FieldData | null;
3898
3898
  workflow: WorkflowData | null;
3899
+ meta: ItemTypeMeta;
3899
3900
  };
3900
3901
  export declare type ItemTypeCreateTargetSchema = ItemType;
3901
3902
  export declare type ItemTypeUpdateJobSchema = ItemType;
@@ -3942,6 +3943,18 @@ export declare type WorkflowData = {
3942
3943
  type: WorkflowType;
3943
3944
  id: WorkflowIdentity;
3944
3945
  };
3946
+ /**
3947
+ * Meta information regarding the item type
3948
+ *
3949
+ * This interface was referenced by `ItemType`'s JSON-Schema
3950
+ * via the `definition` "meta".
3951
+ */
3952
+ export declare type ItemTypeMeta = {
3953
+ /**
3954
+ * If this model is single-instance, this tells the single-instance record has already been created or not
3955
+ */
3956
+ has_singleton_item: boolean;
3957
+ };
3945
3958
  /**
3946
3959
  * JSON API attributes
3947
3960
  *
@@ -3960,7 +3973,7 @@ export declare type ItemTypeAttributes = {
3960
3973
  /**
3961
3974
  * The way the model collection should be presented to the editors
3962
3975
  */
3963
- collection_appeareance: 'compact' | 'table';
3976
+ collection_appeareance?: 'compact' | 'table';
3964
3977
  /**
3965
3978
  * The way the model collection should be presented to the editors
3966
3979
  */
@@ -4166,6 +4179,12 @@ export declare type ItemTypeUpdateSchema = {
4166
4179
  image_preview_field?: FieldData | null;
4167
4180
  excerpt_field?: FieldData | null;
4168
4181
  workflow?: WorkflowData | null;
4182
+ meta?: {
4183
+ /**
4184
+ * If this model is single-instance, this tells the single-instance record has already been created or not
4185
+ */
4186
+ has_singleton_item?: boolean;
4187
+ };
4169
4188
  };
4170
4189
  /**
4171
4190
  * This interface was referenced by `ItemType`'s JSON-Schema
@@ -5158,7 +5177,7 @@ export declare type Field = {
5158
5177
  /**
5159
5178
  * Field appearance
5160
5179
  */
5161
- appeareance: {
5180
+ appeareance?: {
5162
5181
  editor: string;
5163
5182
  parameters: {
5164
5183
  [k: string]: unknown;
@@ -5256,7 +5275,7 @@ export declare type FieldAttributes = {
5256
5275
  /**
5257
5276
  * Field appearance
5258
5277
  */
5259
- appeareance: {
5278
+ appeareance?: {
5260
5279
  editor: string;
5261
5280
  parameters: {
5262
5281
  [k: string]: unknown;
@@ -3315,6 +3315,7 @@ export declare type ItemType = {
3315
3315
  id: ItemTypeIdentity;
3316
3316
  attributes: ItemTypeAttributes;
3317
3317
  relationships: ItemTypeRelationships;
3318
+ meta: ItemTypeMeta;
3318
3319
  };
3319
3320
  /**
3320
3321
  * JSON API attributes
@@ -3334,7 +3335,7 @@ export declare type ItemTypeAttributes = {
3334
3335
  /**
3335
3336
  * The way the model collection should be presented to the editors
3336
3337
  */
3337
- collection_appeareance: 'compact' | 'table';
3338
+ collection_appeareance?: 'compact' | 'table';
3338
3339
  /**
3339
3340
  * The way the model collection should be presented to the editors
3340
3341
  */
@@ -3480,6 +3481,18 @@ export declare type WorkflowData = {
3480
3481
  type: WorkflowType;
3481
3482
  id: WorkflowIdentity;
3482
3483
  };
3484
+ /**
3485
+ * Meta information regarding the item type
3486
+ *
3487
+ * This interface was referenced by `ItemType`'s JSON-Schema
3488
+ * via the `definition` "meta".
3489
+ */
3490
+ export declare type ItemTypeMeta = {
3491
+ /**
3492
+ * If this model is single-instance, this tells the single-instance record has already been created or not
3493
+ */
3494
+ has_singleton_item: boolean;
3495
+ };
3483
3496
  /**
3484
3497
  * This interface was referenced by `ItemType`'s JSON-Schema
3485
3498
  * via the `create.schema` link.
@@ -3695,6 +3708,12 @@ export declare type ItemTypeUpdateSchema = {
3695
3708
  data: WorkflowData | null;
3696
3709
  };
3697
3710
  };
3711
+ meta?: {
3712
+ /**
3713
+ * If this model is single-instance, this tells the single-instance record has already been created or not
3714
+ */
3715
+ has_singleton_item?: boolean;
3716
+ };
3698
3717
  };
3699
3718
  };
3700
3719
  /**
@@ -4651,7 +4670,7 @@ export declare type FieldAttributes = {
4651
4670
  /**
4652
4671
  * Field appearance
4653
4672
  */
4654
- appeareance: {
4673
+ appeareance?: {
4655
4674
  editor: string;
4656
4675
  parameters: {
4657
4676
  [k: string]: unknown;
@@ -3839,7 +3839,7 @@ export declare type ItemType = {
3839
3839
  /**
3840
3840
  * The way the model collection should be presented to the editors
3841
3841
  */
3842
- collection_appeareance: 'compact' | 'table';
3842
+ collection_appeareance?: 'compact' | 'table';
3843
3843
  /**
3844
3844
  * The way the model collection should be presented to the editors
3845
3845
  */
@@ -3896,6 +3896,7 @@ export declare type ItemType = {
3896
3896
  excerpt_field: FieldData | null;
3897
3897
  ordering_field: FieldData | null;
3898
3898
  workflow: WorkflowData | null;
3899
+ meta: ItemTypeMeta;
3899
3900
  };
3900
3901
  export declare type ItemTypeCreateTargetSchema = ItemType;
3901
3902
  export declare type ItemTypeUpdateJobSchema = ItemType;
@@ -3942,6 +3943,18 @@ export declare type WorkflowData = {
3942
3943
  type: WorkflowType;
3943
3944
  id: WorkflowIdentity;
3944
3945
  };
3946
+ /**
3947
+ * Meta information regarding the item type
3948
+ *
3949
+ * This interface was referenced by `ItemType`'s JSON-Schema
3950
+ * via the `definition` "meta".
3951
+ */
3952
+ export declare type ItemTypeMeta = {
3953
+ /**
3954
+ * If this model is single-instance, this tells the single-instance record has already been created or not
3955
+ */
3956
+ has_singleton_item: boolean;
3957
+ };
3945
3958
  /**
3946
3959
  * JSON API attributes
3947
3960
  *
@@ -3960,7 +3973,7 @@ export declare type ItemTypeAttributes = {
3960
3973
  /**
3961
3974
  * The way the model collection should be presented to the editors
3962
3975
  */
3963
- collection_appeareance: 'compact' | 'table';
3976
+ collection_appeareance?: 'compact' | 'table';
3964
3977
  /**
3965
3978
  * The way the model collection should be presented to the editors
3966
3979
  */
@@ -4166,6 +4179,12 @@ export declare type ItemTypeUpdateSchema = {
4166
4179
  image_preview_field?: FieldData | null;
4167
4180
  excerpt_field?: FieldData | null;
4168
4181
  workflow?: WorkflowData | null;
4182
+ meta?: {
4183
+ /**
4184
+ * If this model is single-instance, this tells the single-instance record has already been created or not
4185
+ */
4186
+ has_singleton_item?: boolean;
4187
+ };
4169
4188
  };
4170
4189
  /**
4171
4190
  * This interface was referenced by `ItemType`'s JSON-Schema
@@ -5158,7 +5177,7 @@ export declare type Field = {
5158
5177
  /**
5159
5178
  * Field appearance
5160
5179
  */
5161
- appeareance: {
5180
+ appeareance?: {
5162
5181
  editor: string;
5163
5182
  parameters: {
5164
5183
  [k: string]: unknown;
@@ -5256,7 +5275,7 @@ export declare type FieldAttributes = {
5256
5275
  /**
5257
5276
  * Field appearance
5258
5277
  */
5259
- appeareance: {
5278
+ appeareance?: {
5260
5279
  editor: string;
5261
5280
  parameters: {
5262
5281
  [k: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -40,7 +40,7 @@
40
40
  "@datocms/rest-client-utils": "^1.1.12"
41
41
  },
42
42
  "devDependencies": {
43
- "@datocms/dashboard-client": "^1.1.12"
43
+ "@datocms/dashboard-client": "^1.1.13"
44
44
  },
45
- "gitHead": "20f895c824269b2c1a4a51a3abb329d840d24b2a"
45
+ "gitHead": "502fe35083b2a9ba1407fb3fb9c13d3394a0655d"
46
46
  }
@@ -133,7 +133,7 @@ export class Client {
133
133
  ...this.config,
134
134
  ...options,
135
135
  logFn: this.config.logFn || console.log,
136
- userAgent: '@datocms/cma-client v1.1.12',
136
+ userAgent: '@datocms/cma-client v1.1.13',
137
137
  baseUrl: this.baseUrl,
138
138
  preCallStack: new Error().stack,
139
139
  extraHeaders: {
@@ -3546,6 +3546,7 @@ export type ItemType = {
3546
3546
  id: ItemTypeIdentity;
3547
3547
  attributes: ItemTypeAttributes;
3548
3548
  relationships: ItemTypeRelationships;
3549
+ meta: ItemTypeMeta;
3549
3550
  };
3550
3551
 
3551
3552
  /**
@@ -3566,7 +3567,7 @@ export type ItemTypeAttributes = {
3566
3567
  /**
3567
3568
  * The way the model collection should be presented to the editors
3568
3569
  */
3569
- collection_appeareance: 'compact' | 'table';
3570
+ collection_appeareance?: 'compact' | 'table';
3570
3571
  /**
3571
3572
  * The way the model collection should be presented to the editors
3572
3573
  */
@@ -3723,6 +3724,19 @@ export type WorkflowData = {
3723
3724
  id: WorkflowIdentity;
3724
3725
  };
3725
3726
 
3727
+ /**
3728
+ * Meta information regarding the item type
3729
+ *
3730
+ * This interface was referenced by `ItemType`'s JSON-Schema
3731
+ * via the `definition` "meta".
3732
+ */
3733
+ export type ItemTypeMeta = {
3734
+ /**
3735
+ * If this model is single-instance, this tells the single-instance record has already been created or not
3736
+ */
3737
+ has_singleton_item: boolean;
3738
+ };
3739
+
3726
3740
  /**
3727
3741
  * This interface was referenced by `ItemType`'s JSON-Schema
3728
3742
  * via the `create.schema` link.
@@ -3950,6 +3964,12 @@ export type ItemTypeUpdateSchema = {
3950
3964
  data: WorkflowData | null;
3951
3965
  };
3952
3966
  };
3967
+ meta?: {
3968
+ /**
3969
+ * If this model is single-instance, this tells the single-instance record has already been created or not
3970
+ */
3971
+ has_singleton_item?: boolean;
3972
+ };
3953
3973
  };
3954
3974
  };
3955
3975
 
@@ -4922,7 +4942,7 @@ export type FieldAttributes = {
4922
4942
  /**
4923
4943
  * Field appearance
4924
4944
  */
4925
- appeareance: {
4945
+ appeareance?: {
4926
4946
  editor: string;
4927
4947
  parameters: {
4928
4948
  [k: string]: unknown;
@@ -4077,7 +4077,7 @@ export type ItemType = {
4077
4077
  /**
4078
4078
  * The way the model collection should be presented to the editors
4079
4079
  */
4080
- collection_appeareance: 'compact' | 'table';
4080
+ collection_appeareance?: 'compact' | 'table';
4081
4081
  /**
4082
4082
  * The way the model collection should be presented to the editors
4083
4083
  */
@@ -4139,6 +4139,7 @@ export type ItemType = {
4139
4139
  excerpt_field: FieldData | null;
4140
4140
  ordering_field: FieldData | null;
4141
4141
  workflow: WorkflowData | null;
4142
+ meta: ItemTypeMeta;
4142
4143
  };
4143
4144
  export type ItemTypeCreateTargetSchema = ItemType;
4144
4145
  export type ItemTypeUpdateJobSchema = ItemType;
@@ -4189,6 +4190,19 @@ export type WorkflowData = {
4189
4190
  id: WorkflowIdentity;
4190
4191
  };
4191
4192
 
4193
+ /**
4194
+ * Meta information regarding the item type
4195
+ *
4196
+ * This interface was referenced by `ItemType`'s JSON-Schema
4197
+ * via the `definition` "meta".
4198
+ */
4199
+ export type ItemTypeMeta = {
4200
+ /**
4201
+ * If this model is single-instance, this tells the single-instance record has already been created or not
4202
+ */
4203
+ has_singleton_item: boolean;
4204
+ };
4205
+
4192
4206
  /**
4193
4207
  * JSON API attributes
4194
4208
  *
@@ -4207,7 +4221,7 @@ export type ItemTypeAttributes = {
4207
4221
  /**
4208
4222
  * The way the model collection should be presented to the editors
4209
4223
  */
4210
- collection_appeareance: 'compact' | 'table';
4224
+ collection_appeareance?: 'compact' | 'table';
4211
4225
  /**
4212
4226
  * The way the model collection should be presented to the editors
4213
4227
  */
@@ -4431,6 +4445,12 @@ export type ItemTypeUpdateSchema = {
4431
4445
  image_preview_field?: FieldData | null;
4432
4446
  excerpt_field?: FieldData | null;
4433
4447
  workflow?: WorkflowData | null;
4448
+ meta?: {
4449
+ /**
4450
+ * If this model is single-instance, this tells the single-instance record has already been created or not
4451
+ */
4452
+ has_singleton_item?: boolean;
4453
+ };
4434
4454
  };
4435
4455
 
4436
4456
  /**
@@ -5430,7 +5450,7 @@ export type Field = {
5430
5450
  /**
5431
5451
  * Field appearance
5432
5452
  */
5433
- appeareance: {
5453
+ appeareance?: {
5434
5454
  editor: string;
5435
5455
  parameters: {
5436
5456
  [k: string]: unknown;
@@ -5533,7 +5553,7 @@ export type FieldAttributes = {
5533
5553
  /**
5534
5554
  * Field appearance
5535
5555
  */
5536
- appeareance: {
5556
+ appeareance?: {
5537
5557
  editor: string;
5538
5558
  parameters: {
5539
5559
  [k: string]: unknown;