From 4cda4d0ba7df99cf3934132303cf8e863aa1425a Mon Sep 17 00:00:00 2001 From: Stefano Verna Date: Fri, 13 Oct 2023 15:29:04 +0200 Subject: [PATCH] Upgrade schema --- .../cma-client/src/generated/SchemaTypes.ts | 72 ++++++++++++------- .../src/generated/SimpleSchemaTypes.ts | 72 ++++++++++++------- packages/dashboard-client/resources.json | 5 +- .../src/generated/SchemaTypes.ts | 20 ++++++ .../src/generated/SimpleSchemaTypes.ts | 20 ++++++ .../src/generated/resources/Account.ts | 2 + .../resources/PerOwnerPricingSubscription.ts | 7 +- 7 files changed, 148 insertions(+), 50 deletions(-) diff --git a/packages/cma-client/src/generated/SchemaTypes.ts b/packages/cma-client/src/generated/SchemaTypes.ts index 6866695..c1da5f2 100644 --- a/packages/cma-client/src/generated/SchemaTypes.ts +++ b/packages/cma-client/src/generated/SchemaTypes.ts @@ -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 * @@ -4420,23 +4420,22 @@ export type ItemTypeDestroyJobSchema = { *
* SEO and Social (seo) * - * | 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` | * *
* *
* Slug (slug) * - * | 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` | * *
* @@ -4454,22 +4453,22 @@ export type ItemTypeDestroyJobSchema = { *
* Single-asset (file) * - * | 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` | * *
* *
* Asset gallery (gallery) * - * | 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` | * *
* @@ -4625,7 +4624,7 @@ export type ItemTypeDestroyJobSchema = { *
* image_dimensions * - * Accept assets only within a specified height/width range. + * Accept assets only within a specified height and width range. * * | Parameter | Type | Required | Description | * | ------------------ | --------- | -------- | -------------------------------- | @@ -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. + * + *
+ * + *
+ * image_aspect_ratio + * + * 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. * *
* @@ -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". */ diff --git a/packages/cma-client/src/generated/SimpleSchemaTypes.ts b/packages/cma-client/src/generated/SimpleSchemaTypes.ts index f4c8094..c06cd16 100644 --- a/packages/cma-client/src/generated/SimpleSchemaTypes.ts +++ b/packages/cma-client/src/generated/SimpleSchemaTypes.ts @@ -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 * @@ -4945,23 +4945,22 @@ export type JobData = { *
* SEO and Social (seo) * - * | 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` | * *
* *
* Slug (slug) * - * | 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` | * *
* @@ -4979,22 +4978,22 @@ export type JobData = { *
* Single-asset (file) * - * | 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` | * *
* *
* Asset gallery (gallery) * - * | 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` | * *
* @@ -5150,7 +5149,7 @@ export type JobData = { *
* image_dimensions * - * Accept assets only within a specified height/width range. + * Accept assets only within a specified height and width range. * * | Parameter | Type | Required | Description | * | ------------------ | --------- | -------- | -------------------------------- | @@ -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. + * + *
+ * + *
+ * image_aspect_ratio + * + * 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. * *
* @@ -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. * diff --git a/packages/dashboard-client/resources.json b/packages/dashboard-client/resources.json index 3f892c4..08f9f51 100644 --- a/packages/dashboard-client/resources.json +++ b/packages/dashboard-client/resources.json @@ -51,6 +51,8 @@ "company", "password", "signup_to_newsletter", + "role_description", + "role_context", "acquisition_method" ], "relationships": [] @@ -474,7 +476,8 @@ "attributes": [ "payment_intent_id", "recurrence", - "billing_profile" + "billing_profile", + "downgrade_reason" ], "relationships": [ "plan" diff --git a/packages/dashboard-client/src/generated/SchemaTypes.ts b/packages/dashboard-client/src/generated/SchemaTypes.ts index b44345b..41af592 100644 --- a/packages/dashboard-client/src/generated/SchemaTypes.ts +++ b/packages/dashboard-client/src/generated/SchemaTypes.ts @@ -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; @@ -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: { /** diff --git a/packages/dashboard-client/src/generated/SimpleSchemaTypes.ts b/packages/dashboard-client/src/generated/SimpleSchemaTypes.ts index 457cdf9..8bff9f5 100644 --- a/packages/dashboard-client/src/generated/SimpleSchemaTypes.ts +++ b/packages/dashboard-client/src/generated/SimpleSchemaTypes.ts @@ -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; @@ -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; }; diff --git a/packages/dashboard-client/src/generated/resources/Account.ts b/packages/dashboard-client/src/generated/resources/Account.ts index a46cb36..371dd3d 100644 --- a/packages/dashboard-client/src/generated/resources/Account.ts +++ b/packages/dashboard-client/src/generated/resources/Account.ts @@ -23,6 +23,8 @@ export default class Account extends BaseResource { 'company', 'password', 'signup_to_newsletter', + 'role_description', + 'role_context', 'acquisition_method', ], relationships: [], diff --git a/packages/dashboard-client/src/generated/resources/PerOwnerPricingSubscription.ts b/packages/dashboard-client/src/generated/resources/PerOwnerPricingSubscription.ts index e253928..28a1627 100644 --- a/packages/dashboard-client/src/generated/resources/PerOwnerPricingSubscription.ts +++ b/packages/dashboard-client/src/generated/resources/PerOwnerPricingSubscription.ts @@ -19,7 +19,12 @@ export default class PerOwnerPricingSubscription extends BaseResource { body, { type: 'per_owner_pricing_subscription', - attributes: ['payment_intent_id', 'recurrence', 'billing_profile'], + attributes: [ + 'payment_intent_id', + 'recurrence', + 'billing_profile', + 'downgrade_reason', + ], relationships: ['plan'], }, ),