@kardalum/plugin-sdk 0.15.0 → 0.16.0
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/CHANGELOG.md +11 -1
- package/README.md +10 -0
- package/dist/built-in-value-schemas.js +1 -1
- package/dist/built-ins.js +2 -2
- package/dist/capabilities.d.ts +8 -78
- package/dist/capabilities.js +23 -319
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -4
- package/dist/license-verdict-keys.js +4 -0
- package/dist/manifest-entry.d.ts +2 -2
- package/dist/manifest-entry.js +1 -1
- package/dist/manifest-schema.d.ts +81 -13
- package/dist/manifest-schema.js +108 -59
- package/dist/manifest.d.ts +105 -40
- package/dist/media/media-picker.js +21 -12
- package/dist/media/upload-error.d.ts +1 -1
- package/dist/media/upload-error.js +1 -1
- package/dist/plugin-context.d.ts +7 -0
- package/dist/plugin-context.js +7 -0
- package/dist/plugin-screen-context.d.ts +33 -2
- package/dist/plugin-screen-context.js +27 -2
- package/dist/read-all-pages.d.ts +23 -0
- package/dist/read-all-pages.js +30 -0
- package/dist/richtext/block-panel.js +4 -4
- package/dist/richtext/insert-menu.js +3 -3
- package/dist/views/content-list-view.js +2 -2
- package/dist/views/image-view.js +24 -39
- package/dist/views/rich-text-view.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +43 -25
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +60 -8
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +12 -8
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +11 -7
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +107 -57
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +96 -60
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +39 -28
- package/node_modules/@kardalum/api-schemas/dist/index.js +19 -13
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +73 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +104 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +302 -1
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +78 -6
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +38 -30
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +82 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +88 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +79 -17
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +59 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +585 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +536 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +25 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +21 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +16 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +162 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +11 -1
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +79 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +36 -6
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +17 -5
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +8 -8
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +8 -8
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +4 -4
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +11 -3
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +5 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +111 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +61 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +103 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +3 -1
- package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +20 -1
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +56 -16
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +4 -6
- package/node_modules/@kardalum/plugin-package/dist/types.js +15 -1
- package/node_modules/@kardalum/plugin-package/package.json +5 -0
- package/node_modules/@kardalum/ui/dist/components/checkbox.js +2 -2
- package/node_modules/@kardalum/ui/dist/components/property-field.js +4 -1
- package/package.json +2 -2
|
@@ -2,294 +2,342 @@ export interface CoreAction {
|
|
|
2
2
|
action: string;
|
|
3
3
|
adminGatedToday: boolean;
|
|
4
4
|
label: string;
|
|
5
|
+
/** S303: what a holder of an API key should know that the label does not say
|
|
6
|
+
* (the reach of the action on the management API, or that a key is refused
|
|
7
|
+
* it). Shown under the label in the key form only. Plain English, one or two
|
|
8
|
+
* sentences, true of the routes in `route`. */
|
|
9
|
+
keyNote?: string;
|
|
5
10
|
/** The route this action governs, as "<METHOD> <path>", and the gate it
|
|
6
11
|
* carried when S270 annotated it. This is the evidence for
|
|
7
12
|
* `adminGatedToday`, kept beside it so that changing a gate in a route
|
|
8
13
|
* file and not changing this is a visible inconsistency rather than an
|
|
9
14
|
* invisible one. Where the flag is true, and for the content rows, these routes
|
|
10
|
-
* carry requireAction(<action>);
|
|
15
|
+
* carry requireAction(<action>); since S300b every row's routes carry requireAction(<action>). */
|
|
11
16
|
route: string;
|
|
12
17
|
}
|
|
13
18
|
export declare const CORE_ACTIONS: readonly [{
|
|
14
19
|
readonly action: "content.read";
|
|
15
20
|
readonly adminGatedToday: false;
|
|
16
21
|
readonly label: "View content and mint preview links";
|
|
17
|
-
readonly
|
|
22
|
+
readonly keyNote: "On the management API this also reads drafts, every saved version and preview links, not only published content.";
|
|
23
|
+
readonly route: "GET /api/manage/v1/content/by-path, GET /api/manage/v1/content/by-address, GET /api/manage/v1/content/:id, GET /api/manage/v1/content/roots, GET /api/manage/v1/content/:id/children, GET /api/manage/v1/content/:id/list, GET /api/manage/v1/content/:id/url-impact, GET /api/manage/v1/content/:id/move-impact, GET /api/manage/v1/content/:id/versions, GET /api/manage/v1/content/:id/versions/latest, GET /api/manage/v1/content/:id/versions/:version, POST /api/manage/v1/content/:id/preview-token, GET /api/plugins/:pluginId/storage/:contentId/:fieldId";
|
|
18
24
|
}, {
|
|
19
25
|
readonly action: "content.create";
|
|
20
26
|
readonly adminGatedToday: false;
|
|
21
27
|
readonly label: "Create and copy content";
|
|
22
|
-
readonly route: "POST /api/content, POST /api/content/:id/copy";
|
|
28
|
+
readonly route: "POST /api/manage/v1/content, POST /api/manage/v1/content/:id/copy";
|
|
23
29
|
}, {
|
|
24
30
|
readonly action: "content.update";
|
|
25
31
|
readonly adminGatedToday: false;
|
|
26
32
|
readonly label: "Edit, move and reorder content";
|
|
27
|
-
readonly route: "PUT /api/content/:id, POST /api/content/:id/move, POST /api/content/roots/reorder, POST /api/content/:id/children/reorder, PUT /api/plugins/:pluginId/storage/:contentId/:fieldId";
|
|
33
|
+
readonly route: "PUT /api/manage/v1/content/:id, POST /api/manage/v1/content/:id/move, POST /api/manage/v1/content/roots/reorder, POST /api/manage/v1/content/:id/children/reorder, PUT /api/plugins/:pluginId/storage/:contentId/:fieldId";
|
|
28
34
|
}, {
|
|
29
35
|
readonly action: "content.publish";
|
|
30
36
|
readonly adminGatedToday: false;
|
|
31
37
|
readonly label: "Publish content";
|
|
32
|
-
readonly route: "POST /api/content/:id/publish, POST /api/content/:id/publish-all";
|
|
38
|
+
readonly route: "POST /api/manage/v1/content/:id/publish, POST /api/manage/v1/content/:id/publish-all";
|
|
33
39
|
}, {
|
|
34
40
|
readonly action: "content.delete";
|
|
35
41
|
readonly adminGatedToday: true;
|
|
36
42
|
readonly label: "Move content to the trash";
|
|
37
|
-
readonly route: "DELETE /api/content/:id";
|
|
43
|
+
readonly route: "DELETE /api/manage/v1/content/:id";
|
|
38
44
|
}, {
|
|
39
45
|
readonly action: "content.readTrash";
|
|
40
46
|
readonly adminGatedToday: true;
|
|
41
47
|
readonly label: "View trashed content";
|
|
42
|
-
readonly route: "GET /api/content/trash";
|
|
48
|
+
readonly route: "GET /api/manage/v1/content/trash";
|
|
43
49
|
}, {
|
|
44
50
|
readonly action: "content.restore";
|
|
45
51
|
readonly adminGatedToday: true;
|
|
46
52
|
readonly label: "Restore trashed content";
|
|
47
|
-
readonly route: "POST /api/content/:id/restore";
|
|
53
|
+
readonly route: "POST /api/manage/v1/content/:id/restore";
|
|
48
54
|
}, {
|
|
49
55
|
readonly action: "content.managePermissions";
|
|
50
56
|
readonly adminGatedToday: true;
|
|
51
57
|
readonly label: "Manage permissions on content";
|
|
52
|
-
readonly
|
|
58
|
+
readonly keyNote: "Reads and changes which roles and users may reach which page.";
|
|
59
|
+
readonly route: "GET /api/manage/v1/content/:id/permissions, PUT /api/manage/v1/content/:id/permissions, GET /api/manage/v1/content/permission-subjects, DELETE /api/manage/v1/content/:id/restrictions, GET /api/manage/v1/content/:id/explain, GET /api/manage/v1/content/:id/explain-operation, GET /api/manage/v1/content/:id/who-can";
|
|
53
60
|
}, {
|
|
54
61
|
readonly action: "media.read";
|
|
55
62
|
readonly adminGatedToday: false;
|
|
56
63
|
readonly label: "View media";
|
|
57
|
-
readonly
|
|
64
|
+
readonly keyNote: "Lists and reads every media file with its versions, references and cuts, private files included, each with a working signed link.";
|
|
65
|
+
readonly route: "GET /api/manage/v1/media, GET /api/manage/v1/media/:id, GET /api/manage/v1/media/:id/versions, GET /api/manage/v1/media/:id/references, GET /api/manage/v1/media/:id/renditions, GET /api/manage/v1/media/folders";
|
|
66
|
+
}, {
|
|
67
|
+
readonly action: "media.readTrash";
|
|
68
|
+
readonly adminGatedToday: false;
|
|
69
|
+
readonly label: "View the media Recycle Bin";
|
|
70
|
+
readonly keyNote: "Lists the Recycle Bin and what still uses the trashed files.";
|
|
71
|
+
readonly route: "GET /api/manage/v1/media/trash, GET /api/manage/v1/media/trash/references";
|
|
72
|
+
}, {
|
|
73
|
+
readonly action: "media.link";
|
|
74
|
+
readonly adminGatedToday: false;
|
|
75
|
+
readonly label: "Create links to media files";
|
|
76
|
+
readonly keyNote: "Mints a signed link to any media file through the explicit link route. The media reads already return one for a private file.";
|
|
77
|
+
readonly route: "POST /api/manage/v1/media/:id/link";
|
|
58
78
|
}, {
|
|
59
79
|
readonly action: "media.create";
|
|
60
80
|
readonly adminGatedToday: false;
|
|
61
81
|
readonly label: "Upload media";
|
|
62
|
-
readonly route: "POST /api/media, POST /api/media/folders, POST /api/media/:id/renditions";
|
|
82
|
+
readonly route: "POST /api/manage/v1/media, POST /api/manage/v1/media/folders, POST /api/manage/v1/media/:id/renditions";
|
|
63
83
|
}, {
|
|
64
84
|
readonly action: "media.update";
|
|
65
85
|
readonly adminGatedToday: false;
|
|
66
86
|
readonly label: "Edit media and media folders";
|
|
67
|
-
readonly route: "PATCH /api/media/:id, PATCH /api/media/folders/:id, POST /api/media/:id/replace, POST /api/media/:id/versions/:version/make-current, DELETE /api/media/folders/:id";
|
|
87
|
+
readonly route: "PATCH /api/manage/v1/media/:id, PATCH /api/manage/v1/media/folders/:id, POST /api/manage/v1/media/:id/replace, POST /api/manage/v1/media/:id/versions/:version/make-current, DELETE /api/manage/v1/media/folders/:id";
|
|
68
88
|
}, {
|
|
69
89
|
readonly action: "media.delete";
|
|
70
90
|
readonly adminGatedToday: false;
|
|
71
91
|
readonly label: "Move media to the trash";
|
|
72
|
-
readonly route: "DELETE /api/media/:id";
|
|
92
|
+
readonly route: "DELETE /api/manage/v1/media/:id";
|
|
73
93
|
}, {
|
|
74
94
|
readonly action: "media.restore";
|
|
75
95
|
readonly adminGatedToday: false;
|
|
76
96
|
readonly label: "Restore trashed media";
|
|
77
|
-
readonly route: "POST /api/media/:id/restore";
|
|
97
|
+
readonly route: "POST /api/manage/v1/media/:id/restore";
|
|
78
98
|
}, {
|
|
79
99
|
readonly action: "media.deletePermanent";
|
|
80
100
|
readonly adminGatedToday: true;
|
|
81
101
|
readonly label: "Permanently delete media and media versions";
|
|
82
|
-
readonly route: "DELETE /api/media/:id/permanent, POST /api/media/trash/empty, DELETE /api/media/:id/versions/:version";
|
|
102
|
+
readonly route: "DELETE /api/manage/v1/media/:id/permanent, POST /api/manage/v1/media/trash/empty, DELETE /api/manage/v1/media/:id/versions/:version";
|
|
83
103
|
}, {
|
|
84
104
|
readonly action: "documentTypes.read";
|
|
85
105
|
readonly adminGatedToday: false;
|
|
86
106
|
readonly label: "View document types";
|
|
87
|
-
readonly route: "GET /api/document-types";
|
|
107
|
+
readonly route: "GET /api/manage/v1/document-types";
|
|
88
108
|
}, {
|
|
89
109
|
readonly action: "documentTypes.create";
|
|
90
110
|
readonly adminGatedToday: false;
|
|
91
111
|
readonly label: "Create document types";
|
|
92
|
-
readonly route: "POST /api/document-types";
|
|
112
|
+
readonly route: "POST /api/manage/v1/document-types";
|
|
93
113
|
}, {
|
|
94
114
|
readonly action: "documentTypes.update";
|
|
95
115
|
readonly adminGatedToday: false;
|
|
96
116
|
readonly label: "Edit document types";
|
|
97
|
-
readonly route: "PUT /api/document-types/:id, PATCH /api/document-types/:id/default-template";
|
|
117
|
+
readonly route: "PUT /api/manage/v1/document-types/:id, PATCH /api/manage/v1/document-types/:id/default-template";
|
|
98
118
|
}, {
|
|
99
119
|
readonly action: "documentTypes.delete";
|
|
100
120
|
readonly adminGatedToday: false;
|
|
101
121
|
readonly label: "Delete document types";
|
|
102
|
-
readonly route: "DELETE /api/document-types/:id";
|
|
122
|
+
readonly route: "DELETE /api/manage/v1/document-types/:id";
|
|
103
123
|
}, {
|
|
104
124
|
readonly action: "dataTypes.read";
|
|
105
125
|
readonly adminGatedToday: false;
|
|
106
126
|
readonly label: "View data types";
|
|
107
|
-
readonly route: "GET /api/data-types, GET /api/data-types/:id";
|
|
127
|
+
readonly route: "GET /api/manage/v1/data-types, GET /api/manage/v1/data-types/:id";
|
|
108
128
|
}, {
|
|
109
129
|
readonly action: "dataTypes.create";
|
|
110
130
|
readonly adminGatedToday: false;
|
|
111
131
|
readonly label: "Create data types";
|
|
112
|
-
readonly route: "POST /api/data-types";
|
|
132
|
+
readonly route: "POST /api/manage/v1/data-types";
|
|
113
133
|
}, {
|
|
114
134
|
readonly action: "dataTypes.update";
|
|
115
135
|
readonly adminGatedToday: false;
|
|
116
136
|
readonly label: "Configure data types";
|
|
117
|
-
readonly route: "PATCH /api/data-types/:id";
|
|
137
|
+
readonly route: "PATCH /api/manage/v1/data-types/:id";
|
|
118
138
|
}, {
|
|
119
139
|
readonly action: "templates.read";
|
|
120
140
|
readonly adminGatedToday: false;
|
|
121
141
|
readonly label: "View templates";
|
|
122
|
-
readonly route: "GET /api/templates, GET /api/templates/:id";
|
|
142
|
+
readonly route: "GET /api/manage/v1/templates, GET /api/manage/v1/templates/:id";
|
|
123
143
|
}, {
|
|
124
144
|
readonly action: "templates.create";
|
|
125
145
|
readonly adminGatedToday: true;
|
|
126
146
|
readonly label: "Create templates";
|
|
127
|
-
readonly
|
|
147
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
148
|
+
readonly route: "POST /api/manage/v1/templates";
|
|
128
149
|
}, {
|
|
129
150
|
readonly action: "templates.update";
|
|
130
151
|
readonly adminGatedToday: true;
|
|
131
152
|
readonly label: "Edit templates";
|
|
132
|
-
readonly
|
|
153
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
154
|
+
readonly route: "PATCH /api/manage/v1/templates/:id";
|
|
133
155
|
}, {
|
|
134
156
|
readonly action: "templates.delete";
|
|
135
157
|
readonly adminGatedToday: true;
|
|
136
158
|
readonly label: "Delete templates";
|
|
137
|
-
readonly
|
|
159
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
160
|
+
readonly route: "DELETE /api/manage/v1/templates/:id";
|
|
138
161
|
}, {
|
|
139
162
|
readonly action: "templates.sync";
|
|
140
163
|
readonly adminGatedToday: true;
|
|
141
164
|
readonly label: "Sync templates from disk";
|
|
142
|
-
readonly
|
|
165
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
166
|
+
readonly route: "POST /api/manage/v1/templates/sync";
|
|
143
167
|
}, {
|
|
144
168
|
readonly action: "assets.read";
|
|
145
169
|
readonly adminGatedToday: false;
|
|
146
170
|
readonly label: "View site assets";
|
|
147
|
-
readonly route: "GET /api/assets/tree, GET /api/assets/content, GET /api/assets/raw";
|
|
171
|
+
readonly route: "GET /api/manage/v1/assets/tree, GET /api/manage/v1/assets/content, GET /api/manage/v1/assets/raw";
|
|
148
172
|
}, {
|
|
149
173
|
readonly action: "assets.create";
|
|
150
174
|
readonly adminGatedToday: true;
|
|
151
175
|
readonly label: "Upload site assets and create folders";
|
|
152
|
-
readonly
|
|
176
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
177
|
+
readonly route: "POST /api/manage/v1/assets/upload, POST /api/manage/v1/assets/extract-zip, POST /api/manage/v1/assets/folder";
|
|
153
178
|
}, {
|
|
154
179
|
readonly action: "assets.update";
|
|
155
180
|
readonly adminGatedToday: true;
|
|
156
181
|
readonly label: "Edit and rename site assets";
|
|
157
|
-
readonly
|
|
182
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
183
|
+
readonly route: "PUT /api/manage/v1/assets/content, PATCH /api/manage/v1/assets/rename";
|
|
158
184
|
}, {
|
|
159
185
|
readonly action: "assets.delete";
|
|
160
186
|
readonly adminGatedToday: true;
|
|
161
187
|
readonly label: "Delete site assets";
|
|
162
|
-
readonly
|
|
188
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
189
|
+
readonly route: "DELETE /api/manage/v1/assets";
|
|
163
190
|
}, {
|
|
164
191
|
readonly action: "assets.sync";
|
|
165
192
|
readonly adminGatedToday: true;
|
|
166
193
|
readonly label: "Sync site assets from disk";
|
|
167
|
-
readonly
|
|
194
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
195
|
+
readonly route: "POST /api/manage/v1/assets/sync";
|
|
168
196
|
}, {
|
|
169
197
|
readonly action: "render.read";
|
|
170
198
|
readonly adminGatedToday: true;
|
|
171
199
|
readonly label: "View text styles and embeddable blocks";
|
|
172
|
-
readonly route: "GET /api/render/text-styles, GET /api/render/blocks";
|
|
200
|
+
readonly route: "GET /api/manage/v1/render/text-styles, GET /api/manage/v1/render/blocks";
|
|
173
201
|
}, {
|
|
174
202
|
readonly action: "render.preview";
|
|
175
203
|
readonly adminGatedToday: true;
|
|
176
204
|
readonly label: "Render a block preview";
|
|
177
|
-
readonly route: "POST /api/render/block";
|
|
205
|
+
readonly route: "POST /api/manage/v1/render/block";
|
|
178
206
|
}, {
|
|
179
207
|
readonly action: "settings.read";
|
|
180
208
|
readonly adminGatedToday: false;
|
|
181
209
|
readonly label: "View settings";
|
|
182
|
-
readonly route: "GET /api/settings/render, GET /api/settings/cultures, GET /api/
|
|
210
|
+
readonly route: "GET /api/manage/v1/settings/render, GET /api/manage/v1/settings/cultures, GET /api/manage/v1/settings/sites";
|
|
183
211
|
}, {
|
|
184
212
|
readonly action: "settings.update";
|
|
185
213
|
readonly adminGatedToday: true;
|
|
186
214
|
readonly label: "Change settings";
|
|
187
|
-
readonly route: "PUT /api/settings/render, PUT /api/settings/cultures, PUT /api/settings/nav";
|
|
215
|
+
readonly route: "PUT /api/manage/v1/settings/render, PUT /api/manage/v1/settings/cultures, PUT /api/manage/v1/settings/nav";
|
|
188
216
|
}, {
|
|
189
217
|
readonly action: "sites.manage";
|
|
190
218
|
readonly adminGatedToday: true;
|
|
191
219
|
readonly label: "Manage sites";
|
|
192
|
-
readonly route: "GET /api/sites, PUT /api/settings/sites/default, PUT /api/settings/sites/:siteId/hostnames";
|
|
220
|
+
readonly route: "GET /api/manage/v1/sites, PUT /api/manage/v1/settings/sites/default, PUT /api/manage/v1/settings/sites/:siteId/hostnames";
|
|
221
|
+
}, {
|
|
222
|
+
readonly action: "sites.read";
|
|
223
|
+
readonly adminGatedToday: true;
|
|
224
|
+
readonly label: "View the sites and their addresses";
|
|
225
|
+
readonly route: "GET /api/v1/sites";
|
|
193
226
|
}, {
|
|
194
227
|
readonly action: "users.read";
|
|
195
228
|
readonly adminGatedToday: true;
|
|
196
229
|
readonly label: "View users";
|
|
197
|
-
readonly route: "GET /api/users";
|
|
230
|
+
readonly route: "GET /api/manage/v1/users";
|
|
198
231
|
}, {
|
|
199
232
|
readonly action: "users.create";
|
|
200
233
|
readonly adminGatedToday: true;
|
|
201
234
|
readonly label: "Invite users";
|
|
202
|
-
readonly
|
|
235
|
+
readonly keyNote: "A key is refused here: creating a user takes a session, so this matters only to a session's role.";
|
|
236
|
+
readonly route: "POST /api/manage/v1/users";
|
|
203
237
|
}, {
|
|
204
238
|
readonly action: "users.update";
|
|
205
239
|
readonly adminGatedToday: true;
|
|
206
240
|
readonly label: "Change user roles";
|
|
207
|
-
readonly
|
|
241
|
+
readonly keyNote: "Changes what a person may do by changing their role. A key is refused the admin role.";
|
|
242
|
+
readonly route: "PATCH /api/manage/v1/users/:id/role";
|
|
208
243
|
}, {
|
|
209
244
|
readonly action: "roles.read";
|
|
210
245
|
readonly adminGatedToday: true;
|
|
211
246
|
readonly label: "View roles and the actions they grant";
|
|
212
|
-
readonly route: "GET /api/roles, GET /api/actions";
|
|
247
|
+
readonly route: "GET /api/manage/v1/roles, GET /api/manage/v1/actions";
|
|
213
248
|
}, {
|
|
214
249
|
readonly action: "roles.create";
|
|
215
250
|
readonly adminGatedToday: true;
|
|
216
251
|
readonly label: "Create roles";
|
|
217
|
-
readonly
|
|
252
|
+
readonly keyNote: "Decides what people may do. Treat it as an administrator's action.";
|
|
253
|
+
readonly route: "POST /api/manage/v1/roles, POST /api/manage/v1/plugins/:pluginId/offered-roles/:roleId";
|
|
218
254
|
}, {
|
|
219
255
|
readonly action: "roles.update";
|
|
220
256
|
readonly adminGatedToday: true;
|
|
221
257
|
readonly label: "Edit a role's label and actions";
|
|
222
|
-
readonly
|
|
258
|
+
readonly keyNote: "Decides what people may do. Treat it as an administrator's action.";
|
|
259
|
+
readonly route: "PATCH /api/manage/v1/roles/:id";
|
|
223
260
|
}, {
|
|
224
261
|
readonly action: "roles.delete";
|
|
225
262
|
readonly adminGatedToday: true;
|
|
226
263
|
readonly label: "Delete roles";
|
|
227
|
-
readonly route: "DELETE /api/roles/:id";
|
|
264
|
+
readonly route: "DELETE /api/manage/v1/roles/:id";
|
|
228
265
|
}, {
|
|
229
266
|
readonly action: "apiKeys.read";
|
|
230
267
|
readonly adminGatedToday: true;
|
|
231
268
|
readonly label: "View API keys";
|
|
232
|
-
readonly
|
|
269
|
+
readonly keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.";
|
|
270
|
+
readonly route: "GET /api/manage/v1/api-keys";
|
|
233
271
|
}, {
|
|
234
272
|
readonly action: "apiKeys.create";
|
|
235
273
|
readonly adminGatedToday: true;
|
|
236
274
|
readonly label: "Create API keys";
|
|
237
|
-
readonly
|
|
275
|
+
readonly keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.";
|
|
276
|
+
readonly route: "POST /api/manage/v1/api-keys";
|
|
238
277
|
}, {
|
|
239
278
|
readonly action: "apiKeys.revoke";
|
|
240
279
|
readonly adminGatedToday: true;
|
|
241
280
|
readonly label: "Revoke API keys";
|
|
242
|
-
readonly
|
|
281
|
+
readonly keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.";
|
|
282
|
+
readonly route: "POST /api/manage/v1/api-keys/:id/revoke";
|
|
243
283
|
}, {
|
|
244
284
|
readonly action: "apiPlayground.read";
|
|
245
285
|
readonly adminGatedToday: true;
|
|
246
286
|
readonly label: "Use the API playground";
|
|
247
|
-
readonly route: "GET /api/api-playground/openapi";
|
|
287
|
+
readonly route: "GET /api/manage/v1/api-playground/openapi";
|
|
288
|
+
}, {
|
|
289
|
+
readonly action: "managementApi.use";
|
|
290
|
+
readonly adminGatedToday: true;
|
|
291
|
+
readonly label: "Let API keys use the management API";
|
|
292
|
+
readonly keyNote: "Lets a key call the management API with the actions it also holds. Never give it to a key that ships in a browser.";
|
|
293
|
+
readonly route: "GET /api/manage/v1/*, POST /api/manage/v1/*, PUT /api/manage/v1/*, PATCH /api/manage/v1/*, DELETE /api/manage/v1/*";
|
|
248
294
|
}, {
|
|
249
295
|
readonly action: "plugins.read";
|
|
250
296
|
readonly adminGatedToday: true;
|
|
251
297
|
readonly label: "View installed plugins";
|
|
252
|
-
readonly route: "GET /api/
|
|
298
|
+
readonly route: "GET /api/manage/v1/plugins, GET /api/manage/v1/marketplace/status, GET /api/manage/v1/plugins/:pluginId/snapshot-groups, GET /api/manage/v1/plugins/:pluginId/install-record, GET /api/manage/v1/plugin-docs, GET /api/manage/v1/plugin-docs/search-index, GET /api/manage/v1/plugin-docs/:pluginId/pages/:slug, GET /api/manage/v1/plugin-docs/:pluginId/reference";
|
|
253
299
|
}, {
|
|
254
300
|
readonly action: "plugins.browse";
|
|
255
301
|
readonly adminGatedToday: true;
|
|
256
302
|
readonly label: "Browse the plugin marketplace";
|
|
257
|
-
readonly route: "GET /api/
|
|
303
|
+
readonly route: "GET /api/manage/v1/marketplace/listings, GET /api/manage/v1/marketplace/listings/:pluginId";
|
|
258
304
|
}, {
|
|
259
305
|
readonly action: "plugins.install";
|
|
260
306
|
readonly adminGatedToday: true;
|
|
261
307
|
readonly label: "Install plugins";
|
|
262
|
-
readonly
|
|
308
|
+
readonly keyNote: "Puts code into the server process. An unsigned package is not refused.";
|
|
309
|
+
readonly route: "POST /api/manage/v1/marketplace/install, POST /api/manage/v1/plugins/upload";
|
|
263
310
|
}, {
|
|
264
311
|
readonly action: "plugins.update";
|
|
265
312
|
readonly adminGatedToday: true;
|
|
266
313
|
readonly label: "Enable or disable plugins";
|
|
267
|
-
readonly route: "POST /api/
|
|
314
|
+
readonly route: "POST /api/manage/v1/plugins/:pluginId/activate, POST /api/manage/v1/plugins/:pluginId/deactivate, POST /api/manage/v1/plugins/:pluginId/license/recheck";
|
|
268
315
|
}, {
|
|
269
316
|
readonly action: "plugins.delete";
|
|
270
317
|
readonly adminGatedToday: true;
|
|
271
318
|
readonly label: "Uninstall plugins";
|
|
272
|
-
readonly
|
|
319
|
+
readonly keyNote: "Removes an installed plugin from the site.";
|
|
320
|
+
readonly route: "DELETE /api/manage/v1/plugins/:pluginId";
|
|
273
321
|
}, {
|
|
274
322
|
readonly action: "plugins.restore";
|
|
275
323
|
readonly adminGatedToday: true;
|
|
276
324
|
readonly label: "Restore a plugin from a snapshot";
|
|
277
|
-
readonly route: "POST /api/
|
|
325
|
+
readonly route: "POST /api/manage/v1/plugins/:pluginId/snapshot-groups/restore";
|
|
278
326
|
}, {
|
|
279
327
|
readonly action: "snapshots.read";
|
|
280
328
|
readonly adminGatedToday: true;
|
|
281
329
|
readonly label: "View snapshots";
|
|
282
|
-
readonly route: "GET /api/snapshots";
|
|
330
|
+
readonly route: "GET /api/manage/v1/snapshots";
|
|
283
331
|
}, {
|
|
284
332
|
readonly action: "snapshots.create";
|
|
285
333
|
readonly adminGatedToday: true;
|
|
286
334
|
readonly label: "Create snapshots";
|
|
287
|
-
readonly route: "POST /api/snapshots";
|
|
335
|
+
readonly route: "POST /api/manage/v1/snapshots";
|
|
288
336
|
}, {
|
|
289
337
|
readonly action: "snapshots.restore";
|
|
290
338
|
readonly adminGatedToday: true;
|
|
291
339
|
readonly label: "Restore a snapshot";
|
|
292
|
-
readonly route: "POST /api/snapshots/:id/restore";
|
|
340
|
+
readonly route: "POST /api/manage/v1/snapshots/:id/restore";
|
|
293
341
|
}];
|
|
294
342
|
/** Every core action as a literal union, so a mistyped action string is a
|
|
295
343
|
* compile error at the call site rather than a permission nobody holds. */
|
|
@@ -297,6 +345,8 @@ export type CoreActionString = (typeof CORE_ACTIONS)[number]["action"];
|
|
|
297
345
|
export declare const CORE_ACTION_STRINGS: readonly string[];
|
|
298
346
|
/** Whether this is one of core's own actions, as opposed to a plugin's. */
|
|
299
347
|
export declare function isCoreAction(value: string): boolean;
|
|
348
|
+
/** The key-side note of a core action, or null when it has none or is not a core action. */
|
|
349
|
+
export declare function coreKeyNote(action: string): string | null;
|
|
300
350
|
type AssertTrue<T extends true> = T;
|
|
301
351
|
type CoreActionStringIsNarrow = AssertTrue<string extends CoreActionString ? false : true>;
|
|
302
352
|
export type { CoreActionStringIsNarrow };
|