@datocms/cma-client
Version:
JS client for DatoCMS REST Content Management API
1,684 lines (1,683 loc) • 321 kB
text/typescript
/* 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';
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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.
*/
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;
};
/**
* 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';
/**
* 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 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';
/**
* 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[];
/**
* 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;
/**
* 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 `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'
| 'indexing_started'
| 'indexing_success'
| 'indexing_failure';
};
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 `Item`'s JSON-Schema
* via the `instances.targetSchema` link.
*/
export type ItemInstancesTargetSchema = Item[];
/**
* This interface was referenced by `Item`'s JSON-Schema
* via the `instances.hrefSchema` link.
*/
export type ItemInstancesHrefSchema = {
/**
* 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]` or `filter[fields]`
*/
ids?: string;
/**
* Model ID or `api_key` to filter. If you use this filter, you _must not_ use `filter[ids]`. Comma separated values are accepted, but you _must not_ use `filter[fields]` in this case
*/
type?: string;
/**
* Textual query to match. You _must not_ use `filter[ids]`. If `locale` is defined, search within that locale. Otherwise environment's main locale will be used.
*/
query?: string;
/**
* Same as [GraphQL API records filters](/docs/content-delivery-api/filtering-records): you must use square brackets to indicate nesting levels. E.g. if you wanna [filter by parent record](/docs/content-delivery-api/filtering-records#parent) in a tree of records, you must use `filter[fields][parent][eq]=<ID_VALUE>`. 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;
};
/**
* 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?: string;
/**
* Whether you want the currently published versions (`published`, default) of your records, or the latest available (`current`)
*/
version?: string;
[k: string]: unknown;
};
/**
* This interface was referenced by `Item`'s JSON-Schema
* via the `references.targetSchema` link.
*/
export type ItemReferencesTargetSchema = Item[];
/**
* 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`, default) of your records, or the latest available (`current`)
*/
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 `batch_destroy.jobSchema` link.
*/
export type ItemBatchDestroyJobSchema = unknown[];
/**
* This interface was referenced by `Item`'s JSON-Schema
* via the `batch_destroy.hrefSchema` link.
*/
export type ItemBatchDestroyHrefSchema = {
/**
* IDs of records to delete, comma separated (a maximum of 200 IDs are allowed per request)
*/
'filter[ids]': string;
};
/**
* This interface was referenced by `Item`'s JSON-Schema
* via the `batch_publish.jobSchema` link.
*/
export type ItemBatchPublishJobSchema = unknown[];
/**
* This interface was referenced by `Item`'s JSON-Schema
* via the `batch_publish.hrefSchema` link.
*/
export type ItemBatchPublishHrefSchema = {
/**
* IDs of records to publish, comma separated (a maximum of 200 IDs are allowed per request)
*/
'filter[ids]': string;
};
/**
* This interface was referenced by `Item`'s JSON-Schema
* via the `batch_unpublish.jobSchema` link.
*/
export type ItemBatchUnpublishJobSchema = unknown[];
/**
* This interface was referenced by `Item`'s JSON-Schema
* via the `batch_unpublish.hrefSchema` link.
*/
export type ItemBatchUnpublishHrefSchema = {
/**
* IDs of records to unpublish, comma separated (a maximum of 200 IDs are allowed per request)
*/
'filter[ids]': 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 = [Item, 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;
};
/**
* 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 `batch_add_tags.jobSchema` link.
*/
export type UploadBatchAddTagsJobSchema = unknown[];
/**
* This interface was referenced by `Upload`'s JSON-Schema
* via the `batch_add_tags.hrefSchema` link.
*/
export type UploadBatchAddTagsHrefSchema = {
/**
* IDs to tag, comma separated
*/
'filter[ids]'?: string;
[k: string]: unknown;
};
/**
* This interface was referenced by `Upload`'s JSON-Schema
* via the `batch_destroy.jobSchema` link.
*/
export type UploadBatchDestroyJobSchema = unknown[];
/**
* This interface was referenced by `Upload`'s JSON-Schema
* via the `batch_destroy.hrefSchema` link.
*/
export type UploadBatchDestroyHrefSchema = {
/**
* IDs to destroy, comma separated
*/
'filter[ids]'?: string;
[k: string]: unknown;
};
/**
* This interface was referenced by `Upload`'s JSON-Schema
* via the `references.targetSchema` link.
*/
export type UploadReferencesTargetSchema = Item[];
/**
* 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 build trigger ID on which the search will be performed. Required if more than one build trigger is present in a project
*/
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 `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".
*
* T