@datocms/cma-client 5.4.15 → 5.4.17
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.
- package/dist/cjs/generated/Client.js +1 -1
- package/dist/cjs/resources/Role.js +2 -0
- package/dist/cjs/resources/Role.js.map +1 -1
- package/dist/esm/fieldTypes/single_block.d.ts +1 -1
- package/dist/esm/generated/ApiTypes.d.ts +577 -533
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/RawApiTypes.d.ts +548 -429
- package/dist/esm/generated/resources/ItemVersion.d.ts +10 -3
- package/dist/esm/resources/Role.d.ts +5 -2
- package/dist/esm/resources/Role.js +2 -0
- package/dist/esm/resources/Role.js.map +1 -1
- package/dist/types/fieldTypes/single_block.d.ts +1 -1
- package/dist/types/generated/ApiTypes.d.ts +577 -533
- package/dist/types/generated/RawApiTypes.d.ts +548 -429
- package/dist/types/generated/resources/ItemVersion.d.ts +10 -3
- package/dist/types/resources/Role.d.ts +5 -2
- package/package.json +2 -2
- package/src/fieldTypes/single_block.ts +1 -1
- package/src/generated/ApiTypes.ts +848 -834
- package/src/generated/Client.ts +1 -1
- package/src/generated/RawApiTypes.ts +686 -589
- package/src/resources/Role.ts +8 -2
|
@@ -39,25 +39,30 @@ export type ItemTypeData<D extends ItemTypeDefinition = ItemTypeDefinition> = {
|
|
|
39
39
|
id: D extends ItemTypeDefinition ? D['itemTypeId'] : ItemTypeIdentity;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
export type Item<D extends ItemTypeDefinition = ItemTypeDefinition> =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
export type Item<D extends ItemTypeDefinition = ItemTypeDefinition> =
|
|
43
|
+
D extends ItemTypeDefinition
|
|
44
|
+
? {
|
|
45
|
+
__itemTypeId?: D['itemTypeId'];
|
|
46
|
+
type: ItemType1;
|
|
47
|
+
id: ItemIdentity;
|
|
48
|
+
relationships: ItemRelationships<D>;
|
|
49
|
+
meta: ItemMeta;
|
|
50
|
+
attributes: ToItemAttributes<D>;
|
|
51
|
+
}
|
|
52
|
+
: never;
|
|
50
53
|
|
|
51
54
|
export type ItemInNestedResponse<
|
|
52
55
|
D extends ItemTypeDefinition = ItemTypeDefinition,
|
|
53
|
-
> =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
> = D extends ItemTypeDefinition
|
|
57
|
+
? {
|
|
58
|
+
__itemTypeId?: D['itemTypeId'];
|
|
59
|
+
type: ItemType1;
|
|
60
|
+
id: ItemIdentity;
|
|
61
|
+
relationships: ItemRelationships<D>;
|
|
62
|
+
meta: ItemMeta;
|
|
63
|
+
attributes: ToItemAttributesInNestedResponse<D>;
|
|
64
|
+
}
|
|
65
|
+
: never;
|
|
61
66
|
|
|
62
67
|
/* tslint:disable */
|
|
63
68
|
/**
|
|
@@ -78,6 +83,16 @@ export type RoleType = 'role';
|
|
|
78
83
|
* via the `definition` "id".
|
|
79
84
|
*/
|
|
80
85
|
export type RoleIdentity = string;
|
|
86
|
+
/**
|
|
87
|
+
* ID of environment. Can only contain lowercase letters, numbers and dashes
|
|
88
|
+
*
|
|
89
|
+
* This interface was referenced by `Environment`'s JSON-Schema
|
|
90
|
+
* via the `definition` "identity".
|
|
91
|
+
*
|
|
92
|
+
* This interface was referenced by `Environment`'s JSON-Schema
|
|
93
|
+
* via the `definition` "id".
|
|
94
|
+
*/
|
|
95
|
+
export type EnvironmentIdentity = string;
|
|
81
96
|
/**
|
|
82
97
|
* RFC 4122 UUID of item type expressed in URL-safe base64 format
|
|
83
98
|
*
|
|
@@ -98,16 +113,6 @@ export type ItemTypeIdentity = string;
|
|
|
98
113
|
* via the `definition` "id".
|
|
99
114
|
*/
|
|
100
115
|
export type WorkflowIdentity = string;
|
|
101
|
-
/**
|
|
102
|
-
* ID of environment. Can only contain lowercase letters, numbers and dashes
|
|
103
|
-
*
|
|
104
|
-
* This interface was referenced by `Environment`'s JSON-Schema
|
|
105
|
-
* via the `definition` "identity".
|
|
106
|
-
*
|
|
107
|
-
* This interface was referenced by `Environment`'s JSON-Schema
|
|
108
|
-
* via the `definition` "id".
|
|
109
|
-
*/
|
|
110
|
-
export type EnvironmentIdentity = string;
|
|
111
116
|
/**
|
|
112
117
|
* RFC 4122 UUID of upload collection expressed in URL-safe base64 format
|
|
113
118
|
*
|
|
@@ -230,9 +235,14 @@ export type AccessTokenIdentity = string;
|
|
|
230
235
|
*/
|
|
231
236
|
export type AccessTokenDestroyHrefSchema = {
|
|
232
237
|
/**
|
|
233
|
-
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner type.
|
|
238
|
+
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner type. Use `account` or `organization` to reassign to the project's owner — `client.site.find().owner` returns the right type/id pair to pass.
|
|
234
239
|
*/
|
|
235
|
-
destination_user_type?:
|
|
240
|
+
destination_user_type?:
|
|
241
|
+
| 'account'
|
|
242
|
+
| 'organization'
|
|
243
|
+
| 'user'
|
|
244
|
+
| 'access_token'
|
|
245
|
+
| 'sso_user';
|
|
236
246
|
/**
|
|
237
247
|
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.
|
|
238
248
|
*/
|
|
@@ -1658,7 +1668,82 @@ export type SiteSelfHrefSchema = {
|
|
|
1658
1668
|
[k: string]: unknown;
|
|
1659
1669
|
};
|
|
1660
1670
|
/**
|
|
1661
|
-
* A Role
|
|
1671
|
+
* A Role groups the permissions that govern what a credential can do in a project. The same role definition is applied to **collaborators**, **SSO users**, and **API tokens** alike — design roles around what the *credential* should be allowed to do, not who is holding it.
|
|
1672
|
+
*
|
|
1673
|
+
* > [!PROTIP] 📘 Same role, different identities
|
|
1674
|
+
* > Ask "what is the *credential* allowed to do?" — not "what is this *person* allowed to do?". For API tokens specifically, the role's permissions are further constrained by the token's API surface flags (`can_access_cda`, `can_access_cda_preview`, `can_access_cma`); see the [API token](/docs/content-management-api/resources/access-token) resource for details.
|
|
1675
|
+
*
|
|
1676
|
+
* ## How permissions are computed
|
|
1677
|
+
*
|
|
1678
|
+
* Most of the granular permissions on a role come as a `positive_<resource>_permissions` / `negative_<resource>_permissions` pair: build triggers, search indexes, records (`item_type`), uploads. They all follow the same rule:
|
|
1679
|
+
*
|
|
1680
|
+
* > Effective permissions = `(inherited ∪ positive_*) − negative_*`
|
|
1681
|
+
*
|
|
1682
|
+
* Positive entries (and entries pulled in via `relationships.inherits_permissions_from`) grant access. Negative entries always win when they overlap. The idiomatic recipe for "almost everything" is a single `action: "all"` positive entry plus targeted negative entries to subtract — instead of enumerating each allowed action.
|
|
1683
|
+
*
|
|
1684
|
+
* > [!WARNING] ⚠️ Send `positive_*` and `negative_*` together
|
|
1685
|
+
* > For each resource family (records, uploads, build triggers, search indexes), the matching `positive_*` and `negative_*` arrays must be **both present or both absent** in a create/update payload. On **update**, sent arrays *replace* the stored ones wholesale, so always read the role first and pass back the existing entries on the side you're not changing — sending `[]` to satisfy the constraint will erase everything that was there. (On create, `[]` is fine since there's nothing to lose.) The [Update endpoint](/docs/content-management-api/resources/role/update) documents an SDK helper that handles this diff for records and uploads.
|
|
1686
|
+
*
|
|
1687
|
+
* The computed result is exposed on every role response under `meta.final_permissions`; the raw declared values stay on `attributes.*`. See [Effective vs declared permissions](#effective-vs-declared-permissions) below.
|
|
1688
|
+
*
|
|
1689
|
+
* ## Project-level permissions
|
|
1690
|
+
*
|
|
1691
|
+
* These attributes gate access to project-wide capabilities. They apply uniformly across the whole project; granular control over individual records and uploads lives under [Per-environment content permissions](#per-environment-content-permissions).
|
|
1692
|
+
*
|
|
1693
|
+
* - **Project-wide flags.** Boolean attributes named `can_*` (`can_edit_schema`, `can_manage_environments`, `can_manage_access_tokens`, …) cover the schema, environments, users, webhooks, and so on — see the property table for the full list.
|
|
1694
|
+
* - **Environment access.** `environments_access` controls *which* environments the credential can enter at all (`all`, `primary_only`, `sandbox_only`, or `none`). Use `none` when the role is meant only to be inherited from.
|
|
1695
|
+
* - **Build triggers.** The role may **manually fire** the build triggers listed in `positive_build_trigger_permissions`, minus those listed in `negative_build_trigger_permissions`. Use `build_trigger: null` on an entry to cover every trigger at once. Creating, editing, or deleting trigger definitions is gated separately by `can_manage_build_triggers`.
|
|
1696
|
+
* - **Search indexes.** The role may **manually re-index** the search indexes listed in `positive_search_index_permissions`, minus those listed in `negative_search_index_permissions`. Use `search_index: null` on an entry to cover every index. Managing the index definitions themselves is gated separately by `can_manage_search_indexes`.
|
|
1697
|
+
*
|
|
1698
|
+
* ## Per-environment content permissions
|
|
1699
|
+
*
|
|
1700
|
+
* The role's access to **records** and **uploads** is governed by two positive/negative array pairs. Every entry is **scoped to a single environment** via the required `environment` field — to grant the same permission across multiple environments, repeat the entry once per environment id (or use `inherits_permissions_from` together with `environments_access`). The computation is the same `(inherited ∪ positive_*) − negative_*` rule from [How permissions are computed](#how-permissions-are-computed), evaluated per environment.
|
|
1701
|
+
*
|
|
1702
|
+
* ###### Records
|
|
1703
|
+
*
|
|
1704
|
+
* Permission entries live in `positive_item_type_permissions` (and the `negative_*` counterpart). Each entry is a discriminated union keyed by `action`:
|
|
1705
|
+
*
|
|
1706
|
+
* - `all` — every action below
|
|
1707
|
+
* - `read` — read records
|
|
1708
|
+
* - `create` — create new records
|
|
1709
|
+
* - `update` — edit existing records
|
|
1710
|
+
* - `publish` — publish/unpublish records
|
|
1711
|
+
* - `duplicate` — duplicate records
|
|
1712
|
+
* - `delete` — destroy records
|
|
1713
|
+
* - `edit_creator` — change a record's `creator` relationship
|
|
1714
|
+
* - `take_over` — wrest a record from another user currently editing it
|
|
1715
|
+
* - `move_to_stage` — move a record between workflow stages
|
|
1716
|
+
*
|
|
1717
|
+
* Per entry you can also restrict by:
|
|
1718
|
+
*
|
|
1719
|
+
* - `item_type` — restrict to a specific model (`null` = all models)
|
|
1720
|
+
* - `workflow` — restrict to records associated with a workflow (mutually exclusive with `item_type`)
|
|
1721
|
+
* - `on_creator` — `anyone`, `self` (records the credential created), or `role` (records created by anyone with this role)
|
|
1722
|
+
* - `localization_scope` + `locale` — for `create`/`update`/`publish`/`all`: restrict to localized vs non-localized content, optionally pinning to one locale (on `all` the scope is forced to `"all"`)
|
|
1723
|
+
* - `on_stage` / `to_stage` — for workflow-aware actions: restrict to records currently on a stage, or to moves towards a stage
|
|
1724
|
+
*
|
|
1725
|
+
* The shape of each entry depends on the `action` — see the property tables on each endpoint for which sub-fields are valid per branch.
|
|
1726
|
+
*
|
|
1727
|
+
* > [!WARNING] ⚠️ Some restrictors require an Enterprise plan
|
|
1728
|
+
* > Workflow-aware permissions — the `move_to_stage` action and the `workflow` / `on_stage` / `to_stage` restrictors — require [Workflows](https://www.datocms.com/features/workflows), an Enterprise feature. Per-content-scope restrictions are also gated: only `localization_scope: "all"` is available on every plan, while `"localized"` (with its companion `locale`) and `"not_localized"` both require Enterprise. Setting any of these on a non-Enterprise project will return an error — check the [pricing page](https://www.datocms.com/pricing) before relying on them.
|
|
1729
|
+
*
|
|
1730
|
+
* ###### Uploads
|
|
1731
|
+
*
|
|
1732
|
+
* Permission entries live in `positive_upload_permissions` (and the `negative_*` counterpart). Same discriminated-union shape as records, with the upload-relevant actions (`read`, `create`, `update`, `delete`, `edit_creator`, `replace_asset`, `move`, `all`), scoped by `upload_collection` instead of `item_type`. The `move` action also accepts `move_to_upload_collection` to restrict the destination of the move.
|
|
1733
|
+
*
|
|
1734
|
+
* ## Inheriting from other roles
|
|
1735
|
+
*
|
|
1736
|
+
* `relationships.inherits_permissions_from` accepts a list of role ids whose permissions are unioned into this role's positive set before the negative set is subtracted (per [How permissions are computed](#how-permissions-are-computed)). This is how built-in roles are typically extended without copying their full permission tree — duplicate the closest built-in role, then add a `negative_*` entry to take something away, or set `inherits_permissions_from` and add only the positive entries that differ.
|
|
1737
|
+
*
|
|
1738
|
+
* ## Effective vs declared permissions
|
|
1739
|
+
*
|
|
1740
|
+
* Two views of a role's permissions are surfaced on the response:
|
|
1741
|
+
*
|
|
1742
|
+
* - **`attributes.*`** — the permissions declared *on this role directly*. This is what was sent on create/update; it does not reflect anything inherited from `relationships.inherits_permissions_from`.
|
|
1743
|
+
* - **`meta.final_permissions`** — the **effective** permissions after walking the inheritance chain and applying the rule from [How permissions are computed](#how-permissions-are-computed). This is the set actually enforced when a credential bound to this role makes a request.
|
|
1744
|
+
*
|
|
1745
|
+
* When debugging "why can't this user do X?", read `meta.final_permissions`, not `attributes`.
|
|
1746
|
+
*
|
|
1662
1747
|
*
|
|
1663
1748
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
1664
1749
|
* via the `definition` "role".
|
|
@@ -1686,11 +1771,11 @@ export type RoleAttributes = {
|
|
|
1686
1771
|
*/
|
|
1687
1772
|
can_edit_favicon: boolean;
|
|
1688
1773
|
/**
|
|
1689
|
-
* Can change project
|
|
1774
|
+
* Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
|
|
1690
1775
|
*/
|
|
1691
1776
|
can_edit_site: boolean;
|
|
1692
1777
|
/**
|
|
1693
|
-
* Can create and edit models and plugins
|
|
1778
|
+
* Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
|
|
1694
1779
|
*/
|
|
1695
1780
|
can_edit_schema: boolean;
|
|
1696
1781
|
/**
|
|
@@ -1698,11 +1783,11 @@ export type RoleAttributes = {
|
|
|
1698
1783
|
*/
|
|
1699
1784
|
can_manage_menu: boolean;
|
|
1700
1785
|
/**
|
|
1701
|
-
* Can
|
|
1786
|
+
* Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
|
|
1702
1787
|
*/
|
|
1703
1788
|
can_edit_environment: boolean;
|
|
1704
1789
|
/**
|
|
1705
|
-
* Can promote
|
|
1790
|
+
* Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
|
|
1706
1791
|
*/
|
|
1707
1792
|
can_promote_environments: boolean;
|
|
1708
1793
|
/**
|
|
@@ -1734,7 +1819,7 @@ export type RoleAttributes = {
|
|
|
1734
1819
|
*/
|
|
1735
1820
|
can_manage_webhooks: boolean;
|
|
1736
1821
|
/**
|
|
1737
|
-
* Can create and delete sandbox environments
|
|
1822
|
+
* Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
|
|
1738
1823
|
*/
|
|
1739
1824
|
can_manage_environments: boolean;
|
|
1740
1825
|
/**
|
|
@@ -1766,166 +1851,424 @@ export type RoleAttributes = {
|
|
|
1766
1851
|
*/
|
|
1767
1852
|
can_access_search_index_events_log: boolean;
|
|
1768
1853
|
/**
|
|
1769
|
-
* Allowed actions on a model (or all) for a role
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
| 'create'
|
|
1785
|
-
| 'duplicate'
|
|
1786
|
-
| 'delete'
|
|
1787
|
-
| 'publish'
|
|
1788
|
-
| 'edit_creator'
|
|
1789
|
-
| 'take_over'
|
|
1790
|
-
| 'move_to_stage';
|
|
1791
|
-
/**
|
|
1792
|
-
* Permitted creator
|
|
1793
|
-
*/
|
|
1794
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
1795
|
-
/**
|
|
1796
|
-
* Permitted content scope
|
|
1797
|
-
*/
|
|
1798
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
1799
|
-
/**
|
|
1800
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
1801
|
-
*/
|
|
1802
|
-
locale?: string | null;
|
|
1803
|
-
}[];
|
|
1854
|
+
* Allowed actions on a model (or all) for a role.
|
|
1855
|
+
*
|
|
1856
|
+
* The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
|
|
1857
|
+
* - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
|
|
1858
|
+
* - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
|
|
1859
|
+
*/
|
|
1860
|
+
positive_item_type_permissions: (
|
|
1861
|
+
| RoleItemTypePermissionAll
|
|
1862
|
+
| RoleItemTypePermissionRead
|
|
1863
|
+
| RoleItemTypePermissionCreate
|
|
1864
|
+
| RoleItemTypePermissionUpdateOrPublish
|
|
1865
|
+
| RoleItemTypePermissionDuplicate
|
|
1866
|
+
| RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
|
|
1867
|
+
| RoleItemTypePermissionMoveToStage
|
|
1868
|
+
)[];
|
|
1804
1869
|
/**
|
|
1805
|
-
* Prohibited actions on a model (or all) for a role
|
|
1870
|
+
* Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
|
|
1806
1871
|
*/
|
|
1807
|
-
negative_item_type_permissions:
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
action:
|
|
1817
|
-
| 'all'
|
|
1818
|
-
| 'read'
|
|
1819
|
-
| 'update'
|
|
1820
|
-
| 'create'
|
|
1821
|
-
| 'duplicate'
|
|
1822
|
-
| 'delete'
|
|
1823
|
-
| 'publish'
|
|
1824
|
-
| 'edit_creator'
|
|
1825
|
-
| 'take_over'
|
|
1826
|
-
| 'move_to_stage';
|
|
1827
|
-
/**
|
|
1828
|
-
* Permitted creator
|
|
1829
|
-
*/
|
|
1830
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
1831
|
-
/**
|
|
1832
|
-
* Permitted content scope
|
|
1833
|
-
*/
|
|
1834
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
1835
|
-
/**
|
|
1836
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
1837
|
-
*/
|
|
1838
|
-
locale?: string | null;
|
|
1839
|
-
}[];
|
|
1872
|
+
negative_item_type_permissions: (
|
|
1873
|
+
| RoleItemTypePermissionAll
|
|
1874
|
+
| RoleItemTypePermissionRead
|
|
1875
|
+
| RoleItemTypePermissionCreate
|
|
1876
|
+
| RoleItemTypePermissionUpdateOrPublish
|
|
1877
|
+
| RoleItemTypePermissionDuplicate
|
|
1878
|
+
| RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
|
|
1879
|
+
| RoleItemTypePermissionMoveToStage
|
|
1880
|
+
)[];
|
|
1840
1881
|
/**
|
|
1841
|
-
* Allowed actions on
|
|
1882
|
+
* Allowed actions on uploads (or all) for a role.
|
|
1883
|
+
*
|
|
1884
|
+
* The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
|
|
1842
1885
|
*/
|
|
1843
|
-
positive_upload_permissions:
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
| 'read'
|
|
1851
|
-
| 'update'
|
|
1852
|
-
| 'create'
|
|
1853
|
-
| 'delete'
|
|
1854
|
-
| 'edit_creator'
|
|
1855
|
-
| 'replace_asset'
|
|
1856
|
-
| 'move';
|
|
1857
|
-
/**
|
|
1858
|
-
* Permitted creator
|
|
1859
|
-
*/
|
|
1860
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
1861
|
-
/**
|
|
1862
|
-
* Permitted content scope
|
|
1863
|
-
*/
|
|
1864
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
1865
|
-
/**
|
|
1866
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
1867
|
-
*/
|
|
1868
|
-
locale?: string | null;
|
|
1869
|
-
upload_collection?: UploadCollectionIdentity | null;
|
|
1870
|
-
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
1871
|
-
}[];
|
|
1886
|
+
positive_upload_permissions: (
|
|
1887
|
+
| RoleUploadPermissionAll
|
|
1888
|
+
| RoleUploadPermissionUpdate
|
|
1889
|
+
| RoleUploadPermissionCreate
|
|
1890
|
+
| RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
|
|
1891
|
+
| RoleUploadPermissionMove
|
|
1892
|
+
)[];
|
|
1872
1893
|
/**
|
|
1873
|
-
* Prohibited actions on
|
|
1894
|
+
* Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
|
|
1874
1895
|
*/
|
|
1875
|
-
negative_upload_permissions:
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
| 'read'
|
|
1883
|
-
| 'update'
|
|
1884
|
-
| 'create'
|
|
1885
|
-
| 'delete'
|
|
1886
|
-
| 'edit_creator'
|
|
1887
|
-
| 'replace_asset'
|
|
1888
|
-
| 'move';
|
|
1889
|
-
/**
|
|
1890
|
-
* Permitted creator
|
|
1891
|
-
*/
|
|
1892
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
1893
|
-
/**
|
|
1894
|
-
* Permitted content scope
|
|
1895
|
-
*/
|
|
1896
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
1897
|
-
/**
|
|
1898
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
1899
|
-
*/
|
|
1900
|
-
locale?: string | null;
|
|
1901
|
-
upload_collection?: UploadCollectionIdentity | null;
|
|
1902
|
-
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
1903
|
-
}[];
|
|
1896
|
+
negative_upload_permissions: (
|
|
1897
|
+
| RoleUploadPermissionAll
|
|
1898
|
+
| RoleUploadPermissionUpdate
|
|
1899
|
+
| RoleUploadPermissionCreate
|
|
1900
|
+
| RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
|
|
1901
|
+
| RoleUploadPermissionMove
|
|
1902
|
+
)[];
|
|
1904
1903
|
/**
|
|
1905
|
-
*
|
|
1904
|
+
* Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
|
|
1906
1905
|
*/
|
|
1907
1906
|
positive_build_trigger_permissions: {
|
|
1908
1907
|
build_trigger?: BuildTriggerIdentity | null;
|
|
1909
1908
|
}[];
|
|
1910
1909
|
/**
|
|
1911
|
-
*
|
|
1910
|
+
* Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
|
|
1912
1911
|
*/
|
|
1913
1912
|
negative_build_trigger_permissions: {
|
|
1914
1913
|
build_trigger?: BuildTriggerIdentity | null;
|
|
1915
1914
|
}[];
|
|
1916
1915
|
/**
|
|
1917
|
-
* Search indexes that
|
|
1916
|
+
* Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
|
|
1918
1917
|
*/
|
|
1919
1918
|
positive_search_index_permissions: {
|
|
1920
1919
|
search_index?: SearchIndexIdentity | null;
|
|
1921
1920
|
}[];
|
|
1922
1921
|
/**
|
|
1923
|
-
* Search indexes
|
|
1922
|
+
* Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
|
|
1924
1923
|
*/
|
|
1925
1924
|
negative_search_index_permissions: {
|
|
1926
1925
|
search_index?: SearchIndexIdentity | null;
|
|
1927
1926
|
}[];
|
|
1928
1927
|
};
|
|
1928
|
+
/**
|
|
1929
|
+
* Item-type permission entry granting all actions on a model. Requires `localization_scope: "all"`.
|
|
1930
|
+
*
|
|
1931
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
1932
|
+
* via the `definition` "item_type_permission_all".
|
|
1933
|
+
*/
|
|
1934
|
+
export type RoleItemTypePermissionAll = {
|
|
1935
|
+
/**
|
|
1936
|
+
* Permitted action
|
|
1937
|
+
*/
|
|
1938
|
+
action: 'all';
|
|
1939
|
+
environment: EnvironmentIdentity;
|
|
1940
|
+
/**
|
|
1941
|
+
* Restricts the permission to a specific model. When `null`, the permission applies to all models.
|
|
1942
|
+
*/
|
|
1943
|
+
item_type?: ItemTypeIdentity | null;
|
|
1944
|
+
/**
|
|
1945
|
+
* Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
|
|
1946
|
+
*/
|
|
1947
|
+
workflow?: WorkflowIdentity | null;
|
|
1948
|
+
/**
|
|
1949
|
+
* Restrict to records currently on a workflow stage.
|
|
1950
|
+
*/
|
|
1951
|
+
on_stage?: string | null;
|
|
1952
|
+
/**
|
|
1953
|
+
* Restrict to moves towards a specific workflow stage.
|
|
1954
|
+
*/
|
|
1955
|
+
to_stage?: string | null;
|
|
1956
|
+
/**
|
|
1957
|
+
* Permitted creator
|
|
1958
|
+
*/
|
|
1959
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
1960
|
+
/**
|
|
1961
|
+
* For `action: "all"` this must be `"all"`.
|
|
1962
|
+
*/
|
|
1963
|
+
localization_scope: 'all';
|
|
1964
|
+
[k: string]: unknown;
|
|
1965
|
+
};
|
|
1966
|
+
/**
|
|
1967
|
+
* Item-type permission entry granting `read` on records. `localization_scope` and `locale` must be omitted (or null).
|
|
1968
|
+
*
|
|
1969
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
1970
|
+
* via the `definition` "item_type_permission_read".
|
|
1971
|
+
*/
|
|
1972
|
+
export type RoleItemTypePermissionRead = {
|
|
1973
|
+
/**
|
|
1974
|
+
* Permitted action
|
|
1975
|
+
*/
|
|
1976
|
+
action: 'read';
|
|
1977
|
+
environment: EnvironmentIdentity;
|
|
1978
|
+
/**
|
|
1979
|
+
* Restricts the permission to a specific model. When `null`, the permission applies to all models.
|
|
1980
|
+
*/
|
|
1981
|
+
item_type?: ItemTypeIdentity | null;
|
|
1982
|
+
/**
|
|
1983
|
+
* Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
|
|
1984
|
+
*/
|
|
1985
|
+
workflow?: WorkflowIdentity | null;
|
|
1986
|
+
/**
|
|
1987
|
+
* Permitted creator
|
|
1988
|
+
*/
|
|
1989
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
1990
|
+
[k: string]: unknown;
|
|
1991
|
+
};
|
|
1992
|
+
/**
|
|
1993
|
+
* Item-type permission entry granting `create` on records. Requires `localization_scope`; if `localization_scope: "localized"`, `locale` is also required. `on_creator`, `on_stage`, and `to_stage` are not applicable and must be omitted (or null).
|
|
1994
|
+
*
|
|
1995
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
1996
|
+
* via the `definition` "item_type_permission_create".
|
|
1997
|
+
*/
|
|
1998
|
+
export type RoleItemTypePermissionCreate = {
|
|
1999
|
+
/**
|
|
2000
|
+
* Permitted action
|
|
2001
|
+
*/
|
|
2002
|
+
action: 'create';
|
|
2003
|
+
environment: EnvironmentIdentity;
|
|
2004
|
+
/**
|
|
2005
|
+
* Restricts the permission to a specific model. When `null`, the permission applies to all models.
|
|
2006
|
+
*/
|
|
2007
|
+
item_type?: ItemTypeIdentity | null;
|
|
2008
|
+
/**
|
|
2009
|
+
* Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
|
|
2010
|
+
*/
|
|
2011
|
+
workflow?: WorkflowIdentity | null;
|
|
2012
|
+
/**
|
|
2013
|
+
* Permitted content scope
|
|
2014
|
+
*/
|
|
2015
|
+
localization_scope: 'all' | 'localized' | 'not_localized';
|
|
2016
|
+
/**
|
|
2017
|
+
* Required (non-null) when `localization_scope` is `"localized"`; must be omitted otherwise.
|
|
2018
|
+
*/
|
|
2019
|
+
locale?: string | null;
|
|
2020
|
+
[k: string]: unknown;
|
|
2021
|
+
};
|
|
2022
|
+
/**
|
|
2023
|
+
* Item-type permission entry granting `update` or `publish` on records. Requires `localization_scope`; if `localization_scope: "localized"`, `locale` is also required.
|
|
2024
|
+
*
|
|
2025
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2026
|
+
* via the `definition` "item_type_permission_update_or_publish".
|
|
2027
|
+
*/
|
|
2028
|
+
export type RoleItemTypePermissionUpdateOrPublish = {
|
|
2029
|
+
/**
|
|
2030
|
+
* Permitted action
|
|
2031
|
+
*/
|
|
2032
|
+
action: 'update' | 'publish';
|
|
2033
|
+
environment: EnvironmentIdentity;
|
|
2034
|
+
/**
|
|
2035
|
+
* Restricts the permission to a specific model. When `null`, the permission applies to all models.
|
|
2036
|
+
*/
|
|
2037
|
+
item_type?: ItemTypeIdentity | null;
|
|
2038
|
+
/**
|
|
2039
|
+
* Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
|
|
2040
|
+
*/
|
|
2041
|
+
workflow?: WorkflowIdentity | null;
|
|
2042
|
+
/**
|
|
2043
|
+
* Restrict to records currently on a workflow stage.
|
|
2044
|
+
*/
|
|
2045
|
+
on_stage?: string | null;
|
|
2046
|
+
/**
|
|
2047
|
+
* Permitted creator
|
|
2048
|
+
*/
|
|
2049
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
2050
|
+
/**
|
|
2051
|
+
* Permitted content scope
|
|
2052
|
+
*/
|
|
2053
|
+
localization_scope: 'all' | 'localized' | 'not_localized';
|
|
2054
|
+
/**
|
|
2055
|
+
* Required (non-null) when `localization_scope` is `"localized"`; must be omitted otherwise.
|
|
2056
|
+
*/
|
|
2057
|
+
locale?: string | null;
|
|
2058
|
+
[k: string]: unknown;
|
|
2059
|
+
};
|
|
2060
|
+
/**
|
|
2061
|
+
* Item-type permission entry granting `duplicate` on records. `on_creator`, `localization_scope` and `locale` are not applicable and must be omitted (or null).
|
|
2062
|
+
*
|
|
2063
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2064
|
+
* via the `definition` "item_type_permission_duplicate".
|
|
2065
|
+
*/
|
|
2066
|
+
export type RoleItemTypePermissionDuplicate = {
|
|
2067
|
+
/**
|
|
2068
|
+
* Permitted action
|
|
2069
|
+
*/
|
|
2070
|
+
action: 'duplicate';
|
|
2071
|
+
environment: EnvironmentIdentity;
|
|
2072
|
+
/**
|
|
2073
|
+
* Restricts the permission to a specific model. When `null`, the permission applies to all models.
|
|
2074
|
+
*/
|
|
2075
|
+
item_type?: ItemTypeIdentity | null;
|
|
2076
|
+
/**
|
|
2077
|
+
* Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
|
|
2078
|
+
*/
|
|
2079
|
+
workflow?: WorkflowIdentity | null;
|
|
2080
|
+
/**
|
|
2081
|
+
* Restrict to records currently on a workflow stage.
|
|
2082
|
+
*/
|
|
2083
|
+
on_stage?: string | null;
|
|
2084
|
+
[k: string]: unknown;
|
|
2085
|
+
};
|
|
2086
|
+
/**
|
|
2087
|
+
* Item-type permission entry granting `delete`, `edit_creator`, or `take_over` on records. `localization_scope` and `locale` must be omitted (or null).
|
|
2088
|
+
*
|
|
2089
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2090
|
+
* via the `definition` "item_type_permission_delete_or_edit_creator_or_take_over".
|
|
2091
|
+
*/
|
|
2092
|
+
export type RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver = {
|
|
2093
|
+
/**
|
|
2094
|
+
* Permitted action
|
|
2095
|
+
*/
|
|
2096
|
+
action: 'delete' | 'edit_creator' | 'take_over';
|
|
2097
|
+
environment: EnvironmentIdentity;
|
|
2098
|
+
/**
|
|
2099
|
+
* Restricts the permission to a specific model. When `null`, the permission applies to all models.
|
|
2100
|
+
*/
|
|
2101
|
+
item_type?: ItemTypeIdentity | null;
|
|
2102
|
+
/**
|
|
2103
|
+
* Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
|
|
2104
|
+
*/
|
|
2105
|
+
workflow?: WorkflowIdentity | null;
|
|
2106
|
+
/**
|
|
2107
|
+
* Restrict to records currently on a workflow stage.
|
|
2108
|
+
*/
|
|
2109
|
+
on_stage?: string | null;
|
|
2110
|
+
/**
|
|
2111
|
+
* Permitted creator
|
|
2112
|
+
*/
|
|
2113
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
2114
|
+
[k: string]: unknown;
|
|
2115
|
+
};
|
|
2116
|
+
/**
|
|
2117
|
+
* Item-type permission entry granting `move_to_stage` on records. `localization_scope` and `locale` must be omitted (or null).
|
|
2118
|
+
*
|
|
2119
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2120
|
+
* via the `definition` "item_type_permission_move_to_stage".
|
|
2121
|
+
*/
|
|
2122
|
+
export type RoleItemTypePermissionMoveToStage = {
|
|
2123
|
+
/**
|
|
2124
|
+
* Permitted action
|
|
2125
|
+
*/
|
|
2126
|
+
action: 'move_to_stage';
|
|
2127
|
+
environment: EnvironmentIdentity;
|
|
2128
|
+
/**
|
|
2129
|
+
* Restricts the permission to a specific model. When `null`, the permission applies to all models.
|
|
2130
|
+
*/
|
|
2131
|
+
item_type?: ItemTypeIdentity | null;
|
|
2132
|
+
/**
|
|
2133
|
+
* Restricts the permission to records associated with a specific workflow. Mutually exclusive with `item_type`.
|
|
2134
|
+
*/
|
|
2135
|
+
workflow?: WorkflowIdentity | null;
|
|
2136
|
+
/**
|
|
2137
|
+
* Restrict to records currently on a workflow stage.
|
|
2138
|
+
*/
|
|
2139
|
+
on_stage?: string | null;
|
|
2140
|
+
/**
|
|
2141
|
+
* Restrict to moves towards a specific workflow stage.
|
|
2142
|
+
*/
|
|
2143
|
+
to_stage?: string | null;
|
|
2144
|
+
/**
|
|
2145
|
+
* Permitted creator
|
|
2146
|
+
*/
|
|
2147
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
2148
|
+
[k: string]: unknown;
|
|
2149
|
+
};
|
|
2150
|
+
/**
|
|
2151
|
+
* Upload permission entry granting all actions on uploads. Requires `localization_scope: "all"`.
|
|
2152
|
+
*
|
|
2153
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2154
|
+
* via the `definition` "upload_permission_all".
|
|
2155
|
+
*/
|
|
2156
|
+
export type RoleUploadPermissionAll = {
|
|
2157
|
+
/**
|
|
2158
|
+
* Permitted action
|
|
2159
|
+
*/
|
|
2160
|
+
action: 'all';
|
|
2161
|
+
environment: EnvironmentIdentity;
|
|
2162
|
+
/**
|
|
2163
|
+
* Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
|
|
2164
|
+
*/
|
|
2165
|
+
upload_collection?: UploadCollectionIdentity | null;
|
|
2166
|
+
/**
|
|
2167
|
+
* Permitted creator
|
|
2168
|
+
*/
|
|
2169
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
2170
|
+
/**
|
|
2171
|
+
* For `action: "all"` this must be `"all"`.
|
|
2172
|
+
*/
|
|
2173
|
+
localization_scope: 'all';
|
|
2174
|
+
[k: string]: unknown;
|
|
2175
|
+
};
|
|
2176
|
+
/**
|
|
2177
|
+
* Upload permission entry granting `update` on uploads. Requires `localization_scope`; if `localization_scope: "localized"`, `locale` is also required.
|
|
2178
|
+
*
|
|
2179
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2180
|
+
* via the `definition` "upload_permission_update".
|
|
2181
|
+
*/
|
|
2182
|
+
export type RoleUploadPermissionUpdate = {
|
|
2183
|
+
/**
|
|
2184
|
+
* Permitted action
|
|
2185
|
+
*/
|
|
2186
|
+
action: 'update';
|
|
2187
|
+
environment: EnvironmentIdentity;
|
|
2188
|
+
/**
|
|
2189
|
+
* Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
|
|
2190
|
+
*/
|
|
2191
|
+
upload_collection?: UploadCollectionIdentity | null;
|
|
2192
|
+
/**
|
|
2193
|
+
* Permitted creator
|
|
2194
|
+
*/
|
|
2195
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
2196
|
+
/**
|
|
2197
|
+
* Permitted content scope
|
|
2198
|
+
*/
|
|
2199
|
+
localization_scope: 'all' | 'localized' | 'not_localized';
|
|
2200
|
+
/**
|
|
2201
|
+
* Required (non-null) when `localization_scope` is `"localized"`; must be omitted otherwise.
|
|
2202
|
+
*/
|
|
2203
|
+
locale?: string | null;
|
|
2204
|
+
[k: string]: unknown;
|
|
2205
|
+
};
|
|
2206
|
+
/**
|
|
2207
|
+
* Upload permission entry granting `create` on uploads. `on_creator`, `localization_scope` and `locale` are not applicable and must be omitted (or null).
|
|
2208
|
+
*
|
|
2209
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2210
|
+
* via the `definition` "upload_permission_create".
|
|
2211
|
+
*/
|
|
2212
|
+
export type RoleUploadPermissionCreate = {
|
|
2213
|
+
/**
|
|
2214
|
+
* Permitted action
|
|
2215
|
+
*/
|
|
2216
|
+
action: 'create';
|
|
2217
|
+
environment: EnvironmentIdentity;
|
|
2218
|
+
/**
|
|
2219
|
+
* Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
|
|
2220
|
+
*/
|
|
2221
|
+
upload_collection?: UploadCollectionIdentity | null;
|
|
2222
|
+
[k: string]: unknown;
|
|
2223
|
+
};
|
|
2224
|
+
/**
|
|
2225
|
+
* Upload permission entry granting `read`, `delete`, `edit_creator`, or `replace_asset` on uploads. `localization_scope` and `locale` must be omitted (or null).
|
|
2226
|
+
*
|
|
2227
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2228
|
+
* via the `definition` "upload_permission_read_or_delete_or_edit_creator_or_replace_asset".
|
|
2229
|
+
*/
|
|
2230
|
+
export type RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset = {
|
|
2231
|
+
/**
|
|
2232
|
+
* Permitted action
|
|
2233
|
+
*/
|
|
2234
|
+
action: 'read' | 'delete' | 'edit_creator' | 'replace_asset';
|
|
2235
|
+
environment: EnvironmentIdentity;
|
|
2236
|
+
/**
|
|
2237
|
+
* Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
|
|
2238
|
+
*/
|
|
2239
|
+
upload_collection?: UploadCollectionIdentity | null;
|
|
2240
|
+
/**
|
|
2241
|
+
* Permitted creator
|
|
2242
|
+
*/
|
|
2243
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
2244
|
+
[k: string]: unknown;
|
|
2245
|
+
};
|
|
2246
|
+
/**
|
|
2247
|
+
* Upload permission entry granting `move` on uploads. `localization_scope` and `locale` must be omitted (or null). `move_to_upload_collection` is only valid here.
|
|
2248
|
+
*
|
|
2249
|
+
* This interface was referenced by `Role`'s JSON-Schema
|
|
2250
|
+
* via the `definition` "upload_permission_move".
|
|
2251
|
+
*/
|
|
2252
|
+
export type RoleUploadPermissionMove = {
|
|
2253
|
+
/**
|
|
2254
|
+
* Permitted action
|
|
2255
|
+
*/
|
|
2256
|
+
action: 'move';
|
|
2257
|
+
environment: EnvironmentIdentity;
|
|
2258
|
+
/**
|
|
2259
|
+
* Restricts the permission to a specific upload collection. When `null`, the permission applies to all collections.
|
|
2260
|
+
*/
|
|
2261
|
+
upload_collection?: UploadCollectionIdentity | null;
|
|
2262
|
+
/**
|
|
2263
|
+
* Restricts the destination upload collection of the move action. When `null`, any destination is allowed.
|
|
2264
|
+
*/
|
|
2265
|
+
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
2266
|
+
/**
|
|
2267
|
+
* Permitted creator
|
|
2268
|
+
*/
|
|
2269
|
+
on_creator: 'anyone' | 'self' | 'role';
|
|
2270
|
+
[k: string]: unknown;
|
|
2271
|
+
};
|
|
1929
2272
|
/**
|
|
1930
2273
|
* JSON API links
|
|
1931
2274
|
*
|
|
@@ -1966,11 +2309,11 @@ export type RoleMeta = {
|
|
|
1966
2309
|
*/
|
|
1967
2310
|
can_edit_favicon: boolean;
|
|
1968
2311
|
/**
|
|
1969
|
-
* Can change project
|
|
2312
|
+
* Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
|
|
1970
2313
|
*/
|
|
1971
2314
|
can_edit_site: boolean;
|
|
1972
2315
|
/**
|
|
1973
|
-
* Can create and edit models and plugins
|
|
2316
|
+
* Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
|
|
1974
2317
|
*/
|
|
1975
2318
|
can_edit_schema: boolean;
|
|
1976
2319
|
/**
|
|
@@ -1978,11 +2321,11 @@ export type RoleMeta = {
|
|
|
1978
2321
|
*/
|
|
1979
2322
|
can_manage_menu: boolean;
|
|
1980
2323
|
/**
|
|
1981
|
-
* Can
|
|
2324
|
+
* Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
|
|
1982
2325
|
*/
|
|
1983
2326
|
can_edit_environment: boolean;
|
|
1984
2327
|
/**
|
|
1985
|
-
* Can promote
|
|
2328
|
+
* Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
|
|
1986
2329
|
*/
|
|
1987
2330
|
can_promote_environments: boolean;
|
|
1988
2331
|
/**
|
|
@@ -2014,7 +2357,7 @@ export type RoleMeta = {
|
|
|
2014
2357
|
*/
|
|
2015
2358
|
can_manage_webhooks: boolean;
|
|
2016
2359
|
/**
|
|
2017
|
-
* Can create and delete sandbox environments
|
|
2360
|
+
* Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
|
|
2018
2361
|
*/
|
|
2019
2362
|
can_manage_environments: boolean;
|
|
2020
2363
|
/**
|
|
@@ -2046,161 +2389,75 @@ export type RoleMeta = {
|
|
|
2046
2389
|
*/
|
|
2047
2390
|
can_access_search_index_events_log: boolean;
|
|
2048
2391
|
/**
|
|
2049
|
-
* Allowed actions on a model (or all) for a role
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
| 'create'
|
|
2065
|
-
| 'duplicate'
|
|
2066
|
-
| 'delete'
|
|
2067
|
-
| 'publish'
|
|
2068
|
-
| 'edit_creator'
|
|
2069
|
-
| 'take_over'
|
|
2070
|
-
| 'move_to_stage';
|
|
2071
|
-
/**
|
|
2072
|
-
* Permitted creator
|
|
2073
|
-
*/
|
|
2074
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2075
|
-
/**
|
|
2076
|
-
* Permitted content scope
|
|
2077
|
-
*/
|
|
2078
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2079
|
-
/**
|
|
2080
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2081
|
-
*/
|
|
2082
|
-
locale?: string | null;
|
|
2083
|
-
}[];
|
|
2392
|
+
* Allowed actions on a model (or all) for a role.
|
|
2393
|
+
*
|
|
2394
|
+
* The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
|
|
2395
|
+
* - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
|
|
2396
|
+
* - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
|
|
2397
|
+
*/
|
|
2398
|
+
positive_item_type_permissions: (
|
|
2399
|
+
| RoleItemTypePermissionAll
|
|
2400
|
+
| RoleItemTypePermissionRead
|
|
2401
|
+
| RoleItemTypePermissionCreate
|
|
2402
|
+
| RoleItemTypePermissionUpdateOrPublish
|
|
2403
|
+
| RoleItemTypePermissionDuplicate
|
|
2404
|
+
| RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
|
|
2405
|
+
| RoleItemTypePermissionMoveToStage
|
|
2406
|
+
)[];
|
|
2084
2407
|
/**
|
|
2085
|
-
* Prohibited actions on a model (or all) for a role
|
|
2408
|
+
* Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
|
|
2086
2409
|
*/
|
|
2087
|
-
negative_item_type_permissions:
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
action:
|
|
2097
|
-
| 'all'
|
|
2098
|
-
| 'read'
|
|
2099
|
-
| 'update'
|
|
2100
|
-
| 'create'
|
|
2101
|
-
| 'duplicate'
|
|
2102
|
-
| 'delete'
|
|
2103
|
-
| 'publish'
|
|
2104
|
-
| 'edit_creator'
|
|
2105
|
-
| 'take_over'
|
|
2106
|
-
| 'move_to_stage';
|
|
2107
|
-
/**
|
|
2108
|
-
* Permitted creator
|
|
2109
|
-
*/
|
|
2110
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2111
|
-
/**
|
|
2112
|
-
* Permitted content scope
|
|
2113
|
-
*/
|
|
2114
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2115
|
-
/**
|
|
2116
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2117
|
-
*/
|
|
2118
|
-
locale?: string | null;
|
|
2119
|
-
}[];
|
|
2410
|
+
negative_item_type_permissions: (
|
|
2411
|
+
| RoleItemTypePermissionAll
|
|
2412
|
+
| RoleItemTypePermissionRead
|
|
2413
|
+
| RoleItemTypePermissionCreate
|
|
2414
|
+
| RoleItemTypePermissionUpdateOrPublish
|
|
2415
|
+
| RoleItemTypePermissionDuplicate
|
|
2416
|
+
| RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
|
|
2417
|
+
| RoleItemTypePermissionMoveToStage
|
|
2418
|
+
)[];
|
|
2120
2419
|
/**
|
|
2121
|
-
* Allowed actions on
|
|
2420
|
+
* Allowed actions on uploads (or all) for a role.
|
|
2421
|
+
*
|
|
2422
|
+
* The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
|
|
2122
2423
|
*/
|
|
2123
|
-
positive_upload_permissions:
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
| 'read'
|
|
2131
|
-
| 'update'
|
|
2132
|
-
| 'create'
|
|
2133
|
-
| 'delete'
|
|
2134
|
-
| 'edit_creator'
|
|
2135
|
-
| 'replace_asset'
|
|
2136
|
-
| 'move';
|
|
2137
|
-
/**
|
|
2138
|
-
* Permitted creator
|
|
2139
|
-
*/
|
|
2140
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2141
|
-
/**
|
|
2142
|
-
* Permitted content scope
|
|
2143
|
-
*/
|
|
2144
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2145
|
-
/**
|
|
2146
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2147
|
-
*/
|
|
2148
|
-
locale?: string | null;
|
|
2149
|
-
upload_collection?: UploadCollectionIdentity | null;
|
|
2150
|
-
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
2151
|
-
}[];
|
|
2424
|
+
positive_upload_permissions: (
|
|
2425
|
+
| RoleUploadPermissionAll
|
|
2426
|
+
| RoleUploadPermissionUpdate
|
|
2427
|
+
| RoleUploadPermissionCreate
|
|
2428
|
+
| RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
|
|
2429
|
+
| RoleUploadPermissionMove
|
|
2430
|
+
)[];
|
|
2152
2431
|
/**
|
|
2153
|
-
* Prohibited actions on
|
|
2432
|
+
* Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
|
|
2154
2433
|
*/
|
|
2155
|
-
negative_upload_permissions:
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
| 'read'
|
|
2163
|
-
| 'update'
|
|
2164
|
-
| 'create'
|
|
2165
|
-
| 'delete'
|
|
2166
|
-
| 'edit_creator'
|
|
2167
|
-
| 'replace_asset'
|
|
2168
|
-
| 'move';
|
|
2169
|
-
/**
|
|
2170
|
-
* Permitted creator
|
|
2171
|
-
*/
|
|
2172
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2173
|
-
/**
|
|
2174
|
-
* Permitted content scope
|
|
2175
|
-
*/
|
|
2176
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2177
|
-
/**
|
|
2178
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2179
|
-
*/
|
|
2180
|
-
locale?: string | null;
|
|
2181
|
-
upload_collection?: UploadCollectionIdentity | null;
|
|
2182
|
-
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
2183
|
-
}[];
|
|
2434
|
+
negative_upload_permissions: (
|
|
2435
|
+
| RoleUploadPermissionAll
|
|
2436
|
+
| RoleUploadPermissionUpdate
|
|
2437
|
+
| RoleUploadPermissionCreate
|
|
2438
|
+
| RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
|
|
2439
|
+
| RoleUploadPermissionMove
|
|
2440
|
+
)[];
|
|
2184
2441
|
/**
|
|
2185
|
-
*
|
|
2442
|
+
* Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
|
|
2186
2443
|
*/
|
|
2187
2444
|
positive_build_trigger_permissions: {
|
|
2188
2445
|
build_trigger?: BuildTriggerIdentity | null;
|
|
2189
2446
|
}[];
|
|
2190
2447
|
/**
|
|
2191
|
-
*
|
|
2448
|
+
* Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
|
|
2192
2449
|
*/
|
|
2193
2450
|
negative_build_trigger_permissions: {
|
|
2194
2451
|
build_trigger?: BuildTriggerIdentity | null;
|
|
2195
2452
|
}[];
|
|
2196
2453
|
/**
|
|
2197
|
-
* Search indexes that
|
|
2454
|
+
* Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
|
|
2198
2455
|
*/
|
|
2199
2456
|
positive_search_index_permissions: {
|
|
2200
2457
|
search_index?: SearchIndexIdentity | null;
|
|
2201
2458
|
}[];
|
|
2202
2459
|
/**
|
|
2203
|
-
* Search indexes
|
|
2460
|
+
* Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
|
|
2204
2461
|
*/
|
|
2205
2462
|
negative_search_index_permissions: {
|
|
2206
2463
|
search_index?: SearchIndexIdentity | null;
|
|
@@ -2227,11 +2484,11 @@ export type RoleCreateSchema = {
|
|
|
2227
2484
|
*/
|
|
2228
2485
|
can_edit_favicon?: boolean;
|
|
2229
2486
|
/**
|
|
2230
|
-
* Can change project
|
|
2487
|
+
* Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
|
|
2231
2488
|
*/
|
|
2232
2489
|
can_edit_site?: boolean;
|
|
2233
2490
|
/**
|
|
2234
|
-
* Can create and edit models and plugins
|
|
2491
|
+
* Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
|
|
2235
2492
|
*/
|
|
2236
2493
|
can_edit_schema?: boolean;
|
|
2237
2494
|
/**
|
|
@@ -2239,11 +2496,11 @@ export type RoleCreateSchema = {
|
|
|
2239
2496
|
*/
|
|
2240
2497
|
can_manage_menu?: boolean;
|
|
2241
2498
|
/**
|
|
2242
|
-
* Can
|
|
2499
|
+
* Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
|
|
2243
2500
|
*/
|
|
2244
2501
|
can_edit_environment?: boolean;
|
|
2245
2502
|
/**
|
|
2246
|
-
* Can promote
|
|
2503
|
+
* Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
|
|
2247
2504
|
*/
|
|
2248
2505
|
can_promote_environments?: boolean;
|
|
2249
2506
|
/**
|
|
@@ -2275,7 +2532,7 @@ export type RoleCreateSchema = {
|
|
|
2275
2532
|
*/
|
|
2276
2533
|
can_manage_webhooks?: boolean;
|
|
2277
2534
|
/**
|
|
2278
|
-
* Can create and delete sandbox environments
|
|
2535
|
+
* Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
|
|
2279
2536
|
*/
|
|
2280
2537
|
can_manage_environments?: boolean;
|
|
2281
2538
|
/**
|
|
@@ -2307,161 +2564,75 @@ export type RoleCreateSchema = {
|
|
|
2307
2564
|
*/
|
|
2308
2565
|
can_access_search_index_events_log?: boolean;
|
|
2309
2566
|
/**
|
|
2310
|
-
* Allowed actions on a model (or all) for a role
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
| 'create'
|
|
2326
|
-
| 'duplicate'
|
|
2327
|
-
| 'delete'
|
|
2328
|
-
| 'publish'
|
|
2329
|
-
| 'edit_creator'
|
|
2330
|
-
| 'take_over'
|
|
2331
|
-
| 'move_to_stage';
|
|
2332
|
-
/**
|
|
2333
|
-
* Permitted creator
|
|
2334
|
-
*/
|
|
2335
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2336
|
-
/**
|
|
2337
|
-
* Permitted content scope
|
|
2338
|
-
*/
|
|
2339
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2340
|
-
/**
|
|
2341
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2342
|
-
*/
|
|
2343
|
-
locale?: string | null;
|
|
2344
|
-
}[];
|
|
2567
|
+
* Allowed actions on a model (or all) for a role.
|
|
2568
|
+
*
|
|
2569
|
+
* The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
|
|
2570
|
+
* - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
|
|
2571
|
+
* - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
|
|
2572
|
+
*/
|
|
2573
|
+
positive_item_type_permissions?: (
|
|
2574
|
+
| RoleItemTypePermissionAll
|
|
2575
|
+
| RoleItemTypePermissionRead
|
|
2576
|
+
| RoleItemTypePermissionCreate
|
|
2577
|
+
| RoleItemTypePermissionUpdateOrPublish
|
|
2578
|
+
| RoleItemTypePermissionDuplicate
|
|
2579
|
+
| RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
|
|
2580
|
+
| RoleItemTypePermissionMoveToStage
|
|
2581
|
+
)[];
|
|
2345
2582
|
/**
|
|
2346
|
-
* Prohibited actions on a model (or all) for a role
|
|
2583
|
+
* Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
|
|
2347
2584
|
*/
|
|
2348
|
-
negative_item_type_permissions?:
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
action:
|
|
2358
|
-
| 'all'
|
|
2359
|
-
| 'read'
|
|
2360
|
-
| 'update'
|
|
2361
|
-
| 'create'
|
|
2362
|
-
| 'duplicate'
|
|
2363
|
-
| 'delete'
|
|
2364
|
-
| 'publish'
|
|
2365
|
-
| 'edit_creator'
|
|
2366
|
-
| 'take_over'
|
|
2367
|
-
| 'move_to_stage';
|
|
2368
|
-
/**
|
|
2369
|
-
* Permitted creator
|
|
2370
|
-
*/
|
|
2371
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2372
|
-
/**
|
|
2373
|
-
* Permitted content scope
|
|
2374
|
-
*/
|
|
2375
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2376
|
-
/**
|
|
2377
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2378
|
-
*/
|
|
2379
|
-
locale?: string | null;
|
|
2380
|
-
}[];
|
|
2585
|
+
negative_item_type_permissions?: (
|
|
2586
|
+
| RoleItemTypePermissionAll
|
|
2587
|
+
| RoleItemTypePermissionRead
|
|
2588
|
+
| RoleItemTypePermissionCreate
|
|
2589
|
+
| RoleItemTypePermissionUpdateOrPublish
|
|
2590
|
+
| RoleItemTypePermissionDuplicate
|
|
2591
|
+
| RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
|
|
2592
|
+
| RoleItemTypePermissionMoveToStage
|
|
2593
|
+
)[];
|
|
2381
2594
|
/**
|
|
2382
|
-
* Allowed actions on
|
|
2595
|
+
* Allowed actions on uploads (or all) for a role.
|
|
2596
|
+
*
|
|
2597
|
+
* The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
|
|
2383
2598
|
*/
|
|
2384
|
-
positive_upload_permissions?:
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
| 'read'
|
|
2392
|
-
| 'update'
|
|
2393
|
-
| 'create'
|
|
2394
|
-
| 'delete'
|
|
2395
|
-
| 'edit_creator'
|
|
2396
|
-
| 'replace_asset'
|
|
2397
|
-
| 'move';
|
|
2398
|
-
/**
|
|
2399
|
-
* Permitted creator
|
|
2400
|
-
*/
|
|
2401
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2402
|
-
/**
|
|
2403
|
-
* Permitted content scope
|
|
2404
|
-
*/
|
|
2405
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2406
|
-
/**
|
|
2407
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2408
|
-
*/
|
|
2409
|
-
locale?: string | null;
|
|
2410
|
-
upload_collection?: UploadCollectionIdentity | null;
|
|
2411
|
-
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
2412
|
-
}[];
|
|
2599
|
+
positive_upload_permissions?: (
|
|
2600
|
+
| RoleUploadPermissionAll
|
|
2601
|
+
| RoleUploadPermissionUpdate
|
|
2602
|
+
| RoleUploadPermissionCreate
|
|
2603
|
+
| RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
|
|
2604
|
+
| RoleUploadPermissionMove
|
|
2605
|
+
)[];
|
|
2413
2606
|
/**
|
|
2414
|
-
* Prohibited actions on
|
|
2607
|
+
* Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
|
|
2415
2608
|
*/
|
|
2416
|
-
negative_upload_permissions?:
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
| 'read'
|
|
2424
|
-
| 'update'
|
|
2425
|
-
| 'create'
|
|
2426
|
-
| 'delete'
|
|
2427
|
-
| 'edit_creator'
|
|
2428
|
-
| 'replace_asset'
|
|
2429
|
-
| 'move';
|
|
2430
|
-
/**
|
|
2431
|
-
* Permitted creator
|
|
2432
|
-
*/
|
|
2433
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2434
|
-
/**
|
|
2435
|
-
* Permitted content scope
|
|
2436
|
-
*/
|
|
2437
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2438
|
-
/**
|
|
2439
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2440
|
-
*/
|
|
2441
|
-
locale?: string | null;
|
|
2442
|
-
upload_collection?: UploadCollectionIdentity | null;
|
|
2443
|
-
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
2444
|
-
}[];
|
|
2609
|
+
negative_upload_permissions?: (
|
|
2610
|
+
| RoleUploadPermissionAll
|
|
2611
|
+
| RoleUploadPermissionUpdate
|
|
2612
|
+
| RoleUploadPermissionCreate
|
|
2613
|
+
| RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
|
|
2614
|
+
| RoleUploadPermissionMove
|
|
2615
|
+
)[];
|
|
2445
2616
|
/**
|
|
2446
|
-
*
|
|
2617
|
+
* Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
|
|
2447
2618
|
*/
|
|
2448
2619
|
positive_build_trigger_permissions?: {
|
|
2449
2620
|
build_trigger?: BuildTriggerIdentity | null;
|
|
2450
2621
|
}[];
|
|
2451
2622
|
/**
|
|
2452
|
-
*
|
|
2623
|
+
* Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
|
|
2453
2624
|
*/
|
|
2454
2625
|
negative_build_trigger_permissions?: {
|
|
2455
2626
|
build_trigger?: BuildTriggerIdentity | null;
|
|
2456
2627
|
}[];
|
|
2457
2628
|
/**
|
|
2458
|
-
* Search indexes that
|
|
2629
|
+
* Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
|
|
2459
2630
|
*/
|
|
2460
2631
|
positive_search_index_permissions?: {
|
|
2461
2632
|
search_index?: SearchIndexIdentity | null;
|
|
2462
2633
|
}[];
|
|
2463
2634
|
/**
|
|
2464
|
-
* Search indexes
|
|
2635
|
+
* Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
|
|
2465
2636
|
*/
|
|
2466
2637
|
negative_search_index_permissions?: {
|
|
2467
2638
|
search_index?: SearchIndexIdentity | null;
|
|
@@ -2509,11 +2680,11 @@ export type RoleUpdateSchema = {
|
|
|
2509
2680
|
*/
|
|
2510
2681
|
can_edit_favicon?: boolean;
|
|
2511
2682
|
/**
|
|
2512
|
-
* Can change project
|
|
2683
|
+
* Can change project-wide settings (project name, internal subdomain, frontend preview URL, deployment settings)
|
|
2513
2684
|
*/
|
|
2514
2685
|
can_edit_site?: boolean;
|
|
2515
2686
|
/**
|
|
2516
|
-
* Can create and edit models and plugins
|
|
2687
|
+
* Can create and edit the project schema: models, block models, fields, fieldsets, validators, and plugins
|
|
2517
2688
|
*/
|
|
2518
2689
|
can_edit_schema?: boolean;
|
|
2519
2690
|
/**
|
|
@@ -2521,11 +2692,11 @@ export type RoleUpdateSchema = {
|
|
|
2521
2692
|
*/
|
|
2522
2693
|
can_manage_menu?: boolean;
|
|
2523
2694
|
/**
|
|
2524
|
-
* Can
|
|
2695
|
+
* Can edit per-environment settings of the environments this role has access to: locales, timezone, and UI theme. This is *not* about creating or switching environments — see `can_manage_environments` for that, and `environments_access` for which environments this role can enter at all.
|
|
2525
2696
|
*/
|
|
2526
2697
|
can_edit_environment?: boolean;
|
|
2527
2698
|
/**
|
|
2528
|
-
* Can promote
|
|
2699
|
+
* Can promote a sandbox environment to primary (atomic swap) and toggle the project's maintenance mode. Distinct from `can_manage_environments`, which covers creating/forking/deleting sandboxes.
|
|
2529
2700
|
*/
|
|
2530
2701
|
can_promote_environments?: boolean;
|
|
2531
2702
|
/**
|
|
@@ -2557,7 +2728,7 @@ export type RoleUpdateSchema = {
|
|
|
2557
2728
|
*/
|
|
2558
2729
|
can_manage_webhooks?: boolean;
|
|
2559
2730
|
/**
|
|
2560
|
-
* Can create and delete sandbox environments
|
|
2731
|
+
* Can create, fork, and delete sandbox environments. Promotion to primary is gated separately by `can_promote_environments`.
|
|
2561
2732
|
*/
|
|
2562
2733
|
can_manage_environments?: boolean;
|
|
2563
2734
|
/**
|
|
@@ -2589,161 +2760,75 @@ export type RoleUpdateSchema = {
|
|
|
2589
2760
|
*/
|
|
2590
2761
|
can_access_search_index_events_log?: boolean;
|
|
2591
2762
|
/**
|
|
2592
|
-
* Allowed actions on a model (or all) for a role
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
| 'create'
|
|
2608
|
-
| 'duplicate'
|
|
2609
|
-
| 'delete'
|
|
2610
|
-
| 'publish'
|
|
2611
|
-
| 'edit_creator'
|
|
2612
|
-
| 'take_over'
|
|
2613
|
-
| 'move_to_stage';
|
|
2614
|
-
/**
|
|
2615
|
-
* Permitted creator
|
|
2616
|
-
*/
|
|
2617
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2618
|
-
/**
|
|
2619
|
-
* Permitted content scope
|
|
2620
|
-
*/
|
|
2621
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2622
|
-
/**
|
|
2623
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2624
|
-
*/
|
|
2625
|
-
locale?: string | null;
|
|
2626
|
-
}[];
|
|
2763
|
+
* Allowed actions on a model (or all) for a role.
|
|
2764
|
+
*
|
|
2765
|
+
* The shape of each entry depends on the `action` (discriminated union). Idiomatic recipes:
|
|
2766
|
+
* - To grant every action, use a single `action: "all"` entry with `localization_scope: "all"`.
|
|
2767
|
+
* - To grant a subset (e.g. create+read+update but not delete), prefer a single `action: "all"` entry plus `negative_item_type_permissions` entries for the actions to exclude — instead of listing each allowed action separately.
|
|
2768
|
+
*/
|
|
2769
|
+
positive_item_type_permissions?: (
|
|
2770
|
+
| RoleItemTypePermissionAll
|
|
2771
|
+
| RoleItemTypePermissionRead
|
|
2772
|
+
| RoleItemTypePermissionCreate
|
|
2773
|
+
| RoleItemTypePermissionUpdateOrPublish
|
|
2774
|
+
| RoleItemTypePermissionDuplicate
|
|
2775
|
+
| RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
|
|
2776
|
+
| RoleItemTypePermissionMoveToStage
|
|
2777
|
+
)[];
|
|
2627
2778
|
/**
|
|
2628
|
-
* Prohibited actions on a model (or all) for a role
|
|
2779
|
+
* Prohibited actions on a model (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions (e.g. forbid `delete`).
|
|
2629
2780
|
*/
|
|
2630
|
-
negative_item_type_permissions?:
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
action:
|
|
2640
|
-
| 'all'
|
|
2641
|
-
| 'read'
|
|
2642
|
-
| 'update'
|
|
2643
|
-
| 'create'
|
|
2644
|
-
| 'duplicate'
|
|
2645
|
-
| 'delete'
|
|
2646
|
-
| 'publish'
|
|
2647
|
-
| 'edit_creator'
|
|
2648
|
-
| 'take_over'
|
|
2649
|
-
| 'move_to_stage';
|
|
2650
|
-
/**
|
|
2651
|
-
* Permitted creator
|
|
2652
|
-
*/
|
|
2653
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2654
|
-
/**
|
|
2655
|
-
* Permitted content scope
|
|
2656
|
-
*/
|
|
2657
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2658
|
-
/**
|
|
2659
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2660
|
-
*/
|
|
2661
|
-
locale?: string | null;
|
|
2662
|
-
}[];
|
|
2781
|
+
negative_item_type_permissions?: (
|
|
2782
|
+
| RoleItemTypePermissionAll
|
|
2783
|
+
| RoleItemTypePermissionRead
|
|
2784
|
+
| RoleItemTypePermissionCreate
|
|
2785
|
+
| RoleItemTypePermissionUpdateOrPublish
|
|
2786
|
+
| RoleItemTypePermissionDuplicate
|
|
2787
|
+
| RoleItemTypePermissionDeleteOrEditCreatorOrTakeOver
|
|
2788
|
+
| RoleItemTypePermissionMoveToStage
|
|
2789
|
+
)[];
|
|
2663
2790
|
/**
|
|
2664
|
-
* Allowed actions on
|
|
2791
|
+
* Allowed actions on uploads (or all) for a role.
|
|
2792
|
+
*
|
|
2793
|
+
* The shape of each entry depends on the `action` (discriminated union). To grant a subset, prefer a single `action: "all"` entry plus `negative_upload_permissions` entries for the actions to exclude.
|
|
2665
2794
|
*/
|
|
2666
|
-
positive_upload_permissions?:
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
| 'read'
|
|
2674
|
-
| 'update'
|
|
2675
|
-
| 'create'
|
|
2676
|
-
| 'delete'
|
|
2677
|
-
| 'edit_creator'
|
|
2678
|
-
| 'replace_asset'
|
|
2679
|
-
| 'move';
|
|
2680
|
-
/**
|
|
2681
|
-
* Permitted creator
|
|
2682
|
-
*/
|
|
2683
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2684
|
-
/**
|
|
2685
|
-
* Permitted content scope
|
|
2686
|
-
*/
|
|
2687
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2688
|
-
/**
|
|
2689
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2690
|
-
*/
|
|
2691
|
-
locale?: string | null;
|
|
2692
|
-
upload_collection?: UploadCollectionIdentity | null;
|
|
2693
|
-
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
2694
|
-
}[];
|
|
2795
|
+
positive_upload_permissions?: (
|
|
2796
|
+
| RoleUploadPermissionAll
|
|
2797
|
+
| RoleUploadPermissionUpdate
|
|
2798
|
+
| RoleUploadPermissionCreate
|
|
2799
|
+
| RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
|
|
2800
|
+
| RoleUploadPermissionMove
|
|
2801
|
+
)[];
|
|
2695
2802
|
/**
|
|
2696
|
-
* Prohibited actions on
|
|
2803
|
+
* Prohibited actions on uploads (or all) for a role. Negative permissions take precedence and are typically paired with a broader positive `action: "all"` entry to subtract specific actions.
|
|
2697
2804
|
*/
|
|
2698
|
-
negative_upload_permissions?:
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
| 'read'
|
|
2706
|
-
| 'update'
|
|
2707
|
-
| 'create'
|
|
2708
|
-
| 'delete'
|
|
2709
|
-
| 'edit_creator'
|
|
2710
|
-
| 'replace_asset'
|
|
2711
|
-
| 'move';
|
|
2712
|
-
/**
|
|
2713
|
-
* Permitted creator
|
|
2714
|
-
*/
|
|
2715
|
-
on_creator?: 'anyone' | 'self' | 'role' | null;
|
|
2716
|
-
/**
|
|
2717
|
-
* Permitted content scope
|
|
2718
|
-
*/
|
|
2719
|
-
localization_scope?: 'all' | 'localized' | 'not_localized' | null;
|
|
2720
|
-
/**
|
|
2721
|
-
* Permitted localized content in this locale. Required when `localization_scope` is `localized`
|
|
2722
|
-
*/
|
|
2723
|
-
locale?: string | null;
|
|
2724
|
-
upload_collection?: UploadCollectionIdentity | null;
|
|
2725
|
-
move_to_upload_collection?: UploadCollectionIdentity | null;
|
|
2726
|
-
}[];
|
|
2805
|
+
negative_upload_permissions?: (
|
|
2806
|
+
| RoleUploadPermissionAll
|
|
2807
|
+
| RoleUploadPermissionUpdate
|
|
2808
|
+
| RoleUploadPermissionCreate
|
|
2809
|
+
| RoleUploadPermissionReadOrDeleteOrEditCreatorOrReplaceAsset
|
|
2810
|
+
| RoleUploadPermissionMove
|
|
2811
|
+
)[];
|
|
2727
2812
|
/**
|
|
2728
|
-
*
|
|
2813
|
+
* Build triggers this role is allowed to **manually fire**. An entry with `build_trigger: null` covers every build trigger. Note: this does not control creating/editing build triggers themselves — that is gated by `can_manage_build_triggers`.
|
|
2729
2814
|
*/
|
|
2730
2815
|
positive_build_trigger_permissions?: {
|
|
2731
2816
|
build_trigger?: BuildTriggerIdentity | null;
|
|
2732
2817
|
}[];
|
|
2733
2818
|
/**
|
|
2734
|
-
*
|
|
2819
|
+
* Build triggers this role is **forbidden** from manually firing. Negative entries take precedence over positive ones; pair with a `build_trigger: null` positive entry to allow all-but-N.
|
|
2735
2820
|
*/
|
|
2736
2821
|
negative_build_trigger_permissions?: {
|
|
2737
2822
|
build_trigger?: BuildTriggerIdentity | null;
|
|
2738
2823
|
}[];
|
|
2739
2824
|
/**
|
|
2740
|
-
* Search indexes that
|
|
2825
|
+
* Search indexes this role is allowed to **manually re-index**. An entry with `search_index: null` covers every search index. Note: this does not control creating/editing search indexes themselves — that is gated by `can_manage_search_indexes`.
|
|
2741
2826
|
*/
|
|
2742
2827
|
positive_search_index_permissions?: {
|
|
2743
2828
|
search_index?: SearchIndexIdentity | null;
|
|
2744
2829
|
}[];
|
|
2745
2830
|
/**
|
|
2746
|
-
* Search indexes
|
|
2831
|
+
* Search indexes this role is **forbidden** from manually re-indexing. Negative entries take precedence over positive ones; pair with a `search_index: null` positive entry to allow all-but-N.
|
|
2747
2832
|
*/
|
|
2748
2833
|
negative_search_index_permissions?: {
|
|
2749
2834
|
search_index?: SearchIndexIdentity | null;
|
|
@@ -3047,7 +3132,16 @@ export type SsoUserDestroyTargetSchema = {
|
|
|
3047
3132
|
data: SsoUser;
|
|
3048
3133
|
};
|
|
3049
3134
|
/**
|
|
3050
|
-
* An API token
|
|
3135
|
+
* An API token authenticates programmatic access to a project. Each token combines two layers of access control:
|
|
3136
|
+
*
|
|
3137
|
+
* 1. A **Role** that defines what actions are permitted (the same Role resource used for human collaborators).
|
|
3138
|
+
* 2. A set of **API surface flags** (`can_access_cda`, `can_access_cda_preview`, `can_access_cma`) that gate which APIs the token can hit at all.
|
|
3139
|
+
*
|
|
3140
|
+
* The token's effective capabilities are the *intersection* of the two.
|
|
3141
|
+
*
|
|
3142
|
+
* > [!PROTIP] 💡 A CDA-only token can safely reuse a write-capable Role
|
|
3143
|
+
* > A token with only `can_access_cda: true` is safe to attach to a Role that grants `update`/`publish`/`delete` — the Content Delivery API exposes no write endpoints, so those actions have no surface to act on. This makes it practical to share a single Role definition between an editor (acting via the dashboard / CMA) and a public read token (used by a frontend / CDA) for the same project.
|
|
3144
|
+
*
|
|
3051
3145
|
*
|
|
3052
3146
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
3053
3147
|
* via the `definition` "access_token".
|
|
@@ -3070,21 +3164,24 @@ export type AccessTokenAttributes = {
|
|
|
3070
3164
|
*/
|
|
3071
3165
|
name: string;
|
|
3072
3166
|
/**
|
|
3073
|
-
* The
|
|
3167
|
+
* The secret value used as the `Authorization: Bearer <token>` credential. Returned on every endpoint (create, update, retrieve, list, rotate) to callers whose current role has `can_manage_access_tokens`; otherwise `null`.
|
|
3074
3168
|
*/
|
|
3075
3169
|
token?: null | string;
|
|
3076
3170
|
/**
|
|
3077
|
-
* Whether this API token can
|
|
3171
|
+
* Whether this API token can call the Content Delivery API (`graphql.datocms.com`) to fetch **published** content.
|
|
3078
3172
|
*/
|
|
3079
3173
|
can_access_cda: boolean;
|
|
3080
3174
|
/**
|
|
3081
|
-
* Whether this API token can
|
|
3175
|
+
* Whether this API token can call the Content Delivery API with the `X-Include-Drafts: true` header to fetch **draft** (current, unpublished) content. There is no separate endpoint — the CDA is a single GraphQL endpoint and this flag governs whether requesting drafts is allowed.
|
|
3082
3176
|
*/
|
|
3083
3177
|
can_access_cda_preview: boolean;
|
|
3084
3178
|
/**
|
|
3085
3179
|
* Whether this API token can access the Content Management API
|
|
3086
3180
|
*/
|
|
3087
3181
|
can_access_cma: boolean;
|
|
3182
|
+
/**
|
|
3183
|
+
* Internal marker for the project's built-in factory tokens (e.g. read-only API token), seeded by DatoCMS when the project is created. Read-only attribute. When non-null, attribute updates are rejected with `NON_EDITABLE_ACCESS_TOKEN`, but the token can still be deleted and regenerated. `null` for any token created via this API.
|
|
3184
|
+
*/
|
|
3088
3185
|
hardcoded_type: null | string;
|
|
3089
3186
|
/**
|
|
3090
3187
|
* When this API token was last used to access the Content Management API
|
|
@@ -3146,11 +3243,11 @@ export type AccessTokenCreateSchema = {
|
|
|
3146
3243
|
*/
|
|
3147
3244
|
name: string;
|
|
3148
3245
|
/**
|
|
3149
|
-
* Whether this API token can
|
|
3246
|
+
* Whether this API token can call the Content Delivery API (`graphql.datocms.com`) to fetch **published** content.
|
|
3150
3247
|
*/
|
|
3151
3248
|
can_access_cda: boolean;
|
|
3152
3249
|
/**
|
|
3153
|
-
* Whether this API token can
|
|
3250
|
+
* Whether this API token can call the Content Delivery API with the `X-Include-Drafts: true` header to fetch **draft** (current, unpublished) content. There is no separate endpoint — the CDA is a single GraphQL endpoint and this flag governs whether requesting drafts is allowed.
|
|
3154
3251
|
*/
|
|
3155
3252
|
can_access_cda_preview: boolean;
|
|
3156
3253
|
/**
|
|
@@ -3189,11 +3286,11 @@ export type AccessTokenUpdateSchema = {
|
|
|
3189
3286
|
*/
|
|
3190
3287
|
name: string;
|
|
3191
3288
|
/**
|
|
3192
|
-
* Whether this API token can
|
|
3289
|
+
* Whether this API token can call the Content Delivery API (`graphql.datocms.com`) to fetch **published** content.
|
|
3193
3290
|
*/
|
|
3194
3291
|
can_access_cda: boolean;
|
|
3195
3292
|
/**
|
|
3196
|
-
* Whether this API token can
|
|
3293
|
+
* Whether this API token can call the Content Delivery API with the `X-Include-Drafts: true` header to fetch **draft** (current, unpublished) content. There is no separate endpoint — the CDA is a single GraphQL endpoint and this flag governs whether requesting drafts is allowed.
|
|
3197
3294
|
*/
|
|
3198
3295
|
can_access_cda_preview: boolean;
|
|
3199
3296
|
/**
|