import type {
  FieldCreateConfig,
  FieldUpdateConfig,
  GenericFieldAttributes,
} from '../fieldTypes/schema.js';

import type {
  ItemTypeDefinition,
  ToItemAttributes,
  ToItemAttributesInNestedResponse,
  ToItemAttributesInRequest,
  ToItemHrefSchemaField,
  ToItemHrefSchemaOrderBy,
} from '../utilities/itemDefinition.js';

export type Field = GenericFieldAttributes<FieldStableShell>;

export type FieldAttributes =
  GenericFieldAttributes<FieldAttributesStableShell>;

export type FieldCreateSchema = FieldCreateConfig<FieldCreateSchemaStableShell>;

export type FieldUpdateSchema = FieldUpdateConfig<FieldUpdateSchemaStableShell>;

export type ItemTypeData<D extends ItemTypeDefinition = ItemTypeDefinition> = {
  type: ItemTypeType;
  id: D extends ItemTypeDefinition ? D['itemTypeId'] : ItemTypeIdentity;
};

export type Item<D extends ItemTypeDefinition = ItemTypeDefinition> =
  D extends ItemTypeDefinition
    ? {
        __itemTypeId?: D['itemTypeId'];
        id: ItemIdentity;
        type: ItemType1;
        item_type: ItemTypeData<D>;
        creator?:
          | AccountData
          | AccessTokenData
          | UserData
          | SsoUserData
          | OrganizationData;
        meta: ItemMeta;
      } & ToItemAttributes<D>
    : never;

export type ItemInNestedResponse<
  D extends ItemTypeDefinition = ItemTypeDefinition,
> = D extends ItemTypeDefinition
  ? {
      __itemTypeId?: D['itemTypeId'];
      id: ItemIdentity;
      type: ItemType1;
      item_type: ItemTypeData<D>;
      creator?:
        | AccountData
        | AccessTokenData
        | UserData
        | SsoUserData
        | OrganizationData;
      meta: ItemMeta;
    } & ToItemAttributesInNestedResponse<D>
  : never;

/* tslint:disable */
/**
 * This file was automatically generated by hyperschema-to-ts: DO NOT MODIFY IT BY HAND.
 */
/**
 * ID of role
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "id".
 */
export type RoleIdentity = string;
/**
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "type".
 */
export type RoleType = 'role';
/**
 * ID of environment. Can only contain lowercase letters, numbers and dashes
 *
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `definition` "id".
 */
export type EnvironmentIdentity = string;
/**
 * RFC 4122 UUID of item type expressed in URL-safe base64 format
 *
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `definition` "id".
 */
export type ItemTypeIdentity = string;
/**
 * RFC 4122 UUID of workflow expressed in URL-safe base64 format
 *
 * This interface was referenced by `Workflow`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Workflow`'s JSON-Schema
 * via the `definition` "id".
 */
export type WorkflowIdentity = string;
/**
 * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
 *
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `definition` "id".
 */
export type UploadCollectionIdentity = string;
/**
 * ID of build_trigger
 *
 * This interface was referenced by `BuildTrigger`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `BuildTrigger`'s JSON-Schema
 * via the `definition` "id".
 */
export type BuildTriggerIdentity = string;
/**
 * ID of search_index
 *
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `definition` "id".
 */
export type SearchIndexIdentity = string;
/**
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type RoleInstancesTargetSchema = Role[];
/**
 * ID of collaborator
 *
 * This interface was referenced by `User`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `User`'s JSON-Schema
 * via the `definition` "id".
 */
export type UserIdentity = string;
/**
 * This interface was referenced by `User`'s JSON-Schema
 * via the `definition` "type".
 */
export type UserType = 'user';
/**
 * This interface was referenced by `User`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type UserInstancesTargetSchema = User[];
/**
 * This interface was referenced by `User`'s JSON-Schema
 * via the `self.hrefSchema` link.
 */
export type UserSelfHrefSchema = {
  /**
   * Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `role`.
   */
  include?: string;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `User`'s JSON-Schema
 * via the `me.targetSchema` link.
 */
export type UserMeTargetSchema =
  | User
  | SsoUser
  | AccessToken
  | Account
  | Organization;
/**
 * ID of user
 *
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `definition` "id".
 */
export type SsoUserIdentity = string;
/**
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `definition` "type".
 */
export type SsoUserType = 'sso_user';
/**
 * This interface was referenced by `SsoGroup`'s JSON-Schema
 * via the `definition` "type".
 */
export type SsoGroupType = 'sso_group';
/**
 * ID of group
 *
 * This interface was referenced by `SsoGroup`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SsoGroup`'s JSON-Schema
 * via the `definition` "id".
 */
export type SsoGroupIdentity = string;
/**
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SsoUserInstancesTargetSchema = SsoUser[];
/**
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `copy_users.targetSchema` link.
 */
export type SsoUserCopyUsersTargetSchema = SsoUser[];
/**
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `destroy.hrefSchema` link.
 */
export type SsoUserDestroyHrefSchema = {
  /**
   * New owner for resources previously owned by the deleted SSO user. This argument specifies the new owner type.
   */
  destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
  /**
   * New owner for resources previously owned by the deleted SSO user. This argument specifies the new owner ID.
   */
  destination_user_id?: string;
  [k: string]: unknown;
};
/**
 * ID of access_token
 *
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `definition` "id".
 */
export type AccessTokenIdentity = string;
/**
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `definition` "type".
 */
export type AccessTokenType = 'access_token';
/**
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type AccessTokenInstancesTargetSchema = AccessToken[];
/**
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `destroy.hrefSchema` link.
 */
export type AccessTokenDestroyHrefSchema = {
  /**
   * New owner for resources previously owned by the deleted access token. This argument specifies the new owner type. Use `account` or `organization` to reassign to the project's owner — `client.site.find().owner` returns the right type/id pair to pass.
   */
  destination_user_type?:
    | 'account'
    | 'organization'
    | 'user'
    | 'access_token'
    | 'sso_user';
  /**
   * New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.
   */
  destination_user_id?: string;
  [k: string]: unknown;
};
/**
 * ID of account
 *
 * This interface was referenced by `Account`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Account`'s JSON-Schema
 * via the `definition` "id".
 */
export type AccountIdentity = string;
/**
 * This interface was referenced by `Account`'s JSON-Schema
 * via the `definition` "type".
 */
export type AccountType = 'account';
/**
 * ID of organization
 *
 * This interface was referenced by `Organization`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Organization`'s JSON-Schema
 * via the `definition` "id".
 */
export type OrganizationIdentity = string;
/**
 * This interface was referenced by `Organization`'s JSON-Schema
 * via the `definition` "type".
 */
export type OrganizationType = 'organization';
/**
 * This interface was referenced by `User`'s JSON-Schema
 * via the `me.hrefSchema` link.
 */
export type UserMeHrefSchema = {
  /**
   * Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `role`.
   */
  include?: string;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `User`'s JSON-Schema
 * via the `destroy.hrefSchema` link.
 */
export type UserDestroyHrefSchema = {
  /**
   * New owner for resources previously owned by the deleted user. This argument specifies the new owner type.
   */
  destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
  /**
   * New owner for resources previously owned by the deleted user. This argument specifies the new owner ID.
   */
  destination_user_id?: string;
  [k: string]: unknown;
};
/**
 * ULID of event (https://github.com/ulid/spec)
 *
 * This interface was referenced by `AuditLogEvent`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `AuditLogEvent`'s JSON-Schema
 * via the `definition` "id".
 */
export type AuditLogEventIdentity = string;
/**
 * This interface was referenced by `AuditLogEvent`'s JSON-Schema
 * via the `definition` "type".
 */
export type AuditLogEventType = 'audit_log_event';
/**
 * This interface was referenced by `AuditLogEvent`'s JSON-Schema
 * via the `query.targetSchema` link.
 */
export type AuditLogEventQueryTargetSchema = AuditLogEvent[];
/**
 * ID of plan
 *
 * This interface was referenced by `SitePlan`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SitePlan`'s JSON-Schema
 * via the `definition` "id".
 */
export type SitePlanIdentity = string;
/**
 * This interface was referenced by `SitePlan`'s JSON-Schema
 * via the `definition` "type".
 */
export type SitePlanType = 'site_plan';
/**
 * RFC 4122 UUID of menu item expressed in URL-safe base64 format
 *
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `definition` "id".
 */
export type MenuItemIdentity = string;
/**
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `definition` "type".
 */
export type MenuItemType = 'menu_item';
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `definition` "type".
 */
export type ItemTypeType = 'item_type';
/**
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `definition` "type".
 */
export type ItemTypeFilterType = 'item_type_filter';
/**
 * RFC 4122 UUID of filter expressed in URL-safe base64 format
 *
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `definition` "id".
 */
export type ItemTypeFilterIdentity = string;
/**
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type MenuItemInstancesTargetSchema = MenuItem[];
/**
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type MenuItemInstancesHrefSchema = {
  filter?: {
    /**
     * IDs to fetch, comma separated
     */
    ids: string;
  };
};
/**
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `reorder.schema` link.
 */
export type MenuItemReorderSchema = {
  id: MenuItemIdentity;
  type?: MenuItemType;
  /**
   * Ordering index
   */
  position: number;
  parent: null | MenuItemData;
}[];
/**
 * ID of job
 *
 * This interface was referenced by `Job`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Job`'s JSON-Schema
 * via the `definition` "id".
 */
export type JobIdentity = string;
/**
 * This interface was referenced by `Job`'s JSON-Schema
 * via the `definition` "type".
 */
export type JobType = 'job';
/**
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `reorder.jobSchema` link.
 */
export type MenuItemReorderJobSchema = MenuItem[];
/**
 * RFC 4122 UUID of schema menu item expressed in URL-safe base64 format
 *
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `definition` "id".
 */
export type SchemaMenuItemIdentity = string;
/**
 * JSON API type field
 *
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `definition` "type".
 */
export type SchemaMenuItemType = 'schema_menu_item';
/**
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SchemaMenuItemInstancesTargetSchema = SchemaMenuItem[];
/**
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type SchemaMenuItemInstancesHrefSchema = {
  filter?: {
    /**
     * IDs to fetch, comma separated
     */
    ids: string;
  };
};
/**
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `reorder.schema` link.
 */
export type SchemaMenuItemReorderSchema = {
  id: SchemaMenuItemIdentity;
  type?: SchemaMenuItemType;
  /**
   * Ordering index
   */
  position: number;
  parent: null | SchemaMenuItemData;
}[];
/**
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `reorder.jobSchema` link.
 */
export type SchemaMenuItemReorderJobSchema = SchemaMenuItem[];
/**
 * JSON API type field
 *
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `definition` "type".
 */
export type UploadCollectionType = 'upload_collection';
/**
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type UploadCollectionInstancesTargetSchema = UploadCollection[];
/**
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type UploadCollectionInstancesHrefSchema = {
  filter?: {
    /**
     * IDs to fetch, comma separated
     */
    ids: string;
  };
};
/**
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `reorder.schema` link.
 */
export type UploadCollectionReorderSchema = {
  id: UploadCollectionIdentity;
  type?: UploadCollectionType;
  /**
   * Ordering index
   */
  position: number;
  parent: null | UploadCollectionData;
}[];
/**
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `reorder.jobSchema` link.
 */
export type UploadCollectionReorderJobSchema = UploadCollection[];
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `definition` "type".
 */
export type ItemType1 = 'item';
/**
 * RFC 4122 UUID of record expressed in URL-safe base64 format
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `definition` "id".
 */
export type ItemIdentity = string;
/**
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `definition` "type".
 */
export type FieldType = 'field';
/**
 * RFC 4122 UUID of field expressed in URL-safe base64 format
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `definition` "id".
 */
export type FieldIdentity = string;
/**
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `definition` "type".
 */
export type FieldsetType = 'fieldset';
/**
 * RFC 4122 UUID of fieldset expressed in URL-safe base64 format
 *
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `definition` "id".
 */
export type FieldsetIdentity = string;
/**
 * This interface was referenced by `Workflow`'s JSON-Schema
 * via the `definition` "type".
 */
export type WorkflowType = 'workflow';
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `create.hrefSchema` link.
 */
export type ItemTypeCreateHrefSchema = {
  /**
   * Skip the creation of a menu item linked to the model
   */
  skip_menu_item_creation?: boolean;
  /**
   * Explicitely specify the ID of the menu item that will be linked to the model
   */
  menu_item_id?: string;
  /**
   * Explicitely specify the ID of the schema menu item that will be linked to the model
   */
  schema_menu_item_id?: string;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type ItemTypeInstancesTargetSchema = ItemType[];
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `destroy.hrefSchema` link.
 */
export type ItemTypeDestroyHrefSchema = {
  /**
   * Skip the deletion of the menu items linked to the model
   */
  skip_menu_items_deletion?: boolean;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `referencing.targetSchema` link.
 */
export type ItemTypeReferencingTargetSchema = ItemType[];
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `reorder_fields_and_fieldsets.schema` link.
 */
export type ItemTypeReorderFieldsAndFieldsetsSchema = (
  | {
      id: FieldIdentity;
      type?: FieldType;
      /**
       * Ordering index
       */
      position: number;
      fieldset: null | FieldsetData;
    }
  | {
      id: FieldsetIdentity;
      type?: FieldsetType;
      /**
       * Ordering index
       */
      position: number;
    }
)[];
/**
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type FieldInstancesTargetSchema = Field[];
/**
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `referencing.targetSchema` link.
 */
export type FieldReferencingTargetSchema = Field[];
/**
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `related.targetSchema` link.
 */
export type FieldRelatedTargetSchema = Field[];
/**
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type FieldsetInstancesTargetSchema = Fieldset[];
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `reorder_fields_and_fieldsets.jobSchema` link.
 */
export type ItemTypeReorderFieldsAndFieldsetsJobSchema = (Field | Fieldset)[];
/**
 * JSON web token for the session
 *
 * This interface was referenced by `Session`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Session`'s JSON-Schema
 * via the `definition` "id".
 */
export type SessionIdentity = string;
/**
 * This interface was referenced by `Session`'s JSON-Schema
 * via the `definition` "type".
 */
export type SessionType = 'session';
/**
 * RFC 4122 UUID of plugin expressed in URL-safe base64 format
 *
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `definition` "id".
 */
export type PluginIdentity = string;
/**
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `definition` "type".
 */
export type PluginType = 'plugin';
/**
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type PluginInstancesTargetSchema = Plugin[];
/**
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `fields.targetSchema` link.
 */
export type PluginFieldsTargetSchema = Field[];
/**
 * ID of job result
 *
 * This interface was referenced by `JobResult`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `JobResult`'s JSON-Schema
 * via the `definition` "id".
 */
export type JobResultIdentity = string;
/**
 * This interface was referenced by `JobResult`'s JSON-Schema
 * via the `definition` "type".
 */
export type JobResultType = 'job_result';
/**
 * ID of limit
 *
 * This interface was referenced by `SubscriptionLimit`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SubscriptionLimit`'s JSON-Schema
 * via the `definition` "id".
 */
export type SubscriptionLimitIdentity = string;
/**
 * This interface was referenced by `SubscriptionLimit`'s JSON-Schema
 * via the `definition` "type".
 */
export type SubscriptionLimitType = 'subscription_limit';
/**
 * This interface was referenced by `SubscriptionLimit`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SubscriptionLimitInstancesTargetSchema = SubscriptionLimit[];
/**
 * ID of feature
 *
 * This interface was referenced by `SubscriptionFeature`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SubscriptionFeature`'s JSON-Schema
 * via the `definition` "id".
 */
export type SubscriptionFeatureIdentity = string;
/**
 * This interface was referenced by `SubscriptionFeature`'s JSON-Schema
 * via the `definition` "type".
 */
export type SubscriptionFeatureType = 'subscription_feature';
/**
 * This interface was referenced by `SubscriptionFeature`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SubscriptionFeatureInstancesTargetSchema = SubscriptionFeature[];
/**
 * ID of menu item
 *
 * This interface was referenced by `BuildEvent`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `BuildEvent`'s JSON-Schema
 * via the `definition` "id".
 */
export type BuildEventIdentity = string;
/**
 * This interface was referenced by `BuildEvent`'s JSON-Schema
 * via the `definition` "type".
 */
export type BuildEventType = 'build_event';
/**
 * This interface was referenced by `BuildTrigger`'s JSON-Schema
 * via the `definition` "type".
 */
export type BuildTriggerType = 'build_trigger';
/**
 * This interface was referenced by `BuildEvent`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type BuildEventInstancesTargetSchema = BuildEvent[];
/**
 * This interface was referenced by `BuildEvent`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type BuildEventInstancesHrefSchema = {
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 30, maximum is 500)
     */
    limit?: number;
  };
  /**
   * Attributes to filter
   */
  filter?: {
    /**
     * IDs to fetch, comma separated
     */
    ids?: string;
    fields?: {
      build_trigger_id?: {
        eq?: string;
      };
      event_type?: {
        /**
         * The type of activity
         */
        eq?:
          | 'request_success'
          | 'request_failure'
          | 'response_success'
          | 'response_failure'
          | 'request_aborted'
          | 'response_unprocessable';
      };
      created_at?: {
        gt?: string;
        lt?: string;
      };
    };
  };
  /**
   * Fields used to order results
   */
  order_by?:
    | 'build_trigger_id_asc'
    | 'build_trigger_id_desc'
    | 'created_at_asc'
    | 'created_at_desc'
    | 'event_type_asc'
    | 'event_type_desc';
  [k: string]: unknown;
};
/**
 * ID of search index event
 *
 * This interface was referenced by `SearchIndexEvent`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SearchIndexEvent`'s JSON-Schema
 * via the `definition` "id".
 */
export type SearchIndexEventIdentity = string;
/**
 * This interface was referenced by `SearchIndexEvent`'s JSON-Schema
 * via the `definition` "type".
 */
export type SearchIndexEventType = 'search_index_event';
/**
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `definition` "type".
 */
export type SearchIndexType = 'search_index';
/**
 * This interface was referenced by `SearchIndexEvent`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SearchIndexEventInstancesTargetSchema = SearchIndexEvent[];
/**
 * This interface was referenced by `SearchIndexEvent`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type SearchIndexEventInstancesHrefSchema = {
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 30, maximum is 500)
     */
    limit?: number;
  };
  /**
   * Attributes to filter
   */
  filter?: {
    /**
     * IDs to fetch, comma separated
     */
    ids?: string;
    fields?: {
      search_index_id?: {
        eq?: string;
      };
      event_type?: {
        /**
         * The type of activity
         */
        eq?:
          | 'indexing_started'
          | 'indexing_success'
          | 'indexing_failure'
          | 'indexing_aborted';
      };
      created_at?: {
        gt?: string;
        lt?: string;
      };
    };
  };
  /**
   * Fields used to order results
   */
  order_by?:
    | 'search_index_id_asc'
    | 'search_index_id_desc'
    | 'created_at_asc'
    | 'created_at_desc'
    | 'event_type_asc'
    | 'event_type_desc';
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type ItemInstancesTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D>[] : ItemInNestedResponse<D>[];
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type ItemInstancesHrefSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
> = {
  /**
   * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
   */
  nested?: boolean;
  /**
   * Attributes to filter records
   */
  filter?: {
    /**
     * Record (or block record) IDs to fetch, comma separated. If you use this filter, you _must not_ use `filter[type]`. You can combine it with meta fields (like `_published_at`, `_status`), but _must not_ use model-specific fields
     */
    ids?: string;
    /**
     * Model/Block model ID or `api_key` to filter. If you use this filter, you _must not_ use `filter[ids]`. When passing a single element, you can use both meta fields and model-specific fields (note: model-specific fields only work with models, not block models). When passing multiple comma-separated values, you can use meta fields but _must not_ use model-specific fields
     */
    type?: string;
    /**
     * Textual query to match. Can be combined with other filters. When used, only records (not blocks) are returned. If `locale` is defined, search within that locale. Otherwise environment's main locale will be used.
     */
    query?: string;
    /**
     * Filter by record fields. Meta fields (like `_published_at`, `_status`) can be used in most cases. Model-specific fields (like `title`, `name`) require `filter[type]` to specify a single model, and only work with models (not block models). Same syntax as [GraphQL API records filters](/docs/content-delivery-api/filtering-records): use square brackets to indicate nesting levels. E.g. `filter[fields][parent][eq]=<ID_VALUE>`. Use snake_case for field names. If `locale` is defined, search within that locale. Otherwise environment's main locale will be used.
     */
    fields?: ToItemHrefSchemaField<D>;
    /**
     * When set, only valid records are included in the results.
     */
    only_valid?: string;
    [k: string]: unknown;
  };
  /**
   * When `filter[query]` or `field[fields]` is defined, filter by this locale. Default: environment's main locale
   */
  locale?: string;
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 30, maximum is 500)
     */
    limit?: number;
  };
  /**
   * Fields used to order results. You **must** specify also `filter[type]` with one element only to be able use this option. Format: `<field_name>_(ASC|DESC)`, where `<field_name>` can be either the API key of a model's field, or one of the following meta columns: `id`, `_updated_at`, `_created_at`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `_is_valid`, `position` (only for sortable models). You can pass multiple comma separated rules.
   */
  order_by?: ToItemHrefSchemaOrderBy<D>;
  /**
   * Whether you want the currently published versions (`published`) of your records, or the latest available (`current`, default)
   */
  version?: string;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `references.targetSchema` link.
 */
export type ItemReferencesTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D>[] : ItemInNestedResponse<D>[];
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `references.hrefSchema` link.
 */
export type ItemReferencesHrefSchema = {
  /**
   * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
   */
  nested?: boolean;
  /**
   * Retrieve only the selected type of version that is linked to the record; current, published or both
   */
  version?: null | ('current' | 'published' | 'published-or-current');
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `self.hrefSchema` link.
 */
export type ItemSelfHrefSchema = {
  /**
   * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
   */
  nested?: boolean;
  /**
   * Whether you want the currently published versions (`published`) of your records, or the latest available (`current`, default)
   */
  version?: string;
  [k: string]: unknown;
};
/**
 * RFC 4122 UUID of record expressed in URL-safe base64 format
 *
 * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
 * via the `definition` "id".
 */
export type ItemCurrentVsPublishedStateIdentity = string;
/**
 * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
 * via the `definition` "type".
 */
export type ItemCurrentVsPublishedStateType = 'item_current_vs_published_state';
/**
 * This interface was referenced by `ScheduledPublication`'s JSON-Schema
 * via the `definition` "type".
 */
export type ScheduledPublicationType = 'scheduled_publication';
/**
 * ID of scheduled_publication
 *
 * This interface was referenced by `ScheduledPublication`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `ScheduledPublication`'s JSON-Schema
 * via the `definition` "id".
 */
export type ScheduledPublicationIdentity = string;
/**
 * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
 * via the `definition` "type".
 */
export type ScheduledUnpublishingType = 'scheduled_unpublishing';
/**
 * ID of scheduled_unpublishing
 *
 * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
 * via the `definition` "id".
 */
export type ScheduledUnpublishingIdentity = string;
/**
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `definition` "type".
 */
export type ItemVersionType = 'item_version';
/**
 * RFC 4122 UUID of redord version expressed in URL-safe base64 format
 *
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `definition` "id".
 */
export type ItemVersionIdentity = string;
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `publish.schema` link.
 */
export type ItemPublishSchema = {
  /**
   * Publish only the specified locales & non-localized content (see following attributes). To publish the entire record, simply avoid passing a request body to the endpoint.
   */
  type?: 'selective_publish_operation';
  /**
   * Array of [valid locale codes in this project](/product-updates/get-locales-list-from-graphql) to publish.
   */
  content_in_locales: string[];
  /**
   * Whether non-localized content will be published
   */
  non_localized_content: boolean;
} | null;
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `publish.hrefSchema` link.
 */
export type ItemPublishHrefSchema = {
  /**
   * When `recursive` is `true`, if the record belongs to a [tree-like collection](https://www.datocms.com/docs/content-modelling/trees), and any of the parent records aren't published, those parent records will published as well. When `recursive` is `false` or not specified, an `UNPUBLISHED_PARENT` error will occur in such cases.
   */
  recursive?: boolean;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `unpublish.schema` link.
 */
export type ItemUnpublishSchema = {
  type?: 'selective_unpublish_operation';
  /**
   * Array of locales to publish. They must be currently published in this record. To unpublish all locales, do NOT use this parameter, but instead unpublish the entire record by leaving the body blank (see example above).
   */
  content_in_locales: string[];
} | null;
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `unpublish.hrefSchema` link.
 */
export type ItemUnpublishHrefSchema = {
  /**
   * When `recursive` is `true`, if the record belongs to a [tree-like collection](https://www.datocms.com/docs/content-modelling/trees), and any of the children records are published, those children records will unpublished as well. When `recursive` is `false` or not specified, a `PUBLISHED_CHILDREN` error will occur in such cases.
   */
  recursive?: boolean;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_publish.jobSchema` link.
 */
export type ItemBulkPublishJobSchema = unknown[];
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_unpublish.jobSchema` link.
 */
export type ItemBulkUnpublishJobSchema = unknown[];
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_destroy.jobSchema` link.
 */
export type ItemBulkDestroyJobSchema = unknown[];
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_move_to_stage.jobSchema` link.
 */
export type ItemBulkMoveToStageJobSchema = unknown[];
/**
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `restore.jobSchema` link.
 */
export type ItemVersionRestoreJobSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false
  ? [Item<D>, ItemVersion]
  : [ItemInNestedResponse<D>, ItemVersion];
/**
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type ItemVersionInstancesTargetSchema = ItemVersion[];
/**
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type ItemVersionInstancesHrefSchema = {
  /**
   * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
   */
  nested?: boolean;
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 15, maximum is 50)
     */
    limit?: number;
  };
  [k: string]: unknown;
};
/**
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `self.hrefSchema` link.
 */
export type ItemVersionSelfHrefSchema = {
  /**
   * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
   */
  nested?: boolean;
  [k: string]: unknown;
};
/**
 * RFC 4122 UUID of upload expressed in URL-safe base64 format
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `definition` "id".
 */
export type UploadIdentity = string;
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `definition` "type".
 */
export type UploadType = 'upload';
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type UploadInstancesTargetSchema = Upload[];
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type UploadInstancesHrefSchema = {
  /**
   * Attributes to filter uploads
   */
  filter?: {
    /**
     * IDs to fetch, comma separated
     */
    ids?: string;
    /**
     * Textual query to match. If `locale` is defined, search within that locale. Otherwise environment's main locale will be used.
     */
    query?: string;
    /**
     * Same as [GraphQL API uploads filters](/docs/content-delivery-api/filtering-uploads). Use snake_case for fields names. If `locale` is defined, search within that locale. Otherwise environment's main locale will be used.
     */
    fields?: {
      [k: string]: unknown;
    };
    [k: string]: unknown;
  };
  /**
   * When `filter[query]` or `field[fields]` is defined, filter by this locale. Default: environment's main locale
   */
  locale?: string;
  /**
   * Fields used to order results. Format: `<field_name>_<DIRECTION(ASC|DESC)>`. You can pass multiple comma separated rules.
   */
  order_by?: string;
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 30, maximum is 500)
     */
    limit?: number;
  };
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `update.hrefSchema` link.
 */
export type UploadUpdateHrefSchema = {
  /**
   * Strategy to use when replacing the asset file. If not specified, a new URL will be generated.
   */
  replace_strategy?: 'create_new_url' | 'keep_url';
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `references.targetSchema` link.
 */
export type UploadReferencesTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D>[] : ItemInNestedResponse<D>[];
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `references.hrefSchema` link.
 */
export type UploadReferencesHrefSchema = {
  /**
   * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
   */
  nested?: boolean;
  /**
   * Retrieve only the selected type of version that is linked to the upload; current, published or both
   */
  version?: null | ('current' | 'published' | 'published-or-current');
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_tag.jobSchema` link.
 */
export type UploadBulkTagJobSchema = unknown[];
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_set_upload_collection.jobSchema` link.
 */
export type UploadBulkSetUploadCollectionJobSchema = unknown[];
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_destroy.jobSchema` link.
 */
export type UploadBulkDestroyJobSchema = unknown[];
/**
 * The S3 path where the file will be stored
 *
 * This interface was referenced by `UploadRequest`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `UploadRequest`'s JSON-Schema
 * via the `definition` "id".
 */
export type UploadRequestIdentity = string;
/**
 * This interface was referenced by `UploadRequest`'s JSON-Schema
 * via the `definition` "type".
 */
export type UploadRequestType = 'upload_request';
/**
 * ID of the upload track
 *
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `definition` "id".
 */
export type UploadTrackIdentity = string;
/**
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `definition` "type".
 */
export type UploadTrackType = 'upload_track';
/**
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type UploadTrackInstancesTargetSchema = UploadTrack[];
/**
 * ID of result
 *
 * This interface was referenced by `SearchResult`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SearchResult`'s JSON-Schema
 * via the `definition` "id".
 */
export type SearchResultIdentity = string;
/**
 * This interface was referenced by `SearchResult`'s JSON-Schema
 * via the `definition` "type".
 */
export type SearchResultType = 'search_result';
/**
 * This interface was referenced by `SearchResult`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SearchResultInstancesTargetSchema = SearchResult[];
/**
 * This interface was referenced by `SearchResult`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type SearchResultInstancesHrefSchema = {
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 20, maximum is 100)
     */
    limit?: number;
  };
  /**
   * Attributes to filter search results
   */
  filter: {
    /**
     * When any value is passed, it enables the fuzzy search: the Levenshtein Edit Distance is used to match more results.
     */
    fuzzy?: boolean;
    /**
     * Text to search
     */
    query: string;
    /**
     * The search index ID on which the search will be performed. If not provided, the first enabled search index will be used.
     */
    search_index_id?: string;
    /**
     * The build trigger ID or name on which the search will be performed.
     */
    build_trigger_id?: string;
    /**
     * Restrict the search on pages in a specific locale
     */
    locale?: string;
    [k: string]: unknown;
  };
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `definition` "type".
 */
export type EnvironmentType = 'environment';
/**
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `fork.targetSchema` link.
 */
export type EnvironmentForkTargetSchema = Job | Environment;
/**
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `fork.hrefSchema` link.
 */
export type EnvironmentForkHrefSchema = {
  /**
   * Whether the call should immediately return a pending environment, or wait for the completion of the fork
   */
  immediate_return?: boolean;
  /**
   * Performing a fast fork reduces processing time, but it also prevents writing to the source environment during the process
   */
  fast?: boolean;
  /**
   * Force the start of fast fork, even if there are collaborators editing some records
   */
  force?: boolean;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type EnvironmentInstancesTargetSchema = Environment[];
/**
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `destroy.targetSchema` link.
 */
export type EnvironmentDestroyTargetSchema = Job | Environment;
/**
 * ID of maintenance_mode
 *
 * This interface was referenced by `MaintenanceMode`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `MaintenanceMode`'s JSON-Schema
 * via the `definition` "id".
 */
export type MaintenanceModeIdentity = string;
/**
 * This interface was referenced by `MaintenanceMode`'s JSON-Schema
 * via the `definition` "type".
 */
export type MaintenanceModeType = 'maintenance_mode';
/**
 * This interface was referenced by `MaintenanceMode`'s JSON-Schema
 * via the `activate.hrefSchema` link.
 */
export type MaintenanceModeActivateHrefSchema = {
  /**
   * Force the activation, even if there are collaborators editing some records.
   */
  force?: boolean;
  [k: string]: unknown;
};
/**
 * ID of webhook
 *
 * This interface was referenced by `Webhook`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Webhook`'s JSON-Schema
 * via the `definition` "id".
 */
export type WebhookIdentity = string;
/**
 * This interface was referenced by `Webhook`'s JSON-Schema
 * via the `definition` "type".
 */
export type WebhookType = 'webhook';
/**
 * This interface was referenced by `Webhook`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type WebhookInstancesTargetSchema = Webhook[];
/**
 * ID of webhook call
 *
 * This interface was referenced by `WebhookCall`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `WebhookCall`'s JSON-Schema
 * via the `definition` "id".
 */
export type WebhookCallIdentity = string;
/**
 * This interface was referenced by `WebhookCall`'s JSON-Schema
 * via the `definition` "type".
 */
export type WebhookCallType = 'webhook_call';
/**
 * This interface was referenced by `WebhookCall`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type WebhookCallInstancesTargetSchema = WebhookCall[];
/**
 * This interface was referenced by `WebhookCall`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type WebhookCallInstancesHrefSchema = {
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 30, maximum is 500)
     */
    limit?: number;
  };
  /**
   * Attributes to filter
   */
  filter?: {
    /**
     * IDs to fetch, comma separated
     */
    ids?: string;
    fields?: {
      webhook_id?: {
        eq?: string;
      };
      entity_type?: {
        /**
         * The subject of webhook triggering
         */
        eq?:
          | 'item_type'
          | 'item'
          | 'upload'
          | 'build_trigger'
          | 'environment'
          | 'maintenance_mode'
          | 'sso_user'
          | 'cda_cache_tags';
      };
      event_type?: {
        /**
         * The event that triggers the webhook call
         */
        eq?:
          | 'create'
          | 'update'
          | 'delete'
          | 'publish'
          | 'unpublish'
          | 'promote'
          | 'deploy_started'
          | 'deploy_succeeded'
          | 'deploy_failed'
          | 'change'
          | 'invalidate';
      };
      status?: {
        /**
         * The current status
         */
        eq?: 'pending' | 'success' | 'failed' | 'rescheduled';
      };
      last_sent_at?: {
        gt?: string;
        lt?: string;
      };
      next_retry_at?: {
        gt?: string;
        lt?: string;
      };
      created_at?: {
        gt?: string;
        lt?: string;
      };
    };
  };
  /**
   * Fields used to order results
   */
  order_by?:
    | 'webhook_id_asc'
    | 'webhook_id_desc'
    | 'created_at_asc'
    | 'created_at_desc'
    | 'last_sent_at_asc'
    | 'last_sent_at_desc'
    | 'next_retry_at_asc'
    | 'next_retry_at_desc';
  [k: string]: unknown;
};
/**
 * This interface was referenced by `BuildTrigger`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type BuildTriggerInstancesTargetSchema = BuildTrigger[];
/**
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SearchIndexInstancesTargetSchema = SearchIndex[];
/**
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type ItemTypeFilterInstancesTargetSchema = ItemTypeFilter[];
/**
 * RFC 4122 UUID of upload filter expressed in URL-safe base64 format
 *
 * This interface was referenced by `UploadFilter`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `UploadFilter`'s JSON-Schema
 * via the `definition` "id".
 */
