@emdash-cms/admin 0.0.1
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/index.d.ts +2620 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25915 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins-XhZqfegd.js +109 -0
- package/dist/plugins-XhZqfegd.js.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +96 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2620 @@
|
|
|
1
|
+
import { Button, Sidebar as KumoSidebar } from "@cloudflare/kumo";
|
|
2
|
+
import * as _tanstack_react_query0 from "@tanstack/react-query";
|
|
3
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
4
|
+
import * as _tanstack_react_router0 from "@tanstack/react-router";
|
|
5
|
+
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { ComponentProps } from "react";
|
|
8
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
9
|
+
import { ClassValue } from "clsx";
|
|
10
|
+
import { Node } from "@tiptap/core";
|
|
11
|
+
import { Editor } from "@tiptap/react";
|
|
12
|
+
import * as _emdash_cms_blocks0 from "@emdash-cms/blocks";
|
|
13
|
+
import { Element } from "@emdash-cms/blocks";
|
|
14
|
+
import * as _tanstack_router_core0 from "@tanstack/router-core";
|
|
15
|
+
import * as _tanstack_history0 from "@tanstack/history";
|
|
16
|
+
|
|
17
|
+
//#region src/lib/plugin-context.d.ts
|
|
18
|
+
/** Shape of a plugin's admin exports */
|
|
19
|
+
interface PluginAdminModule {
|
|
20
|
+
widgets?: Record<string, React.ComponentType>;
|
|
21
|
+
pages?: Record<string, React.ComponentType>;
|
|
22
|
+
fields?: Record<string, React.ComponentType>;
|
|
23
|
+
}
|
|
24
|
+
/** All plugin admin modules keyed by plugin ID */
|
|
25
|
+
type PluginAdmins = Record<string, PluginAdminModule>;
|
|
26
|
+
interface PluginAdminProviderProps {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
pluginAdmins: PluginAdmins;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Provider that makes plugin admin modules available to all descendants
|
|
32
|
+
*/
|
|
33
|
+
declare function PluginAdminProvider({
|
|
34
|
+
children,
|
|
35
|
+
pluginAdmins
|
|
36
|
+
}: PluginAdminProviderProps): react_jsx_runtime0.JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* Get all plugin admin modules
|
|
39
|
+
*/
|
|
40
|
+
declare function usePluginAdmins(): PluginAdmins;
|
|
41
|
+
/**
|
|
42
|
+
* Get a dashboard widget component by plugin ID and widget ID
|
|
43
|
+
*/
|
|
44
|
+
declare function usePluginWidget(pluginId: string, widgetId: string): React.ComponentType | null;
|
|
45
|
+
/**
|
|
46
|
+
* Get a plugin page component by plugin ID and path
|
|
47
|
+
*/
|
|
48
|
+
declare function usePluginPage(pluginId: string, path: string): React.ComponentType | null;
|
|
49
|
+
/**
|
|
50
|
+
* Get a field widget component by plugin ID and field type
|
|
51
|
+
*/
|
|
52
|
+
declare function usePluginField(pluginId: string, fieldType: string): React.ComponentType | null;
|
|
53
|
+
/**
|
|
54
|
+
* Check if a plugin has any registered admin pages
|
|
55
|
+
*/
|
|
56
|
+
declare function usePluginHasPages(pluginId: string): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Check if a plugin has any registered dashboard widgets
|
|
59
|
+
*/
|
|
60
|
+
declare function usePluginHasWidgets(pluginId: string): boolean;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/App.d.ts
|
|
63
|
+
interface AdminAppProps {
|
|
64
|
+
/** Plugin admin modules keyed by plugin ID */
|
|
65
|
+
pluginAdmins?: PluginAdmins;
|
|
66
|
+
}
|
|
67
|
+
declare function AdminApp({
|
|
68
|
+
pluginAdmins
|
|
69
|
+
}: AdminAppProps): react_jsx_runtime0.JSX.Element;
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/router.d.ts
|
|
72
|
+
interface RouterContext {
|
|
73
|
+
queryClient: QueryClient;
|
|
74
|
+
}
|
|
75
|
+
declare function createAdminRouter(queryClient: QueryClient): _tanstack_router_core0.RouterCore<_tanstack_router_core0.Route<_tanstack_react_router0.Register, any, "/", "/", string, "__root__", undefined, {}, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, readonly [_tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/setup", "/setup", string, "/setup", undefined, _tanstack_router_core0.ResolveParams<"/setup">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/login", "/login", string, "/login", undefined, _tanstack_router_core0.ResolveParams<"/login">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/signup", "/signup", string, "/signup", undefined, _tanstack_router_core0.ResolveParams<"/signup">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/device", "/device", string, "/device", undefined, _tanstack_router_core0.ResolveParams<"/device">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_router_core0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, readonly [_tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", string, "/_admin/", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/content/$collection", "/content/$collection", string, "/_admin/content/$collection", (search: Record<string, unknown>) => {
|
|
76
|
+
locale: string | undefined;
|
|
77
|
+
}, _tanstack_router_core0.ResolveParams<"/content/$collection">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/content/$collection/new", "/content/$collection/new", string, "/_admin/content/$collection/new", undefined, _tanstack_router_core0.ResolveParams<"/content/$collection/new">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/content/$collection/$id", "/content/$collection/$id", string, "/_admin/content/$collection/$id", undefined, _tanstack_router_core0.ResolveParams<"/content/$collection/$id">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/content-types", "/content-types", string, "/_admin/content-types", undefined, _tanstack_router_core0.ResolveParams<"/content-types">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/content-types/new", "/content-types/new", string, "/_admin/content-types/new", undefined, _tanstack_router_core0.ResolveParams<"/content-types/new">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/content-types/$slug", "/content-types/$slug", string, "/_admin/content-types/$slug", undefined, _tanstack_router_core0.ResolveParams<"/content-types/$slug">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/media", "/media", string, "/_admin/media", undefined, _tanstack_router_core0.ResolveParams<"/media">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/comments", "/comments", string, "/_admin/comments", undefined, _tanstack_router_core0.ResolveParams<"/comments">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/menus", "/menus", string, "/_admin/menus", undefined, _tanstack_router_core0.ResolveParams<"/menus">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/menus/$name", "/menus/$name", string, "/_admin/menus/$name", undefined, _tanstack_router_core0.ResolveParams<"/menus/$name">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/plugins-manager", "/plugins-manager", string, "/_admin/plugins-manager", undefined, _tanstack_router_core0.ResolveParams<"/plugins-manager">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/plugins/marketplace/$pluginId", "/plugins/marketplace/$pluginId", string, "/_admin/plugins/marketplace/$pluginId", undefined, _tanstack_router_core0.ResolveParams<"/plugins/marketplace/$pluginId">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/plugins/marketplace", "/plugins/marketplace", string, "/_admin/plugins/marketplace", undefined, _tanstack_router_core0.ResolveParams<"/plugins/marketplace">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/themes/marketplace", "/themes/marketplace", string, "/_admin/themes/marketplace", undefined, _tanstack_router_core0.ResolveParams<"/themes/marketplace">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/themes/marketplace/$themeId", "/themes/marketplace/$themeId", string, "/_admin/themes/marketplace/$themeId", undefined, _tanstack_router_core0.ResolveParams<"/themes/marketplace/$themeId">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/plugins/$pluginId/$", "/plugins/$pluginId/$", string, "/_admin/plugins/$pluginId/$", undefined, _tanstack_router_core0.ResolveParams<"/plugins/$pluginId/$">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/redirects", "/redirects", string, "/_admin/redirects", undefined, _tanstack_router_core0.ResolveParams<"/redirects">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/sections", "/sections", string, "/_admin/sections", undefined, _tanstack_router_core0.ResolveParams<"/sections">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/sections/$slug", "/sections/$slug", string, "/_admin/sections/$slug", undefined, _tanstack_router_core0.ResolveParams<"/sections/$slug">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/taxonomies/$taxonomy", "/taxonomies/$taxonomy", string, "/_admin/taxonomies/$taxonomy", undefined, _tanstack_router_core0.ResolveParams<"/taxonomies/$taxonomy">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/users", "/users", string, "/_admin/users", undefined, _tanstack_router_core0.ResolveParams<"/users">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/bylines", "/bylines", string, "/_admin/bylines", undefined, _tanstack_router_core0.ResolveParams<"/bylines">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/widgets", "/widgets", string, "/_admin/widgets", undefined, _tanstack_router_core0.ResolveParams<"/widgets">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", string, "/_admin/settings", undefined, _tanstack_router_core0.ResolveParams<"/settings">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings/general", "/settings/general", string, "/_admin/settings/general", undefined, _tanstack_router_core0.ResolveParams<"/settings/general">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings/social", "/settings/social", string, "/_admin/settings/social", undefined, _tanstack_router_core0.ResolveParams<"/settings/social">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings/seo", "/settings/seo", string, "/_admin/settings/seo", undefined, _tanstack_router_core0.ResolveParams<"/settings/seo">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings/security", "/settings/security", string, "/_admin/settings/security", undefined, _tanstack_router_core0.ResolveParams<"/settings/security">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings/allowed-domains", "/settings/allowed-domains", string, "/_admin/settings/allowed-domains", undefined, _tanstack_router_core0.ResolveParams<"/settings/allowed-domains">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings/api-tokens", "/settings/api-tokens", string, "/_admin/settings/api-tokens", undefined, _tanstack_router_core0.ResolveParams<"/settings/api-tokens">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings/email", "/settings/email", string, "/_admin/settings/email", undefined, _tanstack_router_core0.ResolveParams<"/settings/email">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/import/wordpress", "/import/wordpress", string, "/_admin/import/wordpress", undefined, _tanstack_router_core0.ResolveParams<"/import/wordpress">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.Route<unknown, _tanstack_react_router0.RootRoute<_tanstack_react_router0.Register, undefined, RouterContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "_admin", "/_admin", undefined, _tanstack_router_core0.ResolveParams<"/">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "*", "/*", string, "/_admin/*", undefined, _tanstack_router_core0.ResolveParams<"*">, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, _tanstack_router_core0.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>], unknown, unknown, unknown, undefined>], unknown, unknown, unknown, undefined>, "never", false, _tanstack_history0.RouterHistory, Record<string, any>>;
|
|
78
|
+
declare module "@tanstack/react-router" {
|
|
79
|
+
interface Register {
|
|
80
|
+
router: ReturnType<typeof createAdminRouter>;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/components/Shell.d.ts
|
|
85
|
+
interface ShellProps {
|
|
86
|
+
children: React.ReactNode;
|
|
87
|
+
manifest: {
|
|
88
|
+
collections: Record<string, {
|
|
89
|
+
label: string;
|
|
90
|
+
}>;
|
|
91
|
+
plugins: Record<string, {
|
|
92
|
+
package?: string;
|
|
93
|
+
adminPages?: Array<{
|
|
94
|
+
path: string;
|
|
95
|
+
label?: string;
|
|
96
|
+
icon?: string;
|
|
97
|
+
}>;
|
|
98
|
+
}>;
|
|
99
|
+
version?: string;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Admin shell layout with kumo Sidebar component.
|
|
104
|
+
*
|
|
105
|
+
* Sidebar.Provider wraps both the sidebar and main content area,
|
|
106
|
+
* handling collapse state, mobile detection, and layout transitions.
|
|
107
|
+
*/
|
|
108
|
+
declare function Shell({
|
|
109
|
+
children,
|
|
110
|
+
manifest
|
|
111
|
+
}: ShellProps): react_jsx_runtime0.JSX.Element;
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/components/Sidebar.d.ts
|
|
114
|
+
interface SidebarNavProps {
|
|
115
|
+
manifest: {
|
|
116
|
+
collections: Record<string, {
|
|
117
|
+
label: string;
|
|
118
|
+
}>;
|
|
119
|
+
plugins: Record<string, {
|
|
120
|
+
package?: string;
|
|
121
|
+
enabled?: boolean;
|
|
122
|
+
adminMode?: "react" | "blocks" | "none";
|
|
123
|
+
adminPages?: Array<{
|
|
124
|
+
path: string;
|
|
125
|
+
label?: string;
|
|
126
|
+
icon?: string;
|
|
127
|
+
}>;
|
|
128
|
+
dashboardWidgets?: Array<{
|
|
129
|
+
id: string;
|
|
130
|
+
title?: string;
|
|
131
|
+
}>;
|
|
132
|
+
version?: string;
|
|
133
|
+
}>;
|
|
134
|
+
version?: string;
|
|
135
|
+
marketplace?: string;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Admin sidebar navigation using kumo's Sidebar compound component.
|
|
140
|
+
*/
|
|
141
|
+
declare function SidebarNav({
|
|
142
|
+
manifest
|
|
143
|
+
}: SidebarNavProps): react_jsx_runtime0.JSX.Element;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/lib/api/current-user.d.ts
|
|
146
|
+
/**
|
|
147
|
+
* Current user query — shared across Shell, Header, Sidebar, and CommandPalette.
|
|
148
|
+
*/
|
|
149
|
+
interface CurrentUser {
|
|
150
|
+
id: string;
|
|
151
|
+
email: string;
|
|
152
|
+
name?: string;
|
|
153
|
+
role: number;
|
|
154
|
+
avatarUrl?: string;
|
|
155
|
+
isFirstLogin?: boolean;
|
|
156
|
+
}
|
|
157
|
+
declare function useCurrentUser(): _tanstack_react_query0.UseQueryResult<CurrentUser, Error>;
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/components/Header.d.ts
|
|
160
|
+
/**
|
|
161
|
+
* Admin header with mobile menu toggle and user actions.
|
|
162
|
+
* Uses useSidebar() hook from kumo Sidebar.Provider context.
|
|
163
|
+
*/
|
|
164
|
+
declare function Header(): react_jsx_runtime0.JSX.Element;
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/lib/api/client.d.ts
|
|
167
|
+
declare const API_BASE = "/_emdash/api";
|
|
168
|
+
/**
|
|
169
|
+
* Fetch wrapper that adds the X-EmDash-Request CSRF protection header
|
|
170
|
+
* to all requests. All API calls should use this instead of raw fetch().
|
|
171
|
+
*/
|
|
172
|
+
declare function apiFetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
173
|
+
/**
|
|
174
|
+
* Throw an error with the message from the API response body if available,
|
|
175
|
+
* falling back to a generic message. All API error responses use the shape
|
|
176
|
+
* `{ error: { code, message } }`.
|
|
177
|
+
*/
|
|
178
|
+
declare function throwResponseError(res: Response, fallback: string): Promise<never>;
|
|
179
|
+
/**
|
|
180
|
+
* Generic paginated result
|
|
181
|
+
*/
|
|
182
|
+
interface FindManyResult<T> {
|
|
183
|
+
items: T[];
|
|
184
|
+
nextCursor?: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Admin manifest describing available collections and plugins
|
|
188
|
+
*/
|
|
189
|
+
interface AdminManifest {
|
|
190
|
+
version: string;
|
|
191
|
+
hash: string;
|
|
192
|
+
collections: Record<string, {
|
|
193
|
+
label: string;
|
|
194
|
+
labelSingular: string;
|
|
195
|
+
supports: string[];
|
|
196
|
+
hasSeo: boolean;
|
|
197
|
+
fields: Record<string, {
|
|
198
|
+
kind: string;
|
|
199
|
+
label?: string;
|
|
200
|
+
required?: boolean;
|
|
201
|
+
widget?: string;
|
|
202
|
+
options?: Array<{
|
|
203
|
+
value: string;
|
|
204
|
+
label: string;
|
|
205
|
+
}>;
|
|
206
|
+
}>;
|
|
207
|
+
}>;
|
|
208
|
+
plugins: Record<string, {
|
|
209
|
+
name?: string;
|
|
210
|
+
version?: string; /** Package name for dynamic import (e.g., "@emdash-cms/plugin-audit-log") */
|
|
211
|
+
package?: string; /** Whether the plugin is enabled */
|
|
212
|
+
enabled?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* How this plugin renders its admin UI:
|
|
215
|
+
* - "react": Trusted plugin with React components
|
|
216
|
+
* - "blocks": Declarative Block Kit UI via admin route handler
|
|
217
|
+
* - "none": No admin UI
|
|
218
|
+
*/
|
|
219
|
+
adminMode?: "react" | "blocks" | "none";
|
|
220
|
+
adminPages?: Array<{
|
|
221
|
+
path: string;
|
|
222
|
+
label?: string;
|
|
223
|
+
icon?: string;
|
|
224
|
+
}>;
|
|
225
|
+
dashboardWidgets?: Array<{
|
|
226
|
+
id: string;
|
|
227
|
+
title?: string;
|
|
228
|
+
size?: "full" | "half" | "third";
|
|
229
|
+
}>;
|
|
230
|
+
fieldWidgets?: Array<{
|
|
231
|
+
name: string;
|
|
232
|
+
label: string;
|
|
233
|
+
fieldTypes: string[];
|
|
234
|
+
elements?: _emdash_cms_blocks0.Element[];
|
|
235
|
+
}>; /** Block types for Portable Text editor */
|
|
236
|
+
portableTextBlocks?: Array<{
|
|
237
|
+
type: string;
|
|
238
|
+
label: string;
|
|
239
|
+
icon?: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
placeholder?: string;
|
|
242
|
+
fields?: Element[];
|
|
243
|
+
}>;
|
|
244
|
+
}>;
|
|
245
|
+
/**
|
|
246
|
+
* Auth mode for the admin UI. When "passkey", the security settings
|
|
247
|
+
* (passkey management, self-signup domains) are shown. When using
|
|
248
|
+
* external auth (e.g., "cloudflare-access"), these are hidden since
|
|
249
|
+
* authentication is handled externally.
|
|
250
|
+
*/
|
|
251
|
+
authMode: string;
|
|
252
|
+
/**
|
|
253
|
+
* Whether self-signup is enabled (at least one allowed domain is active).
|
|
254
|
+
* Used by the login page to conditionally show the "Sign up" link.
|
|
255
|
+
*/
|
|
256
|
+
signupEnabled?: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* i18n configuration. Present when multiple locales are configured.
|
|
259
|
+
*/
|
|
260
|
+
i18n?: {
|
|
261
|
+
defaultLocale: string;
|
|
262
|
+
locales: string[];
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* Marketplace registry URL. Present when `marketplace` is configured
|
|
266
|
+
* in the EmDash integration. Enables marketplace features in the UI.
|
|
267
|
+
*/
|
|
268
|
+
marketplace?: string;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Parse an API response with the { data: T } envelope.
|
|
272
|
+
*
|
|
273
|
+
* Handles error responses via throwResponseError, then unwraps the data envelope.
|
|
274
|
+
* Replaces both bare `response.json()` and field-unwrap patterns.
|
|
275
|
+
*/
|
|
276
|
+
declare function parseApiResponse<T>(response: Response, fallbackMessage?: string): Promise<T>;
|
|
277
|
+
/**
|
|
278
|
+
* Fetch admin manifest
|
|
279
|
+
*/
|
|
280
|
+
declare function fetchManifest(): Promise<AdminManifest>;
|
|
281
|
+
//#endregion
|
|
282
|
+
//#region src/lib/api/bylines.d.ts
|
|
283
|
+
interface BylineSummary {
|
|
284
|
+
id: string;
|
|
285
|
+
slug: string;
|
|
286
|
+
displayName: string;
|
|
287
|
+
bio: string | null;
|
|
288
|
+
avatarMediaId: string | null;
|
|
289
|
+
websiteUrl: string | null;
|
|
290
|
+
userId: string | null;
|
|
291
|
+
isGuest: boolean;
|
|
292
|
+
createdAt: string;
|
|
293
|
+
updatedAt: string;
|
|
294
|
+
}
|
|
295
|
+
interface BylineInput {
|
|
296
|
+
slug: string;
|
|
297
|
+
displayName: string;
|
|
298
|
+
bio?: string | null;
|
|
299
|
+
avatarMediaId?: string | null;
|
|
300
|
+
websiteUrl?: string | null;
|
|
301
|
+
userId?: string | null;
|
|
302
|
+
isGuest?: boolean;
|
|
303
|
+
}
|
|
304
|
+
interface BylineCreditInput {
|
|
305
|
+
bylineId: string;
|
|
306
|
+
roleLabel?: string | null;
|
|
307
|
+
}
|
|
308
|
+
declare function fetchBylines(options?: {
|
|
309
|
+
search?: string;
|
|
310
|
+
isGuest?: boolean;
|
|
311
|
+
userId?: string;
|
|
312
|
+
cursor?: string;
|
|
313
|
+
limit?: number;
|
|
314
|
+
}): Promise<FindManyResult<BylineSummary>>;
|
|
315
|
+
declare function fetchByline(id: string): Promise<BylineSummary>;
|
|
316
|
+
declare function createByline(input: BylineInput): Promise<BylineSummary>;
|
|
317
|
+
declare function updateByline(id: string, input: Partial<BylineInput>): Promise<BylineSummary>;
|
|
318
|
+
declare function deleteByline(id: string): Promise<void>;
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/lib/api/content.d.ts
|
|
321
|
+
/**
|
|
322
|
+
* Derive draft status from a content item's revision pointers
|
|
323
|
+
*/
|
|
324
|
+
declare function getDraftStatus(item: ContentItem): "unpublished" | "published" | "published_with_changes";
|
|
325
|
+
/** SEO metadata for a content item */
|
|
326
|
+
interface ContentSeo {
|
|
327
|
+
title: string | null;
|
|
328
|
+
description: string | null;
|
|
329
|
+
image: string | null;
|
|
330
|
+
canonical: string | null;
|
|
331
|
+
noIndex: boolean;
|
|
332
|
+
}
|
|
333
|
+
interface ContentItem {
|
|
334
|
+
id: string;
|
|
335
|
+
type: string;
|
|
336
|
+
slug: string | null;
|
|
337
|
+
status: string;
|
|
338
|
+
locale: string;
|
|
339
|
+
translationGroup: string | null;
|
|
340
|
+
data: Record<string, unknown>;
|
|
341
|
+
authorId: string | null;
|
|
342
|
+
primaryBylineId: string | null;
|
|
343
|
+
byline?: BylineSummary | null;
|
|
344
|
+
bylines?: Array<{
|
|
345
|
+
byline: BylineSummary;
|
|
346
|
+
sortOrder: number;
|
|
347
|
+
roleLabel: string | null;
|
|
348
|
+
}>;
|
|
349
|
+
createdAt: string;
|
|
350
|
+
updatedAt: string;
|
|
351
|
+
publishedAt: string | null;
|
|
352
|
+
scheduledAt: string | null;
|
|
353
|
+
liveRevisionId: string | null;
|
|
354
|
+
draftRevisionId: string | null;
|
|
355
|
+
seo?: ContentSeo;
|
|
356
|
+
}
|
|
357
|
+
interface CreateContentInput {
|
|
358
|
+
type: string;
|
|
359
|
+
slug?: string;
|
|
360
|
+
data: Record<string, unknown>;
|
|
361
|
+
status?: string;
|
|
362
|
+
bylines?: BylineCreditInput[];
|
|
363
|
+
locale?: string;
|
|
364
|
+
translationOf?: string;
|
|
365
|
+
}
|
|
366
|
+
interface TranslationSummary {
|
|
367
|
+
id: string;
|
|
368
|
+
locale: string;
|
|
369
|
+
slug: string | null;
|
|
370
|
+
status: string;
|
|
371
|
+
updatedAt: string;
|
|
372
|
+
}
|
|
373
|
+
interface TranslationsResponse {
|
|
374
|
+
translationGroup: string;
|
|
375
|
+
translations: TranslationSummary[];
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Fetch translations for a content item
|
|
379
|
+
*/
|
|
380
|
+
declare function fetchTranslations(collection: string, id: string): Promise<TranslationsResponse>;
|
|
381
|
+
/** Input for updating SEO fields on content */
|
|
382
|
+
interface ContentSeoInput {
|
|
383
|
+
title?: string | null;
|
|
384
|
+
description?: string | null;
|
|
385
|
+
image?: string | null;
|
|
386
|
+
canonical?: string | null;
|
|
387
|
+
noIndex?: boolean;
|
|
388
|
+
}
|
|
389
|
+
interface UpdateContentInput {
|
|
390
|
+
data?: Record<string, unknown>;
|
|
391
|
+
slug?: string;
|
|
392
|
+
status?: string;
|
|
393
|
+
authorId?: string | null;
|
|
394
|
+
bylines?: BylineCreditInput[];
|
|
395
|
+
/** Skip revision creation (used by autosave) */
|
|
396
|
+
skipRevision?: boolean;
|
|
397
|
+
seo?: ContentSeoInput;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Trashed content item with deletion timestamp
|
|
401
|
+
*/
|
|
402
|
+
interface TrashedContentItem extends ContentItem {
|
|
403
|
+
deletedAt: string;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Preview URL response
|
|
407
|
+
*/
|
|
408
|
+
interface PreviewUrlResponse {
|
|
409
|
+
url: string;
|
|
410
|
+
expiresAt: number;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Fetch content list
|
|
414
|
+
*/
|
|
415
|
+
declare function fetchContentList(collection: string, options?: {
|
|
416
|
+
cursor?: string;
|
|
417
|
+
limit?: number;
|
|
418
|
+
status?: string;
|
|
419
|
+
locale?: string;
|
|
420
|
+
}): Promise<FindManyResult<ContentItem>>;
|
|
421
|
+
/**
|
|
422
|
+
* Fetch single content item
|
|
423
|
+
*/
|
|
424
|
+
declare function fetchContent(collection: string, id: string): Promise<ContentItem>;
|
|
425
|
+
/**
|
|
426
|
+
* Create content
|
|
427
|
+
*/
|
|
428
|
+
declare function createContent(collection: string, input: Omit<CreateContentInput, "type">): Promise<ContentItem>;
|
|
429
|
+
/**
|
|
430
|
+
* Update content
|
|
431
|
+
*/
|
|
432
|
+
declare function updateContent(collection: string, id: string, input: UpdateContentInput): Promise<ContentItem>;
|
|
433
|
+
/**
|
|
434
|
+
* Delete content (moves to trash)
|
|
435
|
+
*/
|
|
436
|
+
declare function deleteContent(collection: string, id: string): Promise<void>;
|
|
437
|
+
/**
|
|
438
|
+
* Fetch trashed content list
|
|
439
|
+
*/
|
|
440
|
+
declare function fetchTrashedContent(collection: string, options?: {
|
|
441
|
+
cursor?: string;
|
|
442
|
+
limit?: number;
|
|
443
|
+
}): Promise<FindManyResult<TrashedContentItem>>;
|
|
444
|
+
/**
|
|
445
|
+
* Restore content from trash
|
|
446
|
+
*/
|
|
447
|
+
declare function restoreContent(collection: string, id: string): Promise<void>;
|
|
448
|
+
/**
|
|
449
|
+
* Permanently delete content (cannot be undone)
|
|
450
|
+
*/
|
|
451
|
+
declare function permanentDeleteContent(collection: string, id: string): Promise<void>;
|
|
452
|
+
/**
|
|
453
|
+
* Duplicate content (creates a draft copy)
|
|
454
|
+
*/
|
|
455
|
+
declare function duplicateContent(collection: string, id: string): Promise<ContentItem>;
|
|
456
|
+
/**
|
|
457
|
+
* Schedule content for future publishing
|
|
458
|
+
*/
|
|
459
|
+
declare function scheduleContent(collection: string, id: string, scheduledAt: string): Promise<ContentItem>;
|
|
460
|
+
/**
|
|
461
|
+
* Unschedule content (revert to draft)
|
|
462
|
+
*/
|
|
463
|
+
declare function unscheduleContent(collection: string, id: string): Promise<ContentItem>;
|
|
464
|
+
/**
|
|
465
|
+
* Get a preview URL for content
|
|
466
|
+
*
|
|
467
|
+
* Returns a signed URL that allows viewing draft content.
|
|
468
|
+
* Returns null if preview is not configured (missing EMDASH_PREVIEW_SECRET).
|
|
469
|
+
*/
|
|
470
|
+
declare function getPreviewUrl(collection: string, id: string, options?: {
|
|
471
|
+
expiresIn?: string;
|
|
472
|
+
pathPattern?: string;
|
|
473
|
+
}): Promise<PreviewUrlResponse | null>;
|
|
474
|
+
/**
|
|
475
|
+
* Publish content - promotes current draft to live
|
|
476
|
+
*/
|
|
477
|
+
declare function publishContent(collection: string, id: string): Promise<ContentItem>;
|
|
478
|
+
/**
|
|
479
|
+
* Unpublish content - removes from public, preserves draft
|
|
480
|
+
*/
|
|
481
|
+
declare function unpublishContent(collection: string, id: string): Promise<ContentItem>;
|
|
482
|
+
/**
|
|
483
|
+
* Discard draft changes - reverts to live version
|
|
484
|
+
*/
|
|
485
|
+
declare function discardDraft(collection: string, id: string): Promise<ContentItem>;
|
|
486
|
+
/**
|
|
487
|
+
* Compare live and draft revisions
|
|
488
|
+
*/
|
|
489
|
+
declare function compareRevisions(collection: string, id: string): Promise<{
|
|
490
|
+
hasChanges: boolean;
|
|
491
|
+
live: Record<string, unknown> | null;
|
|
492
|
+
draft: Record<string, unknown> | null;
|
|
493
|
+
}>;
|
|
494
|
+
interface Revision {
|
|
495
|
+
id: string;
|
|
496
|
+
collection: string;
|
|
497
|
+
entryId: string;
|
|
498
|
+
data: Record<string, unknown>;
|
|
499
|
+
authorId: string | null;
|
|
500
|
+
createdAt: string;
|
|
501
|
+
}
|
|
502
|
+
interface RevisionListResponse {
|
|
503
|
+
items: Revision[];
|
|
504
|
+
total: number;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Fetch revisions for a content item
|
|
508
|
+
*/
|
|
509
|
+
declare function fetchRevisions(collection: string, entryId: string, options?: {
|
|
510
|
+
limit?: number;
|
|
511
|
+
}): Promise<RevisionListResponse>;
|
|
512
|
+
/**
|
|
513
|
+
* Get a specific revision
|
|
514
|
+
*/
|
|
515
|
+
declare function fetchRevision(revisionId: string): Promise<Revision>;
|
|
516
|
+
/**
|
|
517
|
+
* Restore a revision (updates content to this revision's data)
|
|
518
|
+
*/
|
|
519
|
+
declare function restoreRevision(revisionId: string): Promise<ContentItem>;
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region src/lib/api/media.d.ts
|
|
522
|
+
interface MediaItem {
|
|
523
|
+
id: string;
|
|
524
|
+
filename: string;
|
|
525
|
+
mimeType: string;
|
|
526
|
+
url: string;
|
|
527
|
+
/** Storage key for local media (e.g., "01ABC.jpg"). Not present for external URLs. */
|
|
528
|
+
storageKey?: string;
|
|
529
|
+
size: number;
|
|
530
|
+
width?: number;
|
|
531
|
+
height?: number;
|
|
532
|
+
alt?: string;
|
|
533
|
+
caption?: string;
|
|
534
|
+
createdAt: string;
|
|
535
|
+
/** Provider ID for external media (e.g., "cloudflare-images") */
|
|
536
|
+
provider?: string;
|
|
537
|
+
/** Provider-specific metadata */
|
|
538
|
+
meta?: Record<string, unknown>;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Fetch media list
|
|
542
|
+
*/
|
|
543
|
+
declare function fetchMediaList(options?: {
|
|
544
|
+
cursor?: string;
|
|
545
|
+
limit?: number;
|
|
546
|
+
mimeType?: string;
|
|
547
|
+
}): Promise<FindManyResult<MediaItem>>;
|
|
548
|
+
/**
|
|
549
|
+
* Upload media file
|
|
550
|
+
*
|
|
551
|
+
* Tries signed URL upload first (for S3/R2 storage), falls back to direct upload
|
|
552
|
+
* (for local storage) if signed URLs are not supported.
|
|
553
|
+
*/
|
|
554
|
+
declare function uploadMedia(file: File): Promise<MediaItem>;
|
|
555
|
+
/**
|
|
556
|
+
* Delete media
|
|
557
|
+
*/
|
|
558
|
+
declare function deleteMedia(id: string): Promise<void>;
|
|
559
|
+
/**
|
|
560
|
+
* Update media metadata (dimensions, alt text, etc.)
|
|
561
|
+
*/
|
|
562
|
+
declare function updateMedia(id: string, input: {
|
|
563
|
+
alt?: string;
|
|
564
|
+
caption?: string;
|
|
565
|
+
width?: number;
|
|
566
|
+
height?: number;
|
|
567
|
+
}): Promise<MediaItem>;
|
|
568
|
+
/** Media provider capabilities */
|
|
569
|
+
interface MediaProviderCapabilities {
|
|
570
|
+
browse: boolean;
|
|
571
|
+
search: boolean;
|
|
572
|
+
upload: boolean;
|
|
573
|
+
delete: boolean;
|
|
574
|
+
}
|
|
575
|
+
/** Media provider info from the API */
|
|
576
|
+
interface MediaProviderInfo {
|
|
577
|
+
id: string;
|
|
578
|
+
name: string;
|
|
579
|
+
icon?: string;
|
|
580
|
+
capabilities: MediaProviderCapabilities;
|
|
581
|
+
}
|
|
582
|
+
/** Media item from a provider */
|
|
583
|
+
interface MediaProviderItem {
|
|
584
|
+
id: string;
|
|
585
|
+
filename: string;
|
|
586
|
+
mimeType: string;
|
|
587
|
+
size?: number;
|
|
588
|
+
width?: number;
|
|
589
|
+
height?: number;
|
|
590
|
+
alt?: string;
|
|
591
|
+
previewUrl?: string;
|
|
592
|
+
meta?: Record<string, unknown>;
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Fetch all configured media providers
|
|
596
|
+
*/
|
|
597
|
+
declare function fetchMediaProviders(): Promise<MediaProviderInfo[]>;
|
|
598
|
+
/**
|
|
599
|
+
* Fetch media items from a specific provider
|
|
600
|
+
*/
|
|
601
|
+
declare function fetchProviderMedia(providerId: string, options?: {
|
|
602
|
+
cursor?: string;
|
|
603
|
+
limit?: number;
|
|
604
|
+
query?: string;
|
|
605
|
+
mimeType?: string;
|
|
606
|
+
}): Promise<FindManyResult<MediaProviderItem>>;
|
|
607
|
+
/**
|
|
608
|
+
* Upload media to a specific provider
|
|
609
|
+
*/
|
|
610
|
+
declare function uploadToProvider(providerId: string, file: File, alt?: string): Promise<MediaProviderItem>;
|
|
611
|
+
/**
|
|
612
|
+
* Delete media from a specific provider
|
|
613
|
+
*/
|
|
614
|
+
declare function deleteFromProvider(providerId: string, itemId: string): Promise<void>;
|
|
615
|
+
//#endregion
|
|
616
|
+
//#region src/lib/api/schema.d.ts
|
|
617
|
+
/**
|
|
618
|
+
* Schema/collection/field management APIs (Content Type Builder)
|
|
619
|
+
*/
|
|
620
|
+
type FieldType = "string" | "text" | "number" | "integer" | "boolean" | "datetime" | "select" | "multiSelect" | "portableText" | "image" | "file" | "reference" | "json" | "slug";
|
|
621
|
+
interface SchemaCollection {
|
|
622
|
+
id: string;
|
|
623
|
+
slug: string;
|
|
624
|
+
label: string;
|
|
625
|
+
labelSingular?: string;
|
|
626
|
+
description?: string;
|
|
627
|
+
icon?: string;
|
|
628
|
+
supports: string[];
|
|
629
|
+
source?: string;
|
|
630
|
+
urlPattern?: string;
|
|
631
|
+
hasSeo: boolean;
|
|
632
|
+
commentsEnabled: boolean;
|
|
633
|
+
commentsModeration: "all" | "first_time" | "none";
|
|
634
|
+
commentsClosedAfterDays: number;
|
|
635
|
+
commentsAutoApproveUsers: boolean;
|
|
636
|
+
createdAt: string;
|
|
637
|
+
updatedAt: string;
|
|
638
|
+
}
|
|
639
|
+
interface SchemaField {
|
|
640
|
+
id: string;
|
|
641
|
+
collectionId: string;
|
|
642
|
+
slug: string;
|
|
643
|
+
label: string;
|
|
644
|
+
type: FieldType;
|
|
645
|
+
columnType: string;
|
|
646
|
+
required: boolean;
|
|
647
|
+
unique: boolean;
|
|
648
|
+
searchable: boolean;
|
|
649
|
+
defaultValue?: unknown;
|
|
650
|
+
validation?: {
|
|
651
|
+
min?: number;
|
|
652
|
+
max?: number;
|
|
653
|
+
minLength?: number;
|
|
654
|
+
maxLength?: number;
|
|
655
|
+
pattern?: string;
|
|
656
|
+
options?: string[];
|
|
657
|
+
};
|
|
658
|
+
widget?: string;
|
|
659
|
+
options?: Record<string, unknown>;
|
|
660
|
+
sortOrder: number;
|
|
661
|
+
createdAt: string;
|
|
662
|
+
}
|
|
663
|
+
interface SchemaCollectionWithFields extends SchemaCollection {
|
|
664
|
+
fields: SchemaField[];
|
|
665
|
+
}
|
|
666
|
+
interface CreateCollectionInput {
|
|
667
|
+
slug: string;
|
|
668
|
+
label: string;
|
|
669
|
+
labelSingular?: string;
|
|
670
|
+
description?: string;
|
|
671
|
+
icon?: string;
|
|
672
|
+
supports?: string[];
|
|
673
|
+
urlPattern?: string;
|
|
674
|
+
hasSeo?: boolean;
|
|
675
|
+
}
|
|
676
|
+
interface UpdateCollectionInput {
|
|
677
|
+
label?: string;
|
|
678
|
+
labelSingular?: string;
|
|
679
|
+
description?: string;
|
|
680
|
+
icon?: string;
|
|
681
|
+
supports?: string[];
|
|
682
|
+
urlPattern?: string;
|
|
683
|
+
hasSeo?: boolean;
|
|
684
|
+
commentsEnabled?: boolean;
|
|
685
|
+
commentsModeration?: "all" | "first_time" | "none";
|
|
686
|
+
commentsClosedAfterDays?: number;
|
|
687
|
+
commentsAutoApproveUsers?: boolean;
|
|
688
|
+
}
|
|
689
|
+
interface CreateFieldInput {
|
|
690
|
+
slug: string;
|
|
691
|
+
label: string;
|
|
692
|
+
type: FieldType;
|
|
693
|
+
required?: boolean;
|
|
694
|
+
unique?: boolean;
|
|
695
|
+
searchable?: boolean;
|
|
696
|
+
defaultValue?: unknown;
|
|
697
|
+
validation?: {
|
|
698
|
+
min?: number;
|
|
699
|
+
max?: number;
|
|
700
|
+
minLength?: number;
|
|
701
|
+
maxLength?: number;
|
|
702
|
+
pattern?: string;
|
|
703
|
+
options?: string[];
|
|
704
|
+
};
|
|
705
|
+
widget?: string;
|
|
706
|
+
options?: Record<string, unknown>;
|
|
707
|
+
}
|
|
708
|
+
interface UpdateFieldInput {
|
|
709
|
+
label?: string;
|
|
710
|
+
required?: boolean;
|
|
711
|
+
unique?: boolean;
|
|
712
|
+
searchable?: boolean;
|
|
713
|
+
defaultValue?: unknown;
|
|
714
|
+
validation?: {
|
|
715
|
+
min?: number;
|
|
716
|
+
max?: number;
|
|
717
|
+
minLength?: number;
|
|
718
|
+
maxLength?: number;
|
|
719
|
+
pattern?: string;
|
|
720
|
+
options?: string[];
|
|
721
|
+
};
|
|
722
|
+
widget?: string;
|
|
723
|
+
options?: Record<string, unknown>;
|
|
724
|
+
sortOrder?: number;
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Fetch all collections
|
|
728
|
+
*/
|
|
729
|
+
declare function fetchCollections(): Promise<SchemaCollection[]>;
|
|
730
|
+
/**
|
|
731
|
+
* Fetch a single collection with fields
|
|
732
|
+
*/
|
|
733
|
+
declare function fetchCollection(slug: string, includeFields?: boolean): Promise<SchemaCollectionWithFields>;
|
|
734
|
+
/**
|
|
735
|
+
* Create a collection
|
|
736
|
+
*/
|
|
737
|
+
declare function createCollection(input: CreateCollectionInput): Promise<SchemaCollection>;
|
|
738
|
+
/**
|
|
739
|
+
* Update a collection
|
|
740
|
+
*/
|
|
741
|
+
declare function updateCollection(slug: string, input: UpdateCollectionInput): Promise<SchemaCollection>;
|
|
742
|
+
/**
|
|
743
|
+
* Delete a collection
|
|
744
|
+
*/
|
|
745
|
+
declare function deleteCollection(slug: string, force?: boolean): Promise<void>;
|
|
746
|
+
/**
|
|
747
|
+
* Fetch fields for a collection
|
|
748
|
+
*/
|
|
749
|
+
declare function fetchFields(collectionSlug: string): Promise<SchemaField[]>;
|
|
750
|
+
/**
|
|
751
|
+
* Create a field
|
|
752
|
+
*/
|
|
753
|
+
declare function createField(collectionSlug: string, input: CreateFieldInput): Promise<SchemaField>;
|
|
754
|
+
/**
|
|
755
|
+
* Update a field
|
|
756
|
+
*/
|
|
757
|
+
declare function updateField(collectionSlug: string, fieldSlug: string, input: UpdateFieldInput): Promise<SchemaField>;
|
|
758
|
+
/**
|
|
759
|
+
* Delete a field
|
|
760
|
+
*/
|
|
761
|
+
declare function deleteField(collectionSlug: string, fieldSlug: string): Promise<void>;
|
|
762
|
+
/**
|
|
763
|
+
* Reorder fields
|
|
764
|
+
*/
|
|
765
|
+
declare function reorderFields(collectionSlug: string, fieldSlugs: string[]): Promise<void>;
|
|
766
|
+
interface OrphanedTable {
|
|
767
|
+
slug: string;
|
|
768
|
+
tableName: string;
|
|
769
|
+
rowCount: number;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Fetch orphaned content tables
|
|
773
|
+
*/
|
|
774
|
+
declare function fetchOrphanedTables(): Promise<OrphanedTable[]>;
|
|
775
|
+
/**
|
|
776
|
+
* Register an orphaned table as a collection
|
|
777
|
+
*/
|
|
778
|
+
declare function registerOrphanedTable(slug: string, options?: {
|
|
779
|
+
label?: string;
|
|
780
|
+
labelSingular?: string;
|
|
781
|
+
description?: string;
|
|
782
|
+
}): Promise<SchemaCollection>;
|
|
783
|
+
//#endregion
|
|
784
|
+
//#region src/lib/api/plugins.d.ts
|
|
785
|
+
/**
|
|
786
|
+
* Plugin management APIs
|
|
787
|
+
*/
|
|
788
|
+
interface PluginInfo {
|
|
789
|
+
id: string;
|
|
790
|
+
name: string;
|
|
791
|
+
version: string;
|
|
792
|
+
package?: string;
|
|
793
|
+
enabled: boolean;
|
|
794
|
+
status: "installed" | "active" | "inactive";
|
|
795
|
+
capabilities: string[];
|
|
796
|
+
hasAdminPages: boolean;
|
|
797
|
+
hasDashboardWidgets: boolean;
|
|
798
|
+
hasHooks: boolean;
|
|
799
|
+
installedAt?: string;
|
|
800
|
+
activatedAt?: string;
|
|
801
|
+
deactivatedAt?: string;
|
|
802
|
+
/** Plugin source: 'config' (declared in astro.config) or 'marketplace' */
|
|
803
|
+
source?: "config" | "marketplace";
|
|
804
|
+
/** Installed marketplace version (set when source = 'marketplace') */
|
|
805
|
+
marketplaceVersion?: string;
|
|
806
|
+
/** Description of what the plugin does */
|
|
807
|
+
description?: string;
|
|
808
|
+
/** URL to the plugin icon (marketplace plugins use the icon proxy) */
|
|
809
|
+
iconUrl?: string;
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* Fetch all plugins
|
|
813
|
+
*/
|
|
814
|
+
declare function fetchPlugins(): Promise<PluginInfo[]>;
|
|
815
|
+
/**
|
|
816
|
+
* Fetch a single plugin
|
|
817
|
+
*/
|
|
818
|
+
declare function fetchPlugin(pluginId: string): Promise<PluginInfo>;
|
|
819
|
+
/**
|
|
820
|
+
* Enable a plugin
|
|
821
|
+
*/
|
|
822
|
+
declare function enablePlugin(pluginId: string): Promise<PluginInfo>;
|
|
823
|
+
/**
|
|
824
|
+
* Disable a plugin
|
|
825
|
+
*/
|
|
826
|
+
declare function disablePlugin(pluginId: string): Promise<PluginInfo>;
|
|
827
|
+
//#endregion
|
|
828
|
+
//#region src/lib/api/settings.d.ts
|
|
829
|
+
/**
|
|
830
|
+
* Site settings APIs
|
|
831
|
+
*/
|
|
832
|
+
interface SiteSettings {
|
|
833
|
+
title: string;
|
|
834
|
+
tagline?: string;
|
|
835
|
+
logo?: {
|
|
836
|
+
mediaId: string;
|
|
837
|
+
alt?: string;
|
|
838
|
+
url?: string;
|
|
839
|
+
};
|
|
840
|
+
favicon?: {
|
|
841
|
+
mediaId: string;
|
|
842
|
+
url?: string;
|
|
843
|
+
};
|
|
844
|
+
url?: string;
|
|
845
|
+
postsPerPage: number;
|
|
846
|
+
dateFormat: string;
|
|
847
|
+
timezone: string;
|
|
848
|
+
social?: {
|
|
849
|
+
twitter?: string;
|
|
850
|
+
github?: string;
|
|
851
|
+
facebook?: string;
|
|
852
|
+
instagram?: string;
|
|
853
|
+
linkedin?: string;
|
|
854
|
+
youtube?: string;
|
|
855
|
+
};
|
|
856
|
+
seo?: {
|
|
857
|
+
titleSeparator?: string;
|
|
858
|
+
defaultOgImage?: {
|
|
859
|
+
mediaId: string;
|
|
860
|
+
alt?: string;
|
|
861
|
+
url?: string;
|
|
862
|
+
};
|
|
863
|
+
robotsTxt?: string;
|
|
864
|
+
googleVerification?: string;
|
|
865
|
+
bingVerification?: string;
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Fetch site settings
|
|
870
|
+
*/
|
|
871
|
+
declare function fetchSettings(): Promise<Partial<SiteSettings>>;
|
|
872
|
+
/**
|
|
873
|
+
* Update site settings
|
|
874
|
+
*/
|
|
875
|
+
declare function updateSettings(settings: Partial<SiteSettings>): Promise<Partial<SiteSettings>>;
|
|
876
|
+
//#endregion
|
|
877
|
+
//#region src/lib/api/users.d.ts
|
|
878
|
+
/** User list item with computed fields */
|
|
879
|
+
interface UserListItem {
|
|
880
|
+
id: string;
|
|
881
|
+
email: string;
|
|
882
|
+
name: string | null;
|
|
883
|
+
avatarUrl: string | null;
|
|
884
|
+
role: number;
|
|
885
|
+
emailVerified: boolean;
|
|
886
|
+
disabled: boolean;
|
|
887
|
+
createdAt: string;
|
|
888
|
+
updatedAt: string;
|
|
889
|
+
lastLogin: string | null;
|
|
890
|
+
credentialCount: number;
|
|
891
|
+
oauthProviders: string[];
|
|
892
|
+
}
|
|
893
|
+
/** User detail with credentials and OAuth accounts */
|
|
894
|
+
interface UserDetail extends UserListItem {
|
|
895
|
+
credentials: Array<{
|
|
896
|
+
id: string;
|
|
897
|
+
name: string | null;
|
|
898
|
+
deviceType: string;
|
|
899
|
+
createdAt: string;
|
|
900
|
+
lastUsedAt: string;
|
|
901
|
+
}>;
|
|
902
|
+
oauthAccounts: Array<{
|
|
903
|
+
provider: string;
|
|
904
|
+
createdAt: string;
|
|
905
|
+
}>;
|
|
906
|
+
}
|
|
907
|
+
/** User update input */
|
|
908
|
+
interface UpdateUserInput {
|
|
909
|
+
name?: string;
|
|
910
|
+
email?: string;
|
|
911
|
+
role?: number;
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Fetch users with search, filter, and pagination
|
|
915
|
+
*/
|
|
916
|
+
declare function fetchUsers(options?: {
|
|
917
|
+
search?: string;
|
|
918
|
+
role?: number;
|
|
919
|
+
cursor?: string;
|
|
920
|
+
limit?: number;
|
|
921
|
+
}): Promise<FindManyResult<UserListItem>>;
|
|
922
|
+
/**
|
|
923
|
+
* Fetch a single user with details
|
|
924
|
+
*/
|
|
925
|
+
declare function fetchUser(id: string): Promise<UserDetail>;
|
|
926
|
+
/**
|
|
927
|
+
* Update a user
|
|
928
|
+
*/
|
|
929
|
+
declare function updateUser(id: string, input: UpdateUserInput): Promise<UserDetail>;
|
|
930
|
+
/**
|
|
931
|
+
* Disable a user
|
|
932
|
+
*/
|
|
933
|
+
declare function disableUser(id: string): Promise<void>;
|
|
934
|
+
/**
|
|
935
|
+
* Send a recovery magic link to a user
|
|
936
|
+
*/
|
|
937
|
+
declare function sendRecoveryLink(id: string): Promise<void>;
|
|
938
|
+
/**
|
|
939
|
+
* Enable a user
|
|
940
|
+
*/
|
|
941
|
+
declare function enableUser(id: string): Promise<void>;
|
|
942
|
+
/** Invite response -- includes inviteUrl when no email provider is configured */
|
|
943
|
+
interface InviteResult {
|
|
944
|
+
success: true;
|
|
945
|
+
message: string;
|
|
946
|
+
/** Present when no email provider is configured (copy-link fallback) */
|
|
947
|
+
inviteUrl?: string;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* Invite a new user
|
|
951
|
+
*
|
|
952
|
+
* Uses the existing /auth/invite endpoint.
|
|
953
|
+
* When no email provider is configured, the response includes
|
|
954
|
+
* an `inviteUrl` for manual sharing.
|
|
955
|
+
*/
|
|
956
|
+
declare function inviteUser(email: string, role?: number): Promise<InviteResult>;
|
|
957
|
+
/**
|
|
958
|
+
* Passkey info returned from API
|
|
959
|
+
*/
|
|
960
|
+
interface PasskeyInfo {
|
|
961
|
+
id: string;
|
|
962
|
+
name: string | null;
|
|
963
|
+
deviceType: "singleDevice" | "multiDevice";
|
|
964
|
+
backedUp: boolean;
|
|
965
|
+
createdAt: string;
|
|
966
|
+
lastUsedAt: string;
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* List all passkeys for the current user
|
|
970
|
+
*/
|
|
971
|
+
declare function fetchPasskeys(): Promise<PasskeyInfo[]>;
|
|
972
|
+
/**
|
|
973
|
+
* Rename a passkey
|
|
974
|
+
*/
|
|
975
|
+
declare function renamePasskey(id: string, name: string): Promise<PasskeyInfo>;
|
|
976
|
+
/**
|
|
977
|
+
* Delete a passkey
|
|
978
|
+
*/
|
|
979
|
+
declare function deletePasskey(id: string): Promise<void>;
|
|
980
|
+
/** Allowed domain for self-signup */
|
|
981
|
+
interface AllowedDomain {
|
|
982
|
+
domain: string;
|
|
983
|
+
defaultRole: number;
|
|
984
|
+
roleName: string;
|
|
985
|
+
enabled: boolean;
|
|
986
|
+
createdAt: string;
|
|
987
|
+
}
|
|
988
|
+
/** Create allowed domain input */
|
|
989
|
+
interface CreateAllowedDomainInput {
|
|
990
|
+
domain: string;
|
|
991
|
+
defaultRole: number;
|
|
992
|
+
}
|
|
993
|
+
/** Update allowed domain input */
|
|
994
|
+
interface UpdateAllowedDomainInput {
|
|
995
|
+
enabled?: boolean;
|
|
996
|
+
defaultRole?: number;
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Fetch all allowed domains
|
|
1000
|
+
*/
|
|
1001
|
+
declare function fetchAllowedDomains(): Promise<AllowedDomain[]>;
|
|
1002
|
+
/**
|
|
1003
|
+
* Create an allowed domain
|
|
1004
|
+
*/
|
|
1005
|
+
declare function createAllowedDomain(input: CreateAllowedDomainInput): Promise<AllowedDomain>;
|
|
1006
|
+
/**
|
|
1007
|
+
* Update an allowed domain
|
|
1008
|
+
*/
|
|
1009
|
+
declare function updateAllowedDomain(domain: string, input: UpdateAllowedDomainInput): Promise<AllowedDomain>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Delete an allowed domain
|
|
1012
|
+
*/
|
|
1013
|
+
declare function deleteAllowedDomain(domain: string): Promise<void>;
|
|
1014
|
+
/** Signup verification result */
|
|
1015
|
+
interface SignupVerifyResult {
|
|
1016
|
+
email: string;
|
|
1017
|
+
role: number;
|
|
1018
|
+
roleName: string;
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Request signup - send verification email
|
|
1022
|
+
* Always returns success to prevent enumeration
|
|
1023
|
+
*/
|
|
1024
|
+
declare function requestSignup(email: string): Promise<{
|
|
1025
|
+
success: true;
|
|
1026
|
+
message: string;
|
|
1027
|
+
}>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Verify signup token
|
|
1030
|
+
*
|
|
1031
|
+
* Uses custom error handling to preserve error codes for the UI.
|
|
1032
|
+
*/
|
|
1033
|
+
declare function verifySignupToken(token: string): Promise<SignupVerifyResult>;
|
|
1034
|
+
/**
|
|
1035
|
+
* Complete signup with passkey registration
|
|
1036
|
+
*
|
|
1037
|
+
* Uses custom error handling to preserve error codes for the UI.
|
|
1038
|
+
*/
|
|
1039
|
+
declare function completeSignup(token: string, credential: unknown, name?: string): Promise<{
|
|
1040
|
+
success: true;
|
|
1041
|
+
user: {
|
|
1042
|
+
id: string;
|
|
1043
|
+
email: string;
|
|
1044
|
+
name: string | null;
|
|
1045
|
+
role: number;
|
|
1046
|
+
};
|
|
1047
|
+
}>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Check if any allowed domains exist (for showing signup link)
|
|
1050
|
+
*/
|
|
1051
|
+
declare function hasAllowedDomains(): Promise<boolean>;
|
|
1052
|
+
//#endregion
|
|
1053
|
+
//#region src/lib/api/menus.d.ts
|
|
1054
|
+
/**
|
|
1055
|
+
* Menu management APIs
|
|
1056
|
+
*/
|
|
1057
|
+
interface Menu {
|
|
1058
|
+
id: string;
|
|
1059
|
+
name: string;
|
|
1060
|
+
label: string;
|
|
1061
|
+
created_at: string;
|
|
1062
|
+
updated_at: string;
|
|
1063
|
+
itemCount?: number;
|
|
1064
|
+
}
|
|
1065
|
+
interface MenuItem {
|
|
1066
|
+
id: string;
|
|
1067
|
+
menu_id: string;
|
|
1068
|
+
parent_id: string | null;
|
|
1069
|
+
sort_order: number;
|
|
1070
|
+
type: string;
|
|
1071
|
+
reference_collection: string | null;
|
|
1072
|
+
reference_id: string | null;
|
|
1073
|
+
custom_url: string | null;
|
|
1074
|
+
label: string;
|
|
1075
|
+
title_attr: string | null;
|
|
1076
|
+
target: string | null;
|
|
1077
|
+
css_classes: string | null;
|
|
1078
|
+
created_at: string;
|
|
1079
|
+
}
|
|
1080
|
+
interface MenuWithItems extends Menu {
|
|
1081
|
+
items: MenuItem[];
|
|
1082
|
+
}
|
|
1083
|
+
interface CreateMenuInput {
|
|
1084
|
+
name: string;
|
|
1085
|
+
label: string;
|
|
1086
|
+
}
|
|
1087
|
+
interface UpdateMenuInput {
|
|
1088
|
+
label?: string;
|
|
1089
|
+
}
|
|
1090
|
+
interface CreateMenuItemInput {
|
|
1091
|
+
type: string;
|
|
1092
|
+
label: string;
|
|
1093
|
+
referenceCollection?: string;
|
|
1094
|
+
referenceId?: string;
|
|
1095
|
+
customUrl?: string;
|
|
1096
|
+
target?: string;
|
|
1097
|
+
titleAttr?: string;
|
|
1098
|
+
cssClasses?: string;
|
|
1099
|
+
parentId?: string;
|
|
1100
|
+
sortOrder?: number;
|
|
1101
|
+
}
|
|
1102
|
+
interface UpdateMenuItemInput {
|
|
1103
|
+
label?: string;
|
|
1104
|
+
customUrl?: string;
|
|
1105
|
+
target?: string;
|
|
1106
|
+
titleAttr?: string;
|
|
1107
|
+
cssClasses?: string;
|
|
1108
|
+
parentId?: string | null;
|
|
1109
|
+
sortOrder?: number;
|
|
1110
|
+
}
|
|
1111
|
+
interface ReorderMenuItemsInput {
|
|
1112
|
+
items: Array<{
|
|
1113
|
+
id: string;
|
|
1114
|
+
parentId: string | null;
|
|
1115
|
+
sortOrder: number;
|
|
1116
|
+
}>;
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Fetch all menus
|
|
1120
|
+
*/
|
|
1121
|
+
declare function fetchMenus(): Promise<Menu[]>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Fetch a single menu with items
|
|
1124
|
+
*/
|
|
1125
|
+
declare function fetchMenu(name: string): Promise<MenuWithItems>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Create a menu
|
|
1128
|
+
*/
|
|
1129
|
+
declare function createMenu(input: CreateMenuInput): Promise<Menu>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Update a menu
|
|
1132
|
+
*/
|
|
1133
|
+
declare function updateMenu(name: string, input: UpdateMenuInput): Promise<Menu>;
|
|
1134
|
+
/**
|
|
1135
|
+
* Delete a menu
|
|
1136
|
+
*/
|
|
1137
|
+
declare function deleteMenu(name: string): Promise<void>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Create a menu item
|
|
1140
|
+
*/
|
|
1141
|
+
declare function createMenuItem(menuName: string, input: CreateMenuItemInput): Promise<MenuItem>;
|
|
1142
|
+
/**
|
|
1143
|
+
* Update a menu item
|
|
1144
|
+
*/
|
|
1145
|
+
declare function updateMenuItem(menuName: string, itemId: string, input: UpdateMenuItemInput): Promise<MenuItem>;
|
|
1146
|
+
/**
|
|
1147
|
+
* Delete a menu item
|
|
1148
|
+
*/
|
|
1149
|
+
declare function deleteMenuItem(menuName: string, itemId: string): Promise<void>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Reorder menu items
|
|
1152
|
+
*/
|
|
1153
|
+
declare function reorderMenuItems(menuName: string, input: ReorderMenuItemsInput): Promise<MenuItem[]>;
|
|
1154
|
+
//#endregion
|
|
1155
|
+
//#region src/lib/api/widgets.d.ts
|
|
1156
|
+
/**
|
|
1157
|
+
* Widget areas APIs
|
|
1158
|
+
*/
|
|
1159
|
+
interface WidgetArea {
|
|
1160
|
+
id: string;
|
|
1161
|
+
name: string;
|
|
1162
|
+
label: string;
|
|
1163
|
+
description?: string;
|
|
1164
|
+
widgets?: Widget[];
|
|
1165
|
+
widgetCount?: number;
|
|
1166
|
+
}
|
|
1167
|
+
interface Widget {
|
|
1168
|
+
id: string;
|
|
1169
|
+
type: "content" | "menu" | "component";
|
|
1170
|
+
title?: string;
|
|
1171
|
+
content?: unknown[];
|
|
1172
|
+
menuName?: string;
|
|
1173
|
+
componentId?: string;
|
|
1174
|
+
componentProps?: Record<string, unknown>;
|
|
1175
|
+
sort_order?: number;
|
|
1176
|
+
}
|
|
1177
|
+
interface WidgetComponent {
|
|
1178
|
+
id: string;
|
|
1179
|
+
label: string;
|
|
1180
|
+
description?: string;
|
|
1181
|
+
props: Record<string, {
|
|
1182
|
+
type: "string" | "number" | "boolean" | "select";
|
|
1183
|
+
label: string;
|
|
1184
|
+
default?: unknown;
|
|
1185
|
+
options?: Array<{
|
|
1186
|
+
value: string;
|
|
1187
|
+
label: string;
|
|
1188
|
+
}>;
|
|
1189
|
+
}>;
|
|
1190
|
+
}
|
|
1191
|
+
interface CreateWidgetAreaInput {
|
|
1192
|
+
name: string;
|
|
1193
|
+
label: string;
|
|
1194
|
+
description?: string;
|
|
1195
|
+
}
|
|
1196
|
+
interface CreateWidgetInput {
|
|
1197
|
+
type: "content" | "menu" | "component";
|
|
1198
|
+
title?: string;
|
|
1199
|
+
content?: unknown[];
|
|
1200
|
+
menuName?: string;
|
|
1201
|
+
componentId?: string;
|
|
1202
|
+
componentProps?: Record<string, unknown>;
|
|
1203
|
+
}
|
|
1204
|
+
interface UpdateWidgetInput {
|
|
1205
|
+
type?: "content" | "menu" | "component";
|
|
1206
|
+
title?: string;
|
|
1207
|
+
content?: unknown[];
|
|
1208
|
+
menuName?: string;
|
|
1209
|
+
componentId?: string;
|
|
1210
|
+
componentProps?: Record<string, unknown>;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Fetch all widget areas
|
|
1214
|
+
*/
|
|
1215
|
+
declare function fetchWidgetAreas(): Promise<WidgetArea[]>;
|
|
1216
|
+
/**
|
|
1217
|
+
* Fetch a single widget area by name
|
|
1218
|
+
*/
|
|
1219
|
+
declare function fetchWidgetArea(name: string): Promise<WidgetArea>;
|
|
1220
|
+
/**
|
|
1221
|
+
* Create a widget area
|
|
1222
|
+
*/
|
|
1223
|
+
declare function createWidgetArea(input: CreateWidgetAreaInput): Promise<WidgetArea>;
|
|
1224
|
+
/**
|
|
1225
|
+
* Delete a widget area
|
|
1226
|
+
*/
|
|
1227
|
+
declare function deleteWidgetArea(name: string): Promise<void>;
|
|
1228
|
+
/**
|
|
1229
|
+
* Add a widget to an area
|
|
1230
|
+
*/
|
|
1231
|
+
declare function createWidget(areaName: string, input: CreateWidgetInput): Promise<Widget>;
|
|
1232
|
+
/**
|
|
1233
|
+
* Update a widget
|
|
1234
|
+
*/
|
|
1235
|
+
declare function updateWidget(areaName: string, widgetId: string, input: UpdateWidgetInput): Promise<Widget>;
|
|
1236
|
+
/**
|
|
1237
|
+
* Delete a widget
|
|
1238
|
+
*/
|
|
1239
|
+
declare function deleteWidget(areaName: string, widgetId: string): Promise<void>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Reorder widgets in an area
|
|
1242
|
+
*/
|
|
1243
|
+
declare function reorderWidgets(areaName: string, widgetIds: string[]): Promise<void>;
|
|
1244
|
+
/**
|
|
1245
|
+
* Fetch available widget components
|
|
1246
|
+
*/
|
|
1247
|
+
declare function fetchWidgetComponents(): Promise<WidgetComponent[]>;
|
|
1248
|
+
//#endregion
|
|
1249
|
+
//#region src/lib/api/sections.d.ts
|
|
1250
|
+
/**
|
|
1251
|
+
* Sections API (reusable content blocks)
|
|
1252
|
+
*/
|
|
1253
|
+
type SectionSource = "theme" | "user" | "import";
|
|
1254
|
+
interface Section {
|
|
1255
|
+
id: string;
|
|
1256
|
+
slug: string;
|
|
1257
|
+
title: string;
|
|
1258
|
+
description?: string;
|
|
1259
|
+
keywords: string[];
|
|
1260
|
+
content: unknown[];
|
|
1261
|
+
previewUrl?: string;
|
|
1262
|
+
source: SectionSource;
|
|
1263
|
+
themeId?: string;
|
|
1264
|
+
createdAt: string;
|
|
1265
|
+
updatedAt: string;
|
|
1266
|
+
}
|
|
1267
|
+
interface CreateSectionInput {
|
|
1268
|
+
slug: string;
|
|
1269
|
+
title: string;
|
|
1270
|
+
description?: string;
|
|
1271
|
+
keywords?: string[];
|
|
1272
|
+
content: unknown[];
|
|
1273
|
+
previewMediaId?: string;
|
|
1274
|
+
}
|
|
1275
|
+
interface UpdateSectionInput {
|
|
1276
|
+
slug?: string;
|
|
1277
|
+
title?: string;
|
|
1278
|
+
description?: string;
|
|
1279
|
+
keywords?: string[];
|
|
1280
|
+
content?: unknown[];
|
|
1281
|
+
previewMediaId?: string | null;
|
|
1282
|
+
}
|
|
1283
|
+
interface GetSectionsOptions {
|
|
1284
|
+
source?: SectionSource;
|
|
1285
|
+
search?: string;
|
|
1286
|
+
limit?: number;
|
|
1287
|
+
cursor?: string;
|
|
1288
|
+
}
|
|
1289
|
+
interface SectionsResult {
|
|
1290
|
+
items: Section[];
|
|
1291
|
+
nextCursor?: string;
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* Fetch all sections
|
|
1295
|
+
*/
|
|
1296
|
+
declare function fetchSections(options?: GetSectionsOptions): Promise<SectionsResult>;
|
|
1297
|
+
/**
|
|
1298
|
+
* Fetch a single section by slug
|
|
1299
|
+
*/
|
|
1300
|
+
declare function fetchSection(slug: string): Promise<Section>;
|
|
1301
|
+
/**
|
|
1302
|
+
* Create a section
|
|
1303
|
+
*/
|
|
1304
|
+
declare function createSection(input: CreateSectionInput): Promise<Section>;
|
|
1305
|
+
/**
|
|
1306
|
+
* Update a section
|
|
1307
|
+
*/
|
|
1308
|
+
declare function updateSection(slug: string, input: UpdateSectionInput): Promise<Section>;
|
|
1309
|
+
/**
|
|
1310
|
+
* Delete a section
|
|
1311
|
+
*/
|
|
1312
|
+
declare function deleteSection(slug: string): Promise<void>;
|
|
1313
|
+
//#endregion
|
|
1314
|
+
//#region src/lib/api/taxonomies.d.ts
|
|
1315
|
+
/**
|
|
1316
|
+
* Taxonomies API (categories, tags, custom taxonomies)
|
|
1317
|
+
*/
|
|
1318
|
+
interface TaxonomyTerm {
|
|
1319
|
+
id: string;
|
|
1320
|
+
name: string;
|
|
1321
|
+
slug: string;
|
|
1322
|
+
label: string;
|
|
1323
|
+
parentId?: string;
|
|
1324
|
+
description?: string;
|
|
1325
|
+
children: TaxonomyTerm[];
|
|
1326
|
+
count?: number;
|
|
1327
|
+
}
|
|
1328
|
+
interface TaxonomyDef {
|
|
1329
|
+
id: string;
|
|
1330
|
+
name: string;
|
|
1331
|
+
label: string;
|
|
1332
|
+
labelSingular?: string;
|
|
1333
|
+
hierarchical: boolean;
|
|
1334
|
+
collections: string[];
|
|
1335
|
+
}
|
|
1336
|
+
interface CreateTaxonomyInput {
|
|
1337
|
+
name: string;
|
|
1338
|
+
label: string;
|
|
1339
|
+
hierarchical?: boolean;
|
|
1340
|
+
collections?: string[];
|
|
1341
|
+
}
|
|
1342
|
+
interface CreateTermInput {
|
|
1343
|
+
slug: string;
|
|
1344
|
+
label: string;
|
|
1345
|
+
parentId?: string;
|
|
1346
|
+
description?: string;
|
|
1347
|
+
}
|
|
1348
|
+
interface UpdateTermInput {
|
|
1349
|
+
slug?: string;
|
|
1350
|
+
label?: string;
|
|
1351
|
+
parentId?: string;
|
|
1352
|
+
description?: string;
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Fetch all taxonomy definitions
|
|
1356
|
+
*/
|
|
1357
|
+
declare function fetchTaxonomyDefs(): Promise<TaxonomyDef[]>;
|
|
1358
|
+
/**
|
|
1359
|
+
* Fetch taxonomy definition by name
|
|
1360
|
+
*/
|
|
1361
|
+
declare function fetchTaxonomyDef(name: string): Promise<TaxonomyDef | null>;
|
|
1362
|
+
/**
|
|
1363
|
+
* Create a custom taxonomy definition
|
|
1364
|
+
*/
|
|
1365
|
+
declare function createTaxonomy(input: CreateTaxonomyInput): Promise<TaxonomyDef>;
|
|
1366
|
+
/**
|
|
1367
|
+
* Fetch terms for a taxonomy
|
|
1368
|
+
*/
|
|
1369
|
+
declare function fetchTerms(taxonomyName: string): Promise<TaxonomyTerm[]>;
|
|
1370
|
+
/**
|
|
1371
|
+
* Create a term
|
|
1372
|
+
*/
|
|
1373
|
+
declare function createTerm(taxonomyName: string, input: CreateTermInput): Promise<TaxonomyTerm>;
|
|
1374
|
+
/**
|
|
1375
|
+
* Update a term
|
|
1376
|
+
*/
|
|
1377
|
+
declare function updateTerm(taxonomyName: string, slug: string, input: UpdateTermInput): Promise<TaxonomyTerm>;
|
|
1378
|
+
/**
|
|
1379
|
+
* Delete a term
|
|
1380
|
+
*/
|
|
1381
|
+
declare function deleteTerm(taxonomyName: string, slug: string): Promise<void>;
|
|
1382
|
+
//#endregion
|
|
1383
|
+
//#region src/lib/api/import.d.ts
|
|
1384
|
+
/**
|
|
1385
|
+
* WordPress import and source probing APIs
|
|
1386
|
+
*/
|
|
1387
|
+
/** Field compatibility status */
|
|
1388
|
+
type FieldCompatibility = "compatible" | "type_mismatch" | "missing";
|
|
1389
|
+
/** Single field definition for import */
|
|
1390
|
+
interface ImportFieldDef {
|
|
1391
|
+
slug: string;
|
|
1392
|
+
label: string;
|
|
1393
|
+
type: string;
|
|
1394
|
+
required: boolean;
|
|
1395
|
+
}
|
|
1396
|
+
/** Schema status for a collection */
|
|
1397
|
+
interface CollectionSchemaStatus {
|
|
1398
|
+
exists: boolean;
|
|
1399
|
+
fieldStatus: Record<string, {
|
|
1400
|
+
status: FieldCompatibility;
|
|
1401
|
+
existingType?: string;
|
|
1402
|
+
requiredType: string;
|
|
1403
|
+
}>;
|
|
1404
|
+
canImport: boolean;
|
|
1405
|
+
reason?: string;
|
|
1406
|
+
}
|
|
1407
|
+
/** Post type with full schema info */
|
|
1408
|
+
interface PostTypeAnalysis {
|
|
1409
|
+
name: string;
|
|
1410
|
+
count: number;
|
|
1411
|
+
suggestedCollection: string;
|
|
1412
|
+
requiredFields: ImportFieldDef[];
|
|
1413
|
+
schemaStatus: CollectionSchemaStatus;
|
|
1414
|
+
}
|
|
1415
|
+
/** Individual attachment info for media import */
|
|
1416
|
+
interface AttachmentInfo {
|
|
1417
|
+
id?: number;
|
|
1418
|
+
title?: string;
|
|
1419
|
+
url?: string;
|
|
1420
|
+
filename?: string;
|
|
1421
|
+
mimeType?: string;
|
|
1422
|
+
}
|
|
1423
|
+
/** Navigation menu from WordPress */
|
|
1424
|
+
interface NavMenu {
|
|
1425
|
+
name: string;
|
|
1426
|
+
slug: string;
|
|
1427
|
+
count: number;
|
|
1428
|
+
}
|
|
1429
|
+
/** Custom taxonomy from WordPress */
|
|
1430
|
+
interface CustomTaxonomy {
|
|
1431
|
+
name: string;
|
|
1432
|
+
slug: string;
|
|
1433
|
+
count: number;
|
|
1434
|
+
hierarchical: boolean;
|
|
1435
|
+
}
|
|
1436
|
+
/** Author info from WordPress */
|
|
1437
|
+
interface WpAuthorInfo {
|
|
1438
|
+
id?: number;
|
|
1439
|
+
login?: string;
|
|
1440
|
+
email?: string;
|
|
1441
|
+
displayName?: string;
|
|
1442
|
+
postCount: number;
|
|
1443
|
+
}
|
|
1444
|
+
interface WxrAnalysis {
|
|
1445
|
+
site: {
|
|
1446
|
+
title: string;
|
|
1447
|
+
url: string;
|
|
1448
|
+
};
|
|
1449
|
+
postTypes: PostTypeAnalysis[];
|
|
1450
|
+
attachments: {
|
|
1451
|
+
count: number;
|
|
1452
|
+
items: AttachmentInfo[];
|
|
1453
|
+
};
|
|
1454
|
+
categories: number;
|
|
1455
|
+
tags: number;
|
|
1456
|
+
authors: WpAuthorInfo[];
|
|
1457
|
+
customFields: Array<{
|
|
1458
|
+
key: string;
|
|
1459
|
+
count: number;
|
|
1460
|
+
samples: string[];
|
|
1461
|
+
suggestedField: string;
|
|
1462
|
+
suggestedType: string;
|
|
1463
|
+
isInternal: boolean;
|
|
1464
|
+
}>;
|
|
1465
|
+
/** Navigation menus found in the export */
|
|
1466
|
+
navMenus?: NavMenu[];
|
|
1467
|
+
/** Custom taxonomies found in the export */
|
|
1468
|
+
customTaxonomies?: CustomTaxonomy[];
|
|
1469
|
+
}
|
|
1470
|
+
interface PrepareRequest {
|
|
1471
|
+
postTypes: Array<{
|
|
1472
|
+
name: string;
|
|
1473
|
+
collection: string;
|
|
1474
|
+
fields: ImportFieldDef[];
|
|
1475
|
+
}>;
|
|
1476
|
+
}
|
|
1477
|
+
interface PrepareResult {
|
|
1478
|
+
success: boolean;
|
|
1479
|
+
collectionsCreated: string[];
|
|
1480
|
+
fieldsCreated: Array<{
|
|
1481
|
+
collection: string;
|
|
1482
|
+
field: string;
|
|
1483
|
+
}>;
|
|
1484
|
+
errors: Array<{
|
|
1485
|
+
collection: string;
|
|
1486
|
+
error: string;
|
|
1487
|
+
}>;
|
|
1488
|
+
}
|
|
1489
|
+
/** Author mapping from WP author login to EmDash user ID */
|
|
1490
|
+
interface AuthorMapping {
|
|
1491
|
+
/** WordPress author login */
|
|
1492
|
+
wpLogin: string;
|
|
1493
|
+
/** WordPress author display name (for UI) */
|
|
1494
|
+
wpDisplayName: string;
|
|
1495
|
+
/** WordPress author email (for matching) */
|
|
1496
|
+
wpEmail?: string;
|
|
1497
|
+
/** EmDash user ID to assign (null = leave unassigned) */
|
|
1498
|
+
emdashUserId: string | null;
|
|
1499
|
+
/** Number of posts by this author */
|
|
1500
|
+
postCount: number;
|
|
1501
|
+
}
|
|
1502
|
+
interface ImportConfig {
|
|
1503
|
+
postTypeMappings: Record<string, {
|
|
1504
|
+
collection: string;
|
|
1505
|
+
enabled: boolean;
|
|
1506
|
+
}>;
|
|
1507
|
+
skipExisting: boolean;
|
|
1508
|
+
/** Author mappings (WP author login -> EmDash user ID) */
|
|
1509
|
+
authorMappings?: Record<string, string | null>;
|
|
1510
|
+
}
|
|
1511
|
+
interface ImportResult {
|
|
1512
|
+
success: boolean;
|
|
1513
|
+
imported: number;
|
|
1514
|
+
skipped: number;
|
|
1515
|
+
errors: Array<{
|
|
1516
|
+
title: string;
|
|
1517
|
+
error: string;
|
|
1518
|
+
}>;
|
|
1519
|
+
byCollection: Record<string, number>;
|
|
1520
|
+
}
|
|
1521
|
+
/**
|
|
1522
|
+
* Analyze a WordPress WXR file
|
|
1523
|
+
*/
|
|
1524
|
+
declare function analyzeWxr(file: File): Promise<WxrAnalysis>;
|
|
1525
|
+
/**
|
|
1526
|
+
* Prepare WordPress import (create collections/fields)
|
|
1527
|
+
*/
|
|
1528
|
+
declare function prepareWxrImport(request: PrepareRequest): Promise<PrepareResult>;
|
|
1529
|
+
/**
|
|
1530
|
+
* Execute WordPress import
|
|
1531
|
+
*/
|
|
1532
|
+
declare function executeWxrImport(file: File, config: ImportConfig): Promise<ImportResult>;
|
|
1533
|
+
interface MediaImportResult {
|
|
1534
|
+
imported: Array<{
|
|
1535
|
+
wpId?: number;
|
|
1536
|
+
originalUrl: string;
|
|
1537
|
+
newUrl: string;
|
|
1538
|
+
mediaId: string;
|
|
1539
|
+
}>;
|
|
1540
|
+
failed: Array<{
|
|
1541
|
+
wpId?: number;
|
|
1542
|
+
originalUrl: string;
|
|
1543
|
+
error: string;
|
|
1544
|
+
}>;
|
|
1545
|
+
urlMap: Record<string, string>;
|
|
1546
|
+
}
|
|
1547
|
+
/** Progress update sent during streaming media import */
|
|
1548
|
+
interface MediaImportProgress {
|
|
1549
|
+
type: "progress";
|
|
1550
|
+
current: number;
|
|
1551
|
+
total: number;
|
|
1552
|
+
filename?: string;
|
|
1553
|
+
status: "downloading" | "uploading" | "done" | "skipped" | "failed";
|
|
1554
|
+
error?: string;
|
|
1555
|
+
}
|
|
1556
|
+
interface RewriteUrlsResult {
|
|
1557
|
+
updated: number;
|
|
1558
|
+
byCollection: Record<string, number>;
|
|
1559
|
+
urlsRewritten: number;
|
|
1560
|
+
errors: Array<{
|
|
1561
|
+
collection: string;
|
|
1562
|
+
id: string;
|
|
1563
|
+
error: string;
|
|
1564
|
+
}>;
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* Import media from WordPress with streaming progress
|
|
1568
|
+
*
|
|
1569
|
+
* @param attachments - Array of attachments to import
|
|
1570
|
+
* @param onProgress - Callback for progress updates (optional)
|
|
1571
|
+
* @returns Final import result
|
|
1572
|
+
*/
|
|
1573
|
+
declare function importWxrMedia(attachments: AttachmentInfo[], onProgress?: (progress: MediaImportProgress) => void): Promise<MediaImportResult>;
|
|
1574
|
+
/** Capabilities of an import source */
|
|
1575
|
+
interface SourceCapabilities {
|
|
1576
|
+
publicContent: boolean;
|
|
1577
|
+
privateContent: boolean;
|
|
1578
|
+
customPostTypes: boolean;
|
|
1579
|
+
allMeta: boolean;
|
|
1580
|
+
mediaStream: boolean;
|
|
1581
|
+
}
|
|
1582
|
+
/** Auth requirements for import */
|
|
1583
|
+
interface SourceAuth {
|
|
1584
|
+
type: "oauth" | "token" | "password" | "none";
|
|
1585
|
+
provider?: string;
|
|
1586
|
+
oauthUrl?: string;
|
|
1587
|
+
instructions?: string;
|
|
1588
|
+
}
|
|
1589
|
+
/** Suggested action after probing */
|
|
1590
|
+
type SuggestedAction = {
|
|
1591
|
+
type: "proceed";
|
|
1592
|
+
} | {
|
|
1593
|
+
type: "oauth";
|
|
1594
|
+
url: string;
|
|
1595
|
+
provider: string;
|
|
1596
|
+
} | {
|
|
1597
|
+
type: "upload";
|
|
1598
|
+
instructions: string;
|
|
1599
|
+
} | {
|
|
1600
|
+
type: "install-plugin";
|
|
1601
|
+
instructions: string;
|
|
1602
|
+
};
|
|
1603
|
+
/** Result from probing a single source */
|
|
1604
|
+
interface SourceProbeResult {
|
|
1605
|
+
sourceId: string;
|
|
1606
|
+
confidence: "definite" | "likely" | "possible";
|
|
1607
|
+
detected: {
|
|
1608
|
+
platform: string;
|
|
1609
|
+
version?: string;
|
|
1610
|
+
siteTitle?: string;
|
|
1611
|
+
siteUrl?: string;
|
|
1612
|
+
};
|
|
1613
|
+
capabilities: SourceCapabilities;
|
|
1614
|
+
auth?: SourceAuth;
|
|
1615
|
+
suggestedAction: SuggestedAction;
|
|
1616
|
+
preview?: {
|
|
1617
|
+
posts?: number;
|
|
1618
|
+
pages?: number;
|
|
1619
|
+
media?: number;
|
|
1620
|
+
};
|
|
1621
|
+
}
|
|
1622
|
+
/** Combined probe result */
|
|
1623
|
+
interface ProbeResult {
|
|
1624
|
+
url: string;
|
|
1625
|
+
isWordPress: boolean;
|
|
1626
|
+
bestMatch: SourceProbeResult | null;
|
|
1627
|
+
allMatches: SourceProbeResult[];
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
* Probe a URL to detect import source
|
|
1631
|
+
*/
|
|
1632
|
+
declare function probeImportUrl(url: string): Promise<ProbeResult>;
|
|
1633
|
+
/**
|
|
1634
|
+
* Rewrite URLs in content after media import
|
|
1635
|
+
*/
|
|
1636
|
+
declare function rewriteContentUrls(urlMap: Record<string, string>, collections?: string[]): Promise<RewriteUrlsResult>;
|
|
1637
|
+
/** WordPress Plugin analysis result */
|
|
1638
|
+
interface WpPluginAnalysis {
|
|
1639
|
+
sourceId: string;
|
|
1640
|
+
site: {
|
|
1641
|
+
title: string;
|
|
1642
|
+
url: string;
|
|
1643
|
+
};
|
|
1644
|
+
postTypes: PostTypeAnalysis[];
|
|
1645
|
+
attachments: {
|
|
1646
|
+
count: number;
|
|
1647
|
+
items: AttachmentInfo[];
|
|
1648
|
+
};
|
|
1649
|
+
categories: number;
|
|
1650
|
+
tags: number;
|
|
1651
|
+
authors: WpAuthorInfo[];
|
|
1652
|
+
/** Navigation menus found via the plugin */
|
|
1653
|
+
navMenus?: NavMenu[];
|
|
1654
|
+
/** Custom taxonomies found via the plugin */
|
|
1655
|
+
customTaxonomies?: CustomTaxonomy[];
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Analyze a WordPress site with EmDash Exporter plugin
|
|
1659
|
+
*/
|
|
1660
|
+
declare function analyzeWpPluginSite(url: string, token: string): Promise<WpPluginAnalysis>;
|
|
1661
|
+
/**
|
|
1662
|
+
* Execute import from WordPress plugin API
|
|
1663
|
+
*/
|
|
1664
|
+
declare function executeWpPluginImport(url: string, token: string, config: ImportConfig): Promise<ImportResult>;
|
|
1665
|
+
//#endregion
|
|
1666
|
+
//#region src/lib/api/api-tokens.d.ts
|
|
1667
|
+
/**
|
|
1668
|
+
* API token management client functions
|
|
1669
|
+
*/
|
|
1670
|
+
/** API token info returned from the server */
|
|
1671
|
+
interface ApiTokenInfo {
|
|
1672
|
+
id: string;
|
|
1673
|
+
name: string;
|
|
1674
|
+
prefix: string;
|
|
1675
|
+
scopes: string[];
|
|
1676
|
+
userId: string;
|
|
1677
|
+
expiresAt: string | null;
|
|
1678
|
+
lastUsedAt: string | null;
|
|
1679
|
+
createdAt: string;
|
|
1680
|
+
}
|
|
1681
|
+
/** Result from creating a new token */
|
|
1682
|
+
interface ApiTokenCreateResult {
|
|
1683
|
+
/** Raw token — shown once, never stored */
|
|
1684
|
+
token: string;
|
|
1685
|
+
/** Token metadata */
|
|
1686
|
+
info: ApiTokenInfo;
|
|
1687
|
+
}
|
|
1688
|
+
/** Input for creating a new token */
|
|
1689
|
+
interface CreateApiTokenInput {
|
|
1690
|
+
name: string;
|
|
1691
|
+
scopes: string[];
|
|
1692
|
+
expiresAt?: string;
|
|
1693
|
+
}
|
|
1694
|
+
/** Available scopes for API tokens */
|
|
1695
|
+
declare const API_TOKEN_SCOPES: readonly [{
|
|
1696
|
+
readonly value: "content:read";
|
|
1697
|
+
readonly label: "Content Read";
|
|
1698
|
+
readonly description: "Read content entries";
|
|
1699
|
+
}, {
|
|
1700
|
+
readonly value: "content:write";
|
|
1701
|
+
readonly label: "Content Write";
|
|
1702
|
+
readonly description: "Create, update, delete content";
|
|
1703
|
+
}, {
|
|
1704
|
+
readonly value: "media:read";
|
|
1705
|
+
readonly label: "Media Read";
|
|
1706
|
+
readonly description: "Read media files";
|
|
1707
|
+
}, {
|
|
1708
|
+
readonly value: "media:write";
|
|
1709
|
+
readonly label: "Media Write";
|
|
1710
|
+
readonly description: "Upload and delete media";
|
|
1711
|
+
}, {
|
|
1712
|
+
readonly value: "schema:read";
|
|
1713
|
+
readonly label: "Schema Read";
|
|
1714
|
+
readonly description: "Read collection schemas";
|
|
1715
|
+
}, {
|
|
1716
|
+
readonly value: "schema:write";
|
|
1717
|
+
readonly label: "Schema Write";
|
|
1718
|
+
readonly description: "Modify collection schemas";
|
|
1719
|
+
}, {
|
|
1720
|
+
readonly value: "admin";
|
|
1721
|
+
readonly label: "Admin";
|
|
1722
|
+
readonly description: "Full admin access";
|
|
1723
|
+
}];
|
|
1724
|
+
/**
|
|
1725
|
+
* Fetch all API tokens for the current user
|
|
1726
|
+
*/
|
|
1727
|
+
declare function fetchApiTokens(): Promise<ApiTokenInfo[]>;
|
|
1728
|
+
/**
|
|
1729
|
+
* Create a new API token
|
|
1730
|
+
*/
|
|
1731
|
+
declare function createApiToken(input: CreateApiTokenInput): Promise<ApiTokenCreateResult>;
|
|
1732
|
+
/**
|
|
1733
|
+
* Revoke (delete) an API token
|
|
1734
|
+
*/
|
|
1735
|
+
declare function revokeApiToken(id: string): Promise<void>;
|
|
1736
|
+
//#endregion
|
|
1737
|
+
//#region src/lib/api/comments.d.ts
|
|
1738
|
+
type CommentStatus = "pending" | "approved" | "spam" | "trash";
|
|
1739
|
+
interface AdminComment {
|
|
1740
|
+
id: string;
|
|
1741
|
+
collection: string;
|
|
1742
|
+
contentId: string;
|
|
1743
|
+
parentId: string | null;
|
|
1744
|
+
authorName: string;
|
|
1745
|
+
authorEmail: string;
|
|
1746
|
+
authorUserId: string | null;
|
|
1747
|
+
body: string;
|
|
1748
|
+
status: CommentStatus;
|
|
1749
|
+
ipHash: string | null;
|
|
1750
|
+
userAgent: string | null;
|
|
1751
|
+
moderationMetadata: Record<string, unknown> | null;
|
|
1752
|
+
createdAt: string;
|
|
1753
|
+
updatedAt: string;
|
|
1754
|
+
}
|
|
1755
|
+
type CommentCounts = Record<CommentStatus, number>;
|
|
1756
|
+
type BulkAction = "approve" | "spam" | "trash" | "delete";
|
|
1757
|
+
/**
|
|
1758
|
+
* Fetch comments for the moderation inbox
|
|
1759
|
+
*/
|
|
1760
|
+
declare function fetchComments(options?: {
|
|
1761
|
+
status?: CommentStatus;
|
|
1762
|
+
collection?: string;
|
|
1763
|
+
search?: string;
|
|
1764
|
+
limit?: number;
|
|
1765
|
+
cursor?: string;
|
|
1766
|
+
}): Promise<FindManyResult<AdminComment>>;
|
|
1767
|
+
/**
|
|
1768
|
+
* Fetch comment status counts for inbox badges
|
|
1769
|
+
*/
|
|
1770
|
+
declare function fetchCommentCounts(): Promise<CommentCounts>;
|
|
1771
|
+
/**
|
|
1772
|
+
* Fetch a single comment by ID
|
|
1773
|
+
*/
|
|
1774
|
+
declare function fetchComment(id: string): Promise<AdminComment>;
|
|
1775
|
+
/**
|
|
1776
|
+
* Update a comment's status
|
|
1777
|
+
*/
|
|
1778
|
+
declare function updateCommentStatus(id: string, status: CommentStatus): Promise<AdminComment>;
|
|
1779
|
+
/**
|
|
1780
|
+
* Hard delete a comment (ADMIN only)
|
|
1781
|
+
*/
|
|
1782
|
+
declare function deleteComment(id: string): Promise<void>;
|
|
1783
|
+
/**
|
|
1784
|
+
* Bulk status change or delete
|
|
1785
|
+
*/
|
|
1786
|
+
declare function bulkCommentAction(ids: string[], action: BulkAction): Promise<{
|
|
1787
|
+
affected: number;
|
|
1788
|
+
}>;
|
|
1789
|
+
//#endregion
|
|
1790
|
+
//#region src/lib/api/dashboard.d.ts
|
|
1791
|
+
/**
|
|
1792
|
+
* Dashboard stats API
|
|
1793
|
+
*/
|
|
1794
|
+
interface CollectionStats {
|
|
1795
|
+
slug: string;
|
|
1796
|
+
label: string;
|
|
1797
|
+
total: number;
|
|
1798
|
+
published: number;
|
|
1799
|
+
draft: number;
|
|
1800
|
+
}
|
|
1801
|
+
interface RecentItem {
|
|
1802
|
+
id: string;
|
|
1803
|
+
collection: string;
|
|
1804
|
+
collectionLabel: string;
|
|
1805
|
+
title: string;
|
|
1806
|
+
slug: string | null;
|
|
1807
|
+
status: string;
|
|
1808
|
+
updatedAt: string;
|
|
1809
|
+
authorId: string | null;
|
|
1810
|
+
}
|
|
1811
|
+
interface DashboardStats {
|
|
1812
|
+
collections: CollectionStats[];
|
|
1813
|
+
mediaCount: number;
|
|
1814
|
+
userCount: number;
|
|
1815
|
+
recentItems: RecentItem[];
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* Fetch dashboard statistics
|
|
1819
|
+
*/
|
|
1820
|
+
declare function fetchDashboardStats(): Promise<DashboardStats>;
|
|
1821
|
+
//#endregion
|
|
1822
|
+
//#region src/lib/api/search.d.ts
|
|
1823
|
+
/**
|
|
1824
|
+
* Search enable/disable APIs
|
|
1825
|
+
*/
|
|
1826
|
+
interface SearchEnableResult {
|
|
1827
|
+
success: boolean;
|
|
1828
|
+
collection: string;
|
|
1829
|
+
enabled: boolean;
|
|
1830
|
+
indexed?: number;
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1833
|
+
* Enable or disable search for a collection
|
|
1834
|
+
*/
|
|
1835
|
+
declare function setSearchEnabled(collection: string, enabled: boolean, weights?: Record<string, number>): Promise<SearchEnableResult>;
|
|
1836
|
+
//#endregion
|
|
1837
|
+
//#region src/lib/api/marketplace.d.ts
|
|
1838
|
+
/**
|
|
1839
|
+
* Marketplace API client
|
|
1840
|
+
*
|
|
1841
|
+
* Calls the site-side proxy endpoints (/_emdash/api/admin/plugins/marketplace/*)
|
|
1842
|
+
* which forward to the marketplace Worker. This avoids CORS issues since the
|
|
1843
|
+
* admin UI doesn't need to know the marketplace URL.
|
|
1844
|
+
*/
|
|
1845
|
+
interface MarketplaceAuthor {
|
|
1846
|
+
name: string;
|
|
1847
|
+
verified: boolean;
|
|
1848
|
+
}
|
|
1849
|
+
interface MarketplaceAuditSummary {
|
|
1850
|
+
verdict: "pass" | "warn" | "fail";
|
|
1851
|
+
riskScore: number;
|
|
1852
|
+
}
|
|
1853
|
+
interface MarketplaceImageAuditSummary {
|
|
1854
|
+
verdict: "pass" | "warn" | "fail";
|
|
1855
|
+
}
|
|
1856
|
+
interface MarketplaceVersion {
|
|
1857
|
+
version: string;
|
|
1858
|
+
minEmDashVersion?: string;
|
|
1859
|
+
bundleSize: number;
|
|
1860
|
+
changelog?: string;
|
|
1861
|
+
readme?: string;
|
|
1862
|
+
screenshotUrls?: string[];
|
|
1863
|
+
audit?: MarketplaceAuditSummary;
|
|
1864
|
+
imageAudit?: MarketplaceImageAuditSummary;
|
|
1865
|
+
publishedAt: string;
|
|
1866
|
+
}
|
|
1867
|
+
/** Summary shown in browse cards */
|
|
1868
|
+
interface MarketplacePluginSummary {
|
|
1869
|
+
id: string;
|
|
1870
|
+
name: string;
|
|
1871
|
+
description?: string;
|
|
1872
|
+
author: MarketplaceAuthor;
|
|
1873
|
+
capabilities: string[];
|
|
1874
|
+
keywords?: string[];
|
|
1875
|
+
installCount: number;
|
|
1876
|
+
iconUrl?: string;
|
|
1877
|
+
latestVersion?: {
|
|
1878
|
+
version: string;
|
|
1879
|
+
audit?: MarketplaceAuditSummary;
|
|
1880
|
+
imageAudit?: MarketplaceImageAuditSummary;
|
|
1881
|
+
};
|
|
1882
|
+
createdAt: string;
|
|
1883
|
+
updatedAt: string;
|
|
1884
|
+
}
|
|
1885
|
+
/** Full detail returned by GET /plugins/:id */
|
|
1886
|
+
interface MarketplacePluginDetail extends MarketplacePluginSummary {
|
|
1887
|
+
license?: string;
|
|
1888
|
+
repositoryUrl?: string;
|
|
1889
|
+
homepageUrl?: string;
|
|
1890
|
+
latestVersion?: MarketplaceVersion;
|
|
1891
|
+
}
|
|
1892
|
+
interface MarketplaceSearchResult {
|
|
1893
|
+
items: MarketplacePluginSummary[];
|
|
1894
|
+
nextCursor?: string;
|
|
1895
|
+
}
|
|
1896
|
+
interface MarketplaceSearchOpts {
|
|
1897
|
+
q?: string;
|
|
1898
|
+
capability?: string;
|
|
1899
|
+
sort?: "installs" | "updated" | "created" | "name";
|
|
1900
|
+
cursor?: string;
|
|
1901
|
+
limit?: number;
|
|
1902
|
+
}
|
|
1903
|
+
/** Update check result per plugin */
|
|
1904
|
+
interface PluginUpdateInfo {
|
|
1905
|
+
pluginId: string;
|
|
1906
|
+
installed: string;
|
|
1907
|
+
latest: string;
|
|
1908
|
+
hasCapabilityChanges: boolean;
|
|
1909
|
+
}
|
|
1910
|
+
/** Install request body */
|
|
1911
|
+
interface InstallPluginOpts {
|
|
1912
|
+
version?: string;
|
|
1913
|
+
}
|
|
1914
|
+
/** Update request body */
|
|
1915
|
+
interface UpdatePluginOpts {
|
|
1916
|
+
/** User has confirmed new capabilities */
|
|
1917
|
+
confirmCapabilities?: boolean;
|
|
1918
|
+
}
|
|
1919
|
+
/** Uninstall request body */
|
|
1920
|
+
interface UninstallPluginOpts {
|
|
1921
|
+
/** Delete plugin storage data */
|
|
1922
|
+
deleteData?: boolean;
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* Search the marketplace catalog.
|
|
1926
|
+
* Proxied through /_emdash/api/admin/plugins/marketplace
|
|
1927
|
+
*/
|
|
1928
|
+
declare function searchMarketplace(opts?: MarketplaceSearchOpts): Promise<MarketplaceSearchResult>;
|
|
1929
|
+
/**
|
|
1930
|
+
* Get full plugin detail.
|
|
1931
|
+
* Proxied through /_emdash/api/admin/plugins/marketplace/:id
|
|
1932
|
+
*/
|
|
1933
|
+
declare function fetchMarketplacePlugin(id: string): Promise<MarketplacePluginDetail>;
|
|
1934
|
+
/**
|
|
1935
|
+
* Install a plugin from the marketplace.
|
|
1936
|
+
* POST /_emdash/api/admin/plugins/marketplace/:id/install
|
|
1937
|
+
*/
|
|
1938
|
+
declare function installMarketplacePlugin(id: string, opts?: InstallPluginOpts): Promise<void>;
|
|
1939
|
+
/**
|
|
1940
|
+
* Update a marketplace plugin to a newer version.
|
|
1941
|
+
* POST /_emdash/api/admin/plugins/:id/update
|
|
1942
|
+
*/
|
|
1943
|
+
declare function updateMarketplacePlugin(id: string, opts?: UpdatePluginOpts): Promise<void>;
|
|
1944
|
+
/**
|
|
1945
|
+
* Uninstall a marketplace plugin.
|
|
1946
|
+
* POST /_emdash/api/admin/plugins/:id/uninstall
|
|
1947
|
+
*/
|
|
1948
|
+
declare function uninstallMarketplacePlugin(id: string, opts?: UninstallPluginOpts): Promise<void>;
|
|
1949
|
+
/**
|
|
1950
|
+
* Check all marketplace plugins for available updates.
|
|
1951
|
+
* GET /_emdash/api/admin/plugins/updates
|
|
1952
|
+
*/
|
|
1953
|
+
declare function checkPluginUpdates(): Promise<PluginUpdateInfo[]>;
|
|
1954
|
+
/** Human-readable labels for plugin capabilities */
|
|
1955
|
+
declare const CAPABILITY_LABELS: Record<string, string>;
|
|
1956
|
+
/**
|
|
1957
|
+
* Get a human-readable description for a capability.
|
|
1958
|
+
* For network:fetch, appends the allowed hosts if provided.
|
|
1959
|
+
*/
|
|
1960
|
+
declare function describeCapability(capability: string, allowedHosts?: string[]): string;
|
|
1961
|
+
//#endregion
|
|
1962
|
+
//#region src/lib/api/email-settings.d.ts
|
|
1963
|
+
/**
|
|
1964
|
+
* Email settings API client functions
|
|
1965
|
+
*/
|
|
1966
|
+
interface EmailProvider {
|
|
1967
|
+
pluginId: string;
|
|
1968
|
+
}
|
|
1969
|
+
interface EmailSettings {
|
|
1970
|
+
available: boolean;
|
|
1971
|
+
providers: EmailProvider[];
|
|
1972
|
+
selectedProviderId: string | null;
|
|
1973
|
+
middleware: {
|
|
1974
|
+
beforeSend: string[];
|
|
1975
|
+
afterSend: string[];
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
declare function fetchEmailSettings(): Promise<EmailSettings>;
|
|
1979
|
+
declare function sendTestEmail(to: string): Promise<{
|
|
1980
|
+
success: boolean;
|
|
1981
|
+
message: string;
|
|
1982
|
+
}>;
|
|
1983
|
+
//#endregion
|
|
1984
|
+
//#region src/lib/api/theme-marketplace.d.ts
|
|
1985
|
+
/**
|
|
1986
|
+
* Theme Marketplace API client
|
|
1987
|
+
*
|
|
1988
|
+
* Calls the site-side proxy endpoints (/_emdash/api/admin/themes/marketplace/*)
|
|
1989
|
+
* which forward to the marketplace Worker. The preview signing endpoint
|
|
1990
|
+
* is local (/_emdash/api/themes/preview).
|
|
1991
|
+
*/
|
|
1992
|
+
interface ThemeAuthor {
|
|
1993
|
+
name: string;
|
|
1994
|
+
verified: boolean;
|
|
1995
|
+
avatarUrl: string | null;
|
|
1996
|
+
}
|
|
1997
|
+
interface ThemeAuthorDetail extends ThemeAuthor {
|
|
1998
|
+
id: string;
|
|
1999
|
+
}
|
|
2000
|
+
/** Summary shown in browse cards */
|
|
2001
|
+
interface ThemeSummary {
|
|
2002
|
+
id: string;
|
|
2003
|
+
name: string;
|
|
2004
|
+
description: string | null;
|
|
2005
|
+
author: ThemeAuthor;
|
|
2006
|
+
keywords: string[];
|
|
2007
|
+
previewUrl: string;
|
|
2008
|
+
demoUrl: string | null;
|
|
2009
|
+
hasThumbnail: boolean;
|
|
2010
|
+
thumbnailUrl: string | null;
|
|
2011
|
+
createdAt: string;
|
|
2012
|
+
updatedAt: string;
|
|
2013
|
+
}
|
|
2014
|
+
/** Full detail returned by GET /themes/:id */
|
|
2015
|
+
interface ThemeDetail extends Omit<ThemeSummary, "author"> {
|
|
2016
|
+
author: ThemeAuthorDetail;
|
|
2017
|
+
repositoryUrl: string | null;
|
|
2018
|
+
homepageUrl: string | null;
|
|
2019
|
+
license: string | null;
|
|
2020
|
+
screenshotCount: number;
|
|
2021
|
+
screenshotUrls: string[];
|
|
2022
|
+
}
|
|
2023
|
+
interface ThemeSearchResult {
|
|
2024
|
+
items: ThemeSummary[];
|
|
2025
|
+
nextCursor?: string;
|
|
2026
|
+
}
|
|
2027
|
+
interface ThemeSearchOpts {
|
|
2028
|
+
q?: string;
|
|
2029
|
+
keyword?: string;
|
|
2030
|
+
sort?: "name" | "created" | "updated";
|
|
2031
|
+
cursor?: string;
|
|
2032
|
+
limit?: number;
|
|
2033
|
+
}
|
|
2034
|
+
/**
|
|
2035
|
+
* Search theme listings.
|
|
2036
|
+
* Proxied through /_emdash/api/admin/themes/marketplace
|
|
2037
|
+
*/
|
|
2038
|
+
declare function searchThemes(opts?: ThemeSearchOpts): Promise<ThemeSearchResult>;
|
|
2039
|
+
/**
|
|
2040
|
+
* Get full theme detail.
|
|
2041
|
+
* Proxied through /_emdash/api/admin/themes/marketplace/:id
|
|
2042
|
+
*/
|
|
2043
|
+
declare function fetchTheme(id: string): Promise<ThemeDetail>;
|
|
2044
|
+
/**
|
|
2045
|
+
* Generate a signed preview URL for the "Try with my data" flow.
|
|
2046
|
+
* POST /_emdash/api/themes/preview (local, not proxied)
|
|
2047
|
+
*/
|
|
2048
|
+
declare function generatePreviewUrl(previewUrl: string): Promise<string>;
|
|
2049
|
+
//#endregion
|
|
2050
|
+
//#region src/lib/api/redirects.d.ts
|
|
2051
|
+
/**
|
|
2052
|
+
* Redirects API client
|
|
2053
|
+
*/
|
|
2054
|
+
interface Redirect {
|
|
2055
|
+
id: string;
|
|
2056
|
+
source: string;
|
|
2057
|
+
destination: string;
|
|
2058
|
+
type: number;
|
|
2059
|
+
isPattern: boolean;
|
|
2060
|
+
enabled: boolean;
|
|
2061
|
+
hits: number;
|
|
2062
|
+
lastHitAt: string | null;
|
|
2063
|
+
groupName: string | null;
|
|
2064
|
+
auto: boolean;
|
|
2065
|
+
createdAt: string;
|
|
2066
|
+
updatedAt: string;
|
|
2067
|
+
}
|
|
2068
|
+
interface NotFoundSummary {
|
|
2069
|
+
path: string;
|
|
2070
|
+
count: number;
|
|
2071
|
+
lastSeen: string;
|
|
2072
|
+
topReferrer: string | null;
|
|
2073
|
+
}
|
|
2074
|
+
interface CreateRedirectInput {
|
|
2075
|
+
source: string;
|
|
2076
|
+
destination: string;
|
|
2077
|
+
type?: number;
|
|
2078
|
+
enabled?: boolean;
|
|
2079
|
+
groupName?: string | null;
|
|
2080
|
+
}
|
|
2081
|
+
interface UpdateRedirectInput {
|
|
2082
|
+
source?: string;
|
|
2083
|
+
destination?: string;
|
|
2084
|
+
type?: number;
|
|
2085
|
+
enabled?: boolean;
|
|
2086
|
+
groupName?: string | null;
|
|
2087
|
+
}
|
|
2088
|
+
interface RedirectListOptions {
|
|
2089
|
+
cursor?: string;
|
|
2090
|
+
limit?: number;
|
|
2091
|
+
search?: string;
|
|
2092
|
+
group?: string;
|
|
2093
|
+
enabled?: boolean;
|
|
2094
|
+
auto?: boolean;
|
|
2095
|
+
}
|
|
2096
|
+
interface RedirectListResult {
|
|
2097
|
+
items: Redirect[];
|
|
2098
|
+
nextCursor?: string;
|
|
2099
|
+
}
|
|
2100
|
+
/**
|
|
2101
|
+
* List redirects with optional filters
|
|
2102
|
+
*/
|
|
2103
|
+
declare function fetchRedirects(options?: RedirectListOptions): Promise<RedirectListResult>;
|
|
2104
|
+
/**
|
|
2105
|
+
* Create a redirect
|
|
2106
|
+
*/
|
|
2107
|
+
declare function createRedirect(input: CreateRedirectInput): Promise<Redirect>;
|
|
2108
|
+
/**
|
|
2109
|
+
* Update a redirect
|
|
2110
|
+
*/
|
|
2111
|
+
declare function updateRedirect(id: string, input: UpdateRedirectInput): Promise<Redirect>;
|
|
2112
|
+
/**
|
|
2113
|
+
* Delete a redirect
|
|
2114
|
+
*/
|
|
2115
|
+
declare function deleteRedirect(id: string): Promise<void>;
|
|
2116
|
+
/**
|
|
2117
|
+
* Fetch 404 summary (grouped by path, sorted by count)
|
|
2118
|
+
*/
|
|
2119
|
+
declare function fetch404Summary(limit?: number): Promise<NotFoundSummary[]>;
|
|
2120
|
+
//#endregion
|
|
2121
|
+
//#region src/components/Dashboard.d.ts
|
|
2122
|
+
interface DashboardProps {
|
|
2123
|
+
manifest: AdminManifest;
|
|
2124
|
+
}
|
|
2125
|
+
/**
|
|
2126
|
+
* Admin dashboard — quick actions, status, collections, recent activity.
|
|
2127
|
+
*/
|
|
2128
|
+
declare function Dashboard({
|
|
2129
|
+
manifest
|
|
2130
|
+
}: DashboardProps): react_jsx_runtime0.JSX.Element;
|
|
2131
|
+
//#endregion
|
|
2132
|
+
//#region src/components/ContentList.d.ts
|
|
2133
|
+
interface ContentListProps {
|
|
2134
|
+
collection: string;
|
|
2135
|
+
collectionLabel: string;
|
|
2136
|
+
items: ContentItem[];
|
|
2137
|
+
trashedItems?: TrashedContentItem[];
|
|
2138
|
+
isLoading?: boolean;
|
|
2139
|
+
isTrashedLoading?: boolean;
|
|
2140
|
+
onDelete?: (id: string) => void;
|
|
2141
|
+
onDuplicate?: (id: string) => void;
|
|
2142
|
+
onRestore?: (id: string) => void;
|
|
2143
|
+
onPermanentDelete?: (id: string) => void;
|
|
2144
|
+
onLoadMore?: () => void;
|
|
2145
|
+
onLoadMoreTrashed?: () => void;
|
|
2146
|
+
hasMore?: boolean;
|
|
2147
|
+
hasMoreTrashed?: boolean;
|
|
2148
|
+
trashedCount?: number;
|
|
2149
|
+
/** i18n config — present when multiple locales are configured */
|
|
2150
|
+
i18n?: {
|
|
2151
|
+
defaultLocale: string;
|
|
2152
|
+
locales: string[];
|
|
2153
|
+
};
|
|
2154
|
+
/** Currently active locale filter */
|
|
2155
|
+
activeLocale?: string;
|
|
2156
|
+
/** Callback when locale filter changes */
|
|
2157
|
+
onLocaleChange?: (locale: string) => void;
|
|
2158
|
+
}
|
|
2159
|
+
/**
|
|
2160
|
+
* Content list view with table display and trash tab
|
|
2161
|
+
*/
|
|
2162
|
+
declare function ContentList({
|
|
2163
|
+
collection,
|
|
2164
|
+
collectionLabel,
|
|
2165
|
+
items,
|
|
2166
|
+
trashedItems,
|
|
2167
|
+
isLoading,
|
|
2168
|
+
isTrashedLoading,
|
|
2169
|
+
onDelete,
|
|
2170
|
+
onDuplicate,
|
|
2171
|
+
onRestore,
|
|
2172
|
+
onPermanentDelete,
|
|
2173
|
+
onLoadMore,
|
|
2174
|
+
onLoadMoreTrashed,
|
|
2175
|
+
hasMore,
|
|
2176
|
+
hasMoreTrashed,
|
|
2177
|
+
trashedCount,
|
|
2178
|
+
i18n,
|
|
2179
|
+
activeLocale,
|
|
2180
|
+
onLocaleChange
|
|
2181
|
+
}: ContentListProps): react_jsx_runtime0.JSX.Element;
|
|
2182
|
+
//#endregion
|
|
2183
|
+
//#region src/components/editor/PluginBlockNode.d.ts
|
|
2184
|
+
/**
|
|
2185
|
+
* Plugin block definition for slash commands
|
|
2186
|
+
*/
|
|
2187
|
+
interface PluginBlockDef {
|
|
2188
|
+
type: string;
|
|
2189
|
+
pluginId: string;
|
|
2190
|
+
label: string;
|
|
2191
|
+
icon?: string;
|
|
2192
|
+
description?: string;
|
|
2193
|
+
placeholder?: string;
|
|
2194
|
+
/** Block Kit form fields. If declared, replaces the simple URL input. */
|
|
2195
|
+
fields?: Element[];
|
|
2196
|
+
}
|
|
2197
|
+
//#endregion
|
|
2198
|
+
//#region src/components/PortableTextEditor.d.ts
|
|
2199
|
+
interface PortableTextSpan {
|
|
2200
|
+
_type: "span";
|
|
2201
|
+
_key: string;
|
|
2202
|
+
text: string;
|
|
2203
|
+
marks?: string[];
|
|
2204
|
+
}
|
|
2205
|
+
interface PortableTextMarkDef {
|
|
2206
|
+
_type: string;
|
|
2207
|
+
_key: string;
|
|
2208
|
+
[key: string]: unknown;
|
|
2209
|
+
}
|
|
2210
|
+
interface PortableTextTextBlock {
|
|
2211
|
+
_type: "block";
|
|
2212
|
+
_key: string;
|
|
2213
|
+
style?: "normal" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "blockquote";
|
|
2214
|
+
listItem?: "bullet" | "number";
|
|
2215
|
+
level?: number;
|
|
2216
|
+
children: PortableTextSpan[];
|
|
2217
|
+
markDefs?: PortableTextMarkDef[];
|
|
2218
|
+
}
|
|
2219
|
+
interface PortableTextImageBlock {
|
|
2220
|
+
_type: "image";
|
|
2221
|
+
_key: string;
|
|
2222
|
+
asset: {
|
|
2223
|
+
_ref: string;
|
|
2224
|
+
url?: string;
|
|
2225
|
+
};
|
|
2226
|
+
alt?: string;
|
|
2227
|
+
caption?: string;
|
|
2228
|
+
width?: number;
|
|
2229
|
+
height?: number;
|
|
2230
|
+
displayWidth?: number;
|
|
2231
|
+
displayHeight?: number;
|
|
2232
|
+
}
|
|
2233
|
+
interface PortableTextCodeBlock {
|
|
2234
|
+
_type: "code";
|
|
2235
|
+
_key: string;
|
|
2236
|
+
code: string;
|
|
2237
|
+
language?: string;
|
|
2238
|
+
}
|
|
2239
|
+
type PortableTextBlock = PortableTextTextBlock | PortableTextImageBlock | PortableTextCodeBlock | {
|
|
2240
|
+
_type: string;
|
|
2241
|
+
_key: string;
|
|
2242
|
+
[key: string]: unknown;
|
|
2243
|
+
};
|
|
2244
|
+
/** Focus mode state for the editor */
|
|
2245
|
+
type FocusMode = "normal" | "spotlight";
|
|
2246
|
+
/** Describes a block sidebar panel request from a node view */
|
|
2247
|
+
interface BlockSidebarPanel {
|
|
2248
|
+
type: string;
|
|
2249
|
+
attrs: Record<string, unknown>;
|
|
2250
|
+
onUpdate: (attrs: Record<string, unknown>) => void;
|
|
2251
|
+
onReplace: (attrs: Record<string, unknown>) => void;
|
|
2252
|
+
onDelete: () => void;
|
|
2253
|
+
onClose: () => void;
|
|
2254
|
+
}
|
|
2255
|
+
interface PortableTextEditorProps {
|
|
2256
|
+
value?: PortableTextBlock[];
|
|
2257
|
+
onChange?: (value: PortableTextBlock[]) => void;
|
|
2258
|
+
placeholder?: string;
|
|
2259
|
+
className?: string;
|
|
2260
|
+
editable?: boolean;
|
|
2261
|
+
/** ID of label element for accessibility */
|
|
2262
|
+
"aria-labelledby"?: string;
|
|
2263
|
+
/** Plugin blocks available for insertion via slash commands */
|
|
2264
|
+
pluginBlocks?: PluginBlockDef[];
|
|
2265
|
+
/** Focus mode - controlled from parent for distraction-free mode coordination */
|
|
2266
|
+
focusMode?: FocusMode;
|
|
2267
|
+
/** Callback when focus mode changes */
|
|
2268
|
+
onFocusModeChange?: (mode: FocusMode) => void;
|
|
2269
|
+
/** Callback to receive the editor instance for external integrations */
|
|
2270
|
+
onEditorReady?: (editor: Editor) => void;
|
|
2271
|
+
/** Minimal chrome - hides toolbar, border, footer (distraction-free mode) */
|
|
2272
|
+
minimal?: boolean;
|
|
2273
|
+
/** Callback when a block node requests sidebar space (e.g. image settings) */
|
|
2274
|
+
onBlockSidebarOpen?: (panel: BlockSidebarPanel) => void;
|
|
2275
|
+
/** Callback when a block node closes its sidebar */
|
|
2276
|
+
onBlockSidebarClose?: () => void;
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* Portable Text Editor Component
|
|
2280
|
+
*/
|
|
2281
|
+
declare function PortableTextEditor({
|
|
2282
|
+
value,
|
|
2283
|
+
onChange,
|
|
2284
|
+
placeholder,
|
|
2285
|
+
className,
|
|
2286
|
+
editable,
|
|
2287
|
+
"aria-labelledby": ariaLabelledby,
|
|
2288
|
+
pluginBlocks,
|
|
2289
|
+
focusMode: controlledFocusMode,
|
|
2290
|
+
onFocusModeChange,
|
|
2291
|
+
onEditorReady,
|
|
2292
|
+
minimal,
|
|
2293
|
+
onBlockSidebarOpen,
|
|
2294
|
+
onBlockSidebarClose
|
|
2295
|
+
}: PortableTextEditorProps): react_jsx_runtime0.JSX.Element;
|
|
2296
|
+
//#endregion
|
|
2297
|
+
//#region src/components/ContentEditor.d.ts
|
|
2298
|
+
interface FieldDescriptor {
|
|
2299
|
+
kind: string;
|
|
2300
|
+
label?: string;
|
|
2301
|
+
required?: boolean;
|
|
2302
|
+
options?: Array<{
|
|
2303
|
+
value: string;
|
|
2304
|
+
label: string;
|
|
2305
|
+
}>;
|
|
2306
|
+
widget?: string;
|
|
2307
|
+
}
|
|
2308
|
+
/** Simplified user info for current user context */
|
|
2309
|
+
interface CurrentUserInfo {
|
|
2310
|
+
id: string;
|
|
2311
|
+
role: number;
|
|
2312
|
+
}
|
|
2313
|
+
interface ContentEditorProps {
|
|
2314
|
+
collection: string;
|
|
2315
|
+
collectionLabel: string;
|
|
2316
|
+
item?: ContentItem | null;
|
|
2317
|
+
fields: Record<string, FieldDescriptor>;
|
|
2318
|
+
isNew?: boolean;
|
|
2319
|
+
isSaving?: boolean;
|
|
2320
|
+
onSave?: (payload: {
|
|
2321
|
+
data: Record<string, unknown>;
|
|
2322
|
+
slug?: string;
|
|
2323
|
+
bylines?: BylineCreditInput[];
|
|
2324
|
+
}) => void;
|
|
2325
|
+
/** Callback for autosave (debounced, skips revision creation) */
|
|
2326
|
+
onAutosave?: (payload: {
|
|
2327
|
+
data: Record<string, unknown>;
|
|
2328
|
+
slug?: string;
|
|
2329
|
+
bylines?: BylineCreditInput[];
|
|
2330
|
+
}) => void;
|
|
2331
|
+
/** Whether autosave is in progress */
|
|
2332
|
+
isAutosaving?: boolean;
|
|
2333
|
+
/** Last autosave timestamp (for UI indicator) */
|
|
2334
|
+
lastAutosaveAt?: Date | null;
|
|
2335
|
+
onPublish?: () => void;
|
|
2336
|
+
onUnpublish?: () => void;
|
|
2337
|
+
/** Callback to discard draft changes (revert to published version) */
|
|
2338
|
+
onDiscardDraft?: () => void;
|
|
2339
|
+
/** Callback to schedule for future publishing */
|
|
2340
|
+
onSchedule?: (scheduledAt: string) => void;
|
|
2341
|
+
/** Callback to cancel scheduling (revert to draft) */
|
|
2342
|
+
onUnschedule?: () => void;
|
|
2343
|
+
/** Whether scheduling is in progress */
|
|
2344
|
+
isScheduling?: boolean;
|
|
2345
|
+
/** Whether this collection supports drafts */
|
|
2346
|
+
supportsDrafts?: boolean;
|
|
2347
|
+
/** Whether this collection supports revisions */
|
|
2348
|
+
supportsRevisions?: boolean;
|
|
2349
|
+
/** Current user (for permission checks) */
|
|
2350
|
+
currentUser?: CurrentUserInfo;
|
|
2351
|
+
/** Available users for author selection (only shown to editors+) */
|
|
2352
|
+
users?: UserListItem[];
|
|
2353
|
+
/** Callback when author is changed */
|
|
2354
|
+
onAuthorChange?: (authorId: string | null) => void;
|
|
2355
|
+
/** Available byline profiles */
|
|
2356
|
+
availableBylines?: BylineSummary[];
|
|
2357
|
+
/** Selected byline credits (controlled for new entries) */
|
|
2358
|
+
selectedBylines?: BylineCreditInput[];
|
|
2359
|
+
/** Callback when byline credits are changed */
|
|
2360
|
+
onBylinesChange?: (bylines: BylineCreditInput[]) => void;
|
|
2361
|
+
/** Callback for creating a byline inline from the editor */
|
|
2362
|
+
onQuickCreateByline?: (input: {
|
|
2363
|
+
slug: string;
|
|
2364
|
+
displayName: string;
|
|
2365
|
+
}) => Promise<BylineSummary>;
|
|
2366
|
+
/** Callback for updating a byline inline from the editor */
|
|
2367
|
+
onQuickEditByline?: (bylineId: string, input: {
|
|
2368
|
+
slug: string;
|
|
2369
|
+
displayName: string;
|
|
2370
|
+
}) => Promise<BylineSummary>;
|
|
2371
|
+
/** Callback when item is deleted (moved to trash) */
|
|
2372
|
+
onDelete?: () => void;
|
|
2373
|
+
/** Whether delete is in progress */
|
|
2374
|
+
isDeleting?: boolean;
|
|
2375
|
+
/** i18n config — present when multiple locales are configured */
|
|
2376
|
+
i18n?: {
|
|
2377
|
+
defaultLocale: string;
|
|
2378
|
+
locales: string[];
|
|
2379
|
+
};
|
|
2380
|
+
/** Existing translations for this content item */
|
|
2381
|
+
translations?: TranslationSummary[];
|
|
2382
|
+
/** Callback to create a translation for a locale */
|
|
2383
|
+
onTranslate?: (locale: string) => void;
|
|
2384
|
+
/** Plugin block types available for insertion in Portable Text fields */
|
|
2385
|
+
pluginBlocks?: PluginBlockDef[];
|
|
2386
|
+
/** Whether this collection has SEO fields enabled */
|
|
2387
|
+
hasSeo?: boolean;
|
|
2388
|
+
/** Callback when SEO fields change */
|
|
2389
|
+
onSeoChange?: (seo: ContentSeoInput) => void;
|
|
2390
|
+
/** Admin manifest for resolving plugin field widgets */
|
|
2391
|
+
manifest?: AdminManifest | null;
|
|
2392
|
+
}
|
|
2393
|
+
/**
|
|
2394
|
+
* Content editor with dynamic field rendering
|
|
2395
|
+
*/
|
|
2396
|
+
declare function ContentEditor({
|
|
2397
|
+
collection,
|
|
2398
|
+
collectionLabel,
|
|
2399
|
+
item,
|
|
2400
|
+
fields,
|
|
2401
|
+
isNew,
|
|
2402
|
+
isSaving,
|
|
2403
|
+
onSave,
|
|
2404
|
+
onAutosave,
|
|
2405
|
+
isAutosaving,
|
|
2406
|
+
lastAutosaveAt,
|
|
2407
|
+
onPublish,
|
|
2408
|
+
onUnpublish,
|
|
2409
|
+
onDiscardDraft,
|
|
2410
|
+
onSchedule,
|
|
2411
|
+
onUnschedule,
|
|
2412
|
+
isScheduling,
|
|
2413
|
+
supportsDrafts,
|
|
2414
|
+
supportsRevisions,
|
|
2415
|
+
currentUser,
|
|
2416
|
+
users,
|
|
2417
|
+
onAuthorChange,
|
|
2418
|
+
availableBylines,
|
|
2419
|
+
selectedBylines,
|
|
2420
|
+
onBylinesChange,
|
|
2421
|
+
onQuickCreateByline,
|
|
2422
|
+
onQuickEditByline,
|
|
2423
|
+
onDelete,
|
|
2424
|
+
isDeleting,
|
|
2425
|
+
i18n,
|
|
2426
|
+
translations,
|
|
2427
|
+
onTranslate,
|
|
2428
|
+
pluginBlocks,
|
|
2429
|
+
hasSeo,
|
|
2430
|
+
onSeoChange,
|
|
2431
|
+
manifest
|
|
2432
|
+
}: ContentEditorProps): react_jsx_runtime0.JSX.Element;
|
|
2433
|
+
//#endregion
|
|
2434
|
+
//#region src/components/MediaLibrary.d.ts
|
|
2435
|
+
interface MediaLibraryProps {
|
|
2436
|
+
items?: MediaItem[];
|
|
2437
|
+
isLoading?: boolean;
|
|
2438
|
+
onUpload?: (file: File) => Promise<void> | void;
|
|
2439
|
+
onSelect?: (item: MediaItem) => void;
|
|
2440
|
+
onDelete?: (id: string) => void;
|
|
2441
|
+
onItemUpdated?: () => void;
|
|
2442
|
+
}
|
|
2443
|
+
/**
|
|
2444
|
+
* Media library component with upload, provider tabs, and grid view
|
|
2445
|
+
*/
|
|
2446
|
+
declare function MediaLibrary({
|
|
2447
|
+
items,
|
|
2448
|
+
isLoading,
|
|
2449
|
+
onUpload,
|
|
2450
|
+
onDelete,
|
|
2451
|
+
onItemUpdated
|
|
2452
|
+
}: MediaLibraryProps): react_jsx_runtime0.JSX.Element;
|
|
2453
|
+
//#endregion
|
|
2454
|
+
//#region src/components/MediaPickerModal.d.ts
|
|
2455
|
+
interface MediaPickerModalProps {
|
|
2456
|
+
open: boolean;
|
|
2457
|
+
onOpenChange: (open: boolean) => void;
|
|
2458
|
+
onSelect: (item: MediaItem) => void;
|
|
2459
|
+
/** Filter by mime type prefix, e.g. "image/" */
|
|
2460
|
+
mimeTypeFilter?: string;
|
|
2461
|
+
title?: string;
|
|
2462
|
+
}
|
|
2463
|
+
declare function MediaPickerModal({
|
|
2464
|
+
open,
|
|
2465
|
+
onOpenChange,
|
|
2466
|
+
onSelect,
|
|
2467
|
+
mimeTypeFilter,
|
|
2468
|
+
title
|
|
2469
|
+
}: MediaPickerModalProps): react_jsx_runtime0.JSX.Element;
|
|
2470
|
+
//#endregion
|
|
2471
|
+
//#region src/components/Settings.d.ts
|
|
2472
|
+
/**
|
|
2473
|
+
* Settings hub page — links to all settings sub-pages.
|
|
2474
|
+
*/
|
|
2475
|
+
declare function Settings(): react_jsx_runtime0.JSX.Element;
|
|
2476
|
+
//#endregion
|
|
2477
|
+
//#region src/components/SaveButton.d.ts
|
|
2478
|
+
interface SaveButtonProps extends Omit<ComponentProps<typeof Button>, "children" | "shape"> {
|
|
2479
|
+
/** Whether there are unsaved changes */
|
|
2480
|
+
isDirty: boolean;
|
|
2481
|
+
/** Whether currently saving */
|
|
2482
|
+
isSaving: boolean;
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* Button that reflects save state
|
|
2486
|
+
*/
|
|
2487
|
+
declare function SaveButton({
|
|
2488
|
+
isDirty,
|
|
2489
|
+
isSaving,
|
|
2490
|
+
className,
|
|
2491
|
+
disabled,
|
|
2492
|
+
...props
|
|
2493
|
+
}: SaveButtonProps): react_jsx_runtime0.JSX.Element;
|
|
2494
|
+
//#endregion
|
|
2495
|
+
//#region src/components/auth/PasskeyRegistration.d.ts
|
|
2496
|
+
/**
|
|
2497
|
+
* PasskeyRegistration - WebAuthn credential registration component
|
|
2498
|
+
*
|
|
2499
|
+
* Handles the passkey registration flow:
|
|
2500
|
+
* 1. Fetches registration options from server
|
|
2501
|
+
* 2. Triggers browser's WebAuthn credential creation
|
|
2502
|
+
* 3. Sends attestation back to server for verification
|
|
2503
|
+
*
|
|
2504
|
+
* Used in:
|
|
2505
|
+
* - Setup wizard (first admin creation)
|
|
2506
|
+
* - User settings (adding additional passkeys)
|
|
2507
|
+
*/
|
|
2508
|
+
interface PasskeyRegistrationProps {
|
|
2509
|
+
/** Endpoint to get registration options */
|
|
2510
|
+
optionsEndpoint: string;
|
|
2511
|
+
/** Endpoint to verify registration */
|
|
2512
|
+
verifyEndpoint: string;
|
|
2513
|
+
/** Called on successful registration */
|
|
2514
|
+
onSuccess: (response: unknown) => void;
|
|
2515
|
+
/** Called on error */
|
|
2516
|
+
onError?: (error: Error) => void;
|
|
2517
|
+
/** Button text */
|
|
2518
|
+
buttonText?: string;
|
|
2519
|
+
/** Show passkey name input */
|
|
2520
|
+
showNameInput?: boolean;
|
|
2521
|
+
/** Additional data to send with requests */
|
|
2522
|
+
additionalData?: Record<string, unknown>;
|
|
2523
|
+
}
|
|
2524
|
+
/**
|
|
2525
|
+
* PasskeyRegistration Component
|
|
2526
|
+
*/
|
|
2527
|
+
declare function PasskeyRegistration({
|
|
2528
|
+
optionsEndpoint,
|
|
2529
|
+
verifyEndpoint,
|
|
2530
|
+
onSuccess,
|
|
2531
|
+
onError,
|
|
2532
|
+
buttonText,
|
|
2533
|
+
showNameInput,
|
|
2534
|
+
additionalData
|
|
2535
|
+
}: PasskeyRegistrationProps): react_jsx_runtime0.JSX.Element;
|
|
2536
|
+
//#endregion
|
|
2537
|
+
//#region src/components/auth/PasskeyLogin.d.ts
|
|
2538
|
+
/**
|
|
2539
|
+
* PasskeyLogin - WebAuthn authentication component
|
|
2540
|
+
*
|
|
2541
|
+
* Handles the passkey login flow:
|
|
2542
|
+
* 1. Fetches authentication options from server
|
|
2543
|
+
* 2. Triggers browser's WebAuthn credential assertion
|
|
2544
|
+
* 3. Sends assertion back to server for verification
|
|
2545
|
+
*
|
|
2546
|
+
* Supports:
|
|
2547
|
+
* - Discoverable credentials (passkey autofill)
|
|
2548
|
+
* - Non-discoverable credentials (email-first flow)
|
|
2549
|
+
*/
|
|
2550
|
+
interface PasskeyLoginProps {
|
|
2551
|
+
/** Endpoint to get authentication options */
|
|
2552
|
+
optionsEndpoint: string;
|
|
2553
|
+
/** Endpoint to verify authentication */
|
|
2554
|
+
verifyEndpoint: string;
|
|
2555
|
+
/** Called on successful authentication */
|
|
2556
|
+
onSuccess: (response: unknown) => void;
|
|
2557
|
+
/** Called on error */
|
|
2558
|
+
onError?: (error: Error) => void;
|
|
2559
|
+
/** Show email input for non-discoverable flow */
|
|
2560
|
+
showEmailInput?: boolean;
|
|
2561
|
+
/** Button text */
|
|
2562
|
+
buttonText?: string;
|
|
2563
|
+
}
|
|
2564
|
+
/**
|
|
2565
|
+
* PasskeyLogin Component
|
|
2566
|
+
*/
|
|
2567
|
+
declare function PasskeyLogin({
|
|
2568
|
+
optionsEndpoint,
|
|
2569
|
+
verifyEndpoint,
|
|
2570
|
+
onSuccess,
|
|
2571
|
+
onError,
|
|
2572
|
+
showEmailInput,
|
|
2573
|
+
buttonText
|
|
2574
|
+
}: PasskeyLoginProps): react_jsx_runtime0.JSX.Element;
|
|
2575
|
+
//#endregion
|
|
2576
|
+
//#region src/components/LoginPage.d.ts
|
|
2577
|
+
/**
|
|
2578
|
+
* Login Page - Standalone login page for the admin
|
|
2579
|
+
*
|
|
2580
|
+
* This component is NOT wrapped in the admin Shell.
|
|
2581
|
+
* It's a standalone page for authentication.
|
|
2582
|
+
*
|
|
2583
|
+
* Supports:
|
|
2584
|
+
* - Passkey authentication (primary)
|
|
2585
|
+
* - OAuth (GitHub, Google) when configured
|
|
2586
|
+
* - Magic link (email) when configured
|
|
2587
|
+
*
|
|
2588
|
+
* When external auth (e.g., Cloudflare Access) is configured, this page
|
|
2589
|
+
* redirects to the admin dashboard since authentication is handled externally.
|
|
2590
|
+
*/
|
|
2591
|
+
interface LoginPageProps {
|
|
2592
|
+
/** URL to redirect to after successful login */
|
|
2593
|
+
redirectUrl?: string;
|
|
2594
|
+
}
|
|
2595
|
+
declare function LoginPage({
|
|
2596
|
+
redirectUrl
|
|
2597
|
+
}: LoginPageProps): react_jsx_runtime0.JSX.Element;
|
|
2598
|
+
//#endregion
|
|
2599
|
+
//#region src/components/SetupWizard.d.ts
|
|
2600
|
+
/**
|
|
2601
|
+
* Setup Wizard - Multi-step first-run setup page
|
|
2602
|
+
*
|
|
2603
|
+
* This component is NOT wrapped in the admin Shell.
|
|
2604
|
+
* It's a standalone page for initial site configuration.
|
|
2605
|
+
*
|
|
2606
|
+
* Steps:
|
|
2607
|
+
* 1. Site Configuration (title, tagline, sample content)
|
|
2608
|
+
* 2. Admin Account (email, name)
|
|
2609
|
+
* 3. Passkey Registration
|
|
2610
|
+
*/
|
|
2611
|
+
declare function SetupWizard(): react_jsx_runtime0.JSX.Element | null;
|
|
2612
|
+
//#endregion
|
|
2613
|
+
//#region src/lib/utils.d.ts
|
|
2614
|
+
/**
|
|
2615
|
+
* Merge class names with Tailwind CSS support
|
|
2616
|
+
*/
|
|
2617
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
2618
|
+
//#endregion
|
|
2619
|
+
export { API_BASE, API_TOKEN_SCOPES, AdminApp, AdminApp as App, type AdminComment, type AdminManifest, type AllowedDomain, type ApiTokenCreateResult, type ApiTokenInfo, type AttachmentInfo, type AuthorMapping, type BulkAction, type BylineCreditInput, type BylineInput, type BylineSummary, CAPABILITY_LABELS, type CollectionSchemaStatus, type CollectionStats, type CommentCounts, type CommentStatus, ContentEditor, type ContentEditorProps, type ContentItem, ContentList, type ContentListProps, type ContentSeo, type ContentSeoInput, type CreateAllowedDomainInput, type CreateApiTokenInput, type CreateCollectionInput, type CreateContentInput, type CreateFieldInput, type CreateMenuInput, type CreateMenuItemInput, type CreateRedirectInput, type CreateSectionInput, type CreateTaxonomyInput, type CreateTermInput, type CreateWidgetAreaInput, type CreateWidgetInput, type CurrentUser, type CustomTaxonomy, Dashboard, type DashboardProps, type DashboardStats, type EmailProvider, type EmailSettings, type FieldCompatibility, type FieldDescriptor, type FieldType, type FindManyResult, type GetSectionsOptions, Header, type ImportConfig, type ImportFieldDef, type ImportResult, type InstallPluginOpts, Link, LoginPage, type MarketplaceAuditSummary, type MarketplaceAuthor, type MarketplaceImageAuditSummary, type MarketplacePluginDetail, type MarketplacePluginSummary, type MarketplaceSearchOpts, type MarketplaceSearchResult, type MarketplaceVersion, type MediaImportProgress, type MediaImportResult, type MediaItem, MediaLibrary, type MediaLibraryProps, MediaPickerModal, type MediaPickerModalProps, type MediaProviderCapabilities, type MediaProviderInfo, type MediaProviderItem, type Menu, type MenuItem, type MenuWithItems, type NavMenu, type NotFoundSummary, type OrphanedTable, type PasskeyInfo, PasskeyLogin, type PasskeyLoginProps, PasskeyRegistration, type PasskeyRegistrationProps, type PluginAdminModule, PluginAdminProvider, type PluginAdmins, type PluginInfo, type PluginUpdateInfo, PortableTextEditor, type PortableTextEditorProps, type PostTypeAnalysis, type PrepareRequest, type PrepareResult, type PreviewUrlResponse, type ProbeResult, type RecentItem, type Redirect, type RedirectListOptions, type RedirectListResult, type ReorderMenuItemsInput, type Revision, type RevisionListResponse, type RewriteUrlsResult, SaveButton, type SaveButtonProps, type SchemaCollection, type SchemaCollectionWithFields, type SchemaField, type SearchEnableResult, type Section, type SectionSource, type SectionsResult, Settings, SetupWizard, Shell, type ShellProps, KumoSidebar as Sidebar, SidebarNav, type SidebarNavProps, type SignupVerifyResult, type SiteSettings, type SourceAuth, type SourceCapabilities, type SourceProbeResult, type SuggestedAction, type TaxonomyDef, type TaxonomyTerm, type ThemeAuthor, type ThemeAuthorDetail, type ThemeDetail, type ThemeSearchOpts, type ThemeSearchResult, type ThemeSummary, type TranslationSummary, type TranslationsResponse, type TrashedContentItem, type UninstallPluginOpts, type UpdateAllowedDomainInput, type UpdateCollectionInput, type UpdateContentInput, type UpdateFieldInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdatePluginOpts, type UpdateRedirectInput, type UpdateSectionInput, type UpdateTermInput, type UpdateUserInput, type UpdateWidgetInput, type UserDetail, type UserListItem, type Widget, type WidgetArea, type WidgetComponent, type WpAuthorInfo, type WpPluginAnalysis, type WxrAnalysis, analyzeWpPluginSite, analyzeWxr, apiFetch, bulkCommentAction, checkPluginUpdates, cn, compareRevisions, completeSignup, createAdminRouter, createAllowedDomain, createApiToken, createByline, createCollection, createContent, createField, createMenu, createMenuItem, createRedirect, createSection, createTaxonomy, createTerm, createWidget, createWidgetArea, deleteAllowedDomain, deleteByline, deleteCollection, deleteComment, deleteContent, deleteField, deleteFromProvider, deleteMedia, deleteMenu, deleteMenuItem, deletePasskey, deleteRedirect, deleteSection, deleteTerm, deleteWidget, deleteWidgetArea, describeCapability, disablePlugin, disableUser, discardDraft, duplicateContent, enablePlugin, enableUser, executeWpPluginImport, executeWxrImport, fetch404Summary, fetchAllowedDomains, fetchApiTokens, fetchByline, fetchBylines, fetchCollection, fetchCollections, fetchComment, fetchCommentCounts, fetchComments, fetchContent, fetchContentList, fetchDashboardStats, fetchEmailSettings, fetchFields, fetchManifest, fetchMarketplacePlugin, fetchMediaList, fetchMediaProviders, fetchMenu, fetchMenus, fetchOrphanedTables, fetchPasskeys, fetchPlugin, fetchPlugins, fetchProviderMedia, fetchRedirects, fetchRevision, fetchRevisions, fetchSection, fetchSections, fetchSettings, fetchTaxonomyDef, fetchTaxonomyDefs, fetchTerms, fetchTheme, fetchTranslations, fetchTrashedContent, fetchUser, fetchUsers, fetchWidgetArea, fetchWidgetAreas, fetchWidgetComponents, generatePreviewUrl, getDraftStatus, getPreviewUrl, hasAllowedDomains, importWxrMedia, installMarketplacePlugin, inviteUser, parseApiResponse, permanentDeleteContent, prepareWxrImport, probeImportUrl, publishContent, registerOrphanedTable, renamePasskey, reorderFields, reorderMenuItems, reorderWidgets, requestSignup, restoreContent, restoreRevision, revokeApiToken, rewriteContentUrls, scheduleContent, searchMarketplace, searchThemes, sendRecoveryLink, sendTestEmail, setSearchEnabled, throwResponseError, uninstallMarketplacePlugin, unpublishContent, unscheduleContent, updateAllowedDomain, updateByline, updateCollection, updateCommentStatus, updateContent, updateField, updateMarketplacePlugin, updateMedia, updateMenu, updateMenuItem, updateRedirect, updateSection, updateSettings, updateTerm, updateUser, updateWidget, uploadMedia, uploadToProvider, useCurrentUser, useNavigate, useParams, usePluginAdmins, usePluginField, usePluginHasPages, usePluginHasWidgets, usePluginPage, usePluginWidget, verifySignupToken };
|
|
2620
|
+
//# sourceMappingURL=index.d.ts.map
|