@datocms/cma-client 3.4.0 → 3.4.1

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.
@@ -246,6 +246,68 @@ var Site = /** @class */ (function (_super) {
246
246
  url: '/site/activate-improved-boolean-fields',
247
247
  });
248
248
  };
249
+ /**
250
+ * Set draft mode default to true for all environment's models
251
+ *
252
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default
253
+ *
254
+ * @throws {ApiError}
255
+ * @throws {TimeoutError}
256
+ *
257
+ * @deprecated This API call is to be considered private and might change without notice
258
+ */
259
+ Site.prototype.activateDraftModeAsDefault = function () {
260
+ return this.rawActivateDraftModeAsDefault().then(function (body) {
261
+ return Utils.deserializeResponseBody(body);
262
+ });
263
+ };
264
+ /**
265
+ * Set draft mode default to true for all environment's models
266
+ *
267
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default
268
+ *
269
+ * @throws {ApiError}
270
+ * @throws {TimeoutError}
271
+ *
272
+ * @deprecated This API call is to be considered private and might change without notice
273
+ */
274
+ Site.prototype.rawActivateDraftModeAsDefault = function () {
275
+ return this.client.request({
276
+ method: 'PUT',
277
+ url: '/site/activate-draft-mode-as-default',
278
+ });
279
+ };
280
+ /**
281
+ * Activate improved validation at publishing option
282
+ *
283
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing
284
+ *
285
+ * @throws {ApiError}
286
+ * @throws {TimeoutError}
287
+ *
288
+ * @deprecated This API call is to be considered private and might change without notice
289
+ */
290
+ Site.prototype.activateImprovedValidationAtPublishing = function () {
291
+ return this.rawActivateImprovedValidationAtPublishing().then(function (body) {
292
+ return Utils.deserializeResponseBody(body);
293
+ });
294
+ };
295
+ /**
296
+ * Activate improved validation at publishing option
297
+ *
298
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing
299
+ *
300
+ * @throws {ApiError}
301
+ * @throws {TimeoutError}
302
+ *
303
+ * @deprecated This API call is to be considered private and might change without notice
304
+ */
305
+ Site.prototype.rawActivateImprovedValidationAtPublishing = function () {
306
+ return this.client.request({
307
+ method: 'PUT',
308
+ url: '/site/activate-improved-validation-at-publishing',
309
+ });
310
+ };
249
311
  /**
250
312
  * Update CDN settings default assets
251
313
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Site.js","sourceRoot":"","sources":["../../../../src/generated/resources/Site.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAI9C;IAAkC,wBAAY;IAA9C;;IAmUA,CAAC;IAhUC;;;;;;;OAOG;IACH,mBAAI,GAAJ,UAAK,WAAkD;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAC,IAAI;YACzC,OAAA,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL;QAFD,CAEC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,sBAAO,GAAP,UACE,WAA4C;QAE5C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAmC;YAC3D,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;YACZ,WAAW,aAAA;SACZ,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,qBAAM,GAAN,UAAO,IAAwC;QAC7C,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAA+B,IAAI,EAAE;YAC7D,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE;gBACV,UAAU;gBACV,SAAS;gBACT,YAAY;gBACZ,MAAM;gBACN,OAAO;gBACP,SAAS;gBACT,UAAU;gBACV,aAAa;gBACb,qBAAqB;gBACrB,mCAAmC;aACpC;YACD,aAAa,EAAE,CAAC,kBAAkB,CAAC;SACpC,CAAC,CACH,CAAC,IAAI,CAAC,UA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;IACH,qDAAsC,GAAtC;QACE,OAAO,IAAI,CAAC,yCAAyC,EAAE,CAAC,IAAI,CAAC,UAAC,IAAI;YAChE,OAAA,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL;QAFD,CAEC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,wDAAyC,GAAzC;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,kDAAkD;SACxD,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,6CAA8B,GAA9B,UACE,IAAgE;QAEhE,OAAO,IAAI,CAAC,iCAAiC,CAC3C,KAAK,CAAC,oBAAoB,CACxB,IAAI,EACJ;YACE,IAAI,EAAE,6BAA6B;YACnC,UAAU,EAAE,CAAC,6BAA6B,CAAC;YAC3C,aAAa,EAAE,EAAE;SAClB,CACF,CACF,CAAC,IAAI,CAAC,UAAC,IAAI;YACV,OAAA,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL;QAFD,CAEC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,gDAAiC,GAAjC,UACE,IAA0D;QAE1D,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mCAAmC;YACxC,IAAI,MAAA;SACL,CACF,CAAC;IACJ,CAAC;IA3Ye,SAAI,GAAG,MAAe,CAAC;IA4YzC,WAAC;CAAA,AA7YD,CAAkC,YAAY,GA6Y7C;eA7YoB,IAAI"}
@@ -1532,7 +1532,7 @@ export type RoleAttributes = {
1532
1532
  /**
1533
1533
  * Specifies the environments the user can access
1534
1534
  */