export type UploadFilterIdentity = string;
/**
 * This interface was referenced by `UploadFilter`'s JSON-Schema
 * via the `definition` "type".
 */
export type UploadFilterType = 'upload_filter';
/**
 * This interface was referenced by `UploadFilter`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type UploadFilterInstancesTargetSchema = UploadFilter[];
/**
 * ID of invitation
 *
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `definition` "id".
 */
export type SiteInvitationIdentity = string;
/**
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `definition` "type".
 */
export type SiteInvitationType = 'site_invitation';
/**
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SiteInvitationInstancesTargetSchema = SiteInvitation[];
/**
 * UUID of presence
 *
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `definition` "id".
 */
export type EditingSessionIdentity = string;
/**
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `definition` "type".
 */
export type EditingSessionType = 'editing_session';
/**
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type EditingSessionInstancesTargetSchema = EditingSession[];
/**
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `update.schema` link.
 */
export type EditingSessionUpdateSchema =
  | {
      /**
       * JSON API type
       */
      type?: 'editing_session_enter_item';
      item: ItemData;
    }
  | {
      /**
       * JSON API type
       */
      type?: 'editing_session_take_over_item';
      item: ItemData;
    }
  | {
      /**
       * JSON API type
       */
      type?: 'editing_session_lock_item';
      item: ItemData;
    }
  | {
      /**
       * JSON API type
       */
      type?: 'editing_session_unlock_item';
    };
/**
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `update.targetSchema` link.
 */
export type EditingSessionUpdateTargetSchema =
  | EditingSession
  | [EditingSession, FormData];
/**
 * ID of form data
 *
 * This interface was referenced by `FormData`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `FormData`'s JSON-Schema
 * via the `definition` "id".
 */
export type FormDataIdentity = 'form_data';
/**
 * This interface was referenced by `FormData`'s JSON-Schema
 * via the `definition` "type".
 */
export type FormDataType = 'form_data';
/**
 * This interface was referenced by `SsoGroup`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type SsoGroupInstancesTargetSchema = SsoGroup[];
/**
 * ID
 *
 * This interface was referenced by `SsoSettings`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `SsoSettings`'s JSON-Schema
 * via the `definition` "id".
 */
export type SsoSettingsIdentity = string;
/**
 * This interface was referenced by `SsoSettings`'s JSON-Schema
 * via the `definition` "type".
 */
export type SsoSettingsType = 'sso_settings';
/**
 * ID
 *
 * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
 * via the `definition` "id".
 */
export type EmojiSuggestionsIdentity = string;
/**
 * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
 * via the `definition` "type".
 */
export type EmojiSuggestionsType = 'emoji_suggestions';
/**
 * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
 * via the `self.hrefSchema` link.
 */
export type EmojiSuggestionsSelfHrefSchema = {
  /**
   * The term for which we are seeking suggestions for emojis
   */
  term?: string;
  [k: string]: unknown;
};
/**
 * ID
 *
 * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
 * via the `definition` "id".
 */
export type WhiteLabelSettingsIdentity = string;
/**
 * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
 * via the `definition` "type".
 */
export type WhiteLabelSettingsType = 'white_label_settings';
/**
 * ID of site
 *
 * This interface was referenced by `PublicInfo`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `PublicInfo`'s JSON-Schema
 * via the `definition` "id".
 */
export type PublicInfoIdentity = string;
/**
 * This interface was referenced by `PublicInfo`'s JSON-Schema
 * via the `definition` "type".
 */
export type PublicInfoType = 'public_info';
/**
 * ID of site
 *
 * This interface was referenced by `DailyUsage`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `DailyUsage`'s JSON-Schema
 * via the `definition` "id".
 */
export type DailyUsageIdentity = string;
/**
 * This interface was referenced by `DailyUsage`'s JSON-Schema
 * via the `definition` "type".
 */
export type DailyUsageType = 'daily_usage';
/**
 * This interface was referenced by `DailyUsage`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type DailyUsageInstancesTargetSchema = DailyUsage[];
/**
 * Name of the counter
 *
 * This interface was referenced by `UsageCounter`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `UsageCounter`'s JSON-Schema
 * via the `definition` "id".
 */
export type UsageCounterIdentity =
  | 'assets_path_bytes'
  | 'assets_referrer_bytes'
  | 'assets_ip_bytes'
  | 'assets_full_path_bytes'
  | 'assets_path_requests'
  | 'assets_full_path_requests'
  | 'cda_access_token_id_bytes'
  | 'cda_access_token_id_requests'
  | 'cda_referrer_bytes'
  | 'cda_referrer_requests'
  | 'cda_ip_bytes'
  | 'cda_ip_requests'
  | 'cma_endpoint_bytes'
  | 'cma_endpoint_requests'
  | 'cma_user_bytes'
  | 'cma_user_requests'
  | 'cma_ip_bytes'
  | 'cma_ip_requests'
  | 'video_path_seconds';
/**
 * This interface was referenced by `UsageCounter`'s JSON-Schema
 * via the `definition` "type".
 */
export type UsageCounterType = 'usage_counter';
/**
 * This interface was referenced by `UsageCounter`'s JSON-Schema
 * via the `self.hrefSchema` link.
 */
export type UsageCounterSelfHrefSchema = {
  /**
   * The time period upon which counters will be returned
   */
  period?: 'today' | 'current_month' | 'last_month';
};
/**
 * ID of upload tag
 *
 * This interface was referenced by `UploadTag`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `UploadTag`'s JSON-Schema
 * via the `definition` "id".
 */
export type UploadTagIdentity = string;
/**
 * This interface was referenced by `UploadTag`'s JSON-Schema
 * via the `definition` "type".
 */
export type UploadTagType = 'upload_tag';
/**
 * This interface was referenced by `UploadTag`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type UploadTagInstancesTargetSchema = UploadTag[];
/**
 * This interface was referenced by `UploadTag`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type UploadTagInstancesHrefSchema = {
  /**
   * Attributes to filter tags
   */
  filter?: {
    /**
     * Textual query to match.
     */
    query?: string;
    [k: string]: unknown;
  };
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 50, maximum is 500)
     */
    limit?: number;
  };
  [k: string]: unknown;
};
/**
 * ID of upload tag
 *
 * This interface was referenced by `UploadSmartTag`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `UploadSmartTag`'s JSON-Schema
 * via the `definition` "id".
 */
export type UploadSmartTagIdentity = string;
/**
 * This interface was referenced by `UploadSmartTag`'s JSON-Schema
 * via the `definition` "type".
 */
export type UploadSmartTagType = 'upload_smart_tag';
/**
 * This interface was referenced by `UploadSmartTag`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type UploadSmartTagInstancesTargetSchema = UploadSmartTag[];
/**
 * This interface was referenced by `UploadSmartTag`'s JSON-Schema
 * via the `instances.hrefSchema` link.
 */
export type UploadSmartTagInstancesHrefSchema = {
  /**
   * Attributes to filter tags
   */
  filter?: {
    /**
     * Textual query to match.
     */
    query?: string;
    [k: string]: unknown;
  };
  /**
   * Parameters to control offset-based pagination
   */
  page?: {
    /**
     * The (zero-based) offset of the first entity returned in the collection (defaults to 0)
     */
    offset?: number;
    /**
     * The maximum number of entities to return (defaults to 50, maximum is 500)
     */
    limit?: number;
  };
  [k: string]: unknown;
};
/**
 * ID of site
 *
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `definition` "identity".
 *
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `definition` "id".
 */
export type SiteIdentity = string;
/**
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `definition` "type".
 */
export type SiteType = 'site';
/**
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `self.hrefSchema` link.
 */
export type SiteSelfHrefSchema = {
  /**
   * Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `item_types`, `item_types.fields`, `item_types.fieldsets`, `item_types.singleton_item`, `account`.
   */
  include?: string;
  [k: string]: unknown;
};
/**
 * This interface was referenced by `Workflow`'s JSON-Schema
 * via the `instances.targetSchema` link.
 */
export type WorkflowInstancesTargetSchema = Workflow[];
/**
 * A Role groups the permissions that govern what a credential can do in a project. The same role definition is applied to **collaborators**, **SSO users**, and **API tokens** alike — design roles around what the *credential* should be allowed to do, not who is holding it.
 *
 * > [!PROTIP] 📘 Same role, different identities
 * > Ask "what is the *credential* allowed to do?" — not "what is this *person* allowed to do?". For API tokens specifically, the role's permissions are further constrained by the token's API surface flags (`can_access_cda`, `can_access_cda_preview`, `can_access_cma`); see the [API token](/docs/content-management-api/resources/access-token) resource for details.
 *
 * ## How permissions are computed
 *
 * Most of the granular permissions on a role come as a `positive_<resource>_permissions` / `negative_<resource>_permissions` pair: build triggers, search indexes, records (`item_type`), uploads. They all follow the same rule:
 *
 * > Effective permissions = `(inherited ∪ positive_*) − negative_*`
 *
 * Positive entries (and entries pulled in via `relationships.inherits_permissions_from`) grant access. Negative entries always win when they overlap. The idiomatic recipe for "almost everything" is a single `action: "all"` positive entry plus targeted negative entries to subtract — instead of enumerating each allowed action.
 *
 * > [!WARNING] ⚠️ Send `positive_*` and `negative_*` together
 * > For each resource family (records, uploads, build triggers, search indexes), the matching `positive_*` and `negative_*` arrays must be **both present or both absent** in a create/update payload. On **update**, sent arrays *replace* the stored ones wholesale, so always read the role first and pass back the existing entries on the side you're not changing — sending `[]` to satisfy the constraint will erase everything that was there. (On create, `[]` is fine since there's nothing to lose.) The [Update endpoint](/docs/content-management-api/resources/role/update) documents an SDK helper that handles this diff for records and uploads.
 *
 * The computed result is exposed on every role response under `meta.final_permissions`; the raw declared values stay on `attributes.*`. See [Effective vs declared permissions](#effective-vs-declared-permissions) below.
 *
 * ## Project-level permissions
 *
 * These attributes gate access to project-wide capabilities. They apply uniformly across the whole project; granular control over individual records and uploads lives under [Per-environment content permissions](#per-environment-content-permissions).
 *
 * - **Project-wide flags.** Boolean attributes named `can_*` (`can_edit_schema`, `can_manage_environments`, `can_manage_access_tokens`, …) cover the schema, environments, users, webhooks, and so on — see the property table for the full list.
 * - **Environment access.** `environments_access` controls *which* environments the credential can enter at all (`all`, `primary_only`, `sandbox_only`, or `none`). Use `none` when the role is meant only to be inherited from.
 * - **Build triggers.** The role may **manually fire** the build triggers listed in `positive_build_trigger_permissions`, minus those listed in `negative_build_trigger_permissions`. Use `build_trigger: null` on an entry to cover every trigger at once. Creating, editing, or deleting trigger definitions is gated separately by `can_manage_build_triggers`.
 * - **Search indexes.** The role may **manually re-index** the search indexes listed in `positive_search_index_permissions`, minus those listed in `negative_search_index_permissions`. Use `search_index: null` on an entry to cover every index. Managing the index definitions themselves is gated separately by `can_manage_search_indexes`.
 *
 * ## Per-environment content permissions
 *
 * The role's access to **records** and **uploads** is governed by two positive/negative array pairs. Every entry is **scoped to a single environment** via the required `environment` field — to grant the same permission across multiple environments, repeat the entry once per environment id (or use `inherits_permissions_from` together with `environments_access`). The computation is the same `(inherited ∪ positive_*) − negative_*` rule from [How permissions are computed](#how-permissions-are-computed), evaluated per environment.
 *
 * ###### Records
 *
 * Permission entries live in `positive_item_type_permissions` (and the `negative_*` counterpart). Each entry is a discriminated union keyed by `action`:
 *
 * - `all` — every action below
 * - `read` — read records
 * - `create` — create new records
 * - `update` — edit existing records
 * - `publish` — publish/unpublish records
 * - `duplicate` — duplicate records
 * - `delete` — destroy records
 * - `edit_creator` — change a record's `creator` relationship
 * - `take_over` — wrest a record from another user currently editing it
 * - `move_to_stage` — move a record between workflow stages
 *
 * Per entry you can also restrict by:
 *
 * - `item_type` — restrict to a specific model (`null` = all models)
 * - `workflow` — restrict to records associated with a workflow (mutually exclusive with `item_type`)
 * - `on_creator` — `anyone`, `self` (records the credential created), or `role` (records created by anyone with this role)
 * - `localization_scope` + `locale` — for `create`/`update`/`publish`/`all`: restrict to localized vs non-localized content, optionally pinning to one locale (on `all` the scope is forced to `"all"`)
 * - `on_stage` / `to_stage` — for workflow-aware actions: restrict to records currently on a stage, or to moves towards a stage
 *
 * The shape of each entry depends on the `action` — see the property tables on each endpoint for which sub-fields are valid per branch.
 *
 * > [!WARNING] ⚠️ Some restrictors require an Enterprise plan
 * > Workflow-aware permissions — the `move_to_stage` action and the `workflow` / `on_stage` / `to_stage` restrictors — require [Workflows](https://www.datocms.com/features/workflows), an Enterprise feature. Per-content-scope restrictions are also gated: only `localization_scope: "all"` is available on every plan, while `"localized"` (with its companion `locale`) and `"not_localized"` both require Enterprise. Setting any of these on a non-Enterprise project will return an error — check the [pricing page](https://www.datocms.com/pricing) before relying on them.
 *
 * ###### Uploads
 *
 * Permission entries live in `positive_upload_permissions` (and the `negative_*` counterpart). Same discriminated-union shape as records, with the upload-relevant actions (`read`, `create`, `update`, `delete`, `edit_creator`, `replace_asset`, `move`, `all`), scoped by `upload_collection` instead of `item_type`. The `move` action also accepts `move_to_upload_collection` to restrict the destination of the move.
 *
 * ## Inheriting from other roles
 *
 * `relationships.inherits_permissions_from` accepts a list of role ids whose permissions are unioned into this role's positive set before the negative set is subtracted (per [How permissions are computed](#how-permissions-are-computed)). This is how built-in roles are typically extended without copying their full permission tree — duplicate the closest built-in role, then add a `negative_*` entry to take something away, or set `inherits_permissions_from` and add only the positive entries that differ.
 *
 * ## Effective vs declared permissions
 *
 * Two views of a role's permissions are surfaced on the response:
 *
 * - **`attributes.*`** — the permissions declared *on this role directly*. This is what was sent on create/update; it does not reflect anything inherited from `relationships.inherits_permissions_from`.
 * - **`meta.final_permissions`** — the **effective** permissions after walking the inheritance chain and applying the rule from [How permissions are computed](#how-permissions-are-computed). This is the set actually enforced when a credential bound to this role makes a request.
 *
 * When debugging "why can't this user do X?", read `meta.final_permissions`, not `attributes`.
 *
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "role".
 */
export type Role = {
  id: RoleIdentity;
  type: RoleType;
  /**
   * The name of the role
   */
  name: string;
  /**
   * Can edit favicon, global SEO settings and no-index policy
   */
  can_edit_favicon: boolean;
  /**
   * Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
   */
  can_edit_site: boolean;
  /**
   * Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
   */
  can_edit_schema: boolean;
  /**
   * Can customize content navigation bar
   */
  can_manage_menu: boolean;
  /**
   * Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
   */
  can_edit_environment: boolean;
  /**
   * Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
   */
  can_promote_environments: boolean;
  /**
   * Specifies the environments the user can access
   */
  environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
  /**
   * Can create and edit roles and invite/remove collaborators
   */
  can_manage_users: boolean;
  /**
   * Can create and edit shared filters (both for models and the media area)
   */
  can_manage_shared_filters: boolean;
  /**
   * Can create and edit upload collections
   */
  can_manage_upload_collections: boolean;
  /**
   * Can create and edit build triggers
   */
  can_manage_build_triggers: boolean;
  /**
   * Can create and edit search indexes
   */
  can_manage_search_indexes: boolean;
  /**
   * Can create and edit webhooks
   */
  can_manage_webhooks: boolean;
  /**
   * Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
   */
  can_manage_environments: boolean;
  /**
   * Can manage Single Sign-On settings
   */
  can_manage_sso: boolean;
  /**
   * Can access Audit Log
   */
  can_access_audit_log: boolean;
  /**
   * Can create and edit workflows
   */
  can_manage_workflows: boolean;
  /**
   * Can manage API tokens
   */
  can_manage_access_tokens: boolean;
  /**
   * Can perform Site Search API calls
   */
  can_perform_site_search: boolean;
  /**
   * Can access the build events log
   */
  can_access_build_events_log: boolean;
  /**
   * Can access the search index events log
   */
  can_access_search_index_events_log: boolean;
  /**
   * Allowed actions on a model (or all) for a role.
   *
   * The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
   * - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
   * - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
   */
  positive_item_type_permissions: (
    | RoleItemTypePermissionAll
    | RoleItemTypePermissionRead
    | RoleItemTypePermissionCreate
    | RoleItemTypePermissionUpdateOrPublish
    | RoleItemTypePermissionDuplicate
    | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
    | RoleItemTypePermissionMoveToStage
  )[];
  /**
   * Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
   */
  negative_item_type_permissions: (
    | RoleItemTypePermissionAll
    | RoleItemTypePermissionRead
    | RoleItemTypePermissionCreate
    | RoleItemTypePermissionUpdateOrPublish
    | RoleItemTypePermissionDuplicate
    | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
    | RoleItemTypePermissionMoveToStage
  )[];
  /**
   * Allowed actions on uploads (or all) for a role.
   *
   * The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
   */
  positive_upload_permissions: (
    | RoleUploadPermissionAll
    | RoleUploadPermissionUpdate
    | RoleUploadPermissionCreate
    | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
    | RoleUploadPermissionMove
  )[];
  /**
   * Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
   */
  negative_upload_permissions: (
    | RoleUploadPermissionAll
    | RoleUploadPermissionUpdate
    | RoleUploadPermissionCreate
    | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
    | RoleUploadPermissionMove
  )[];
  /**
   * Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
   */
  positive_build_trigger_permissions: {
    build_trigger?: BuildTriggerIdentity | null;
  }[];
  /**
   * Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
   */
  negative_build_trigger_permissions: {
    build_trigger?: BuildTriggerIdentity | null;
  }[];
  /**
   * Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
   */
  positive_search_index_permissions: {
    search_index?: SearchIndexIdentity | null;
  }[];
  /**
   * Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
   */
  negative_search_index_permissions: {
    search_index?: SearchIndexIdentity | null;
  }[];
  inherits_permissions_from: RoleData[];
  meta: RoleMeta;
};
export type RoleCreateTargetSchema = Role;
export type RoleUpdateTargetSchema = Role;
export type RoleSelfTargetSchema = Role;
export type RoleDestroyTargetSchema = Role;
export type RoleDuplicateTargetSchema = Role;
/**
 * Item-type permission entry granting all actions on a model. Requires `localization_scope: "all"`.
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "item_type_permission_all".
 */
export type RoleItemTypePermissionAll = {
  /**
   * Permitted action
   */
  action: 'all';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific model. When `null`, the permission applies to all models.
   */
  item_type?: ItemTypeIdentity | null;
  /**
   * Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
   */
  workflow?: WorkflowIdentity | null;
  /**
   * Restrict to records currently on a workflow stage.
   */
  on_stage?: string | null;
  /**
   * Restrict to moves towards a specific workflow stage.
   */
  to_stage?: string | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  /**
   * For `action: "all"` this must be `"all"`.
   */
  localization_scope: 'all';
  [k: string]: unknown;
};
/**
 * Item-type permission entry granting `read` on records. `localization_scope` and `locale` must be omitted (or null).
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "item_type_permission_read".
 */
export type RoleItemTypePermissionRead = {
  /**
   * Permitted action
   */
  action: 'read';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific model. When `null`, the permission applies to all models.
   */
  item_type?: ItemTypeIdentity | null;
  /**
   * Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
   */
  workflow?: WorkflowIdentity | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  [k: string]: unknown;
};
/**
 * Item-type permission entry granting `create` on records. Requires `localization_scope`; if `localization_scope: "localized"`, `locale` is also required. `on_creator`, `on_stage`, and `to_stage` are not applicable and must be omitted (or null).
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "item_type_permission_create".
 */
export type RoleItemTypePermissionCreate = {
  /**
   * Permitted action
   */
  action: 'create';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific model. When `null`, the permission applies to all models.
   */
  item_type?: ItemTypeIdentity | null;
  /**
   * Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
   */
  workflow?: WorkflowIdentity | null;
  /**
   * Permitted content scope
   */
  localization_scope: 'all' | 'localized' | 'not_localized';
  /**
   * Required (non-null) when `localization_scope` is `"localized"`; must be omitted otherwise.
   */
  locale?: string | null;
  [k: string]: unknown;
};
/**
 * Item-type permission entry granting `update` or `publish` on records. Requires `localization_scope`; if `localization_scope: "localized"`, `locale` is also required.
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "item_type_permission_update_or_publish".
 */
export type RoleItemTypePermissionUpdateOrPublish = {
  /**
   * Permitted action
   */
  action: 'update' | 'publish';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific model. When `null`, the permission applies to all models.
   */
  item_type?: ItemTypeIdentity | null;
  /**
   * Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
   */
  workflow?: WorkflowIdentity | null;
  /**
   * Restrict to records currently on a workflow stage.
   */
  on_stage?: string | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  /**
   * Permitted content scope
   */
  localization_scope: 'all' | 'localized' | 'not_localized';
  /**
   * Required (non-null) when `localization_scope` is `"localized"`; must be omitted otherwise.
   */
  locale?: string | null;
  [k: string]: unknown;
};
/**
 * Item-type permission entry granting `duplicate` on records. `on_creator`, `localization_scope` and `locale` are not applicable and must be omitted (or null).
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "item_type_permission_duplicate".
 */
export type RoleItemTypePermissionDuplicate = {
  /**
   * Permitted action
   */
  action: 'duplicate';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific model. When `null`, the permission applies to all models.
   */
  item_type?: ItemTypeIdentity | null;
  /**
   * Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
   */
  workflow?: WorkflowIdentity | null;
  /**
   * Restrict to records currently on a workflow stage.
   */
  on_stage?: string | null;
  [k: string]: unknown;
};
/**
 * Item-type permission entry granting `delete`, `edit_creator`, or `take_over` on records. `localization_scope` and `locale` must be omitted (or null).
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "item_type_permission_delete_or_edit_creator_or_take_over".
 */
export type RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver = {
  /**
   * Permitted action
   */
  action: 'delete' | 'edit_creator' | 'take_over';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific model. When `null`, the permission applies to all models.
   */
  item_type?: ItemTypeIdentity | null;
  /**
   * Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
   */
  workflow?: WorkflowIdentity | null;
  /**
   * Restrict to records currently on a workflow stage.
   */
  on_stage?: string | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  [k: string]: unknown;
};
/**
 * Item-type permission entry granting `move_to_stage` on records. `localization_scope` and `locale` must be omitted (or null).
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "item_type_permission_move_to_stage".
 */
export type RoleItemTypePermissionMoveToStage = {
  /**
   * Permitted action
   */
  action: 'move_to_stage';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific model. When `null`, the permission applies to all models.
   */
  item_type?: ItemTypeIdentity | null;
  /**
   * Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
   */
  workflow?: WorkflowIdentity | null;
  /**
   * Restrict to records currently on a workflow stage.
   */
  on_stage?: string | null;
  /**
   * Restrict to moves towards a specific workflow stage.
   */
  to_stage?: string | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  [k: string]: unknown;
};
/**
 * Upload permission entry granting all actions on uploads. Requires `localization_scope: "all"`.
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "upload_permission_all".
 */
export type RoleUploadPermissionAll = {
  /**
   * Permitted action
   */
  action: 'all';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
   */
  upload_collection?: UploadCollectionIdentity | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  /**
   * For `action: "all"` this must be `"all"`.
   */
  localization_scope: 'all';
  [k: string]: unknown;
};
/**
 * Upload permission entry granting `update` on uploads. Requires `localization_scope`; if `localization_scope: "localized"`, `locale` is also required.
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "upload_permission_update".
 */
export type RoleUploadPermissionUpdate = {
  /**
   * Permitted action
   */
  action: 'update';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
   */
  upload_collection?: UploadCollectionIdentity | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  /**
   * Permitted content scope
   */
  localization_scope: 'all' | 'localized' | 'not_localized';
  /**
   * Required (non-null) when `localization_scope` is `"localized"`; must be omitted otherwise.
   */
  locale?: string | null;
  [k: string]: unknown;
};
/**
 * Upload permission entry granting `create` on uploads. `on_creator`, `localization_scope` and `locale` are not applicable and must be omitted (or null).
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "upload_permission_create".
 */
export type RoleUploadPermissionCreate = {
  /**
   * Permitted action
   */
  action: 'create';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
   */
  upload_collection?: UploadCollectionIdentity | null;
  [k: string]: unknown;
};
/**
 * Upload permission entry granting `read`, `delete`, `edit_creator`, or `replace_asset` on uploads. `localization_scope` and `locale` must be omitted (or null).
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "upload_permission_read_or_delete_or_edit_creator_or_replace_asset".
 */
export type RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset = {
  /**
   * Permitted action
   */
  action: 'read' | 'delete' | 'edit_creator' | 'replace_asset';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
   */
  upload_collection?: UploadCollectionIdentity | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  [k: string]: unknown;
};
/**
 * Upload permission entry granting `move` on uploads. `localization_scope` and `locale` must be omitted (or null). `move_to_upload_collection` is only valid here.
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "upload_permission_move".
 */
