@realiizlabs/admin 0.11.2 → 0.13.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.
Files changed (47) hide show
  1. package/dist/Sidebar-CNuphww6.d.cts +60 -0
  2. package/dist/Sidebar-CNuphww6.d.ts +60 -0
  3. package/dist/auth/index.d.cts +5 -127
  4. package/dist/auth/index.d.ts +5 -127
  5. package/dist/auth-ui/index.js +124 -1
  6. package/dist/auth-ui/index.js.map +1 -1
  7. package/dist/forms/index.js +287 -1
  8. package/dist/forms/index.js.map +1 -1
  9. package/dist/forms-ui/index.js +355 -6
  10. package/dist/forms-ui/index.js.map +1 -1
  11. package/dist/git/index.cjs.map +1 -1
  12. package/dist/git/index.d.cts +3 -77
  13. package/dist/git/index.d.ts +3 -77
  14. package/dist/git/index.js.map +1 -1
  15. package/dist/media/index.cjs +33 -0
  16. package/dist/media/index.cjs.map +1 -1
  17. package/dist/media/index.d.cts +2 -0
  18. package/dist/media/index.d.ts +2 -0
  19. package/dist/media/index.js +30 -1
  20. package/dist/media/index.js.map +1 -1
  21. package/dist/members-nhbRSYyr.d.cts +106 -0
  22. package/dist/members-nhbRSYyr.d.ts +106 -0
  23. package/dist/roles-BjWuj2_v.d.cts +25 -0
  24. package/dist/roles-Dnwj-DAm.d.ts +25 -0
  25. package/dist/shell/index.d.cts +3 -58
  26. package/dist/shell/index.d.ts +3 -58
  27. package/dist/studio/index.cjs +1150 -0
  28. package/dist/studio/index.cjs.map +1 -0
  29. package/dist/studio/index.d.cts +287 -0
  30. package/dist/studio/index.d.ts +287 -0
  31. package/dist/studio/index.js +1131 -0
  32. package/dist/studio/index.js.map +1 -0
  33. package/dist/studio-ui/index.cjs +3931 -0
  34. package/dist/studio-ui/index.cjs.map +1 -0
  35. package/dist/studio-ui/index.d.cts +375 -0
  36. package/dist/studio-ui/index.d.ts +375 -0
  37. package/dist/studio-ui/index.js +3900 -0
  38. package/dist/studio-ui/index.js.map +1 -0
  39. package/dist/types-BP5G1myE.d.cts +78 -0
  40. package/dist/types-BP5G1myE.d.ts +78 -0
  41. package/dist/validate-C84Ll1cD.d.cts +41 -0
  42. package/dist/validate-C84Ll1cD.d.ts +41 -0
  43. package/package.json +20 -2
  44. package/dist/chunk-2GSYBARR.js +0 -126
  45. package/dist/chunk-2GSYBARR.js.map +0 -1
  46. package/dist/chunk-JLR5K6RP.js +0 -289
  47. package/dist/chunk-JLR5K6RP.js.map +0 -1
