@kardalum/plugin-sdk 0.15.0 → 0.17.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 +49 -1
- package/README.md +10 -0
- package/dist/admin-section-registry.d.ts +14 -5
- package/dist/admin-section-registry.js +14 -4
- 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 -322
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +13 -12
- package/dist/license-verdict-keys.d.ts +4 -3
- package/dist/license-verdict-keys.js +6 -5
- package/dist/manifest-entry.d.ts +3 -3
- package/dist/manifest-entry.js +2 -2
- package/dist/manifest-schema.d.ts +113 -56
- package/dist/manifest-schema.js +192 -295
- package/dist/manifest.d.ts +145 -112
- package/dist/manifest.js +13 -36
- 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 +44 -3
- 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 +6 -6
- package/dist/richtext/insert-menu.js +4 -4
- package/dist/richtext/style-listbox.js +4 -4
- package/dist/tokens/tokens.css +1 -0
- package/dist/tokens/tokens.json +2 -1
- package/dist/type-equality.d.ts +2 -0
- package/dist/type-equality.js +1 -0
- package/dist/views/content-list-view.js +2 -2
- package/dist/views/html-view.js +1 -1
- package/dist/views/image-view.js +24 -39
- package/dist/views/rich-text-view.js +3 -3
- 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.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +33 -2
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.js +50 -15
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +134 -0
- 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 +18 -13
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +2 -2
- 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-api.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +2 -1
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +143 -57
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +110 -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 +67 -40
- package/node_modules/@kardalum/api-schemas/dist/index.js +35 -19
- package/node_modules/@kardalum/api-schemas/dist/install-warnings.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/install-warnings.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/issue-list.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/issue-list.js +6 -0
- 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 +356 -16
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +93 -10
- 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-actions.schema.d.ts +6 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +8 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +69 -4
- 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 +76 -9
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +84 -24
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +17 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +18 -8
- 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 +597 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +503 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +116 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +33 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +28 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +11 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +17 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +58 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +198 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-fields.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-fields.js +134 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-template-payload.d.ts +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-template-payload.js +132 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-vocabulary.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-vocabulary.js +15 -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 +23 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +97 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +70 -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 +52 -33
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +195 -56
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +19 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/strict-url.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/strict-url.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +105 -1
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +47 -7
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +30 -2
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +19 -5
- package/node_modules/@kardalum/api-schemas/dist/trash-cursor.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-cursor.schema.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +15 -3
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/whoami-api.schema.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/whoami-api.schema.js +22 -0
- package/node_modules/@kardalum/api-schemas/package.json +2 -2
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +3 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +2 -1
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/README.md +4 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +96 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +66 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +103 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +346 -0
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +25 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +203 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +73 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +60 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icon-names.generated.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icon-names.generated.js +2052 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +51 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +8 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +7 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +119 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +14 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +21 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +148 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/package-files.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/package-files.js +76 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.d.ts +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +133 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +90 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/support.d.ts +24 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/support.js +55 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +158 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +53 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.d.ts +3 -2
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.js +4 -2
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +92 -3
- package/node_modules/@kardalum/plugin-package/dist/extract.js +251 -41
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +11 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +8 -2
- package/node_modules/@kardalum/plugin-package/dist/manifest-entry.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/manifest-entry.js +20 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.js +7 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +38 -1
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +84 -16
- package/node_modules/@kardalum/plugin-package/dist/shipped-files.d.ts +39 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-files.js +133 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-locales.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-locales.js +27 -0
- 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 +9 -2
- package/node_modules/@kardalum/ui/dist/components/checkbox.js +2 -2
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +2 -2
- package/node_modules/@kardalum/ui/dist/components/property-field.js +4 -1
- package/node_modules/@kardalum/ui/package.json +1 -1
- package/package.json +6 -6
|
@@ -9,6 +9,13 @@ export declare const UpdateMediaFolderRequestSchema: z.ZodObject<{
|
|
|
9
9
|
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export type UpdateMediaFolderRequest = z.infer<typeof UpdateMediaFolderRequestSchema>;
|
|
12
|
+
/** The most items one page of a media folder, version or rendition list holds, and the default (S300b). */
|
|
13
|
+
export declare const MEDIA_NESTED_LIST_PAGE_MAX = 200;
|
|
14
|
+
export declare const MediaNestedListQuerySchema: z.ZodObject<{
|
|
15
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
16
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type MediaNestedListQuery = z.infer<typeof MediaNestedListQuerySchema>;
|
|
12
19
|
export declare const MediaFolderListResponseSchema: z.ZodObject<{
|
|
13
20
|
folders: z.ZodArray<z.ZodObject<{
|
|
14
21
|
id: z.ZodString;
|
|
@@ -16,6 +23,7 @@ export declare const MediaFolderListResponseSchema: z.ZodObject<{
|
|
|
16
23
|
parentId: z.ZodNullable<z.ZodString>;
|
|
17
24
|
createdAt: z.ZodString;
|
|
18
25
|
}, z.core.$strip>>;
|
|
26
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
19
27
|
}, z.core.$strip>;
|
|
20
28
|
export type MediaFolderListResponse = z.infer<typeof MediaFolderListResponseSchema>;
|
|
21
29
|
export declare const MediaFileResponseSchema: z.ZodObject<{
|
|
@@ -104,6 +112,7 @@ export declare const MediaVersionListResponseSchema: z.ZodObject<{
|
|
|
104
112
|
createdByName: z.ZodNullable<z.ZodString>;
|
|
105
113
|
}, z.core.$strip>>;
|
|
106
114
|
currentVersion: z.ZodNumber;
|
|
115
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
107
116
|
}, z.core.$strip>;
|
|
108
117
|
export type MediaVersionListResponse = z.infer<typeof MediaVersionListResponseSchema>;
|
|
109
118
|
export declare const MediaRenditionListResponseSchema: z.ZodObject<{
|
|
@@ -125,6 +134,7 @@ export declare const MediaRenditionListResponseSchema: z.ZodObject<{
|
|
|
125
134
|
createdAt: z.ZodString;
|
|
126
135
|
}, z.core.$strip>>;
|
|
127
136
|
currentVersion: z.ZodNumber;
|
|
137
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
128
138
|
}, z.core.$strip>;
|
|
129
139
|
export type MediaRenditionListResponse = z.infer<typeof MediaRenditionListResponseSchema>;
|
|
130
140
|
export declare const MediaTrashListQuerySchema: z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { MediaFileSchema, MediaFolderSchema, MediaVersionSchema, MediaVisibilitySchema } from "./media.schema.js";
|
|
3
3
|
import { MediaRenditionSchema } from "./media-rendition.schema.js";
|
|
4
|
-
// POST /api/media/folders body (S186e §2)
|
|
4
|
+
// POST /api/manage/v1/media/folders body (S186e §2): name required, parentId
|
|
5
5
|
// optional (omitted/undefined = create at the library root). Duplicate
|
|
6
6
|
// name under the same parent -> 409, enforced by a real database
|
|
7
7
|
// constraint as of the fix wave (HIGH-1 — see media-service.ts's
|
|
@@ -12,7 +12,7 @@ export const CreateMediaFolderRequestSchema = z.object({
|
|
|
12
12
|
name: z.string().min(1),
|
|
13
13
|
parentId: z.string().uuid().optional(),
|
|
14
14
|
});
|
|
15
|
-
// PATCH /api/media/folders/:id body (S186e §2)
|
|
15
|
+
// PATCH /api/manage/v1/media/folders/:id body (S186e §2): rename and/or move, both
|
|
16
16
|
// optional and independent. name absent = don't rename. parentId absent =
|
|
17
17
|
// don't move; null = move to the library root; a uuid = move under that
|
|
18
18
|
// folder. The cycle-guard (a folder cannot move under its own descendant)
|
|
@@ -30,27 +30,30 @@ export const UpdateMediaFolderRequestSchema = z
|
|
|
30
30
|
.refine((body) => body.name !== undefined || body.parentId !== undefined, {
|
|
31
31
|
message: "At least one of name or parentId must be present",
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
// rather than
|
|
46
|
-
// server-assembled
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
33
|
+
/** The most items one page of a media folder, version or rendition list holds, and the default (S300b). */
|
|
34
|
+
export const MEDIA_NESTED_LIST_PAGE_MAX = 200;
|
|
35
|
+
// The query of the three lists that used to be unpaginated: GET /api/manage/v1/media/folders,
|
|
36
|
+
// /api/manage/v1/media/:id/versions and /api/manage/v1/media/:id/renditions. The cursor is the `id`
|
|
37
|
+
// of the previous page's last item, the idiom of GET /api/manage/v1/media.
|
|
38
|
+
export const MediaNestedListQuerySchema = z.object({
|
|
39
|
+
cursor: z.string().uuid().optional(),
|
|
40
|
+
limit: z.coerce.number().int().min(1).max(MEDIA_NESTED_LIST_PAGE_MAX).default(MEDIA_NESTED_LIST_PAGE_MAX),
|
|
41
|
+
});
|
|
42
|
+
// GET /api/manage/v1/media/folders (S186e §2, paged by S300b): the tree as a FLAT array of
|
|
43
|
+
// MediaFolderSchema, `limit` folders at a time (default and maximum
|
|
44
|
+
// MEDIA_NESTED_LIST_PAGE_MAX), ordered by name and then id, with the cursor of
|
|
45
|
+
// the next page. Flat rather than nested: the client groups by `parentId`
|
|
46
|
+
// itself, and a server-assembled tree could not be paged. A folder whose
|
|
47
|
+
// parentId dangles (binding obligation 4 of the S186e Task 1 review) is reported
|
|
48
|
+
// with `parentId: null`, so it renders as a root folder instead of vanishing
|
|
49
|
+
// from the client's grouping; a folder whose parent sits on another page keeps
|
|
50
|
+
// its parentId. The tree's total size is not bounded by the depth cap or the
|
|
51
|
+
// per-parent sibling limit (they bound one branch and one parent), which is why
|
|
52
|
+
// this list is paged.
|
|
52
53
|
export const MediaFolderListResponseSchema = z.object({
|
|
53
54
|
folders: z.array(MediaFolderSchema),
|
|
55
|
+
// null = no more pages.
|
|
56
|
+
nextCursor: z.string().uuid().nullable(),
|
|
54
57
|
});
|
|
55
58
|
// downloadUrl is the stable app path (S186c §3), computed fresh each
|
|
56
59
|
// response rather than trusted from storage: for a PUBLIC item it's
|
|
@@ -62,7 +65,7 @@ export const MediaFolderListResponseSchema = z.object({
|
|
|
62
65
|
export const MediaFileResponseSchema = MediaFileSchema.extend({
|
|
63
66
|
downloadUrl: z.string().min(1),
|
|
64
67
|
});
|
|
65
|
-
// POST /api/media/:id/link response (S186c §3)
|
|
68
|
+
// POST /api/manage/v1/media/:id/link response (S186c §3): the admin's "Copy
|
|
66
69
|
// temporary link" mint: a signed `?token=` URL good until `expiresAt`.
|
|
67
70
|
// Same stable path as `downloadUrl`, just minted on demand rather than
|
|
68
71
|
// alongside every list/get response.
|
|
@@ -73,7 +76,7 @@ export const MediaLinkResponseSchema = z.object({
|
|
|
73
76
|
export const MediaDeleteResponseSchema = z.object({
|
|
74
77
|
success: z.literal(true),
|
|
75
78
|
});
|
|
76
|
-
// PATCH /api/media/:id body (S186c §2, folderId added S186e §2; renamed
|
|
79
|
+
// PATCH /api/manage/v1/media/:id body (S186c §2, folderId added S186e §2; renamed
|
|
77
80
|
// from UpdateMediaVisibilityRequestSchema in the fix wave — it carries
|
|
78
81
|
// both visibility and folderId now, not just visibility, and the old
|
|
79
82
|
// name stopped describing it). Both fields optional and independent, same
|
|
@@ -120,7 +123,7 @@ export const UpdateMediaRequestSchema = z
|
|
|
120
123
|
data: z.record(z.string(), z.unknown()).optional(),
|
|
121
124
|
})
|
|
122
125
|
.refine((body) => body.visibility !== undefined || body.folderId !== undefined || body.data !== undefined, { message: "At least one of visibility, folderId or data must be present" });
|
|
123
|
-
// GET /api/media
|
|
126
|
+
// GET /api/manage/v1/media: newest-first pages; cursor = id of the previous
|
|
124
127
|
// page's last item. `search` filters by filename substring,
|
|
125
128
|
// case-insensitive. `folderId` (S186e §2) is a folder filter: ABSENT
|
|
126
129
|
// keeps the pre-S186e all-files behavior (compatibility-pinned by a
|
|
@@ -149,20 +152,25 @@ export const MediaListResponseSchema = z.object({
|
|
|
149
152
|
// null = no more pages.
|
|
150
153
|
nextCursor: z.string().uuid().nullable(),
|
|
151
154
|
});
|
|
152
|
-
// GET /api/media/:id/versions. Newest first, with the pointer beside them
|
|
155
|
+
// GET /api/manage/v1/media/:id/versions. Newest first, with the pointer beside them
|
|
153
156
|
// so a client never has to infer which row is live from the list order.
|
|
157
|
+
// Paged like the folder list (S300b).
|
|
154
158
|
export const MediaVersionListResponseSchema = z.object({
|
|
155
159
|
items: z.array(MediaVersionSchema),
|
|
156
160
|
currentVersion: z.number().int().positive(),
|
|
161
|
+
// null = no more pages.
|
|
162
|
+
nextCursor: z.string().uuid().nullable(),
|
|
157
163
|
});
|
|
158
|
-
// GET /api/media/:id/renditions. The renditions of the CURRENT version
|
|
164
|
+
// GET /api/manage/v1/media/:id/renditions. The renditions of the CURRENT version
|
|
159
165
|
// only, with the pointer beside them so a client never infers which
|
|
160
|
-
// version these belong to.
|
|
166
|
+
// version these belong to. Paged like the folder list (S300b).
|
|
161
167
|
export const MediaRenditionListResponseSchema = z.object({
|
|
162
168
|
items: z.array(MediaRenditionSchema),
|
|
163
169
|
currentVersion: z.number().int().positive(),
|
|
170
|
+
// null = no more pages.
|
|
171
|
+
nextCursor: z.string().uuid().nullable(),
|
|
164
172
|
});
|
|
165
|
-
// GET /api/media/trash (S234e). Newest-trashed first; cursor = id of the
|
|
173
|
+
// GET /api/manage/v1/media/trash (S234e). Newest-trashed first; cursor = id of the
|
|
166
174
|
// previous page's last item, the same cursor idiom the library list uses.
|
|
167
175
|
export const MediaTrashListQuerySchema = z.object({
|
|
168
176
|
cursor: z.string().uuid().optional(),
|
|
@@ -179,7 +187,7 @@ export const MediaTrashListResponseSchema = z.object({
|
|
|
179
187
|
// null = no more pages.
|
|
180
188
|
nextCursor: z.string().uuid().nullable(),
|
|
181
189
|
});
|
|
182
|
-
// GET /api/media/:id query (S234e). The ONE way to read a trashed item
|
|
190
|
+
// GET /api/manage/v1/media/:id query (S234e). The ONE way to read a trashed item
|
|
183
191
|
// through the API, and it has to be asked for: every other read, and this
|
|
184
192
|
// one without the flag, answers 404 for a trashed item so that a trashed
|
|
185
193
|
// file is not reachable by accident.
|
|
@@ -198,7 +206,7 @@ export const MediaReadQuerySchema = z.object({
|
|
|
198
206
|
.default(false)
|
|
199
207
|
.transform((value) => value === true || value === "true"),
|
|
200
208
|
});
|
|
201
|
-
// POST /api/media/trash/empty (S234e). Both numbers, always, because a
|
|
209
|
+
// POST /api/manage/v1/media/trash/empty (S234e). Both numbers, always, because a
|
|
202
210
|
// purge deletes the row before the objects and can therefore half
|
|
203
211
|
// succeed. An endpoint that answered only `{ success: true }` would be
|
|
204
212
|
// claiming something it cannot know.
|
|
@@ -69,8 +69,8 @@ export const MediaRenditionSchema = z.object({
|
|
|
69
69
|
// "thumb". Three doors refuse that state, and all three ask this function
|
|
70
70
|
// rather than re-deriving the rule (S234c Task 7):
|
|
71
71
|
// DocumentTypeService.createDocumentType (which is also the plugin
|
|
72
|
-
// manifest install path), PUT /api/document-types/:id, and
|
|
73
|
-
// PATCH /api/data-types/:id, which could otherwise edit one crop data
|
|
72
|
+
// manifest install path), PUT /api/manage/v1/document-types/:id, and
|
|
73
|
+
// PATCH /api/manage/v1/data-types/:id, which could otherwise edit one crop data
|
|
74
74
|
// type's ratio into another's without touching the media type at all.
|
|
75
75
|
export function renditionName(dataType) {
|
|
76
76
|
// A union rather than `editorId: string` with a cast. The argument is a
|
|
@@ -99,7 +99,7 @@ export const MediaVersionSchema = z.object({
|
|
|
99
99
|
// is gone and a user who never set one (`User.name` is itself nullable).
|
|
100
100
|
//
|
|
101
101
|
// NAME ONLY, deliberately. Never the email and never the role: those
|
|
102
|
-
// live on GET /api/users, which is admin only, and this list is not.
|
|
102
|
+
// live on GET /api/manage/v1/users, which is admin only, and this list is not.
|
|
103
103
|
createdByName: z.string().nullable(),
|
|
104
104
|
});
|
|
105
105
|
/**
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const PluginActionDeclarationSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
|
-
label: z.ZodString
|
|
4
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
5
|
+
en: z.ZodString;
|
|
6
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
5
7
|
}, z.core.$strip>;
|
|
6
8
|
export type PluginActionDeclaration = z.infer<typeof PluginActionDeclarationSchema>;
|
|
7
9
|
/** A role a plugin offers. Never applied unasked: the operator accepts it
|
|
@@ -9,7 +11,9 @@ export type PluginActionDeclaration = z.infer<typeof PluginActionDeclarationSche
|
|
|
9
11
|
* result is an ordinary editable role. */
|
|
10
12
|
export declare const PluginRoleOfferSchema: z.ZodObject<{
|
|
11
13
|
id: z.ZodString;
|
|
12
|
-
label: z.ZodString
|
|
14
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
15
|
+
en: z.ZodString;
|
|
16
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
13
17
|
actions: z.ZodArray<z.ZodString>;
|
|
14
18
|
}, z.core.$strip>;
|
|
15
19
|
export type PluginRoleOffer = z.infer<typeof PluginRoleOfferSchema>;
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ActionStringSchema } from "./action.schema.js";
|
|
3
|
+
import { PluginLabelSchema } from "./plugin-labels.js";
|
|
3
4
|
import { RoleIdSchema } from "./role.schema.js";
|
|
4
5
|
// S273: what a plugin declares about permissions. These two shapes are the
|
|
5
6
|
// one definition the SDK manifest schema, the marketplace listing and the
|
|
6
7
|
// installed-plugin list all reuse, so a label an author wrote reaches the
|
|
7
8
|
// install screen and the Roles screen unchanged.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
// A label is what the role editor and the install screen show; nothing ever
|
|
10
|
+
// shows an operator a raw action string. Since S311 it may be a language map
|
|
11
|
+
// (PluginLabelSchema, the shape a section's label has) or a plain string; the
|
|
12
|
+
// server stores one string per action and per role, the map resolved to the
|
|
13
|
+
// site's default language when the plugin is installed.
|
|
12
14
|
export const PluginActionDeclarationSchema = z.object({
|
|
13
15
|
id: ActionStringSchema,
|
|
14
|
-
label:
|
|
16
|
+
label: PluginLabelSchema,
|
|
15
17
|
});
|
|
16
18
|
/** A role a plugin offers. Never applied unasked: the operator accepts it
|
|
17
19
|
* on the install screen or later from the installed-plugins view, and the
|
|
18
20
|
* result is an ordinary editable role. */
|
|
19
21
|
export const PluginRoleOfferSchema = z.object({
|
|
20
22
|
id: RoleIdSchema,
|
|
21
|
-
label:
|
|
23
|
+
label: PluginLabelSchema,
|
|
22
24
|
actions: z.array(ActionStringSchema).min(1),
|
|
23
25
|
});
|
|
24
26
|
export const OfferedRoleParamsSchema = z.object({
|
|
@@ -79,9 +79,20 @@ export declare const PluginDocsPageResponseSchema: z.ZodObject<{
|
|
|
79
79
|
markdown: z.ZodString;
|
|
80
80
|
}, z.core.$strip>;
|
|
81
81
|
export type PluginDocsPageResponse = z.infer<typeof PluginDocsPageResponseSchema>;
|
|
82
|
+
export declare const PluginReferenceSourceSchema: z.ZodEnum<{
|
|
83
|
+
package: "package";
|
|
84
|
+
live: "live";
|
|
85
|
+
}>;
|
|
86
|
+
export type PluginReferenceSource = z.infer<typeof PluginReferenceSourceSchema>;
|
|
87
|
+
/** S289: "live" is built from the manifest the server has attached; "package"
|
|
88
|
+
* is the package's reference.json, used only when no manifest is attached. */
|
|
82
89
|
export declare const PluginDocsReferenceResponseSchema: z.ZodObject<{
|
|
83
90
|
pluginId: z.ZodString;
|
|
84
91
|
version: z.ZodString;
|
|
92
|
+
source: z.ZodEnum<{
|
|
93
|
+
package: "package";
|
|
94
|
+
live: "live";
|
|
95
|
+
}>;
|
|
85
96
|
reference: z.ZodObject<{
|
|
86
97
|
actions: z.ZodArray<z.ZodObject<{
|
|
87
98
|
id: z.ZodString;
|
|
@@ -89,8 +100,8 @@ export declare const PluginDocsReferenceResponseSchema: z.ZodObject<{
|
|
|
89
100
|
}, z.core.$strip>>;
|
|
90
101
|
roles: z.ZodArray<z.ZodObject<{
|
|
91
102
|
id: z.ZodString;
|
|
92
|
-
label: z.ZodString;
|
|
93
103
|
actions: z.ZodArray<z.ZodString>;
|
|
104
|
+
label: z.ZodString;
|
|
94
105
|
}, z.core.$strip>>;
|
|
95
106
|
apiRoutes: z.ZodArray<z.ZodObject<{
|
|
96
107
|
method: z.ZodString;
|
|
@@ -100,8 +111,14 @@ export declare const PluginDocsReferenceResponseSchema: z.ZodObject<{
|
|
|
100
111
|
}, z.core.$strict>>;
|
|
101
112
|
capabilities: z.ZodArray<z.ZodObject<{
|
|
102
113
|
id: z.ZodString;
|
|
103
|
-
mediation: z.
|
|
104
|
-
|
|
114
|
+
mediation: z.ZodEnum<{
|
|
115
|
+
mediated: "mediated";
|
|
116
|
+
promised: "promised";
|
|
117
|
+
}>;
|
|
118
|
+
payload: z.ZodObject<{
|
|
119
|
+
count: z.ZodNumber;
|
|
120
|
+
details: z.ZodArray<z.ZodString>;
|
|
121
|
+
}, z.core.$strict>;
|
|
105
122
|
}, z.core.$strict>>;
|
|
106
123
|
documentTypes: z.ZodArray<z.ZodObject<{
|
|
107
124
|
name: z.ZodString;
|
|
@@ -112,11 +129,59 @@ export declare const PluginDocsReferenceResponseSchema: z.ZodObject<{
|
|
|
112
129
|
id: z.ZodString;
|
|
113
130
|
name: z.ZodString;
|
|
114
131
|
}, z.core.$loose>>;
|
|
115
|
-
|
|
132
|
+
templates: z.ZodArray<z.ZodObject<{
|
|
133
|
+
name: z.ZodString;
|
|
134
|
+
alias: z.ZodString;
|
|
135
|
+
kind: z.ZodString;
|
|
136
|
+
documentType: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, z.core.$strict>>;
|
|
138
|
+
adminSections: z.ZodArray<z.ZodObject<{
|
|
139
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
140
|
+
rail: z.ZodArray<z.ZodObject<{
|
|
141
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
action: z.ZodString;
|
|
144
|
+
}, z.core.$strict>>;
|
|
116
145
|
id: z.ZodString;
|
|
146
|
+
action: z.ZodString;
|
|
147
|
+
}, z.core.$strict>>;
|
|
148
|
+
railEntries: z.ZodArray<z.ZodObject<{
|
|
149
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
150
|
+
section: z.ZodString;
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
action: z.ZodString;
|
|
153
|
+
}, z.core.$strict>>;
|
|
154
|
+
dashboardWidgets: z.ZodArray<z.ZodObject<{
|
|
117
155
|
name: z.ZodString;
|
|
156
|
+
id: z.ZodString;
|
|
118
157
|
action: z.ZodString;
|
|
119
158
|
}, z.core.$strict>>;
|
|
159
|
+
hooks: z.ZodArray<z.ZodString>;
|
|
160
|
+
scheduledTasks: z.ZodArray<z.ZodObject<{
|
|
161
|
+
id: z.ZodString;
|
|
162
|
+
name: z.ZodString;
|
|
163
|
+
cron: z.ZodString;
|
|
164
|
+
}, z.core.$strict>>;
|
|
165
|
+
migrations: z.ZodArray<z.ZodObject<{
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
name: z.ZodString;
|
|
168
|
+
}, z.core.$strict>>;
|
|
169
|
+
assertions: z.ZodArray<z.ZodObject<{
|
|
170
|
+
key: z.ZodString;
|
|
171
|
+
reason: z.ZodString;
|
|
172
|
+
}, z.core.$strict>>;
|
|
173
|
+
installOptions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
174
|
+
step: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
175
|
+
id: z.ZodString;
|
|
176
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
177
|
+
kind: z.ZodString;
|
|
178
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
181
|
+
}, z.core.$strict>>;
|
|
182
|
+
default: z.ZodNullable<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
183
|
+
required: z.ZodBoolean;
|
|
184
|
+
}, z.core.$strict>>>;
|
|
120
185
|
}, z.core.$strict>;
|
|
121
186
|
}, z.core.$strip>;
|
|
122
187
|
export type PluginDocsReferenceResponse = z.infer<typeof PluginDocsReferenceResponseSchema>;
|
|
@@ -35,9 +35,13 @@ export const PluginDocsPageResponseSchema = z.object({
|
|
|
35
35
|
path: z.string(),
|
|
36
36
|
markdown: z.string(),
|
|
37
37
|
});
|
|
38
|
+
export const PluginReferenceSourceSchema = z.enum(["live", "package"]);
|
|
39
|
+
/** S289: "live" is built from the manifest the server has attached; "package"
|
|
40
|
+
* is the package's reference.json, used only when no manifest is attached. */
|
|
38
41
|
export const PluginDocsReferenceResponseSchema = z.object({
|
|
39
42
|
pluginId: z.string(),
|
|
40
43
|
version: z.string(),
|
|
44
|
+
source: PluginReferenceSourceSchema,
|
|
41
45
|
reference: PluginReferenceSchema,
|
|
42
46
|
});
|
|
43
47
|
export const PluginDocsSearchItemSchema = z.object({
|
|
@@ -32,9 +32,8 @@ export interface DocsFacts {
|
|
|
32
32
|
hasDependencies: boolean;
|
|
33
33
|
hasPrice: boolean;
|
|
34
34
|
hasDocumentTypes: boolean;
|
|
35
|
-
hasSettingsPages: boolean;
|
|
36
35
|
}
|
|
37
|
-
/** Reads the
|
|
36
|
+
/** Reads the four facts from a live manifest or from manifest.json. The
|
|
38
37
|
* summary keeps each contribution list as a list of redacted entries,
|
|
39
38
|
* reduces migrations to their ids, and says `paid: true` where the live
|
|
40
39
|
* manifest has a price above 0: the amount itself never reaches
|
|
@@ -47,6 +46,9 @@ export declare function requiredDocRoles(facts: DocsFacts): Array<{
|
|
|
47
46
|
role: PluginDocRole;
|
|
48
47
|
because: string;
|
|
49
48
|
}>;
|
|
49
|
+
/** A slot label as reference.json carries it: language code to text, with
|
|
50
|
+
* the English text every slot label must have. */
|
|
51
|
+
export declare const ReferenceLabelMapSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
50
52
|
export declare const PluginReferenceSchema: z.ZodObject<{
|
|
51
53
|
actions: z.ZodArray<z.ZodObject<{
|
|
52
54
|
id: z.ZodString;
|
|
@@ -54,8 +56,8 @@ export declare const PluginReferenceSchema: z.ZodObject<{
|
|
|
54
56
|
}, z.core.$strip>>;
|
|
55
57
|
roles: z.ZodArray<z.ZodObject<{
|
|
56
58
|
id: z.ZodString;
|
|
57
|
-
label: z.ZodString;
|
|
58
59
|
actions: z.ZodArray<z.ZodString>;
|
|
60
|
+
label: z.ZodString;
|
|
59
61
|
}, z.core.$strip>>;
|
|
60
62
|
apiRoutes: z.ZodArray<z.ZodObject<{
|
|
61
63
|
method: z.ZodString;
|
|
@@ -65,8 +67,14 @@ export declare const PluginReferenceSchema: z.ZodObject<{
|
|
|
65
67
|
}, z.core.$strict>>;
|
|
66
68
|
capabilities: z.ZodArray<z.ZodObject<{
|
|
67
69
|
id: z.ZodString;
|
|
68
|
-
mediation: z.
|
|
69
|
-
|
|
70
|
+
mediation: z.ZodEnum<{
|
|
71
|
+
mediated: "mediated";
|
|
72
|
+
promised: "promised";
|
|
73
|
+
}>;
|
|
74
|
+
payload: z.ZodObject<{
|
|
75
|
+
count: z.ZodNumber;
|
|
76
|
+
details: z.ZodArray<z.ZodString>;
|
|
77
|
+
}, z.core.$strict>;
|
|
70
78
|
}, z.core.$strict>>;
|
|
71
79
|
documentTypes: z.ZodArray<z.ZodObject<{
|
|
72
80
|
name: z.ZodString;
|
|
@@ -77,13 +85,72 @@ export declare const PluginReferenceSchema: z.ZodObject<{
|
|
|
77
85
|
id: z.ZodString;
|
|
78
86
|
name: z.ZodString;
|
|
79
87
|
}, z.core.$loose>>;
|
|
80
|
-
|
|
88
|
+
templates: z.ZodArray<z.ZodObject<{
|
|
89
|
+
name: z.ZodString;
|
|
90
|
+
alias: z.ZodString;
|
|
91
|
+
kind: z.ZodString;
|
|
92
|
+
documentType: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, z.core.$strict>>;
|
|
94
|
+
adminSections: z.ZodArray<z.ZodObject<{
|
|
95
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
96
|
+
rail: z.ZodArray<z.ZodObject<{
|
|
97
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
action: z.ZodString;
|
|
100
|
+
}, z.core.$strict>>;
|
|
81
101
|
id: z.ZodString;
|
|
102
|
+
action: z.ZodString;
|
|
103
|
+
}, z.core.$strict>>;
|
|
104
|
+
railEntries: z.ZodArray<z.ZodObject<{
|
|
105
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
106
|
+
section: z.ZodString;
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
action: z.ZodString;
|
|
109
|
+
}, z.core.$strict>>;
|
|
110
|
+
dashboardWidgets: z.ZodArray<z.ZodObject<{
|
|
82
111
|
name: z.ZodString;
|
|
112
|
+
id: z.ZodString;
|
|
83
113
|
action: z.ZodString;
|
|
84
114
|
}, z.core.$strict>>;
|
|
115
|
+
hooks: z.ZodArray<z.ZodString>;
|
|
116
|
+
scheduledTasks: z.ZodArray<z.ZodObject<{
|
|
117
|
+
id: z.ZodString;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
cron: z.ZodString;
|
|
120
|
+
}, z.core.$strict>>;
|
|
121
|
+
migrations: z.ZodArray<z.ZodObject<{
|
|
122
|
+
id: z.ZodString;
|
|
123
|
+
name: z.ZodString;
|
|
124
|
+
}, z.core.$strict>>;
|
|
125
|
+
assertions: z.ZodArray<z.ZodObject<{
|
|
126
|
+
key: z.ZodString;
|
|
127
|
+
reason: z.ZodString;
|
|
128
|
+
}, z.core.$strict>>;
|
|
129
|
+
installOptions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
130
|
+
step: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
133
|
+
kind: z.ZodString;
|
|
134
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
135
|
+
id: z.ZodString;
|
|
136
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
137
|
+
}, z.core.$strict>>;
|
|
138
|
+
default: z.ZodNullable<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
139
|
+
required: z.ZodBoolean;
|
|
140
|
+
}, z.core.$strict>>>;
|
|
85
141
|
}, z.core.$strict>;
|
|
86
142
|
export type PluginReference = z.infer<typeof PluginReferenceSchema>;
|
|
87
|
-
export declare
|
|
88
|
-
|
|
89
|
-
export
|
|
143
|
+
export declare function emptyPluginReference(): PluginReference;
|
|
144
|
+
export declare const REFERENCE_PAGE_SLUGS: readonly ["permissions", "api-routes", "capabilities", "content", "admin-surfaces", "lifecycle"];
|
|
145
|
+
export type ReferencePageSlug = (typeof REFERENCE_PAGE_SLUGS)[number];
|
|
146
|
+
/** Which lists each page's tables are drawn from. Every list belongs to
|
|
147
|
+
* exactly one page (pinned by plugin-docs.test.ts), so a list added to the
|
|
148
|
+
* schema without a page is a red test, not a fact nobody sees. */
|
|
149
|
+
export declare const REFERENCE_PAGE_TABLES: Record<ReferencePageSlug, readonly (keyof PluginReference)[]>;
|
|
150
|
+
export declare function isReferencePageSlug(slug: string): slug is ReferencePageSlug;
|
|
151
|
+
/** The one rule (S289): a reference page exists when at least one of its
|
|
152
|
+
* tables has a row. The renderer, the admin, the server, the door, the
|
|
153
|
+
* marketplace and its sitemap all ask this function. */
|
|
154
|
+
export declare function referencePageHasContent(reference: PluginReference, slug: string): boolean;
|
|
155
|
+
/** The generated pages this plugin gets, in their fixed order. */
|
|
156
|
+
export declare function referencePageSlugs(reference: PluginReference): ReferencePageSlug[];
|