UNPKG

@datocms/cma-client

Version:
1,578 lines 366 kB
import type { FieldCreateConfig, FieldUpdateConfig, GenericFieldAttributes } from '../fieldTypes/schema'; import type { ItemTypeDefinition, ToItemAttributes, ToItemAttributesInNestedResponse, ToItemAttributesInRequest, ToItemHrefSchemaField, ToItemHrefSchemaOrderBy } from '../utilities/itemDefinition'; export type Field = FieldStableShell; export type FieldAttributes = GenericFieldAttributes<FieldAttributesStableShell>; export type FieldCreateSchema = Omit<FieldCreateSchemaStableShell, 'data'> & { data: Omit<FieldCreateSchemaStableShell['data'], 'attributes'> & { attributes: FieldCreateConfig<FieldCreateSchemaStableShell['data']['attributes']>; }; }; export type FieldUpdateSchema = Omit<FieldUpdateSchemaStableShell, 'data'> & { data: Omit<FieldUpdateSchemaStableShell['data'], 'attributes'> & { attributes: FieldUpdateConfig<FieldUpdateSchemaStableShell['data']['attributes']>; }; }; export type ItemTypeData<D extends ItemTypeDefinition = ItemTypeDefinition> = { type: ItemTypeType; id: D extends ItemTypeDefinition ? D['itemTypeId'] : ItemTypeIdentity; }; export type Item<D extends ItemTypeDefinition = ItemTypeDefinition> = { __itemTypeId?: D['itemTypeId']; type: ItemType1; id: ItemIdentity; relationships: ItemRelationships<D>; meta: ItemMeta; attributes: ToItemAttributes<D>; }; export type ItemInNestedResponse<D extends ItemTypeDefinition = ItemTypeDefinition> = { __itemTypeId?: D['itemTypeId']; type: ItemType1; id: ItemIdentity; relationships: ItemRelationships<D>; meta: ItemMeta; attributes: ToItemAttributesInNestedResponse<D>; }; /** * This file was automatically generated by hyperschema-to-ts: DO NOT MODIFY IT BY HAND. */ /** * This interface was referenced by `Role`'s JSON-Schema * via the `definition` "type". */ export type RoleType = 'role'; /** * 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; /** * 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; /** * 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 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 `User`'s JSON-Schema * via the `definition` "type". */ export type UserType = 'user'; /** * 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 `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 `SsoUser`'s JSON-Schema * via the `definition` "type". */ export type SsoUserType = 'sso_user'; /** * 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 `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 `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; }; /** * This interface was referenced by `AccessToken`'s JSON-Schema * via the `definition` "type". */ export type AccessTokenType = 'access_token'; /** * 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 `destroy.hrefSchema` link. */ export type AccessTokenDestroyHrefSchema = { /** * New owner for resources previously owned by the deleted access token. 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 access token. This argument specifies the new owner ID. */ destination_user_id?: string; [k: string]: unknown; }; /** * This interface was referenced by `Account`'s JSON-Schema * via the `definition` "type". */ export type AccountType = 'account'; /** * 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 `Organization`'s JSON-Schema * via the `definition` "type". */ export type OrganizationType = 'organization'; /** * 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 `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; }; /** * This interface was referenced by `AuditLogEvent`'s JSON-Schema * via the `definition` "type". */ export type AuditLogEventType = 'audit_log_event'; /** * 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 `SitePlan`'s JSON-Schema * via the `definition` "type". */ export type SitePlanType = 'site_plan'; /** * 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 `MenuItem`'s JSON-Schema * via the `definition` "type". */ export type MenuItemType = 'menu_item'; /** * 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 `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.hrefSchema` link. */ export type MenuItemInstancesHrefSchema = { filter?: { /** * IDs to fetch, comma separated */ ids: string; }; }; /** * This interface was referenced by `Job`'s JSON-Schema * via the `definition` "type". */ export type JobType = 'job'; /** * 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; /** * JSON API type field * * This interface was referenced by `SchemaMenuItem`'s JSON-Schema * via the `definition` "type". */ export type SchemaMenuItemType = 'schema_menu_item'; /** * 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; /** * 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; }; }; /** * 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.hrefSchema` link. */ export type UploadCollectionInstancesHrefSchema = { filter?: { /** * IDs to fetch, comma separated */ ids: string; }; }; /** * 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 `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 `Session`'s JSON-Schema * via the `definition` "type". */ export type SessionType = 'session'; /** * 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 `Plugin`'s JSON-Schema * via the `definition` "type". */ export type PluginType = 'plugin'; /** * 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 `JobResult`'s JSON-Schema * via the `definition` "type". */ export type JobResultType = 'job_result'; /** * 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 `SubscriptionLimit`'s JSON-Schema * via the `definition` "type". */ export type SubscriptionLimitType = 'subscription_limit'; /** * 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 `SubscriptionFeature`'s JSON-Schema * via the `definition` "type". */ export type SubscriptionFeatureType = 'subscription_feature'; /** * 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 `BuildEvent`'s JSON-Schema * via the `definition` "type". */ export type BuildEventType = 'build_event'; /** * 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 `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.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; }; /** * This interface was referenced by `SearchIndexEvent`'s JSON-Schema * via the `definition` "type". */ export type SearchIndexEventType = 'search_index_event'; /** * 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 `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.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.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.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; }; /** * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema * via the `definition` "type". */ export type ItemCurrentVsPublishedStateType = 'item_current_vs_published_state'; /** * 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 `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 `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; }; /** * This interface was referenced by `Item`'s JSON-Schema * via the `publish.schema` link. */ export type ItemPublishSchema = { data: { /** * 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'; attributes: { /** * 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 = { data: { type: 'selective_unpublish_operation'; attributes: { /** * 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 `Upload`'s JSON-Schema * via the `definition` "type". */ export type UploadType = 'upload'; /** * 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 `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.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 `UploadRequest`'s JSON-Schema * via the `definition` "type". */ export type UploadRequestType = 'upload_request'; /** * 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 `UploadTrack`'s JSON-Schema * via the `definition` "type". */ export type UploadTrackType = 'upload_track'; /** * 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 `SearchResult`'s JSON-Schema * via the `definition` "type". */ export type SearchResultType = 'search_result'; /** * 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 `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.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 `MaintenanceMode`'s JSON-Schema * via the `definition` "type". */ export type MaintenanceModeType = 'maintenance_mode'; /** * 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 `activate.hrefSchema` link. */ export type MaintenanceModeActivateHrefSchema = { /** * Force the activation, even if there are collaborators editing some records. */ force?: boolean; [k: string]: unknown; }; /** * This interface was referenced by `Webhook`'s JSON-Schema * via the `definition` "type". */ export type WebhookType = 'webhook'; /** * 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 `WebhookCall`'s JSON-Schema * via the `definition` "type". */ export type WebhookCallType = 'webhook_call'; /** * 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 `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 `UploadFilter`'s JSON-Schema * via the `definition` "type". */ export type UploadFilterType = 'upload_filter'; /** * 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 `SiteInvitation`'s JSON-Schema * via the `definition` "type". */ export type SiteInvitationType = 'site_invitation'; /** * 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 `EditingSession`'s JSON-Schema * via the `definition` "type". */ export type EditingSessionType = 'editing_session'; /** * 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 `FormData`'s JSON-Schema * via the `definition` "type". */ export type FormDataType = 'form_data'; /** * 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 `SsoSettings`'s JSON-Schema * via the `definition` "type". */ export type SsoSettingsType = 'sso_settings'; /** * 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 `EmojiSuggestions`'s JSON-Schema * via the `definition` "type". */ export type EmojiSuggestionsType = 'emoji_suggestions'; /** * 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 `self.hrefSchema` link. */ export type EmojiSuggestionsSelfHrefSchema = { /** * The term for which we are seeking suggestions for emojis */ term?: string; [k: string]: unknown; }; /** * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema * via the `definition` "type". */ export type WhiteLabelSettingsType = 'white_label_settings'; /** * 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 `PublicInfo`'s JSON-Schema * via the `definition` "type". */ export type PublicInfoType = 'public_info'; /** * 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 `DailyUsage`'s JSON-Schema * via the `definition` "type". */ export type DailyUsageType = 'daily_usage'; /** * 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 `UsageCounter`'s JSON-Schema * via the `definition` "type". */ export type UsageCounterType = 'usage_counter'; /** * 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 `self.hrefSchema` link. */ export type UsageCounterSelfHrefSchema = { /** * The time period upon which counters will be returned */ period?: 'today' | 'current_month' | 'last_month'; }; /** * This interface was referenced by `UploadTag`'s JSON-Schema * via the `definition` "type". */ export type UploadTagType = 'upload_tag'; /** * 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 `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; }; /** * This interface was referenced by `UploadSmartTag`'s JSON-Schema * via the `definition` "type". */ export type UploadSmartTagType = 'upload_smart_tag'; /** * 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 `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; }; /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "type". */ export type SiteType = 'site'; /** * 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 `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; }; /** * A Role represents a specific set of actions an editor (or an API token) can perform on your administrative area. * * This interface was referenced by `DatoApi`'s JSON-Schema * via the `definition` "role". */ export type Role = { type: RoleType; id: RoleIdentity; attributes: RoleAttributes; relationships: RoleRelationships; meta: RoleMeta; }; /** * JSON API attributes * * This interface was referenced by `Role`'s