@datocms/cma-client 5.2.0-alpha.4 → 5.2.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +4 -0
  2. package/dist/cjs/generated/Client.js +1 -1
  3. package/dist/cjs/generated/resources/ItemType.js +12 -12
  4. package/dist/cjs/generated/resources/SearchIndex.js +10 -22
  5. package/dist/cjs/generated/resources/SearchIndex.js.map +1 -1
  6. package/dist/cjs/utilities/schemaRepository.js +131 -0
  7. package/dist/cjs/utilities/schemaRepository.js.map +1 -1
  8. package/dist/esm/generated/ApiTypes.d.ts +161 -158
  9. package/dist/esm/generated/Client.js +1 -1
  10. package/dist/esm/generated/RawApiTypes.d.ts +148 -141
  11. package/dist/esm/generated/resources/ItemType.d.ts +12 -12
  12. package/dist/esm/generated/resources/ItemType.js +12 -12
  13. package/dist/esm/generated/resources/SearchIndex.d.ts +8 -8
  14. package/dist/esm/generated/resources/SearchIndex.js +10 -22
  15. package/dist/esm/generated/resources/SearchIndex.js.map +1 -1
  16. package/dist/esm/utilities/schemaRepository.d.ts +42 -2
  17. package/dist/esm/utilities/schemaRepository.js +132 -1
  18. package/dist/esm/utilities/schemaRepository.js.map +1 -1
  19. package/dist/types/generated/ApiTypes.d.ts +161 -158
  20. package/dist/types/generated/RawApiTypes.d.ts +148 -141
  21. package/dist/types/generated/resources/ItemType.d.ts +12 -12
  22. package/dist/types/generated/resources/SearchIndex.d.ts +8 -8
  23. package/dist/types/utilities/schemaRepository.d.ts +42 -2
  24. package/package.json +3 -3
  25. package/resources.json +10 -12
  26. package/src/generated/ApiTypes.ts +161 -158
  27. package/src/generated/Client.ts +1 -1
  28. package/src/generated/RawApiTypes.ts +148 -141
  29. package/src/generated/resources/ItemType.ts +12 -12
  30. package/src/generated/resources/SearchIndex.ts +10 -22
  31. package/src/utilities/schemaRepository.ts +167 -9
@@ -712,19 +712,19 @@ export type ItemInstancesHrefSchema<D extends ItemTypeDefinition = ItemTypeDefin
712
712
  */