1535
- environments_access: 'all' | 'primary_only' | 'sandbox_only';
1535
+ environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
1536
1536
  /**
1537
1537
  * Can create/edit roles and invite/remove collaborators
1538
1538
  */
@@ -1752,7 +1752,7 @@ export type RoleMeta = {
1752
1752
  /**
1753
1753
  * Specifies the environments the user can access
1754
1754
  */
1755
- environments_access: 'all' | 'primary_only' | 'sandbox_only';
1755
+ environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
1756
1756
  /**
1757
1757
  * Can create/edit roles and invite/remove collaborators
1758
1758
  */
@@ -1953,7 +1953,7 @@ export type RoleCreateSchema = {
1953
1953
  /**
1954
1954
  * Specifies the environments the user can access
1955
1955
  */
1956
- environments_access?: 'all' | 'primary_only' | 'sandbox_only';
1956
+ environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
1957
1957
  /**
1958
1958
  * Can create/edit roles and invite/remove collaborators
1959
1959
  */
@@ -2175,7 +2175,7 @@ export type RoleUpdateSchema = {
2175
2175
  /**
2176
2176
  * Specifies the environments the user can access
2177
2177
  */
2178
- environments_access?: 'all' | 'primary_only' | 'sandbox_only';
2178
+ environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
2179
2179
  /**
2180
2180
  * Can create/edit roles and invite/remove collaborators
2181
2181
  */
@@ -2375,6 +2375,13 @@ export type RoleSelfTargetSchema = {
2375
2375
  export type RoleDestroyTargetSchema = {
2376
2376
  data: Role;
2377
2377
  };
2378
+ /**
2379
+ * This interface was referenced by `Role`'s JSON-Schema
2380
+ * via the `duplicate.targetSchema` link.
2381
+ */
2382
+ export type RoleDuplicateTargetSchema = {
2383
+ data: Role;
2384
+ };
2378
2385
  /**
2379
2386
  * A DatoCMS administrative area can be accessed by multiple people. Every collaborator is linked to a specific Role, which describes what actions it will be able to perform once logged in.
2380
2387
  *
@@ -4668,11 +4675,11 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
4668
4675
  * <details>
4669
4676
  * <summary>Multi-line text (<code>text</code>)</summary>
4670
4677
  *
4671
- * | Property | Value |
4672
- * | ------------------------------ | --------------------------------- |
4673
- * | Code | `text` |
4674
- * | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
4675
- * | Available validators | `required`, `length`, `format` |
4678
+ * | Property | Value |
4679
+ * | ------------------------------ | ---------------------------------------------- |
4680
+ * | Code | `text` |
4681
+ * | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
4682
+ * | Available validators | `required`, `length`, `format`, `sanitization` |
4676
4683
  *
4677
4684
  * </details>
4678
4685
  *
@@ -4957,10 +4964,10 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
4957
4964
  *
4958
4965
  * Accepts only strings that match a specified format.
4959
4966
  *
4960
- * | Parameter | Type | Required | Description |
4961
- * | -------------------- | ------------------------- | -------- | ----------------------------------------------- |
4962
- * | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
4963
- * | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
4967
+ * | Parameter | Type | Required | Description |
4968
+ * | -------------------- | -------------------- | -------- | --------------------------------------------- |
4969
+ * | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
4970
+ * | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
4964
4971
  *
4965
4972
  * **Note:** Only one of `custom_pattern` or `predefined_pattern` should be specified.
4966
4973
  *
@@ -5173,7 +5180,7 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
5173
5180
  *
5174
5181
  * Only accept references to block records of the specified block models.
5175
5182
  *
5176
- * | Parameter | Type | Required | Description |
5183
+ * | Parameter | Type | Required | Description |
5177
5184
  * | ------------ | ----------------------- | -------- | ------------------------------ |
5178
5185
  * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
5179
5186
  *
@@ -5340,9 +5347,9 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
5340
5347
  *
5341
5348
  * Simple textual input for _Single-line string_ fields.
5342
5349
  *
5343
- * | Parameter | Type | Required | Description |
5350
+ * | Parameter | Type | Required | Description |
5344
5351
  * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
5345
- * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5352
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5346
5353
  * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5347
5354
  *
5348
5355
  * </details>
@@ -5432,8 +5439,8 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
5432
5439
  *
5433
5440
  * Built-in editor for _Single block_ fields.
5434
5441
  *
5435
- * | Parameter | Type | Required | Description |
5436
- * | ----------------- | --------- | -------- | ---------------------------------------------------------- |
5442
+ * | Parameter | Type | Required | Description |
5443
+ * | ----------------- | --------- | -------- | --------------------------------------------------------- |
5437
5444
  * | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
5438
5445
  *
5439
5446
  * </details>
@@ -10831,6 +10838,14 @@ export type SiteMeta = {
10831
10838
  * Whether the Improved boolean fields option is active or not
10832
10839
  */
10833
10840
  improved_boolean_fields: boolean;
10841
+ /**
10842
+ * The default value for the draft mode option in all the environment's models
10843
+ */
10844
+ draft_mode_default: boolean;
10845
+ /**
10846
+ * Whether the Improved validation at publishing option is active or not
10847
+ */
10848
+ improved_validation_at_publishing: boolean;
10834
10849
  /**
10835
10850
  * Whether the site has custom upload storage settings
10836
10851
  */
@@ -11001,6 +11016,14 @@ export type SiteUpdateSchema = {
11001
11016
  * Whether the Improved boolean fields option is active or not
11002
11017
  */
11003
11018
  improved_boolean_fields?: boolean;
11019
+ /**
11020
+ * The default value for the draft mode option in all the environment's models
11021
+ */
11022
+ draft_mode_default?: boolean;
11023
+ /**
11024
+ * Whether the Improved validation at publishing option is active or not
11025
+ */
11026
+ improved_validation_at_publishing?: boolean;
11004
11027
  /**
11005
11028
  * Whether the site has custom upload storage settings
11006
11029
  */
@@ -11069,6 +11092,20 @@ export type SiteActivateImprovedGqlVisibilityControlTargetSchema = {
11069
11092
  export type SiteActivateImprovedBooleanFieldsTargetSchema = {
11070
11093
  data: Site;
11071
11094
  };
11095
+ /**
11096
+ * This interface was referenced by `Site`'s JSON-Schema
11097
+ * via the `activate_draft_mode_as_default.targetSchema` link.
11098
+ */
11099
+ export type SiteActivateDraftModeAsDefaultTargetSchema = {
11100
+ data: Site;
11101
+ };
11102
+ /**
11103
+ * This interface was referenced by `Site`'s JSON-Schema
11104
+ * via the `activate_improved_validation_at_publishing.targetSchema` link.
11105
+ */
11106
+ export type SiteActivateImprovedValidationAtPublishingTargetSchema = {
11107
+ data: Site;
11108
+ };
11072
11109
  /**
11073
11110
  * This interface was referenced by `Site`'s JSON-Schema
11074
11111
  * via the `update_assets_cdn_default_settings.schema` link.
@@ -1900,7 +1900,7 @@ export type Role = {
1900
1900
  /**
1901
1901
  * Specifies the environments the user can access
1902
1902
  */
1903
- environments_access: 'all' | 'primary_only' | 'sandbox_only';
1903
+ environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
1904
1904
  /**
1905
1905
  * Can create/edit roles and invite/remove collaborators
1906
1906
  */
@@ -2064,6 +2064,7 @@ export type RoleCreateTargetSchema = Role;
2064
2064
  export type RoleUpdateTargetSchema = Role;
2065
2065
  export type RoleSelfTargetSchema = Role;
2066
2066
  export type RoleDestroyTargetSchema = Role;
2067
+ export type RoleDuplicateTargetSchema = Role;
2067
2068
  /**
2068
2069
  * JSON API data
2069
2070
  *
@@ -2112,7 +2113,7 @@ export type RoleMeta = {
2112
2113
  /**
2113
2114
  * Specifies the environments the user can access
2114
2115
  */
2115
- environments_access: 'all' | 'primary_only' | 'sandbox_only';
2116
+ environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
2116
2117
  /**
2117
2118
  * Can create/edit roles and invite/remove collaborators
2118
2119
  */
@@ -2309,7 +2310,7 @@ export type RoleAttributes = {
2309
2310
  /**
2310
2311
  * Specifies the environments the user can access
2311
2312
  */
2312
- environments_access: 'all' | 'primary_only' | 'sandbox_only';
2313
+ environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
2313
2314
  /**
2314
2315
  * Can create/edit roles and invite/remove collaborators
2315
2316
  */
@@ -2513,7 +2514,7 @@ export type RoleCreateSchema = {
2513
2514
  /**
2514
2515
  * Specifies the environments the user can access
2515
2516
  */
2516
- environments_access?: 'all' | 'primary_only' | 'sandbox_only';
2517
+ environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
2517
2518
  /**
2518
2519
  * Can create/edit roles and invite/remove collaborators
2519
2520
  */
@@ -2711,7 +2712,7 @@ export type RoleUpdateSchema = {
2711
2712
  /**
2712
2713
  * Specifies the environments the user can access
2713
2714
  */
2714
- environments_access?: 'all' | 'primary_only' | 'sandbox_only';
2715
+ environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
2715
2716
  /**
2716
2717
  * Can create/edit roles and invite/remove collaborators
2717
2718
  */
@@ -5010,11 +5011,11 @@ export type ItemTypeUpdateSchema = {
5010
5011
  * <details>
5011
5012
  * <summary>Multi-line text (<code>text</code>)</summary>
5012
5013
  *
5013
- * | Property | Value |
5014
- * | ------------------------------ | --------------------------------- |
5015
- * | Code | `text` |
5016
- * | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
5017
- * | Available validators | `required`, `length`, `format` |
5014
+ * | Property | Value |
5015
+ * | ------------------------------ | ---------------------------------------------- |
5016
+ * | Code | `text` |
5017
+ * | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
5018
+ * | Available validators | `required`, `length`, `format`, `sanitization` |
5018
5019
  *
5019
5020
  * </details>
5020
5021
  *
@@ -5299,10 +5300,10 @@ export type ItemTypeUpdateSchema = {
5299
5300
  *
5300
5301
  * Accepts only strings that match a specified format.
5301
5302
  *
5302
- * | Parameter | Type | Required | Description |
5303
- * | -------------------- | ------------------------- | -------- | ----------------------------------------------- |
5304
- * | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
5305
- * | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
5303
+ * | Parameter | Type | Required | Description |
5304
+ * | -------------------- | -------------------- | -------- | --------------------------------------------- |
5305
+ * | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
5306
+ * | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
5306
5307
  *
5307
5308
  * **Note:** Only one of `custom_pattern` or `predefined_pattern` should be specified.
5308
5309
  *
@@ -5515,7 +5516,7 @@ export type ItemTypeUpdateSchema = {
5515
5516
  *
5516
5517
  * Only accept references to block records of the specified block models.
5517
5518
  *
5518
- * | Parameter | Type | Required | Description |
5519
+ * | Parameter | Type | Required | Description |
5519
5520
  * | ------------ | ----------------------- | -------- | ------------------------------ |
5520
5521
  * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
5521
5522
  *
@@ -5682,9 +5683,9 @@ export type ItemTypeUpdateSchema = {
5682
5683
  *
5683
5684
  * Simple textual input for _Single-line string_ fields.
5684
5685
  *
5685
- * | Parameter | Type | Required | Description |
5686
+ * | Parameter | Type | Required | Description |
5686
5687
  * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
5687
- * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5688
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5688
5689
  * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5689
5690
  *
5690
5691
  * </details>
@@ -5774,8 +5775,8 @@ export type ItemTypeUpdateSchema = {
5774
5775
  *
5775
5776
  * Built-in editor for _Single block_ fields.
5776
5777
  *
5777
- * | Parameter | Type | Required | Description |
5778
- * | ----------------- | --------- | -------- | ---------------------------------------------------------- |
5778
+ * | Parameter | Type | Required | Description |
5779
+ * | ----------------- | --------- | -------- | --------------------------------------------------------- |
5779
5780
  * | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
5780
5781
  *
5781
5782
  * </details>
@@ -10336,6 +10337,8 @@ export type SiteActivateImprovedHexManagementTargetSchema = Site;
10336
10337
  export type SiteActivateImprovedGqlMultilocaleFieldsTargetSchema = Site;
10337
10338
  export type SiteActivateImprovedGqlVisibilityControlTargetSchema = Site;
10338
10339
  export type SiteActivateImprovedBooleanFieldsTargetSchema = Site;
10340
+ export type SiteActivateDraftModeAsDefaultTargetSchema = Site;
10341
+ export type SiteActivateImprovedValidationAtPublishingTargetSchema = Site;
10339
10342
  export type SiteUpdateAssetsCdnDefaultSettingsTargetSchema = Site;
10340
10343
  /**
10341
10344
  * Meta attributes
@@ -10368,6 +10371,14 @@ export type SiteMeta = {
10368
10371
  * Whether the Improved boolean fields option is active or not
10369
10372
  */
10370
10373
  improved_boolean_fields: boolean;
10374
+ /**
10375
+ * The default value for the draft mode option in all the environment's models
10376
+ */
10377
+ draft_mode_default: boolean;
10378
+ /**
10379
+ * Whether the Improved validation at publishing option is active or not
10380
+ */
10381
+ improved_validation_at_publishing: boolean;
10371
10382
  /**
10372
10383
  * Whether the site has custom upload storage settings
10373
10384
  */
@@ -10709,6 +10720,14 @@ export type SiteUpdateSchema = {
10709
10720
  * Whether the Improved boolean fields option is active or not
10710
10721
  */
10711
10722
  improved_boolean_fields?: boolean;
10723
+ /**
10724
+ * The default value for the draft mode option in all the environment's models
10725
+ */
10726
+ draft_mode_default?: boolean;
10727
+ /**
10728
+ * Whether the Improved validation at publishing option is active or not
10729
+ */
10730
+ improved_validation_at_publishing?: boolean;
10712
10731
  /**
10713
10732
  * Whether the site has custom upload storage settings
10714
10733
  */
@@ -93,4 +93,22 @@ export default class Role extends BaseResource {
93
93
  * @throws {TimeoutError}
94
94
  */
95
95
  rawDestroy(roleId: string): Promise<SchemaTypes.RoleDestroyTargetSchema>;
96
+ /**
97
+ * Duplicate a role
98
+ *
99
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate
100
+ *
101
+ * @throws {ApiError}
102
+ * @throws {TimeoutError}
103
+ */
104
+ duplicate(roleId: string | SimpleSchemaTypes.RoleData): Promise<SimpleSchemaTypes.Role>;
105
+ /**
106
+ * Duplicate a role
107
+ *
108
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate
109
+ *
110
+ * @throws {ApiError}
111
+ * @throws {TimeoutError}
112
+ */
113
+ rawDuplicate(roleId: string): Promise<SchemaTypes.RoleDuplicateTargetSchema>;
96
114
  }
@@ -149,6 +149,50 @@ export default class Site extends BaseResource {
149
149
  * @deprecated This API call is to be considered private and might change without notice
150
150
  */
151
151
  rawActivateImprovedBooleanFields(): Promise<SchemaTypes.SiteActivateImprovedBooleanFieldsTargetSchema>;
152
+ /**
153
+ * Set draft mode default to true for all environment's models
154
+ *
155
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default
156
+ *
157
+ * @throws {ApiError}
158
+ * @throws {TimeoutError}
159
+ *
160
+ * @deprecated This API call is to be considered private and might change without notice
161
+ */
162
+ activateDraftModeAsDefault(): Promise<SimpleSchemaTypes.Site>;
163
+ /**
164
+ * Set draft mode default to true for all environment's models
165
+ *
166
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default
167
+ *
168
+ * @throws {ApiError}
169
+ * @throws {TimeoutError}
170
+ *
171
+ * @deprecated This API call is to be considered private and might change without notice
172
+ */
173
+ rawActivateDraftModeAsDefault(): Promise<SchemaTypes.SiteActivateDraftModeAsDefaultTargetSchema>;
174
+ /**
175
+ * Activate improved validation at publishing option
176
+ *
177
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing
178
+ *
179
+ * @throws {ApiError}
180
+ * @throws {TimeoutError}
181
+ *
182
+ * @deprecated This API call is to be considered private and might change without notice
183
+ */
184
+ activateImprovedValidationAtPublishing(): Promise<SimpleSchemaTypes.Site>;
185
+ /**
186
+ * Activate improved validation at publishing option
187
+ *
188
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing
189
+ *
190
+ * @throws {ApiError}
191
+ * @throws {TimeoutError}
192
+ *
193
+ * @deprecated This API call is to be considered private and might change without notice
194
+ */
195
+ rawActivateImprovedValidationAtPublishing(): Promise<SchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema>;
152
196
  /**
153
197
  * Update CDN settings default assets
154
198
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
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.3.15",
45
45
  "@types/uuid": "^9.0.7"
46
46
  },
47
- "gitHead": "46976a74ff3d8d1272d3e5ed6b3cbc7b333609d6"
47
+ "gitHead": "983cc9f3bc0078c621a32bab979c6a5813933bc6"
48
48
  }
package/resources.json CHANGED
@@ -171,6 +171,31 @@
171
171
  "responseType": "RoleDestroyTargetSchema",
172
172
  "name": "destroy",
173
173
  "rawName": "rawDestroy"
174
+ },
175
+ {
176
+ "returnsCollection": false,
177
+ "docUrl": "https://www.datocms.com/docs/content-management-api/resources/role/duplicate",
178
+ "rel": "duplicate",
179
+ "urlTemplate": "/roles/${roleId}/duplicate",
180
+ "method": "POST",
181
+ "comment": "Duplicate a role",
182
+ "urlPlaceholders": [
183
+ {
184
+ "variableName": "roleId",
185
+ "isEntityId": true,
186
+ "relType": "RoleData"
187
+ }
188
+ ],
189
+ "entityIdPlaceholder": {
190
+ "variableName": "roleId",
191
+ "isEntityId": true,
192
+ "relType": "RoleData"
193
+ },
194
+ "optionalRequestBody": false,
195
+ "queryParamsRequired": false,
196
+ "responseType": "RoleDuplicateTargetSchema",
197
+ "name": "duplicate",
198
+ "rawName": "rawDuplicate"
174
199
  }
175
200
  ],
176
201
  "namespace": "roles",
@@ -4651,6 +4676,36 @@
4651
4676
  "name": "activateImprovedBooleanFields",
4652
4677
  "rawName": "rawActivateImprovedBooleanFields"
4653
4678
  },
4679
+ {
4680
+ "returnsCollection": false,
4681
+ "docUrl": "https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default",
4682
+ "rel": "activate_draft_mode_as_default",
4683
+ "urlTemplate": "/site/activate-draft-mode-as-default",
4684
+ "method": "PUT",
4685
+ "comment": "Set draft mode default to true for all environment's models",
4686
+ "urlPlaceholders": [],
4687
+ "optionalRequestBody": false,
4688
+ "queryParamsRequired": false,
4689
+ "responseType": "SiteActivateDraftModeAsDefaultTargetSchema",
4690
+ "deprecated": "This API call is to be considered private and might change without notice",
4691
+ "name": "activateDraftModeAsDefault",
4692
+ "rawName": "rawActivateDraftModeAsDefault"
4693
+ },
4694
+ {
4695
+ "returnsCollection": false,
4696
+ "docUrl": "https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing",
4697
+ "rel": "activate_improved_validation_at_publishing",
4698
+ "urlTemplate": "/site/activate-improved-validation-at-publishing",
4699
+ "method": "PUT",
4700
+ "comment": "Activate improved validation at publishing option",
4701
+ "urlPlaceholders": [],
4702
+ "optionalRequestBody": false,
4703
+ "queryParamsRequired": false,
4704
+ "responseType": "SiteActivateImprovedValidationAtPublishingTargetSchema",
4705
+ "deprecated": "This API call is to be considered private and might change without notice",
4706
+ "name": "activateImprovedValidationAtPublishing",
4707
+ "rawName": "rawActivateImprovedValidationAtPublishing"
4708
+ },
4654
4709
  {
4655
4710
  "returnsCollection": false,
4656
4711
  "docUrl": "https://www.datocms.com/docs/content-management-api/resources/site/update_assets_cdn_default_settings",
@@ -147,7 +147,7 @@ export class Client {
147
147
  ...this.config,
148
148
  ...options,
149
149
  logFn: this.config.logFn || console.log,
150
- userAgent: '@datocms/cma-client v3.4.0',
150
+ userAgent: '@datocms/cma-client v3.4.1',
151
151
  baseUrl: this.baseUrl,
152
152
  preCallStack: new Error().stack,
153
153
  extraHeaders: {