@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.
- package/dist/cjs/generated/Client.js +1 -1
- package/dist/cjs/generated/resources/Role.js +27 -0
- package/dist/cjs/generated/resources/Role.js.map +1 -1
- package/dist/cjs/generated/resources/Site.js +62 -0
- package/dist/cjs/generated/resources/Site.js.map +1 -1
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +55 -18
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +38 -19
- package/dist/esm/generated/resources/Role.d.ts +18 -0
- package/dist/esm/generated/resources/Role.js +27 -0
- package/dist/esm/generated/resources/Role.js.map +1 -1
- package/dist/esm/generated/resources/Site.d.ts +44 -0
- package/dist/esm/generated/resources/Site.js +62 -0
- package/dist/esm/generated/resources/Site.js.map +1 -1
- package/dist/types/generated/SchemaTypes.d.ts +55 -18
- package/dist/types/generated/SimpleSchemaTypes.d.ts +38 -19
- package/dist/types/generated/resources/Role.d.ts +18 -0
- package/dist/types/generated/resources/Site.d.ts +44 -0
- package/package.json +2 -2
- package/resources.json +55 -0
- package/src/generated/Client.ts +1 -1
- package/src/generated/SchemaTypes.ts +58 -18
- package/src/generated/SimpleSchemaTypes.ts +38 -19
- package/src/generated/resources/Role.ts +31 -0
- package/src/generated/resources/Site.ts +74 -0
|
@@ -1583,7 +1583,7 @@ export type RoleAttributes = {
|
|
|
1583
1583
|
/**
|
|
1584
1584
|
* Specifies the environments the user can access
|
|
1585
1585
|
*/
|
|
1586
|
-
environments_access: 'all' | 'primary_only' | 'sandbox_only';
|
|
1586
|
+
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
1587
1587
|
/**
|
|
1588
1588
|
* Can create/edit roles and invite/remove collaborators
|
|
1589
1589
|
*/
|
|
@@ -1840,7 +1840,7 @@ export type RoleMeta = {
|
|
|
1840
1840
|
/**
|
|
1841
1841
|
* Specifies the environments the user can access
|
|
1842
1842
|
*/
|
|
1843
|
-
environments_access: 'all' | 'primary_only' | 'sandbox_only';
|
|
1843
|
+
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
1844
1844
|
/**
|
|
1845
1845
|
* Can create/edit roles and invite/remove collaborators
|
|
1846
1846
|
*/
|
|
@@ -2076,7 +2076,7 @@ export type RoleCreateSchema = {
|
|
|
2076
2076
|
/**
|
|
2077
2077
|
* Specifies the environments the user can access
|
|
2078
2078
|
*/
|
|
2079
|
-
environments_access?: 'all' | 'primary_only' | 'sandbox_only';
|
|
2079
|
+
environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
2080
2080
|
/**
|
|
2081
2081
|
* Can create/edit roles and invite/remove collaborators
|
|
2082
2082
|
*/
|
|
@@ -2334,7 +2334,7 @@ export type RoleUpdateSchema = {
|
|
|
2334
2334
|
/**
|
|
2335
2335
|
* Specifies the environments the user can access
|
|
2336
2336
|
*/
|
|
2337
|
-
environments_access?: 'all' | 'primary_only' | 'sandbox_only';
|
|
2337
|
+
environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
2338
2338
|
/**
|
|
2339
2339
|
* Can create/edit roles and invite/remove collaborators
|
|
2340
2340
|
*/
|
|
@@ -2573,6 +2573,14 @@ export type RoleDestroyTargetSchema = {
|
|
|
2573
2573
|
data: Role;
|
|
2574
2574
|
};
|
|
2575
2575
|
|
|
2576
|
+
/**
|
|
2577
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2578
|
+
* via the `duplicate.targetSchema` link.
|
|
2579
|
+
*/
|
|
2580
|
+
export type RoleDuplicateTargetSchema = {
|
|
2581
|
+
data: Role;
|
|
2582
|
+
};
|
|
2583
|
+
|
|
2576
2584
|
/**
|
|
2577
2585
|
* 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.
|
|
2578
2586
|
*
|
|
@@ -4999,11 +5007,11 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
4999
5007
|
* <details>
|
|
5000
5008
|
* <summary>Multi-line text (<code>text</code>)</summary>
|
|
5001
5009
|
*
|
|
5002
|
-
* | Property | Value
|
|
5003
|
-
* | ------------------------------ |
|
|
5004
|
-
* | Code | `text`
|
|
5005
|
-
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea`
|
|
5006
|
-
* | Available validators | `required`, `length`, `format`
|
|
5010
|
+
* | Property | Value |
|
|
5011
|
+
* | ------------------------------ | ---------------------------------------------- |
|
|
5012
|
+
* | Code | `text` |
|
|
5013
|
+
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
|
|
5014
|
+
* | Available validators | `required`, `length`, `format`, `sanitization` |
|
|
5007
5015
|
*
|
|
5008
5016
|
* </details>
|
|
5009
5017
|
*
|
|
@@ -5288,10 +5296,10 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5288
5296
|
*
|
|
5289
5297
|
* Accepts only strings that match a specified format.
|
|
5290
5298
|
*
|
|
5291
|
-
* | Parameter | Type
|
|
5292
|
-
* | -------------------- |
|
|
5293
|
-
* | `custom_pattern` | `Regexp`
|
|
5294
|
-
* | `predefined_pattern` | `"email"` or `"url"`
|
|
5299
|
+
* | Parameter | Type | Required | Description |
|
|
5300
|
+
* | -------------------- | -------------------- | -------- | --------------------------------------------- |
|
|
5301
|
+
* | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
|
|
5302
|
+
* | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
|
|
5295
5303
|
*
|
|
5296
5304
|
* **Note:** Only one of `custom_pattern` or `predefined_pattern` should be specified.
|
|
5297
5305
|
*
|
|
@@ -5504,7 +5512,7 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5504
5512
|
*
|
|
5505
5513
|
* Only accept references to block records of the specified block models.
|
|
5506
5514
|
*
|
|
5507
|
-
* | Parameter | Type | Required | Description
|
|
5515
|
+
* | Parameter | Type | Required | Description |
|
|
5508
5516
|
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
5509
5517
|
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
5510
5518
|
*
|
|
@@ -5671,9 +5679,9 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5671
5679
|
*
|
|
5672
5680
|
* Simple textual input for _Single-line string_ fields.
|
|
5673
5681
|
*
|
|
5674
|
-
* | Parameter
|
|
5682
|
+
* | Parameter | Type | Required | Description |
|
|
5675
5683
|
* | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5676
|
-
* | `heading` | `Boolean` | ✅
|
|
5684
|
+
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
|
|
5677
5685
|
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
5678
5686
|
*
|
|
5679
5687
|
* </details>
|
|
@@ -5763,8 +5771,8 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5763
5771
|
*
|
|
5764
5772
|
* Built-in editor for _Single block_ fields.
|
|
5765
5773
|
*
|
|
5766
|
-
* | Parameter | Type | Required | Description
|
|
5767
|
-
* | ----------------- | --------- | -------- |
|
|
5774
|
+
* | Parameter | Type | Required | Description |
|
|
5775
|
+
* | ----------------- | --------- | -------- | --------------------------------------------------------- |
|
|
5768
5776
|
* | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
|
|
5769
5777
|
*
|
|
5770
5778
|
* </details>
|
|
@@ -11765,6 +11773,14 @@ export type SiteMeta = {
|
|
|
11765
11773
|
* Whether the Improved boolean fields option is active or not
|
|
11766
11774
|
*/
|
|
11767
11775
|
improved_boolean_fields: boolean;
|
|
11776
|
+
/**
|
|
11777
|
+
* The default value for the draft mode option in all the environment's models
|
|
11778
|
+
*/
|
|
11779
|
+
draft_mode_default: boolean;
|
|
11780
|
+
/**
|
|
11781
|
+
* Whether the Improved validation at publishing option is active or not
|
|
11782
|
+
*/
|
|
11783
|
+
improved_validation_at_publishing: boolean;
|
|
11768
11784
|
/**
|
|
11769
11785
|
* Whether the site has custom upload storage settings
|
|
11770
11786
|
*/
|
|
@@ -11940,6 +11956,14 @@ export type SiteUpdateSchema = {
|
|
|
11940
11956
|
* Whether the Improved boolean fields option is active or not
|
|
11941
11957
|
*/
|
|
11942
11958
|
improved_boolean_fields?: boolean;
|
|
11959
|
+
/**
|
|
11960
|
+
* The default value for the draft mode option in all the environment's models
|
|
11961
|
+
*/
|
|
11962
|
+
draft_mode_default?: boolean;
|
|
11963
|
+
/**
|
|
11964
|
+
* Whether the Improved validation at publishing option is active or not
|
|
11965
|
+
*/
|
|
11966
|
+
improved_validation_at_publishing?: boolean;
|
|
11943
11967
|
/**
|
|
11944
11968
|
* Whether the site has custom upload storage settings
|
|
11945
11969
|
*/
|
|
@@ -12017,6 +12041,22 @@ export type SiteActivateImprovedBooleanFieldsTargetSchema = {
|
|
|
12017
12041
|
data: Site;
|
|
12018
12042
|
};
|
|
12019
12043
|
|
|
12044
|
+
/**
|
|
12045
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
12046
|
+
* via the `activate_draft_mode_as_default.targetSchema` link.
|
|
12047
|
+
*/
|
|
12048
|
+
export type SiteActivateDraftModeAsDefaultTargetSchema = {
|
|
12049
|
+
data: Site;
|
|
12050
|
+
};
|
|
12051
|
+
|
|
12052
|
+
/**
|
|
12053
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
12054
|
+
* via the `activate_improved_validation_at_publishing.targetSchema` link.
|
|
12055
|
+
*/
|
|
12056
|
+
export type SiteActivateImprovedValidationAtPublishingTargetSchema = {
|
|
12057
|
+
data: Site;
|
|
12058
|
+
};
|
|
12059
|
+
|
|
12020
12060
|
/**
|
|
12021
12061
|
* This interface was referenced by `Site`'s JSON-Schema
|
|
12022
12062
|
* via the `update_assets_cdn_default_settings.schema` link.
|
|
@@ -1959,7 +1959,7 @@ export type Role = {
|
|
|
1959
1959
|
/**
|
|
1960
1960
|
* Specifies the environments the user can access
|
|
1961
1961
|
*/
|
|
1962
|
-
environments_access: 'all' | 'primary_only' | 'sandbox_only';
|
|
1962
|
+
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
1963
1963
|
/**
|
|
1964
1964
|
* Can create/edit roles and invite/remove collaborators
|
|
1965
1965
|
*/
|
|
@@ -2157,6 +2157,7 @@ export type RoleCreateTargetSchema = Role;
|
|
|
2157
2157
|
export type RoleUpdateTargetSchema = Role;
|
|
2158
2158
|
export type RoleSelfTargetSchema = Role;
|
|
2159
2159
|
export type RoleDestroyTargetSchema = Role;
|
|
2160
|
+
export type RoleDuplicateTargetSchema = Role;
|
|
2160
2161
|
/**
|
|
2161
2162
|
* JSON API data
|
|
2162
2163
|
*
|
|
@@ -2206,7 +2207,7 @@ export type RoleMeta = {
|
|
|
2206
2207
|
/**
|
|
2207
2208
|
* Specifies the environments the user can access
|
|
2208
2209
|
*/
|
|
2209
|
-
environments_access: 'all' | 'primary_only' | 'sandbox_only';
|
|
2210
|
+
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
2210
2211
|
/**
|
|
2211
2212
|
* Can create/edit roles and invite/remove collaborators
|
|
2212
2213
|
*/
|
|
@@ -2438,7 +2439,7 @@ export type RoleAttributes = {
|
|
|
2438
2439
|
/**
|
|
2439
2440
|
* Specifies the environments the user can access
|
|
2440
2441
|
*/
|
|
2441
|
-
environments_access: 'all' | 'primary_only' | 'sandbox_only';
|
|
2442
|
+
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
2442
2443
|
/**
|
|
2443
2444
|
* Can create/edit roles and invite/remove collaborators
|
|
2444
2445
|
*/
|
|
@@ -2678,7 +2679,7 @@ export type RoleCreateSchema = {
|
|
|
2678
2679
|
/**
|
|
2679
2680
|
* Specifies the environments the user can access
|
|
2680
2681
|
*/
|
|
2681
|
-
environments_access?: 'all' | 'primary_only' | 'sandbox_only';
|
|
2682
|
+
environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
2682
2683
|
/**
|
|
2683
2684
|
* Can create/edit roles and invite/remove collaborators
|
|
2684
2685
|
*/
|
|
@@ -2911,7 +2912,7 @@ export type RoleUpdateSchema = {
|
|
|
2911
2912
|
/**
|
|
2912
2913
|
* Specifies the environments the user can access
|
|
2913
2914
|
*/
|
|
2914
|
-
environments_access?: 'all' | 'primary_only' | 'sandbox_only';
|
|
2915
|
+
environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
|
|
2915
2916
|
/**
|
|
2916
2917
|
* Can create/edit roles and invite/remove collaborators
|
|
2917
2918
|
*/
|
|
@@ -5321,11 +5322,11 @@ export type ItemTypeUpdateSchema = {
|
|
|
5321
5322
|
* <details>
|
|
5322
5323
|
* <summary>Multi-line text (<code>text</code>)</summary>
|
|
5323
5324
|
*
|
|
5324
|
-
* | Property | Value
|
|
5325
|
-
* | ------------------------------ |
|
|
5326
|
-
* | Code | `text`
|
|
5327
|
-
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea`
|
|
5328
|
-
* | Available validators | `required`, `length`, `format`
|
|
5325
|
+
* | Property | Value |
|
|
5326
|
+
* | ------------------------------ | ---------------------------------------------- |
|
|
5327
|
+
* | Code | `text` |
|
|
5328
|
+
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
|
|
5329
|
+
* | Available validators | `required`, `length`, `format`, `sanitization` |
|
|
5329
5330
|
*
|
|
5330
5331
|
* </details>
|
|
5331
5332
|
*
|
|
@@ -5610,10 +5611,10 @@ export type ItemTypeUpdateSchema = {
|
|
|
5610
5611
|
*
|
|
5611
5612
|
* Accepts only strings that match a specified format.
|
|
5612
5613
|
*
|
|
5613
|
-
* | Parameter | Type
|
|
5614
|
-
* | -------------------- |
|
|
5615
|
-
* | `custom_pattern` | `Regexp`
|
|
5616
|
-
* | `predefined_pattern` | `"email"` or `"url"`
|
|
5614
|
+
* | Parameter | Type | Required | Description |
|
|
5615
|
+
* | -------------------- | -------------------- | -------- | --------------------------------------------- |
|
|
5616
|
+
* | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
|
|
5617
|
+
* | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
|
|
5617
5618
|
*
|
|
5618
5619
|
* **Note:** Only one of `custom_pattern` or `predefined_pattern` should be specified.
|
|
5619
5620
|
*
|
|
@@ -5826,7 +5827,7 @@ export type ItemTypeUpdateSchema = {
|
|
|
5826
5827
|
*
|
|
5827
5828
|
* Only accept references to block records of the specified block models.
|
|
5828
5829
|
*
|
|
5829
|
-
* | Parameter | Type | Required | Description
|
|
5830
|
+
* | Parameter | Type | Required | Description |
|
|
5830
5831
|
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
5831
5832
|
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
5832
5833
|
*
|
|
@@ -5993,9 +5994,9 @@ export type ItemTypeUpdateSchema = {
|
|
|
5993
5994
|
*
|
|
5994
5995
|
* Simple textual input for _Single-line string_ fields.
|
|
5995
5996
|
*
|
|
5996
|
-
* | Parameter
|
|
5997
|
+
* | Parameter | Type | Required | Description |
|
|
5997
5998
|
* | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5998
|
-
* | `heading` | `Boolean` | ✅
|
|
5999
|
+
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
|
|
5999
6000
|
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
6000
6001
|
*
|
|
6001
6002
|
* </details>
|
|
@@ -6085,8 +6086,8 @@ export type ItemTypeUpdateSchema = {
|
|
|
6085
6086
|
*
|
|
6086
6087
|
* Built-in editor for _Single block_ fields.
|
|
6087
6088
|
*
|
|
6088
|
-
* | Parameter | Type | Required | Description
|
|
6089
|
-
* | ----------------- | --------- | -------- |
|
|
6089
|
+
* | Parameter | Type | Required | Description |
|
|
6090
|
+
* | ----------------- | --------- | -------- | --------------------------------------------------------- |
|
|
6090
6091
|
* | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
|
|
6091
6092
|
*
|
|
6092
6093
|
* </details>
|
|
@@ -11170,6 +11171,8 @@ export type SiteActivateImprovedHexManagementTargetSchema = Site;
|
|
|
11170
11171
|
export type SiteActivateImprovedGqlMultilocaleFieldsTargetSchema = Site;
|
|
11171
11172
|
export type SiteActivateImprovedGqlVisibilityControlTargetSchema = Site;
|
|
11172
11173
|
export type SiteActivateImprovedBooleanFieldsTargetSchema = Site;
|
|
11174
|
+
export type SiteActivateDraftModeAsDefaultTargetSchema = Site;
|
|
11175
|
+
export type SiteActivateImprovedValidationAtPublishingTargetSchema = Site;
|
|
11173
11176
|
export type SiteUpdateAssetsCdnDefaultSettingsTargetSchema = Site;
|
|
11174
11177
|
/**
|
|
11175
11178
|
* Meta attributes
|
|
@@ -11202,6 +11205,14 @@ export type SiteMeta = {
|
|
|
11202
11205
|
* Whether the Improved boolean fields option is active or not
|
|
11203
11206
|
*/
|
|
11204
11207
|
improved_boolean_fields: boolean;
|
|
11208
|
+
/**
|
|
11209
|
+
* The default value for the draft mode option in all the environment's models
|
|
11210
|
+
*/
|
|
11211
|
+
draft_mode_default: boolean;
|
|
11212
|
+
/**
|
|
11213
|
+
* Whether the Improved validation at publishing option is active or not
|
|
11214
|
+
*/
|
|
11215
|
+
improved_validation_at_publishing: boolean;
|
|
11205
11216
|
/**
|
|
11206
11217
|
* Whether the site has custom upload storage settings
|
|
11207
11218
|
*/
|
|
@@ -11549,6 +11560,14 @@ export type SiteUpdateSchema = {
|
|
|
11549
11560
|
* Whether the Improved boolean fields option is active or not
|
|
11550
11561
|
*/
|
|
11551
11562
|
improved_boolean_fields?: boolean;
|
|
11563
|
+
/**
|
|
11564
|
+
* The default value for the draft mode option in all the environment's models
|
|
11565
|
+
*/
|
|
11566
|
+
draft_mode_default?: boolean;
|
|
11567
|
+
/**
|
|
11568
|
+
* Whether the Improved validation at publishing option is active or not
|
|
11569
|
+
*/
|
|
11570
|
+
improved_validation_at_publishing?: boolean;
|
|
11552
11571
|
/**
|
|
11553
11572
|
* Whether the site has custom upload storage settings
|
|
11554
11573
|
*/
|
|
@@ -238,4 +238,35 @@ export default class Role extends BaseResource {
|
|
|
238
238
|
url: `/roles/${roleId}`,
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Duplicate a role
|
|
244
|
+
*
|
|
245
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate
|
|
246
|
+
*
|
|
247
|
+
* @throws {ApiError}
|
|
248
|
+
* @throws {TimeoutError}
|
|
249
|
+
*/
|
|
250
|
+
duplicate(roleId: string | SimpleSchemaTypes.RoleData) {
|
|
251
|
+
return this.rawDuplicate(Utils.toId(roleId)).then((body) =>
|
|
252
|
+
Utils.deserializeResponseBody<SimpleSchemaTypes.RoleDuplicateTargetSchema>(
|
|
253
|
+
body,
|
|
254
|
+
),
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Duplicate a role
|
|
260
|
+
*
|
|
261
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate
|
|
262
|
+
*
|
|
263
|
+
* @throws {ApiError}
|
|
264
|
+
* @throws {TimeoutError}
|
|
265
|
+
*/
|
|
266
|
+
rawDuplicate(roleId: string): Promise<SchemaTypes.RoleDuplicateTargetSchema> {
|
|
267
|
+
return this.client.request<SchemaTypes.RoleDuplicateTargetSchema>({
|
|
268
|
+
method: 'POST',
|
|
269
|
+
url: `/roles/${roleId}/duplicate`,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
241
272
|
}
|
|
@@ -276,6 +276,80 @@ export default class Site extends BaseResource {
|
|
|
276
276
|
);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
/**
|
|
280
|
+
* Set draft mode default to true for all environment's models
|
|
281
|
+
*
|
|
282
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default
|
|
283
|
+
*
|
|
284
|
+
* @throws {ApiError}
|
|
285
|
+
* @throws {TimeoutError}
|
|
286
|
+
*
|
|
287
|
+
* @deprecated This API call is to be considered private and might change without notice
|
|
288
|
+
*/
|
|
289
|
+
activateDraftModeAsDefault() {
|
|
290
|
+
return this.rawActivateDraftModeAsDefault().then((body) =>
|
|
291
|
+
Utils.deserializeResponseBody<SimpleSchemaTypes.SiteActivateDraftModeAsDefaultTargetSchema>(
|
|
292
|
+
body,
|
|
293
|
+
),
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Set draft mode default to true for all environment's models
|
|
299
|
+
*
|
|
300
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default
|
|
301
|
+
*
|
|
302
|
+
* @throws {ApiError}
|
|
303
|
+
* @throws {TimeoutError}
|
|
304
|
+
*
|
|
305
|
+
* @deprecated This API call is to be considered private and might change without notice
|
|
306
|
+
*/
|
|
307
|
+
rawActivateDraftModeAsDefault(): Promise<SchemaTypes.SiteActivateDraftModeAsDefaultTargetSchema> {
|
|
308
|
+
return this.client.request<SchemaTypes.SiteActivateDraftModeAsDefaultTargetSchema>(
|
|
309
|
+
{
|
|
310
|
+
method: 'PUT',
|
|
311
|
+
url: '/site/activate-draft-mode-as-default',
|
|
312
|
+
},
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Activate improved validation at publishing option
|
|
318
|
+
*
|
|
319
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing
|
|
320
|
+
*
|
|
321
|
+
* @throws {ApiError}
|
|
322
|
+
* @throws {TimeoutError}
|
|
323
|
+
*
|
|
324
|
+
* @deprecated This API call is to be considered private and might change without notice
|
|
325
|
+
*/
|
|
326
|
+
activateImprovedValidationAtPublishing() {
|
|
327
|
+
return this.rawActivateImprovedValidationAtPublishing().then((body) =>
|
|
328
|
+
Utils.deserializeResponseBody<SimpleSchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema>(
|
|
329
|
+
body,
|
|
330
|
+
),
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Activate improved validation at publishing option
|
|
336
|
+
*
|
|
337
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing
|
|
338
|
+
*
|
|
339
|
+
* @throws {ApiError}
|
|
340
|
+
* @throws {TimeoutError}
|
|
341
|
+
*
|
|
342
|
+
* @deprecated This API call is to be considered private and might change without notice
|
|
343
|
+
*/
|
|
344
|
+
rawActivateImprovedValidationAtPublishing(): Promise<SchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema> {
|
|
345
|
+
return this.client.request<SchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema>(
|
|
346
|
+
{
|
|
347
|
+
method: 'PUT',
|
|
348
|
+
url: '/site/activate-improved-validation-at-publishing',
|
|
349
|
+
},
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
|
|
279
353
|
/**
|
|
280
354
|
* Update CDN settings default assets
|
|
281
355
|
*
|