713
713
  filter?: {
714
714
  /**
715
- * Record (or block record) IDs to fetch, comma separated. If you use this filter, you _must not_ use `filter[type]` or `filter[fields]`
715
+ * 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
716
716
  */
717
717
  ids?: string;
718
718
  /**
719
- * 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
719
+ * 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
720
720
  */
721
721
  type?: string;
722
722
  /**
723
- * 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.
723
+ * 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.
724
724
  */
725
725
  query?: string;
726
726
  /**
727
- * 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.
727
+ * 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.
728
728
  */
729
729
  fields?: ToItemHrefSchemaField<D>;
730
730
  /**
@@ -785,7 +785,7 @@ export type ItemSelfHrefSchema = {
785
785
  */
786
786
  nested?: boolean;
787
787
  /**
788
- * Whether you want the currently published versions (`published`, default) of your records, or the latest available (`current`)
788
+ * Whether you want the currently published versions (`published`) of your records, or the latest available (`current`, default)
789
789
  */
790
790
  version?: string;
791
791
  [k: string]: unknown;
@@ -1098,11 +1098,11 @@ export type SearchResultInstancesHrefSchema = {
1098
1098
  */
1099
1099
  query: string;
1100
1100
  /**
1101
- * The search index ID or name on which the search will be performed. If not provided, the first enabled search index will be used.
1101
+ * The search index ID on which the search will be performed. If not provided, the first enabled search index will be used.
1102
1102
  */
1103
1103
  search_index_id?: string;
1104
1104
  /**
1105
- * **[Deprecated]** Use `search_index_id` instead. The build trigger ID or name on which the search will be performed. This parameter is only supported for backward compatibility and will return an error if the build trigger has multiple search indexes associated.
1105
+ * The build trigger ID or name on which the search will be performed.
1106
1106
  */
1107
1107
  build_trigger_id?: string;
1108
1108
  /**
@@ -1581,7 +1581,7 @@ export type RoleAttributes = {
1581
1581
  */
1582
1582
  can_edit_site: boolean;
1583
1583
  /**
1584
- * Can create/edit models and plugins
1584
+ * Can create and edit models and plugins
1585
1585
  */
1586
1586
  can_edit_schema: boolean;
1587
1587
  /**
@@ -1601,31 +1601,31 @@ export type RoleAttributes = {
1601
1601
  */
1602
1602
  environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
1603
1603
  /**
1604
- * Can create/edit roles and invite/remove collaborators
1604
+ * Can create and edit roles and invite/remove collaborators
1605
1605
  */
1606
1606
  can_manage_users: boolean;
1607
1607
  /**
1608
- * Can create/edit shared filters (both for models and the media area)
1608
+ * Can create and edit shared filters (both for models and the media area)
1609
1609
  */
1610
1610
  can_manage_shared_filters: boolean;
1611
1611
  /**
1612
- * Can create/edit upload collections
1612
+ * Can create and edit upload collections
1613
1613
  */
1614
1614
  can_manage_upload_collections: boolean;
1615
1615
  /**
1616
- * Can create/edit Build triggers
1616
+ * Can create and edit build triggers
1617
1617
  */
1618
1618
  can_manage_build_triggers: boolean;
1619
1619
  /**
1620
- * Can create/edit Search Indexes
1620
+ * Can create and edit search indexes
1621
1621
  */
1622
1622
  can_manage_search_indexes: boolean;
1623
1623
  /**
1624
- * Can create/edit webhooks
1624
+ * Can create and edit webhooks
1625
1625
  */
1626
1626
  can_manage_webhooks: boolean;
1627
1627
  /**
1628
- * Can create/delete sandbox environments and promote them to primary environment
1628
+ * Can create and delete sandbox environments and promote them to primary environment
1629
1629
  */
1630
1630
  can_manage_environments: boolean;
1631
1631
  /**
@@ -1637,7 +1637,7 @@ export type RoleAttributes = {
1637
1637
  */
1638
1638
  can_access_audit_log: boolean;
1639
1639
  /**
1640
- * Can create/edit workflows
1640
+ * Can create and edit workflows
1641
1641
  */
1642
1642
  can_manage_workflows: boolean;
1643
1643
  /**
@@ -1765,13 +1765,13 @@ export type RoleAttributes = {
1765
1765
  build_trigger?: BuildTriggerIdentity | null;
1766
1766
  }[];
1767
1767
  /**
1768
- * Allowed search indexes for a role
1768
+ * Search indexes that can be triggered by a role
1769
1769
  */
1770
1770
  positive_search_index_permissions: {
1771
1771
  search_index?: SearchIndexIdentity | null;
1772
1772
  }[];
1773
1773
  /**
1774
- * Prohibited search indexes for a role
1774
+ * Search indexes that can't be triggered by a role
1775
1775
  */
1776
1776
  negative_search_index_permissions: {
1777
1777
  search_index?: SearchIndexIdentity | null;
@@ -1821,7 +1821,7 @@ export type RoleMeta = {
1821
1821
  */
1822
1822
  can_edit_site: boolean;
1823
1823
  /**
1824
- * Can create/edit models and plugins
1824
+ * Can create and edit models and plugins
1825
1825
  */
1826
1826
  can_edit_schema: boolean;
1827
1827
  /**
@@ -1841,31 +1841,31 @@ export type RoleMeta = {
1841
1841
  */
1842
1842
  environments_access: 'all' | 'primary_only' | 'sandbox_only' | 'none';
1843
1843
  /**
1844
- * Can create/edit roles and invite/remove collaborators
1844
+ * Can create and edit roles and invite/remove collaborators
1845
1845
  */
1846
1846
  can_manage_users: boolean;
1847
1847
  /**
1848
- * Can create/edit shared filters (both for models and the media area)
1848
+ * Can create and edit shared filters (both for models and the media area)
1849
1849
  */
1850
1850
  can_manage_shared_filters: boolean;
1851
1851
  /**
1852
- * Can create/edit upload collections
1852
+ * Can create and edit upload collections
1853
1853
  */
1854
1854
  can_manage_upload_collections: boolean;
1855
1855
  /**
1856
- * Can create/edit Build triggers
1856
+ * Can create and edit build triggers
1857
1857
  */
1858
1858
  can_manage_build_triggers: boolean;
1859
1859
  /**
1860
- * Can create/edit Search Indexes
1860
+ * Can create and edit search indexes
1861
1861
  */
1862
1862
  can_manage_search_indexes: boolean;
1863
1863
  /**
1864
- * Can create/edit webhooks
1864
+ * Can create and edit webhooks
1865
1865
  */
1866
1866
  can_manage_webhooks: boolean;
1867
1867
  /**
1868
- * Can create/delete sandbox environments and promote them to primary environment
1868
+ * Can create and delete sandbox environments and promote them to primary environment
1869
1869
  */
1870
1870
  can_manage_environments: boolean;
1871
1871
  /**
@@ -1877,7 +1877,7 @@ export type RoleMeta = {
1877
1877
  */
1878
1878
  can_access_audit_log: boolean;
1879
1879
  /**
1880
- * Can create/edit workflows
1880
+ * Can create and edit workflows
1881
1881
  */
1882
1882
  can_manage_workflows: boolean;
1883
1883
  /**
@@ -2005,13 +2005,13 @@ export type RoleMeta = {
2005
2005
  build_trigger?: BuildTriggerIdentity | null;
2006
2006
  }[];
2007
2007
  /**
2008
- * Allowed search indexes for a role
2008
+ * Search indexes that can be triggered by a role
2009
2009
  */
2010
2010
  positive_search_index_permissions: {
2011
2011
  search_index?: SearchIndexIdentity | null;
2012
2012
  }[];
2013
2013
  /**
2014
- * Prohibited search indexes for a role
2014
+ * Search indexes that can't be triggered by a role
2015
2015
  */
2016
2016
  negative_search_index_permissions: {
2017
2017
  search_index?: SearchIndexIdentity | null;
@@ -2042,7 +2042,7 @@ export type RoleCreateSchema = {
2042
2042
  */
2043
2043
  can_edit_site?: boolean;
2044
2044
  /**
2045
- * Can create/edit models and plugins
2045
+ * Can create and edit models and plugins
2046
2046
  */
2047
2047
  can_edit_schema?: boolean;
2048
2048
  /**
@@ -2062,31 +2062,31 @@ export type RoleCreateSchema = {
2062
2062
  */
2063
2063
  environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
2064
2064
  /**
2065
- * Can create/edit roles and invite/remove collaborators
2065
+ * Can create and edit roles and invite/remove collaborators
2066
2066
  */
2067
2067
  can_manage_users?: boolean;
2068
2068
  /**
2069
- * Can create/edit shared filters (both for models and the media area)
2069
+ * Can create and edit shared filters (both for models and the media area)
2070
2070
  */
2071
2071
  can_manage_shared_filters?: boolean;
2072
2072
  /**
2073
- * Can create/edit Search Indexes
2073
+ * Can create and edit search indexes
2074
2074
  */
2075
2075
  can_manage_search_indexes?: boolean;
2076
2076
  /**
2077
- * Can create/edit upload collections
2077
+ * Can create and edit upload collections
2078
2078
  */
2079
2079
  can_manage_upload_collections?: boolean;
2080
2080
  /**
2081
- * Can create/edit Build triggers
2081
+ * Can create and edit build triggers
2082
2082
  */
2083
2083
  can_manage_build_triggers?: boolean;
2084
2084
  /**
2085
- * Can create/edit webhooks
2085
+ * Can create and edit webhooks
2086
2086
  */
2087
2087
  can_manage_webhooks?: boolean;
2088
2088
  /**
2089
- * Can create/delete sandbox environments and promote them to primary environment
2089
+ * Can create and delete sandbox environments and promote them to primary environment
2090
2090
  */
2091
2091
  can_manage_environments?: boolean;
2092
2092
  /**
@@ -2098,7 +2098,7 @@ export type RoleCreateSchema = {
2098
2098
  */
2099
2099
  can_access_audit_log?: boolean;
2100
2100
  /**
2101
- * Can create/edit workflows
2101
+ * Can create and edit workflows
2102
2102
  */
2103
2103
  can_manage_workflows?: boolean;
2104
2104
  /**
@@ -2226,13 +2226,13 @@ export type RoleCreateSchema = {
2226
2226
  build_trigger?: BuildTriggerIdentity | null;
2227
2227
  }[];
2228
2228
  /**
2229
- * Allowed search indexes for a role
2229
+ * Search indexes that can be triggered by a role
2230
2230
  */
2231
2231
  positive_search_index_permissions?: {
2232
2232
  search_index?: SearchIndexIdentity | null;
2233
2233
  }[];
2234
2234
  /**
2235
- * Prohibited search indexes for a role
2235
+ * Search indexes that can't be triggered by a role
2236
2236
  */
2237
2237
  negative_search_index_permissions?: {
2238
2238
  search_index?: SearchIndexIdentity | null;
@@ -2284,7 +2284,7 @@ export type RoleUpdateSchema = {
2284
2284
  */
2285
2285
  can_edit_site?: boolean;
2286
2286
  /**
2287
- * Can create/edit models and plugins
2287
+ * Can create and edit models and plugins
2288
2288
  */
2289
2289
  can_edit_schema?: boolean;
2290
2290
  /**
@@ -2304,31 +2304,31 @@ export type RoleUpdateSchema = {
2304
2304
  */
2305
2305
  environments_access?: 'all' | 'primary_only' | 'sandbox_only' | 'none';
2306
2306
  /**
2307
- * Can create/edit roles and invite/remove collaborators
2307
+ * Can create and edit roles and invite/remove collaborators
2308
2308
  */
2309
2309
  can_manage_users?: boolean;
2310
2310
  /**
2311
- * Can create/edit shared filters (both for models and the media area)
2311
+ * Can create and edit shared filters (both for models and the media area)
2312
2312
  */
2313
2313
  can_manage_shared_filters?: boolean;
2314
2314
  /**
2315
- * Can create/edit Search Indexes
2315
+ * Can create and edit search indexes
2316
2316
  */
2317
2317
  can_manage_search_indexes?: boolean;
2318
2318
  /**
2319
- * Can create/edit upload collections
2319
+ * Can create and edit upload collections
2320
2320
  */
2321
2321
  can_manage_upload_collections?: boolean;
2322
2322
  /**
2323
- * Can create/edit Build triggers
2323
+ * Can create and edit build triggers
2324
2324
  */
2325
2325
  can_manage_build_triggers?: boolean;
2326
2326
  /**
2327
- * Can create/edit webhooks
2327
+ * Can create and edit webhooks
2328
2328
  */
2329
2329
  can_manage_webhooks?: boolean;
2330
2330
  /**
2331
- * Can create/delete sandbox environments and promote them to primary environment
2331
+ * Can create and delete sandbox environments and promote them to primary environment
2332
2332
  */
2333
2333
  can_manage_environments?: boolean;
2334
2334
  /**
@@ -2340,7 +2340,7 @@ export type RoleUpdateSchema = {
2340
2340
  */
2341
2341
  can_access_audit_log?: boolean;
2342
2342
  /**
2343
- * Can create/edit workflows
2343
+ * Can create and edit workflows
2344
2344
  */
2345
2345
  can_manage_workflows?: boolean;
2346
2346
  /**
@@ -2468,13 +2468,13 @@ export type RoleUpdateSchema = {
2468
2468
  build_trigger?: BuildTriggerIdentity | null;
2469
2469
  }[];
2470
2470
  /**
2471
- * Allowed search indexes for a role
2471
+ * Search indexes that can be triggered by a role
2472
2472
  */
2473
2473
  positive_search_index_permissions?: {
2474
2474
  search_index?: SearchIndexIdentity | null;
2475
2475
  }[];
2476
2476
  /**
2477
- * Prohibited search indexes for a role
2477
+ * Search indexes that can't be triggered by a role
2478
2478
  */
2479
2479
  negative_search_index_permissions?: {
2480
2480
  search_index?: SearchIndexIdentity | null;
@@ -4177,7 +4177,26 @@ export type UploadCollectionReorderJobSchema = {
4177
4177
  data: UploadCollection[];
4178
4178
  };
4179
4179
  /**
4180
- * The way you define the kind of content you can edit inside your administrative area passes through the concept of Models, which are much like database tables. For backward-compatibility reasons, the API refers to models as "item types".
4180
+ * The way you define the kind of content you can edit inside a DatoCMS project passes through the concept of **models** and **block models**. For backward-compatibility reasons, the API refers to both as "item types".
4181
+ *
4182
+ * ## Models
4183
+ *
4184
+ * Models are much like database tables — they define the structure of your main content types (e.g., blog posts, products, landing pages). Each model is composed of fields with custom validations. Records created from models exist independently and can be referenced by other records through link fields.
4185
+ *
4186
+ * ## Block Models
4187
+ *
4188
+ * Block models define complex and repeatable structures that can be embedded inside records. They are the foundation behind features like [Modular Content](/docs/content-modelling/modular-content.md) and [Structured Text](/docs/content-modelling/structured-text.md).
4189
+ *
4190
+ * ### Key differences:
4191
+ *
4192
+ * - **Models** create standalone records that can be referenced and have independent value
4193
+ * - **Block models** create blocks that only exist within parent records and cannot be referenced via link fields
4194
+ * - Block models defined in the library can be reused across different models
4195
+ * - When a record gets deleted, all the blocks it contains are deleted with it
4196
+ * - Blocks do not count towards your plan's records limit
4197
+ *
4198
+ * You can distinguish between models and block models using the `modular_block` attribute: `true` indicates a block model, `false` indicates a regular model.
4199
+ *
4181
4200
  *
4182
4201
  * This interface was referenced by `DatoApi`'s JSON-Schema
4183
4202
  * via the `definition` "item_type".
@@ -4197,11 +4216,11 @@ export type ItemType = {
4197
4216
  */
4198
4217
  export type ItemTypeAttributes = {
4199
4218
  /**
4200
- * Name of the model
4219
+ * Name of the model/block model
4201
4220
  */
4202
4221
  name: string;
4203
4222
  /**
4204
- * API key of the model
4223
+ * API key of the model/block model
4205
4224
  */
4206
4225
  api_key: string;
4207
4226
  /**
@@ -4209,11 +4228,11 @@ export type ItemTypeAttributes = {
4209
4228
  */
4210
4229
  collection_appeareance?: 'compact' | 'table';
4211
4230
  /**
4212
- * The way the model collection should be presented to the editors
4231
+ * The way the model/block model collection should be presented to the editors
4213
4232
  */
4214
4233
  collection_appearance: 'compact' | 'table';
4215
4234
  /**
4216
- * Whether the model is single-instance or not
4235
+ * Whether the model is single-instance or not. This property only applies to models, not block models
4217
4236
  */
4218
4237
  singleton: boolean;
4219
4238
  /**
@@ -4221,43 +4240,43 @@ export type ItemTypeAttributes = {
4221
4240
  */
4222
4241
  all_locales_required: boolean;
4223
4242
  /**
4224
- * Whether editors can sort records via drag & drop or not
4243
+ * Whether editors can sort records via drag & drop or not. Must be false for block models
4225
4244
  */
4226
4245
  sortable: boolean;
4227
4246
  /**
4228
- * Whether this model is a modular content block or not
4247
+ * Whether this is a block model or not. Block models define structures that can be embedded inside records, while regular models create standalone records
4229
4248
  */
4230
4249
  modular_block: boolean;
4231
4250
  /**
4232
- * Whether draft/published mode is active or not
4251
+ * Whether draft/published mode is active or not. Must be false for block models
4233
4252
  */
4234
4253
  draft_mode_active: boolean;
4235
4254
  /**
4236
- * Whether draft records can be saved without satisfying the validations or not
4255
+ * Whether draft records can be saved without satisfying the validations or not. Must be false for block models
4237
4256
  */
4238
4257
  draft_saving_active: boolean;
4239
4258
  /**
4240
- * Whether editors can organize records in a tree or not
4259
+ * Whether editors can organize records in a tree or not. Must be false for block models
4241
4260
  */
4242
4261
  tree: boolean;
4243
4262
  /**
4244
- * If an ordering field is set, this fields specify the sorting direction
4263
+ * If an ordering field is set, this field specifies the sorting direction. This property does not apply to block models
4245
4264
  */
4246
4265
  ordering_direction: null | 'asc' | 'desc';
4247
4266
  /**
4248
- * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field
4267
+ * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field. This property does not apply to block models
4249
4268
  */
4250
4269
  ordering_meta: null | 'created_at' | 'updated_at' | 'first_published_at' | 'published_at';
4251
4270
  /**
4252
- * If this model is single-instance, this tells the single-instance record has already been created or not
4271
+ * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
4253
4272
  */
4254
4273
  has_singleton_item: boolean;
4255
4274
  /**
4256
- * A hint shown to editors to help them understand the purpose of this model/block
4275
+ * A hint shown to editors to help them understand the purpose of this model/block model
4257
4276
  */
4258
4277
  hint: string | null;
4259
4278
  /**
4260
- * Whether inverse relationships fields are expressed in GraphQL or not
4279
+ * Whether inverse relationships fields are expressed in GraphQL or not. Must be false for block models
4261
4280
  */
4262
4281
  inverse_relationships_enabled: boolean;
4263
4282
  };
@@ -4269,19 +4288,19 @@ export type ItemTypeAttributes = {
4269
4288
  */
4270
4289
  export type ItemTypeRelationships = {
4271
4290
  /**
4272
- * The item instance related to this item type
4291
+ * The record instance related to this model. This relationship only applies to single-instance models, not block models
4273
4292
  */
4274
4293
  singleton_item: {
4275
4294
  data: ItemData | null;
4276
4295
  };
4277
4296
  /**
4278
- * The list of item type fields
4297
+ * The list of fields for this model/block model
4279
4298
  */
4280
4299
  fields: {
4281
4300
  data: FieldData[];
4282
4301
  };
4283
4302
  /**
4284
- * The list of item type fieldsets
4303
+ * The list of fieldsets for this model/block model
4285
4304
  */
4286
4305
  fieldsets: {
4287
4306
  data: FieldsetData[];
@@ -4299,25 +4318,25 @@ export type ItemTypeRelationships = {
4299
4318
  data: FieldData | null;
4300
4319
  };
4301
4320
  /**
4302
- * The field to use as fallback title for SEO purposes
4321
+ * The field to use as fallback title for SEO purposes. This relationship does not apply to block models
4303
4322
  */
4304
4323
  title_field: {
4305
4324
  data: FieldData | null;
4306
4325
  };
4307
4326
  /**
4308
- * The field to use as fallback image for SEO purposes
4327
+ * The field to use as fallback image for SEO purposes. This relationship does not apply to block models
4309
4328
  */
4310
4329
  image_preview_field: {
4311
4330
  data: FieldData | null;
4312
4331
  };
4313
4332
  /**
4314
- * The field to use as fallback description for SEO purposes
4333
+ * The field to use as fallback description for SEO purposes. This relationship does not apply to block models
4315
4334
  */
4316
4335
  excerpt_field: {
4317
4336
  data: FieldData | null;
4318
4337
  };
4319
4338
  /**
4320
- * The field upon which the collection is sorted
4339
+ * The field upon which the collection is sorted. This relationship does not apply to block models
4321
4340
  */
4322
4341
  ordering_field: {
4323
4342
  data: FieldData | null;
@@ -4370,14 +4389,14 @@ export type WorkflowData = {
4370
4389
  id: WorkflowIdentity;
4371
4390
  };
4372
4391
  /**
4373
- * Meta information regarding the item type
4392
+ * Meta information regarding the model/block model
4374
4393
  *
4375
4394
  * This interface was referenced by `ItemType`'s JSON-Schema
4376
4395
  * via the `definition` "meta".
4377
4396
  */
4378
4397
  export type ItemTypeMeta = {
4379
4398
  /**
4380
- * If this model is single-instance, this tells the single-instance record has already been created or not
4399
+ * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
4381
4400
  */
4382
4401
  has_singleton_item: boolean;
4383
4402
  };
@@ -4394,15 +4413,15 @@ export type ItemTypeCreateSchema = {
4394
4413
  */
4395
4414
  attributes: {
4396
4415
  /**
4397
- * Name of the model
4416
+ * Name of the model/block model
4398
4417
  */
4399
4418
  name: string;
4400
4419
  /**
4401
- * API key of the model
4420
+ * API key of the model/block model
4402
4421
  */
4403
4422
  api_key: string;
4404
4423
  /**
4405
- * Whether the model is single-instance or not
4424
+ * Whether the model is single-instance or not. This property only applies to models, not block models
4406
4425
  */
4407
4426
  singleton?: boolean;
4408
4427
  /**
@@ -4410,31 +4429,31 @@ export type ItemTypeCreateSchema = {
4410
4429
  */
4411
4430
  all_locales_required?: boolean;
4412
4431
  /**
4413
- * Whether editors can sort records via drag & drop or not
4432
+ * Whether editors can sort records via drag & drop or not. Must be false for block models
4414
4433
  */
4415
4434
  sortable?: boolean;
4416
4435
  /**
4417
- * Whether this model is a modular content block or not
4436
+ * Whether this is a block model or not. Block models define structures that can be embedded inside records, while regular models create standalone records
4418
4437
  */
4419
4438
  modular_block?: boolean;
4420
4439
  /**
4421
- * Whether draft/published mode is active or not
4440
+ * Whether draft/published mode is active or not. Must be false for block models
4422
4441
  */
4423
4442
  draft_mode_active?: boolean;
4424
4443
  /**
4425
- * Whether draft records can be saved without satisfying the validations or not
4444
+ * Whether draft records can be saved without satisfying the validations or not. Must be false for block models
4426
4445
  */
4427
4446
  draft_saving_active?: boolean;
4428
4447
  /**
4429
- * Whether editors can organize records in a tree or not
4448
+ * Whether editors can organize records in a tree or not. Must be false for block models
4430
4449
  */
4431
4450
  tree?: boolean;
4432
4451
  /**
4433
- * If an ordering field is set, this fields specify the sorting direction
4452
+ * If an ordering field is set, this field specifies the sorting direction. This property does not apply to block models
4434
4453
  */
4435
4454
  ordering_direction?: null | 'asc' | 'desc';
4436
4455
  /**
4437
- * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field
4456
+ * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field. This property does not apply to block models
4438
4457
  */
4439
4458
  ordering_meta?: null | 'created_at' | 'updated_at' | 'first_published_at' | 'published_at';
4440
4459
  /**
@@ -4442,21 +4461,21 @@ export type ItemTypeCreateSchema = {
4442
4461
  */
4443
4462
  collection_appeareance?: 'compact' | 'table';
4444
4463
  /**
4445
- * The way the model collection should be presented to the editors
4464
+ * The way the model/block model collection should be presented to the editors
4446
4465
  */
4447
4466
  collection_appearance?: 'compact' | 'table';
4448
4467
  /**
4449
- * A hint shown to editors to help them understand the purpose of this model/block
4468
+ * A hint shown to editors to help them understand the purpose of this model/block model
4450
4469
  */
4451
4470
  hint?: string | null;
4452
4471
  /**
4453
- * Whether inverse relationships fields are expressed in GraphQL or not
4472
+ * Whether inverse relationships fields are expressed in GraphQL or not. Must be false for block models
4454
4473
  */
4455
4474
  inverse_relationships_enabled?: boolean;
4456
4475
  };
4457
4476
  relationships?: {
4458
4477
  /**
4459
- * The field upon which the collection is sorted
4478
+ * The field upon which the collection is sorted. This relationship does not apply to block models
4460
4479
  */
4461
4480
  ordering_field?: {
4462
4481
  data: FieldData | null;
@@ -4474,19 +4493,19 @@ export type ItemTypeCreateSchema = {
4474
4493
  data: FieldData | null;
4475
4494
  };
4476
4495
  /**
4477
- * The field to use as fallback title for SEO purposes
4496
+ * The field to use as fallback title for SEO purposes. This relationship does not apply to block models
4478
4497
  */
4479
4498
  title_field?: {
4480
4499
  data: FieldData | null;
4481
4500
  };
4482
4501
  /**
4483
- * The field to use as fallback image for SEO purposes
4502
+ * The field to use as fallback image for SEO purposes. This relationship does not apply to block models
4484
4503
  */
4485
4504
  image_preview_field?: {
4486
4505
  data: FieldData | null;
4487
4506
  };
4488
4507
  /**
4489
- * The field to use as fallback description for SEO purposes
4508
+ * The field to use as fallback description for SEO purposes. This relationship does not apply to block models
4490
4509
  */
4491
4510
  excerpt_field?: {
4492
4511
  data: FieldData | null;
@@ -4521,11 +4540,11 @@ export type ItemTypeUpdateSchema = {
4521
4540
  */
4522
4541
  attributes?: {
4523
4542
  /**
4524
- * Name of the model
4543
+ * Name of the model/block model
4525
4544
  */
4526
4545
  name?: string;
4527
4546
  /**
4528
- * API key of the model
4547
+ * API key of the model/block model
4529
4548
  */
4530
4549
  api_key?: string;
4531
4550
  /**
@@ -4533,11 +4552,11 @@ export type ItemTypeUpdateSchema = {
4533
4552
  */
4534
4553
  collection_appeareance?: 'compact' | 'table';
4535
4554
  /**
4536
- * The way the model collection should be presented to the editors
4555
+ * The way the model/block model collection should be presented to the editors
4537
4556
  */
4538
4557
  collection_appearance?: 'compact' | 'table';
4539
4558
  /**
4540
- * Whether the model is single-instance or not
4559
+ * Whether the model is single-instance or not. This property only applies to models, not block models
4541
4560
  */
4542
4561
  singleton?: boolean;
4543
4562
  /**
@@ -4545,49 +4564,49 @@ export type ItemTypeUpdateSchema = {
4545
4564
  */
4546
4565
  all_locales_required?: boolean;
4547
4566
  /**
4548
- * Whether editors can sort records via drag & drop or not
4567
+ * Whether editors can sort records via drag & drop or not. Must be false for block models
4549
4568
  */
4550
4569
  sortable?: boolean;
4551
4570
  /**
4552
- * Whether this model is a modular content block or not
4571
+ * Whether this is a block model or not. Block models define structures that can be embedded inside records, while regular models create standalone records
4553
4572
  */
4554
4573
  modular_block?: boolean;
4555
4574
  /**
4556
- * Whether draft/published mode is active or not
4575
+ * Whether draft/published mode is active or not. Must be false for block models
4557
4576
  */
4558
4577
  draft_mode_active?: boolean;
4559
4578
  /**
4560
- * Whether draft records can be saved without satisfying the validations or not
4579
+ * Whether draft records can be saved without satisfying the validations or not. Must be false for block models
4561
4580
  */
4562
4581
  draft_saving_active?: boolean;
4563
4582
  /**
4564
- * Whether editors can organize records in a tree or not
4583
+ * Whether editors can organize records in a tree or not. Must be false for block models
4565
4584
  */
4566
4585
  tree?: boolean;
4567
4586
  /**
4568
- * If an ordering field is set, this fields specify the sorting direction
4587
+ * If an ordering field is set, this field specifies the sorting direction. This property does not apply to block models
4569
4588
  */
4570
4589
  ordering_direction?: null | 'asc' | 'desc';
4571
4590
  /**
4572
- * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field
4591
+ * Specifies the model's sorting method. Cannot be set in concurrency with ordering_field. This property does not apply to block models
4573
4592
  */
4574
4593
  ordering_meta?: null | 'created_at' | 'updated_at' | 'first_published_at' | 'published_at';
4575
4594
  /**
4576
- * If this model is single-instance, this tells the single-instance record has already been created or not
4595
+ * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
4577
4596
  */
4578
4597
  has_singleton_item?: boolean;
4579
4598
  /**
4580
- * A hint shown to editors to help them understand the purpose of this model/block
4599
+ * A hint shown to editors to help them understand the purpose of this model/block model
4581
4600
  */
4582
4601
  hint?: string | null;
4583
4602
  /**
4584
- * Whether inverse relationships fields are expressed in GraphQL or not
4603
+ * Whether inverse relationships fields are expressed in GraphQL or not. Must be false for block models
4585
4604
  */
4586
4605
  inverse_relationships_enabled?: boolean;
4587
4606
  };
4588
4607
  relationships?: {
4589
4608
  /**
4590
- * The field upon which the collection is sorted
4609
+ * The field upon which the collection is sorted. This relationship does not apply to block models
4591
4610
  */
4592
4611
  ordering_field?: {
4593
4612
  data: FieldData | null;
@@ -4605,19 +4624,19 @@ export type ItemTypeUpdateSchema = {
4605
4624
  data: FieldData | null;
4606
4625
  };
4607
4626
  /**
4608
- * The field to use as fallback title for SEO purposes
4627
+ * The field to use as fallback title for SEO purposes. This relationship does not apply to block models
4609
4628
  */
4610
4629
  title_field?: {
4611
4630
  data: FieldData | null;
4612
4631
  };
4613
4632
  /**
4614
- * The field to use as fallback image for SEO purposes
4633
+ * The field to use as fallback image for SEO purposes. This relationship does not apply to block models
4615
4634
  */
4616
4635
  image_preview_field?: {
4617
4636
  data: FieldData | null;
4618
4637
  };
4619
4638
  /**
4620
- * The field to use as fallback description for SEO purposes
4639
+ * The field to use as fallback description for SEO purposes. This relationship does not apply to block models
4621
4640
  */
4622
4641
  excerpt_field?: {
4623
4642
  data: FieldData | null;
@@ -4631,7 +4650,7 @@ export type ItemTypeUpdateSchema = {
4631
4650
  };
4632
4651
  meta?: {
4633
4652
  /**
4634
- * If this model is single-instance, this tells the single-instance record has already been created or not
4653
+ * If this model is single-instance, this tells whether the single-instance record has already been created or not. This property only applies to models, not block models
4635
4654
  */
4636
4655
  has_singleton_item?: boolean;
4637
4656
  };
@@ -6722,7 +6741,7 @@ export type SubscriptionFeatureInstancesTargetSchema = {
6722
6741
  data: SubscriptionFeature[];
6723
6742
  };
6724
6743
  /**
6725
- * Represents an event occurred during the deploy process of your administrative area.
6744
+ * Represents an event occurred during the deploy process of a build trigger.
6726
6745
  *
6727
6746
  * This interface was referenced by `DatoApi`'s JSON-Schema
6728
6747
  * via the `definition` "build_event".
@@ -6807,7 +6826,7 @@ export type BuildEventSelfTargetSchema = {
6807
6826
  data: BuildEvent;
6808
6827
  };
6809
6828
  /**
6810
- * Represents an event occurred during the search indexing process.
6829
+ * Represents an event occurred during the indexing process via search indexes.
6811
6830
  *
6812
6831
  * This interface was referenced by `DatoApi`'s JSON-Schema
6813
6832
  * via the `definition` "search_index_event".
@@ -9273,6 +9292,10 @@ export type BuildTriggerAttributes = {
9273
9292
  * Name of the build trigger
9274
9293
  */
9275
9294
  name: string;
9295
+ /**
9296
+ * Whether the build trigger is enabled or not
9297
+ */
9298
+ enabled: boolean;
9276
9299
  /**
9277
9300
  * The type of build trigger
9278
9301
  */
@@ -9304,7 +9327,7 @@ export type BuildTriggerAttributes = {
9304
9327
  */
9305
9328
  indexing_status: string;
9306
9329
  /**
9307
- * The public URL of the frontend. If Site Search is enabled (indicated by `indexing_enabled`), this is the starting point from which the website's spidering will start
9330
+ * The public URL of the frontend.
9308
9331
  */
9309
9332
  frontend_url: string | null;
9310
9333
  /**
@@ -9315,10 +9338,6 @@ export type BuildTriggerAttributes = {
9315
9338
  * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content
9316
9339
  */
9317
9340
  indexing_enabled: boolean;
9318
- /**
9319
- * Whether the build trigger is enabled or not
9320
- */
9321
- enabled: boolean;
9322
9341
  };
9323
9342
  /**
9324
9343
  * This interface was referenced by `BuildTrigger`'s JSON-Schema
@@ -9357,13 +9376,13 @@ export type BuildTriggerCreateSchema = {
9357
9376
  /**
9358
9377
  * Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content
9359
9378
  */
9360
- indexing_enabled: boolean;
9379
+ indexing_enabled?: boolean;
9361
9380
  /**
9362
9381
  * Whether the build trigger is enabled or not
9363
9382
  */
9364
9383
  enabled?: boolean;
9365
9384
  /**
9366
- * The public URL of the frontend. If Site Search is enabled (indicated by `indexing_enabled`), this is the starting point from which the website's spidering will start
9385
+ * The public URL of the frontend.
9367
9386
  */
9368
9387
  frontend_url: string | null;
9369
9388
  /**
@@ -9412,7 +9431,7 @@ export type BuildTriggerUpdateSchema = {
9412
9431
  */
9413
9432
  enabled?: boolean;
9414
9433
  /**
9415
- * The public URL of the frontend. If Site Search is enabled (indicated by `indexing_enabled`), this is the starting point from which the website's spidering will start
9434
+ * The public URL of the frontend.
9416
9435
  */
9417
9436
  frontend_url?: string | null;
9418
9437
  /**
@@ -9443,7 +9462,7 @@ export type BuildTriggerDestroyTargetSchema = {
9443
9462
  data: BuildTrigger;
9444
9463
  };
9445
9464
  /**
9446
- * A Search Index represents a website that should be indexed by DatoCMS Site Search. When enabled, DatoCMS will periodically spider the website to update the search index.
9465
+ * A Search Index is used to index a website to provide DatoCMS Site Search functionality.
9447
9466
  *
9448
9467
  * This interface was referenced by `DatoApi`'s JSON-Schema
9449
9468
  * via the `definition` "search_index".
@@ -9471,11 +9490,7 @@ export type SearchIndexAttributes = {
9471
9490
  */
9472
9491
  enabled: boolean;
9473
9492
  /**
9474
- * Whether the spidering should automatically run after associated build triggers complete
9475
- */
9476
- build_trigger_indexing_enabled: boolean;
9477
- /**
9478
- * The public URL of the frontend. This is the starting point from which the website's spidering will start
9493
+ * The public URL of the website. This is the starting point from which the website's spidering will start
9479
9494
  */
9480
9495
  frontend_url: string | null;
9481
9496
  /**
@@ -9491,7 +9506,7 @@ export type SearchIndexAttributes = {
9491
9506
  */
9492
9507
  export type SearchIndexRelationships = {
9493
9508
  /**
9494
- * The build triggers connected to this search index
9509
+ * The build triggers that can trigger this search index
9495
9510
  */
9496
9511
  build_triggers: {
9497
9512
  data: BuildTriggerData[];
@@ -9505,7 +9520,7 @@ export type SearchIndexRelationships = {
9505
9520
  */
9506
9521
  export type SearchIndexMeta = {
9507
9522
  /**
9508
- * Status of the site search indexing
9523
+ * Status of the search indexing
9509
9524
  */
9510
9525
  indexing_status: 'unstarted' | 'pending' | 'success' | 'failed';
9511
9526
  /**
@@ -9544,11 +9559,7 @@ export type SearchIndexCreateSchema = {
9544
9559
  */
9545
9560
  enabled: boolean;
9546
9561
  /**
9547
- * Whether the spidering should automatically run after associated build triggers complete
9548
- */
9549
- build_trigger_indexing_enabled?: boolean;
9550
- /**
9551
- * The public URL of the frontend. This is the starting point from which the website's spidering will start
9562
+ * The public URL of the website. This is the starting point from which the website's spidering will start
9552
9563
  */
9553
9564
  frontend_url: string | null;
9554
9565
  /**
@@ -9561,7 +9572,7 @@ export type SearchIndexCreateSchema = {
9561
9572
  */
9562
9573
  relationships?: {
9563
9574
  /**
9564
- * The build triggers connected to this search index
9575
+ * The build triggers that can trigger this search index
9565
9576
  */
9566
9577
  build_triggers?: {
9567
9578
  data: BuildTriggerData[];
@@ -9594,11 +9605,7 @@ export type SearchIndexUpdateSchema = {
9594
9605
  */
9595
9606
  enabled?: boolean;
9596
9607
  /**
9597
- * Whether the spidering should automatically run after associated build triggers complete
9598
- */
9599
- build_trigger_indexing_enabled?: boolean;
9600
- /**
9601
- * The public URL of the frontend. This is the starting point from which the website's spidering will start
9608
+ * The public URL of the website. This is the starting point from which the website's spidering will start
9602
9609
  */
9603
9610
  frontend_url?: string | null;
9604
9611
  /**
@@ -9611,7 +9618,7 @@ export type SearchIndexUpdateSchema = {
9611
9618
  */
9612
9619
  relationships?: {
9613
9620
  /**
9614
- * The build triggers connected to this search index
9621
+ * The build triggers that can trigger this search index
9615
9622
  */
9616
9623
  build_triggers?: {
9617
9624
  data: BuildTriggerData[];