Skip to content

Commit

Permalink
Upgrade schema
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Oct 13, 2023
1 parent 6299a33 commit 4cda4d0
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 50 deletions.
72 changes: 48 additions & 24 deletions packages/cma-client/src/generated/SchemaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4234,7 +4234,7 @@ export type ItemTypeDestroyJobSchema = {
*
* Below you'll find a summary of all the validators available for each field type with their settings.
*
* Some validators are required for a specific type of field. For example, the _Slug_ field needs to have a `slug_title_field` validator to specify the ID of the _Single-line string_ field that will be used to generate the slug itself.
* Some validators are required for a specific type of field. For example, the _Modular Content_ field needs to have a `rich_text_blocks` validator, specifying which types of blocks it can contain.
*
* ### Specifying the appearance
*
Expand Down Expand Up @@ -4420,23 +4420,22 @@ export type ItemTypeDestroyJobSchema = {
* <details>
* <summary>SEO and Social (<code>seo</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | -------------------------------------------------------------------------------------------- |
* | Code | `seo` |
* | Built-in editors for the field | `seo` |
* | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `title_length`, `description_length` |
* | Property | Value |
* | ------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
* | Code | `seo` |
* | Built-in editors for the field | `seo` |
* | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `title_length`, `description_length` |
*
* </details>
*
* <details>
* <summary>Slug (<code>slug</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | ----------------------------------- |
* | Code | `slug` |
* | Built-in editors for the field | `slug` |
* | Required validators | `slug_title_field` |
* | Other validators available | `required`, `length`, `slug_format` |
* | Property | Value |
* | ------------------------------ | ------------------------------------------------------- |
* | Code | `slug` |
* | Built-in editors for the field | `slug` |
* | Available validators | `required`, `length`, `slug_format`, `slug_title_field` |
*
* </details>
*
Expand All @@ -4454,22 +4453,22 @@ export type ItemTypeDestroyJobSchema = {
* <details>
* <summary>Single-asset (<code>file</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | ------------------------------------------------------------------------------ |
* | Code | `file` |
* | Built-in editors for the field | `file` |
* | Available validators | `required`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
* | Property | Value |
* | ------------------------------ | ---------------------------------------------------------------------------------------------------- |
* | Code | `file` |
* | Built-in editors for the field | `file` |
* | Available validators | `required`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `extension`, `required_alt_title` |
*
* </details>
*
* <details>
* <summary>Asset gallery (<code>gallery</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | -------------------------------------------------------------------------- |
* | Code | `gallery` |
* | Built-in editors for the field | `gallery` |
* | Available validators | `size`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
* | Property | Value |
* | ------------------------------ | ------------------------------------------------------------------------------------------------ |
* | Code | `gallery` |
* | Built-in editors for the field | `gallery` |
* | Available validators | `size`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `extension`, `required_alt_title` |
*
* </details>
*
Expand Down Expand Up @@ -4625,7 +4624,7 @@ export type ItemTypeDestroyJobSchema = {
* <details>
* <summary><code>image_dimensions</code></summary>
*
* Accept assets only within a specified height/width range.
* Accept assets only within a specified height and width range.
*
* | Parameter | Type | Required | Description |
* | ------------------ | --------- | -------- | -------------------------------- |
Expand All @@ -4634,7 +4633,25 @@ export type ItemTypeDestroyJobSchema = {
* | `height_min_value` | `Integer` | | Numeric value for minimum width |
* | `height_max_value` | `Integer` | | Numeric value for maximum height |
*
* At least one parameter must be specified.
* At least one pair of height/width parameters must be specified.
*
* </details>
*
* <details>
* <summary><code>image_aspect_ratio</code></summary>
*
* Accept assets only within a specified aspect ratio range.
*
* | Parameter | Type | Required | Description |
* | -------------------- | --------- | -------- | ---------------------------------------------- |
* | `min_ar_numerator` | `Integer` | | Numerator part of the minimum aspect ratio |
* | `min_ar_denominator` | `Integer` | | Denominator part of the minimum aspect ratio |
* | `eq_ar_numerator` | `Integer` | | Numerator part for the required aspect ratio |
* | `eq_ar_denominator` | `Integer` | | Denominator part for the required aspect ratio |
* | `max_ar_numerator` | `Integer` | | Numerator part of the maximum aspect ratio |
* | `max_ar_denominator` | `Integer` | | Denominator part of the maximum aspect ratio |
*
* At least one pair of numerator/denominator must be specified.
*
* </details>
*
Expand Down Expand Up @@ -6348,6 +6365,13 @@ export type BuildEventSelfTargetSchema = {
/**
* DatoCMS stores the individual pieces of content you create from a model as records, which are much like table rows in a database. For backward-compatibility reasons, the API refers to records as "items".
*
* You can learn how the records are structured at the API level, and everything that is necessary to interact with the records through CMA in the following detail sections:
*
* * [List/filter records](https://www.datocms.com/docs/content-management-api/resources/item/instances)
* * [Create new records](https://www.datocms.com/docs/content-management-api/resources/item/create)
* * [Update existing records](https://www.datocms.com/docs/content-management-api/resources/item/update)
*
*
* This interface was referenced by `DatoApi`'s JSON-Schema
* via the `definition` "item".
*/
Expand Down
72 changes: 48 additions & 24 deletions packages/cma-client/src/generated/SimpleSchemaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4759,7 +4759,7 @@ export type JobData = {
*
* Below you'll find a summary of all the validators available for each field type with their settings.
*
* Some validators are required for a specific type of field. For example, the _Slug_ field needs to have a `slug_title_field` validator to specify the ID of the _Single-line string_ field that will be used to generate the slug itself.
* Some validators are required for a specific type of field. For example, the _Modular Content_ field needs to have a `rich_text_blocks` validator, specifying which types of blocks it can contain.
*
* ### Specifying the appearance
*
Expand Down Expand Up @@ -4945,23 +4945,22 @@ export type JobData = {
* <details>
* <summary>SEO and Social (<code>seo</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | -------------------------------------------------------------------------------------------- |
* | Code | `seo` |
* | Built-in editors for the field | `seo` |
* | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `title_length`, `description_length` |
* | Property | Value |
* | ------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
* | Code | `seo` |
* | Built-in editors for the field | `seo` |
* | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `title_length`, `description_length` |
*
* </details>
*
* <details>
* <summary>Slug (<code>slug</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | ----------------------------------- |
* | Code | `slug` |
* | Built-in editors for the field | `slug` |
* | Required validators | `slug_title_field` |
* | Other validators available | `required`, `length`, `slug_format` |
* | Property | Value |
* | ------------------------------ | ------------------------------------------------------- |
* | Code | `slug` |
* | Built-in editors for the field | `slug` |
* | Available validators | `required`, `length`, `slug_format`, `slug_title_field` |
*
* </details>
*
Expand All @@ -4979,22 +4978,22 @@ export type JobData = {
* <details>
* <summary>Single-asset (<code>file</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | ------------------------------------------------------------------------------ |
* | Code | `file` |
* | Built-in editors for the field | `file` |
* | Available validators | `required`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
* | Property | Value |
* | ------------------------------ | ---------------------------------------------------------------------------------------------------- |
* | Code | `file` |
* | Built-in editors for the field | `file` |
* | Available validators | `required`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `extension`, `required_alt_title` |
*
* </details>
*
* <details>
* <summary>Asset gallery (<code>gallery</code>)</summary>
*
* | Property | Value |
* | ------------------------------ | -------------------------------------------------------------------------- |
* | Code | `gallery` |
* | Built-in editors for the field | `gallery` |
* | Available validators | `size`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
* | Property | Value |
* | ------------------------------ | ------------------------------------------------------------------------------------------------ |
* | Code | `gallery` |
* | Built-in editors for the field | `gallery` |
* | Available validators | `size`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `extension`, `required_alt_title` |
*
* </details>
*
Expand Down Expand Up @@ -5150,7 +5149,7 @@ export type JobData = {
* <details>
* <summary><code>image_dimensions</code></summary>
*
* Accept assets only within a specified height/width range.
* Accept assets only within a specified height and width range.
*
* | Parameter | Type | Required | Description |
* | ------------------ | --------- | -------- | -------------------------------- |
Expand All @@ -5159,7 +5158,25 @@ export type JobData = {
* | `height_min_value` | `Integer` | | Numeric value for minimum width |
* | `height_max_value` | `Integer` | | Numeric value for maximum height |
*
* At least one parameter must be specified.
* At least one pair of height/width parameters must be specified.
*
* </details>
*
* <details>
* <summary><code>image_aspect_ratio</code></summary>
*
* Accept assets only within a specified aspect ratio range.
*
* | Parameter | Type | Required | Description |
* | -------------------- | --------- | -------- | ---------------------------------------------- |
* | `min_ar_numerator` | `Integer` | | Numerator part of the minimum aspect ratio |
* | `min_ar_denominator` | `Integer` | | Denominator part of the minimum aspect ratio |
* | `eq_ar_numerator` | `Integer` | | Numerator part for the required aspect ratio |
* | `eq_ar_denominator` | `Integer` | | Denominator part for the required aspect ratio |
* | `max_ar_numerator` | `Integer` | | Numerator part of the maximum aspect ratio |
* | `max_ar_denominator` | `Integer` | | Denominator part of the maximum aspect ratio |
*
* At least one pair of numerator/denominator must be specified.
*
* </details>
*
Expand Down Expand Up @@ -6803,6 +6820,13 @@ export type BuildEventRelationships = {
/**
* DatoCMS stores the individual pieces of content you create from a model as records, which are much like table rows in a database. For backward-compatibility reasons, the API refers to records as "items".
*
* You can learn how the records are structured at the API level, and everything that is necessary to interact with the records through CMA in the following detail sections:
*
* * [List/filter records](https://www.datocms.com/docs/content-management-api/resources/item/instances)
* * [Create new records](https://www.datocms.com/docs/content-management-api/resources/item/create)
* * [Update existing records](https://www.datocms.com/docs/content-management-api/resources/item/update)
*
*
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
* via the `destroy.targetSchema` link.
*
Expand Down
5 changes: 4 additions & 1 deletion packages/dashboard-client/resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
"company",
"password",
"signup_to_newsletter",
"role_description",
"role_context",
"acquisition_method"
],
"relationships": []
Expand Down Expand Up @@ -474,7 +476,8 @@
"attributes": [
"payment_intent_id",
"recurrence",
"billing_profile"
"billing_profile",
"downgrade_reason"
],
"relationships": [
"plan"
Expand Down
20 changes: 20 additions & 0 deletions packages/dashboard-client/src/generated/SchemaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,22 @@ export type AccountCreateSchema = {
* Whether the user opts-in to signup to DatoCMS newletter
*/
signup_to_newsletter?: boolean;
/**
* Role description that best describes you
*/
role_description?:
| 'cto'
| 'lead_developer'
| 'frontend_developer'
| 'web_designer'
| 'digital_marketing'
| 'project_manager'
| 'designer'
| 'content';
/**
* Context in which you perform your role
*/
role_context?: 'agency' | 'company' | 'freelancer' | 'student';
acquisition_method?: {
source: string;
medium: string;
Expand Down Expand Up @@ -1287,6 +1303,10 @@ export type PerOwnerPricingSubscriptionCreateSchema = {
po_number?: null | string;
zip: string;
};
/**
* Reason for the downgrade (only considered in case of switch to free plan)
*/
downgrade_reason?: string;
};
relationships: {
/**
Expand Down
20 changes: 20 additions & 0 deletions packages/dashboard-client/src/generated/SimpleSchemaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,22 @@ export type AccountCreateSchema = {
* Whether the user opts-in to signup to DatoCMS newletter
*/
signup_to_newsletter?: boolean;
/**
* Role description that best describes you
*/
role_description?:
| 'cto'
| 'lead_developer'
| 'frontend_developer'
| 'web_designer'
| 'digital_marketing'
| 'project_manager'
| 'designer'
| 'content';
/**
* Context in which you perform your role
*/
role_context?: 'agency' | 'company' | 'freelancer' | 'student';
acquisition_method?: {
source: string;
medium: string;
Expand Down Expand Up @@ -2056,6 +2072,10 @@ export type PerOwnerPricingSubscriptionCreateSchema = {
po_number?: null | string;
zip: string;
};
/**
* Reason for the downgrade (only considered in case of switch to free plan)
*/
downgrade_reason?: string;
plan: PerOwnerPricingPlanData;
};

Expand Down
2 changes: 2 additions & 0 deletions packages/dashboard-client/src/generated/resources/Account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export default class Account extends BaseResource {
'company',
'password',
'signup_to_newsletter',
'role_description',
'role_context',
'acquisition_method',
],
relationships: [],
Expand Down
Loading

0 comments on commit 4cda4d0

Please sign in to comment.