@@ -0,0 +1,287 @@
1
+ import { c as ImagePayload } from '../validate-C84Ll1cD.cjs';
2
+ export { I as IMAGE_ERRORS, a as IMAGE_LIMITS, b as ImageLimits, V as ValidatedImages, d as decodedSize, v as validateImages } from '../validate-C84Ll1cD.cjs';
3
+ import { a as IdentityUser, f as SiteRole, C as CookieStore, d as SiteMember, I as IdentityClient, c as SiteBranding } from '../members-nhbRSYyr.cjs';
4
+ import { a as PullRequestStatus } from '../types-BP5G1myE.cjs';
5
+ import { C as ContentTypeEntry } from '../types-D46UjOfv.cjs';
6
+ import * as zod from 'zod';
7
+ import * as zod_v4_core from 'zod/v4/core';
8
+ import { R as RequireOptions } from '../roles-BjWuj2_v.cjs';
9
+ import '@supabase/supabase-js';
10
+
11
+ /**
12
+ * The contract between a site and its Studio. Everything a site knows and the
13
+ * package cannot — env values, cookies, the request's origin, its registry —
14
+ * arrives here, lazily, so `next build` with no env set still succeeds.
15
+ */
16
+
17
+ interface RepoConfig {
18
+ owner: string;
19
+ repo: string;
20
+ token: string;
21
+ }
22
+ interface IdentityConfig {
23
+ url: string;
24
+ anonKey: string;
25
+ }
26
+ interface ServiceConfig {
27
+ url: string;
28
+ serviceRoleKey: string;
29
+ }
30
+ /** Read per request, never at import time (BUILD-ENV law lives in the site's env.ts). */
31
+ interface StudioEnv {
32
+ siteId: string;
33
+ repo: RepoConfig;
34
+ identity: IdentityConfig;
35
+ /** Optional: without it the Team tab explains that invites aren't set up. */
36
+ service: ServiceConfig | null;
37
+ }
38
+ interface StudioConfig {
39
+ /** The site's registry, keyed by type id. */
40
+ contentTypes: Record<string, ContentTypeEntry>;
41
+ /** Public page for an item, per type; a type with no page returns null. */
42
+ publicUrls?: Record<string, (slug: string) => string | null>;
43
+ /** Called per request. Throw a clear message when something is missing. */
44
+ env: () => StudioEnv;
45
+ /** True when every variable is present — the layout shows a setup page otherwise. */
46
+ isConfigured: () => boolean;
47
+ /** This request's cookie store (next/headers `cookies()` in a site). */
48
+ cookies: () => Promise<CookieStore>;
49
+ /** proto://host of this request — where auth links come back to. */
50
+ baseUrl: () => Promise<string>;
51
+ /** Next's revalidatePath, passed in so the package never imports next/cache. */
52
+ revalidate?: (path: string, type?: "layout" | "page") => void;
53
+ /** Shown in Studio's own copy ("Ask Realiiz" → "Ask {supportName}"). */
54
+ supportName?: string;
55
+ siteName: string;
56
+ /** IANA zone used when an event names none. */
57
+ timezone?: string;
58
+ }
59
+ type ActionResult = {
60
+ ok: true;
61
+ message?: string;
62
+ } | {
63
+ ok: false;
64
+ error: string;
65
+ };
66
+ interface Session {
67
+ user: IdentityUser;
68
+ role: SiteRole;
69
+ }
70
+
71
+ interface Located {
72
+ typeId: string;
73
+ slug: string;
74
+ entry: ContentTypeEntry;
75
+ }
76
+
77
+ /**
78
+ * The dashboard's own in-flight changes: open PRs on `admin/*` branches, keyed
79
+ * by the file they change. The branch name — `admin/{typeId}/{fileBase}-{stamp}`
80
+ * — is the index, so no extra call per PR is needed. One open change per file;
81
+ * if two ever exist the newest wins here and the older is left alone on GitHub.
82
+ */
83
+
84
+ type PendingState = "checking" | "ready" | "failed";
85
+ interface PendingChange {
86
+ number: number;
87
+ branch: string;
88
+ title: string;
89
+ html_url: string;
90
+ path: string;
91
+ typeId: string;
92
+ state: PendingState;
93
+ failingCheck: string | null;
94
+ /** The change removes the item rather than editing it. */
95
+ removal: boolean;
96
+ }
97
+ declare const pendingLabel: Record<PendingState, string>;
98
+ declare function pendingText(p: PendingChange): string;
99
+
100
+ interface ListItem {
101
+ slug: string;
102
+ path: string;
103
+ title: string;
104
+ /** publishedAt, falling back to date — ISO string, or null when the file has neither. */
105
+ date: string | null;
106
+ /** True when the frontmatter did not parse cleanly — still listed, still openable. */
107
+ needsAttention: boolean;
108
+ pending: PendingChange | null;
109
+ /** The file exists only in a pending change — nothing on the live site yet. */
110
+ isNew: boolean;
111
+ }
112
+ interface PrSummary {
113
+ number: number;
114
+ title: string;
115
+ html_url: string;
116
+ merged: boolean;
117
+ state: "open" | "closed";
118
+ /** Parsed from the PR body the publish action wrote, when present. */
119
+ postPath: string | null;
120
+ branch: string;
121
+ removal: boolean;
122
+ /** The commit that landed on main when this was published; null until then. */
123
+ mergeCommitSha: string | null;
124
+ }
125
+ /** Thrown when no file in the folder maps to the slug — the page turns it into a 404. */
126
+ declare class NotHere extends Error {
127
+ constructor(slug: string);
128
+ }
129
+
130
+ /**
131
+ * Publish and remove: validated submission → one commit on a new branch → PR.
132
+ * The branch is cut from `main` as it is at this moment and named with a stamp
133
+ * so two edits of one file never collide. Nothing goes to main directly (PR Law).
134
+ */
135
+
136
+ interface PublishInput {
137
+ type: string;
138
+ frontmatter: Record<string, unknown>;
139
+ body: string;
140
+ /** An open change for this file: save onto ITS branch so the same PR picks up the edit. */
141
+ existing?: {
142
+ number: number;
143
+ branch: string;
144
+ } | null;
145
+ /** Pictures chosen in this session, already shrunk in the browser; committed with the MDX. */
146
+ images?: ImagePayload[];
147
+ }
148
+ type PublishResult = {
149
+ ok: false;
150
+ error: string;
151
+ };
152
+
153
+ /** The Publish button (merge when green, never otherwise) and Discard (close + delete branch). */
154
+
155
+ type MergeOutcome = {
156
+ state: "merged";
157
+ sha: string;
158
+ } | {
159
+ state: "pending";
160
+ } | {
161
+ state: "stale";
162
+ } | {
163
+ state: "red";
164
+ failingCheck: string | null;
165
+ } | {
166
+ state: "error";
167
+ message: string;
168
+ };
169
+ type DiscardOutcome = {
170
+ state: "discarded";
171
+ } | {
172
+ state: "already-published";
173
+ } | {
174
+ state: "error";
175
+ message: string;
176
+ };
177
+
178
+ /**
179
+ * Team actions. Reading the roster uses the signed-in user's client (the
180
+ * site_members() function refuses non-owners). Writes need the service role,
181
+ * which the auth helpers use ONLY after re-checking the actor's role in code.
182
+ */
183
+
184
+ type TeamState = {
185
+ ok: true;
186
+ members: SiteMember[];
187
+ canInvite: boolean;
188
+ } | {
189
+ ok: false;
190
+ error: string;
191
+ };
192
+
193
+ declare function createStudio(config: StudioConfig): {
194
+ config: StudioConfig;
195
+ isConfigured: () => boolean;
196
+ entry: (typeId: string) => ContentTypeEntry | null;
197
+ entries: ContentTypeEntry<zod.ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>[];
198
+ requireAdmin: (opts?: RequireOptions) => Promise<Session>;
199
+ identityClient: () => Promise<IdentityClient>;
200
+ readers: {
201
+ locate: (path: string) => Located | null;
202
+ publicUrlFor: (typeId: string, slug: string) => string | null;
203
+ publicDirFor: (typeId: string) => string;
204
+ listPendingChanges: () => Promise<Map<string, PendingChange>>;
205
+ pendingFor: (path: string) => Promise<PendingChange | null>;
206
+ pathOf: (typeId: string, slug: string) => Promise<string | null>;
207
+ listItems: (typeId: string) => Promise<ListItem[]>;
208
+ countItems: (typeId: string) => Promise<number>;
209
+ readItem: (typeId: string, slug: string, opts?: {
210
+ ref?: string;
211
+ }) => Promise<{
212
+ frontmatter: Record<string, unknown>;
213
+ body: string;
214
+ sha: string;
215
+ path: string;
216
+ }>;
217
+ lastAuthor: (typeId: string) => Promise<string | null>;
218
+ getPullRequest: (number: number) => Promise<PrSummary | null>;
219
+ prStatus: (number: number) => Promise<PullRequestStatus>;
220
+ };
221
+ actions: {
222
+ loadTeam: () => Promise<TeamState>;
223
+ invite: (input: {
224
+ email: string;
225
+ role: "owner" | "editor";
226
+ }) => Promise<ActionResult>;
227
+ changeRole: (input: {
228
+ userId: string;
229
+ role: "owner" | "editor";
230
+ }) => Promise<ActionResult>;
231
+ resend: (input: {
232
+ email: string;
233
+ }) => Promise<ActionResult>;
234
+ remove: (input: {
235
+ userId: string;
236
+ }) => Promise<ActionResult>;
237
+ saveProfile: (input: {
238
+ name: string;
239
+ displayName: string;
240
+ }) => Promise<ActionResult>;
241
+ saveAvatar: (input: {
242
+ base64: string;
243
+ } | null) => Promise<ActionResult>;
244
+ changePassword: (input: {
245
+ password: string;
246
+ confirm: string;
247
+ }) => Promise<ActionResult>;
248
+ loadBranding: () => Promise<SiteBranding | null>;
249
+ saveBranding: (input: {
250
+ name: string;
251
+ businessEmail: string;
252
+ businessPhone: string;
253
+ }) => Promise<ActionResult>;
254
+ saveBrandingPicture: (input: {
255
+ kind: "logo" | "favicon";
256
+ base64: string | null;
257
+ }) => Promise<ActionResult>;
258
+ loadMe: () => Promise<{
259
+ name: string | null;
260
+ displayName: string | null;
261
+ avatarUrl: string | null;
262
+ email: string;
263
+ role: SiteRole;
264
+ }>;
265
+ previewBody: (markdown: string) => Promise<{
266
+ html: string;
267
+ } | {
268
+ error: string;
269
+ }>;
270
+ mergeContentPr: (number: number) => Promise<MergeOutcome>;
271
+ discardChange: (number: number, branch: string) => Promise<DiscardOutcome>;
272
+ publishContent: (input: PublishInput) => Promise<PublishResult | never>;
273
+ removeContent: (input: {
274
+ type: string;
275
+ slug: string;
276
+ }) => Promise<PublishResult | never>;
277
+ };
278
+ authHandlers: {
279
+ callback: (request: Request) => Promise<Response>;
280
+ signout: (request: Request) => Promise<Response>;
281
+ };
282
+ };
283
+ type Studio = ReturnType<typeof createStudio>;
284
+ type StudioActions = Studio["actions"];
285
+ type StudioReaders = Studio["readers"];
286
+
287
+ export { type ActionResult, type DiscardOutcome, type IdentityConfig, ImagePayload, type ListItem, type Located, type MergeOutcome, NotHere, type PendingChange, type PendingState, type PrSummary, type PublishInput, type PublishResult, type RepoConfig, type ServiceConfig, type Session, type Studio, type StudioActions, type StudioConfig, type StudioEnv, type StudioReaders, type TeamState, createStudio, pendingLabel, pendingText };
@@ -0,0 +1,287 @@
1
+ import { c as ImagePayload } from '../validate-C84Ll1cD.js';
2
+ export { I as IMAGE_ERRORS, a as IMAGE_LIMITS, b as ImageLimits, V as ValidatedImages, d as decodedSize, v as validateImages } from '../validate-C84Ll1cD.js';
3
+ import { a as IdentityUser, f as SiteRole, C as CookieStore, d as SiteMember, I as IdentityClient, c as SiteBranding } from '../members-nhbRSYyr.js';
4
+ import { a as PullRequestStatus } from '../types-BP5G1myE.js';
5
+ import { C as ContentTypeEntry } from '../types-D46UjOfv.js';
6
+ import * as zod from 'zod';
7
+ import * as zod_v4_core from 'zod/v4/core';
8
+ import { R as RequireOptions } from '../roles-Dnwj-DAm.js';
9
+ import '@supabase/supabase-js';
10
+
11
+ /**
12
+ * The contract between a site and its Studio. Everything a site knows and the
13
+ * package cannot — env values, cookies, the request's origin, its registry —
14
+ * arrives here, lazily, so `next build` with no env set still succeeds.
15
+ */
16
+
17
+ interface RepoConfig {
18
+ owner: string;
19
+ repo: string;
20
+ token: string;
21
+ }
22
+ interface IdentityConfig {
23
+ url: string;
24
+ anonKey: string;
25
+ }
26
+ interface ServiceConfig {
27
+ url: string;
28
+ serviceRoleKey: string;
29
+ }
30
+ /** Read per request, never at import time (BUILD-ENV law lives in the site's env.ts). */
31
+ interface StudioEnv {
32
+ siteId: string;
33
+ repo: RepoConfig;
34
+ identity: IdentityConfig;
35
+ /** Optional: without it the Team tab explains that invites aren't set up. */
36
+ service: ServiceConfig | null;
37
+ }
38
+ interface StudioConfig {
39
+ /** The site's registry, keyed by type id. */
40
+ contentTypes: Record<string, ContentTypeEntry>;
41
+ /** Public page for an item, per type; a type with no page returns null. */
42
+ publicUrls?: Record<string, (slug: string) => string | null>;
43
+ /** Called per request. Throw a clear message when something is missing. */
44
+ env: () => StudioEnv;
45
+ /** True when every variable is present — the layout shows a setup page otherwise. */
46
+ isConfigured: () => boolean;
47
+ /** This request's cookie store (next/headers `cookies()` in a site). */
48
+ cookies: () => Promise<CookieStore>;
49
+ /** proto://host of this request — where auth links come back to. */
50
+ baseUrl: () => Promise<string>;
51
+ /** Next's revalidatePath, passed in so the package never imports next/cache. */
52
+ revalidate?: (path: string, type?: "layout" | "page") => void;
53
+ /** Shown in Studio's own copy ("Ask Realiiz" → "Ask {supportName}"). */
54
+ supportName?: string;
55
+ siteName: string;
56
+ /** IANA zone used when an event names none. */
57
+ timezone?: string;
58
+ }
59
+ type ActionResult = {
60
+ ok: true;
61
+ message?: string;
62
+ } | {
63
+ ok: false;
64
+ error: string;
65
+ };
66
+ interface Session {
67
+ user: IdentityUser;
68
+ role: SiteRole;
69
+ }
70
+
71
+ interface Located {
72
+ typeId: string;
73
+ slug: string;
74
+ entry: ContentTypeEntry;
75
+ }
76
+
77
+ /**
78
+ * The dashboard's own in-flight changes: open PRs on `admin/*` branches, keyed
79
+ * by the file they change. The branch name — `admin/{typeId}/{fileBase}-{stamp}`
80
+ * — is the index, so no extra call per PR is needed. One open change per file;
81
+ * if two ever exist the newest wins here and the older is left alone on GitHub.
82
+ */
83
+
84
+ type PendingState = "checking" | "ready" | "failed";
85
+ interface PendingChange {
86
+ number: number;
87
+ branch: string;
88
+ title: string;
89
+ html_url: string;
90
+ path: string;
91
+ typeId: string;
92
+ state: PendingState;
93
+ failingCheck: string | null;
94
+ /** The change removes the item rather than editing it. */
95
+ removal: boolean;
96
+ }
97
+ declare const pendingLabel: Record<PendingState, string>;
98
+ declare function pendingText(p: PendingChange): string;
99
+
100
+ interface ListItem {
101
+ slug: string;
102
+ path: string;
103
+ title: string;
104
+ /** publishedAt, falling back to date — ISO string, or null when the file has neither. */
105
+ date: string | null;
106
+ /** True when the frontmatter did not parse cleanly — still listed, still openable. */
107
+ needsAttention: boolean;
108
+ pending: PendingChange | null;
109
+ /** The file exists only in a pending change — nothing on the live site yet. */
110
+ isNew: boolean;
111
+ }
112
+ interface PrSummary {
113
+ number: number;
114
+ title: string;
115
+ html_url: string;
116
+ merged: boolean;
117
+ state: "open" | "closed";
118
+ /** Parsed from the PR body the publish action wrote, when present. */
119
+ postPath: string | null;
120
+ branch: string;
121
+ removal: boolean;
122
+ /** The commit that landed on main when this was published; null until then. */
123
+ mergeCommitSha: string | null;
124
+ }
125
+ /** Thrown when no file in the folder maps to the slug — the page turns it into a 404. */
126
+ declare class NotHere extends Error {
127
+ constructor(slug: string);
128
+ }
129
+
130
+ /**
131
+ * Publish and remove: validated submission → one commit on a new branch → PR.
132
+ * The branch is cut from `main` as it is at this moment and named with a stamp
133
+ * so two edits of one file never collide. Nothing goes to main directly (PR Law).
134
+ */
135
+
136
+ interface PublishInput {
137
+ type: string;
138
+ frontmatter: Record<string, unknown>;
139
+ body: string;
140
+ /** An open change for this file: save onto ITS branch so the same PR picks up the edit. */
141
+ existing?: {
142
+ number: number;
143
+ branch: string;
144
+ } | null;
145
+ /** Pictures chosen in this session, already shrunk in the browser; committed with the MDX. */
146
+ images?: ImagePayload[];
147
+ }
148
+ type PublishResult = {
149
+ ok: false;
150
+ error: string;
151
+ };
152
+
153
+ /** The Publish button (merge when green, never otherwise) and Discard (close + delete branch). */
154
+
155
+ type MergeOutcome = {
156
+ state: "merged";
157
+ sha: string;
158
+ } | {
159
+ state: "pending";
160
+ } | {
161
+ state: "stale";
162
+ } | {
163
+ state: "red";
164
+ failingCheck: string | null;
165
+ } | {
166
+ state: "error";
167
+ message: string;
168
+ };
169
+ type DiscardOutcome = {
170
+ state: "discarded";
171
+ } | {
172
+ state: "already-published";
173
+ } | {
174
+ state: "error";
175
+ message: string;
176
+ };
177
+
178
+ /**
179
+ * Team actions. Reading the roster uses the signed-in user's client (the
180
+ * site_members() function refuses non-owners). Writes need the service role,
181
+ * which the auth helpers use ONLY after re-checking the actor's role in code.
182
+ */
183
+
184
+ type TeamState = {
185
+ ok: true;
186
+ members: SiteMember[];
187
+ canInvite: boolean;
188
+ } | {
189
+ ok: false;
190
+ error: string;
191
+ };
192
+
193
+ declare function createStudio(config: StudioConfig): {
194
+ config: StudioConfig;
195
+ isConfigured: () => boolean;
196
+ entry: (typeId: string) => ContentTypeEntry | null;
197
+ entries: ContentTypeEntry<zod.ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>[];
198
+ requireAdmin: (opts?: RequireOptions) => Promise<Session>;
199
+ identityClient: () => Promise<IdentityClient>;
200
+ readers: {
201
+ locate: (path: string) => Located | null;
202
+ publicUrlFor: (typeId: string, slug: string) => string | null;
203
+ publicDirFor: (typeId: string) => string;
204
+ listPendingChanges: () => Promise<Map<string, PendingChange>>;
205
+ pendingFor: (path: string) => Promise<PendingChange | null>;
206
+ pathOf: (typeId: string, slug: string) => Promise<string | null>;
207
+ listItems: (typeId: string) => Promise<ListItem[]>;
208
+ countItems: (typeId: string) => Promise<number>;
209
+ readItem: (typeId: string, slug: string, opts?: {
210
+ ref?: string;
211
+ }) => Promise<{
212
+ frontmatter: Record<string, unknown>;
213
+ body: string;
214
+ sha: string;
215
+ path: string;
216
+ }>;
217
+ lastAuthor: (typeId: string) => Promise<string | null>;
218
+ getPullRequest: (number: number) => Promise<PrSummary | null>;
219
+ prStatus: (number: number) => Promise<PullRequestStatus>;
220
+ };
221
+ actions: {
222
+ loadTeam: () => Promise<TeamState>;
223
+ invite: (input: {
224
+ email: string;
225
+ role: "owner" | "editor";
226
+ }) => Promise<ActionResult>;
227
+ changeRole: (input: {
228
+ userId: string;
229
+ role: "owner" | "editor";
230
+ }) => Promise<ActionResult>;
231
+ resend: (input: {
232
+ email: string;
233
+ }) => Promise<ActionResult>;
234
+ remove: (input: {
235
+ userId: string;
236
+ }) => Promise<ActionResult>;
237
+ saveProfile: (input: {
238
+ name: string;
239
+ displayName: string;
240
+ }) => Promise<ActionResult>;
241
+ saveAvatar: (input: {
242
+ base64: string;
243
+ } | null) => Promise<ActionResult>;
244
+ changePassword: (input: {
245
+ password: string;
246
+ confirm: string;
247
+ }) => Promise<ActionResult>;
248
+ loadBranding: () => Promise<SiteBranding | null>;
249
+ saveBranding: (input: {
250
+ name: string;
251
+ businessEmail: string;
252
+ businessPhone: string;
253
+ }) => Promise<ActionResult>;
254
+ saveBrandingPicture: (input: {
255
+ kind: "logo" | "favicon";
256
+ base64: string | null;
257
+ }) => Promise<ActionResult>;
258
+ loadMe: () => Promise<{
259
+ name: string | null;
260
+ displayName: string | null;
261
+ avatarUrl: string | null;
262
+ email: string;
263
+ role: SiteRole;
264
+ }>;
265
+ previewBody: (markdown: string) => Promise<{
266
+ html: string;
267
+ } | {
268
+ error: string;
269
+ }>;
270
+ mergeContentPr: (number: number) => Promise<MergeOutcome>;
271
+ discardChange: (number: number, branch: string) => Promise<DiscardOutcome>;
272
+ publishContent: (input: PublishInput) => Promise<PublishResult | never>;
273
+ removeContent: (input: {
274
+ type: string;
275
+ slug: string;
276
+ }) => Promise<PublishResult | never>;
277
+ };
278
+ authHandlers: {
279
+ callback: (request: Request) => Promise<Response>;
280
+ signout: (request: Request) => Promise<Response>;
281
+ };
282
+ };
283
+ type Studio = ReturnType<typeof createStudio>;
284
+ type StudioActions = Studio["actions"];
285
+ type StudioReaders = Studio["readers"];
286
+
287
+ export { type ActionResult, type DiscardOutcome, type IdentityConfig, ImagePayload, type ListItem, type Located, type MergeOutcome, NotHere, type PendingChange, type PendingState, type PrSummary, type PublishInput, type PublishResult, type RepoConfig, type ServiceConfig, type Session, type Studio, type StudioActions, type StudioConfig, type StudioEnv, type StudioReaders, type TeamState, createStudio, pendingLabel, pendingText };