@karmaniverous/jeeves-server-core 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -12
- package/dist/openapi.json.js +4038 -0
- package/dist/scripts/openapiInfo.d.ts +15 -0
- package/dist/src/catalog/browserSafe.test.d.ts +4 -0
- package/dist/src/catalog/contentEntries.d.ts +468 -0
- package/dist/src/catalog/contentEntries.js +150 -0
- package/dist/src/catalog/contentSchemas.d.ts +179 -0
- package/dist/src/catalog/contentSchemas.js +195 -0
- package/dist/src/catalog/descriptions.d.ts +52 -0
- package/dist/src/catalog/descriptions.js +54 -0
- package/dist/src/catalog/eventEntries.d.ts +70 -0
- package/dist/src/catalog/eventEntries.js +59 -0
- package/dist/src/catalog/fileMutateSchema.d.ts +41 -0
- package/dist/src/catalog/fileMutateSchema.js +77 -0
- package/dist/src/catalog/index.d.ts +15 -0
- package/dist/src/catalog/index.js +10 -0
- package/dist/src/catalog/oauthEntries.d.ts +125 -0
- package/dist/src/catalog/oauthEntries.js +92 -0
- package/dist/src/catalog/route.d.ts +137 -0
- package/dist/src/catalog/route.js +92 -0
- package/dist/src/catalog/runnerEntries.d.ts +145 -0
- package/dist/src/catalog/runnerEntries.js +69 -0
- package/dist/src/catalog/schemas.test.d.ts +4 -0
- package/dist/src/catalog/serverCatalog.d.ts +1143 -0
- package/dist/src/catalog/serverCatalog.js +37 -0
- package/dist/src/catalog/serverCatalog.test.d.ts +4 -0
- package/dist/src/catalog/sharingEntries.d.ts +200 -0
- package/dist/src/catalog/sharingEntries.js +146 -0
- package/dist/src/catalog/statusSchemas.d.ts +87 -0
- package/dist/src/catalog/statusSchemas.js +119 -0
- package/dist/src/catalog/utilityEntries.d.ts +151 -0
- package/dist/src/catalog/utilityEntries.js +62 -0
- package/dist/src/catalog/utilitySchemas.d.ts +98 -0
- package/dist/src/catalog/utilitySchemas.js +131 -0
- package/dist/src/configAuthSchema.d.ts +100 -0
- package/dist/src/configAuthSchema.js +119 -0
- package/dist/src/configFeatureSchemas.d.ts +43 -0
- package/dist/src/configFeatureSchemas.js +53 -0
- package/dist/src/configPrintStyles.d.ts +63 -0
- package/dist/src/configPrintStyles.js +98 -0
- package/dist/src/configPrintStyles.test.d.ts +1 -0
- package/dist/src/crypto.d.ts +6 -13
- package/dist/src/crypto.js +7 -32
- package/dist/src/crypto.test.d.ts +7 -0
- package/dist/src/errors.d.ts +51 -0
- package/dist/src/errors.js +97 -0
- package/dist/src/errors.test.d.ts +4 -0
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.js +17 -3
- package/dist/src/openapi.d.ts +13 -0
- package/dist/src/openapi.js +17 -0
- package/dist/src/openapi.test.d.ts +4 -0
- package/dist/src/schema.d.ts +20 -122
- package/dist/src/schema.js +17 -153
- package/dist/src/types.d.ts +2 -0
- package/openapi.json +3934 -0
- package/package.json +26 -13
- package/dist/src/endpoints.d.ts +0 -34
- package/dist/src/endpoints.js +0 -248
- /package/dist/src/{endpoints.test.d.ts → configAuthSchema.test.d.ts} +0 -0
|
@@ -0,0 +1,1143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The jeeves-server endpoint catalog (`SERVER_CATALOG`): one Zod-described entry per machine-API route, from which the service's routes and validation, the OpenAPI document, the SDK client and the plugin's tools are derived; plus the types inferred from it. Pure.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* jeeves' three standard entries (`status` public; `config` and
|
|
6
|
+
* `configApply` admin), then the content, sharing, utility, event, OAuth and
|
|
7
|
+
* runner entries. Entry names are the SDK method, the plugin tool's base
|
|
8
|
+
* name (`server_` + snake_case) and the OpenAPI `operationId`. Browser
|
|
9
|
+
* routes (the SPA, sign-in, `/oauth/callback`, `/go/:slug`) are not in it.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
import { type CatalogInput, type ClientResponse } from '@karmaniverous/jeeves/catalog';
|
|
14
|
+
import type { z } from 'zod';
|
|
15
|
+
import { serverHealthSchema } from './statusSchemas.js';
|
|
16
|
+
/** The jeeves-server endpoint catalog. */
|
|
17
|
+
export declare const SERVER_CATALOG: import("@karmaniverous/jeeves/catalog").Catalog<readonly [{
|
|
18
|
+
readonly name: "status";
|
|
19
|
+
readonly method: "GET";
|
|
20
|
+
readonly path: "/status";
|
|
21
|
+
readonly description: `Get ${string} service health, version, and uptime.`;
|
|
22
|
+
readonly response: z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
version: z.ZodString;
|
|
25
|
+
uptime: z.ZodNumber;
|
|
26
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"healthy">, z.ZodLiteral<"degraded">, z.ZodLiteral<"unhealthy">]>;
|
|
27
|
+
health: z.ZodObject<{
|
|
28
|
+
port: z.ZodNumber;
|
|
29
|
+
chrome: z.ZodObject<{
|
|
30
|
+
configured: z.ZodBoolean;
|
|
31
|
+
path: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
auth: z.ZodObject<{
|
|
34
|
+
modes: z.ZodArray<z.ZodString>;
|
|
35
|
+
insiderCount: z.ZodNumber;
|
|
36
|
+
keyCount: z.ZodNumber;
|
|
37
|
+
googleRedirectUri: z.ZodOptional<z.ZodString>;
|
|
38
|
+
oauthRedirectUri: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
events: z.ZodArray<z.ZodObject<{
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
eventQueue: z.ZodObject<{
|
|
45
|
+
offset: z.ZodNumber;
|
|
46
|
+
size: z.ZodNumber;
|
|
47
|
+
pendingBytes: z.ZodNumber;
|
|
48
|
+
parseErrors: z.ZodNumber;
|
|
49
|
+
lastCursorReset: z.ZodOptional<z.ZodString>;
|
|
50
|
+
lastRewind: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
exports: z.ZodObject<{
|
|
53
|
+
documents: z.ZodArray<z.ZodString>;
|
|
54
|
+
directories: z.ZodArray<z.ZodString>;
|
|
55
|
+
diagrams: z.ZodArray<z.ZodString>;
|
|
56
|
+
chromeAvailable: z.ZodBoolean;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
diagrams: z.ZodObject<{
|
|
59
|
+
mermaid: z.ZodBoolean;
|
|
60
|
+
plantuml: z.ZodObject<{
|
|
61
|
+
localJar: z.ZodBoolean;
|
|
62
|
+
servers: z.ZodArray<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
services: z.ZodObject<{
|
|
66
|
+
watcher: z.ZodObject<{
|
|
67
|
+
url: z.ZodString;
|
|
68
|
+
reachable: z.ZodBoolean;
|
|
69
|
+
version: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
runner: z.ZodObject<{
|
|
72
|
+
url: z.ZodString;
|
|
73
|
+
reachable: z.ZodBoolean;
|
|
74
|
+
version: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
meta: z.ZodObject<{
|
|
77
|
+
url: z.ZodString;
|
|
78
|
+
reachable: z.ZodBoolean;
|
|
79
|
+
version: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
lastChecked: z.ZodNullable<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
branding: z.ZodObject<{
|
|
84
|
+
name: z.ZodString;
|
|
85
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
86
|
+
theme: z.ZodOptional<z.ZodObject<{
|
|
87
|
+
light: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
88
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
readonly auth: import("@karmaniverous/jeeves/catalog").AuthSpec;
|
|
94
|
+
readonly kind: "read";
|
|
95
|
+
}, {
|
|
96
|
+
readonly name: "config";
|
|
97
|
+
readonly method: "GET";
|
|
98
|
+
readonly path: "/config";
|
|
99
|
+
readonly description: `Query ${string} running configuration. Optional JSONPath filter.`;
|
|
100
|
+
readonly query: z.ZodObject<{
|
|
101
|
+
path: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
readonly response: z.ZodUnion<readonly [z.ZodObject<{
|
|
104
|
+
result: z.ZodArray<z.ZodUnknown>;
|
|
105
|
+
count: z.ZodNumber;
|
|
106
|
+
}, z.core.$loose>, z.ZodObject<{}, z.core.$loose>]>;
|
|
107
|
+
readonly auth: import("@karmaniverous/jeeves/catalog").AuthSpec;
|
|
108
|
+
readonly kind: "read";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "configApply";
|
|
111
|
+
readonly method: "POST";
|
|
112
|
+
readonly path: "/config/apply";
|
|
113
|
+
readonly description: `Apply a config patch to the running ${string} service.`;
|
|
114
|
+
readonly body: z.ZodObject<{
|
|
115
|
+
patch: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
116
|
+
replace: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
readonly response: z.ZodObject<{
|
|
119
|
+
applied: z.ZodLiteral<true>;
|
|
120
|
+
config: z.ZodObject<{}, z.core.$loose>;
|
|
121
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
readonly auth: import("@karmaniverous/jeeves/catalog").AuthSpec;
|
|
124
|
+
readonly kind: "write";
|
|
125
|
+
}, {
|
|
126
|
+
readonly response: z.ZodObject<{
|
|
127
|
+
ok: z.ZodLiteral<true>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
readonly auth: "none";
|
|
130
|
+
readonly kind: "read";
|
|
131
|
+
readonly name: "health";
|
|
132
|
+
readonly method: "GET";
|
|
133
|
+
readonly path: "/health";
|
|
134
|
+
readonly description: "Liveness check: returns { ok: true }, with no downstream checks.";
|
|
135
|
+
}, {
|
|
136
|
+
readonly query: z.ZodObject<{
|
|
137
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
138
|
+
d: z.ZodOptional<z.ZodString>;
|
|
139
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
140
|
+
s: z.ZodOptional<z.ZodString>;
|
|
141
|
+
key: z.ZodOptional<z.ZodString>;
|
|
142
|
+
path: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
readonly response: z.ZodObject<{
|
|
145
|
+
authenticated: z.ZodBoolean;
|
|
146
|
+
email: z.ZodOptional<z.ZodString>;
|
|
147
|
+
picture: z.ZodOptional<z.ZodString>;
|
|
148
|
+
isInsider: z.ZodBoolean;
|
|
149
|
+
keyCreatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
|
+
searchEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
readonly auth: "none";
|
|
153
|
+
readonly kind: "read";
|
|
154
|
+
readonly name: "authStatus";
|
|
155
|
+
readonly method: "GET";
|
|
156
|
+
readonly path: "/api/auth/status";
|
|
157
|
+
readonly description: "Check current authentication status. Returns whether authenticated, email, insider status, and key metadata.";
|
|
158
|
+
}, {
|
|
159
|
+
readonly body: z.ZodObject<{
|
|
160
|
+
email: z.ZodOptional<z.ZodString>;
|
|
161
|
+
returnTo: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
readonly response: z.ZodObject<{
|
|
164
|
+
verifyUrl: z.ZodString;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
readonly auth: "none";
|
|
167
|
+
readonly kind: "write";
|
|
168
|
+
readonly name: "sendMagicLink";
|
|
169
|
+
readonly method: "POST";
|
|
170
|
+
readonly path: "/api/auth/magic";
|
|
171
|
+
readonly description: "Request a sign-in link by email. Always answers with a verification URL, whether or not the email belongs to an insider.";
|
|
172
|
+
}, {
|
|
173
|
+
readonly query: z.ZodObject<{
|
|
174
|
+
path: z.ZodString;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
readonly response: z.ZodObject<{
|
|
177
|
+
path: z.ZodString;
|
|
178
|
+
key: z.ZodString;
|
|
179
|
+
}, z.core.$strip>;
|
|
180
|
+
readonly auth: {
|
|
181
|
+
readonly schemes: readonly [{
|
|
182
|
+
readonly in: "header";
|
|
183
|
+
readonly name: "X-API-Key";
|
|
184
|
+
}];
|
|
185
|
+
};
|
|
186
|
+
readonly kind: "read";
|
|
187
|
+
readonly name: "pathKey";
|
|
188
|
+
readonly method: "GET";
|
|
189
|
+
readonly path: "/key";
|
|
190
|
+
readonly description: "Compute the outsider path key for a path from the machine seed sent in X-API-Key.";
|
|
191
|
+
}, {
|
|
192
|
+
readonly response: z.ZodObject<{
|
|
193
|
+
key: z.ZodString;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
readonly auth: {
|
|
196
|
+
readonly schemes: readonly [{
|
|
197
|
+
readonly in: "header";
|
|
198
|
+
readonly name: "X-API-Key";
|
|
199
|
+
}];
|
|
200
|
+
};
|
|
201
|
+
readonly kind: "read";
|
|
202
|
+
readonly name: "insiderKey";
|
|
203
|
+
readonly method: "GET";
|
|
204
|
+
readonly path: "/insider-key";
|
|
205
|
+
readonly description: "Compute the insider key for the machine seed sent in X-API-Key.";
|
|
206
|
+
}, {
|
|
207
|
+
readonly body: z.ZodObject<{
|
|
208
|
+
query: z.ZodString;
|
|
209
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
readonly response: z.ZodObject<{
|
|
213
|
+
results: z.ZodArray<z.ZodObject<{
|
|
214
|
+
filePath: z.ZodString;
|
|
215
|
+
browsePath: z.ZodString;
|
|
216
|
+
fileName: z.ZodString;
|
|
217
|
+
bestScore: z.ZodNumber;
|
|
218
|
+
domains: z.ZodArray<z.ZodUnknown>;
|
|
219
|
+
title: z.ZodOptional<z.ZodUnknown>;
|
|
220
|
+
author: z.ZodOptional<z.ZodUnknown>;
|
|
221
|
+
participants: z.ZodOptional<z.ZodUnknown>;
|
|
222
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
223
|
+
chunks: z.ZodArray<z.ZodObject<{
|
|
224
|
+
text: z.ZodString;
|
|
225
|
+
index: z.ZodNumber;
|
|
226
|
+
score: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
mtime: z.ZodOptional<z.ZodString>;
|
|
229
|
+
}, z.core.$strip>>;
|
|
230
|
+
metadata: z.ZodObject<{
|
|
231
|
+
domains: z.ZodArray<z.ZodUnknown>;
|
|
232
|
+
authors: z.ZodArray<z.ZodUnknown>;
|
|
233
|
+
participants: z.ZodArray<z.ZodUnknown>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
readonly auth: {
|
|
237
|
+
readonly schemes: readonly [{
|
|
238
|
+
readonly in: "query";
|
|
239
|
+
readonly name: "k";
|
|
240
|
+
}, {
|
|
241
|
+
readonly in: "cookie";
|
|
242
|
+
readonly name: "jeeves_session";
|
|
243
|
+
}];
|
|
244
|
+
readonly insiderOnly: true;
|
|
245
|
+
};
|
|
246
|
+
readonly kind: "read";
|
|
247
|
+
readonly name: "search";
|
|
248
|
+
readonly method: "POST";
|
|
249
|
+
readonly path: "/api/search";
|
|
250
|
+
readonly description: "Semantic search through jeeves-watcher, grouped by file and filtered to the scopes of the caller.";
|
|
251
|
+
}, {
|
|
252
|
+
readonly response: z.ZodUnknown;
|
|
253
|
+
readonly auth: {
|
|
254
|
+
readonly schemes: readonly [{
|
|
255
|
+
readonly in: "query";
|
|
256
|
+
readonly name: "k";
|
|
257
|
+
}, {
|
|
258
|
+
readonly in: "cookie";
|
|
259
|
+
readonly name: "jeeves_session";
|
|
260
|
+
}];
|
|
261
|
+
readonly insiderOnly: true;
|
|
262
|
+
};
|
|
263
|
+
readonly kind: "read";
|
|
264
|
+
readonly name: "searchFacets";
|
|
265
|
+
readonly method: "GET";
|
|
266
|
+
readonly path: "/api/search/facets";
|
|
267
|
+
readonly description: "Search facets from jeeves-watcher, passed through unchanged.";
|
|
268
|
+
}, {
|
|
269
|
+
readonly query: z.ZodObject<{
|
|
270
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
271
|
+
d: z.ZodOptional<z.ZodString>;
|
|
272
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
273
|
+
s: z.ZodOptional<z.ZodString>;
|
|
274
|
+
key: z.ZodOptional<z.ZodString>;
|
|
275
|
+
}, z.core.$strip>;
|
|
276
|
+
readonly response: z.ZodArray<z.ZodObject<{
|
|
277
|
+
letter: z.ZodString;
|
|
278
|
+
label: z.ZodString;
|
|
279
|
+
}, z.core.$strip>>;
|
|
280
|
+
readonly auth: {
|
|
281
|
+
readonly schemes: readonly [{
|
|
282
|
+
readonly in: "query";
|
|
283
|
+
readonly name: "k";
|
|
284
|
+
}, {
|
|
285
|
+
readonly in: "cookie";
|
|
286
|
+
readonly name: "jeeves_session";
|
|
287
|
+
}];
|
|
288
|
+
};
|
|
289
|
+
readonly kind: "read";
|
|
290
|
+
readonly name: "drives";
|
|
291
|
+
readonly method: "GET";
|
|
292
|
+
readonly path: "/api/drives";
|
|
293
|
+
readonly description: "List available root drives/labels configured on the server.";
|
|
294
|
+
}, {
|
|
295
|
+
readonly params: z.ZodObject<{
|
|
296
|
+
'*': z.ZodString;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
readonly query: z.ZodObject<{
|
|
299
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
300
|
+
d: z.ZodOptional<z.ZodString>;
|
|
301
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
302
|
+
s: z.ZodOptional<z.ZodString>;
|
|
303
|
+
key: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
readonly response: z.ZodUnion<readonly [z.ZodObject<{
|
|
306
|
+
type: z.ZodLiteral<"file">;
|
|
307
|
+
path: z.ZodString;
|
|
308
|
+
ext: z.ZodString;
|
|
309
|
+
size: z.ZodNumber;
|
|
310
|
+
mtime: z.ZodString;
|
|
311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
+
path: z.ZodString;
|
|
313
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
314
|
+
name: z.ZodString;
|
|
315
|
+
type: z.ZodEnum<{
|
|
316
|
+
file: "file";
|
|
317
|
+
directory: "directory";
|
|
318
|
+
}>;
|
|
319
|
+
ext: z.ZodString;
|
|
320
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
321
|
+
mtime: z.ZodNullable<z.ZodString>;
|
|
322
|
+
itemCount: z.ZodNullable<z.ZodNumber>;
|
|
323
|
+
shareUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
324
|
+
}, z.core.$strip>>;
|
|
325
|
+
breadcrumbs: z.ZodArray<z.ZodObject<{
|
|
326
|
+
label: z.ZodString;
|
|
327
|
+
path: z.ZodString;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
isInsider: z.ZodBoolean;
|
|
330
|
+
}, z.core.$strip>]>;
|
|
331
|
+
readonly auth: {
|
|
332
|
+
readonly schemes: readonly [{
|
|
333
|
+
readonly in: "query";
|
|
334
|
+
readonly name: "k";
|
|
335
|
+
}, {
|
|
336
|
+
readonly in: "cookie";
|
|
337
|
+
readonly name: "jeeves_session";
|
|
338
|
+
}];
|
|
339
|
+
};
|
|
340
|
+
readonly kind: "read";
|
|
341
|
+
readonly name: "browse";
|
|
342
|
+
readonly method: "GET";
|
|
343
|
+
readonly path: "/api/path/*";
|
|
344
|
+
readonly description: "Get file or directory metadata. For files: size, mtime, content type, rendered HTML availability. For directories: listing of entries.";
|
|
345
|
+
}, {
|
|
346
|
+
readonly params: z.ZodObject<{
|
|
347
|
+
'*': z.ZodString;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
readonly query: z.ZodObject<{
|
|
350
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
351
|
+
d: z.ZodOptional<z.ZodString>;
|
|
352
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
353
|
+
s: z.ZodOptional<z.ZodString>;
|
|
354
|
+
key: z.ZodOptional<z.ZodString>;
|
|
355
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
356
|
+
render_diagrams: z.ZodOptional<z.ZodString>;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
readonly response: z.ZodObject<{
|
|
359
|
+
type: z.ZodEnum<{
|
|
360
|
+
plantuml: "plantuml";
|
|
361
|
+
text: "text";
|
|
362
|
+
markdown: "markdown";
|
|
363
|
+
mermaid: "mermaid";
|
|
364
|
+
svg: "svg";
|
|
365
|
+
csv: "csv";
|
|
366
|
+
image: "image";
|
|
367
|
+
binary: "binary";
|
|
368
|
+
}>;
|
|
369
|
+
content: z.ZodOptional<z.ZodString>;
|
|
370
|
+
html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
371
|
+
headings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
372
|
+
level: z.ZodNumber;
|
|
373
|
+
text: z.ZodString;
|
|
374
|
+
slug: z.ZodString;
|
|
375
|
+
}, z.core.$strip>>>;
|
|
376
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
377
|
+
fileName: z.ZodString;
|
|
378
|
+
breadcrumbs: z.ZodArray<z.ZodObject<{
|
|
379
|
+
label: z.ZodString;
|
|
380
|
+
path: z.ZodString;
|
|
381
|
+
}, z.core.$strip>>;
|
|
382
|
+
isInsider: z.ZodBoolean;
|
|
383
|
+
mtime: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
renderAs: z.ZodOptional<z.ZodString>;
|
|
385
|
+
matchedRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
386
|
+
title: z.ZodOptional<z.ZodString>;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
readonly auth: {
|
|
389
|
+
readonly schemes: readonly [{
|
|
390
|
+
readonly in: "query";
|
|
391
|
+
readonly name: "k";
|
|
392
|
+
}, {
|
|
393
|
+
readonly in: "cookie";
|
|
394
|
+
readonly name: "jeeves_session";
|
|
395
|
+
}];
|
|
396
|
+
};
|
|
397
|
+
readonly kind: "read";
|
|
398
|
+
readonly name: "fileContent";
|
|
399
|
+
readonly method: "GET";
|
|
400
|
+
readonly path: "/api/file/*";
|
|
401
|
+
readonly description: "Get a file with type-specific handling: Markdown, CSV and diagrams rendered to HTML, other text as is, images and binaries by name. `raw=1` skips rendering.";
|
|
402
|
+
}, {
|
|
403
|
+
readonly params: z.ZodObject<{
|
|
404
|
+
'*': z.ZodString;
|
|
405
|
+
}, z.core.$strip>;
|
|
406
|
+
readonly query: z.ZodObject<{
|
|
407
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
408
|
+
d: z.ZodOptional<z.ZodString>;
|
|
409
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
410
|
+
s: z.ZodOptional<z.ZodString>;
|
|
411
|
+
key: z.ZodOptional<z.ZodString>;
|
|
412
|
+
}, z.core.$strip>;
|
|
413
|
+
readonly body: z.ZodObject<{
|
|
414
|
+
content: z.ZodString;
|
|
415
|
+
}, z.core.$strip>;
|
|
416
|
+
readonly response: z.ZodObject<{
|
|
417
|
+
ok: z.ZodLiteral<true>;
|
|
418
|
+
path: z.ZodString;
|
|
419
|
+
size: z.ZodNumber;
|
|
420
|
+
}, z.core.$strip>;
|
|
421
|
+
readonly auth: {
|
|
422
|
+
readonly schemes: readonly [{
|
|
423
|
+
readonly in: "query";
|
|
424
|
+
readonly name: "k";
|
|
425
|
+
}, {
|
|
426
|
+
readonly in: "cookie";
|
|
427
|
+
readonly name: "jeeves_session";
|
|
428
|
+
}];
|
|
429
|
+
readonly insiderOnly: true;
|
|
430
|
+
};
|
|
431
|
+
readonly kind: "write";
|
|
432
|
+
readonly name: "fileWrite";
|
|
433
|
+
readonly method: "PUT";
|
|
434
|
+
readonly path: "/api/file/*";
|
|
435
|
+
readonly description: "Overwrite the content of an existing file. Insider-only; the file must already exist.";
|
|
436
|
+
}, {
|
|
437
|
+
readonly params: z.ZodObject<{
|
|
438
|
+
'*': z.ZodString;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
readonly query: z.ZodObject<{
|
|
441
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
442
|
+
d: z.ZodOptional<z.ZodString>;
|
|
443
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
444
|
+
s: z.ZodOptional<z.ZodString>;
|
|
445
|
+
key: z.ZodOptional<z.ZodString>;
|
|
446
|
+
}, z.core.$strip>;
|
|
447
|
+
readonly body: z.ZodObject<{
|
|
448
|
+
action: z.ZodEnum<{
|
|
449
|
+
"edit-block": "edit-block";
|
|
450
|
+
"delete-block": "delete-block";
|
|
451
|
+
"insert-block": "insert-block";
|
|
452
|
+
"edit-cell": "edit-cell";
|
|
453
|
+
"toggle-checkbox": "toggle-checkbox";
|
|
454
|
+
}>;
|
|
455
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
456
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
457
|
+
content: z.ZodOptional<z.ZodString>;
|
|
458
|
+
atLine: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
460
|
+
before: "before";
|
|
461
|
+
after: "after";
|
|
462
|
+
}>>;
|
|
463
|
+
context: z.ZodOptional<z.ZodString>;
|
|
464
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
465
|
+
col: z.ZodOptional<z.ZodNumber>;
|
|
466
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
checked: z.ZodOptional<z.ZodBoolean>;
|
|
468
|
+
}, z.core.$strip>;
|
|
469
|
+
readonly response: z.ZodObject<{
|
|
470
|
+
ok: z.ZodLiteral<true>;
|
|
471
|
+
}, z.core.$strip>;
|
|
472
|
+
readonly auth: {
|
|
473
|
+
readonly schemes: readonly [{
|
|
474
|
+
readonly in: "query";
|
|
475
|
+
readonly name: "k";
|
|
476
|
+
}, {
|
|
477
|
+
readonly in: "cookie";
|
|
478
|
+
readonly name: "jeeves_session";
|
|
479
|
+
}];
|
|
480
|
+
readonly insiderOnly: true;
|
|
481
|
+
};
|
|
482
|
+
readonly kind: "write";
|
|
483
|
+
readonly name: "fileMutate";
|
|
484
|
+
readonly method: "POST";
|
|
485
|
+
readonly path: "/api/file/*";
|
|
486
|
+
readonly description: "Apply a structured mutation to a .md file. Insider-only. Supports: edit-block, delete-block, insert-block, edit-cell, toggle-checkbox.";
|
|
487
|
+
}, {
|
|
488
|
+
readonly params: z.ZodObject<{
|
|
489
|
+
'*': z.ZodString;
|
|
490
|
+
}, z.core.$strip>;
|
|
491
|
+
readonly query: z.ZodObject<{
|
|
492
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
493
|
+
d: z.ZodOptional<z.ZodString>;
|
|
494
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
495
|
+
s: z.ZodOptional<z.ZodString>;
|
|
496
|
+
key: z.ZodOptional<z.ZodString>;
|
|
497
|
+
download: z.ZodOptional<z.ZodString>;
|
|
498
|
+
}, z.core.$strip>;
|
|
499
|
+
readonly response: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
|
|
500
|
+
readonly contentType: "application/octet-stream";
|
|
501
|
+
readonly auth: {
|
|
502
|
+
readonly schemes: readonly [{
|
|
503
|
+
readonly in: "query";
|
|
504
|
+
readonly name: "k";
|
|
505
|
+
}, {
|
|
506
|
+
readonly in: "cookie";
|
|
507
|
+
readonly name: "jeeves_session";
|
|
508
|
+
}];
|
|
509
|
+
};
|
|
510
|
+
readonly kind: "read";
|
|
511
|
+
readonly name: "raw";
|
|
512
|
+
readonly method: "GET";
|
|
513
|
+
readonly path: "/api/raw/*";
|
|
514
|
+
readonly description: "Download a file as is, with its own content type. `download=1` always sends it as an attachment.";
|
|
515
|
+
}, {
|
|
516
|
+
readonly params: z.ZodObject<{
|
|
517
|
+
'*': z.ZodString;
|
|
518
|
+
}, z.core.$strip>;
|
|
519
|
+
readonly query: z.ZodObject<{
|
|
520
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
521
|
+
d: z.ZodOptional<z.ZodString>;
|
|
522
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
523
|
+
s: z.ZodOptional<z.ZodString>;
|
|
524
|
+
key: z.ZodOptional<z.ZodString>;
|
|
525
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
526
|
+
pdf: "pdf";
|
|
527
|
+
docx: "docx";
|
|
528
|
+
zip: "zip";
|
|
529
|
+
tar: "tar";
|
|
530
|
+
}>>;
|
|
531
|
+
}, z.core.$strip>;
|
|
532
|
+
readonly response: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
|
|
533
|
+
readonly contentType: "application/octet-stream";
|
|
534
|
+
readonly auth: {
|
|
535
|
+
readonly schemes: readonly [{
|
|
536
|
+
readonly in: "query";
|
|
537
|
+
readonly name: "k";
|
|
538
|
+
}, {
|
|
539
|
+
readonly in: "cookie";
|
|
540
|
+
readonly name: "jeeves_session";
|
|
541
|
+
}];
|
|
542
|
+
};
|
|
543
|
+
readonly kind: "read";
|
|
544
|
+
readonly name: "export";
|
|
545
|
+
readonly method: "GET";
|
|
546
|
+
readonly path: "/api/export/*";
|
|
547
|
+
readonly description: "Export a Markdown document as PDF or DOCX, or a directory as a ZIP or Tar archive (archives for insiders only).";
|
|
548
|
+
}, {
|
|
549
|
+
readonly params: z.ZodObject<{
|
|
550
|
+
'*': z.ZodString;
|
|
551
|
+
}, z.core.$strip>;
|
|
552
|
+
readonly query: z.ZodObject<{
|
|
553
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
554
|
+
d: z.ZodOptional<z.ZodString>;
|
|
555
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
556
|
+
s: z.ZodOptional<z.ZodString>;
|
|
557
|
+
key: z.ZodOptional<z.ZodString>;
|
|
558
|
+
}, z.core.$strip>;
|
|
559
|
+
readonly response: z.ZodObject<{
|
|
560
|
+
cleared: z.ZodObject<{
|
|
561
|
+
exports: z.ZodNumber;
|
|
562
|
+
diagrams: z.ZodNumber;
|
|
563
|
+
}, z.core.$strip>;
|
|
564
|
+
}, z.core.$strip>;
|
|
565
|
+
readonly auth: {
|
|
566
|
+
readonly schemes: readonly [{
|
|
567
|
+
readonly in: "query";
|
|
568
|
+
readonly name: "k";
|
|
569
|
+
}, {
|
|
570
|
+
readonly in: "cookie";
|
|
571
|
+
readonly name: "jeeves_session";
|
|
572
|
+
}];
|
|
573
|
+
readonly insiderOnly: true;
|
|
574
|
+
};
|
|
575
|
+
readonly kind: "write";
|
|
576
|
+
readonly name: "exportCacheClear";
|
|
577
|
+
readonly method: "DELETE";
|
|
578
|
+
readonly path: "/api/export-cache/*";
|
|
579
|
+
readonly description: "Clear the export and diagram caches for a given path.";
|
|
580
|
+
}, {
|
|
581
|
+
readonly params: z.ZodObject<{
|
|
582
|
+
'*': z.ZodString;
|
|
583
|
+
}, z.core.$strip>;
|
|
584
|
+
readonly query: z.ZodObject<{
|
|
585
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
586
|
+
d: z.ZodOptional<z.ZodString>;
|
|
587
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
588
|
+
s: z.ZodOptional<z.ZodString>;
|
|
589
|
+
key: z.ZodOptional<z.ZodString>;
|
|
590
|
+
format: z.ZodOptional<z.ZodString>;
|
|
591
|
+
}, z.core.$strip>;
|
|
592
|
+
readonly response: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
|
|
593
|
+
readonly contentType: "application/octet-stream";
|
|
594
|
+
readonly auth: {
|
|
595
|
+
readonly schemes: readonly [{
|
|
596
|
+
readonly in: "query";
|
|
597
|
+
readonly name: "k";
|
|
598
|
+
}, {
|
|
599
|
+
readonly in: "cookie";
|
|
600
|
+
readonly name: "jeeves_session";
|
|
601
|
+
}];
|
|
602
|
+
};
|
|
603
|
+
readonly kind: "read";
|
|
604
|
+
readonly name: "exportMermaid";
|
|
605
|
+
readonly method: "GET";
|
|
606
|
+
readonly path: "/api/mermaid-export/*";
|
|
607
|
+
readonly description: "Export a Mermaid diagram file as SVG, PNG or PDF.";
|
|
608
|
+
}, {
|
|
609
|
+
readonly params: z.ZodObject<{
|
|
610
|
+
'*': z.ZodString;
|
|
611
|
+
}, z.core.$strip>;
|
|
612
|
+
readonly query: z.ZodObject<{
|
|
613
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
614
|
+
d: z.ZodOptional<z.ZodString>;
|
|
615
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
616
|
+
s: z.ZodOptional<z.ZodString>;
|
|
617
|
+
key: z.ZodOptional<z.ZodString>;
|
|
618
|
+
format: z.ZodOptional<z.ZodString>;
|
|
619
|
+
}, z.core.$strip>;
|
|
620
|
+
readonly response: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
|
|
621
|
+
readonly contentType: "application/octet-stream";
|
|
622
|
+
readonly auth: {
|
|
623
|
+
readonly schemes: readonly [{
|
|
624
|
+
readonly in: "query";
|
|
625
|
+
readonly name: "k";
|
|
626
|
+
}, {
|
|
627
|
+
readonly in: "cookie";
|
|
628
|
+
readonly name: "jeeves_session";
|
|
629
|
+
}];
|
|
630
|
+
};
|
|
631
|
+
readonly kind: "read";
|
|
632
|
+
readonly name: "exportPlantUml";
|
|
633
|
+
readonly method: "GET";
|
|
634
|
+
readonly path: "/api/plantuml-export/*";
|
|
635
|
+
readonly description: "Export a PlantUML diagram file in one of the formats the configured renderers support (SVG, PNG, PDF, EPS).";
|
|
636
|
+
}, {
|
|
637
|
+
readonly params: z.ZodObject<{
|
|
638
|
+
'*': z.ZodString;
|
|
639
|
+
}, z.core.$strip>;
|
|
640
|
+
readonly query: z.ZodObject<{
|
|
641
|
+
exp: z.ZodOptional<z.ZodString>;
|
|
642
|
+
d: z.ZodOptional<z.ZodString>;
|
|
643
|
+
dirs: z.ZodOptional<z.ZodString>;
|
|
644
|
+
s: z.ZodOptional<z.ZodString>;
|
|
645
|
+
key: z.ZodOptional<z.ZodString>;
|
|
646
|
+
}, z.core.$strip>;
|
|
647
|
+
readonly response: z.ZodObject<{
|
|
648
|
+
exists: z.ZodBoolean;
|
|
649
|
+
isDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
650
|
+
pageUrl: z.ZodOptional<z.ZodString>;
|
|
651
|
+
rawUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
652
|
+
downloadUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
653
|
+
exportLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
654
|
+
format: z.ZodString;
|
|
655
|
+
url: z.ZodString;
|
|
656
|
+
}, z.core.$strip>>>;
|
|
657
|
+
}, z.core.$strip>;
|
|
658
|
+
readonly auth: {
|
|
659
|
+
readonly schemes: readonly [{
|
|
660
|
+
readonly in: "query";
|
|
661
|
+
readonly name: "k";
|
|
662
|
+
}, {
|
|
663
|
+
readonly in: "cookie";
|
|
664
|
+
readonly name: "jeeves_session";
|
|
665
|
+
}];
|
|
666
|
+
};
|
|
667
|
+
readonly kind: "read";
|
|
668
|
+
readonly name: "linkInfo";
|
|
669
|
+
readonly method: "GET";
|
|
670
|
+
readonly path: "/api/link-info/*";
|
|
671
|
+
readonly description: "Query available link types for a path (exists, page URL, raw URL, export links for PDF/DOCX/SVG/PNG).";
|
|
672
|
+
}, {
|
|
673
|
+
readonly params: z.ZodObject<{
|
|
674
|
+
type: z.ZodEnum<{
|
|
675
|
+
plantuml: "plantuml";
|
|
676
|
+
mermaid: "mermaid";
|
|
677
|
+
}>;
|
|
678
|
+
hash: z.ZodString;
|
|
679
|
+
}, z.core.$strip>;
|
|
680
|
+
readonly response: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
|
|
681
|
+
readonly contentType: "image/svg+xml";
|
|
682
|
+
readonly auth: "none";
|
|
683
|
+
readonly kind: "read";
|
|
684
|
+
readonly name: "diagram";
|
|
685
|
+
readonly method: "GET";
|
|
686
|
+
readonly path: "/api/diagram/:type/:hash";
|
|
687
|
+
readonly description: "Get a diagram embedded in a rendered document, as SVG, by its type and content hash.";
|
|
688
|
+
}, {
|
|
689
|
+
readonly params: z.ZodObject<{
|
|
690
|
+
slug: z.ZodString;
|
|
691
|
+
}, z.core.$strip>;
|
|
692
|
+
readonly response: z.ZodObject<{
|
|
693
|
+
type: z.ZodEnum<{
|
|
694
|
+
plantuml: "plantuml";
|
|
695
|
+
text: "text";
|
|
696
|
+
markdown: "markdown";
|
|
697
|
+
mermaid: "mermaid";
|
|
698
|
+
svg: "svg";
|
|
699
|
+
csv: "csv";
|
|
700
|
+
image: "image";
|
|
701
|
+
binary: "binary";
|
|
702
|
+
}>;
|
|
703
|
+
content: z.ZodOptional<z.ZodString>;
|
|
704
|
+
html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
705
|
+
headings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
706
|
+
level: z.ZodNumber;
|
|
707
|
+
text: z.ZodString;
|
|
708
|
+
slug: z.ZodString;
|
|
709
|
+
}, z.core.$strip>>>;
|
|
710
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
711
|
+
fileName: z.ZodString;
|
|
712
|
+
breadcrumbs: z.ZodArray<z.ZodObject<{
|
|
713
|
+
label: z.ZodString;
|
|
714
|
+
path: z.ZodString;
|
|
715
|
+
}, z.core.$strip>>;
|
|
716
|
+
isInsider: z.ZodBoolean;
|
|
717
|
+
mtime: z.ZodOptional<z.ZodNumber>;
|
|
718
|
+
renderAs: z.ZodOptional<z.ZodString>;
|
|
719
|
+
matchedRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
720
|
+
title: z.ZodOptional<z.ZodString>;
|
|
721
|
+
}, z.core.$strip>;
|
|
722
|
+
readonly auth: "none";
|
|
723
|
+
readonly kind: "read";
|
|
724
|
+
readonly name: "publicContent";
|
|
725
|
+
readonly method: "GET";
|
|
726
|
+
readonly path: "/api/public-content/:slug";
|
|
727
|
+
readonly description: "Get one of the public pages of the server (readme, privacy, terms) rendered as Markdown.";
|
|
728
|
+
}, {
|
|
729
|
+
readonly body: z.ZodObject<{
|
|
730
|
+
path: z.ZodString;
|
|
731
|
+
expiry: z.ZodOptional<z.ZodString>;
|
|
732
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
733
|
+
dirs: z.ZodOptional<z.ZodBoolean>;
|
|
734
|
+
}, z.core.$strip>;
|
|
735
|
+
readonly response: z.ZodObject<{
|
|
736
|
+
url: z.ZodString;
|
|
737
|
+
path: z.ZodString;
|
|
738
|
+
exp: z.ZodNullable<z.ZodString>;
|
|
739
|
+
depth: z.ZodNumber;
|
|
740
|
+
dirs: z.ZodBoolean;
|
|
741
|
+
isDirectory: z.ZodBoolean;
|
|
742
|
+
}, z.core.$strip>;
|
|
743
|
+
readonly auth: {
|
|
744
|
+
readonly schemes: readonly [{
|
|
745
|
+
readonly in: "query";
|
|
746
|
+
readonly name: "k";
|
|
747
|
+
}, {
|
|
748
|
+
readonly in: "cookie";
|
|
749
|
+
readonly name: "jeeves_session";
|
|
750
|
+
}];
|
|
751
|
+
readonly insiderOnly: true;
|
|
752
|
+
};
|
|
753
|
+
readonly kind: "read";
|
|
754
|
+
readonly name: "share";
|
|
755
|
+
readonly method: "POST";
|
|
756
|
+
readonly path: "/api/share";
|
|
757
|
+
readonly description: "Sign a share link for a path: a path key, optionally expiring, or a deep share (`depth`, `dirs`). The response reports whether the path is a directory.";
|
|
758
|
+
}, {
|
|
759
|
+
readonly body: z.ZodObject<{
|
|
760
|
+
path: z.ZodString;
|
|
761
|
+
insiders: z.ZodArray<z.ZodString>;
|
|
762
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
763
|
+
dirs: z.ZodOptional<z.ZodBoolean>;
|
|
764
|
+
enforceOutsiderPolicy: z.ZodOptional<z.ZodBoolean>;
|
|
765
|
+
}, z.core.$strip>;
|
|
766
|
+
readonly response: z.ZodObject<{
|
|
767
|
+
url: z.ZodNullable<z.ZodString>;
|
|
768
|
+
type: z.ZodEnum<{
|
|
769
|
+
insider: "insider";
|
|
770
|
+
"outsider-share": "outsider-share";
|
|
771
|
+
blocked: "blocked";
|
|
772
|
+
"policy-denied": "policy-denied";
|
|
773
|
+
}>;
|
|
774
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
775
|
+
blocked: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
776
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
777
|
+
}, z.core.$strip>;
|
|
778
|
+
readonly auth: {
|
|
779
|
+
readonly schemes: readonly [{
|
|
780
|
+
readonly in: "query";
|
|
781
|
+
readonly name: "k";
|
|
782
|
+
}, {
|
|
783
|
+
readonly in: "cookie";
|
|
784
|
+
readonly name: "jeeves_session";
|
|
785
|
+
}];
|
|
786
|
+
readonly insiderOnly: true;
|
|
787
|
+
};
|
|
788
|
+
readonly kind: "read";
|
|
789
|
+
readonly name: "shareFor";
|
|
790
|
+
readonly method: "POST";
|
|
791
|
+
readonly path: "/api/util/share-for";
|
|
792
|
+
readonly description: "Sign a share link for a path aimed at named insiders: an insider link when every recipient is an insider with access, else an outsider share checked against the outsider policy.";
|
|
793
|
+
}, {
|
|
794
|
+
readonly params: z.ZodObject<{
|
|
795
|
+
file: z.ZodString;
|
|
796
|
+
}, z.core.$strip>;
|
|
797
|
+
readonly response: z.ZodObject<{
|
|
798
|
+
url: z.ZodString;
|
|
799
|
+
}, z.core.$strip>;
|
|
800
|
+
readonly auth: "none";
|
|
801
|
+
readonly kind: "read";
|
|
802
|
+
readonly name: "contentLink";
|
|
803
|
+
readonly method: "GET";
|
|
804
|
+
readonly path: "/api/content-link/:file";
|
|
805
|
+
readonly description: "Pre-computed share link for one of the pinned content pages of the server (privacy, terms).";
|
|
806
|
+
}, {
|
|
807
|
+
readonly response: z.ZodObject<{
|
|
808
|
+
url: z.ZodString;
|
|
809
|
+
}, z.core.$strip>;
|
|
810
|
+
readonly auth: "none";
|
|
811
|
+
readonly kind: "read";
|
|
812
|
+
readonly name: "readmeLink";
|
|
813
|
+
readonly method: "GET";
|
|
814
|
+
readonly path: "/api/readme-link";
|
|
815
|
+
readonly description: "Pre-computed share link for the README of the server.";
|
|
816
|
+
}, {
|
|
817
|
+
readonly query: z.ZodObject<{
|
|
818
|
+
fsPath: z.ZodString;
|
|
819
|
+
}, z.core.$strip>;
|
|
820
|
+
readonly response: z.ZodObject<{
|
|
821
|
+
browsePath: z.ZodString;
|
|
822
|
+
browseUrl: z.ZodString;
|
|
823
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
824
|
+
}, z.core.$strip>;
|
|
825
|
+
readonly auth: {
|
|
826
|
+
readonly schemes: readonly [{
|
|
827
|
+
readonly in: "query";
|
|
828
|
+
readonly name: "k";
|
|
829
|
+
}, {
|
|
830
|
+
readonly in: "cookie";
|
|
831
|
+
readonly name: "jeeves_session";
|
|
832
|
+
}];
|
|
833
|
+
readonly insiderOnly: true;
|
|
834
|
+
};
|
|
835
|
+
readonly kind: "read";
|
|
836
|
+
readonly name: "resolvePath";
|
|
837
|
+
readonly method: "GET";
|
|
838
|
+
readonly path: "/api/resolve-path";
|
|
839
|
+
readonly description: "Convert an absolute filesystem path to a server browse path and optional public URL.";
|
|
840
|
+
}, {
|
|
841
|
+
readonly response: z.ZodObject<{
|
|
842
|
+
ok: z.ZodLiteral<true>;
|
|
843
|
+
keyCreatedAt: z.ZodString;
|
|
844
|
+
invalidates: z.ZodArray<z.ZodEnum<{
|
|
845
|
+
insiderKey: "insiderKey";
|
|
846
|
+
outsiderLinks: "outsiderLinks";
|
|
847
|
+
}>>;
|
|
848
|
+
}, z.core.$strip>;
|
|
849
|
+
readonly auth: {
|
|
850
|
+
readonly schemes: readonly [{
|
|
851
|
+
readonly in: "query";
|
|
852
|
+
readonly name: "k";
|
|
853
|
+
}, {
|
|
854
|
+
readonly in: "cookie";
|
|
855
|
+
readonly name: "jeeves_session";
|
|
856
|
+
}];
|
|
857
|
+
readonly insiderOnly: true;
|
|
858
|
+
};
|
|
859
|
+
readonly kind: "destructive";
|
|
860
|
+
readonly name: "rotateKey";
|
|
861
|
+
readonly method: "POST";
|
|
862
|
+
readonly path: "/api/rotate-key";
|
|
863
|
+
readonly description: "Rotate the key of the calling insider. The old insider key and every outsider link the insider signed stop working.";
|
|
864
|
+
}, {
|
|
865
|
+
readonly body: z.ZodObject<{}, z.core.$loose>;
|
|
866
|
+
readonly response: z.ZodObject<{
|
|
867
|
+
matched: z.ZodNullable<z.ZodString>;
|
|
868
|
+
}, z.core.$strip>;
|
|
869
|
+
readonly auth: {
|
|
870
|
+
readonly schemes: readonly [{
|
|
871
|
+
readonly in: "query";
|
|
872
|
+
readonly name: "k";
|
|
873
|
+
}];
|
|
874
|
+
};
|
|
875
|
+
readonly kind: "write";
|
|
876
|
+
readonly name: "receiveEvent";
|
|
877
|
+
readonly method: "POST";
|
|
878
|
+
readonly path: "/event";
|
|
879
|
+
readonly description: "Event gateway webhook receiver: matches a JSON object against the configured event schemas and queues the matching command.";
|
|
880
|
+
}, {
|
|
881
|
+
readonly query: z.ZodObject<{
|
|
882
|
+
limit: z.ZodOptional<z.ZodString>;
|
|
883
|
+
}, z.core.$strip>;
|
|
884
|
+
readonly response: z.ZodArray<z.ZodObject<{
|
|
885
|
+
ts: z.ZodString;
|
|
886
|
+
event: z.ZodNullable<z.ZodString>;
|
|
887
|
+
matched: z.ZodBoolean;
|
|
888
|
+
exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
889
|
+
timedOut: z.ZodOptional<z.ZodBoolean>;
|
|
890
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
891
|
+
bodyPreview: z.ZodOptional<z.ZodString>;
|
|
892
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
893
|
+
originalBytes: z.ZodOptional<z.ZodNumber>;
|
|
894
|
+
}, z.core.$loose>>;
|
|
895
|
+
readonly auth: {
|
|
896
|
+
readonly schemes: readonly [{
|
|
897
|
+
readonly in: "query";
|
|
898
|
+
readonly name: "k";
|
|
899
|
+
}, {
|
|
900
|
+
readonly in: "cookie";
|
|
901
|
+
readonly name: "jeeves_session";
|
|
902
|
+
}];
|
|
903
|
+
readonly insiderOnly: true;
|
|
904
|
+
};
|
|
905
|
+
readonly kind: "read";
|
|
906
|
+
readonly name: "listEvents";
|
|
907
|
+
readonly method: "GET";
|
|
908
|
+
readonly path: "/api/events";
|
|
909
|
+
readonly description: "Recent event log entries, newest last (insiders with no scopes configured; limit capped at 100).";
|
|
910
|
+
}, {
|
|
911
|
+
readonly body: z.ZodObject<{
|
|
912
|
+
provider: z.ZodString;
|
|
913
|
+
account: z.ZodString;
|
|
914
|
+
authUrl: z.ZodOptional<z.ZodString>;
|
|
915
|
+
tokenUrl: z.ZodOptional<z.ZodString>;
|
|
916
|
+
clientId: z.ZodString;
|
|
917
|
+
clientSecret: z.ZodString;
|
|
918
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
919
|
+
pkce: z.ZodOptional<z.ZodBoolean>;
|
|
920
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
921
|
+
}, z.core.$strip>;
|
|
922
|
+
readonly response: z.ZodObject<{
|
|
923
|
+
authUrl: z.ZodString;
|
|
924
|
+
state: z.ZodString;
|
|
925
|
+
}, z.core.$strip>;
|
|
926
|
+
readonly auth: {
|
|
927
|
+
readonly schemes: readonly [{
|
|
928
|
+
readonly in: "query";
|
|
929
|
+
readonly name: "k";
|
|
930
|
+
}, {
|
|
931
|
+
readonly in: "cookie";
|
|
932
|
+
readonly name: "jeeves_session";
|
|
933
|
+
}];
|
|
934
|
+
readonly insiderOnly: true;
|
|
935
|
+
};
|
|
936
|
+
readonly kind: "write";
|
|
937
|
+
readonly name: "oauthStart";
|
|
938
|
+
readonly method: "POST";
|
|
939
|
+
readonly path: "/api/oauth/start";
|
|
940
|
+
readonly description: "Start an OAuth2 authorization code flow; returns the URL to open in a browser.";
|
|
941
|
+
}, {
|
|
942
|
+
readonly query: z.ZodObject<{
|
|
943
|
+
provider: z.ZodString;
|
|
944
|
+
account: z.ZodString;
|
|
945
|
+
}, z.core.$strip>;
|
|
946
|
+
readonly response: z.ZodObject<{
|
|
947
|
+
exists: z.ZodBoolean;
|
|
948
|
+
expired: z.ZodBoolean;
|
|
949
|
+
provider: z.ZodString;
|
|
950
|
+
account: z.ZodString;
|
|
951
|
+
}, z.core.$strip>;
|
|
952
|
+
readonly auth: {
|
|
953
|
+
readonly schemes: readonly [{
|
|
954
|
+
readonly in: "query";
|
|
955
|
+
readonly name: "k";
|
|
956
|
+
}, {
|
|
957
|
+
readonly in: "cookie";
|
|
958
|
+
readonly name: "jeeves_session";
|
|
959
|
+
}];
|
|
960
|
+
readonly insiderOnly: true;
|
|
961
|
+
};
|
|
962
|
+
readonly kind: "read";
|
|
963
|
+
readonly name: "oauthStatus";
|
|
964
|
+
readonly method: "GET";
|
|
965
|
+
readonly path: "/api/oauth/status";
|
|
966
|
+
readonly description: "Check whether valid OAuth2 credentials exist for a provider/account.";
|
|
967
|
+
}, {
|
|
968
|
+
readonly query: z.ZodObject<{
|
|
969
|
+
provider: z.ZodString;
|
|
970
|
+
account: z.ZodString;
|
|
971
|
+
}, z.core.$strip>;
|
|
972
|
+
readonly response: z.ZodObject<{
|
|
973
|
+
access_token: z.ZodString;
|
|
974
|
+
token_type: z.ZodString;
|
|
975
|
+
expires_in_seconds: z.ZodNullable<z.ZodNumber>;
|
|
976
|
+
}, z.core.$strip>;
|
|
977
|
+
readonly auth: {
|
|
978
|
+
readonly schemes: readonly [{
|
|
979
|
+
readonly in: "query";
|
|
980
|
+
readonly name: "k";
|
|
981
|
+
}, {
|
|
982
|
+
readonly in: "cookie";
|
|
983
|
+
readonly name: "jeeves_session";
|
|
984
|
+
}];
|
|
985
|
+
readonly insiderOnly: true;
|
|
986
|
+
};
|
|
987
|
+
readonly kind: "read";
|
|
988
|
+
readonly name: "oauthToken";
|
|
989
|
+
readonly method: "GET";
|
|
990
|
+
readonly path: "/api/oauth/token";
|
|
991
|
+
readonly description: "Get a valid access token for a provider/account, refreshing it when expired.";
|
|
992
|
+
}, {
|
|
993
|
+
readonly kind: "read";
|
|
994
|
+
readonly response: z.ZodUnknown;
|
|
995
|
+
readonly auth: {
|
|
996
|
+
readonly schemes: readonly [{
|
|
997
|
+
readonly in: "query";
|
|
998
|
+
readonly name: "k";
|
|
999
|
+
}, {
|
|
1000
|
+
readonly in: "cookie";
|
|
1001
|
+
readonly name: "jeeves_session";
|
|
1002
|
+
}];
|
|
1003
|
+
readonly insiderOnly: true;
|
|
1004
|
+
};
|
|
1005
|
+
readonly name: "runnerListJobs";
|
|
1006
|
+
readonly method: "GET";
|
|
1007
|
+
readonly path: "/api/runner/jobs";
|
|
1008
|
+
readonly description: "List the jeeves-runner jobs (runner GET /jobs).";
|
|
1009
|
+
}, {
|
|
1010
|
+
readonly kind: "read";
|
|
1011
|
+
readonly response: z.ZodUnknown;
|
|
1012
|
+
readonly auth: {
|
|
1013
|
+
readonly schemes: readonly [{
|
|
1014
|
+
readonly in: "query";
|
|
1015
|
+
readonly name: "k";
|
|
1016
|
+
}, {
|
|
1017
|
+
readonly in: "cookie";
|
|
1018
|
+
readonly name: "jeeves_session";
|
|
1019
|
+
}];
|
|
1020
|
+
readonly insiderOnly: true;
|
|
1021
|
+
};
|
|
1022
|
+
readonly params: z.ZodObject<{
|
|
1023
|
+
id: z.ZodString;
|
|
1024
|
+
}, z.core.$strip>;
|
|
1025
|
+
readonly name: "runnerGetJob";
|
|
1026
|
+
readonly method: "GET";
|
|
1027
|
+
readonly path: "/api/runner/jobs/:id";
|
|
1028
|
+
readonly description: "One jeeves-runner job (runner GET /jobs/:id).";
|
|
1029
|
+
}, {
|
|
1030
|
+
readonly kind: "read";
|
|
1031
|
+
readonly response: z.ZodUnknown;
|
|
1032
|
+
readonly auth: {
|
|
1033
|
+
readonly schemes: readonly [{
|
|
1034
|
+
readonly in: "query";
|
|
1035
|
+
readonly name: "k";
|
|
1036
|
+
}, {
|
|
1037
|
+
readonly in: "cookie";
|
|
1038
|
+
readonly name: "jeeves_session";
|
|
1039
|
+
}];
|
|
1040
|
+
readonly insiderOnly: true;
|
|
1041
|
+
};
|
|
1042
|
+
readonly params: z.ZodObject<{
|
|
1043
|
+
id: z.ZodString;
|
|
1044
|
+
}, z.core.$strip>;
|
|
1045
|
+
readonly query: z.ZodObject<{
|
|
1046
|
+
limit: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
}, z.core.$strip>;
|
|
1048
|
+
readonly name: "runnerListRuns";
|
|
1049
|
+
readonly method: "GET";
|
|
1050
|
+
readonly path: "/api/runner/jobs/:id/runs";
|
|
1051
|
+
readonly description: "A jeeves-runner job's recent runs (runner GET /jobs/:id/runs).";
|
|
1052
|
+
}, {
|
|
1053
|
+
readonly kind: "write";
|
|
1054
|
+
readonly response: z.ZodUnknown;
|
|
1055
|
+
readonly auth: {
|
|
1056
|
+
readonly schemes: readonly [{
|
|
1057
|
+
readonly in: "query";
|
|
1058
|
+
readonly name: "k";
|
|
1059
|
+
}, {
|
|
1060
|
+
readonly in: "cookie";
|
|
1061
|
+
readonly name: "jeeves_session";
|
|
1062
|
+
}];
|
|
1063
|
+
readonly insiderOnly: true;
|
|
1064
|
+
};
|
|
1065
|
+
readonly params: z.ZodObject<{
|
|
1066
|
+
id: z.ZodString;
|
|
1067
|
+
}, z.core.$strip>;
|
|
1068
|
+
readonly name: "runnerRunJob";
|
|
1069
|
+
readonly method: "POST";
|
|
1070
|
+
readonly path: "/api/runner/jobs/:id/run";
|
|
1071
|
+
readonly description: "Run a jeeves-runner job now (runner POST /jobs/:id/run).";
|
|
1072
|
+
}, {
|
|
1073
|
+
readonly kind: "write";
|
|
1074
|
+
readonly response: z.ZodUnknown;
|
|
1075
|
+
readonly auth: {
|
|
1076
|
+
readonly schemes: readonly [{
|
|
1077
|
+
readonly in: "query";
|
|
1078
|
+
readonly name: "k";
|
|
1079
|
+
}, {
|
|
1080
|
+
readonly in: "cookie";
|
|
1081
|
+
readonly name: "jeeves_session";
|
|
1082
|
+
}];
|
|
1083
|
+
readonly insiderOnly: true;
|
|
1084
|
+
};
|
|
1085
|
+
readonly params: z.ZodObject<{
|
|
1086
|
+
id: z.ZodString;
|
|
1087
|
+
}, z.core.$strip>;
|
|
1088
|
+
readonly name: "runnerEnableJob";
|
|
1089
|
+
readonly method: "PATCH";
|
|
1090
|
+
readonly path: "/api/runner/jobs/:id/enable";
|
|
1091
|
+
readonly description: "Enable a jeeves-runner job (runner PATCH /jobs/:id/enable).";
|
|
1092
|
+
}, {
|
|
1093
|
+
readonly kind: "write";
|
|
1094
|
+
readonly response: z.ZodUnknown;
|
|
1095
|
+
readonly auth: {
|
|
1096
|
+
readonly schemes: readonly [{
|
|
1097
|
+
readonly in: "query";
|
|
1098
|
+
readonly name: "k";
|
|
1099
|
+
}, {
|
|
1100
|
+
readonly in: "cookie";
|
|
1101
|
+
readonly name: "jeeves_session";
|
|
1102
|
+
}];
|
|
1103
|
+
readonly insiderOnly: true;
|
|
1104
|
+
};
|
|
1105
|
+
readonly params: z.ZodObject<{
|
|
1106
|
+
id: z.ZodString;
|
|
1107
|
+
}, z.core.$strip>;
|
|
1108
|
+
readonly name: "runnerDisableJob";
|
|
1109
|
+
readonly method: "PATCH";
|
|
1110
|
+
readonly path: "/api/runner/jobs/:id/disable";
|
|
1111
|
+
readonly description: "Disable a jeeves-runner job (runner PATCH /jobs/:id/disable).";
|
|
1112
|
+
}, {
|
|
1113
|
+
readonly kind: "read";
|
|
1114
|
+
readonly response: z.ZodUnknown;
|
|
1115
|
+
readonly auth: {
|
|
1116
|
+
readonly schemes: readonly [{
|
|
1117
|
+
readonly in: "query";
|
|
1118
|
+
readonly name: "k";
|
|
1119
|
+
}, {
|
|
1120
|
+
readonly in: "cookie";
|
|
1121
|
+
readonly name: "jeeves_session";
|
|
1122
|
+
}];
|
|
1123
|
+
readonly insiderOnly: true;
|
|
1124
|
+
};
|
|
1125
|
+
readonly name: "runnerStatus";
|
|
1126
|
+
readonly method: "GET";
|
|
1127
|
+
readonly path: "/api/runner/status";
|
|
1128
|
+
readonly description: "jeeves-runner status (runner GET /status).";
|
|
1129
|
+
}]>;
|
|
1130
|
+
/** The server endpoint catalog's type. */
|
|
1131
|
+
export type ServerCatalog = typeof SERVER_CATALOG;
|
|
1132
|
+
/** Name of a server catalog entry. */
|
|
1133
|
+
export type ServerEntryName = ServerCatalog['entries'][number]['name'];
|
|
1134
|
+
/** The catalog entry named `N`. */
|
|
1135
|
+
export type ServerEntry<N extends ServerEntryName> = Extract<ServerCatalog['entries'][number], {
|
|
1136
|
+
name: N;
|
|
1137
|
+
}>;
|
|
1138
|
+
/** Request input of entry `N` (params, query and body fields, flat). */
|
|
1139
|
+
export type ServerInput<N extends ServerEntryName> = CatalogInput<ServerEntry<N>>;
|
|
1140
|
+
/** Successful response body of entry `N`. */
|
|
1141
|
+
export type ServerResponse<N extends ServerEntryName> = ClientResponse<ServerEntry<N>>;
|
|
1142
|
+
/** The server's `health` block in `GET /status`. */
|
|
1143
|
+
export type ServerHealth = z.output<typeof serverHealthSchema>;
|