export type RoleUploadPermissionMove = {
  /**
   * Permitted action
   */
  action: 'move';
  environment: EnvironmentIdentity;
  /**
   * Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
   */
  upload_collection?: UploadCollectionIdentity | null;
  /**
   * Restricts the destination upload collection of the move action. When `null`, any destination is allowed.
   */
  move_to_upload_collection?: UploadCollectionIdentity | null;
  /**
   * Permitted creator
   */
  on_creator: 'anyone' | 'self' | 'role';
  [k: string]: unknown;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "data".
 */
export type RoleData = {
  type: RoleType;
  id: RoleIdentity;
};
/**
 * Meta information regarding the record
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "meta".
 */
export type RoleMeta = {
  /**
   * The final set of permissions considering also inherited roles
   */
  final_permissions: {
    /**
     * Can edit favicon, global SEO settings and no-index policy
     */
    can_edit_favicon: boolean;
    /**
     * Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
     */
    can_edit_site: boolean;
    /**
     * Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
     */
    can_edit_schema: boolean;
    /**
     * Can customize content navigation bar
     */
    can_manage_menu: boolean;
    /**
     * Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
     */
    can_edit_environment: boolean;
    /**
     * Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
     */
    can_promote_environments: boolean;
    /**
     * Specifies the environments the user can access
     */
    environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
    /**
     * Can create and edit roles and invite/remove collaborators
     */
    can_manage_users: boolean;
    /**
     * Can create and edit shared filters (both for models and the media area)
     */
    can_manage_shared_filters: boolean;
    /**
     * Can create and edit upload collections
     */
    can_manage_upload_collections: boolean;
    /**
     * Can create and edit build triggers
     */
    can_manage_build_triggers: boolean;
    /**
     * Can create and edit search indexes
     */
    can_manage_search_indexes: boolean;
    /**
     * Can create and edit webhooks
     */
    can_manage_webhooks: boolean;
    /**
     * Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
     */
    can_manage_environments: boolean;
    /**
     * Can manage Single Sign-On settings
     */
    can_manage_sso: boolean;
    /**
     * Can access Audit Log
     */
    can_access_audit_log: boolean;
    /**
     * Can create and edit workflows
     */
    can_manage_workflows: boolean;
    /**
     * Can manage API tokens
     */
    can_manage_access_tokens: boolean;
    /**
     * Can perform Site Search API calls
     */
    can_perform_site_search: boolean;
    /**
     * Can access the build events log
     */
    can_access_build_events_log: boolean;
    /**
     * Can access the search index events log
     */
    can_access_search_index_events_log: boolean;
    /**
     * Allowed actions on a model (or all) for a role.
     *
     * The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
     * - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
     * - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
     */
    positive_item_type_permissions: (
      | RoleItemTypePermissionAll
      | RoleItemTypePermissionRead
      | RoleItemTypePermissionCreate
      | RoleItemTypePermissionUpdateOrPublish
      | RoleItemTypePermissionDuplicate
      | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
      | RoleItemTypePermissionMoveToStage
    )[];
    /**
     * Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
     */
    negative_item_type_permissions: (
      | RoleItemTypePermissionAll
      | RoleItemTypePermissionRead
      | RoleItemTypePermissionCreate
      | RoleItemTypePermissionUpdateOrPublish
      | RoleItemTypePermissionDuplicate
      | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
      | RoleItemTypePermissionMoveToStage
    )[];
    /**
     * Allowed actions on uploads (or all) for a role.
     *
     * The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
     */
    positive_upload_permissions: (
      | RoleUploadPermissionAll
      | RoleUploadPermissionUpdate
      | RoleUploadPermissionCreate
      | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
      | RoleUploadPermissionMove
    )[];
    /**
     * Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
     */
    negative_upload_permissions: (
      | RoleUploadPermissionAll
      | RoleUploadPermissionUpdate
      | RoleUploadPermissionCreate
      | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
      | RoleUploadPermissionMove
    )[];
    /**
     * Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
     */
    positive_build_trigger_permissions: {
      build_trigger?: BuildTriggerIdentity | null;
    }[];
    /**
     * Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
     */
    negative_build_trigger_permissions: {
      build_trigger?: BuildTriggerIdentity | null;
    }[];
    /**
     * Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
     */
    positive_search_index_permissions: {
      search_index?: SearchIndexIdentity | null;
    }[];
    /**
     * Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
     */
    negative_search_index_permissions: {
      search_index?: SearchIndexIdentity | null;
    }[];
  };
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type RoleAttributes = {
  /**
   * The name of the role
   */
  name: string;
  /**
   * Can edit favicon, global SEO settings and no-index policy
   */
  can_edit_favicon: boolean;
  /**
   * Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
   */
  can_edit_site: boolean;
  /**
   * Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
   */
  can_edit_schema: boolean;
  /**
   * Can customize content navigation bar
   */
  can_manage_menu: boolean;
  /**
   * Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
   */
  can_edit_environment: boolean;
  /**
   * Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
   */
  can_promote_environments: boolean;
  /**
   * Specifies the environments the user can access
   */
  environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
  /**
   * Can create and edit roles and invite/remove collaborators
   */
  can_manage_users: boolean;
  /**
   * Can create and edit shared filters (both for models and the media area)
   */
  can_manage_shared_filters: boolean;
  /**
   * Can create and edit upload collections
   */
  can_manage_upload_collections: boolean;
  /**
   * Can create and edit build triggers
   */
  can_manage_build_triggers: boolean;
  /**
   * Can create and edit search indexes
   */
  can_manage_search_indexes: boolean;
  /**
   * Can create and edit webhooks
   */
  can_manage_webhooks: boolean;
  /**
   * Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
   */
  can_manage_environments: boolean;
  /**
   * Can manage Single Sign-On settings
   */
  can_manage_sso: boolean;
  /**
   * Can access Audit Log
   */
  can_access_audit_log: boolean;
  /**
   * Can create and edit workflows
   */
  can_manage_workflows: boolean;
  /**
   * Can manage API tokens
   */
  can_manage_access_tokens: boolean;
  /**
   * Can perform Site Search API calls
   */
  can_perform_site_search: boolean;
  /**
   * Can access the build events log
   */
  can_access_build_events_log: boolean;
  /**
   * Can access the search index events log
   */
  can_access_search_index_events_log: boolean;
  /**
   * Allowed actions on a model (or all) for a role.
   *
   * The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
   * - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
   * - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
   */
  positive_item_type_permissions: (
    | RoleItemTypePermissionAll
    | RoleItemTypePermissionRead
    | RoleItemTypePermissionCreate
    | RoleItemTypePermissionUpdateOrPublish
    | RoleItemTypePermissionDuplicate
    | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
    | RoleItemTypePermissionMoveToStage
  )[];
  /**
   * Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
   */
  negative_item_type_permissions: (
    | RoleItemTypePermissionAll
    | RoleItemTypePermissionRead
    | RoleItemTypePermissionCreate
    | RoleItemTypePermissionUpdateOrPublish
    | RoleItemTypePermissionDuplicate
    | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
    | RoleItemTypePermissionMoveToStage
  )[];
  /**
   * Allowed actions on uploads (or all) for a role.
   *
   * The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
   */
  positive_upload_permissions: (
    | RoleUploadPermissionAll
    | RoleUploadPermissionUpdate
    | RoleUploadPermissionCreate
    | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
    | RoleUploadPermissionMove
  )[];
  /**
   * Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
   */
  negative_upload_permissions: (
    | RoleUploadPermissionAll
    | RoleUploadPermissionUpdate
    | RoleUploadPermissionCreate
    | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
    | RoleUploadPermissionMove
  )[];
  /**
   * Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
   */
  positive_build_trigger_permissions: {
    build_trigger?: BuildTriggerIdentity | null;
  }[];
  /**
   * Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
   */
  negative_build_trigger_permissions: {
    build_trigger?: BuildTriggerIdentity | null;
  }[];
  /**
   * Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
   */
  positive_search_index_permissions: {
    search_index?: SearchIndexIdentity | null;
  }[];
  /**
   * Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
   */
  negative_search_index_permissions: {
    search_index?: SearchIndexIdentity | null;
  }[];
};
/**
 * JSON API links
 *
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type RoleRelationships = {
  inherits_permissions_from: RoleData[];
};
/**
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `create.schema` link.
 */
export type RoleCreateSchema = {
  type?: RoleType;
  /**
   * The name of the role
   */
  name: string;
  /**
   * Can edit favicon, global SEO settings and no-index policy
   */
  can_edit_favicon?: boolean;
  /**
   * Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
   */
  can_edit_site?: boolean;
  /**
   * Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
   */
  can_edit_schema?: boolean;
  /**
   * Can customize content navigation bar
   */
  can_manage_menu?: boolean;
  /**
   * Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
   */
  can_edit_environment?: boolean;
  /**
   * Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
   */
  can_promote_environments?: boolean;
  /**
   * Specifies the environments the user can access
   */
  environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
  /**
   * Can create and edit roles and invite/remove collaborators
   */
  can_manage_users?: boolean;
  /**
   * Can create and edit shared filters (both for models and the media area)
   */
  can_manage_shared_filters?: boolean;
  /**
   * Can create and edit search indexes
   */
  can_manage_search_indexes?: boolean;
  /**
   * Can create and edit upload collections
   */
  can_manage_upload_collections?: boolean;
  /**
   * Can create and edit build triggers
   */
  can_manage_build_triggers?: boolean;
  /**
   * Can create and edit webhooks
   */
  can_manage_webhooks?: boolean;
  /**
   * Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
   */
  can_manage_environments?: boolean;
  /**
   * Can manage Single Sign-On settings
   */
  can_manage_sso?: boolean;
  /**
   * Can access Audit Log
   */
  can_access_audit_log?: boolean;
  /**
   * Can create and edit workflows
   */
  can_manage_workflows?: boolean;
  /**
   * Can manage API tokens
   */
  can_manage_access_tokens?: boolean;
  /**
   * Can perform Site Search API calls
   */
  can_perform_site_search?: boolean;
  /**
   * Can access the build events log
   */
  can_access_build_events_log?: boolean;
  /**
   * Can access the search index events log
   */
  can_access_search_index_events_log?: boolean;
  /**
   * Allowed actions on a model (or all) for a role.
   *
   * The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
   * - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
   * - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
   */
  positive_item_type_permissions?: (
    | RoleItemTypePermissionAll
    | RoleItemTypePermissionRead
    | RoleItemTypePermissionCreate
    | RoleItemTypePermissionUpdateOrPublish
    | RoleItemTypePermissionDuplicate
    | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
    | RoleItemTypePermissionMoveToStage
  )[];
  /**
   * Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
   */
  negative_item_type_permissions?: (
    | RoleItemTypePermissionAll
    | RoleItemTypePermissionRead
    | RoleItemTypePermissionCreate
    | RoleItemTypePermissionUpdateOrPublish
    | RoleItemTypePermissionDuplicate
    | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
    | RoleItemTypePermissionMoveToStage
  )[];
  /**
   * Allowed actions on uploads (or all) for a role.
   *
   * The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
   */
  positive_upload_permissions?: (
    | RoleUploadPermissionAll
    | RoleUploadPermissionUpdate
    | RoleUploadPermissionCreate
    | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
    | RoleUploadPermissionMove
  )[];
  /**
   * Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
   */
  negative_upload_permissions?: (
    | RoleUploadPermissionAll
    | RoleUploadPermissionUpdate
    | RoleUploadPermissionCreate
    | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
    | RoleUploadPermissionMove
  )[];
  /**
   * Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
   */
  positive_build_trigger_permissions?: {
    build_trigger?: BuildTriggerIdentity | null;
  }[];
  /**
   * Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
   */
  negative_build_trigger_permissions?: {
    build_trigger?: BuildTriggerIdentity | null;
  }[];
  /**
   * Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
   */
  positive_search_index_permissions?: {
    search_index?: SearchIndexIdentity | null;
  }[];
  /**
   * Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
   */
  negative_search_index_permissions?: {
    search_index?: SearchIndexIdentity | null;
  }[];
  inherits_permissions_from?: RoleData[];
  meta?: RoleMeta;
};
/**
 * This interface was referenced by `Role`'s JSON-Schema
 * via the `update.schema` link.
 */
export type RoleUpdateSchema = {
  id?: RoleIdentity;
  type?: RoleType;
  /**
   * The name of the role
   */
  name?: string;
  /**
   * Can edit favicon, global SEO settings and no-index policy
   */
  can_edit_favicon?: boolean;
  /**
   * Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
   */
  can_edit_site?: boolean;
  /**
   * Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
   */
  can_edit_schema?: boolean;
  /**
   * Can customize content navigation bar
   */
  can_manage_menu?: boolean;
  /**
   * Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
   */
  can_edit_environment?: boolean;
  /**
   * Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
   */
  can_promote_environments?: boolean;
  /**
   * Specifies the environments the user can access
   */
  environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
  /**
   * Can create and edit roles and invite/remove collaborators
   */
  can_manage_users?: boolean;
  /**
   * Can create and edit shared filters (both for models and the media area)
   */
  can_manage_shared_filters?: boolean;
  /**
   * Can create and edit search indexes
   */
  can_manage_search_indexes?: boolean;
  /**
   * Can create and edit upload collections
   */
  can_manage_upload_collections?: boolean;
  /**
   * Can create and edit build triggers
   */
  can_manage_build_triggers?: boolean;
  /**
   * Can create and edit webhooks
   */
  can_manage_webhooks?: boolean;
  /**
   * Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
   */
  can_manage_environments?: boolean;
  /**
   * Can manage Single Sign-On settings
   */
  can_manage_sso?: boolean;
  /**
   * Can access Audit Log
   */
  can_access_audit_log?: boolean;
  /**
   * Can create and edit workflows
   */
  can_manage_workflows?: boolean;
  /**
   * Can manage API tokens
   */
  can_manage_access_tokens?: boolean;
  /**
   * Can perform Site Search API calls
   */
  can_perform_site_search?: boolean;
  /**
   * Can access the build events log
   */
  can_access_build_events_log?: boolean;
  /**
   * Can access the search index events log
   */
  can_access_search_index_events_log?: boolean;
  /**
   * Allowed actions on a model (or all) for a role.
   *
   * The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
   * - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
   * - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
   */
  positive_item_type_permissions?: (
    | RoleItemTypePermissionAll
    | RoleItemTypePermissionRead
    | RoleItemTypePermissionCreate
    | RoleItemTypePermissionUpdateOrPublish
    | RoleItemTypePermissionDuplicate
    | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
    | RoleItemTypePermissionMoveToStage
  )[];
  /**
   * Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
   */
  negative_item_type_permissions?: (
    | RoleItemTypePermissionAll
    | RoleItemTypePermissionRead
    | RoleItemTypePermissionCreate
    | RoleItemTypePermissionUpdateOrPublish
    | RoleItemTypePermissionDuplicate
    | RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
    | RoleItemTypePermissionMoveToStage
  )[];
  /**
   * Allowed actions on uploads (or all) for a role.
   *
   * The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
   */
  positive_upload_permissions?: (
    | RoleUploadPermissionAll
    | RoleUploadPermissionUpdate
    | RoleUploadPermissionCreate
    | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
    | RoleUploadPermissionMove
  )[];
  /**
   * Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
   */
  negative_upload_permissions?: (
    | RoleUploadPermissionAll
    | RoleUploadPermissionUpdate
    | RoleUploadPermissionCreate
    | RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
    | RoleUploadPermissionMove
  )[];
  /**
   * Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
   */
  positive_build_trigger_permissions?: {
    build_trigger?: BuildTriggerIdentity | null;
  }[];
  /**
   * Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
   */
  negative_build_trigger_permissions?: {
    build_trigger?: BuildTriggerIdentity | null;
  }[];
  /**
   * Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
   */
  positive_search_index_permissions?: {
    search_index?: SearchIndexIdentity | null;
  }[];
  /**
   * Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
   */
  negative_search_index_permissions?: {
    search_index?: SearchIndexIdentity | null;
  }[];
  inherits_permissions_from?: RoleData[];
  meta?: RoleMeta;
};
/**
 * 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.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "user".
 */
export type User = {
  id: UserIdentity;
  type: UserType;
  /**
   * Email
   */
  email: string;
  /**
   * Whether 2-factor authentication is active for this account or not
   */
  is_2fa_active: boolean;
  /**
   * Full name
   */
  full_name: string;
  /**
   * Whether the user is active or not
   */
  is_active: boolean;
  role: RoleData;
  meta?: UserMeta;
};
export type UserUpdateTargetSchema = User;
export type UserSelfTargetSchema = User;
export type UserDestroyTargetSchema = User;
/**
 * Meta information on the user
 *
 * This interface was referenced by `User`'s JSON-Schema
 * via the `definition` "meta".
 */
export type UserMeta = {
  /**
   * Date of last reading/interaction
   */
  last_access: string | null;
};
/**
 * JSON API data
 *
 * This interface was referenced by `User`'s JSON-Schema
 * via the `definition` "data".
 */
export type UserData = {
  type: UserType;
  id: UserIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `User`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UserAttributes = {
  /**
   * Email
   */
  email: string;
  /**
   * Whether 2-factor authentication is active for this account or not
   */
  is_2fa_active: boolean;
  /**
   * Full name
   */
  full_name: string;
  /**
   * Whether the user is active or not
   */
  is_active: boolean;
};
/**
 * JSON API links
 *
 * This interface was referenced by `User`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type UserRelationships = {
  role: RoleData;
};
/**
 * This interface was referenced by `User`'s JSON-Schema
 * via the `update.schema` link.
 */
export type UserUpdateSchema = {
  id?: UserIdentity;
  type?: UserType;
  /**
   * Whether the user is active or not
   */
  is_active?: boolean;
  role?: RoleData;
};
/**
 * A Single Sign-On user exists when a DatoCMS project is connected to an external Identity Provider. An SSO user will not use the standard login procedure but has to go through SAML authentication. It can also be linked to one or more IdP groups.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "sso_user".
 */
export type SsoUser = {
  id: SsoUserIdentity;
  type: SsoUserType;
  /**
   * Email
   */
  username: string;
  /**
   * Identity provider ID
   */
  external_id: string | null;
  /**
   * Whether this user is active on the identity provider. De-activated users won't be able to login.
   */
  is_active: boolean;
  /**
   * First name
   */
  first_name: string | null;
  /**
   * Last name
   */
  last_name: string | null;
  groups: SsoGroupData[];
  role: RoleData | null;
  meta: SsoUserMeta;
};
export type SsoUserSelfTargetSchema = SsoUser;
export type SsoUserDestroyTargetSchema = SsoUser;
/**
 * JSON API data
 *
 * This interface was referenced by `SsoGroup`'s JSON-Schema
 * via the `definition` "data".
 */
export type SsoGroupData = {
  type: SsoGroupType;
  id: SsoGroupIdentity;
};
/**
 * Meta information on the user
 *
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `definition` "meta".
 */
export type SsoUserMeta = {
  /**
   * Date of last reading/interaction
   */
  last_access: string | null;
};
/**
 * JSON API data
 *
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `definition` "data".
 */
export type SsoUserData = {
  type: SsoUserType;
  id: SsoUserIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SsoUserAttributes = {
  /**
   * Email
   */
  username: string;
  /**
   * Identity provider ID
   */
  external_id: string | null;
  /**
   * Whether this user is active on the identity provider. De-activated users won't be able to login.
   */
  is_active: boolean;
  /**
   * First name
   */
  first_name: string | null;
  /**
   * Last name
   */
  last_name: string | null;
};
/**
 * JSON API links
 *
 * This interface was referenced by `SsoUser`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SsoUserRelationships = {
  groups: SsoGroupData[];
  role: RoleData | null;
};
/**
 * An API token authenticates programmatic access to a project. Each token combines two layers of access control:
 *
 * 1. A **Role** that defines what actions are permitted (the same Role resource used for human collaborators).
 * 2. A set of **API surface flags** (`can_access_cda`, `can_access_cda_preview`, `can_access_cma`) that gate which APIs the token can hit at all.
 *
 * The token's effective capabilities are the *intersection* of the two.
 *
 * > [!PROTIP] 💡 A CDA-only token can safely reuse a write-capable Role
 * > A token with only `can_access_cda: true` is safe to attach to a Role that grants `update`/`publish`/`delete` — the Content Delivery API exposes no write endpoints, so those actions have no surface to act on. This makes it practical to share a single Role definition between an editor (acting via the dashboard / CMA) and a public read token (used by a frontend / CDA) for the same project.
 *
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "access_token".
 */
export type AccessToken = {
  id: AccessTokenIdentity;
  type: AccessTokenType;
  /**
   * Name of API token
   */
  name: string;
  /**
   * The secret value used as the `Authorization: Bearer <token>` credential. Returned on every endpoint (create, update, retrieve, list, rotate) to callers whose current role has `can_manage_access_tokens`; otherwise `null`.
   */
  token?: null | string;
  /**
   * Whether this API token can call the Content Delivery API (`graphql.datocms.com`) to fetch **published** content.
   */
  can_access_cda: boolean;
  /**
   * Whether this API token can call the Content Delivery API with the `X-Include-Drafts: true` header to fetch **draft** (current, unpublished) content. There is no separate endpoint — the CDA is a single GraphQL endpoint and this flag governs whether requesting drafts is allowed.
   */
  can_access_cda_preview: boolean;
  /**
   * Whether this API token can access the Content Management API
   */
  can_access_cma: boolean;
  /**
   * Internal marker for the project's built-in factory tokens (e.g. read-only API token), seeded by DatoCMS when the project is created. Read-only attribute. When non-null, attribute updates are rejected with `NON_EDITABLE_ACCESS_TOKEN`, but the token can still be deleted and regenerated. `null` for any token created via this API.
   */
  hardcoded_type: null | string;
  /**
   * When this API token was last used to access the Content Management API
   */
  last_cma_access:
    | 'today'
    | 'yesterday'
    | 'this_week'
    | 'last_week'
    | 'this_month'
    | 'last_month'
    | 'never';
  /**
   * When this API token was last used to access the Content Delivery API
   */
  last_cda_access:
    | 'today'
    | 'yesterday'
    | 'this_week'
    | 'last_week'
    | 'this_month'
    | 'last_month'
    | 'never';
  role: RoleData | null;
};
export type AccessTokenCreateTargetSchema = AccessToken;
export type AccessTokenUpdateTargetSchema = AccessToken;
export type AccessTokenSelfTargetSchema = AccessToken;
export type AccessTokenRegenerateTokenTargetSchema = AccessToken;
export type AccessTokenDestroyTargetSchema = AccessToken;
/**
 * JSON API data
 *
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `definition` "data".
 */
export type AccessTokenData = {
  type: AccessTokenType;
  id: AccessTokenIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type AccessTokenAttributes = {
  /**
   * Name of API token
   */
  name: string;
  /**
   * The secret value used as the `Authorization: Bearer <token>` credential. Returned on every endpoint (create, update, retrieve, list, rotate) to callers whose current role has `can_manage_access_tokens`; otherwise `null`.
   */
  token?: null | string;
  /**
   * Whether this API token can call the Content Delivery API (`graphql.datocms.com`) to fetch **published** content.
   */
  can_access_cda: boolean;
  /**
   * Whether this API token can call the Content Delivery API with the `X-Include-Drafts: true` header to fetch **draft** (current, unpublished) content. There is no separate endpoint — the CDA is a single GraphQL endpoint and this flag governs whether requesting drafts is allowed.
   */
  can_access_cda_preview: boolean;
  /**
   * Whether this API token can access the Content Management API
   */
  can_access_cma: boolean;
  /**
   * Internal marker for the project's built-in factory tokens (e.g. read-only API token), seeded by DatoCMS when the project is created. Read-only attribute. When non-null, attribute updates are rejected with `NON_EDITABLE_ACCESS_TOKEN`, but the token can still be deleted and regenerated. `null` for any token created via this API.
   */
  hardcoded_type: null | string;
  /**
   * When this API token was last used to access the Content Management API
   */
  last_cma_access:
    | 'today'
    | 'yesterday'
    | 'this_week'
    | 'last_week'
    | 'this_month'
    | 'last_month'
    | 'never';
  /**
   * When this API token was last used to access the Content Delivery API
   */
  last_cda_access:
    | 'today'
    | 'yesterday'
    | 'this_week'
    | 'last_week'
    | 'this_month'
    | 'last_month'
    | 'never';
};
/**
 * JSON API links
 *
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type AccessTokenRelationships = {
  role: RoleData | null;
};
/**
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `create.schema` link.
 */
export type AccessTokenCreateSchema = {
  type?: AccessTokenType;
  /**
   * Name of API token
   */
  name: string;
  /**
   * Whether this API token can call the Content Delivery API (`graphql.datocms.com`) to fetch **published** content.
   */
  can_access_cda: boolean;
  /**
   * Whether this API token can call the Content Delivery API with the `X-Include-Drafts: true` header to fetch **draft** (current, unpublished) content. There is no separate endpoint — the CDA is a single GraphQL endpoint and this flag governs whether requesting drafts is allowed.
   */
  can_access_cda_preview: boolean;
  /**
   * Whether this API token can access the Content Management API
   */
  can_access_cma: boolean;
  role: RoleData;
};
/**
 * This interface was referenced by `AccessToken`'s JSON-Schema
 * via the `update.schema` link.
 */
export type AccessTokenUpdateSchema = {
  id?: AccessTokenIdentity;
  type?: AccessTokenType;
  /**
   * Name of API token
   */
  name: string;
  /**
   * Whether this API token can call the Content Delivery API (`graphql.datocms.com`) to fetch **published** content.
   */
  can_access_cda: boolean;
  /**
   * Whether this API token can call the Content Delivery API with the `X-Include-Drafts: true` header to fetch **draft** (current, unpublished) content. There is no separate endpoint — the CDA is a single GraphQL endpoint and this flag governs whether requesting drafts is allowed.
   */
  can_access_cda_preview: boolean;
  /**
   * Whether this API token can access the Content Management API
   */
  can_access_cma: boolean;
  role?: RoleData;
};
/**
 * DatoCMS account
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "account".
 */
export type Account = {
  id: AccountIdentity;
  type: AccountType;
  /**
   * Email
   */
  email: string;
  /**
   * First name
   */
  first_name: string | null;
  /**
   * Last name
   */
  last_name: string | null;
  /**
   * Company name
   */
  company: string | null;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Account`'s JSON-Schema
 * via the `definition` "data".
 */
export type AccountData = {
  type: AccountType;
  id: AccountIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `Account`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type AccountAttributes = {
  /**
   * Email
   */
  email: string;
  /**
   * First name
   */
  first_name: string | null;
  /**
   * Last name
   */
  last_name: string | null;
  /**
   * Company name
   */
  company: string | null;
};
/**
 * DatoCMS organization
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "organization".
 */
export type Organization = {
  id: OrganizationIdentity;
  type: OrganizationType;
  /**
   * Name of the organization
   */
  name: string;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Organization`'s JSON-Schema
 * via the `definition` "data".
 */
export type OrganizationData = {
  type: OrganizationType;
  id: OrganizationIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `Organization`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type OrganizationAttributes = {
  /**
   * Name of the organization
   */
  name: string;
};
/**
 * If the Audit log functionality is enabled in a project, logged events can be queried using SQL-like language and fetched in full detail so that they can be exported or analyzed.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "audit_log_event".
 */
export type AuditLogEvent = {
  id: AuditLogEventIdentity;
  type: AuditLogEventType;
  /**
   * The actual action performed
   */
  action_name: string;
  /**
   * The actor who performed the action
   */
  actor: {
    /**
     * The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
     */
    type: string;
    /**
     * The ID of the actor
     */
    id: string;
    /**
     * An human representation of the actor (name/email/username depending on the type of actor)
     */
    name: string;
  };
  /**
   * The role of the actor at the time the action was performed
   */
  role: null | {
    /**
     * The name of the role
     */
    name: string;
    /**
     * The ID of the role
     */
    id: string;
  };
  /**
   * The environment inside of which the action was performed
   */
  environment: {
    /**
     * The ID of the environment
     */
    id: string;
    /**
     * Whether the environment was the primary one at the time the action was performed
     */
    primary: boolean;
  };
  /**
   * The actual request being performed
   */
  request: {
    /**
     * The full path of the request
     */
    path: string;
    /**
     * The HTTP method of the request
     */
    method: string;
    /**
     * The X-Request-ID header of the request
     */
    id?: string;
    /**
     * The full HTTP body of the request
     */
    payload?: null | {
      [k: string]: unknown;
    };
  };
  /**
   * The actual response being returned by DatoCMS
   */
  response: null | {
    /**
     * The HTTP status code of the response
     */
    status: number;
    /**
     * The full HTTP body of the response
     */
    payload: {
      [k: string]: unknown;
    };
  };
  /**
   * Whether the action was performed during a debug (impersonation) session by DatoCMS staff
   */
  impersonated?: null | boolean;
  meta: AuditLogEventMeta;
};
/**
 * JSON API meta
 *
 * This interface was referenced by `AuditLogEvent`'s JSON-Schema
 * via the `definition` "meta".
 */
export type AuditLogEventMeta = {
  /**
   * The date of the event
   */
  occurred_at: string;
};
/**
 * JSON API data
 *
 * This interface was referenced by `AuditLogEvent`'s JSON-Schema
 * via the `definition` "data".
 */
export type AuditLogEventData = {
  type: AuditLogEventType;
  id: AuditLogEventIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `AuditLogEvent`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type AuditLogEventAttributes = {
  /**
   * The actual action performed
   */
  action_name: string;
  /**
   * The actor who performed the action
   */
  actor: {
    /**
     * The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
     */
    type: string;
    /**
     * The ID of the actor
     */
    id: string;
    /**
     * An human representation of the actor (name/email/username depending on the type of actor)
     */
    name: string;
  };
  /**
   * The role of the actor at the time the action was performed
   */
  role: null | {
    /**
     * The name of the role
     */
    name: string;
    /**
     * The ID of the role
     */
    id: string;
  };
  /**
   * The environment inside of which the action was performed
   */
  environment: {
    /**
     * The ID of the environment
     */
    id: string;
    /**
     * Whether the environment was the primary one at the time the action was performed
     */
    primary: boolean;
  };
  /**
   * The actual request being performed
   */
  request: {
    /**
     * The full path of the request
     */
    path: string;
    /**
     * The HTTP method of the request
     */
    method: string;
    /**
     * The X-Request-ID header of the request
     */
    id?: string;
    /**
     * The full HTTP body of the request
     */
    payload?: null | {
      [k: string]: unknown;
    };
  };
  /**
   * The actual response being returned by DatoCMS
   */
  response: null | {
    /**
     * The HTTP status code of the response
     */
    status: number;
    /**
     * The full HTTP body of the response
     */
    payload: {
      [k: string]: unknown;
    };
  };
  /**
   * Whether the action was performed during a debug (impersonation) session by DatoCMS staff
   */
  impersonated?: null | boolean;
};
/**
 * This interface was referenced by `AuditLogEvent`'s JSON-Schema
 * via the `query.schema` link.
 */
export type AuditLogEventQuerySchema = {
  type?: 'audit_log_query';
  /**
   * Only return events occurred at or after this ISO 8601 datetime
   */
  since?: string;
  /**
   * Only return events occurred before this ISO 8601 datetime
   */
  before?: string;
  /**
   * An SQL-like expression to filter the events
   */
  filter?: string;
  /**
   * Set this value to get remaining results, if a meta.next_token was returned in the previous query response
   */
  next_token?: string;
  /**
   * Whether a detailed log complete with full request and response payload must be returned or not
   */
  detailed_log?: boolean;
};
/**
 * Stores the information regarding the current plan for the project.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "site_plan".
 */
export type SitePlan = {
  id: SitePlanIdentity;
  type: SitePlanType;
  /**
   * The name of the plan
   */
  name: string;
  /**
   * Whether this plan is active or legacy
   */
  active: boolean;
  /**
   * Whether custom domain can be enabled or not
   */
  custom_domain: boolean;
  /**
   * Number of users that can be invited
   */
  users: null | number;
  /**
   * Number of indexable pages
   */
  indexable_pages: null | number;
  /**
   * Number of build triggers
   */
  build_triggers: null | number;
  /**
   * Number of search indexes
   */
  search_indexes: null | number;
  /**
   * Number of plugins
   */
  plugins: null | number;
  /**
   * Number of webhooks
   */
  webhooks: null | number;
  /**
   * Number of records allowed
   */
  items: null | number;
  /**
   * Monthly price
   */
  monthly_price: number;
  /**
   * Yearly price
   */
  yearly_price: number;
  /**
   * Uploadable bytes
   */
  uploadable_bytes: null | number;
  /**
   * Amount of asset data transferred between our Asset CDN and GraphQL Content Delivery API and content consumers
   */
  traffic_bytes: null | number;
  /**
   * The number of requests made to both our Content Management and Content Delivery APIs
   */
  api_calls: null | number;
  /**
   * The number of requests made to our Content Delivery API
   */
  cda_api_calls?: null | number;
  /**
   * The number of requests made to our Content Management API
   */
  cma_api_calls?: null | number;
  /**
   * The number of streaming seconds delivered by Mux.com
   */
  mux_streaming_seconds: null | number;
  /**
   * The number of available encoding seconds to Mux.com
   */
  mux_encoding_seconds: null | number;
  /**
   * The number of images you can analyze for smart tags detections
   */
  smart_tags_detections: null | number;
  /**
   * The number of different API tokens you can generate, each which different permissions
   */
  access_tokens: null | number;
  /**
   * Number of roles allowed
   */
  roles: null | number;
  /**
   * Number of locales allowed
   */
  locales: null | number;
  /**
   * Number of sandbox environments allowed
   */
  sandbox_environments: null | number;
  /**
   * Number of models allowed
   */
  item_types: null | number;
  /**
   * Whether collaboration features are enabled or not
   */
  item_locking: boolean;
  /**
   * Whether project is in white-label mode or not
   */
  white_label: boolean;
  /**
   * Whether Single Sign-On feature is enabled or not
   */
  sso: boolean;
  /**
   * Whether built-in image editor and smart-tagging is enabled or not
   */
  advanced_media_area: boolean;
  /**
   * Maximum number of blocks a record can contain
   */
  blocks_per_item: number;
  /**
   * Maximum level of block nesting for a record
   */
  blocks_depth: number;
  /**
   * Whether video streaming with Mux.com is enabled or not
   */
  video: boolean;
  /**
   * Days of version history retention
   */
  history_retention_days: number | null;
  /**
   * Maximum number of clients connected at the same time to the Realtime Updates API. The limit is per-project
   */
  concurrent_realtime_connections: number;
  /**
   * The maximum GraphQL query complexity a client can perform on our CDA.
   */
  gql_complexity: number;
  /**
   * Period (in minutes) in which bursts of changes made to the same record by the same user (or API token) will be grouped into a single one
   */
  history_resolution_minutes: number;
  /**
   * Whether two-factor authentication can be enabled or not
   */
  otp: boolean;
  /**
   * Whether workflows are enabled or not
   */
  workflows: boolean;
  /**
   * Whether visual editing is enabled or not
   */
  visual_editing: boolean;
  /**
   * Number of workflows allowed
   */
  workflows_count: number;
  /**
   * Whether audit logs are enabled or not
   */
  audit_log: boolean;
  /**
   * Whether translator roles are enabled or not
   */
  translator_roles: boolean;
  /**
   * Whether or not use a static IP when sending webhooks
   */
  static_webhooks_ip: boolean;
  /**
   * Maximum size in bytes for a single file upload
   */
  maximum_single_upload_bytes: number;
  /**
   * Maximum size (in bytes) for a record, including its block records
   */
  item_size_bytes: number;
  /**
   * Available extra packets
   */
  extra_packets: {
    users?: {
      amount_per_packet: number;
      price: number;
    };
    locales?: {
      amount_per_packet: number;
      price: number;
    };
    item_types?: {
      amount_per_packet: number;
      price: number;
    };
    roles?: {
      amount_per_packet: number;
      price: number;
    };
    build_triggers?: {
      amount_per_packet: number;
      price: number;
    };
    search_indexes?: {
      amount_per_packet: number;
      price: number;
    };
    access_tokens?: {
      amount_per_packet: number;
      price: number;
    };
    mux_encoding_seconds?: {
      amount_per_packet: number;
      price: number;
    };
    sandbox_environments?: {
      amount_per_packet: number;
      price: number;
    };
  };
  /**
   * Automatic packets
   */
  auto_packets: {
    traffic_bytes?: {
      amount_per_packet: number;
      price: number;
    };
    api_calls?: {
      amount_per_packet: number;
      price: number;
    };
    cda_api_calls?: {
      amount_per_packet: number;
      price: number;
    };
    cma_api_calls?: {
      amount_per_packet: number;
      price: number;
    };
    mux_streaming_seconds?: {
      amount_per_packet: number;
      price: number;
    };
  };
};
/**
 * JSON API data
 *
 * This interface was referenced by `SitePlan`'s JSON-Schema
 * via the `definition` "data".
 */
export type SitePlanData = {
  type: SitePlanType;
  id: SitePlanIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SitePlan`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SitePlanAttributes = {
  /**
   * The name of the plan
   */
  name: string;
  /**
   * Whether this plan is active or legacy
   */
  active: boolean;
  /**
   * Whether custom domain can be enabled or not
   */
  custom_domain: boolean;
  /**
   * Number of users that can be invited
   */
  users: null | number;
  /**
   * Number of indexable pages
   */
  indexable_pages: null | number;
  /**
   * Number of build triggers
   */
  build_triggers: null | number;
  /**
   * Number of search indexes
   */
  search_indexes: null | number;
  /**
   * Number of plugins
   */
  plugins: null | number;
  /**
   * Number of webhooks
   */
  webhooks: null | number;
  /**
   * Number of records allowed
   */
  items: null | number;
  /**
   * Monthly price
   */
  monthly_price: number;
  /**
   * Yearly price
   */
  yearly_price: number;
  /**
   * Uploadable bytes
   */
  uploadable_bytes: null | number;
  /**
   * Amount of asset data transferred between our Asset CDN and GraphQL Content Delivery API and content consumers
   */
  traffic_bytes: null | number;
  /**
   * The number of requests made to both our Content Management and Content Delivery APIs
   */
  api_calls: null | number;
  /**
   * The number of requests made to our Content Delivery API
   */
  cda_api_calls?: null | number;
  /**
   * The number of requests made to our Content Management API
   */
  cma_api_calls?: null | number;
  /**
   * The number of streaming seconds delivered by Mux.com
   */
  mux_streaming_seconds: null | number;
  /**
   * The number of available encoding seconds to Mux.com
   */
  mux_encoding_seconds: null | number;
  /**
   * The number of images you can analyze for smart tags detections
   */
  smart_tags_detections: null | number;
  /**
   * The number of different API tokens you can generate, each which different permissions
   */
  access_tokens: null | number;
  /**
   * Number of roles allowed
   */
  roles: null | number;
  /**
   * Number of locales allowed
   */
  locales: null | number;
  /**
   * Number of sandbox environments allowed
   */
  sandbox_environments: null | number;
  /**
   * Number of models allowed
   */
  item_types: null | number;
  /**
   * Whether collaboration features are enabled or not
   */
  item_locking: boolean;
  /**
   * Whether project is in white-label mode or not
   */
  white_label: boolean;
  /**
   * Whether Single Sign-On feature is enabled or not
   */
  sso: boolean;
  /**
   * Whether built-in image editor and smart-tagging is enabled or not
   */
  advanced_media_area: boolean;
  /**
   * Maximum number of blocks a record can contain
   */
  blocks_per_item: number;
  /**
   * Maximum level of block nesting for a record
   */
  blocks_depth: number;
  /**
   * Whether video streaming with Mux.com is enabled or not
   */
  video: boolean;
  /**
   * Days of version history retention
   */
  history_retention_days: number | null;
  /**
   * Maximum number of clients connected at the same time to the Realtime Updates API. The limit is per-project
   */
  concurrent_realtime_connections: number;
  /**
   * The maximum GraphQL query complexity a client can perform on our CDA.
   */
  gql_complexity: number;
  /**
   * Period (in minutes) in which bursts of changes made to the same record by the same user (or API token) will be grouped into a single one
   */
  history_resolution_minutes: number;
  /**
   * Whether two-factor authentication can be enabled or not
   */
  otp: boolean;
  /**
   * Whether workflows are enabled or not
   */
  workflows: boolean;
  /**
   * Whether visual editing is enabled or not
   */
  visual_editing: boolean;
  /**
   * Number of workflows allowed
   */
  workflows_count: number;
  /**
   * Whether audit logs are enabled or not
   */
  audit_log: boolean;
  /**
   * Whether translator roles are enabled or not
   */
  translator_roles: boolean;
  /**
   * Whether or not use a static IP when sending webhooks
   */
  static_webhooks_ip: boolean;
  /**
   * Maximum size in bytes for a single file upload
   */
  maximum_single_upload_bytes: number;
  /**
   * Maximum size (in bytes) for a record, including its block records
   */
  item_size_bytes: number;
  /**
   * Available extra packets
   */
  extra_packets: {
    users?: {
      amount_per_packet: number;
      price: number;
    };
    locales?: {
      amount_per_packet: number;
      price: number;
    };
    item_types?: {
      amount_per_packet: number;
      price: number;
    };
    roles?: {
      amount_per_packet: number;
      price: number;
    };
    build_triggers?: {
      amount_per_packet: number;
      price: number;
    };
    search_indexes?: {
      amount_per_packet: number;
      price: number;
    };
    access_tokens?: {
      amount_per_packet: number;
      price: number;
    };
    mux_encoding_seconds?: {
      amount_per_packet: number;
      price: number;
    };
    sandbox_environments?: {
      amount_per_packet: number;
      price: number;
    };
  };
  /**
   * Automatic packets
   */
  auto_packets: {
    traffic_bytes?: {
      amount_per_packet: number;
      price: number;
    };
    api_calls?: {
      amount_per_packet: number;
      price: number;
    };
    cda_api_calls?: {
      amount_per_packet: number;
      price: number;
    };
    cma_api_calls?: {
      amount_per_packet: number;
      price: number;
    };
    mux_streaming_seconds?: {
      amount_per_packet: number;
      price: number;
    };
  };
};
/**
 * In DatoCMS you can organize the different Models present in your administrative area reordering and grouping them, so that their purpose will be more clear to the final editor.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "menu_item".
 */
export type MenuItem = {
  id: MenuItemIdentity;
  type: MenuItemType;
  /**
   * The label of the menu item
   */
  label: string;
  /**
   * The URL to which the menu item points to
   */
  external_url: null | string;
  /**
   * Ordering index
   */
  position: number;
  /**
   * Opens link in new tab (to be used together with `external_url`)
   */
  open_in_new_tab: boolean;
  item_type: ItemTypeData | null;
  item_type_filter: ItemTypeFilterData | null;
  parent: null | MenuItemData;
  children: MenuItemData[];
};
export type MenuItemCreateTargetSchema = MenuItem;
export type MenuItemUpdateTargetSchema = MenuItem;
export type MenuItemSelfTargetSchema = MenuItem;
export type MenuItemDestroyTargetSchema = MenuItem;
/**
 * JSON API data
 *
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `definition` "data".
 */
export type ItemTypeFilterData = {
  type: ItemTypeFilterType;
  id: ItemTypeFilterIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `definition` "data".
 */
export type MenuItemData = {
  type: MenuItemType;
  id: MenuItemIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type MenuItemAttributes = {
  /**
   * The label of the menu item
   */
  label: string;
  /**
   * The URL to which the menu item points to
   */
  external_url: null | string;
  /**
   * Ordering index
   */
  position: number;
  /**
   * Opens link in new tab (to be used together with `external_url`)
   */
  open_in_new_tab: boolean;
};
/**
 * JSON API links
 *
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type MenuItemRelationships = {
  item_type: ItemTypeData | null;
  item_type_filter: ItemTypeFilterData | null;
  parent: null | MenuItemData;
  children: MenuItemData[];
};
/**
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `create.schema` link.
 */
export type MenuItemCreateSchema = {
  id?: MenuItemIdentity;
  type?: MenuItemType;
  /**
   * The label of the menu item
   */
  label: string;
  /**
   * The URL to which the menu item points to
   */
  external_url?: null | string;
  /**
   * Ordering index
   */
  position?: number;
  /**
   * Opens link in new tab (to be used together with `external_url`)
   */
  open_in_new_tab?: boolean;
  item_type?: ItemTypeData | null;
  item_type_filter?: ItemTypeFilterData | null;
  parent?: null | MenuItemData;
};
/**
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `update.schema` link.
 */
export type MenuItemUpdateSchema = {
  id?: MenuItemIdentity;
  type?: MenuItemType;
  /**
   * The label of the menu item
   */
  label?: string;
  /**
   * The URL to which the menu item points to
   */
  external_url?: null | string;
  /**
   * Ordering index
   */
  position?: number;
  /**
   * Opens link in new tab (to be used together with `external_url`)
   */
  open_in_new_tab?: boolean;
  item_type?: ItemTypeData | null;
  item_type_filter?: ItemTypeFilterData | null;
  parent?: null | MenuItemData;
};
/**
 * This interface was referenced by `MenuItem`'s JSON-Schema
 * via the `reorder.targetSchema` link.
 *
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `reorder.targetSchema` link.
 *
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `reorder.targetSchema` link.
 *
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `update.targetSchema` link.
 *
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `destroy.targetSchema` link.
 *
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `reorder_fields_and_fieldsets.targetSchema` link.
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `create.targetSchema` link.
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `update.targetSchema` link.
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `destroy.targetSchema` link.
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `duplicate.targetSchema` link.
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `duplicate.targetSchema` link.
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `destroy.targetSchema` link.
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_publish.targetSchema` link.
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_unpublish.targetSchema` link.
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_destroy.targetSchema` link.
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_move_to_stage.targetSchema` link.
 *
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `restore.targetSchema` link.
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `create.targetSchema` link.
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `update.targetSchema` link.
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_tag.targetSchema` link.
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_set_upload_collection.targetSchema` link.
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_destroy.targetSchema` link.
 *
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `create.targetSchema` link.
 *
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `destroy.targetSchema` link.
 *
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `generate_subtitles.targetSchema` link.
 *
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `update.targetSchema` link.
 *
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `activate_improved_timezone_management.targetSchema` link.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "job".
 */
export type Job = {
  id: JobIdentity;
  type: JobType;
};
export type MenuItemReorderTargetSchema = Job;
export type SchemaMenuItemReorderTargetSchema = Job;
export type UploadCollectionReorderTargetSchema = Job;
export type ItemTypeUpdateTargetSchema = Job;
export type ItemTypeDestroyTargetSchema = Job;
export type ItemTypeReorderFieldsAndFieldsetsTargetSchema = Job;
export type FieldCreateTargetSchema = Job;
export type FieldUpdateTargetSchema = Job;
export type FieldDestroyTargetSchema = Job;
export type FieldDuplicateTargetSchema = Job;
export type ItemDuplicateTargetSchema = Job;
export type ItemDestroyTargetSchema = Job;
export type ItemBulkPublishTargetSchema = Job;
export type ItemBulkUnpublishTargetSchema = Job;
export type ItemBulkDestroyTargetSchema = Job;
export type ItemBulkMoveToStageTargetSchema = Job;
export type ItemVersionRestoreTargetSchema = Job;
export type UploadCreateTargetSchema = Job;
export type UploadUpdateTargetSchema = Job;
export type UploadBulkTagTargetSchema = Job;
export type UploadBulkSetUploadCollectionTargetSchema = Job;
export type UploadBulkDestroyTargetSchema = Job;
export type UploadTrackCreateTargetSchema = Job;
export type UploadTrackDestroyTargetSchema = Job;
export type UploadTrackGenerateSubtitlesTargetSchema = Job;
export type SiteUpdateTargetSchema = Job;
export type SiteActivateImprovedTimezoneManagementTargetSchema = Job;
/**
 * JSON API data
 *
 * This interface was referenced by `Job`'s JSON-Schema
 * via the `definition` "data".
 */
export type JobData = {
  type: JobType;
  id: JobIdentity;
};
/**
 * In DatoCMS you can organize the different models and blocks present in your administrative area reordering and grouping them, so that their purpose will be more clear to the final editor.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "schema_menu_item".
 */
export type SchemaMenuItem = {
  id: SchemaMenuItemIdentity;
  type: SchemaMenuItemType;
  /**
   * The label of the schema menu item (only present when the schema menu item is not linked to an item type)
   */
  label: null | string;
  /**
   * Ordering index
   */
  position: number;
  /**
   * Indicates if the schema menu item refers to an item type or a modular block
   */
  kind: 'item_type' | 'modular_block';
  item_type: ItemTypeData | null;
  parent: null | SchemaMenuItemData;
  children: SchemaMenuItemData[];
};
export type SchemaMenuItemCreateTargetSchema = SchemaMenuItem;
export type SchemaMenuItemUpdateTargetSchema = SchemaMenuItem;
export type SchemaMenuItemSelfTargetSchema = SchemaMenuItem;
export type SchemaMenuItemDestroyTargetSchema = SchemaMenuItem;
/**
 * JSON API data
 *
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `definition` "data".
 */
export type SchemaMenuItemData = {
  type: SchemaMenuItemType;
  id: SchemaMenuItemIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SchemaMenuItemAttributes = {
  /**
   * The label of the schema menu item (only present when the schema menu item is not linked to an item type)
   */
  label: null | string;
  /**
   * Ordering index
   */
  position: number;
  /**
   * Indicates if the schema menu item refers to an item type or a modular block
   */
  kind: 'item_type' | 'modular_block';
};
/**
 * JSON API links
 *
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SchemaMenuItemRelationships = {
  item_type: ItemTypeData | null;
  parent: null | SchemaMenuItemData;
  children: SchemaMenuItemData[];
};
/**
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `create.schema` link.
 */
export type SchemaMenuItemCreateSchema = {
  id?: SchemaMenuItemIdentity;
  type?: SchemaMenuItemType;
  /**
   * The label of the schema menu item (only present when the schema menu item is not linked to an item type)
   */
  label: null | string;
  /**
   * Ordering index
   */
  position?: number;
  /**
   * Indicates if the schema menu item refers to an item type or a modular block
   */
  kind: 'item_type' | 'modular_block';
  item_type?: ItemTypeData | null;
  parent?: null | SchemaMenuItemData;
};
/**
 * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
 * via the `update.schema` link.
 */
export type SchemaMenuItemUpdateSchema = {
  id?: SchemaMenuItemIdentity;
  type?: SchemaMenuItemType;
  /**
   * The label of the schema menu item (only present when the schema menu item is not linked to an item type)
   */
  label?: null | string;
  /**
   * Ordering index
   */
  position?: number;
  /**
   * Indicates if the schema menu item refers to an item type or a modular block
   */
  kind?: 'item_type' | 'modular_block';
  item_type?: ItemTypeData | null;
  parent?: null | SchemaMenuItemData;
  children?: SchemaMenuItemData[];
};
/**
 * In DatoCMS you can organize the uploads present in your administrative area in collection, so that the final editors can easily navigate uploads.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "upload_collection".
 */
export type UploadCollection = {
  id: UploadCollectionIdentity;
  type: UploadCollectionType;
  /**
   * The label of the upload collection
   */
  label: string;
  /**
   * Ordering index
   */
  position: number;
  parent: null | UploadCollectionData;
  children: UploadCollectionData[];
};
export type UploadCollectionCreateTargetSchema = UploadCollection;
export type UploadCollectionUpdateTargetSchema = UploadCollection;
export type UploadCollectionSelfTargetSchema = UploadCollection;
export type UploadCollectionDestroyTargetSchema = UploadCollection;
/**
 * JSON API data
 *
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `definition` "data".
 */
export type UploadCollectionData = {
  type: UploadCollectionType;
  id: UploadCollectionIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UploadCollectionAttributes = {
  /**
   * The label of the upload collection
   */
  label: string;
  /**
   * Ordering index
   */
  position: number;
};
/**
 * JSON API links
 *
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type UploadCollectionRelationships = {
  parent: null | UploadCollectionData;
  children: UploadCollectionData[];
};
/**
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `create.schema` link.
 */
export type UploadCollectionCreateSchema = {
  id?: UploadCollectionIdentity;
  type?: UploadCollectionType;
  /**
   * The label of the upload collection
   */
  label: string;
  /**
   * Ordering index
   */
  position?: number;
  parent?: null | UploadCollectionData;
};
/**
 * This interface was referenced by `UploadCollection`'s JSON-Schema
 * via the `update.schema` link.
 */
export type UploadCollectionUpdateSchema = {
  id?: UploadCollectionIdentity;
  type?: UploadCollectionType;
  /**
   * The label of the upload collection
   */
  label?: string;
  /**
   * Ordering index
   */
  position?: number;
  parent?: null | UploadCollectionData;
  children?: UploadCollectionData[];
};
/**
 * The way you define the kind of content you can edit inside a DatoCMS project passes through the concept of **models** and **block models**. For backward-compatibility reasons, the API refers to both as "item types".
 *
 * ## Models
 *
 * Models are much like database tables — they define the structure of your main content types (e.g., blog posts, products, landing pages). Each model is composed of fields with custom validations. Records created from models exist independently and can be referenced by other records through link fields.
 *
 * ## Block Models
 *
 * Block models define complex and repeatable structures that can be embedded inside records. They are the foundation behind features like [Modular Content](/docs/content-modelling/modular-content.md) and [Structured Text](/docs/content-modelling/structured-text.md).
 *
 * ### Key differences:
 *
 * - **Models** create standalone records that can be referenced and have independent value
 * - **Block models** create blocks that only exist within parent records and cannot be referenced via link fields
 * - Block models defined in the library can be reused across different models
 * - When a record gets deleted, all the blocks it contains are deleted with it
 * - Blocks do not count towards your plan's records limit
 *
 * You can distinguish between models and block models using the `modular_block` attribute: `true` indicates a block model, `false` indicates a regular model.
 *
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "item_type".
 */
export type ItemType = {
  id: ItemTypeIdentity;
  type: ItemTypeType;
  /**
   * Name of the model/block model
   */
  name: string;
  /**
   * API key of the model/block model
   */
  api_key: string;
  /**
   * The way the model collection should be presented to the editors
   */
  collection_appeareance?: 'compact' | 'table';
  /**
   * The way the model/block model collection should be presented to the editors
   */
  collection_appearance: 'compact' | 'table';
  /**
   * Whether the model is single-instance or not. This property only applies to models, not block models
   */
  singleton: boolean;
  /**
   * Whether we require all the project locales to be present for each localized field or not
   */
  all_locales_required: boolean;
  /**
   * Whether editors can sort records via drag & drop or not. Must be false for block models
   */
  sortable: boolean;
  /**
   * Whether this is a block model or not. Block models define structures that can be embedded inside records, while regular models create standalone records
   */
  modular_block: boolean;
  /**
   * Whether draft/published mode is active or not. Must be false for block models
   */
  draft_mode_active: boolean;
  /**
   * Whether draft records can be saved without satisfying the validations or not. Must be false for block models
   */
  draft_saving_active: boolean;
  /**
   * Whether editors can organize records in a tree or not. Must be false for block models
   */
  tree: boolean;
  /**
   * If an ordering field is set, this field specifies the sorting direction. This property does not apply to block models
   */
  ordering_direction: null | 'asc' | 'desc';
  /**
   * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field. This property does not apply to block models
   */
  ordering_meta:
    | null
    | 'created_at'
    | 'updated_at'
    | 'first_published_at'
    | 'published_at';
  /**
   * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
   */
  has_singleton_item: boolean;
  /**
   * A hint shown to editors to help them understand the purpose of this model/block model
   */
  hint: string | null;
  /**
   * Whether inverse relationships fields are expressed in GraphQL or not. Must be false for block models
   */
  inverse_relationships_enabled: boolean;
  singleton_item: ItemData | null;
  fields: FieldData[];
  fieldsets: FieldsetData[];
  presentation_title_field: FieldData | null;
  presentation_image_field: FieldData | null;
  title_field: FieldData | null;
  image_preview_field: FieldData | null;
  excerpt_field: FieldData | null;
  ordering_field: FieldData | null;
  workflow: WorkflowData | null;
  meta: ItemTypeMeta;
};
export type ItemTypeCreateTargetSchema = ItemType;
export type ItemTypeUpdateJobSchema = ItemType;
export type ItemTypeSelfTargetSchema = ItemType;
export type ItemTypeDuplicateTargetSchema = ItemType;
export type ItemTypeDestroyJobSchema = ItemType;
/**
 * JSON API data
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `definition` "data".
 */
export type ItemData = {
  type: ItemType1;
  id: ItemIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `definition` "data".
 */
export type FieldData = {
  type: FieldType;
  id: FieldIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `definition` "data".
 */
export type FieldsetData = {
  type: FieldsetType;
  id: FieldsetIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Workflow`'s JSON-Schema
 * via the `definition` "data".
 */
export type WorkflowData = {
  type: WorkflowType;
  id: WorkflowIdentity;
};
/**
 * Meta information regarding the model/block model
 *
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `definition` "meta".
 */
export type ItemTypeMeta = {
  /**
   * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
   */
  has_singleton_item: boolean;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type ItemTypeAttributes = {
  /**
   * Name of the model/block model
   */
  name: string;
  /**
   * API key of the model/block model
   */
  api_key: string;
  /**
   * The way the model collection should be presented to the editors
   */
  collection_appeareance?: 'compact' | 'table';
  /**
   * The way the model/block model collection should be presented to the editors
   */
  collection_appearance: 'compact' | 'table';
  /**
   * Whether the model is single-instance or not. This property only applies to models, not block models
   */
  singleton: boolean;
  /**
   * Whether we require all the project locales to be present for each localized field or not
   */
  all_locales_required: boolean;
  /**
   * Whether editors can sort records via drag & drop or not. Must be false for block models
   */
  sortable: boolean;
  /**
   * Whether this is a block model or not. Block models define structures that can be embedded inside records, while regular models create standalone records
   */
  modular_block: boolean;
  /**
   * Whether draft/published mode is active or not. Must be false for block models
   */
  draft_mode_active: boolean;
  /**
   * Whether draft records can be saved without satisfying the validations or not. Must be false for block models
   */
  draft_saving_active: boolean;
  /**
   * Whether editors can organize records in a tree or not. Must be false for block models
   */
  tree: boolean;
  /**
   * If an ordering field is set, this field specifies the sorting direction. This property does not apply to block models
   */
  ordering_direction: null | 'asc' | 'desc';
  /**
   * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field. This property does not apply to block models
   */
  ordering_meta:
    | null
    | 'created_at'
    | 'updated_at'
    | 'first_published_at'
    | 'published_at';
  /**
   * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
   */
  has_singleton_item: boolean;
  /**
   * A hint shown to editors to help them understand the purpose of this model/block model
   */
  hint: string | null;
  /**
   * Whether inverse relationships fields are expressed in GraphQL or not. Must be false for block models
   */
  inverse_relationships_enabled: boolean;
};
/**
 * JSON API links
 *
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type ItemTypeRelationships = {
  singleton_item: ItemData | null;
  fields: FieldData[];
  fieldsets: FieldsetData[];
  presentation_title_field: FieldData | null;
  presentation_image_field: FieldData | null;
  title_field: FieldData | null;
  image_preview_field: FieldData | null;
  excerpt_field: FieldData | null;
  ordering_field: FieldData | null;
  workflow: WorkflowData | null;
};
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `create.schema` link.
 */
export type ItemTypeCreateSchema = {
  id?: ItemTypeIdentity;
  type?: ItemTypeType;
  /**
   * Name of the model/block model
   */
  name: string;
  /**
   * API key of the model/block model
   */
  api_key: string;
  /**
   * Whether the model is single-instance or not. This property only applies to models, not block models
   */
  singleton?: boolean;
  /**
   * Whether we require all the project locales to be present for each localized field or not
   */
  all_locales_required?: boolean;
  /**
   * Whether editors can sort records via drag & drop or not. Must be false for block models
   */
  sortable?: boolean;
  /**
   * Whether this is a block model or not. Block models define structures that can be embedded inside records, while regular models create standalone records
   */
  modular_block?: boolean;
  /**
   * Whether draft/published mode is active or not. Must be false for block models
   */
  draft_mode_active?: boolean;
  /**
   * Whether draft records can be saved without satisfying the validations or not. Must be false for block models
   */
  draft_saving_active?: boolean;
  /**
   * Whether editors can organize records in a tree or not. Must be false for block models
   */
  tree?: boolean;
  /**
   * If an ordering field is set, this field specifies the sorting direction. This property does not apply to block models
   */
  ordering_direction?: null | 'asc' | 'desc';
  /**
   * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field. This property does not apply to block models
   */
  ordering_meta?:
    | null
    | 'created_at'
    | 'updated_at'
    | 'first_published_at'
    | 'published_at';
  /**
   * The way the model collection should be presented to the editors
   */
  collection_appeareance?: 'compact' | 'table';
  /**
   * The way the model/block model collection should be presented to the editors
   */
  collection_appearance?: 'compact' | 'table';
  /**
   * A hint shown to editors to help them understand the purpose of this model/block model
   */
  hint?: string | null;
  /**
   * Whether inverse relationships fields are expressed in GraphQL or not. Must be false for block models
   */
  inverse_relationships_enabled?: boolean;
  ordering_field?: FieldData | null;
  presentation_title_field?: FieldData | null;
  presentation_image_field?: FieldData | null;
  title_field?: FieldData | null;
  image_preview_field?: FieldData | null;
  excerpt_field?: FieldData | null;
  workflow?: WorkflowData | null;
};
/**
 * This interface was referenced by `ItemType`'s JSON-Schema
 * via the `update.schema` link.
 */
export type ItemTypeUpdateSchema = {
  id?: ItemTypeIdentity;
  type?: ItemTypeType;
  /**
   * Name of the model/block model
   */
  name?: string;
  /**
   * API key of the model/block model
   */
  api_key?: string;
  /**
   * The way the model collection should be presented to the editors
   */
  collection_appeareance?: 'compact' | 'table';
  /**
   * The way the model/block model collection should be presented to the editors
   */
  collection_appearance?: 'compact' | 'table';
  /**
   * Whether the model is single-instance or not. This property only applies to models, not block models
   */
  singleton?: boolean;
  /**
   * Whether we require all the project locales to be present for each localized field or not
   */
  all_locales_required?: boolean;
  /**
   * Whether editors can sort records via drag & drop or not. Must be false for block models
   */
  sortable?: boolean;
  /**
   * Whether this is a block model or not. Block models define structures that can be embedded inside records, while regular models create standalone records
   */
  modular_block?: boolean;
  /**
   * Whether draft/published mode is active or not. Must be false for block models
   */
  draft_mode_active?: boolean;
  /**
   * Whether draft records can be saved without satisfying the validations or not. Must be false for block models
   */
  draft_saving_active?: boolean;
  /**
   * Whether editors can organize records in a tree or not. Must be false for block models
   */
  tree?: boolean;
  /**
   * If an ordering field is set, this field specifies the sorting direction. This property does not apply to block models
   */
  ordering_direction?: null | 'asc' | 'desc';
  /**
   * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field. This property does not apply to block models
   */
  ordering_meta?:
    | null
    | 'created_at'
    | 'updated_at'
    | 'first_published_at'
    | 'published_at';
  /**
   * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
   */
  has_singleton_item?: boolean;
  /**
   * A hint shown to editors to help them understand the purpose of this model/block model
   */
  hint?: string | null;
  /**
   * Whether inverse relationships fields are expressed in GraphQL or not. Must be false for block models
   */
  inverse_relationships_enabled?: boolean;
  ordering_field?: FieldData | null;
  presentation_title_field?: FieldData | null;
  presentation_image_field?: FieldData | null;
  title_field?: FieldData | null;
  image_preview_field?: FieldData | null;
  excerpt_field?: FieldData | null;
  workflow?: WorkflowData | null;
  meta?: {
    /**
     * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
     */
    has_singleton_item?: boolean;
  };
};
/**
 * DatoCMS offers a number of different fields that you can combine together to create a [Model](/docs/content-management-api/resources/item-type). Using the database metaphore, fields are like table columns, and when creating them you need to specify their type (`string`, `float`, etc.) and any required validation.
 *
 * ### Different field types require different settings
 *
 * When looking at a field resource, you have to pay attention to two particular properties, `validators` and `appearance`.
 *
 * The `validators` property expresses the set of validations to be performed server-side on a specific field value for it to be considered valid, while the `appearance` property lets you specify _how_ the field itself will be presented inside the form to the final editor.
 *
 * For both properties, the value to specify depends on the type of field itself. For example, you can add a "Limit character count" validation to a _Single-line string_ field, or set its appearence to "Show it as heading", but they won't be accepted for a ie. _Color_ field, as it supports different validations and appearance settings.
 *
 * ### Specifying validations
 *
 * The `validators` property requires an object whose keys are the validations that you want to be enforced, and the values are objects representing any settings that the validation itself requires. If the validation doesn't have additional settings, you just pass down an empty object.
 *
 * This is a valid example for a _Single-line string_ field:
 *
 * ```js
 * {
 *   "validators": {
 *     // "required" validator has no settings
 *     "required": {},
 *     // "length" validator requires "min" and/or "max" properties
 *     "length": { "min": 80 }
 *   }
 * }
 * ```
 *
 * 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 _Modular Content_ field needs to have a `rich_text_blocks` validator, specifying which types of blocks it can contain.
 *
 * ### Specifying the appearance
 *
 * The `appearance` property requires an object with three specific properties: `editor`, `parameters` and `addons`.
 *
 * The `editor` represents the type of editor that the users will see inside the form to change the value of this specific field. Depending on the type of field, DatoCMS offers a number of different editors for you to choose from. The `parameters` property is an object representing any additional settings that the editor itself might require.
 *
 * This is a valid example for a _Single-line string_ field:
 *
 * ```js
 * {
 *   "appearance": {
 *     // single_line is a DatoCMS built-in editor that you can use with single-line string fields
 *     "editor": "single_line",
 *     // each built-in editor has specific settings
 *     "parameters": { "heading": true, "placeholder": "My blog post title" },
 *     "addons": []
 *   },
 * }
 * ```
 *
 * Following you'll find a summary of all the editors available for each field type with their settings.
 *
 * #### Setting the appearance to a field editor provided by a plugin
 *
 * If the project contains a plugin that exposes [manual field editors](/docs/plugin-sdk/manual-field-extensions), you can also configure the field to be presented with it instead of using one of the built-in editors.
 *
 * In this case:
 *
 * - the `editor` property is the plugin's project-specific autogenerated UUID. You can get it from the last part of the plugin's URL within your project's Configuration screen (e.g. `https://your-project.admin.datocms.com/configuration/plugins/PLUGIN_UUID/`), or via API with a [List all plugins](/docs/content-management-api/resources/plugin/instances) call.
 * - the `field_extension` property must be the ID of the specific manual field editor that the plugin exposes. This is set in the plugin's own source code, within a `manualFieldExtension()` call in its entry point (usually something like `index.tsx`).
 * - the `parameters` property must provide a configuration object compatible with the [config screen of the manual field extension](/docs/plugin-sdk/manual-field-extensions#add-per-field-config-screens-to-manual-field-extensions), or an empty object if it doesn't require any configuration.
 *
 * ```js
 * {
 *   "appearance": {
 *     // "2132" is a the ID of a plugin exposing a manual field editor
 *     "editor": "2134",
 *     // "starRating" is a manual field editor exposed by the plugin
 *     "field_extension": "starRating",
 *     // this is a valid configuration for the "starRating" field editor
 *     "parameters": { "maxRating": 5, "starsColor": "#ff0000" },
 *     "addons": []
 *   },
 * }
 * ```
 *
 * #### Configuring manual field addons
 *
 * If the project contains plugins that expose [manual field addons](/docs/plugin-sdk/manual-field-extensions), you can also add them to the field via the `addons` property.
 *
 * ```js
 * {
 *   "appearance": {
 *     "editor": "single_line",
 *     "parameters": { "heading": true, "placeholder": "My blog post title" },
 *     "addons": [
 *       {
 *         // "2138" is a the ID of a plugin exposing a manual addon editor
 *         "id": "2138",
 *         // "loremIpsumGenerator" is a manual field addon exposed by the plugin
 *         "field_extension": "loremIpsumGenerator",
 *         // this is a valid configuration for the "loremIpsumGenerator" field addon
 *         "parameters": { "sentences": 2 },
 *       }
 *     ]
 *   },
 * }
 * ```
 *
 * ### Available field types
 *
 * <details>
 * <summary>Single-line string (<code>string</code>)</summary>
 *
 * | Property                       | Value                                                |
 * | ------------------------------ | ---------------------------------------------------- |
 * | Code                           | `string`                                             |
 * | Built-in editors for the field | `single_line`, `string_radio_group`, `string_select` |
 * | Available validators           | `required`, `unique`, `length`, `format`, `enum`     |
 *
 * </details>
 *
 * <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`, `sanitized_html` |
 *
 * </details>
 *
 * <details>
 * <summary>Boolean (<code>boolean</code>)</summary>
 *
 * | Property                       | Value                            |
 * | ------------------------------ | -------------------------------- |
 * | Code                           | `boolean`                        |
 * | Built-in editors for the field | `boolean`, `boolean_radio_group` |
 * | Available validators           | no validators available          |
 *
 * </details>
 *
 * <details>
 * <summary>Integer (<code>integer</code>)</summary>
 *
 * | Property                       | Value                      |
 * | ------------------------------ | -------------------------- |
 * | Code                           | `integer`                  |
 * | Built-in editors for the field | `integer`                  |
 * | Available validators           | `required`, `number_range` |
 *
 * </details>
 *
 * <details>
 * <summary>Float (<code>float</code>)</summary>
 *
 * | Property                       | Value                      |
 * | ------------------------------ | -------------------------- |
 * | Code                           | `float`                    |
 * | Built-in editors for the field | `float`                    |
 * | Available validators           | `required`, `number_range` |
 *
 * </details>
 *
 * <details>
 * <summary>Date (<code>date</code>)</summary>
 *
 * | Property                       | Value                    |
 * | ------------------------------ | ------------------------ |
 * | Code                           | `date`                   |
 * | Built-in editors for the field | `date_picker`            |
 * | Available validators           | `required`, `date_range` |
 *
 * </details>
 *
 * <details>
 * <summary>Date time (<code>date_time</code>)</summary>
 *
 * | Property                       | Value                         |
 * | ------------------------------ | ----------------------------- |
 * | Code                           | `date_time`                   |
 * | Built-in editors for the field | `date_time_picker`            |
 * | Available validators           | `required`, `date_time_range` |
 *
 * </details>
 *
 * <details>
 * <summary>Color (<code>color</code>)</summary>
 *
 * | Property                       | Value          |
 * | ------------------------------ | -------------- |
 * | Code                           | `color`        |
 * | Built-in editors for the field | `color_picker` |
 * | Available validators           | `required`     |
 *
 * </details>
 *
 * <details>
 * <summary>JSON (<code>json</code>)</summary>
 *
 * | Property                       | Value                                                  |
 * | ------------------------------ | ------------------------------------------------------ |
 * | Code                           | `json`                                                 |
 * | Built-in editors for the field | `json`, `string_multi_select`, `string_checkbox_group` |
 * | Available validators           | `required`                                             |
 *
 * </details>
 *
 * <details>
 * <summary>Location (<code>lat_lon</code>)</summary>
 *
 * | Property                       | Value      |
 * | ------------------------------ | ---------- |
 * | Code                           | `lat_lon`  |
 * | Built-in editors for the field | `map`      |
 * | Available validators           | `required` |
 *
 * </details>
 *
 * <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`, `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`                                                            |
 * | Available validators           | `required`, `unique`, `length`, `slug_format`, `slug_title_field` |
 *
 * </details>
 *
 * <details>
 * <summary>External video (<code>video</code>)</summary>
 *
 * | Property                       | Value      |
 * | ------------------------------ | ---------- |
 * | Code                           | `video`    |
 * | Built-in editors for the field | `video`    |
 * | Available validators           | `required` |
 *
 * </details>
 *
 * <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`, `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`, `image_aspect_ratio`, `extension`, `required_alt_title` |
 *
 * </details>
 *
 * <details>
 * <summary>Single link (<code>link</code>)</summary>
 *
 * | Property                       | Value                       |
 * | ------------------------------ | --------------------------- |
 * | Code                           | `link`                      |
 * | Built-in editors for the field | `link_select`, `link_embed` |
 * | Default `editor`               | `link_select`               |
 * | Required validators            | `item_item_type`            |
 * | Other validators available     | `required`, `unique`        |
 *
 * </details>
 *
 * <details>
 * <summary>Multiple links (<code>links</code>)</summary>
 *
 * | Property                       | Value                         |
 * | ------------------------------ | ----------------------------- |
 * | Code                           | `links`                       |
 * | Built-in editors for the field | `links_select`, `links_embed` |
 * | Default `editor`               | `links_select`                |
 * | Required validators            | `items_item_type`             |
 * | Other validators available     | `size`                        |
 *
 * </details>
 *
 * <details>
 * <summary>Modular content (<code>rich_text</code>)</summary>
 *
 * | Property                       | Value              |
 * | ------------------------------ | ------------------ |
 * | Code                           | `rich_text`        |
 * | Built-in editors for the field | `rich_text`        |
 * | Required validators            | `rich_text_blocks` |
 * | Other validators available     | `size`             |
 *
 * </details>
 *
 * <details>
 * <summary>Single Block (<code>single_block</code>)</summary>
 *
 * | Property                       | Value                                           |
 * | ------------------------------ | ----------------------------------------------- |
 * | Code                           | `single_block`                                  |
 * | Built-in editors for the field | `framed_single_block`, `frameless_single_block` |
 * | Required validators            | `single_block_blocks`                           |
 * | Other validators available     | `required`                                      |
 *
 * </details>
 *
 * <details>
 * <summary>Structured text (<code>structured_text</code>)</summary>
 *
 * | Property                       | Value                                                 |
 * | ------------------------------ | ----------------------------------------------------- |
 * | Code                           | `structured_text`                                     |
 * | Built-in editors for the field | `structured_text`                                     |
 * | Required validators            | `structured_text_blocks`, `structured_text_links`     |
 * | Other validators available     | `required`, `length`, `structured_text_inline_blocks` |
 *
 * </details>
 *
 * ### Validators
 *
 * <details>
 * <summary><code>date_range</code></summary>
 *
 * Accept dates only inside a specified date range.
 *
 * | Parameter | Type          | Required | Description  |
 * | --------- | ------------- | -------- | ------------ |
 * | `min`     | ISO 8601 date |          | Minimum date |
 * | `max`     | ISO 8601 date |          | Maximum date |
 *
 * At least one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>date_time_range</code></summary>
 *
 * Accept date times only inside a specified date range.
 *
 * | Parameter | Type              | Required | Description      |
 * | --------- | ----------------- | -------- | ---------------- |
 * | `min`     | ISO 8601 datetime |          | Minimum datetime |
 * | `max`     | ISO 8601 datetime |          | Maximum datetime |
 *
 * At least one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>enum</code></summary>
 *
 * Only accept a specific set of values
 *
 * | Parameter | Type            | Required | Description           |
 * | --------- | --------------- | -------- | --------------------- |
 * | `values`  | `Array<String>` | ✅        | Set of allowed values |
 *
 * </details>
 *
 * <details>
 * <summary><code>extension</code></summary>
 *
 * Only accept assets with specific file extensions.
 *
 * | Parameter         | Type                                                               | Required | Description                    |
 * | ----------------- | ------------------------------------------------------------------ | -------- | ------------------------------ |
 * | `extensions`      | `Array<String>`                                                    |          | Set of allowed file extensions |
 * | `predefined_list` | one of `"image"`, `"transformable_image"`, `"video"`, `"document"` |          | Allowed file type              |
 *
 * Only one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>file_size</code></summary>
 *
 * Accept assets only inside a specified date range.
 *
 * | Parameter   | Type                         | Required | Description                        |
 * | ----------- | ---------------------------- | -------- | ---------------------------------- |
 * | `min_value` | `Integer`                    |          | Numeric value for minimum filesize |
 * | `min_unit`  | one of `"B"`, `"KB"`, `"MB"` |          | Unit for minimum filesize          |
 * | `max_value` | `Integer`                    |          | Numeric value for maximum filesize |
 * | `max_unit`  | one of `"B"`, `"KB"`, `"MB"` |          | Unit for maximum filesize          |
 *
 * At least one couple of value/unit must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>format</code></summary>
 *
 * 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) |
 *
 * **Note:** Only one of `custom_pattern` or `predefined_pattern` should be specified.
 *
 * If `custom_pattern` is used, an additional `description` parameter can be provided to serve as a hint for the user. This hint offers a simple explanation of the expected pattern, such as `"The field must end with an 's'"`, instead of the default message like `"Field must match the pattern: /s$/"`.
 *
 * </details>
 *
 * <details>
 * <summary><code>slug_format</code></summary>
 *
 * Only accept slugs having a specific format.
 *
 * | Parameter            | Type             | Required | Description                        |
 * | -------------------- | ---------------- | -------- | ---------------------------------- |
 * | `custom_pattern`     | `Regexp`         |          | Regular expression to be validated |
 * | `predefined_pattern` | `"webpage_slug"` |          | Allowed format                     |
 *
 * Only one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>image_dimensions</code></summary>
 *
 * Accept assets only within a specified height and width range.
 *
 * | Parameter          | Type      | Required | Description                      |
 * | ------------------ | --------- | -------- | -------------------------------- |
 * | `width_min_value`  | `Integer` |          | Numeric value for minimum width  |
 * | `width_max_value`  | `Integer` |          | Numeric value for maximum height |
 * | `height_min_value` | `Integer` |          | Numeric value for minimum width  |
 * | `height_max_value` | `Integer` |          | Numeric value for maximum height |
 *
 * 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>
 *
 * <details>
 * <summary><code>item_item_type</code></summary>
 *
 * Only accept references to records of the specified models.
 *
 * | Parameter                                         | Type                                                                     | Required | Description                                                                                         |
 * | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
 * | `item_types`                                      | `Array<Model ID>`                                                        | ✅        | Set of allowed model IDs                                                                            |
 * | `on_publish_with_unpublished_references_strategy` | `"fail"`, `"publish_references"` (default value: `"fail"`)               |          | Strategy to apply when a publishing is requested and this field references some unpublished records |
 * | `on_reference_unpublish_strategy`                 | `"fail"`, `"unpublish"`, `"delete_references"` (default value: `"fail"`) |          | Strategy to apply when unpublishing is requested for a record referenced by this field              |
 * | `on_reference_delete_strategy`                    | `"fail"`, `"delete_references"` (default value: `"delete_references"`)   |          | Strategy to apply when deletion is requested for a record referenced by this field                  |
 *
 * Possible values for `on_publish_with_unpublished_references_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"publish_references"`: Publish also the referenced records
 *
 * Possible values for `on_reference_unpublish_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"unpublish"`: Unpublish also this record
 * - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
 *
 * Possible values for `on_reference_delete_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
 * </details>
 *
 * <details>
 * <summary><code>items_item_type</code></summary>
 *
 * Only accept references to records of the specified models.
 *
 * | Parameter                                         | Type                                                                     | Required | Description                                                                                         |
 * | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
 * | `item_types`                                      | `Array<Model ID>`                                                        | ✅        | Set of allowed model IDs                                                                            |
 * | `on_publish_with_unpublished_references_strategy` | `"fail"`, `"publish_references"` (default value: `"fail"`)               |          | Strategy to apply when a publishing is requested and this field references some unpublished records |
 * | `on_reference_unpublish_strategy`                 | `"fail"`, `"unpublish"`, `"delete_references"` (default value: `"fail"`) |          | Strategy to apply when unpublishing is requested for a record referenced by this field              |
 * | `on_reference_delete_strategy`                    | `"fail"`, `"delete_references"` (default value: `"delete_references"`)   |          | Strategy to apply when deletion is requested for a record referenced by this field                  |
 *
 * Possible values for `on_publish_with_unpublished_references_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"publish_references"`: Publish also the referenced records
 *
 * Possible values for `on_reference_unpublish_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"unpublish"`: Unpublish also this record
 * - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
 *
 * Possible values for `on_reference_delete_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
 * </details>
 *
 * <details>
 * <summary><code>length</code></summary>
 *
 * Accept strings only with a specified number of characters.
 *
 * | Parameter | Type      | Required | Description     |
 * | --------- | --------- | -------- | --------------- |
 * | `min`     | `Integer` |          | Minimum length  |
 * | `eq`      | `Integer` |          | Expected length |
 * | `max`     | `Integer` |          | Maximum length  |
 *
 * At least one parameter must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>number_range</code></summary>
 *
 * Accept numbers only inside a specified range.
 *
 * | Parameter | Type    | Required | Description   |
 * | --------- | ------- | -------- | ------------- |
 * | `min`     | `Float` |          | Minimum value |
 * | `max`     | `Float` |          | Maximum value |
 *
 * At least one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>required</code></summary>
 *
 * Value must be specified or it won't be valid.
 *
 * </details>
 *
 * <details>
 * <summary><code>required_alt_title</code></summary>
 *
 * Assets contained in the field are required to specify custom title or alternate text, or they won't be valid.
 *
 * | Parameter | Type      | Required | Description                                                |
 * | --------- | --------- | -------- | ---------------------------------------------------------- |
 * | `title`   | `Boolean` |          | Whether the title for the asset must be specified          |
 * | `alt`     | `Boolean` |          | Whether the alternate text for the asset must be specified |
 *
 * At least one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>required_seo_fields</code></summary>
 *
 * SEO field has to specify one or more properties, or it won't be valid.
 *
 * | Parameter      | Type      | Required | Description                                        |
 * | -------------- | --------- | -------- | -------------------------------------------------- |
 * | `title`        | `Boolean` |          | Whether the meta title must be specified           |
 * | `description`  | `Boolean` |          | Whether the meta description must be specified     |
 * | `image`        | `Boolean` |          | Whether the social sharing image must be specified |
 * | `twitter_card` | `Boolean` |          | Whether the type of Twitter card must be specified |
 *
 * At least one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>title_length</code></summary>
 *
 * Limits the length of the title for a SEO field. Search engines usually truncate title tags to 60 character so it is a good practice to keep the title around this length.
 *
 * | Parameter | Type      | Required | Description   |
 * | --------- | --------- | -------- | ------------- |
 * | `min`     | `Integer` |          | Minimum value |
 * | `max`     | `Integer` |          | Maximum value |
 *
 * At least one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>description_length</code></summary>
 *
 * Limits the length of the description for a SEO field. Search engines usually truncate description tags to 160 character so it is a good practice to keep the description around this length.
 *
 * | Parameter | Type      | Required | Description   |
 * | --------- | --------- | -------- | ------------- |
 * | `min`     | `Integer` |          | Minimum value |
 * | `max`     | `Integer` |          | Maximum value |
 *
 * At least one of the parameters must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>rich_text_blocks</code></summary>
 *
 * Only accept references to block records of the specified block models.
 *
 * | Parameter    | Type                    | Required | Description                    |
 * | ------------ | ----------------------- | -------- | ------------------------------ |
 * | `item_types` | `Array<Block Model ID>` | ✅        | Set of allowed Block Model IDs |
 *
 * </details>
 *
 * <details>
 * <summary><code>single_block_blocks</code></summary>
 *
 * Only accept references to block records of the specified block models.
 *
 * | Parameter    | Type                    | Required | Description                    |
 * | ------------ | ----------------------- | -------- | ------------------------------ |
 * | `item_types` | `Array<Block Model ID>` | ✅        | Set of allowed Block Model IDs |
 *
 * </details>
 *
 * <details>
 * <summary><code>sanitized_html</code></summary>
 *
 * Checks for the presence of malicious code in HTML fields: content is valid if no dangerous code is present.
 *
 * | Parameter                    | Type      | Required | Description                                                  |
 * | ---------------------------- | --------- | -------- | ------------------------------------------------------------ |
 * | `sanitize_before_validation` | `Boolean` | ✅        | Content is actively sanitized before applying the validation |
 *
 * </details>
 *
 * <details>
 * <summary><code>structured_text_blocks</code></summary>
 *
 * Only accept references to block records of the specified block models.
 *
 * | Parameter    | Type                    | Required | Description                    |
 * | ------------ | ----------------------- | -------- | ------------------------------ |
 * | `item_types` | `Array<Block Model ID>` | ✅        | Set of allowed Block Model IDs |
 *
 * </details>
 *
 * <details>
 * <summary><code>structured_text_inline_blocks</code></summary>
 *
 * Only accept references to block records of the specified block models.
 *
 * | Parameter    | Type                    | Required | Description                    |
 * | ------------ | ----------------------- | -------- | ------------------------------ |
 * | `item_types` | `Array<Block Model ID>` | ✅        | Set of allowed Block Model IDs |
 *
 * </details>
 *
 * <details>
 * <summary><code>structured_text_links</code></summary>
 *
 * Only accept `itemLink` to `inlineItem` nodes for records of the specified models.
 *
 * | Parameter                                         | Type                                                                                  | Required | Description                                                                                         |
 * | ------------------------------------------------- | ------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
 * | `item_types`                                      | `Array<Model ID>`                                                                     | ✅        | Set of allowed model IDs                                                                            |
 * | `on_publish_with_unpublished_references_strategy` | `"fail"`, `"publish_references"` (default value: `"fail"`)                            |          | Strategy to apply when a publishing is requested and this field references some unpublished records |
 * | `on_reference_unpublish_strategy`                 | `"fail"`, `"unpublish"`, `"delete_references"` (default value: `"delete_references"`) |          | Strategy to apply when unpublishing is requested for a record referenced by this field              |
 * | `on_reference_delete_strategy`                    | `"fail"`, `"delete_references"` (default value: `"delete_references"`)                |          | Strategy to apply when deletion is requested for a record referenced by this field                  |
 *
 * Possible values for `on_publish_with_unpublished_references_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"publish_references"`: Publish also the referenced records
 *
 * Possible values for `on_reference_unpublish_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"unpublish"`: Unpublish also this record
 * - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
 *
 * Possible values for `on_reference_delete_strategy`:
 *
 * - `"fail"`: Fail the operation and notify the user
 * - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
 * </details>
 *
 * <details>
 * <summary><code>size</code></summary>
 *
 * Only accept a number of items within the specified range.
 *
 * | Parameter     | Type      | Required | Description                                        |
 * | ------------- | --------- | -------- | -------------------------------------------------- |
 * | `min`         | `Integer` |          | Minimum length                                     |
 * | `eq`          | `Integer` |          | Expected length                                    |
 * | `max`         | `Integer` |          | Maximum length                                     |
 * | `multiple_of` | `Integer` |          | The number of items must be multiple of this value |
 *
 * At least one parameter must be specified.
 *
 * </details>
 *
 * <details>
 * <summary><code>slug_title_field</code></summary>
 *
 * Specifies the ID of the _Single-line string_ field that will be used to generate the slug
 *
 * | Parameter        | Type       | Required | Description                                      |
 * | ---------------- | ---------- | -------- | ------------------------------------------------ |
 * | `title_field_id` | `Field ID` | ✅        | The field that will be used to generate the slug |
 *
 * </details>
 *
 * <details>
 * <summary><code>unique</code></summary>
 *
 * The value must be unique across the whole collection of records.
 *
 * </details>
 *
 * ### Configuration parameters for DatoCMS built-in field editors
 *
 * If a field editor is not specified in this table, just pass an empty object `{}` as its configuration parameters.
 *
 * <details>
 * <summary><code>boolean_radio_group</code></summary>
 *
 * Radio group input for _boolean_ fields.
 *
 * | Parameter        | Type                               | Required | Description                               |
 * | ---------------- | ---------------------------------- | -------- | ----------------------------------------- |
 * | `positive_radio` | `{ label: string, hint?: string }` | ✅        | Radio input for positive choice (`true`)  |
 * | `negative_radio` | `{ label: string, hint?: string }` | ✅        | Radio input for negative choice (`false`) |
 *
 * </details>
 *
 * <details>
 * <summary><code>string_radio_group</code></summary>
 *
 * Radio group input for _string_ fields.
 *
 * | Parameter | Type                                                     | Required | Description                 |
 * | --------- | -------------------------------------------------------- | -------- | --------------------------- |
 * | `radios`  | `Array<{ label: string, value: string, hint?: string }>` | ✅        | The different radio options |
 *
 * </details>
 *
 * <details>
 * <summary><code>string_select</code></summary>
 *
 * Select input for _string_ fields.
 *
 * | Parameter | Type                                                     | Required | Description                  |
 * | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
 * | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅        | The different select options |
 *
 * </details>
 *
 * <details>
 * <summary><code>string_multi_select</code></summary>
 *
 * Select input for _JSON_ fields, to edit an array of strings.
 *
 * | Parameter | Type                                                     | Required | Description                  |
 * | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
 * | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅        | The different select options |
 *
 * </details>
 *
 * <details>
 * <summary><code>string_checkbox_group</code></summary>
 *
 * Multiple chechboxes input for _JSON_ fields, to edit an array of strings.
 *
 * | Parameter | Type                                                     | Required | Description                  |
 * | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
 * | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅        | The different select options |
 *
 * </details>
 *
 * <details>
 * <summary><code>single_line</code></summary>
 *
 * Simple textual input for _Single-line string_ fields.
 *
 * | Parameter     | Type      | Required | Description                                                                                |
 * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
 * | `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>
 *
 * <details>
 * <summary><code>markdown</code></summary>
 *
 * Markdown editor for _Multiple-paragraph text_ fields.
 *
 * | Parameter | Type            | Required | Description                                                                                                                                                                                                       |
 * | --------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 * | `toolbar` | `Array<String>` | ✅        | Specify which buttons the toolbar should have. Valid values: `"heading"`, `"bold"`, `"italic"`, `"strikethrough"`, `"code"`, `"unordered_list"`, `"ordered_list"`, `"quote"`, `"link"`, `"image"`, `"fullscreen"` |
 *
 * </details>
 *
 * <details>
 * <summary><code>wysiwyg</code></summary>
 *
 * HTML editor for _Multiple-paragraph text_ fields.
 *
 * | Parameter | Type            | Required | Description                                                                                                                                                                                                                                                                                                                                                     |
 * | --------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 * | `toolbar` | `Array<String>` | ✅        | Specify which buttons the toolbar should have. Valid values: `"format"`, `"bold"`, `"italic"`, `"strikethrough"`, `"code"`, `"ordered_list"`, `"unordered_list"`, `"quote"`, `"table"`, `"link"`, `"image"`, `"show_source"`, `"undo"`, `"redo"`, `"align_left"`, `"align_center"`, `"align_right"`, `"align_justify"`, `"outdent"`, `"indent"`, `"fullscreen"` |
 *
 * </details>
 *
 * <details>
 * <summary><code>textarea</code></summary>
 *
 * Basic textarea editor for _Multiple-paragraph text_ fields.
 *
 * | Parameter     | Type     | Required | Description                                                                                |
 * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
 * | `placeholder` | `String` |          | A placeholder that will be shown in the editor's input to provide editors with an example. |
 *
 * </details>
 *
 * <details>
 * <summary><code>color_picker</code></summary>
 *
 * Built-in editor for _Color_ fields.
 *
 * | Parameter       | Type                      | Required | Description                                               |
 * | --------------- | ------------------------- | -------- | --------------------------------------------------------- |
 * | `enable_alpha`  | `Boolean`                 | ✅        | Should the color picker allow to specify the alpha value? |
 * | `preset_colors` | `Array<Hex color string>` | ✅        | List of preset colors to offer to the user                |
 *
 * </details>
 *
 * <details>
 * <summary><code>slug</code></summary>
 *
 * Built-in editor for _Slug_ fields.
 *
 * | Parameter     | Type     | Required | Description                                                                                |
 * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
 * | `url_prefix`  | `String` |          | A prefix that will be shown in the editor's form to give some context to your editors.     |
 * | `placeholder` | `String` |          | A placeholder that will be shown in the editor's input to provide editors with an example. |
 *
 * </details>
 *
 * <details>
 * <summary><code>seo</code></summary>
 *
 * Built-in editor for _seo_ fields.
 *
 * | Parameter  | Type            | Required | Description                                                                                                                                                   |
 * | ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 * | `fields`   | `Array<String>` | ✅        | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"`       |
 * | `previews` | `Array<String>` | ✅        | Specify which previews should be visible to editors. Valid values: `"google"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"`, `"linkedin"` |
 *
 * </details>
 *
 * <details>
 * <summary><code>rich_text</code></summary>
 *
 * Built-in editor for _Modular content_ fields.
 *
 * | Parameter         | Type      | Required | Description                                                |
 * | ----------------- | --------- | -------- | ---------------------------------------------------------- |
 * | `start_collapsed` | `Boolean` |          | Whether you want block records collapsed by default or not |
 *
 * </details>
 *
 * <details>
 * <summary><code>framed_single_block</code></summary>
 *
 * Built-in editor for _Single block_ fields.
 *
 * | Parameter         | Type      | Required | Description                                               |
 * | ----------------- | --------- | -------- | --------------------------------------------------------- |
 * | `start_collapsed` | `Boolean` |          | Whether you want block record collapsed by default or not |
 *
 * </details>
 *
 * <details>
 * <summary><code>structured_text</code></summary>
 *
 * Built-in editor for _Structured text_ fields.
 *
 * | Parameter                 | Type             | Required | Description                                                                                                                                   |
 * | ------------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
 * | `nodes`                   | `Array<String>`  | ✅        | Specify which nodes the field should allow. Valid values: `"blockquote"`, `"code"`, `"heading"`, `"link"`, `"list"`, `"thematicBreak"`        |
 * | `marks`                   | `Array<String>`  | ✅        | Specify which marks the field should allow. Valid values: `"strong"`, `"emphasis"`, `"underline"`, `"strikethrough"`, `"code"`, `"highlight"` |
 * | `heading_levels`          | `Array<Integer>` | ✅        | If `nodes` includes `"heading"`, specify which heading levels the field should allow. Valid values: numbers between 1 and 6                   |
 * | `blocks_start_collapsed`  | `Boolean`        |          | Whether you want block nodes collapsed by default or not                                                                                      |
 * | `show_links_target_blank` | `Boolean`        |          | Whether you want to show the "Open this link in a new tab?" checkbox, that fills in the `target: "_blank"` meta attribute for links           |
 * | `show_links_meta_editor`  | `Boolean`        |          | Whether you want to show the complete meta editor for links                                                                                   |
 *
 * </details>
 *
 * <details>
 * <summary><code>link_select</code> and <code>links_select</code></summary>
 *
 * Use a select input with auto-completion to pick the records to reference inside the field.
 *
 * </details>
 *
 * <details>
 * <summary><code>link_embed</code> and <code>links_embed</code></summary>
 *
 * Use an expanded view with records' image preview to pick the records to reference inside the field.
 *
 * </details>
 *
 * <details>
 * <summary><code>integer</code></summary>
 *
 * Built-in editor for _Integer_ fields.
 *
 * | Parameter     | Type     | Required | Description                                                                                |
 * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
 * | `placeholder` | `String` |          | A placeholder that will be shown in the editor's input to provide editors with an example. |
 *
 * </details>
 *
 * <details>
 * <summary><code>float</code></summary>
 *
 * Built-in editor for _Float_ fields.
 *
 * | Parameter     | Type     | Required | Description                                                                                |
 * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
 * | `placeholder` | `String` |          | A placeholder that will be shown in the editor's input to provide editors with an example. |
 *
 * </details>
 *
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "field".
 */
export type FieldStableShell = {
  id: FieldIdentity;
  type: FieldType;
  /**
   * The label of the field
   */
  label: string;
  /**
   * Type of input
   */
  field_type:
    | 'boolean'
    | 'color'
    | 'date'
    | 'date_time'
    | 'file'
    | 'float'
    | 'gallery'
    | 'integer'
    | 'json'
    | 'lat_lon'
    | 'link'
    | 'links'
    | 'rich_text'
    | 'seo'
    | 'single_block'
    | 'slug'
    | 'string'
    | 'structured_text'
    | 'text'
    | 'video';
  /**
   * Whether the field needs to be multilanguage or not
   */
  localized: boolean;
  /**
   * Default value for Field. When field is localized accepts an object of default values with site locales as keys
   */
  default_value:
    | boolean
    | null
    | string
    | number
    | {
        [k: string]: unknown;
      };
  /**
   * Field API key
   */
  api_key: string;
  /**
   * Field hint
   */
  hint: string | null;
  /**
   * Optional field validations
   */
  validators: {
    [k: string]: unknown;
  };
  /**
   * Field appearance
   */
  appeareance?: {
    editor: string;
    parameters: {
      [k: string]: unknown;
    };
    [k: string]: unknown;
  };
  /**
   * Field appearance details, plugin configuration and field add-ons
   */
  appearance: {
    /**
     * A valid editor can be a DatoCMS default field editor type (ie. `"single_line"`), or a plugin ID offering a custom field editor
     */
    editor: string;
    /**
     * The specific field extension to use for the field (only if the editor is a modern plugin)
     */
    field_extension?: string;
    /**
     * The editor plugin's parameters
     */
    parameters: {
      [k: string]: unknown;
    };
    /**
     * An array of add-on plugins with id and parameters
     */
    addons: {
      /**
       * The ID of a plugin offering a field addon
       */
      id: string;
      /**
       * The specific field extension to use for the field (only if the editor is a modern plugin)
       */
      field_extension?: string;
      parameters: {
        [k: string]: unknown;
      };
      [k: string]: unknown;
    }[];
  };
  /**
   * Ordering index
   */
  position: number;
  /**
   * Whether deep filtering for block models is enabled in GraphQL or not
   */
  deep_filtering_enabled: boolean;
  item_type: ItemTypeData;
  fieldset: null | FieldsetData;
};
export type FieldCreateJobSchema = Field;
export type FieldUpdateJobSchema = Field;
export type FieldSelfTargetSchema = Field;
export type FieldDestroyJobSchema = Field;
export type FieldDuplicateJobSchema = Field;
/**
 * JSON API attributes
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type FieldAttributesStableShell = {
  /**
   * The label of the field
   */
  label: string;
  /**
   * Type of input
   */
  field_type:
    | 'boolean'
    | 'color'
    | 'date'
    | 'date_time'
    | 'file'
    | 'float'
    | 'gallery'
    | 'integer'
    | 'json'
    | 'lat_lon'
    | 'link'
    | 'links'
    | 'rich_text'
    | 'seo'
    | 'single_block'
    | 'slug'
    | 'string'
    | 'structured_text'
    | 'text'
    | 'video';
  /**
   * Whether the field needs to be multilanguage or not
   */
  localized: boolean;
  /**
   * Default value for Field. When field is localized accepts an object of default values with site locales as keys
   */
  default_value:
    | boolean
    | null
    | string
    | number
    | {
        [k: string]: unknown;
      };
  /**
   * Field API key
   */
  api_key: string;
  /**
   * Field hint
   */
  hint: string | null;
  /**
   * Optional field validations
   */
  validators: {
    [k: string]: unknown;
  };
  /**
   * Field appearance
   */
  appeareance?: {
    editor: string;
    parameters: {
      [k: string]: unknown;
    };
    [k: string]: unknown;
  };
  /**
   * Field appearance details, plugin configuration and field add-ons
   */
  appearance: {
    /**
     * A valid editor can be a DatoCMS default field editor type (ie. `"single_line"`), or a plugin ID offering a custom field editor
     */
    editor: string;
    /**
     * The specific field extension to use for the field (only if the editor is a modern plugin)
     */
    field_extension?: string;
    /**
     * The editor plugin's parameters
     */
    parameters: {
      [k: string]: unknown;
    };
    /**
     * An array of add-on plugins with id and parameters
     */
    addons: {
      /**
       * The ID of a plugin offering a field addon
       */
      id: string;
      /**
       * The specific field extension to use for the field (only if the editor is a modern plugin)
       */
      field_extension?: string;
      parameters: {
        [k: string]: unknown;
      };
      [k: string]: unknown;
    }[];
  };
  /**
   * Ordering index
   */
  position: number;
  /**
   * Whether deep filtering for block models is enabled in GraphQL or not
   */
  deep_filtering_enabled: boolean;
};
/**
 * JSON API links
 *
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type FieldRelationships = {
  item_type: ItemTypeData;
  fieldset: null | FieldsetData;
};
/**
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `create.schema` link.
 */
export type FieldCreateSchemaStableShell = {
  id?: FieldIdentity;
  type?: FieldType;
  /**
   * The label of the field
   */
  label: string;
  /**
   * Type of input
   */
  field_type:
    | 'boolean'
    | 'color'
    | 'date'
    | 'date_time'
    | 'file'
    | 'float'
    | 'gallery'
    | 'integer'
    | 'json'
    | 'lat_lon'
    | 'link'
    | 'links'
    | 'rich_text'
    | 'seo'
    | 'single_block'
    | 'slug'
    | 'string'
    | 'structured_text'
    | 'text'
    | 'video';
  /**
   * Field API key
   */
  api_key: string;
  /**
   * Whether the field needs to be multilanguage or not
   */
  localized?: boolean;
  /**
   * Optional field validations
   */
  validators?: {
    [k: string]: unknown;
  };
  /**
   * Field appearance
   */
  appeareance?: {
    editor: string;
    parameters: {
      [k: string]: unknown;
    };
    [k: string]: unknown;
  };
  /**
   * Field appearance details, plugin configuration and field add-ons
   */
  appearance?: {
    /**
     * A valid editor can be a DatoCMS default field editor type (ie. `"single_line"`), or a plugin ID offering a custom field editor
     */
    editor: string;
    /**
     * The specific field extension to use for the field (only if the editor is a modern plugin)
     */
    field_extension?: string;
    /**
     * The editor plugin's parameters
     */
    parameters: {
      [k: string]: unknown;
    };
    /**
     * An array of add-on plugins with id and parameters
     */
    addons: {
      /**
       * The ID of a plugin offering a field addon
       */
      id: string;
      /**
       * The specific field extension to use for the field (only if the editor is a modern plugin)
       */
      field_extension?: string;
      parameters: {
        [k: string]: unknown;
      };
      [k: string]: unknown;
    }[];
  };
  /**
   * Ordering index
   */
  position?: number;
  /**
   * Field hint
   */
  hint?: string | null;
  /**
   * Default value for Field. When field is localized accepts an object of default values with site locales as keys
   */
  default_value?:
    | boolean
    | null
    | string
    | number
    | {
        [k: string]: unknown;
      };
  /**
   * Whether deep filtering for block models is enabled in GraphQL or not
   */
  deep_filtering_enabled?: boolean;
  fieldset?: null | FieldsetData;
};
/**
 * This interface was referenced by `Field`'s JSON-Schema
 * via the `update.schema` link.
 */
export type FieldUpdateSchemaStableShell = {
  id?: FieldIdentity;
  type?: FieldType;
  /**
   * Default value for Field. When field is localized accepts an object of default values with site locales as keys
   */
  default_value?:
    | boolean
    | null
    | string
    | number
    | {
        [k: string]: unknown;
      };
  /**
   * The label of the field
   */
  label?: string;
  /**
   * Field API key
   */
  api_key?: string;
  /**
   * Whether the field needs to be multilanguage or not
   */
  localized?: boolean;
  /**
   * Optional field validations
   */
  validators?: {
    [k: string]: unknown;
  };
  /**
   * Field appearance
   */
  appeareance?: {
    editor: string;
    parameters: {
      [k: string]: unknown;
    };
    [k: string]: unknown;
  };
  /**
   * Field appearance details, plugin configuration and field add-ons
   */
  appearance?: {
    /**
     * A valid editor can be a DatoCMS default field editor type (ie. `"single_line"`), or a plugin ID offering a custom field editor
     */
    editor: string;
    /**
     * The specific field extension to use for the field (only if the editor is a modern plugin)
     */
    field_extension?: string;
    /**
     * The editor plugin's parameters
     */
    parameters: {
      [k: string]: unknown;
    };
    /**
     * An array of add-on plugins with id and parameters
     */
    addons: {
      /**
       * The ID of a plugin offering a field addon
       */
      id: string;
      /**
       * The specific field extension to use for the field (only if the editor is a modern plugin)
       */
      field_extension?: string;
      parameters: {
        [k: string]: unknown;
      };
      [k: string]: unknown;
    }[];
  };
  /**
   * Ordering index
   */
  position?: number;
  /**
   * Type of input
   */
  field_type?:
    | 'boolean'
    | 'color'
    | 'date'
    | 'date_time'
    | 'file'
    | 'float'
    | 'gallery'
    | 'integer'
    | 'json'
    | 'lat_lon'
    | 'link'
    | 'links'
    | 'rich_text'
    | 'seo'
    | 'single_block'
    | 'slug'
    | 'string'
    | 'structured_text'
    | 'text'
    | 'video';
  /**
   * Field hint
   */
  hint?: string | null;
  /**
   * Whether deep filtering for block models is enabled in GraphQL or not
   */
  deep_filtering_enabled?: boolean;
  fieldset?: null | FieldsetData;
};
/**
 * Fields can be organized and grouped into fieldset to better present them to editors.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "fieldset".
 */
export type Fieldset = {
  id: FieldsetIdentity;
  type: FieldsetType;
  /**
   * The title of the fieldset
   */
  title: string;
  /**
   * Description/contextual hint for the fieldset
   */
  hint: string | null;
  /**
   * Whether the fieldset can be collapsed or not
   */
  collapsible: boolean;
  /**
   * When fieldset is collapsible, determines if the default is to start collapsed or not
   */
  start_collapsed: boolean;
  /**
   * Ordering index
   */
  position: number;
  item_type: ItemTypeData;
};
export type FieldsetCreateTargetSchema = Fieldset;
export type FieldsetUpdateTargetSchema = Fieldset;
export type FieldsetSelfTargetSchema = Fieldset;
export type FieldsetDestroyTargetSchema = Fieldset;
/**
 * JSON API attributes
 *
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type FieldsetAttributes = {
  /**
   * The title of the fieldset
   */
  title: string;
  /**
   * Description/contextual hint for the fieldset
   */
  hint: string | null;
  /**
   * Whether the fieldset can be collapsed or not
   */
  collapsible: boolean;
  /**
   * When fieldset is collapsible, determines if the default is to start collapsed or not
   */
  start_collapsed: boolean;
  /**
   * Ordering index
   */
  position: number;
};
/**
 * JSON API links
 *
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type FieldsetRelationships = {
  item_type: ItemTypeData;
};
/**
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `create.schema` link.
 */
export type FieldsetCreateSchema = {
  id?: FieldsetIdentity;
  type?: FieldsetType;
  /**
   * The title of the fieldset
   */
  title: string;
  /**
   * Description/contextual hint for the fieldset
   */
  hint?: string | null;
  /**
   * Ordering index
   */
  position?: number;
  /**
   * Whether the fieldset can be collapsed or not
   */
  collapsible?: boolean;
  /**
   * When fieldset is collapsible, determines if the default is to start collapsed or not
   */
  start_collapsed?: boolean;
};
/**
 * This interface was referenced by `Fieldset`'s JSON-Schema
 * via the `update.schema` link.
 */
export type FieldsetUpdateSchema = {
  id?: FieldsetIdentity;
  type?: FieldsetType;
  /**
   * The title of the fieldset
   */
  title?: string;
  /**
   * Description/contextual hint for the fieldset
   */
  hint?: string | null;
  /**
   * Ordering index
   */
  position?: number;
  /**
   * Whether the fieldset can be collapsed or not
   */
  collapsible?: boolean;
  /**
   * When fieldset is collapsible, determines if the default is to start collapsed or not
   */
  start_collapsed?: boolean;
};
/**
 * A session is required to access to read-and-write API endpoints
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "session".
 */
export type Session = {
  id: SessionIdentity;
  type: SessionType;
  user:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
};
export type SessionCreateTargetSchema = Session;
/**
 * JSON API data
 *
 * This interface was referenced by `Session`'s JSON-Schema
 * via the `definition` "data".
 */
export type SessionData = {
  type: SessionType;
  id: SessionIdentity;
};
/**
 * JSON API links
 *
 * This interface was referenced by `Session`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SessionRelationships = {
  user:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
};
/**
 * This interface was referenced by `Session`'s JSON-Schema
 * via the `create.schema` link.
 */
export type SessionCreateSchema = {
  type?: 'email_credentials';
  /**
   * Email
   */
  email: string;
  /**
   * Password
   */
  password: string;
  /**
   * Two-factor authentication one-time password
   */
  otp_code?: string;
};
/**
 * Plugins enable developers to replace DatoCMS field components with HTML5 applications so the editing experiences of the DatoCMS web app can be customized.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "plugin".
 */
export type Plugin = {
  id: PluginIdentity;
  type: PluginType;
  /**
   * The name of the plugin
   */
  name: string;
  /**
   * A description of the plugin
   */
  description: null | string;
  /**
   * NPM package name of the plugin (or null if it's a private plugin)
   */
  package_name: null | string;
  /**
   * The installed version of the plugin (or null if it's a private plugin)
   */
  package_version: null | string;
  /**
   * The entry point URL of the plugin
   */
  url: string;
  /**
   * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits.
   */
  parameters: {
    [k: string]: unknown;
  };
  /**
   * Permissions granted to this plugin
   */
  permissions: 'currentUserAccessToken'[];
  /**
   * The type of field extension a legacy plugin implements
   */
  plugin_type: 'field_editor' | 'sidebar' | 'field_addon' | null;
  /**
   * On which types of field in which a legacy plugin can be used
   */
  field_types:
    | null
    | (
        | 'boolean'
        | 'date'
        | 'date_time'
        | 'float'
        | 'integer'
        | 'string'
        | 'text'
        | 'lat_lon'
        | 'json'
        | 'seo'
        | 'link'
        | 'links'
        | 'video'
        | 'color'
        | 'slug'
        | 'rich_text'
        | 'file'
        | 'gallery'
      )[];
  /**
   * The schema for the parameters a legacy plugin can persist
   */
  parameter_definitions: null | {
    global: unknown[];
    instance: unknown[];
  };
  meta: PluginMeta;
};
export type PluginCreateTargetSchema = Plugin;
export type PluginUpdateTargetSchema = Plugin;
export type PluginSelfTargetSchema = Plugin;
export type PluginDestroyTargetSchema = Plugin;
/**
 * JSON API meta
 *
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `definition` "meta".
 */
export type PluginMeta = {
  /**
   * Version of the plugin. Legacy plugins are v1, new plugins are v2
   */
  version: string;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `definition` "data".
 */
export type PluginData = {
  type: PluginType;
  id: PluginIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type PluginAttributes = {
  /**
   * The name of the plugin
   */
  name: string;
  /**
   * A description of the plugin
   */
  description: null | string;
  /**
   * NPM package name of the plugin (or null if it's a private plugin)
   */
  package_name: null | string;
  /**
   * The installed version of the plugin (or null if it's a private plugin)
   */
  package_version: null | string;
  /**
   * The entry point URL of the plugin
   */
  url: string;
  /**
   * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits.
   */
  parameters: {
    [k: string]: unknown;
  };
  /**
   * Permissions granted to this plugin
   */
  permissions: 'currentUserAccessToken'[];
  /**
   * The type of field extension a legacy plugin implements
   */
  plugin_type: 'field_editor' | 'sidebar' | 'field_addon' | null;
  /**
   * On which types of field in which a legacy plugin can be used
   */
  field_types:
    | null
    | (
        | 'boolean'
        | 'date'
        | 'date_time'
        | 'float'
        | 'integer'
        | 'string'
        | 'text'
        | 'lat_lon'
        | 'json'
        | 'seo'
        | 'link'
        | 'links'
        | 'video'
        | 'color'
        | 'slug'
        | 'rich_text'
        | 'file'
        | 'gallery'
      )[];
  /**
   * The schema for the parameters a legacy plugin can persist
   */
  parameter_definitions: null | {
    global: unknown[];
    instance: unknown[];
  };
};
/**
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `create.schema` link.
 */
export type PluginCreateSchema = {
  id?: PluginIdentity;
  type?: PluginType;
  /**
   * NPM package name of the public plugin you want to install. For public plugins, that's the only attribute you need to pass.
   */
  package_name?: null | string;
  /**
   * The name of the plugin. Only to be passed if package name key is not specified.
   */
  name?: string;
  /**
   * A description of the plugin. Only to be passed if package name key is not specified.
   */
  description?: null | string;
  /**
   * The entry point URL of the plugin. Only to be passed if package name key is not specified.
   */
  url?: string;
  /**
   * Permissions granted to this plugin. Only to be passed if package name key is not specified.
   */
  permissions?: 'currentUserAccessToken'[];
  /**
   * The type of field extension this legacy plugin implements. Only to be passed if package name key is not specified.
   */
  plugin_type?: 'field_editor' | 'sidebar' | 'field_addon';
  /**
   * On which types of field in which this legacy plugin can be used. Only to be passed if package name key is not specified.
   */
  field_types?: (
    | 'boolean'
    | 'date'
    | 'date_time'
    | 'float'
    | 'integer'
    | 'string'
    | 'text'
    | 'lat_lon'
    | 'json'
    | 'seo'
    | 'link'
    | 'links'
    | 'video'
    | 'color'
    | 'slug'
    | 'rich_text'
    | 'file'
    | 'gallery'
  )[];
  /**
   * The schema for the parameters this legacy plugin can persist
   */
  parameter_definitions?: {
    global: unknown[];
    instance: unknown[];
  };
  /**
   * NPM version of the plugin
   */
  package_version?: null | string;
};
/**
 * This interface was referenced by `Plugin`'s JSON-Schema
 * via the `update.schema` link.
 */
export type PluginUpdateSchema = {
  id?: PluginIdentity;
  type?: PluginType;
  /**
   * The name of the plugin
   */
  name?: string;
  /**
   * A description of the plugin
   */
  description?: null | string;
  /**
   * The entry point URL of the plugin
   */
  url?: string;
  /**
   * Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits.
   */
  parameters?: {
    [k: string]: unknown;
  };
  /**
   * The installed version of the plugin (or null if it's a private plugin)
   */
  package_version?: null | string;
  /**
   * Permissions granted to this plugin
   */
  permissions?: 'currentUserAccessToken'[];
  meta?: {
    [k: string]: unknown;
  };
};
/**
 * Some API endpoint give results asynchronously, returning the ID of a job.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "job_result".
 */
export type JobResult = {
  id: JobResultIdentity;
  type: JobResultType;
  /**
   * Status of delayed HTTP response
   */
  status: number;
  /**
   * JSON API response of the HTTP request
   */
  payload: null | {
    [k: string]: unknown;
  };
};
export type JobResultSelfTargetSchema = JobResult;
/**
 * JSON API data
 *
 * This interface was referenced by `JobResult`'s JSON-Schema
 * via the `definition` "data".
 */
export type JobResultData = {
  type: JobResultType;
  id: JobResultIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `JobResult`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type JobResultAttributes = {
  /**
   * Status of delayed HTTP response
   */
  status: number;
  /**
   * JSON API response of the HTTP request
   */
  payload: null | {
    [k: string]: unknown;
  };
};
/**
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "subscription_limit".
 */
export type SubscriptionLimit = {
  id: SubscriptionLimitIdentity;
  type: SubscriptionLimitType;
  /**
   * The codename for the limit
   */
  code: string;
  /**
   * Current usage
   */
  usage: number;
  /**
   * The actual limit
   */
  limit: number | null;
};
export type SubscriptionLimitSelfTargetSchema = SubscriptionLimit;
/**
 * JSON API data
 *
 * This interface was referenced by `SubscriptionLimit`'s JSON-Schema
 * via the `definition` "data".
 */
export type SubscriptionLimitData = {
  type: SubscriptionLimitType;
  id: SubscriptionLimitIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SubscriptionLimit`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SubscriptionLimitAttributes = {
  /**
   * The codename for the limit
   */
  code: string;
  /**
   * Current usage
   */
  usage: number;
  /**
   * The actual limit
   */
  limit: number | null;
};
/**
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "subscription_feature".
 */
export type SubscriptionFeature = {
  id: SubscriptionFeatureIdentity;
  type: SubscriptionFeatureType;
  /**
   * The codename for the feature
   */
  code: string;
  /**
   * Whether the project is currently using the feature
   */
  in_use?: boolean;
  /**
   * Whether the feature is available on the current project
   */
  enabled: boolean;
};
/**
 * JSON API data
 *
 * This interface was referenced by `SubscriptionFeature`'s JSON-Schema
 * via the `definition` "data".
 */
export type SubscriptionFeatureData = {
  type: SubscriptionFeatureType;
  id: SubscriptionFeatureIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SubscriptionFeature`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SubscriptionFeatureAttributes = {
  /**
   * The codename for the feature
   */
  code: string;
  /**
   * Whether the project is currently using the feature
   */
  in_use?: boolean;
  /**
   * Whether the feature is available on the current project
   */
  enabled: boolean;
};
/**
 * Represents an event occurred during the deploy process of a build trigger.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "build_event".
 */
export type BuildEvent = {
  id: BuildEventIdentity;
  type: BuildEventType;
  /**
   * The type of activity
   */
  event_type:
    | 'request_success'
    | 'request_failure'
    | 'response_success'
    | 'response_failure'
    | 'request_aborted'
    | 'response_unprocessable';
  /**
   * The moment the activity occurred
   */
  created_at: string;
  /**
   * Any details regarding the event
   */
  data: {
    [k: string]: unknown;
  };
  build_trigger: BuildTriggerData;
};
export type BuildEventSelfTargetSchema = BuildEvent;
/**
 * JSON API data
 *
 * This interface was referenced by `BuildTrigger`'s JSON-Schema
 * via the `definition` "data".
 */
export type BuildTriggerData = {
  type: BuildTriggerType;
  id: BuildTriggerIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `BuildEvent`'s JSON-Schema
 * via the `definition` "data".
 */
export type BuildEventData = {
  type: BuildEventType;
  id: BuildEventIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `BuildEvent`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type BuildEventAttributes = {
  /**
   * The type of activity
   */
  event_type:
    | 'request_success'
    | 'request_failure'
    | 'response_success'
    | 'response_failure'
    | 'request_aborted'
    | 'response_unprocessable';
  /**
   * The moment the activity occurred
   */
  created_at: string;
  /**
   * Any details regarding the event
   */
  data: {
    [k: string]: unknown;
  };
};
/**
 * JSON API links
 *
 * This interface was referenced by `BuildEvent`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type BuildEventRelationships = {
  build_trigger: BuildTriggerData;
};
/**
 * Represents an event occurred during the indexing process via search indexes.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "search_index_event".
 */
export type SearchIndexEvent = {
  id: SearchIndexEventIdentity;
  type: SearchIndexEventType;
  /**
   * The type of activity
   */
  event_type:
    | 'indexing_started'
    | 'indexing_success'
    | 'indexing_failure'
    | 'indexing_aborted';
  /**
   * The moment the activity occurred
   */
  created_at: string;
  /**
   * Any details regarding the event
   */
  data: {
    [k: string]: unknown;
  };
  search_index: SearchIndexData;
};
export type SearchIndexEventSelfTargetSchema = SearchIndexEvent;
/**
 * JSON API data
 *
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `definition` "data".
 */
export type SearchIndexData = {
  type: SearchIndexType;
  id: SearchIndexIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `SearchIndexEvent`'s JSON-Schema
 * via the `definition` "data".
 */
export type SearchIndexEventData = {
  type: SearchIndexEventType;
  id: SearchIndexEventIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SearchIndexEvent`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SearchIndexEventAttributes = {
  /**
   * The type of activity
   */
  event_type:
    | 'indexing_started'
    | 'indexing_success'
    | 'indexing_failure'
    | 'indexing_aborted';
  /**
   * The moment the activity occurred
   */
  created_at: string;
  /**
   * Any details regarding the event
   */
  data: {
    [k: string]: unknown;
  };
};
/**
 * JSON API links
 *
 * This interface was referenced by `SearchIndexEvent`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SearchIndexEventRelationships = {
  search_index: SearchIndexData;
};
export type ItemCreateTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
export type ItemDuplicateJobSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
export type ItemUpdateTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
export type ItemSelfTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
export type ItemDestroyJobSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
export type ItemPublishTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
export type ItemUnpublishTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
export type ScheduledPublicationDestroyTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
export type ScheduledUnpublishingDestroyTargetSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
  NestedMode extends boolean = false,
> = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
/**
 * Meta information regarding the record
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `definition` "meta".
 */
export type ItemMeta = {
  /**
   * Date of creation
   */
  created_at: string;
  /**
   * Last update time
   */
  updated_at: string;
  /**
   * Date of last publication
   */
  published_at: null | string;
  /**
   * Date of first publication
   */
  first_published_at: null | string;
  /**
   * Date of future publication
   */
  publication_scheduled_at: null | string;
  /**
   * Date of future unpublishing
   */
  unpublishing_scheduled_at: null | string;
  /**
   * Status
   */
  status: null | ('draft' | 'updated' | 'published');
  /**
   * Whether the current record is valid or not
   */
  is_valid: boolean;
  /**
   * Whether the current version of the record is valid or not
   */
  is_current_version_valid: null | boolean;
  /**
   * Whether the published version of record is valid or not
   */
  is_published_version_valid: null | boolean;
  /**
   * The ID of the current record version
   */
  current_version: string;
  /**
   * Workflow stage in which the item is
   */
  stage: null | string;
  /**
   * When the records can be organized in a tree, indicates whether the record has children
   */
  has_children: null | boolean;
};
/**
 * JSON API links
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type ItemRelationships<
  D extends ItemTypeDefinition = ItemTypeDefinition,
> = {
  item_type: ItemTypeData<D>;
  creator?:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `validate_existing.schema` link.
 */
export type ItemValidateExistingSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
> = {
  id?: ItemIdentity;
  type?: ItemType1;
  item_type: ItemTypeData<D>;
  creator?:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
  __itemTypeId?: D['itemTypeId'];
} & ToItemAttributesInRequest<D>;
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `validate_new.schema` link.
 */
export type ItemValidateNewSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
> = {
  type?: ItemType1;
  item_type: ItemTypeData<D>;
  creator?:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
  __itemTypeId?: D['itemTypeId'];
} & ToItemAttributesInRequest<D>;
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `create.schema` link.
 */
export type ItemCreateSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
> = {
  id?: ItemIdentity;
  type?: ItemType1;
  item_type: ItemTypeData<D>;
  creator?:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
  /**
   * Meta information regarding the record
   */
  meta?: {
    /**
     * Date of creation
     */
    created_at?: string;
    /**
     * Last update time
     */
    updated_at?: string;
    /**
     * Date of last publication
     */
    published_at?: null | string;
    /**
     * Date of first publication
     */
    first_published_at?: null | string;
    /**
     * Date of future publication
     */
    publication_scheduled_at?: null | string;
    /**
     * Status
     */
    status?: null | ('draft' | 'updated' | 'published');
    /**
     * Whether the current record is valid or not
     */
    is_valid?: boolean;
    /**
     * Whether the current version of the record is valid or not
     */
    is_current_version_valid?: null | boolean;
    /**
     * Whether the published version of the record is valid or not
     */
    is_published_version_valid?: null | boolean;
    /**
     * The ID of the current record version
     */
    current_version?: string;
  };
  __itemTypeId?: D['itemTypeId'];
} & ToItemAttributesInRequest<D>;
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `update.schema` link.
 */
export type ItemUpdateSchema<
  D extends ItemTypeDefinition = ItemTypeDefinition,
> = {
  id?: ItemIdentity;
  type?: ItemType1;
  item_type?: ItemTypeData<D>;
  creator?:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
  /**
   * Meta information regarding the record
   */
  meta?: {
    /**
     * Date of creation
     */
    created_at?: string;
    /**
     * Last update time
     */
    updated_at?: string;
    /**
     * Date of last publication
     */
    published_at?: null | string;
    /**
     * Date of first publication
     */
    first_published_at?: null | string;
    /**
     * Date of future publication
     */
    publication_scheduled_at?: null | string;
    /**
     * Date of future unpublishing
     */
    unpublishing_scheduled_at?: null | string;
    /**
     * Status
     */
    status?: null | ('draft' | 'updated' | 'published');
    /**
     * Whether the current record is valid or not
     */
    is_valid?: boolean;
    /**
     * The ID of the current record version (for optimistic locking, see the example)
     */
    current_version?: string;
    /**
     * Whether the current version of the record is valid or not
     */
    is_current_version_valid?: null | boolean;
    /**
     * Whether the published version of record is valid or not
     */
    is_published_version_valid?: null | boolean;
    /**
     * The new stage to move the record to
     */
    stage?: string | null;
    /**
     * Whether the record has children or not
     */
    has_children?: null | boolean;
  };
  __itemTypeId?: D['itemTypeId'];
} & ToItemAttributesInRequest<D>;
/**
 * Information about the record
 *
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `current_vs_published_state.targetSchema` link.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "item_current_vs_published_state".
 */
export type ItemCurrentVsPublishedState = {
  id: ItemCurrentVsPublishedStateIdentity;
  type: ItemCurrentVsPublishedStateType;
  current_version_locales: string[];
  published_version_locales: string[];
  changed_locales: string[];
  added_locales: string[];
  removed_locales: string[];
  non_localized_fields_changed: boolean;
  current_version_invalid_locales: string[];
  current_version_non_localized_fields_invalid: boolean;
  scheduled_publication: ScheduledPublicationData | null;
  scheduled_unpublishing: ScheduledUnpublishingData | null;
  published_version: ItemVersionData | null;
};
export type ItemCurrentVsPublishedStateTargetSchema =
  ItemCurrentVsPublishedState;
/**
 * JSON API data
 *
 * This interface was referenced by `ScheduledPublication`'s JSON-Schema
 * via the `definition` "data".
 */
export type ScheduledPublicationData = {
  type: ScheduledPublicationType;
  id: ScheduledPublicationIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
 * via the `definition` "data".
 */
export type ScheduledUnpublishingData = {
  type: ScheduledUnpublishingType;
  id: ScheduledUnpublishingIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `definition` "data".
 */
export type ItemVersionData = {
  type: ItemVersionType;
  id: ItemVersionIdentity;
};
/**
 * JSON API data
 *
 * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
 * via the `definition` "data".
 */
export type ItemCurrentVsPublishedStateData = {
  type: ItemCurrentVsPublishedStateType;
  id: ItemCurrentVsPublishedStateIdentity;
};
/**
 * The JSON data associated to the record
 *
 * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type ItemCurrentVsPublishedStateAttributes = {
  current_version_locales: string[];
  published_version_locales: string[];
  changed_locales: string[];
  added_locales: string[];
  removed_locales: string[];
  non_localized_fields_changed: boolean;
  current_version_invalid_locales: string[];
  current_version_non_localized_fields_invalid: boolean;
};
/**
 * JSON API links
 *
 * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type ItemCurrentVsPublishedStateRelationships = {
  scheduled_publication: ScheduledPublicationData | null;
  scheduled_unpublishing: ScheduledUnpublishingData | null;
  published_version: ItemVersionData | null;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_publish.schema` link.
 */
export type ItemBulkPublishSchema = {
  type?: 'item_bulk_publish_operation';
  items: ItemData[];
  minItems?: unknown;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_unpublish.schema` link.
 */
export type ItemBulkUnpublishSchema = {
  type?: 'item_bulk_unpublish_operation';
  items: ItemData[];
  minItems?: unknown;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_destroy.schema` link.
 */
export type ItemBulkDestroySchema = {
  type?: 'item_bulk_destroy_operation';
  items: ItemData[];
  minItems?: unknown;
};
/**
 * This interface was referenced by `Item`'s JSON-Schema
 * via the `bulk_move_to_stage.schema` link.
 */
export type ItemBulkMoveToStageSchema = {
  type?: 'item_bulk_move_to_stage_operation';
  /**
   * Stage to be moved to
   */
  stage: string;
  items: ItemData[];
  minItems?: unknown;
};
/**
 * Every change to a record is stored as a separate record version in DatoCMS.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "item_version".
 */
export type ItemVersion = {
  id: ItemVersionIdentity;
  type: ItemVersionType;
  item_type: ItemTypeData;
  item: ItemData;
  editor:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
  meta: ItemVersionMeta;
  [k: string]: unknown;
};
export type ItemVersionSelfTargetSchema = ItemVersion;
/**
 * Meta information regarding the record version
 *
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `definition` "meta".
 */
export type ItemVersionMeta = {
  /**
   * Date of record version creation
   */
  created_at: string;
  /**
   * Whether the record version is valid or not
   */
  is_valid: boolean;
  /**
   * Whether the record version is the published version or not
   */
  is_published: boolean;
  /**
   * Whether the record version is the most recent version or not
   */
  is_current: boolean;
};
/**
 * The JSON data associated to the record version
 *
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type ItemVersionAttributes = {
  [k: string]: unknown;
};
/**
 * JSON API links
 *
 * This interface was referenced by `ItemVersion`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type ItemVersionRelationships = {
  item_type: ItemTypeData;
  item: ItemData;
  editor:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
};
/**
 * Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "upload".
 */
export type Upload = {
  id: UploadIdentity;
  type: UploadType;
  /**
   * size of the upload
   */
  size: number;
  /**
   * Width of image
   */
  width: null | number;
  /**
   * Height of image
   */
  height: null | number;
  /**
   * Upload path
   */
  path: string;
  /**
   * Upload basename
   */
  basename: string;
  /**
   * Upload filename
   */
  filename: string;
  /**
   * Upload URL
   */
  url: string;
  /**
   * Format
   */
  format: string | null;
  /**
   * Author
   */
  author: string | null;
  /**
   * Copyright
   */
  copyright: string | null;
  /**
   * Notes
   */
  notes: string | null;
  /**
   * The MD5 hash of the asset
   */
  md5: string;
  /**
   * Seconds of duration for the video
   */
  duration: number | null;
  /**
   * Frame rate (FPS) for the video
   */
  frame_rate: number | null;
  /**
   * Blurhash for the asset
   */
  blurhash: string | null;
  /**
   * Base64 encoded ThumbHash for the asset
   */
  thumbhash: string | null;
  /**
   * Public Mux playback ID. Used with stream.mux.com to create the source URL for a video player.
   */
  mux_playback_id: string | null;
  /**
   * Maximum quality of MP4 rendition available
   */
  mux_mp4_highest_res: null | 'high' | 'medium' | 'low';
  /**
   * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
   */
  default_field_metadata: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
     */
    [k: string]: {
      /**
       * Alternate text for the asset
       */
      alt: string | null;
      /**
       * Title for the asset
       */
      title: string | null;
      /**
       * Object with arbitrary metadata
       */
      custom_data: {
        [k: string]: unknown;
      };
      /**
       * Focal point (only for image assets)
       */
      focal_point: {
        /**
         * Horizontal position expressed as float between 0 and 1
         */
        x: number;
        /**
         * Vertical position expressed as float between 0 and 1
         */
        y: number;
      } | null;
    };
  };
  /**
   * Is this upload an image?
   */
  is_image: boolean;
  /**
   * Date of upload
   */
  created_at: null | string;
  /**
   * Date of last update
   */
  updated_at: null | string;
  /**
   * Mime type of upload
   */
  mime_type: null | string;
  /**
   * Tags
   */
  tags: string[];
  /**
   * Smart tags
   */
  smart_tags: string[];
  /**
   * Exif information
   */
  exif_info: {
    [k: string]: unknown;
  };
  /**
   * Dominant colors of the image
   */
  colors: {
    /**
     * Red value (from 0 to 255)
     */
    red: number;
    /**
     * Green value (from 0 to 255)
     */
    green: number;
    /**
     * Blue value (from 0 to 255)
     */
    blue: number;
    /**
     * Alpha value (from 0 to 255)
     */
    alpha: number;
  }[];
  upload_collection: UploadCollectionData | null;
  creator:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
  meta: UploadMeta;
};
export type UploadCreateJobSchema = Upload;
export type UploadSelfTargetSchema = Upload;
export type UploadDestroyTargetSchema = Upload;
export type UploadUpdateJobSchema = Upload;
/**
 * Meta attributes
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `definition` "meta".
 */
export type UploadMeta = {
  /**
   * Antivirus scan information
   */
  antivirus: {
    /**
     * Antivirus scan status of the asset
     */
    status: 'pending' | 'clean' | 'infected' | 'failed' | 'skipped';
    /**
     * Date of the last antivirus scan
     */
    checked_at: string | null;
    /**
     * Name of the threat detected by the antivirus scan, if any
     */
    threat_name: string | null;
  };
};
/**
 * JSON API data
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `definition` "data".
 */
export type UploadData = {
  type: UploadType;
  id: UploadIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UploadAttributes = {
  /**
   * size of the upload
   */
  size: number;
  /**
   * Width of image
   */
  width: null | number;
  /**
   * Height of image
   */
  height: null | number;
  /**
   * Upload path
   */
  path: string;
  /**
   * Upload basename
   */
  basename: string;
  /**
   * Upload filename
   */
  filename: string;
  /**
   * Upload URL
   */
  url: string;
  /**
   * Format
   */
  format: string | null;
  /**
   * Author
   */
  author: string | null;
  /**
   * Copyright
   */
  copyright: string | null;
  /**
   * Notes
   */
  notes: string | null;
  /**
   * The MD5 hash of the asset
   */
  md5: string;
  /**
   * Seconds of duration for the video
   */
  duration: number | null;
  /**
   * Frame rate (FPS) for the video
   */
  frame_rate: number | null;
  /**
   * Blurhash for the asset
   */
  blurhash: string | null;
  /**
   * Base64 encoded ThumbHash for the asset
   */
  thumbhash: string | null;
  /**
   * Public Mux playback ID. Used with stream.mux.com to create the source URL for a video player.
   */
  mux_playback_id: string | null;
  /**
   * Maximum quality of MP4 rendition available
   */
  mux_mp4_highest_res: null | 'high' | 'medium' | 'low';
  /**
   * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
   */
  default_field_metadata: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
     */
    [k: string]: {
      /**
       * Alternate text for the asset
       */
      alt: string | null;
      /**
       * Title for the asset
       */
      title: string | null;
      /**
       * Object with arbitrary metadata
       */
      custom_data: {
        [k: string]: unknown;
      };
      /**
       * Focal point (only for image assets)
       */
      focal_point: {
        /**
         * Horizontal position expressed as float between 0 and 1
         */
        x: number;
        /**
         * Vertical position expressed as float between 0 and 1
         */
        y: number;
      } | null;
    };
  };
  /**
   * Is this upload an image?
   */
  is_image: boolean;
  /**
   * Date of upload
   */
  created_at: null | string;
  /**
   * Date of last update
   */
  updated_at: null | string;
  /**
   * Mime type of upload
   */
  mime_type: null | string;
  /**
   * Tags
   */
  tags: string[];
  /**
   * Smart tags
   */
  smart_tags: string[];
  /**
   * Exif information
   */
  exif_info: {
    [k: string]: unknown;
  };
  /**
   * Dominant colors of the image
   */
  colors: {
    /**
     * Red value (from 0 to 255)
     */
    red: number;
    /**
     * Green value (from 0 to 255)
     */
    green: number;
    /**
     * Blue value (from 0 to 255)
     */
    blue: number;
    /**
     * Alpha value (from 0 to 255)
     */
    alpha: number;
  }[];
};
/**
 * JSON API links
 *
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type UploadRelationships = {
  upload_collection: UploadCollectionData | null;
  creator:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
};
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `create.schema` link.
 */
export type UploadCreateSchema = {
  id?: UploadIdentity;
  type?: UploadType;
  /**
   * Upload path
   */
  path: string;
  /**
   * Copyright
   */
  copyright?: string | null;
  /**
   * Author
   */
  author?: string | null;
  /**
   * Notes
   */
  notes?: string | null;
  /**
   * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
   */
  default_field_metadata?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
     */
    [k: string]: {
      /**
       * Alternate text for the asset
       */
      alt?: string | null;
      /**
       * Title for the asset
       */
      title?: string | null;
      /**
       * Object with arbitrary metadata
       */
      custom_data?: {
        [k: string]: unknown;
      };
      /**
       * Focal point (only for image assets)
       */
      focal_point?: {
        /**
         * Horizontal position expressed as float between 0 and 1
         */
        x: number;
        /**
         * Vertical position expressed as float between 0 and 1
         */
        y: number;
      } | null;
    };
  };
  /**
   * Tags
   */
  tags?: string[];
  upload_collection?: UploadCollectionData | null;
};
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `update.schema` link.
 */
export type UploadUpdateSchema = {
  id?: UploadIdentity;
  type?: UploadType;
  /**
   * Upload path
   */
  path?: string;
  /**
   * Upload basename
   */
  basename?: string;
  /**
   * Copyright
   */
  copyright?: string | null;
  /**
   * Author
   */
  author?: string | null;
  /**
   * Notes
   */
  notes?: string | null;
  /**
   * Tags
   */
  tags?: string[];
  /**
   * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
   */
  default_field_metadata?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
     */
    [k: string]: {
      /**
       * Alternate text for the asset
       */
      alt?: string | null;
      /**
       * Title for the asset
       */
      title?: string | null;
      /**
       * Object with arbitrary metadata
       */
      custom_data?: {
        [k: string]: unknown;
      };
      /**
       * Focal point (only for image assets)
       */
      focal_point?: {
        /**
         * Horizontal position expressed as float between 0 and 1
         */
        x: number;
        /**
         * Vertical position expressed as float between 0 and 1
         */
        y: number;
      } | null;
    };
  };
  creator?:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
  upload_collection?: UploadCollectionData | null;
};
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_tag.schema` link.
 */
export type UploadBulkTagSchema = {
  type?: 'upload_bulk_tag_operation';
  /**
   * The tags to add to the assets
   */
  tags: string[];
  uploads: UploadData[];
};
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_set_upload_collection.schema` link.
 */
export type UploadBulkSetUploadCollectionSchema = {
  type?: 'upload_bulk_set_upload_collection_operation';
  upload_collection: null | UploadCollectionData;
  uploads: UploadData[];
};
/**
 * This interface was referenced by `Upload`'s JSON-Schema
 * via the `bulk_destroy.schema` link.
 */
export type UploadBulkDestroySchema = {
  type?: 'upload_bulk_destroy_operation';
  uploads: UploadData[];
};
/**
 * To upload a file with the Content Management API, first you need to obtain an upload permission. The `upload_request` entity contains the S3-like URL where you will be able to upload the file with a raw/binary PUT request.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "upload_request".
 */
export type UploadRequest = {
  id: UploadRequestIdentity;
  type: UploadRequestType;
  /**
   * The URL to use to upload the file with a raw/binary PUT request
   */
  url: string;
  /**
   * Specifies the additional headers that need to be included in the direct PUT upload request
   */
  request_headers: {
    [k: string]: unknown;
  };
};
export type UploadRequestCreateTargetSchema = UploadRequest;
/**
 * JSON API attributes
 *
 * This interface was referenced by `UploadRequest`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UploadRequestAttributes = {
  /**
   * The URL to use to upload the file with a raw/binary PUT request
   */
  url: string;
  /**
   * Specifies the additional headers that need to be included in the direct PUT upload request
   */
  request_headers: {
    [k: string]: unknown;
  };
  [k: string]: unknown;
};
/**
 * This interface was referenced by `UploadRequest`'s JSON-Schema
 * via the `create.schema` link.
 */
export type UploadRequestCreateSchema = {
  type?: UploadRequestType;
  /**
   * The original file name
   */
  filename?: string;
  upload_collection?: UploadCollectionData | null;
};
/**
 * If the asset linked to an Upload entity is a video file, you have the option to include additional audio tracks and subtitle tracks to it.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "upload_track".
 */
export type UploadTrack = {
  id: UploadTrackIdentity;
  /**
   * The type of track (audio or subtitles)
   */
  type: 'subtitles' | 'audio';
  /**
   * The human-readable name of the track
   */
  name: string;
  /**
   * A valid BCP 47 specification compliant language code
   */
  language_code: string;
  /**
   * When status is `errored`, explains the reason for the error
   */
  error: null | string;
  /**
   * The status of the asset
   */
  status: 'preparing' | 'ready' | 'errored';
  /**
   * Indicates if the track provides subtitles for the Deaf or Hard-of-hearing (SDH)
   */
  closed_captions: null | boolean;
  upload: UploadData;
};
export type UploadTrackCreateJobSchema = UploadTrack;
export type UploadTrackDestroyJobSchema = UploadTrack;
export type UploadTrackGenerateSubtitlesJobSchema = UploadTrack;
/**
 * JSON API data
 *
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `definition` "data".
 */
export type UploadTrackData = {
  /**
   * The type of track (audio or subtitles)
   */
  type: 'subtitles' | 'audio';
  id: UploadTrackIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UploadTrackAttributes = {
  /**
   * The type of track (audio or subtitles)
   */
  type: 'subtitles' | 'audio';
  /**
   * The human-readable name of the track
   */
  name: string;
  /**
   * A valid BCP 47 specification compliant language code
   */
  language_code: string;
  /**
   * When status is `errored`, explains the reason for the error
   */
  error: null | string;
  /**
   * The status of the asset
   */
  status: 'preparing' | 'ready' | 'errored';
  /**
   * Indicates if the track provides subtitles for the Deaf or Hard-of-hearing (SDH)
   */
  closed_captions: null | boolean;
};
/**
 * JSON API links
 *
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type UploadTrackRelationships = {
  upload: UploadData;
};
/**
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `create.schema` link.
 */
export type UploadTrackCreateSchema = {
  /**
   * The type of track (audio or subtitles)
   */
  type: 'subtitles' | 'audio';
  /**
   * Either an URL to download, or the ID of an upload request
   */
  url_or_upload_request_id: string;
  /**
   * The human-readable name of the track
   */
  name?: string;
  /**
   * A valid BCP 47 specification compliant language code
   */
  language_code: string;
  /**
   * Indicates if the track provides subtitles for the Deaf or Hard-of-hearing (SDH)
   */
  closed_captions?: null | boolean;
};
/**
 * This interface was referenced by `UploadTrack`'s JSON-Schema
 * via the `generate_subtitles.schema` link.
 */
export type UploadTrackGenerateSubtitlesSchema = {
  type?: UploadTrackType;
  /**
   * The human-readable name of the track
   */
  name?: string;
  /**
   * A valid BCP 47 specification compliant language code
   */
  language_code: string;
};
/**
 * You can create scheduled publication to publish records in the future
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "scheduled_publication".
 */
export type ScheduledPublication = {
  id: ScheduledPublicationIdentity;
  type: ScheduledPublicationType;
  /**
   * The future date for the publication
   */
  publication_scheduled_at: string;
  /**
   * Specifies which content should be published. If null, the whole record will be published.
   */
  selective_publication: null | {
    /**
     * List of locales whose content will be published
     */
    content_in_locales: string[];
    /**
     * Whether the non-localized content has to be published or not
     */
    non_localized_content: boolean;
  };
  item: ItemData;
};
export type ScheduledPublicationCreateTargetSchema = ScheduledPublication;
/**
 * JSON API attributes
 *
 * This interface was referenced by `ScheduledPublication`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type ScheduledPublicationAttributes = {
  /**
   * The future date for the publication
   */
  publication_scheduled_at: string;
  /**
   * Specifies which content should be published. If null, the whole record will be published.
   */
  selective_publication: null | {
    /**
     * List of locales whose content will be published
     */
    content_in_locales: string[];
    /**
     * Whether the non-localized content has to be published or not
     */
    non_localized_content: boolean;
  };
};
/**
 * JSON API links
 *
 * This interface was referenced by `ScheduledPublication`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type ScheduledPublicationRelationships = {
  item: ItemData;
};
/**
 * This interface was referenced by `ScheduledPublication`'s JSON-Schema
 * via the `create.schema` link.
 */
export type ScheduledPublicationCreateSchema = {
  type?: ScheduledPublicationType;
  /**
   * The future date for the publication
   */
  publication_scheduled_at: string;
  /**
   * Specifies which content should be published. If null, the whole record will be published.
   */
  selective_publication?: null | {
    /**
     * List of locales whose content will be published
     */
    content_in_locales: string[];
    /**
     * Whether the non-localized content has to be published or not
     */
    non_localized_content: boolean;
  };
};
/**
 * You can create a scheduled unpublishing to unpublish records in the future
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "scheduled_unpublishing".
 */
export type ScheduledUnpublishing = {
  id: ScheduledUnpublishingIdentity;
  type: ScheduledUnpublishingType;
  /**
   * The future date for the unpublishing
   */
  unpublishing_scheduled_at: string;
  /**
   * List of locales whose content will be unpublished, or nil if the whole record needs to be unpublished
   */
  content_in_locales: null | string[];
  item: ItemData;
};
export type ScheduledUnpublishingCreateTargetSchema = ScheduledUnpublishing;
/**
 * JSON API attributes
 *
 * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type ScheduledUnpublishingAttributes = {
  /**
   * The future date for the unpublishing
   */
  unpublishing_scheduled_at: string;
  /**
   * List of locales whose content will be unpublished, or nil if the whole record needs to be unpublished
   */
  content_in_locales: null | string[];
};
/**
 * JSON API links
 *
 * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type ScheduledUnpublishingRelationships = {
  item: ItemData;
};
/**
 * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
 * via the `create.schema` link.
 */
export type ScheduledUnpublishingCreateSchema = {
  type?: ScheduledUnpublishingType;
  /**
   * The future date for the unpublishing
   */
  unpublishing_scheduled_at: string;
  /**
   * List of locales whose content will be unpublished, or nil if the whole record needs to be unpublished
   */
  content_in_locales?: null | string[];
};
/**
 * DatoCMS Site Search is a way to deliver tailored search results to your site visitors. This is the endpoint you can use to query for results.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "search_result".
 */
export type SearchResult = {
  id: SearchResultIdentity;
  type: SearchResultType;
  /**
   * Title of the page
   */
  title: string;
  /**
   * First 200 characters of page body, unformatted
   */
  body_excerpt: string;
  /**
   * URL
   */
  url: string;
  /**
   * Search score
   */
  score: number;
  highlight: {
    title?: string[] | null;
    body?: string[] | null;
  };
};
/**
 * JSON API data
 *
 * This interface was referenced by `SearchResult`'s JSON-Schema
 * via the `definition` "data".
 */
export type SearchResultData = {
  type: SearchResultType;
  id: SearchResultIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SearchResult`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SearchResultAttributes = {
  /**
   * Title of the page
   */
  title: string;
  /**
   * First 200 characters of page body, unformatted
   */
  body_excerpt: string;
  /**
   * URL
   */
  url: string;
  /**
   * Search score
   */
  score: number;
  highlight: {
    title?: string[] | null;
    body?: string[] | null;
  };
};
/**
 * [Environments](https://www.datocms.com/docs/general-concepts/primary-and-sandbox-environments) make it easier for your development team to **manage and maintain content structure once your content has been published**. You can think of environments like code branches: great for testing, development and pre-production environments.
 *
 * By default, every project has one environment, called **primary environment**, which is meant to be used for the regular editorial workflow. Additionally, multiple **sandbox environments** can be created by developers to safely test/experiment new changes in the content.
 *
 * Sandbox environments start out as **exact copies of one of the existing environments** (ie. the primary one). The process of creating a new sandbox starting off from an existing environment is called fork.
 *
 * Each environment is identified by a name (ie. `master`) and stores the following information:
 *
 * - Models
 * - Records
 * - Uploads
 * - Plugins
 * - Locales and timezone settings
 * - UI Theme (colors and logo)
 * - Global SEO settings
 * - The content navigation bar
 *
 * When making changes to any of the aforementioned entities in any environment, including the primary environment, **the data in all other environments isn’t affected** and stays the same.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "environment".
 */
export type Environment = {
  id: EnvironmentIdentity;
  type: EnvironmentType;
  meta: EnvironmentMeta;
};
export type EnvironmentForkJobSchema = Environment;
export type EnvironmentPromoteTargetSchema = Environment;
export type EnvironmentRenameTargetSchema = Environment;
export type EnvironmentSelfTargetSchema = Environment;
export type EnvironmentDestroyJobSchema = Environment;
/**
 * Meta attributes
 *
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `definition` "meta".
 */
export type EnvironmentMeta = {
  /**
   * Status of the environment
   */
  status: 'creating' | 'ready' | 'destroying';
  /**
   * The completion percentage of the fork operation (only present if the status is `creating`)
   */
  fork_completion_percentage?: number;
  /**
   * Is this environment the in read-only mode because of a fast-fork?
   */
  read_only_mode: boolean;
  /**
   * Date of creation
   */
  created_at: string;
  /**
   * Last data change
   */
  last_data_change_at: string;
  /**
   * Is this environment the primary for the project?
   */
  primary: boolean;
  /**
   * ID of the environment that's been forked to generate this one
   */
  forked_from: string | null;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `definition` "data".
 */
export type EnvironmentData = {
  type: EnvironmentType;
  id: EnvironmentIdentity;
};
/**
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `fork.schema` link.
 */
export type EnvironmentForkSchema = {
  /**
   * The ID of the forked environment
   */
  id: string;
  type?: EnvironmentType;
};
/**
 * This interface was referenced by `Environment`'s JSON-Schema
 * via the `rename.schema` link.
 */
export type EnvironmentRenameSchema = {
  /**
   * The new ID for the environment
   */
  id: string;
  type?: EnvironmentType;
};
/**
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "maintenance_mode".
 */
export type MaintenanceMode = {
  id: MaintenanceModeIdentity;
  type: MaintenanceModeType;
  /**
   * Whether maintenance mode is currently active or not
   */
  active: boolean;
};
export type MaintenanceModeSelfTargetSchema = MaintenanceMode;
export type MaintenanceModeActivateTargetSchema = MaintenanceMode;
export type MaintenanceModeDeactivateTargetSchema = MaintenanceMode;
/**
 * JSON API data
 *
 * This interface was referenced by `MaintenanceMode`'s JSON-Schema
 * via the `definition` "data".
 */
export type MaintenanceModeData = {
  type: MaintenanceModeType;
  id: MaintenanceModeIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `MaintenanceMode`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type MaintenanceModeAttributes = {
  /**
   * Whether maintenance mode is currently active or not
   */
  active: boolean;
};
/**
 * A webhook allows to make requests following certain Dato events. It is linked to a Role, which describes what actions can be performed.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "webhook".
 */
export type Webhook = {
  id: WebhookIdentity;
  type: WebhookType;
  /**
   * Unique name for the webhook
   */
  name: string;
  /**
   * Whether the webhook is enabled and sending events or not
   */
  enabled: boolean;
  /**
   * The URL to be called
   */
  url: string;
  /**
   * A custom payload
   */
  custom_payload: string | null;
  /**
   * HTTP Basic Authorization username
   */
  http_basic_user: string | null;
  /**
   * HTTP Basic Authorization password
   */
  http_basic_password: string | null;
  /**
   * Additional headers that will be sent
   */
  headers: {
    [k: string]: string;
  };
  events: {
    /**
     * The subject of webhook triggering
     */
    entity_type:
      | 'item_type'
      | 'item'
      | 'upload'
      | 'build_trigger'
      | 'environment'
      | 'maintenance_mode'
      | 'sso_user'
      | 'cda_cache_tags';
    event_types: (
      | 'create'
      | 'update'
      | 'delete'
      | 'publish'
      | 'unpublish'
      | 'promote'
      | 'deploy_started'
      | 'deploy_succeeded'
      | 'deploy_failed'
      | 'change'
      | 'invalidate'
    )[];
    filters?:
      | {
          entity_type:
            | 'item_type'
            | 'item'
            | 'build_trigger'
            | 'environment'
            | 'environment_type';
          entity_ids: [string, ...string[]];
        }[]
      | null;
  }[];
  /**
   * Specifies which API version to use when serializing entities in the webhook payload
   */
  payload_api_version: string;
  /**
   * Whether the you want records present in the payload to show blocks expanded or not
   */
  nested_items_in_payload: boolean;
  /**
   * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
   */
  auto_retry: boolean;
};
export type WebhookCreateTargetSchema = Webhook;
export type WebhookUpdateTargetSchema = Webhook;
export type WebhookSelfTargetSchema = Webhook;
export type WebhookDestroyTargetSchema = Webhook;
/**
 * JSON API data
 *
 * This interface was referenced by `Webhook`'s JSON-Schema
 * via the `definition` "data".
 */
export type WebhookData = {
  type: WebhookType;
  id: WebhookIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `Webhook`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type WebhookAttributes = {
  /**
   * Unique name for the webhook
   */
  name: string;
  /**
   * Whether the webhook is enabled and sending events or not
   */
  enabled: boolean;
  /**
   * The URL to be called
   */
  url: string;
  /**
   * A custom payload
   */
  custom_payload: string | null;
  /**
   * HTTP Basic Authorization username
   */
  http_basic_user: string | null;
  /**
   * HTTP Basic Authorization password
   */
  http_basic_password: string | null;
  /**
   * Additional headers that will be sent
   */
  headers: {
    [k: string]: string;
  };
  events: {
    /**
     * The subject of webhook triggering
     */
    entity_type:
      | 'item_type'
      | 'item'
      | 'upload'
      | 'build_trigger'
      | 'environment'
      | 'maintenance_mode'
      | 'sso_user'
      | 'cda_cache_tags';
    event_types: (
      | 'create'
      | 'update'
      | 'delete'
      | 'publish'
      | 'unpublish'
      | 'promote'
      | 'deploy_started'
      | 'deploy_succeeded'
      | 'deploy_failed'
      | 'change'
      | 'invalidate'
    )[];
    filters?:
      | {
          entity_type:
            | 'item_type'
            | 'item'
            | 'build_trigger'
            | 'environment'
            | 'environment_type';
          entity_ids: [string, ...string[]];
        }[]
      | null;
  }[];
  /**
   * Specifies which API version to use when serializing entities in the webhook payload
   */
  payload_api_version: string;
  /**
   * Whether the you want records present in the payload to show blocks expanded or not
   */
  nested_items_in_payload: boolean;
  /**
   * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
   */
  auto_retry: boolean;
};
/**
 * This interface was referenced by `Webhook`'s JSON-Schema
 * via the `create.schema` link.
 */
export type WebhookCreateSchema = {
  type?: WebhookType;
  /**
   * Unique name for the webhook
   */
  name: string;
  /**
   * The URL to be called
   */
  url: string;
  /**
   * A custom payload
   */
  custom_payload: string | null;
  /**
   * Additional headers that will be sent
   */
  headers: {
    [k: string]: string;
  };
  events: {
    /**
     * The subject of webhook triggering
     */
    entity_type:
      | 'item_type'
      | 'item'
      | 'upload'
      | 'build_trigger'
      | 'environment'
      | 'maintenance_mode'
      | 'sso_user'
      | 'cda_cache_tags';
    event_types: (
      | 'create'
      | 'update'
      | 'delete'
      | 'publish'
      | 'unpublish'
      | 'promote'
      | 'deploy_started'
      | 'deploy_succeeded'
      | 'deploy_failed'
      | 'change'
      | 'invalidate'
    )[];
    filters?:
      | {
          entity_type:
            | 'item_type'
            | 'item'
            | 'build_trigger'
            | 'environment'
            | 'environment_type';
          entity_ids: [string, ...string[]];
        }[]
      | null;
  }[];
  /**
   * HTTP Basic Authorization username
   */
  http_basic_user: string | null;
  /**
   * HTTP Basic Authorization password
   */
  http_basic_password: string | null;
  /**
   * Whether the webhook is enabled and sending events or not
   */
  enabled?: boolean;
  /**
   * Specifies which API version to use when serializing entities in the webhook payload
   */
  payload_api_version?: string;
  /**
   * Whether the you want records present in the payload to show blocks expanded or not
   */
  nested_items_in_payload?: boolean;
  /**
   * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
   */
  auto_retry?: boolean;
};
/**
 * This interface was referenced by `Webhook`'s JSON-Schema
 * via the `update.schema` link.
 */
export type WebhookUpdateSchema = {
  id?: WebhookIdentity;
  type?: WebhookType;
  /**
   * Unique name for the webhook
   */
  name?: string;
  /**
   * The URL to be called
   */
  url?: string;
  /**
   * A custom payload
   */
  custom_payload?: string | null;
  /**
   * Additional headers that will be sent
   */
  headers?: {
    [k: string]: string;
  };
  events?: {
    /**
     * The subject of webhook triggering
     */
    entity_type:
      | 'item_type'
      | 'item'
      | 'upload'
      | 'build_trigger'
      | 'environment'
      | 'maintenance_mode'
      | 'sso_user'
      | 'cda_cache_tags';
    event_types: (
      | 'create'
      | 'update'
      | 'delete'
      | 'publish'
      | 'unpublish'
      | 'promote'
      | 'deploy_started'
      | 'deploy_succeeded'
      | 'deploy_failed'
      | 'change'
      | 'invalidate'
    )[];
    filters?:
      | {
          entity_type:
            | 'item_type'
            | 'item'
            | 'build_trigger'
            | 'environment'
            | 'environment_type';
          entity_ids: [string, ...string[]];
        }[]
      | null;
  }[];
  /**
   * HTTP Basic Authorization username
   */
  http_basic_user?: string | null;
  /**
   * HTTP Basic Authorization password
   */
  http_basic_password?: string | null;
  /**
   * Whether the webhook is enabled and sending events or not
   */
  enabled?: boolean;
  /**
   * Specifies which API version to use when serializing entities in the webhook payload
   */
  payload_api_version?: string;
  /**
   * Whether the you want records present in the payload to show blocks expanded or not
   */
  nested_items_in_payload?: boolean;
  /**
   * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
   */
  auto_retry?: boolean;
};
/**
 * This represents a log entry in the webhooks activity list, detailing a specific webhook event along with its delivery attempt information.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "webhook_call".
 */
export type WebhookCall = {
  id: WebhookCallIdentity;
  type: WebhookCallType;
  /**
   * The subject of webhook triggering
   */
  entity_type:
    | 'item_type'
    | 'item'
    | 'upload'
    | 'build_trigger'
    | 'environment'
    | 'maintenance_mode'
    | 'sso_user'
    | 'cda_cache_tags';
  /**
   * The event that triggers the webhook call
   */
  event_type:
    | 'create'
    | 'update'
    | 'delete'
    | 'publish'
    | 'unpublish'
    | 'promote'
    | 'deploy_started'
    | 'deploy_succeeded'
    | 'deploy_failed'
    | 'change'
    | 'invalidate';
  /**
   * The moment the event was created
   */
  created_at: string;
  /**
   * The url that the webhook called
   */
  request_url: string;
  /**
   * The request's headers
   */
  request_headers: {
    [k: string]: unknown;
  };
  /**
   * The webhook's request payload is encoded as a string. Use `JSON.parse()` to parse it.
   */
  request_payload: string;
  /**
   * The status of the response
   */
  response_status: number | null;
  /**
   * The response's headers
   */
  response_headers: {
    [k: string]: unknown;
  } | null;
  /**
   * The body of the response
   */
  response_payload: string | null;
  /**
   * The number of retries attempted so far
   */
  attempted_auto_retries_count: number;
  /**
   * The last moment the call occurred
   */
  last_sent_at: string;
  /**
   * The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
   */
  next_retry_at: string | null;
  /**
   * The current status
   */
  status: 'pending' | 'success' | 'failed' | 'rescheduled';
  webhook: WebhookData;
};
export type WebhookCallSelfTargetSchema = WebhookCall;
/**
 * JSON API data
 *
 * This interface was referenced by `WebhookCall`'s JSON-Schema
 * via the `definition` "data".
 */
export type WebhookCallData = {
  type: WebhookCallType;
  id: WebhookCallIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `WebhookCall`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type WebhookCallAttributes = {
  /**
   * The subject of webhook triggering
   */
  entity_type:
    | 'item_type'
    | 'item'
    | 'upload'
    | 'build_trigger'
    | 'environment'
    | 'maintenance_mode'
    | 'sso_user'
    | 'cda_cache_tags';
  /**
   * The event that triggers the webhook call
   */
  event_type:
    | 'create'
    | 'update'
    | 'delete'
    | 'publish'
    | 'unpublish'
    | 'promote'
    | 'deploy_started'
    | 'deploy_succeeded'
    | 'deploy_failed'
    | 'change'
    | 'invalidate';
  /**
   * The moment the event was created
   */
  created_at: string;
  /**
   * The url that the webhook called
   */
  request_url: string;
  /**
   * The request's headers
   */
  request_headers: {
    [k: string]: unknown;
  };
  /**
   * The webhook's request payload is encoded as a string. Use `JSON.parse()` to parse it.
   */
  request_payload: string;
  /**
   * The status of the response
   */
  response_status: number | null;
  /**
   * The response's headers
   */
  response_headers: {
    [k: string]: unknown;
  } | null;
  /**
   * The body of the response
   */
  response_payload: string | null;
  /**
   * The number of retries attempted so far
   */
  attempted_auto_retries_count: number;
  /**
   * The last moment the call occurred
   */
  last_sent_at: string;
  /**
   * The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
   */
  next_retry_at: string | null;
  /**
   * The current status
   */
  status: 'pending' | 'success' | 'failed' | 'rescheduled';
};
/**
 * JSON API links
 *
 * This interface was referenced by `WebhookCall`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type WebhookCallRelationships = {
  webhook: WebhookData;
};
/**
 * Configuration for different build triggers. You can have different staging and production environments in order to test your site before final deploy
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "build_trigger".
 */
export type BuildTrigger = {
  id: BuildTriggerIdentity;
  type: BuildTriggerType;
  /**
   * Name of the build trigger
   */
  name: string;
  /**
   * Whether the build trigger is enabled or not
   */
  enabled: boolean;
  /**
   * The type of build trigger
   */
  adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab';
  /**
   * Additional settings for the build trigger. The value depends on the `adapter`.
   */
  adapter_settings: {
    [k: string]: unknown;
  };
  /**
   * Timestamp of the last build
   */
  last_build_completed_at: string | null;
  /**
   * Status of last build
   */
  build_status: string;
  /**
   * Unique token for the webhook (it's the same token present in `webhook_url`)
   */
  webhook_token?: string;
  /**
   * The URL of the webhook your service has to call when the build completes to report it's status (success or error)
   */
  webhook_url: string;
  /**
   * Status of Site Search for the frontend
   */
  indexing_status: string;
  /**
   * The public URL of the frontend.
   */
  frontend_url: string | null;
  /**
   * Wheter an automatic build request to `webhook_url` should be made on scheduled publications/unpublishings
   */
  autotrigger_on_scheduled_publications: boolean;
  /**
   * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content
   */
  indexing_enabled: boolean;
};
export type BuildTriggerSelfTargetSchema = BuildTrigger;
export type BuildTriggerCreateTargetSchema = BuildTrigger;
export type BuildTriggerUpdateTargetSchema = BuildTrigger;
export type BuildTriggerDestroyTargetSchema = BuildTrigger;
/**
 * JSON API attributes
 *
 * This interface was referenced by `BuildTrigger`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type BuildTriggerAttributes = {
  /**
   * Name of the build trigger
   */
  name: string;
  /**
   * Whether the build trigger is enabled or not
   */
  enabled: boolean;
  /**
   * The type of build trigger
   */
  adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab';
  /**
   * Additional settings for the build trigger. The value depends on the `adapter`.
   */
  adapter_settings: {
    [k: string]: unknown;
  };
  /**
   * Timestamp of the last build
   */
  last_build_completed_at: string | null;
  /**
   * Status of last build
   */
  build_status: string;
  /**
   * Unique token for the webhook (it's the same token present in `webhook_url`)
   */
  webhook_token?: string;
  /**
   * The URL of the webhook your service has to call when the build completes to report it's status (success or error)
   */
  webhook_url: string;
  /**
   * Status of Site Search for the frontend
   */
  indexing_status: string;
  /**
   * The public URL of the frontend.
   */
  frontend_url: string | null;
  /**
   * Wheter an automatic build request to `webhook_url` should be made on scheduled publications/unpublishings
   */
  autotrigger_on_scheduled_publications: boolean;
  /**
   * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content
   */
  indexing_enabled: boolean;
};
/**
 * This interface was referenced by `BuildTrigger`'s JSON-Schema
 * via the `create.schema` link.
 */
export type BuildTriggerCreateSchema = {
  type?: BuildTriggerType;
  /**
   * Name of the build trigger
   */
  name: string;
  /**
   * Unique token for the webhook (it's the same token present in `webhook_url`)
   */
  webhook_token?: string;
  /**
   * The type of build trigger
   */
  adapter: 'custom' | 'netlify' | 'vercel' | 'gitlab';
  /**
   * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content
   */
  indexing_enabled?: boolean;
  /**
   * Whether the build trigger is enabled or not
   */
  enabled?: boolean;
  /**
   * The public URL of the frontend.
   */
  frontend_url: string | null;
  /**
   * Wheter an automatic build request to `webhook_url` should be made on scheduled publications/unpublishings
   */
  autotrigger_on_scheduled_publications: boolean;
  /**
   * Additional settings for the build trigger. The value depends on the `adapter`.
   */
  adapter_settings: {
    [k: string]: unknown;
  };
};
/**
 * This interface was referenced by `BuildTrigger`'s JSON-Schema
 * via the `update.schema` link.
 */
export type BuildTriggerUpdateSchema = {
  id?: BuildTriggerIdentity;
  type?: BuildTriggerType;
  /**
   * Name of the build trigger
   */
  name?: string;
  /**
   * The type of build trigger
   */
  adapter?: 'custom' | 'netlify' | 'vercel' | 'gitlab';
  /**
   * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content
   */
  indexing_enabled?: boolean;
  /**
   * Whether the build trigger is enabled or not
   */
  enabled?: boolean;
  /**
   * The public URL of the frontend.
   */
  frontend_url?: string | null;
  /**
   * Wheter an automatic build request to `webhook_url` should be made on scheduled publications/unpublishings
   */
  autotrigger_on_scheduled_publications?: boolean;
  /**
   * Additional settings for the build trigger. The value depends on the `adapter`.
   */
  adapter_settings?: {
    [k: string]: unknown;
  };
};
/**
 * A Search Index is used to index a website to provide DatoCMS Site Search functionality.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "search_index".
 */
export type SearchIndex = {
  id: SearchIndexIdentity;
  type: SearchIndexType;
  /**
   * Name of the search index
   */
  name: string;
  /**
   * Whether the search index is enabled or not
   */
  enabled: boolean;
  /**
   * The public URL of the website. This is the starting point from which the website's spidering will start
   */
  frontend_url: string | null;
  /**
   * Optional suffix to append to the DatoCmsSearchBot user agent when indexing the website
   */
  user_agent_suffix: string | null;
  build_triggers: BuildTriggerData[];
  meta: SearchIndexMeta;
};
export type SearchIndexSelfTargetSchema = SearchIndex;
export type SearchIndexCreateTargetSchema = SearchIndex;
export type SearchIndexUpdateTargetSchema = SearchIndex;
export type SearchIndexDestroyTargetSchema = SearchIndex;
/**
 * Meta information about the search index
 *
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `definition` "meta".
 */
export type SearchIndexMeta = {
  /**
   * Status of the search indexing
   */
  indexing_status: 'unstarted' | 'pending' | 'success' | 'failed';
  /**
   * Timestamp of the last completed indexing
   */
  last_indexing_completed_at: string | null;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SearchIndexAttributes = {
  /**
   * Name of the search index
   */
  name: string;
  /**
   * Whether the search index is enabled or not
   */
  enabled: boolean;
  /**
   * The public URL of the website. This is the starting point from which the website's spidering will start
   */
  frontend_url: string | null;
  /**
   * Optional suffix to append to the DatoCmsSearchBot user agent when indexing the website
   */
  user_agent_suffix: string | null;
};
/**
 * JSON API links
 *
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SearchIndexRelationships = {
  build_triggers: BuildTriggerData[];
};
/**
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `create.schema` link.
 */
export type SearchIndexCreateSchema = {
  type?: SearchIndexType;
  /**
   * Name of the search index
   */
  name: string;
  /**
   * Whether the search index is enabled or not
   */
  enabled: boolean;
  /**
   * The public URL of the website. This is the starting point from which the website's spidering will start
   */
  frontend_url: string | null;
  /**
   * Optional suffix to append to the DatoCmsSearchBot user agent when indexing the website
   */
  user_agent_suffix?: string | null;
  build_triggers?: BuildTriggerData[];
};
/**
 * This interface was referenced by `SearchIndex`'s JSON-Schema
 * via the `update.schema` link.
 */
export type SearchIndexUpdateSchema = {
  id?: SearchIndexIdentity;
  type?: SearchIndexType;
  /**
   * Name of the search index
   */
  name?: string;
  /**
   * Whether the search index is enabled or not
   */
  enabled?: boolean;
  /**
   * The public URL of the website. This is the starting point from which the website's spidering will start
   */
  frontend_url?: string | null;
  /**
   * Optional suffix to append to the DatoCmsSearchBot user agent when indexing the website
   */
  user_agent_suffix?: string | null;
  build_triggers?: BuildTriggerData[];
};
/**
 * In DatoCMS you can create filters to help you (and other editors) quickly search for records
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "item_type_filter".
 */
export type ItemTypeFilter = {
  id: ItemTypeFilterIdentity;
  type: ItemTypeFilterType;
  /**
   * The name of the filter
   */
  name: string;
  /**
   * The actual filter. It follows the form of the `filter` query parameter of the [List all records](https://www.datocms.com/docs/content-management-api/resources/item/instances) endpoint.
   */
  filter: {
    [k: string]: unknown;
  };
  /**
   * The columns to show with this filter
   */
  columns:
    | [
        {
          /**
           * Can be either the API key of a model's field, or one of the following meta columns: `id`, `_preview`, `_updated_at`, `_created_at`, `_creator`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `position` (only for sortable models), `_stage (only for models associated with a workflow).
           */
          name: string;
          /**
           * The percentage width for the column (float, from 0 to 1.0)
           */
          width: number;
        },
        ...{
          /**
           * Can be either the API key of a model's field, or one of the following meta columns: `id`, `_preview`, `_updated_at`, `_created_at`, `_creator`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `position` (only for sortable models), `_stage (only for models associated with a workflow).
           */
          name: string;
          /**
           * The percentage width for the column (float, from 0 to 1.0)
           */
          width: number;
        }[],
      ]
    | null;
  /**
   * The ordering to apply with this filter, or `null` for the default model ordering. It follows the form of the `order_by` query parameter of the [List all records](https://www.datocms.com/docs/content-management-api/resources/item/instances) endpoint.
   */
  order_by: string | null;
  /**
   * Whether it's a shared filter or not
   */
  shared: boolean;
  item_type: ItemTypeData;
};
export type ItemTypeFilterCreateTargetSchema = ItemTypeFilter;
export type ItemTypeFilterUpdateTargetSchema = ItemTypeFilter;
export type ItemTypeFilterSelfTargetSchema = ItemTypeFilter;
export type ItemTypeFilterDestroyTargetSchema = ItemTypeFilter;
/**
 * JSON API attributes
 *
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type ItemTypeFilterAttributes = {
  /**
   * The name of the filter
   */
  name: string;
  /**
   * The actual filter. It follows the form of the `filter` query parameter of the [List all records](https://www.datocms.com/docs/content-management-api/resources/item/instances) endpoint.
   */
  filter: {
    [k: string]: unknown;
  };
  /**
   * The columns to show with this filter
   */
  columns:
    | [
        {
          /**
           * Can be either the API key of a model's field, or one of the following meta columns: `id`, `_preview`, `_updated_at`, `_created_at`, `_creator`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `position` (only for sortable models), `_stage (only for models associated with a workflow).
           */
          name: string;
          /**
           * The percentage width for the column (float, from 0 to 1.0)
           */
          width: number;
        },
        ...{
          /**
           * Can be either the API key of a model's field, or one of the following meta columns: `id`, `_preview`, `_updated_at`, `_created_at`, `_creator`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `position` (only for sortable models), `_stage (only for models associated with a workflow).
           */
          name: string;
          /**
           * The percentage width for the column (float, from 0 to 1.0)
           */
          width: number;
        }[],
      ]
    | null;
  /**
   * The ordering to apply with this filter, or `null` for the default model ordering. It follows the form of the `order_by` query parameter of the [List all records](https://www.datocms.com/docs/content-management-api/resources/item/instances) endpoint.
   */
  order_by: string | null;
  /**
   * Whether it's a shared filter or not
   */
  shared: boolean;
};
/**
 * JSON API links
 *
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type ItemTypeFilterRelationships = {
  item_type: ItemTypeData;
};
/**
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `create.schema` link.
 */
export type ItemTypeFilterCreateSchema = {
  id?: ItemTypeFilterIdentity;
  type?: ItemTypeFilterType;
  /**
   * The name of the filter
   */
  name: string;
  /**
   * The actual filter. It follows the form of the `filter` query parameter of the [List all records](https://www.datocms.com/docs/content-management-api/resources/item/instances) endpoint.
   */
  filter?: {
    [k: string]: unknown;
  };
  /**
   * The columns to show with this filter
   */
  columns?:
    | [
        {
          /**
           * Can be either the API key of a model's field, or one of the following meta columns: `id`, `_preview`, `_updated_at`, `_created_at`, `_creator`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `position` (only for sortable models), `_stage (only for models associated with a workflow).
           */
          name: string;
          /**
           * The percentage width for the column (float, from 0 to 1.0)
           */
          width: number;
        },
        ...{
          /**
           * Can be either the API key of a model's field, or one of the following meta columns: `id`, `_preview`, `_updated_at`, `_created_at`, `_creator`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `position` (only for sortable models), `_stage (only for models associated with a workflow).
           */
          name: string;
          /**
           * The percentage width for the column (float, from 0 to 1.0)
           */
          width: number;
        }[],
      ]
    | null;
  /**
   * The ordering to apply with this filter, or `null` for the default model ordering. It follows the form of the `order_by` query parameter of the [List all records](https://www.datocms.com/docs/content-management-api/resources/item/instances) endpoint.
   */
  order_by?: string | null;
  /**
   * Whether it's a shared filter or not
   */
  shared?: boolean;
  item_type: ItemTypeData;
};
/**
 * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
 * via the `update.schema` link.
 */
export type ItemTypeFilterUpdateSchema = {
  id?: ItemTypeFilterIdentity;
  type?: ItemTypeFilterType;
  /**
   * The name of the filter
   */
  name?: string;
  /**
   * The columns to show with this filter
   */
  columns?:
    | [
        {
          /**
           * Can be either the API key of a model's field, or one of the following meta columns: `id`, `_preview`, `_updated_at`, `_created_at`, `_creator`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `position` (only for sortable models), `_stage (only for models associated with a workflow).
           */
          name: string;
          /**
           * The percentage width for the column (float, from 0 to 1.0)
           */
          width: number;
        },
        ...{
          /**
           * Can be either the API key of a model's field, or one of the following meta columns: `id`, `_preview`, `_updated_at`, `_created_at`, `_creator`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `position` (only for sortable models), `_stage (only for models associated with a workflow).
           */
          name: string;
          /**
           * The percentage width for the column (float, from 0 to 1.0)
           */
          width: number;
        }[],
      ]
    | null;
  /**
   * The ordering to apply with this filter, or `null` for the default model ordering. It follows the form of the `order_by` query parameter of the [List all records](https://www.datocms.com/docs/content-management-api/resources/item/instances) endpoint.
   */
  order_by?: string | null;
  /**
   * Whether it's a shared filter or not
   */
  shared?: boolean;
  /**
   * The actual filter. It follows the form of the `filter` query parameter of the [List all records](https://www.datocms.com/docs/content-management-api/resources/item/instances) endpoint.
   */
  filter?: {
    [k: string]: unknown;
  };
  item_type?: ItemTypeData;
};
/**
 * In DatoCMS you can create filters to help you (and other editors) quickly search for uploads
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "upload_filter".
 */
export type UploadFilter = {
  id: UploadFilterIdentity;
  type: UploadFilterType;
  /**
   * The name of the filter
   */
  name: string;
  /**
   * The actual filter
   */
  filter: {
    [k: string]: unknown;
  };
  /**
   * Whether it's a shared filter or not
   */
  shared: boolean;
};
export type UploadFilterCreateTargetSchema = UploadFilter;
export type UploadFilterUpdateTargetSchema = UploadFilter;
export type UploadFilterSelfTargetSchema = UploadFilter;
export type UploadFilterDestroyTargetSchema = UploadFilter;
/**
 * JSON API data
 *
 * This interface was referenced by `UploadFilter`'s JSON-Schema
 * via the `definition` "data".
 */
export type UploadFilterData = {
  type: UploadFilterType;
  id: UploadFilterIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `UploadFilter`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UploadFilterAttributes = {
  /**
   * The name of the filter
   */
  name: string;
  /**
   * The actual filter
   */
  filter: {
    [k: string]: unknown;
  };
  /**
   * Whether it's a shared filter or not
   */
  shared: boolean;
};
/**
 * This interface was referenced by `UploadFilter`'s JSON-Schema
 * via the `create.schema` link.
 */
export type UploadFilterCreateSchema = {
  id?: UploadFilterIdentity;
  type?: UploadFilterType;
  /**
   * The name of the filter
   */
  name: string;
  /**
   * The actual filter
   */
  filter: {
    [k: string]: unknown;
  };
  /**
   * Whether it's a shared filter or not
   */
  shared: boolean;
};
/**
 * This interface was referenced by `UploadFilter`'s JSON-Schema
 * via the `update.schema` link.
 */
export type UploadFilterUpdateSchema = {
  id?: UploadFilterIdentity;
  type?: UploadFilterType;
  /**
   * The name of the filter
   */
  name: string;
  /**
   * Whether it's a shared filter or not
   */
  shared?: boolean;
  /**
   * The actual filter
   */
  filter: {
    [k: string]: unknown;
  };
};
/**
 * A DatoCMS administrative area can be accessed by multiple people. Every invitation is linked to a specific Role, which describes what actions it will be able to perform once the user will register.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "site_invitation".
 */
export type SiteInvitation = {
  id: SiteInvitationIdentity;
  type: SiteInvitationType;
  /**
   * Email
   */
  email: string;
  /**
   * Whether this invitation has expired
   */
  expired: boolean;
  /**
   * The link to join a DatoCMS project. Shown only on creation and reset
   */
  invitation_link?: null | string;
  role: RoleData;
};
export type SiteInvitationCreateTargetSchema = SiteInvitation;
export type SiteInvitationUpdateTargetSchema = SiteInvitation;
export type SiteInvitationSelfTargetSchema = SiteInvitation;
export type SiteInvitationDestroyTargetSchema = SiteInvitation;
export type SiteInvitationResendTargetSchema = SiteInvitation;
/**
 * JSON API data
 *
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `definition` "data".
 */
export type SiteInvitationData = {
  type: SiteInvitationType;
  id: SiteInvitationIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SiteInvitationAttributes = {
  /**
   * Email
   */
  email: string;
  /**
   * Whether this invitation has expired
   */
  expired: boolean;
  /**
   * The link to join a DatoCMS project. Shown only on creation and reset
   */
  invitation_link?: null | string;
};
/**
 * JSON API links
 *
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SiteInvitationRelationships = {
  role: RoleData;
};
/**
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `create.schema` link.
 */
export type SiteInvitationCreateSchema = {
  type?: SiteInvitationType;
  /**
   * Email
   */
  email: string;
  role: RoleData;
};
/**
 * This interface was referenced by `SiteInvitation`'s JSON-Schema
 * via the `update.schema` link.
 */
export type SiteInvitationUpdateSchema = {
  id?: SiteInvitationIdentity;
  type?: SiteInvitationType;
  role?: RoleData;
};
/**
 * Session track users movements in the administrative area, and allows locking a record when editing it.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "editing_session".
 */
export type EditingSession = {
  id: EditingSessionIdentity;
  type: EditingSessionType;
  /**
   * User entered at
   */
  last_activity_at: string | null;
  /**
   * User locked record at
   */
  locked_at: string | null;
  active_item: ItemData;
  active_item_type: ItemTypeData;
  editor:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
};
export type EditingSessionDestroyTargetSchema = EditingSession;
/**
 * JSON API data
 *
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `definition` "data".
 */
export type EditingSessionData = {
  type: EditingSessionType;
  id: EditingSessionIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type EditingSessionAttributes = {
  /**
   * User entered at
   */
  last_activity_at: string | null;
  /**
   * User locked record at
   */
  locked_at: string | null;
};
/**
 * JSON API links
 *
 * This interface was referenced by `EditingSession`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type EditingSessionRelationships = {
  active_item: ItemData;
  active_item_type: ItemTypeData;
  editor:
    | AccountData
    | AccessTokenData
    | UserData
    | SsoUserData
    | OrganizationData;
};
/**
 * Form contents for an editing session
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "form_data".
 */
export type FormData = {
  id: FormDataIdentity;
  type: FormDataType;
  form_data: null | {
    [k: string]: unknown;
  };
  editor: AccountData;
};
/**
 * JSON API data
 *
 * This interface was referenced by `FormData`'s JSON-Schema
 * via the `definition` "data".
 */
export type FormDataData = {
  type: FormDataType;
  id: FormDataIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `FormData`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type FormDataAttributes = {
  form_data: null | {
    [k: string]: unknown;
  };
};
/**
 * JSON API links
 *
 * This interface was referenced by `FormData`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type FormDataRelationships = {
  editor: AccountData;
};
/**
 * A Single Sign-On group exists when a DatoCMS project is connected to an Identity Provider. These groups can be used to link DatoCMS roles to the Identity Provider's groups.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "sso_group".
 */
export type SsoGroup = {
  id: SsoGroupIdentity;
  type: SsoGroupType;
  /**
   * Name of the group
   */
  name: string;
  /**
   * When an user belongs to multiple groups, the role associated to the group with the highest priority will be used
   */
  priority: number;
  role: RoleData;
  users: SsoUserData[];
};
export type SsoGroupCopyRolesTargetSchema = SsoGroup;
export type SsoGroupUpdateTargetSchema = SsoGroup;
export type SsoGroupDestroyTargetSchema = SsoGroup;
/**
 * JSON API attributes
 *
 * This interface was referenced by `SsoGroup`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SsoGroupAttributes = {
  /**
   * Name of the group
   */
  name: string;
  /**
   * When an user belongs to multiple groups, the role associated to the group with the highest priority will be used
   */
  priority: number;
};
/**
 * JSON API links
 *
 * This interface was referenced by `SsoGroup`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SsoGroupRelationships = {
  role: RoleData;
  users: SsoUserData[];
};
/**
 * This interface was referenced by `SsoGroup`'s JSON-Schema
 * via the `update.schema` link.
 */
export type SsoGroupUpdateSchema = {
  id?: SsoGroupIdentity;
  type?: SsoGroupType;
  /**
   * When an user belongs to multiple groups, the role associated to the group with the highest priority will be used
   */
  priority: number;
  role: RoleData;
};
/**
 * Represents the Single Sign-on settings of the current DatoCMS project
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "sso_settings".
 */
export type SsoSettings = {
  id: SsoSettingsIdentity;
  type: SsoSettingsType;
  /**
   * URL of Identity Provider SAML Metadata endpoint
   */
  idp_saml_metadata_url: null | string;
  /**
   * Identity Provider SAML Metadata
   */
  idp_saml_metadata_xml?: null | string;
  /**
   * DatoCMS SCIM base URL
   */
  scim_base_url: string;
  /**
   * DatoCMS SAML ACS URL
   */
  saml_acs_url: string;
  /**
   * DatoCMS SAML Metadata URL
   */
  sp_saml_metadata_url: string;
  /**
   * DatoCMS SAML Base URL
   */
  sp_saml_base_url: string;
  /**
   * DatoCMS SAML Token
   */
  saml_token: string;
  /**
   * DatoCMS SCIM API Token
   */
  scim_api_token?: string;
  default_role: null | RoleData;
};
export type SsoSettingsSelfTargetSchema = SsoSettings;
export type SsoSettingsUpdateTargetSchema = SsoSettings;
/**
 * JSON API data
 *
 * This interface was referenced by `SsoSettings`'s JSON-Schema
 * via the `definition` "data".
 */
export type SsoSettingsData = {
  type: SsoSettingsType;
  id: SsoSettingsIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `SsoSettings`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SsoSettingsAttributes = {
  /**
   * URL of Identity Provider SAML Metadata endpoint
   */
  idp_saml_metadata_url: null | string;
  /**
   * Identity Provider SAML Metadata
   */
  idp_saml_metadata_xml?: null | string;
  /**
   * DatoCMS SCIM base URL
   */
  scim_base_url: string;
  /**
   * DatoCMS SAML ACS URL
   */
  saml_acs_url: string;
  /**
   * DatoCMS SAML Metadata URL
   */
  sp_saml_metadata_url: string;
  /**
   * DatoCMS SAML Base URL
   */
  sp_saml_base_url: string;
  /**
   * DatoCMS SAML Token
   */
  saml_token: string;
  /**
   * DatoCMS SCIM API Token
   */
  scim_api_token?: string;
};
/**
 * JSON API links
 *
 * This interface was referenced by `SsoSettings`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SsoSettingsRelationships = {
  default_role: null | RoleData;
};
/**
 * This interface was referenced by `SsoSettings`'s JSON-Schema
 * via the `generate_token.targetSchema` link.
 */
export type SsoSettingsGenerateTokenTargetSchema = {
  id: SsoSettingsIdentity;
  type: 'sso_token';
  attributes: {
    /**
     * DatoCMS SCIM API Token
     */
    scim_api_token: string;
  };
  [k: string]: unknown;
};
/**
 * This interface was referenced by `SsoSettings`'s JSON-Schema
 * via the `update.schema` link.
 */
export type SsoSettingsUpdateSchema = {
  id?: SsoSettingsIdentity;
  type?: SsoSettingsType;
  /**
   * URL of Identity Provider SAML Metadata endpoint
   */
  idp_saml_metadata_url?: null | string;
  /**
   * Identity Provider SAML Metadata
   */
  idp_saml_metadata_xml?: null | string;
  default_role?: RoleData;
};
/**
 * The entity suggests several emojis that are connected to a specific term
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "emoji_suggestions".
 */
export type EmojiSuggestions = {
  id: EmojiSuggestionsIdentity;
  type: EmojiSuggestionsType;
  /**
   * Emojis connected to a specific term
   */
  emojis: string[];
};
export type EmojiSuggestionsSelfTargetSchema = EmojiSuggestions;
/**
 * JSON API data
 *
 * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
 * via the `definition` "data".
 */
export type EmojiSuggestionsData = {
  type: EmojiSuggestionsType;
  id: EmojiSuggestionsIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type EmojiSuggestionsAttributes = {
  /**
   * Emojis connected to a specific term
   */
  emojis: string[];
};
/**
 * Represents the white-label settings of the current DatoCMS project
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "white_label_settings".
 */
export type WhiteLabelSettings = {
  id: WhiteLabelSettingsIdentity;
  type: WhiteLabelSettingsType;
  /**
   * URL of custom I18n messages. The :locale placeholder represents the current DatoCMS UI locale.
   */
  custom_i18n_messages_template_url: null | string;
};
export type WhiteLabelSettingsSelfTargetSchema = WhiteLabelSettings;
export type WhiteLabelSettingsUpdateTargetSchema = WhiteLabelSettings;
/**
 * JSON API data
 *
 * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
 * via the `definition` "data".
 */
export type WhiteLabelSettingsData = {
  type: WhiteLabelSettingsType;
  id: WhiteLabelSettingsIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type WhiteLabelSettingsAttributes = {
  /**
   * URL of custom I18n messages. The :locale placeholder represents the current DatoCMS UI locale.
   */
  custom_i18n_messages_template_url: null | string;
};
/**
 * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
 * via the `update.schema` link.
 */
export type WhiteLabelSettingsUpdateSchema = {
  id?: WhiteLabelSettingsIdentity;
  type?: WhiteLabelSettingsType;
  /**
   * URL of custom I18n messages. The :locale placeholder represents the current DatoCMS UI locale.
   */
  custom_i18n_messages_template_url?: null | string;
};
/**
 * Info that can be accessed by unauthorized users
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "public_info".
 */
export type PublicInfo = {
  id: PublicInfoIdentity;
  type: PublicInfoType;
  /**
   * Site name
   */
  name: string;
  /**
   * Specifies the Single Sign-on URL to reach
   */
  sso_saml_init_url: null | string;
  /**
   * Specifies the logo url if present
   */
  logo_url: null | string;
  /**
   * Specifies whether the project is in white-label mode
   */
  white_label: boolean;
  /**
   * Template URL to download specific I18n messages (for white-label projects only)
   */
  custom_i18n_messages_template_url: null | string;
  /**
   * Specifies the color-scheme for the project
   */
  theme: {
    primary_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
      [k: string]: unknown;
    };
    light_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    accent_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    dark_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
  };
  /**
   * Additional information (only returned on authenticated requests)
   */
  extras: null | {
    blocks_depth: number;
    blocks_per_item: number;
    maximum_single_upload_bytes: number;
    [k: string]: unknown;
  };
};
export type PublicInfoSelfTargetSchema = PublicInfo;
/**
 * JSON API data
 *
 * This interface was referenced by `PublicInfo`'s JSON-Schema
 * via the `definition` "data".
 */
export type PublicInfoData = {
  type: PublicInfoType;
  id: PublicInfoIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `PublicInfo`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type PublicInfoAttributes = {
  /**
   * Site name
   */
  name: string;
  /**
   * Specifies the Single Sign-on URL to reach
   */
  sso_saml_init_url: null | string;
  /**
   * Specifies the logo url if present
   */
  logo_url: null | string;
  /**
   * Specifies whether the project is in white-label mode
   */
  white_label: boolean;
  /**
   * Template URL to download specific I18n messages (for white-label projects only)
   */
  custom_i18n_messages_template_url: null | string;
  /**
   * Specifies the color-scheme for the project
   */
  theme: {
    primary_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
      [k: string]: unknown;
    };
    light_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    accent_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    dark_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
  };
  /**
   * Additional information (only returned on authenticated requests)
   */
  extras: null | {
    blocks_depth: number;
    blocks_per_item: number;
    maximum_single_upload_bytes: number;
    [k: string]: unknown;
  };
};
/**
 * DatoCMS resources usage organized by day
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "daily_usage".
 */
export type DailyUsage = {
  id: DailyUsageIdentity;
  type: DailyUsageType;
  /**
   * The date the data are referring to
   */
  date: string;
  /**
   * Number of API calls to content delivery API
   */
  cda_api_calls: number;
  /**
   * Number of API calls to content management API
   */
  cma_api_calls: number;
  /**
   * Content delivery API traffic
   */
  cda_traffic_bytes: number;
  /**
   * Content management API traffic
   */
  cma_traffic_bytes: number;
  /**
   * Uploads requests traffic
   */
  assets_traffic_bytes: number;
  /**
   * Regular video streaming (max 1080p), in seconds
   */
  mux_delivered_seconds: number;
  /**
   * High-res video streaming (> 1080p), in seconds
   */
  mux_high_resolution_delivered_seconds: number;
  /**
   * Video encoding seconds
   */
  mux_encoded_seconds: number;
  /**
   * Number of images analyzed for smart tags
   */
  smart_tags_detections: number;
};
/**
 * JSON API data
 *
 * This interface was referenced by `DailyUsage`'s JSON-Schema
 * via the `definition` "data".
 */
export type DailyUsageData = {
  type: DailyUsageType;
  id: DailyUsageIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `DailyUsage`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type DailyUsageAttributes = {
  /**
   * The date the data are referring to
   */
  date: string;
  /**
   * Number of API calls to content delivery API
   */
  cda_api_calls: number;
  /**
   * Number of API calls to content management API
   */
  cma_api_calls: number;
  /**
   * Content delivery API traffic
   */
  cda_traffic_bytes: number;
  /**
   * Content management API traffic
   */
  cma_traffic_bytes: number;
  /**
   * Uploads requests traffic
   */
  assets_traffic_bytes: number;
  /**
   * Regular video streaming (max 1080p), in seconds
   */
  mux_delivered_seconds: number;
  /**
   * High-res video streaming (> 1080p), in seconds
   */
  mux_high_resolution_delivered_seconds: number;
  /**
   * Video encoding seconds
   */
  mux_encoded_seconds: number;
  /**
   * Number of images analyzed for smart tags
   */
  smart_tags_detections: number;
};
/**
 * You can use counters to analyze your project's data consumption over a period of time. Counters are especially useful if your project is exceeding its API calls/traffic quota limits, to better understand where and how requests are originating. Counters are updated every minute, so you can debug in real-time the results of your changes.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "usage_counter".
 */
export type UsageCounter = {
  id: UsageCounterIdentity;
  type: UsageCounterType;
  result: {
    /**
     * Occurrence
     */
    value: string;
    /**
     * Counter for the specified occurrence
     */
    counter: number;
  }[];
};
export type UsageCounterSelfTargetSchema = UsageCounter;
/**
 * JSON API data
 *
 * This interface was referenced by `UsageCounter`'s JSON-Schema
 * via the `definition` "data".
 */
export type UsageCounterData = {
  type: UsageCounterType;
  id: UsageCounterIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `UsageCounter`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UsageCounterAttributes = {
  result: {
    /**
     * Occurrence
     */
    value: string;
    /**
     * Counter for the specified occurrence
     */
    counter: number;
  }[];
};
/**
 * All the project's upload tags
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "upload_tag".
 */
export type UploadTag = {
  id: UploadTagIdentity;
  type: UploadTagType;
  /**
   * The tag name
   */
  name: string;
};
export type UploadTagCreateTargetSchema = UploadTag;
/**
 * JSON API data
 *
 * This interface was referenced by `UploadTag`'s JSON-Schema
 * via the `definition` "data".
 */
export type UploadTagData = {
  type: UploadTagType;
  id: UploadTagIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `UploadTag`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UploadTagAttributes = {
  /**
   * The tag name
   */
  name: string;
};
/**
 * This interface was referenced by `UploadTag`'s JSON-Schema
 * via the `create.schema` link.
 */
export type UploadTagCreateSchema = {
  type?: UploadTagType;
  /**
   * The tag name
   */
  name: string;
};
/**
 * All the site's upload automatically generated tags
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "upload_smart_tag".
 */
export type UploadSmartTag = {
  id: UploadSmartTagIdentity;
  type: UploadSmartTagType;
  /**
   * The tag name
   */
  name: string;
};
/**
 * JSON API data
 *
 * This interface was referenced by `UploadSmartTag`'s JSON-Schema
 * via the `definition` "data".
 */
export type UploadSmartTagData = {
  type: UploadSmartTagType;
  id: UploadSmartTagIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `UploadSmartTag`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type UploadSmartTagAttributes = {
  /**
   * The tag name
   */
  name: string;
};
/**
 * A site represents a specific DatoCMS administrative area
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "site".
 */
export type Site = {
  id: SiteIdentity;
  type: SiteType;
  /**
   * Site name
   */
  name: string;
  /**
   * Administrative area custom domain
   */
  domain: string | null;
  /**
   * Google API Key to be used by the LatLon widget
   */
  google_maps_api_token: string | null;
  /**
   * Imgix host
   */
  imgix_host: string | null;
  /**
   * DatoCMS internal domain for the administrative area
   */
  internal_domain: string | null;
  /**
   * Available locales
   */
  locales: [string, ...string[]];
  /**
   * Site default timezone
   */
  timezone: string;
  /**
   * Whether the website needs to be indexed by search engines or not
   */
  no_index: boolean;
  /**
   * The upload id for the favicon
   */
  favicon: string | null;
  /**
   * Specifies the last time when a change of data occurred
   */
  last_data_change_at: null | string;
  /**
   * Specifies whether all users of this site need to authenticate using two-factor authentication
   */
  require_2fa: boolean;
  /**
   * Specifies whether you want IPs to be tracked in the Project usages section
   */
  ip_tracking_enabled: boolean;
  /**
   * If enabled, blocks schema changes of primary environment
   */
  force_use_of_sandbox_environments: boolean;
  /**
   * Allows setting default parameters for assets served through the CDN
   */
  assets_cdn_default_settings: {
    /**
     * Allows setting default parameters for optimizing images served by the CDN
     */
    image: {
      /**
       * Controls the output quality of lossy file formats (jpg, pjpg, webp, avif, or jxr). Valid values are in the range 0 – 100 and the default is 75.
       */
      q?: number;
      /**
       * The auto parameter helps automating a baseline level of optimization. Specify one or more settings
       */
      auto?: ('compress' | 'format' | 'enhance' | 'true' | 'redeye')[];
      /**
       * Specifies the color space of the output image
       */
      cs?: 'srgb' | 'adobergb1998' | 'tinysrgb' | 'strip' | 'origin';
    };
    /**
     * Allows setting default parameters for optimizing videos served by the CDN
     */
    video: {
      /**
       * When true, attempting to retrieve raw video files directly instead of their optimized counterparts will result in a HTTP 422 status code
       */
      disable_serving_raw_videos?: boolean;
    };
  };
  /**
   * Specifies the theme to use in administrative area
   */
  theme: {
    /**
     * If type is monochromatic, the hue will determine the color palette. Dark color is a legacy property, and it won't be used on the interface
     */
    type: 'custom' | 'monochromatic';
    /**
     * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
     */
    hue: number | null;
    primary_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    light_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    accent_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    dark_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    /**
     * The upload ID that is used as the logo for the project
     */
    logo: string | null;
  };
  /**
   * Specifies default global settings
   */
  global_seo: {
    /**
     * Site name, used in social sharing
     */
    site_name?: string;
    fallback_seo?: {
      title: string;
      description: string;
      /**
       * The id of the image
       */
      image: null | string;
      /**
       * Determines how a Twitter link preview is shown
       */
      twitter_card?: null | ('summary' | 'summary_large_image');
      [k: string]: unknown;
    };
    /**
     * Title meta tag suffix
     */
    title_suffix?: null | string;
    /**
     * URL of facebook page
     */
    facebook_page_url?: null | string;
    /**
     * Twitter account associated to website
     */
    twitter_account?: null | string;
    [k: string]: unknown;
  } | null;
  account: null | AccountData;
  owner: AccountData | OrganizationData;
  /**
   * The list item types for the site
   */
  item_types: ItemTypeData[];
  meta: SiteMeta;
};
export type SiteSelfTargetSchema = Site;
export type SiteUpdateJobSchema = Site;
export type SiteActivateImprovedTimezoneManagementJobSchema = Site;
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 SiteActivateImprovedExposureOfInlineBlocksInCdaTargetSchema = Site;
export type SiteActivateImprovedItemsListingTargetSchema = Site;
export type SiteActivateMillisecondsInDatetimeTargetSchema = Site;
export type SiteUpdateAssetsCdnDefaultSettingsTargetSchema = Site;
/**
 * Meta attributes
 *
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `definition` "meta".
 */
export type SiteMeta = {
  /**
   * Date of project creation
   */
  created_at: string;
  /**
   * The default value for the draft mode option in all the environment's models
   */
  draft_mode_default: boolean;
  /**
   * Whether the site has custom upload storage settings
   */
  custom_upload_storage_settings?: boolean;
  /**
   * Whether the [Improved API Timezone Management](https://www.datocms.com/product-updates/improved-timezone-management) opt-in product update is active or not
   */
  improved_timezone_management: boolean;
  /**
   * Whether the [Improved API Hex Management](https://www.datocms.com/product-updates/improved-hex-management) opt-in product update is active or not
   */
  improved_hex_management: boolean;
  /**
   * Whether the [Improved GraphQL multi-locale fields](https://www.datocms.com/product-updates/improved-gql-multilocale-fields) opt-in product update is active or not
   */
  improved_gql_multilocale_fields: boolean;
  /**
   * Whether the [Improved GraphQL visibility control](https://www.datocms.com/product-updates/improved-gql-visibility-control) opt-in product update is active or not
   */
  improved_gql_visibility_control: boolean;
  /**
   * Whether the [Improved boolean fields](https://www.datocms.com/product-updates/improved-boolean-fields) opt-in product update is active or not
   */
  improved_boolean_fields: boolean;
  /**
   * Whether the [Improved validation at publishing](https://www.datocms.com/product-updates/force-validations-on-records-when-publishing) opt-in product update is active or not
   */
  improved_validation_at_publishing: boolean;
  /**
   * Whether the [Improved exposure of inline blocks in the Content Delivery API](https://www.datocms.com/product-updates/improved-exposure-of-inline-blocks-in-cda) opt-in product update is active or not
   */
  improved_exposure_of_inline_blocks_in_cda: boolean;
  /**
   * Whether the [Improved items listing](https://www.datocms.com/product-updates/improved-items-listing) opt-in product update is active or not
   */
  improved_items_listing: boolean;
  /**
   * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
   */
  milliseconds_in_datetime: boolean;
};
/**
 * JSON API data
 *
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `definition` "data".
 */
export type SiteData = {
  type: SiteType;
  id: SiteIdentity;
};
/**
 * JSON API attributes
 *
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type SiteAttributes = {
  /**
   * Site name
   */
  name: string;
  /**
   * Administrative area custom domain
   */
  domain: string | null;
  /**
   * Google API Key to be used by the LatLon widget
   */
  google_maps_api_token: string | null;
  /**
   * Imgix host
   */
  imgix_host: string | null;
  /**
   * DatoCMS internal domain for the administrative area
   */
  internal_domain: string | null;
  /**
   * Available locales
   */
  locales: [string, ...string[]];
  /**
   * Site default timezone
   */
  timezone: string;
  /**
   * Whether the website needs to be indexed by search engines or not
   */
  no_index: boolean;
  /**
   * The upload id for the favicon
   */
  favicon: string | null;
  /**
   * Specifies the last time when a change of data occurred
   */
  last_data_change_at: null | string;
  /**
   * Specifies whether all users of this site need to authenticate using two-factor authentication
   */
  require_2fa: boolean;
  /**
   * Specifies whether you want IPs to be tracked in the Project usages section
   */
  ip_tracking_enabled: boolean;
  /**
   * If enabled, blocks schema changes of primary environment
   */
  force_use_of_sandbox_environments: boolean;
  /**
   * Allows setting default parameters for assets served through the CDN
   */
  assets_cdn_default_settings: {
    /**
     * Allows setting default parameters for optimizing images served by the CDN
     */
    image: {
      /**
       * Controls the output quality of lossy file formats (jpg, pjpg, webp, avif, or jxr). Valid values are in the range 0 – 100 and the default is 75.
       */
      q?: number;
      /**
       * The auto parameter helps automating a baseline level of optimization. Specify one or more settings
       */
      auto?: ('compress' | 'format' | 'enhance' | 'true' | 'redeye')[];
      /**
       * Specifies the color space of the output image
       */
      cs?: 'srgb' | 'adobergb1998' | 'tinysrgb' | 'strip' | 'origin';
    };
    /**
     * Allows setting default parameters for optimizing videos served by the CDN
     */
    video: {
      /**
       * When true, attempting to retrieve raw video files directly instead of their optimized counterparts will result in a HTTP 422 status code
       */
      disable_serving_raw_videos?: boolean;
    };
  };
  /**
   * Specifies the theme to use in administrative area
   */
  theme: {
    /**
     * If type is monochromatic, the hue will determine the color palette. Dark color is a legacy property, and it won't be used on the interface
     */
    type: 'custom' | 'monochromatic';
    /**
     * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
     */
    hue: number | null;
    primary_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    light_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    accent_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    dark_color: {
      red: number;
      green: number;
      blue: number;
      alpha: number;
    };
    /**
     * The upload ID that is used as the logo for the project
     */
    logo: string | null;
  };
  /**
   * Specifies default global settings
   */
  global_seo: {
    /**
     * Site name, used in social sharing
     */
    site_name?: string;
    fallback_seo?: {
      title: string;
      description: string;
      /**
       * The id of the image
       */
      image: null | string;
      /**
       * Determines how a Twitter link preview is shown
       */
      twitter_card?: null | ('summary' | 'summary_large_image');
      [k: string]: unknown;
    };
    /**
     * Title meta tag suffix
     */
    title_suffix?: null | string;
    /**
     * URL of facebook page
     */
    facebook_page_url?: null | string;
    /**
     * Twitter account associated to website
     */
    twitter_account?: null | string;
    [k: string]: unknown;
  } | null;
};
/**
 * JSON API links
 *
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `definition` "relationships".
 */
export type SiteRelationships = {
  account: null | AccountData;
  owner: AccountData | OrganizationData;
  /**
   * The list item types for the site
   */
  item_types: ItemTypeData[];
};
/**
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `update.schema` link.
 */
export type SiteUpdateSchema = {
  id?: SiteIdentity;
  type?: SiteType;
  /**
   * Whether the website needs to be indexed by search engines or not
   */
  no_index?: boolean;
  /**
   * The upload id for the favicon
   */
  favicon?: string | null;
  /**
   * Specifies default global settings
   */
  global_seo?: {
    /**
     * Site name, used in social sharing
     */
    site_name?: string;
    fallback_seo?: {
      title: string;
      description: string;
      /**
       * The id of the image
       */
      image: null | string;
      /**
       * Determines how a Twitter link preview is shown
       */
      twitter_card?: null | ('summary' | 'summary_large_image');
      [k: string]: unknown;
    };
    /**
     * Title meta tag suffix
     */
    title_suffix?: null | string;
    /**
     * URL of facebook page
     */
    facebook_page_url?: null | string;
    /**
     * Twitter account associated to website
     */
    twitter_account?: null | string;
    [k: string]: unknown;
  } | null;
  /**
   * Site name
   */
  name?: string;
  theme?:
    | {
        /**
         * Type of theme color palette
         */
        type: 'monochromatic';
        /**
         * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
         */
        hue: number | null;
        /**
         * The upload ID that is used as the logo for the project
         */
        logo: string | null;
        [k: string]: unknown;
      }
    | {
        /**
         * Type of theme color palette
         */
        type?: 'custom';
        /**
         * The upload ID that is used as the logo for the project
         */
        logo: string | null;
        primary_color: {
          red: number;
          green: number;
          blue: number;
          alpha: number;
        };
        light_color: {
          red: number;
          green: number;
          blue: number;
          alpha: number;
        };
        accent_color: {
          red: number;
          green: number;
          blue: number;
          alpha: number;
        };
        dark_color?: {
          red: number;
          green: number;
          blue: number;
          alpha: number;
        };
        [k: string]: unknown;
      };
  /**
   * Available locales
   */
  locales?: [string, ...string[]];
  /**
   * Site default timezone
   */
  timezone?: string;
  /**
   * Specifies whether all users of this site need to authenticate using two-factor authentication
   */
  require_2fa?: boolean;
  /**
   * Specifies whether you want IPs to be tracked in the Project usages section
   */
  ip_tracking_enabled?: boolean;
  /**
   * If enabled, blocks schema changes of primary environment
   */
  force_use_of_sandbox_environments?: boolean;
  sso_default_role?: RoleData;
  meta?: {
    /**
     * Whether the [Improved API Timezone Management](https://www.datocms.com/product-updates/improved-timezone-management) opt-in product update is active or not
     */
    improved_timezone_management?: boolean;
    /**
     * Whether the [Improved API Hex Management](https://www.datocms.com/product-updates/improved-hex-management) opt-in product update is active or not
     */
    improved_hex_management?: boolean;
    /**
     * Whether the [Improved GraphQL multi-locale fields](https://www.datocms.com/product-updates/improved-gql-multilocale-fields) opt-in product update is active or not
     */
    improved_gql_multilocale_fields?: boolean;
    /**
     * Whether the [Improved GraphQL visibility control](https://www.datocms.com/product-updates/improved-gql-visibility-control) opt-in product update is active or not
     */
    improved_gql_visibility_control?: boolean;
    /**
     * Whether the [Improved boolean fields](https://www.datocms.com/product-updates/improved-boolean-fields) opt-in product update 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](https://www.datocms.com/product-updates/force-validations-on-records-when-publishing) opt-in product update is active or not
     */
    improved_validation_at_publishing?: boolean;
    /**
     * Whether the site has custom upload storage settings
     */
    custom_upload_storage_settings?: boolean;
    /**
     * Whether the [Improved exposure of inline blocks in the Content Delivery API](https://www.datocms.com/product-updates/improved-exposure-of-inline-blocks-in-cda) opt-in product update is active or not
     */
    improved_exposure_of_inline_blocks_in_cda?: boolean;
    /**
     * Whether the [Improved items listing](https://www.datocms.com/product-updates/improved-items-listing) opt-in product update is active or not
     */
    improved_items_listing?: boolean;
    /**
     * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
     */
    milliseconds_in_datetime?: boolean;
  };
};
/**
 * This interface was referenced by `Site`'s JSON-Schema
 * via the `update_assets_cdn_default_settings.schema` link.
 */
export type SiteUpdateAssetsCdnDefaultSettingsSchema = {
  type?: string;
  /**
   * Allows setting default parameters for assets served through the CDN
   */
  assets_cdn_default_settings: {
    /**
     * Allows setting default parameters for optimizing images served by the CDN
     */
    image: {
      /**
       * Controls the output quality of lossy file formats (jpg, pjpg, webp, avif, or jxr). Valid values are in the range 0 – 100 and the default is 75.
       */
      q?: number;
      /**
       * The auto parameter helps automating a baseline level of optimization. Specify one or more settings
       */
      auto?: ('compress' | 'format' | 'enhance' | 'true' | 'redeye')[];
      /**
       * Specifies the color space of the output image
       */
      cs?: 'srgb' | 'adobergb1998' | 'tinysrgb' | 'strip' | 'origin';
    };
    /**
     * Allows setting default parameters for optimizing videos served by the CDN
     */
    video: {
      /**
       * When true, attempting to retrieve raw video files directly instead of their optimized counterparts will result in a HTTP 422 status code
       */
      disable_serving_raw_videos?: boolean;
    };
  };
};
/**
 * Through workflows it is possible to set up a precise state machine able to bring a draft content up to the final publication (and beyond), through a series of intermediate, fully customizable approval steps.
 *
 * This interface was referenced by `DatoApi`'s JSON-Schema
 * via the `definition` "workflow".
 */
export type Workflow = {
  id: WorkflowIdentity;
  type: WorkflowType;
  /**
   * The name of the workflow
   */
  name: string;
  /**
   * Workflow API key
   */
  api_key: string;
  /**
   * The stages of the workflow
   */
  stages: [
    {
      /**
       * ID of the stage
       */
      id: string;
      /**
       * Name of the stage
       */
      name: string;
      /**
       * Description of the stage
       */
      description?: string | null;
      /**
       * Whether this is the initial stage or not
       */
      initial?: boolean;
    },
    ...{
      /**
       * ID of the stage
       */
      id: string;
      /**
       * Name of the stage
       */
      name: string;
      /**
       * Description of the stage
       */
      description?: string | null;
      /**
       * Whether this is the initial stage or not
       */
      initial?: boolean;
    }[],
  ];
};
export type WorkflowCreateTargetSchema = Workflow;
export type WorkflowUpdateTargetSchema = Workflow;
export type WorkflowSelfTargetSchema = Workflow;
/**
 * JSON API attributes
 *
 * This interface was referenced by `Workflow`'s JSON-Schema
 * via the `definition` "attributes".
 */
export type WorkflowAttributes = {
  /**
   * The name of the workflow
   */
  name: string;
  /**
   * Workflow API key
   */
  api_key: string;
  /**
   * The stages of the workflow
   */
  stages: [
    {
      /**
       * ID of the stage
       */
      id: string;
      /**
       * Name of the stage
       */
      name: string;
      /**
       * Description of the stage
       */
      description?: string | null;
      /**
       * Whether this is the initial stage or not
       */
      initial?: boolean;
    },
    ...{
      /**
       * ID of the stage
       */
      id: string;
      /**
       * Name of the stage
       */
      name: string;
      /**
       * Description of the stage
       */
      description?: string | null;
      /**
       * Whether this is the initial stage or not
       */
      initial?: boolean;
    }[],
  ];
};
/**
 * This interface was referenced by `Workflow`'s JSON-Schema
 * via the `create.schema` link.
 */
export type WorkflowCreateSchema = {
  id?: WorkflowIdentity;
  type?: WorkflowType;
  /**
   * The name of the workflow
   */
  name: string;
  /**
   * Workflow API key
   */
  api_key: string;
  /**
   * The stages of the workflow
   */
  stages: [
    {
      /**
       * ID of the stage
       */
      id: string;
      /**
       * Name of the stage
       */
      name: string;
      /**
       * Description of the stage
       */
      description?: string | null;
      /**
       * Whether this is the initial stage or not
       */
      initial?: boolean;
    },
    ...{
      /**
       * ID of the stage
       */
      id: string;
      /**
       * Name of the stage
       */
      name: string;
      /**
       * Description of the stage
       */
      description?: string | null;
      /**
       * Whether this is the initial stage or not
       */
      initial?: boolean;
    }[],
  ];
};
/**
 * This interface was referenced by `Workflow`'s JSON-Schema
 * via the `update.schema` link.
 */
export type WorkflowUpdateSchema = {
  id?: WorkflowIdentity;
  type?: WorkflowType;
  /**
   * The name of the workflow
   */
  name?: string;
  /**
   * Workflow API key
   */
  api_key?: string;
  /**
   * The stages of the workflow
   */
  stages?: [
    {
      /**
       * ID of the stage
       */
      id: string;
      /**
       * Name of the stage
       */
      name: string;
      /**
       * Description of the stage
       */
      description?: string | null;
      /**
       * Whether this is the initial stage or not
       */
      initial?: boolean;
    },
    ...{
      /**
       * ID of the stage
       */
      id: string;
      /**
       * Name of the stage
       */
      name: string;
      /**
       * Description of the stage
       */
      description?: string | null;
      /**
       * Whether this is the initial stage or not
       */
      initial?: boolean;
    }[],
  ];
};
