Skip to content

Commit

Permalink
Update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Jan 20, 2025
1 parent 46976a7 commit fb4834d
Show file tree
Hide file tree
Showing 5 changed files with 256 additions and 37 deletions.
55 changes: 55 additions & 0 deletions packages/cma-client/resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,31 @@
"responseType": "RoleDestroyTargetSchema",
"name": "destroy",
"rawName": "rawDestroy"
},
{
"returnsCollection": false,
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/role/duplicate",
"rel": "duplicate",
"urlTemplate": "/roles/${roleId}/duplicate",
"method": "POST",
"comment": "Duplicate a role",
"urlPlaceholders": [
{
"variableName": "roleId",
"isEntityId": true,
"relType": "RoleData"
}
],
"entityIdPlaceholder": {
"variableName": "roleId",
"isEntityId": true,
"relType": "RoleData"
},
"optionalRequestBody": false,
"queryParamsRequired": false,
"responseType": "RoleDuplicateTargetSchema",
"name": "duplicate",
"rawName": "rawDuplicate"
}
],
"namespace": "roles",
Expand Down Expand Up @@ -4651,6 +4676,36 @@
"name": "activateImprovedBooleanFields",
"rawName": "rawActivateImprovedBooleanFields"
},
{
"returnsCollection": false,
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default",
"rel": "activate_draft_mode_as_default",
"urlTemplate": "/site/activate-draft-mode-as-default",
"method": "PUT",
"comment": "Set draft mode default to true for all environment's models",
"urlPlaceholders": [],
"optionalRequestBody": false,
"queryParamsRequired": false,
"responseType": "SiteActivateDraftModeAsDefaultTargetSchema",
"deprecated": "This API call is to be considered private and might change without notice",
"name": "activateDraftModeAsDefault",
"rawName": "rawActivateDraftModeAsDefault"
},
{
"returnsCollection": false,
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing",
"rel": "activate_improved_validation_at_publishing",
"urlTemplate": "/site/activate-improved-validation-at-publishing",
"method": "PUT",
"comment": "Activate improved validation at publishing option",
"urlPlaceholders": [],
"optionalRequestBody": false,
"queryParamsRequired": false,
"responseType": "SiteActivateImprovedValidationAtPublishingTargetSchema",
"deprecated": "This API call is to be considered private and might change without notice",
"name": "activateImprovedValidationAtPublishing",
"rawName": "rawActivateImprovedValidationAtPublishing"
},
{
"returnsCollection": false,
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/site/update_assets_cdn_default_settings",
Expand Down
76 changes: 58 additions & 18 deletions packages/cma-client/src/generated/SchemaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ export type RoleAttributes = {
/**
* Specifies the environments the user can access
*/
environments_access: 'all' | 'primary_only' | 'sandbox_only';
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -1840,7 +1840,7 @@ export type RoleMeta = {
/**
* Specifies the environments the user can access
*/
environments_access: 'all' | 'primary_only' | 'sandbox_only';
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -2076,7 +2076,7 @@ export type RoleCreateSchema = {
/**
* Specifies the environments the user can access
*/
environments_access?: 'all' | 'primary_only' | 'sandbox_only';
environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -2334,7 +2334,7 @@ export type RoleUpdateSchema = {
/**
* Specifies the environments the user can access
*/
environments_access?: 'all' | 'primary_only' | 'sandbox_only';
environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -2573,6 +2573,14 @@ export type RoleDestroyTargetSchema = {
data: Role;
};

/**
* This interface was referenced by `Role`'s JSON-Schema
* via the `duplicate.targetSchema` link.
*/
export type RoleDuplicateTargetSchema = {
data: Role;
};

/**
* 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.
*
Expand Down Expand Up @@ -4999,11 +5007,11 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
* <details>
* <summary>Multi-line text (<code>text</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | --------------------------------- |
* | Code | `text` |
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
* | Available validators | `required`, `length`, `format` |
* | Property | Value |
* | ------------------------------ | ---------------------------------------------- |
* | Code | `text` |
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
* | Available validators | `required`, `length`, `format`, `sanitization` |
*
* </details>
*
Expand Down Expand Up @@ -5288,10 +5296,10 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
*
* Accepts only strings that match a specified format.
*
* | Parameter | Type | Required | Description |
* | -------------------- | ------------------------- | -------- | ----------------------------------------------- |
* | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
* | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
* | Parameter | Type | Required | Description |
* | -------------------- | -------------------- | -------- | --------------------------------------------- |
* | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
* | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
*
* **Note:** Only one of `custom_pattern` or `predefined_pattern` should be specified.
*
Expand Down Expand Up @@ -5504,7 +5512,7 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
*
* Only accept references to block records of the specified block models.
*
* | Parameter | Type | Required | Description |
* | Parameter | Type | Required | Description |
* | ------------ | ----------------------- | -------- | ------------------------------ |
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
*
Expand Down Expand Up @@ -5671,9 +5679,9 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
*
* Simple textual input for _Single-line string_ fields.
*
* | Parameter | Type | Required | Description |
* | Parameter | Type | Required | Description |
* | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
*
* </details>
Expand Down Expand Up @@ -5763,8 +5771,8 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
*
* Built-in editor for _Single block_ fields.
*
* | Parameter | Type | Required | Description |
* | ----------------- | --------- | -------- | ---------------------------------------------------------- |
* | Parameter | Type | Required | Description |
* | ----------------- | --------- | -------- | --------------------------------------------------------- |
* | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
*
* </details>
Expand Down Expand Up @@ -11765,6 +11773,14 @@ export type SiteMeta = {
* Whether the Improved boolean fields option is active or not
*/
improved_boolean_fields: boolean;
/**
* The default value for the draft mode option in all the environment's models
*/
draft_mode_default: boolean;
/**
* Whether the Improved validation at publishing option is active or not
*/
improved_validation_at_publishing: boolean;
/**
* Whether the site has custom upload storage settings
*/
Expand Down Expand Up @@ -11940,6 +11956,14 @@ export type SiteUpdateSchema = {
* Whether the Improved boolean fields option is active or not
*/
improved_boolean_fields?: boolean;
/**
* The default value for the draft mode option in all the environment's models
*/
draft_mode_default?: boolean;
/**
* Whether the Improved validation at publishing option is active or not
*/
improved_validation_at_publishing?: boolean;
/**
* Whether the site has custom upload storage settings
*/
Expand Down Expand Up @@ -12017,6 +12041,22 @@ export type SiteActivateImprovedBooleanFieldsTargetSchema = {
data: Site;
};

/**
* This interface was referenced by `Site`'s JSON-Schema
* via the `activate_draft_mode_as_default.targetSchema` link.
*/
export type SiteActivateDraftModeAsDefaultTargetSchema = {
data: Site;
};

/**
* This interface was referenced by `Site`'s JSON-Schema
* via the `activate_improved_validation_at_publishing.targetSchema` link.
*/
export type SiteActivateImprovedValidationAtPublishingTargetSchema = {
data: Site;
};

/**
* This interface was referenced by `Site`'s JSON-Schema
* via the `update_assets_cdn_default_settings.schema` link.
Expand Down
57 changes: 38 additions & 19 deletions packages/cma-client/src/generated/SimpleSchemaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@ export type Role = {
/**
* Specifies the environments the user can access
*/
environments_access: 'all' | 'primary_only' | 'sandbox_only';
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -2157,6 +2157,7 @@ export type RoleCreateTargetSchema = Role;
export type RoleUpdateTargetSchema = Role;
export type RoleSelfTargetSchema = Role;
export type RoleDestroyTargetSchema = Role;
export type RoleDuplicateTargetSchema = Role;
/**
* JSON API data
*
Expand Down Expand Up @@ -2206,7 +2207,7 @@ export type RoleMeta = {
/**
* Specifies the environments the user can access
*/
environments_access: 'all' | 'primary_only' | 'sandbox_only';
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -2438,7 +2439,7 @@ export type RoleAttributes = {
/**
* Specifies the environments the user can access
*/
environments_access: 'all' | 'primary_only' | 'sandbox_only';
environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -2678,7 +2679,7 @@ export type RoleCreateSchema = {
/**
* Specifies the environments the user can access
*/
environments_access?: 'all' | 'primary_only' | 'sandbox_only';
environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -2911,7 +2912,7 @@ export type RoleUpdateSchema = {
/**
* Specifies the environments the user can access
*/
environments_access?: 'all' | 'primary_only' | 'sandbox_only';
environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
/**
* Can create/edit roles and invite/remove collaborators
*/
Expand Down Expand Up @@ -5321,11 +5322,11 @@ export type ItemTypeUpdateSchema = {
* <details>
* <summary>Multi-line text (<code>text</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | --------------------------------- |
* | Code | `text` |
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
* | Available validators | `required`, `length`, `format` |
* | Property | Value |
* | ------------------------------ | ---------------------------------------------- |
* | Code | `text` |
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
* | Available validators | `required`, `length`, `format`, `sanitization` |
*
* </details>
*
Expand Down Expand Up @@ -5610,10 +5611,10 @@ export type ItemTypeUpdateSchema = {
*
* Accepts only strings that match a specified format.
*
* | Parameter | Type | Required | Description |
* | -------------------- | ------------------------- | -------- | ----------------------------------------------- |
* | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
* | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
* | Parameter | Type | Required | Description |
* | -------------------- | -------------------- | -------- | --------------------------------------------- |
* | `custom_pattern` | `Regexp` | Optional | Custom regular expression for validation |
* | `predefined_pattern` | `"email"` or `"url"` | Optional | Specifies a pre-defined format (email or URL) |
*
* **Note:** Only one of `custom_pattern` or `predefined_pattern` should be specified.
*
Expand Down Expand Up @@ -5826,7 +5827,7 @@ export type ItemTypeUpdateSchema = {
*
* Only accept references to block records of the specified block models.
*
* | Parameter | Type | Required | Description |
* | Parameter | Type | Required | Description |
* | ------------ | ----------------------- | -------- | ------------------------------ |
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
*
Expand Down Expand Up @@ -5993,9 +5994,9 @@ export type ItemTypeUpdateSchema = {
*
* Simple textual input for _Single-line string_ fields.
*
* | Parameter | Type | Required | Description |
* | Parameter | Type | Required | Description |
* | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
*
* </details>
Expand Down Expand Up @@ -6085,8 +6086,8 @@ export type ItemTypeUpdateSchema = {
*
* Built-in editor for _Single block_ fields.
*
* | Parameter | Type | Required | Description |
* | ----------------- | --------- | -------- | ---------------------------------------------------------- |
* | Parameter | Type | Required | Description |
* | ----------------- | --------- | -------- | --------------------------------------------------------- |
* | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
*
* </details>
Expand Down Expand Up @@ -11170,6 +11171,8 @@ export type SiteActivateImprovedHexManagementTargetSchema = Site;
export type SiteActivateImprovedGqlMultilocaleFieldsTargetSchema = Site;
export type SiteActivateImprovedGqlVisibilityControlTargetSchema = Site;
export type SiteActivateImprovedBooleanFieldsTargetSchema = Site;
export type SiteActivateDraftModeAsDefaultTargetSchema = Site;
export type SiteActivateImprovedValidationAtPublishingTargetSchema = Site;
export type SiteUpdateAssetsCdnDefaultSettingsTargetSchema = Site;
/**
* Meta attributes
Expand Down Expand Up @@ -11202,6 +11205,14 @@ export type SiteMeta = {
* Whether the Improved boolean fields option is active or not
*/
improved_boolean_fields: boolean;
/**
* The default value for the draft mode option in all the environment's models
*/
draft_mode_default: boolean;
/**
* Whether the Improved validation at publishing option is active or not
*/
improved_validation_at_publishing: boolean;
/**
* Whether the site has custom upload storage settings
*/
Expand Down Expand Up @@ -11549,6 +11560,14 @@ export type SiteUpdateSchema = {
* Whether the Improved boolean fields option is active or not
*/
improved_boolean_fields?: boolean;
/**
* The default value for the draft mode option in all the environment's models
*/
draft_mode_default?: boolean;
/**
* Whether the Improved validation at publishing option is active or not
*/
improved_validation_at_publishing?: boolean;
/**
* Whether the site has custom upload storage settings
*/
Expand Down
Loading

0 comments on commit fb4834d

Please sign in to comment.