ezship 0.1.16 → 0.1.18
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 +60 -56
- package/access.d.mts +4 -4
- package/access.mjs +13 -13
- package/account.mjs +9 -8
- package/bindings.mjs +9 -27
- package/commands.d.mts +65 -67
- package/commands.mjs +1274 -535
- package/connections.d.mts +2 -3
- package/connections.mjs +10 -22
- package/cron.d.mts +1 -1
- package/cron.mjs +1 -1
- package/documents.d.mts +1 -1
- package/documents.mjs +1 -1
- package/editor-types.json.gz +0 -0
- package/editor.mjs +22 -56
- package/ez.mjs +48 -133
- package/package.json +7 -1
- package/paths.d.mts +24 -0
- package/paths.mjs +103 -0
- package/schema.d.mts +45 -49
- package/schema.mjs +364 -219
- package/session.d.mts +2 -3
- package/session.mjs +3 -5
- package/shape.d.mts +2 -2
- package/shape.mjs +1 -1
- package/signup.mjs +2 -2
- package/types.d.mts +73 -73
- package/update-check.mjs +1 -1
- package/workflow.d.mts +8 -2
- package/workflow.mjs +88 -21
package/commands.d.mts
CHANGED
|
@@ -95,7 +95,7 @@ export type Changes = { added: string[]; modified: string[]; deleted: string[] }
|
|
|
95
95
|
*/
|
|
96
96
|
export interface Workspace {
|
|
97
97
|
callFunction(name: string, input: unknown, preview?: string): Promise<FunctionResult>;
|
|
98
|
-
// Documents (docs/adr/
|
|
98
|
+
// Documents (docs/adr/0233)
|
|
99
99
|
renderDocument(input: RenderRequest): Promise<RenderRow>;
|
|
100
100
|
listRenders(): Promise<RenderRow[]>;
|
|
101
101
|
renderInfo(id: string): Promise<RenderRow>;
|
|
@@ -115,8 +115,6 @@ export interface Workspace {
|
|
|
115
115
|
globalWorkspace?(): Workspace | Promise<Workspace>;
|
|
116
116
|
globalFiles?(): Promise<Record<string, string> | undefined>;
|
|
117
117
|
previewName?(): Promise<string | null>;
|
|
118
|
-
/** The names this client's editor declarations export per module (`@ezship/react`, ...); the CLI's bundle. */
|
|
119
|
-
editorExports?(): Promise<Record<string, string[]>>;
|
|
120
118
|
// the Instance
|
|
121
119
|
instanceStatus(): Promise<InstanceInfo>;
|
|
122
120
|
updateInstance(patch: { name?: string }): Promise<InstanceInfo>;
|
|
@@ -133,7 +131,7 @@ export interface Workspace {
|
|
|
133
131
|
setBuilderRole(id: string, role: string): Promise<void>;
|
|
134
132
|
removeBuilder(id: string): Promise<void>;
|
|
135
133
|
listUsers(): Promise<MemberRow[]>;
|
|
136
|
-
/** Support Requests to the Host's Developers (docs/adr/
|
|
134
|
+
/** Support Requests to the Host's Developers (docs/adr/0208); `site` is the bound Site, or null. */
|
|
137
135
|
openSupportRequest(input: {
|
|
138
136
|
subject: string;
|
|
139
137
|
body: string;
|
|
@@ -141,14 +139,14 @@ export interface Workspace {
|
|
|
141
139
|
}): Promise<SupportRequest>;
|
|
142
140
|
listSupportRequests(): Promise<SupportRequest[]>;
|
|
143
141
|
supportRequest(id: string): Promise<SupportRequest>;
|
|
144
|
-
/** Emails server code sent (docs/adr/
|
|
142
|
+
/** Emails server code sent (docs/adr/0234), newest first; a Limited Builder sees only their Sites'. */
|
|
145
143
|
listEmails(filter?: EmailFilter): Promise<EmailRow[]>;
|
|
146
144
|
emailInfo(id: string): Promise<EmailInfo>;
|
|
147
|
-
/** Integrations (docs/adr/
|
|
145
|
+
/** Integrations (docs/adr/0231): every Builder lists; Admins set, preview and remove. */
|
|
148
146
|
listIntegrations(): Promise<Integration[]>;
|
|
149
147
|
setIntegration(name: string, input: IntegrationInput): Promise<Integration>;
|
|
150
148
|
setIntegrationPreview(name: string, input: IntegrationPreviewInput): Promise<Integration>;
|
|
151
|
-
/** ADR
|
|
149
|
+
/** ADR 0231: Admins set or remove one header or parameter a binding adds. */
|
|
152
150
|
setIntegrationValue(name: string, input: IntegrationValueInput): Promise<Integration>;
|
|
153
151
|
removeIntegrationValue(name: string, key: IntegrationValueKey): Promise<Integration>;
|
|
154
152
|
removeIntegration(name: string, force: boolean): Promise<void>;
|
|
@@ -160,19 +158,18 @@ export interface Workspace {
|
|
|
160
158
|
}): Promise<{ id: string; alreadyMember: boolean; resent?: boolean }>;
|
|
161
159
|
setUserStatus(id: string, status: string): Promise<void>;
|
|
162
160
|
removeUser(id: string): Promise<void>;
|
|
163
|
-
/** Admins: replace a Member's roster groups (docs/adr/
|
|
161
|
+
/** Admins: replace a Member's roster groups (docs/adr/0225). */
|
|
164
162
|
setUserGroups(id: string, groups: string[]): Promise<void>;
|
|
165
|
-
// the Instance's assets (docs/adr/
|
|
163
|
+
// the Instance's assets (docs/adr/0213)
|
|
166
164
|
listAssets(): Promise<AssetRow[]>;
|
|
167
165
|
requestUpload(input: UploadRequest): Promise<UploadTicket>;
|
|
168
166
|
finalizeUpload(id: string): Promise<AssetRow>;
|
|
169
|
-
deleteAsset(id: string, force: boolean): Promise<void>;
|
|
170
167
|
/** The adapter's part of an upload: a local file's size and type, and sending its bytes to the ticket's URL. */
|
|
171
168
|
fileInfo?(
|
|
172
169
|
source: string,
|
|
173
170
|
): Promise<{ size: number; contentType: string | null; filename: string }>;
|
|
174
171
|
sendFile?(upload: UploadTicket["upload"], source: string): Promise<void>;
|
|
175
|
-
// App Attachments (docs/adr/
|
|
172
|
+
// App Attachments (docs/adr/0221): `ez db attach` and `ez db attachment`
|
|
176
173
|
requestAttachment(input: AttachmentRequest): Promise<UploadTicket>;
|
|
177
174
|
finalizeAttachment(id: string): Promise<AttachmentRow>;
|
|
178
175
|
attachmentInfo(id: string): Promise<AttachmentInfo>;
|
|
@@ -196,52 +193,52 @@ export interface Workspace {
|
|
|
196
193
|
},
|
|
197
194
|
): Promise<PushResult>;
|
|
198
195
|
deploy(): Promise<DeployResult>;
|
|
199
|
-
/** The Instance's pushed global/schedules.json (
|
|
196
|
+
/** The Instance's pushed global/schedules.json (ADR 0230), each with its next due time and latest run. */
|
|
200
197
|
listSchedules(): Promise<Schedule[]>;
|
|
201
|
-
/** Listeners (docs/adr/
|
|
198
|
+
/** Listeners (docs/adr/0231): any Builder of the Site. */
|
|
202
199
|
listListeners(): Promise<Listener[]>;
|
|
203
200
|
setListenerSecret(name: string, input: { secret: string; overlapHours?: number }): Promise<void>;
|
|
204
201
|
removeListenerSecret(name: string): Promise<void>;
|
|
205
202
|
listenerEvents(name: string, dead: boolean): Promise<ListenerEvent[]>;
|
|
206
203
|
listenerEvent(name: string, id: string): Promise<ListenerEvent>;
|
|
207
204
|
retryListenerEvent(name: string, id: string): Promise<ListenerEvent>;
|
|
208
|
-
/** API Keys (docs/adr/
|
|
205
|
+
/** API Keys (docs/adr/0232): Admins create and revoke; any Builder of the Site lists. */
|
|
209
206
|
listApiKeys(): Promise<ApiKey[]>;
|
|
210
207
|
createApiKey(input: ApiKeyInput): Promise<CreatedApiKey>;
|
|
211
208
|
revokeApiKey(name: string): Promise<ApiKey>;
|
|
212
209
|
listScheduleRuns(name: string): Promise<ScheduleRun[]>;
|
|
213
210
|
/** Runs a schedule's job now, as its actor; answers the run, failed or not. */
|
|
214
211
|
runSchedule(name: string): Promise<ScheduleRun>;
|
|
215
|
-
/** Stops a schedule's due times (ADR
|
|
212
|
+
/** Stops a schedule's due times (ADR 0230); answers the schedule. */
|
|
216
213
|
pauseSchedule(name: string): Promise<Schedule>;
|
|
217
214
|
/** Starts a paused schedule's due times again from now, never catching up; answers the schedule. */
|
|
218
215
|
resumeSchedule(name: string): Promise<Schedule>;
|
|
219
|
-
/** `global`: the Global Working Copy to check against, as a Preview would upload it (ADR
|
|
216
|
+
/** `global`: the Global Working Copy to check against, as a Preview would upload it (ADR 0217). */
|
|
220
217
|
check(
|
|
221
218
|
files: Record<string, string>,
|
|
222
219
|
global?: Record<string, string>,
|
|
223
220
|
): Promise<{ diagnostics: Diagnostic[] }>;
|
|
224
|
-
/** `ez format` (docs/adr/
|
|
221
|
+
/** `ez format` (docs/adr/0237): the formatter's changed files, or the syntax errors that stopped it. */
|
|
225
222
|
format(files: Record<string, string>): Promise<FormatResult>;
|
|
226
223
|
listPreviews(): Promise<PreviewRow[]>;
|
|
227
|
-
/** Other Builders' Previews of this Site, most recently active first (docs/adr/
|
|
224
|
+
/** Other Builders' Previews of this Site, most recently active first (docs/adr/0211). */
|
|
228
225
|
listOtherPreviews(): Promise<OtherPreview[]>;
|
|
229
226
|
uploadPreview(name: string, input: PreviewInput): Promise<PreviewResult>;
|
|
230
227
|
deletePreview(name: string): Promise<void>;
|
|
231
|
-
/** A one-time link to the deployed app, or to the caller's Preview `preview` (docs/adr/
|
|
228
|
+
/** A one-time link to the deployed app, or to the caller's Preview `preview` (docs/adr/0203). */
|
|
232
229
|
appLink(preview?: string | null): Promise<AppLink>;
|
|
233
230
|
dbSchema(): Promise<LiveSchema>;
|
|
234
231
|
dbTables(): Promise<TableInfo[]>;
|
|
235
232
|
dbSql(statement: string): Promise<SqlResult>;
|
|
236
233
|
dbAggregate(table: string, query: AggregateQuery): Promise<DataResult<AggregateRow>>;
|
|
237
|
-
/** A query under one Member's access rules (docs/adr/
|
|
234
|
+
/** A query under one Member's access rules (docs/adr/0225); `as` is their id or email. */
|
|
238
235
|
dbQueryAs(
|
|
239
236
|
table: string,
|
|
240
237
|
as: string,
|
|
241
238
|
query: Record<string, unknown>,
|
|
242
239
|
): Promise<DataResult<Record<string, unknown>>>;
|
|
243
240
|
dbActors(query: DataQuery): Promise<DataResult<ActorRow>>;
|
|
244
|
-
/** Admins: blank columns of a Table's closed History rows (docs/adr/
|
|
241
|
+
/** Admins: blank columns of a Table's closed History rows (docs/adr/0218). */
|
|
245
242
|
dbRedact(input: RedactInput): Promise<RedactResult>;
|
|
246
243
|
siteAccess(): Promise<SiteAccess>;
|
|
247
244
|
setRestricted(restricted: boolean): Promise<SiteAccess>;
|
|
@@ -249,7 +246,7 @@ export interface Workspace {
|
|
|
249
246
|
denyBuilder(id: string): Promise<void>;
|
|
250
247
|
allowUser(id: string): Promise<void>;
|
|
251
248
|
denyUser(id: string): Promise<void>;
|
|
252
|
-
/** Members in this group, implied ones included, may open the Restricted Site (docs/adr/
|
|
249
|
+
/** Members in this group, implied ones included, may open the Restricted Site (docs/adr/0225). */
|
|
253
250
|
allowGroup(name: string): Promise<void>;
|
|
254
251
|
denyGroup(name: string): Promise<void>;
|
|
255
252
|
}
|
|
@@ -263,7 +260,6 @@ export type RemoteMethod = Exclude<
|
|
|
263
260
|
| "pulled"
|
|
264
261
|
| "setPulled"
|
|
265
262
|
| "previewName"
|
|
266
|
-
| "editorExports"
|
|
267
263
|
| "globalFiles"
|
|
268
264
|
| "globalWorkspace"
|
|
269
265
|
| "workspaceFor"
|
|
@@ -304,11 +300,11 @@ export function matchRoute(
|
|
|
304
300
|
|
|
305
301
|
export const MAIN_FILE: "App.tsx";
|
|
306
302
|
export const CONTEXT_FILE: "CONTEXT.md";
|
|
307
|
-
/** Docs (ADR
|
|
303
|
+
/** Docs (ADR 0209): docs/<name>.md in a Site or the Global Workspace, Markdown never built or served. */
|
|
308
304
|
export const DOCS_DIR: "docs/";
|
|
309
305
|
export function docName(path: string): string | null;
|
|
310
306
|
export function contextError(content: string | undefined): string | null;
|
|
311
|
-
/** CONTEXT.md's generated file inventory markers (docs/adr/
|
|
307
|
+
/** CONTEXT.md's generated file inventory markers (docs/adr/0215). */
|
|
312
308
|
export const INVENTORY_START: string;
|
|
313
309
|
export const INVENTORY_END: string;
|
|
314
310
|
/** The inventory block for a Working Copy's files, markers included. */
|
|
@@ -317,39 +313,29 @@ export function contextInventory(files: Record<string, string>): string;
|
|
|
317
313
|
export function withContextInventory(context: string, files: Record<string, string>): string;
|
|
318
314
|
export const PAGES_DIR: "pages/";
|
|
319
315
|
export const COMPONENTS_DIR: "components/";
|
|
320
|
-
/** Custom hooks (ADR
|
|
316
|
+
/** Custom hooks (ADR 0209): `hooks/use<Name>.ts` in a Site or the Global Workspace (`global/hooks/use<Name>`). */
|
|
321
317
|
export const HOOKS_DIR: "hooks/";
|
|
322
318
|
export function hookName(path: string): string | null;
|
|
323
319
|
export const FUNCTIONS_DIR: "functions/";
|
|
324
320
|
export const FUNCTION_ARTIFACT: "_server/functions.json";
|
|
325
|
-
/** The Instance's compiled Table rules (docs/adr/
|
|
321
|
+
/** The Instance's compiled Table rules (docs/adr/0226). */
|
|
326
322
|
export const RULES_ARTIFACT: "_server/rules.json";
|
|
327
|
-
/** The Instance's compiled scheduled jobs (ADR
|
|
323
|
+
/** The Instance's compiled scheduled jobs (ADR 0230). */
|
|
328
324
|
export const JOBS_ARTIFACT: "_server/jobs.json";
|
|
329
|
-
|
|
330
|
-
/** Global Documents (docs/adr/0105): the folder, the private artifact, the app-host paths and the input cap. */
|
|
325
|
+
/** Global Documents (docs/adr/0233): the folder, the private artifact, the app-host paths and the input cap. */
|
|
331
326
|
export const DOCUMENTS_DIR: "documents/";
|
|
332
327
|
export const DOCUMENT_ARTIFACT: "_server/documents.json";
|
|
333
|
-
export const DOCUMENT_BASE_PATH: "/_ez/documents";
|
|
334
328
|
export const DOCUMENT_RE: RegExp;
|
|
335
329
|
export const MAX_RENDER_INPUT_BYTES: 1000000;
|
|
336
330
|
export function documentName(path: string): string | null;
|
|
337
331
|
export const FUNCTION_NAME_RE: RegExp;
|
|
338
|
-
/** Live Table versions for pages (docs/adr/0053): the push stream, the one-shot map, and the write header. */
|
|
339
|
-
export const LIVE_STREAM_PATH: "/_ez/db/stream";
|
|
340
|
-
export const LIVE_VERSIONS_PATH: "/_ez/db/versions";
|
|
341
|
-
/** The declared Tables' access rules for `useCan` (docs/adr/0098). */
|
|
342
|
-
export const ACCESS_RULES_PATH: "/_ez/access";
|
|
343
|
-
/** The active scope's values for the Framework's switcher (docs/adr/0098). */
|
|
344
|
-
export const SCOPE_PATH: "/_ez/scope";
|
|
345
|
-
export const VERSIONS_HEADER: "ez-versions";
|
|
346
332
|
export function functionName(path: string): string | null;
|
|
347
|
-
/** Local functions (ADR
|
|
333
|
+
/** Local functions (ADR 0235): Node code the Desktop runs on the Member's computer. */
|
|
348
334
|
export const LOCAL_DIR: "local/";
|
|
349
335
|
export const LOCAL_ARTIFACT: "_local/functions.json";
|
|
350
336
|
export const LOCAL_BASE_PATH: "/_ez/local";
|
|
351
337
|
export function localFunctionName(path: string): string | null;
|
|
352
|
-
/** Scheduled jobs (
|
|
338
|
+
/** Scheduled jobs (ADR 0230): the Global Workspace's jobs/<name>.ts, run by its schedules.json, never by a browser. */
|
|
353
339
|
export const JOBS_DIR: "jobs/";
|
|
354
340
|
export function jobName(path: string): string | null;
|
|
355
341
|
export const SCHEDULES_FILE: "schedules.json";
|
|
@@ -361,7 +347,7 @@ export function parseSchedules(
|
|
|
361
347
|
source: string,
|
|
362
348
|
files: Record<string, string>,
|
|
363
349
|
): { entries: ScheduleEntry[]; errors: string[] };
|
|
364
|
-
/** The deployed page's settings (ADR
|
|
350
|
+
/** The deployed page's settings (ADR 0209): `page.json` in a Site and in the Global Workspace, the Site's winning. */
|
|
365
351
|
export const PAGE_FILE: "page.json";
|
|
366
352
|
export const PAGE_ICON_MAX: 16000;
|
|
367
353
|
/** The browser icon of a page whose Site and Global Workspace set none. */
|
|
@@ -370,7 +356,7 @@ export const DEFAULT_PAGE_ICON: string;
|
|
|
370
356
|
export function parsePage(source: string): { page: { icon?: string }; errors: string[] };
|
|
371
357
|
/** The SVG a Site's page shows as its browser icon: the Site's page.json, else the Global one, else the default. */
|
|
372
358
|
export function pageIcon(files: Record<string, string>, global: Record<string, string>): string;
|
|
373
|
-
/** Listeners (docs/adr/
|
|
359
|
+
/** Listeners (docs/adr/0231): `listeners/<name>.ts`, named in `listeners.json`, received under LISTENER_BASE_PATH. */
|
|
374
360
|
export const LISTENERS_DIR: "listeners/";
|
|
375
361
|
export function listenerName(path: string): string | null;
|
|
376
362
|
export const LISTENERS_FILE: "listeners.json";
|
|
@@ -378,7 +364,7 @@ export const LISTENER_MAX: number;
|
|
|
378
364
|
export const LISTENER_BASE_PATH: "/_ez/listeners/";
|
|
379
365
|
export const WEBHOOK_SCHEMES: readonly ["standard", "stripe", "github", "token"];
|
|
380
366
|
export const LISTENER_OVERLAP_HOURS: { readonly default: number; readonly max: number };
|
|
381
|
-
/** The Data API (docs/adr/
|
|
367
|
+
/** The Data API (docs/adr/0232): `/_ez/api/...` on the app origin with `Authorization: Bearer ezk_...`. */
|
|
382
368
|
export const API_BASE_PATH: "/_ez/api";
|
|
383
369
|
export const API_KEY_PREFIX: "ezk_";
|
|
384
370
|
export const API_KEY_NAME_RE: RegExp;
|
|
@@ -391,16 +377,16 @@ export function parseListeners(
|
|
|
391
377
|
source: string,
|
|
392
378
|
files: Record<string, string>,
|
|
393
379
|
): { entries: ListenerEntry[]; errors: string[]; warnings: string[] };
|
|
394
|
-
/** Global lib modules (ADR
|
|
380
|
+
/** Global lib modules (ADR 0210): `lib/<name>.ts`, imported by Sites as `global/lib/<name>`. */
|
|
395
381
|
export const LIB_DIR: "lib/";
|
|
396
382
|
export function libModuleName(path: string): string | null;
|
|
397
|
-
/** Table rules (docs/adr/
|
|
383
|
+
/** Table rules (docs/adr/0226): `rules/<table>.ts` in the Global Workspace. */
|
|
398
384
|
export const RULES_DIR: "rules/";
|
|
399
385
|
export function ruleTableName(path: string): string | null;
|
|
400
|
-
/** Workflows (docs/adr/
|
|
386
|
+
/** Workflows (docs/adr/0227): `workflows/<table>.ts` in the Global Workspace. */
|
|
401
387
|
export const WORKFLOWS_DIR: "workflows/";
|
|
402
388
|
export function workflowTableName(path: string): string | null;
|
|
403
|
-
/** Desktop release files (ADR
|
|
389
|
+
/** Desktop release files (ADR 0235): the feed path on every app origin, the file-name rule and the cap. */
|
|
404
390
|
export const DESKTOP_PATH: "/_ez/desktop";
|
|
405
391
|
export const DESKTOP_FILE_RE: RegExp;
|
|
406
392
|
export const MAX_DESKTOP_FILE_BYTES: 100000000;
|
|
@@ -412,7 +398,9 @@ export const DEFAULT_GLOBAL_FILES: Readonly<Record<string, string>>;
|
|
|
412
398
|
export const STARTER_GLOBAL_FILES: Readonly<Record<string, string>>;
|
|
413
399
|
export const BUILD_ENTRY: "index.html";
|
|
414
400
|
export const BUILD_CONFIG_MARKER: "<!--ez:config-->";
|
|
415
|
-
/**
|
|
401
|
+
/** Marks the built page's preload link for the vendor chunk, for the app host (docs/adr/0216). */
|
|
402
|
+
export const BUILD_VENDOR_ATTR: "data-ez-vendor";
|
|
403
|
+
/** The compiler options of every Site type check, Pipeline and editor alike (docs/adr/0236). */
|
|
416
404
|
export const COMPILER_OPTIONS: Readonly<{
|
|
417
405
|
target: "ES2022";
|
|
418
406
|
lib: string[];
|
|
@@ -445,7 +433,23 @@ export {
|
|
|
445
433
|
SESSION_VERSION_KEY,
|
|
446
434
|
} from "./session.d.mts";
|
|
447
435
|
export type { SessionDeclaration, SessionLifetime } from "./session.d.mts";
|
|
448
|
-
/** The
|
|
436
|
+
/** The page's side of the wire (docs/adr/0216), declared in paths.d.mts. */
|
|
437
|
+
export {
|
|
438
|
+
ACCESS_RULES_PATH,
|
|
439
|
+
ASSET_PATH,
|
|
440
|
+
ASSET_TYPES,
|
|
441
|
+
ATTACHMENT_PATH,
|
|
442
|
+
ATTACHMENT_TYPES,
|
|
443
|
+
attachmentContentType,
|
|
444
|
+
DOCUMENT_BASE_PATH,
|
|
445
|
+
FIRST_SCREEN_EVENT,
|
|
446
|
+
FUNCTION_BASE_PATH,
|
|
447
|
+
LIVE_STREAM_PATH,
|
|
448
|
+
LIVE_VERSIONS_PATH,
|
|
449
|
+
SCOPE_PATH,
|
|
450
|
+
VERSIONS_HEADER,
|
|
451
|
+
} from "./paths.d.mts";
|
|
452
|
+
/** The packages Site UI and Global components and hooks may import by name (docs/adr/0209). */
|
|
449
453
|
export const SITE_PACKAGES: readonly string[];
|
|
450
454
|
export function globalFileError(path: string): string | null;
|
|
451
455
|
export function globalImportError(
|
|
@@ -459,7 +463,7 @@ export type DiagnosticRange = {
|
|
|
459
463
|
start: { line: number; character: number };
|
|
460
464
|
end: { line: number; character: number };
|
|
461
465
|
};
|
|
462
|
-
/** LSP-shaped, 0-based. `code` is a `CHECK_RULES` id; severity 1 is an error, 2 a warning (docs/adr/
|
|
466
|
+
/** LSP-shaped, 0-based. `code` is a `CHECK_RULES` id; severity 1 is an error, 2 a warning (docs/adr/0236). */
|
|
463
467
|
export type Diagnostic = {
|
|
464
468
|
file: string;
|
|
465
469
|
range: DiagnosticRange;
|
|
@@ -512,7 +516,6 @@ export const INSTANCE_ID_RE: RegExp;
|
|
|
512
516
|
export const RESERVED_INSTANCE_IDS: Set<string>;
|
|
513
517
|
export function isValidInstanceId(id: string): boolean;
|
|
514
518
|
export const SITE_ID_RE: RegExp;
|
|
515
|
-
export const RESERVED_SITE_IDS: Set<string>;
|
|
516
519
|
export function isValidSiteId(id: string): boolean;
|
|
517
520
|
export const SITES_FOLDER: "sites";
|
|
518
521
|
export const RESERVED_FOLDER_NAMES: Set<string>;
|
|
@@ -520,34 +523,29 @@ export function siteFolderName(name: string): string;
|
|
|
520
523
|
export function siteNameError(name: string): string | null;
|
|
521
524
|
export function isValidTargetId(id: string): boolean;
|
|
522
525
|
export const ASSET_NAME_RE: RegExp;
|
|
523
|
-
export const ASSET_TYPES: Readonly<Record<string, string>>;
|
|
524
526
|
export const MAX_ASSET_BYTES: 100000000;
|
|
525
527
|
export const MAX_INSTANCE_ASSET_BYTES: 2000000000;
|
|
526
|
-
export const ASSET_PATH: "/_ez/files";
|
|
527
528
|
export function assetContentType(filename: string): string | null;
|
|
528
|
-
/** App Attachments (docs/adr/
|
|
529
|
-
export const ATTACHMENT_TYPES: Readonly<Record<string, string>>;
|
|
529
|
+
/** App Attachments (docs/adr/0221): the caps; the type table and the app-host path are in paths.d.mts. */
|
|
530
530
|
export const MAX_ATTACHMENT_BYTES: 25000000;
|
|
531
531
|
export const MAX_INSTANCE_ATTACHMENT_BYTES: 10000000000;
|
|
532
532
|
export const MAX_UNBOUND_ATTACHMENTS: 20;
|
|
533
533
|
export const MAX_UNBOUND_ATTACHMENT_BYTES: 250000000;
|
|
534
534
|
export const UNBOUND_ATTACHMENT_TTL_MS: 86400000;
|
|
535
|
-
|
|
536
|
-
export function attachmentContentType(filename: string): string | null;
|
|
537
|
-
/** Hosted Previews (docs/adr/0013): the URL segment, the name shape, the per-Builder cap and the idle expiry. */
|
|
535
|
+
/** Hosted Previews (docs/adr/0212): the URL segment, the name shape, the per-Builder cap and the idle expiry. */
|
|
538
536
|
export const PREVIEW_SEGMENT: "~preview";
|
|
539
537
|
export const PREVIEW_NAME_RE: RegExp;
|
|
540
538
|
export const MAX_PREVIEWS_PER_BUILDER: 10;
|
|
541
539
|
export const PREVIEW_IDLE_MS: number;
|
|
542
540
|
export function previewNameError(name: string): string | null;
|
|
543
541
|
export function previewNameFrom(text: string): string;
|
|
544
|
-
/** One-time app links (docs/adr/
|
|
542
|
+
/** One-time app links (docs/adr/0203): how long a link works after `ez link` mints it. */
|
|
545
543
|
export const APP_LINK_TTL_MS: number;
|
|
546
|
-
/** Support Requests (docs/adr/
|
|
544
|
+
/** Support Requests (docs/adr/0208): subject and body lengths in characters, and requests per Builder per day. */
|
|
547
545
|
export const SUPPORT_SUBJECT_MAX: number;
|
|
548
546
|
export const SUPPORT_BODY_MAX: number;
|
|
549
547
|
export const SUPPORT_REQUESTS_PER_DAY: number;
|
|
550
|
-
/** Email limits (docs/adr/
|
|
548
|
+
/** Email limits (docs/adr/0234). */
|
|
551
549
|
export const EMAIL_LIMITS: Readonly<{
|
|
552
550
|
perInvocation: number;
|
|
553
551
|
subject: number;
|
|
@@ -559,7 +557,7 @@ export const EMAIL_LIMITS: Readonly<{
|
|
|
559
557
|
attempts: number;
|
|
560
558
|
}>;
|
|
561
559
|
export const EMAIL_STATUSES: readonly EmailStatus[];
|
|
562
|
-
/** Integrations (docs/adr/
|
|
560
|
+
/** Integrations (docs/adr/0231): names, kinds, credential types, limits and the origin and name checks. */
|
|
563
561
|
export const INTEGRATION_NAME_RE: RegExp;
|
|
564
562
|
export const INTEGRATION_KINDS: readonly ["http"];
|
|
565
563
|
export const CREDENTIAL_TYPES: readonly ["header", "query", "basic", "oauth"];
|
|
@@ -588,7 +586,7 @@ export function integrationOriginError(origin: string, allowHttp?: boolean): str
|
|
|
588
586
|
export function credentialHeaderError(name: string): string | null;
|
|
589
587
|
export function credentialParamError(param: string): string | null;
|
|
590
588
|
export function basicUserError(user: string): string | null;
|
|
591
|
-
/** OAuth (docs/adr/
|
|
589
|
+
/** OAuth (docs/adr/0252, a draft): the configuration a credential holds; its flows are not built. */
|
|
592
590
|
export const OAUTH_GRANTS: readonly ["client-credentials", "password", "authorization-code"];
|
|
593
591
|
export const OAUTH_CLIENT_AUTH: readonly ["basic", "post"];
|
|
594
592
|
export const OAUTH_NOT_BUILT: string;
|
|
@@ -605,7 +603,7 @@ export type OAuthPreset = {
|
|
|
605
603
|
readonly rotatesRefreshTokens: boolean;
|
|
606
604
|
/** The connection values a grant brings (the callback's or the token answer's). */
|
|
607
605
|
readonly connection: readonly string[];
|
|
608
|
-
/** Plain values every request needs (docs/adr/
|
|
606
|
+
/** Plain values every request needs (docs/adr/0231). */
|
|
609
607
|
readonly values: readonly {
|
|
610
608
|
readonly place: "header" | "query";
|
|
611
609
|
readonly name: string;
|
|
@@ -618,7 +616,7 @@ export function oauthCredentialError(
|
|
|
618
616
|
credential: Partial<Extract<IntegrationCredential, { type: "oauth" }>>,
|
|
619
617
|
allowHttp?: boolean,
|
|
620
618
|
): string | null;
|
|
621
|
-
/** Invites (docs/adr/
|
|
619
|
+
/** Invites (docs/adr/0202): the claim window and the listing status. */
|
|
622
620
|
export const INVITE_TTL_MS: number;
|
|
623
621
|
export const BUILDER_ROLES: readonly BuilderRole[];
|
|
624
622
|
export type InviteStatus = null | { daysLeft: number } | { expired: true };
|
|
@@ -633,7 +631,7 @@ export function hashContent(s: string): string;
|
|
|
633
631
|
export function localChanges(files: Record<string, string>, pulled: Pulled | null): Changes;
|
|
634
632
|
/**
|
|
635
633
|
* Whether a change to this Global Workspace file reaches a deployed Site only at its next Preview or Deploy
|
|
636
|
-
* (docs/adr/
|
|
634
|
+
* (docs/adr/0224): false for the Live-only files (session.ts, schedules.json, jobs/) and the files no app is
|
|
637
635
|
* built from (CONTEXT.md, docs/, the generated db/types.d.ts).
|
|
638
636
|
*/
|
|
639
637
|
export function pinnedGlobalPath(path: string): boolean;
|