js-bao-wss-client 3.5.0-alpha.2 → 3.5.0-alpha.4

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 CHANGED
@@ -462,7 +462,7 @@ await expect(
462
462
 
463
463
  ## Quick Start
464
464
 
465
- > Migrating from legacy decorators? Follow `src/client/docs/js-bao-v2-migration.md` before continuing—models must now be defined with `defineModelSchema`/`createModelClass`.
465
+ > Migrating from legacy decorators? Follow `src/client/docs/js-bao-v2-migration.md` before continuing—a model is a class that extends `BaseModel`, with a schema from `defineModelSchema` attached by `attachAndRegisterModel`.
466
466
 
467
467
  ### 1. Initialize the Client
468
468
 
@@ -472,11 +472,10 @@ await expect(
472
472
  import {
473
473
  initializeClient,
474
474
  defineModelSchema,
475
- createModelClass,
475
+ attachAndRegisterModel,
476
476
  InferAttrs,
477
- TypedModelConstructor,
478
477
  } from "js-bao-wss-client";
479
- import type { BaseModel } from "js-bao";
478
+ import { BaseModel } from "js-bao";
480
479
 
481
480
  const contactSchema = defineModelSchema({
482
481
  name: "contacts",
@@ -489,9 +488,8 @@ const contactSchema = defineModelSchema({
489
488
  });
490
489
  type ContactAttrs = InferAttrs<typeof contactSchema>;
491
490
  interface Contact extends ContactAttrs, BaseModel {}
492
- const Contact: TypedModelConstructor<Contact> = createModelClass({
493
- schema: contactSchema,
494
- });
491
+ class Contact extends BaseModel {}
492
+ attachAndRegisterModel(Contact, contactSchema);
495
493
 
496
494
  async function bootstrap() {
497
495
  const client = await initializeClient({
@@ -1914,14 +1912,22 @@ the returned subscription). To keep listening, invoke the authorizing function
1914
1912
  again before then and call `subscribeToChannel` with the new grant; that
1915
1913
  replaces the membership rather than adding a second one.
1916
1914
 
1915
+ ### Removed Client APIs
1916
+
1917
+ These client APIs were removed with the member routes they called. Each has a
1918
+ server-function replacement:
1919
+
1920
+ - `client.workflows.runSync` — call a server function with `client.functions.invoke` for a result in one request.
1921
+ - `client.prompts.execute` — call a server function that runs the prompt with `ctx.prompts.run`.
1922
+ - `client.integrations.call` — call a server function that calls the integration with `ctx.integrations.call`.
1923
+ - `client.databases.listOperations`, `executeOperation`, `executeBatch`, `importBulk` and `importCsv` — call a server function that reads and writes records with `ctx.db`.
1924
+
1917
1925
  ### Deprecated Client APIs
1918
1926
 
1919
1927
  These client APIs still work but are deprecated. Each has a server-function
1920
1928
  replacement:
1921
1929
 
1922
1930
  - `client.workflows.*` — call a server function: `client.functions.invoke` for a result, or `client.functions.start` / `getStatus` / `waitFor` for a long-running run.
1923
- - `client.prompts.execute` — call a server function that runs the prompt with `ctx.prompts.run`.
1924
- - `client.integrations.call` — call a server function that calls the integration with `ctx.integrations.call`.
1925
1931
  - `client.databases.*` — call a server function that reads and writes records with `ctx.db` and manages databases with `ctx.api.databases`; for live updates, join a channel the function publishes to.
1926
1932
  - `client.cronTriggers.*` — schedule a server function by declaring `[[function.triggers.cron]]` in its config.
1927
1933
 
@@ -44,7 +44,7 @@ export type { DocumentInfo, DocumentPermissionEntry, DocumentAccessResult, Docum
44
44
  export type { UserProfile, SharedDocument, SharedDocumentListResult, SharedDocumentsOptions, OwnedDocumentsOptions, } from "./api/meApi";
45
45
  export type { SessionInfo } from "./api/sessionApi";
46
46
  export type { BasicUserInfo, BatchUserProfile } from "./api/usersApi";
47
- export type { DatabaseInfo, DatabasePermissionEntry, DatabaseGroupPermissionEntry, GrantDatabaseGroupPermissionParams, DatabaseOwnershipTransferResult, DatabaseOperationInfo, AddManagerParams, CsvImportOptions, CsvImportProgress, CsvImportResult, ExecuteOperationOptions, DatabaseChangeEvent, DatabaseChangePayload, DatabaseSubscribeOptions, ListDatabasesOptions, DatabaseListPage, OperationType, OperationFilter, QueryDefinition, MutationOperation, MutationDefinition, CountDefinition, AggregateOperation, AggregateDefinition, PipelineStep, PipelineDefinition, ApplyToQuerySource, ApplyToQueryAction, ApplyToQueryDefinition, OperationDefinition, CreateOperationParams, UpdateOperationParams, } from "./api/databasesApi";
47
+ export type { DatabaseInfo, DatabasePermissionEntry, DatabaseGroupPermissionEntry, GrantDatabaseGroupPermissionParams, DatabaseOwnershipTransferResult, DatabaseOperationInfo, AddManagerParams, DatabaseChangeEvent, DatabaseChangePayload, DatabaseSubscribeOptions, ListDatabasesOptions, DatabaseListPage, OperationType, OperationFilter, QueryDefinition, MutationOperation, MutationDefinition, CountDefinition, AggregateOperation, AggregateDefinition, PipelineStep, PipelineDefinition, ApplyToQuerySource, ApplyToQueryAction, ApplyToQueryDefinition, OperationDefinition, CreateOperationParams, UpdateOperationParams, } from "./api/databasesApi";
48
48
  export type { GroupInfo, GroupMemberInfo, GroupMembershipInfo, GroupDocumentInfo, GroupDatabaseInfo, ListUserMembershipsOptions, DirectGroupAdd, DeferredGroupAdd, GroupAddMemberResult, } from "./api/groupsApi";
49
49
  export type { CollectionInfo, CollectionDocumentInfo, CollectionGroupPermissionInfo, CollectionMemberInfo, CollectionAccessInfo, DocumentCollectionInfo, AddCollectionMemberParams, DirectCollectionAdd, DeferredCollectionAdd, CollectionAddMemberResult, PendingCollectionInvitationEntry, } from "./api/collectionsApi";
50
50
  export type { RuleSetInfo, RuleSetSchema, RuleSetTestResult, RuleSetDebugResult, TraceEntry, TriggerDefInfo, ModelRulesInfo, PathDeclaration, RuleLoads, RuleExpression, CategoryRules, } from "./api/ruleSetsApi";
@@ -62,7 +62,7 @@ export type { DocumentsAPI, DocumentContext, DocumentAliasesAPI, DocumentIngests
62
62
  export type { DatabasesAPI } from "./api/databasesApi";
63
63
  export type { CollectionsAPI } from "./api/collectionsApi";
64
64
  export type { AgentsAPI, AgentSessionsAPI } from "./api/agentSessionsApi";
65
- export type { AgentSessionMemberRole, AgentSessionMembers, AgentSessionInfo, AgentSessionListItem, ListAgentSessionsOptions, AgentSessionRenameResult, AgentSessionDeleteResult, AgentSessionMembersResult, AgentSessionStatus, AgentTurnPause, AgentSessionTurnSummary, AgentSessionInspectedTurn, AgentSessionInspectedCall, AgentSessionObjectState, AgentSessionSendBody, AgentSessionSendResult, AgentCallAnswer, AgentCallAnswerResult, AgentSessionCancelResult, AgentSessionEvent, AgentSessionEventResult, } from "./api/agentSessionsApi";
65
+ export type { AgentSessionMemberRole, AgentSessionMembers, AgentSessionInfo, AgentSessionListItem, ListAgentSessionsOptions, AgentSessionRenameResult, AgentSessionDeleteResult, AgentSessionMembersResult, AgentSessionStatus, AgentTurnPause, AgentSessionTurnSummary, AgentSessionInspectedTurn, AgentSessionInspectedCall, AgentSessionObjectState, AgentSessionSendBody, AgentSessionSendResult, AgentCallAnswer, AgentCallAnswerResult, AgentSessionCancelResult, AgentSessionReadResult, AgentSessionEvent, AgentSessionEventResult, } from "./api/agentSessionsApi";
66
66
  export type { MeAPI } from "./api/meApi";
67
67
  export type { SessionAPI } from "./api/sessionApi";
68
68
  export type { UsersAPI } from "./api/usersApi";
@@ -120,54 +120,6 @@ export interface AnalyticsAutoEventsOptions {
120
120
  };
121
121
  sessionEnd?: boolean;
122
122
  }
123
- /**
124
- * Request passed to `client.integrations.call()`. Identifies the integration
125
- * by key and describes the HTTP request to send through the integration
126
- * proxy: method, path, query parameters, headers, and body.
127
- */
128
- export interface IntegrationCallRequest<TReq = unknown> {
129
- integrationKey: string;
130
- method?: string;
131
- path?: string;
132
- query?: Record<string, any>;
133
- headers?: Record<string, string>;
134
- body?: TReq;
135
- }
136
- /**
137
- * Response envelope resolved by `client.integrations.call()`. Carries the
138
- * proxied HTTP status, headers, and parsed body, plus optional trace
139
- * metadata (`traceId`, `durationMs`) and an `errorCode` when the call
140
- * failed at the proxy layer.
141
- */
142
- export interface IntegrationCallResponse<T = unknown> {
143
- status: number;
144
- headers: Record<string, string>;
145
- body: T;
146
- traceId?: string;
147
- durationMs?: number;
148
- errorCode?: string;
149
- }
150
- /**
151
- * Integrations API, available as `client.integrations`. Sends requests to
152
- * third-party services through integrations configured for the app, so
153
- * credentials stay server-side.
154
- * @deprecated Call a server function instead: it calls the integration with
155
- * `ctx.integrations.call` (see the Server Functions guide).
156
- */
157
- export interface IntegrationsAPI {
158
- /**
159
- * Call an integration's proxy endpoint.
160
- *
161
- * The optional generics are additive. `TRes` types the response body and is
162
- * **first** to preserve the meaning of existing single-arg
163
- * `call<MyResponse>()` call sites; `TReq` types the request `body`. Both
164
- * default to `unknown`, so untyped callers must narrow before reading
165
- * arbitrary properties.
166
- * @deprecated Call a server function instead: it calls the integration with
167
- * `ctx.integrations.call` (see the Server Functions guide).
168
- */
169
- call<TRes = unknown, TReq = unknown>(request: IntegrationCallRequest<TReq>): Promise<IntegrationCallResponse<TRes>>;
170
- }
171
123
  /**
172
124
  * Workflows API, available as `client.workflows`. Starts, monitors, and
173
125
  * terminates server-side workflow runs, and manages the client-side apply
@@ -192,30 +144,6 @@ export interface WorkflowsAPI {
192
144
  start<I = Record<string, any>>(options: Omit<StartWorkflowOptions, "input"> & {
193
145
  input?: I;
194
146
  }): Promise<StartWorkflowResult>;
195
- /**
196
- * Synchronously invoke a workflow and wait for the final result.
197
- *
198
- * Only callable on workflows marked `syncCallable: true` in their
199
- * server-side definition. Use this for low-latency,
200
- * short-task workflows. Long-running workflows should keep using
201
- * `start()` plus the WebSocket / polling lifecycle.
202
- *
203
- * The promise **resolves** with the final envelope for every outcome,
204
- * including engine failure and timeout — failure surfaces as
205
- * `status: "failed"` (or `"timeout"` / `"terminated"`), not a thrown
206
- * error. Network / transport errors still reject as usual.
207
- *
208
- * The optional generics `I` (input) and `O` (`output`) type the payload and
209
- * the result envelope. Both are additive and default to today's
210
- * untyped `Record<string, any>` / `any`, so existing callers are unaffected.
211
- * The generated per-workflow `<key>(client)` factory supplies them from the
212
- * workflow's `inputSchema`/`outputSchema`.
213
- * @deprecated Call a server function instead: `client.functions.invoke` (see
214
- * the Server Functions guide).
215
- */
216
- runSync<I = Record<string, any>, O = any>(options: Omit<RunSyncWorkflowOptions, "input"> & {
217
- input?: I;
218
- }): Promise<RunSyncWorkflowResult<O>>;
219
147
  /**
220
148
  * Get the status of a workflow run. If contextDocId is not provided, uses the
221
149
  * user's root document.
@@ -233,9 +161,6 @@ export interface WorkflowsAPI {
233
161
  * an error. `run.status` on the same response carries the recorded terminal
234
162
  * status throughout.
235
163
  *
236
- * A run executed with `runSync` reports its persisted status here too, but
237
- * without `output` — the `runSync` call itself already returned that.
238
- *
239
164
  * The optional generic `O` types the result envelope's `output`.
240
165
  * It is additive and defaults to today's untyped `any`, so existing callers
241
166
  * are unaffected. The generated per-workflow `<key>(client)` factory supplies
@@ -353,107 +278,6 @@ export interface WorkflowsAPI {
353
278
  */
354
279
  define<O = unknown>(workflowKey: string, options: WorkflowDefineOptions<O>): void;
355
280
  }
356
- /**
357
- * Prompts API, available as `client.prompts`. Executes prompts configured
358
- * server-side for the app, identified by prompt key.
359
- * @deprecated Call a server function instead: it runs the prompt with
360
- * `ctx.prompts.run` (see the Server Functions guide).
361
- */
362
- export interface PromptsAPI {
363
- /**
364
- * Execute a prompt by key and return the result.
365
- *
366
- * The optional generics are additive. `V` types the
367
- * `variables` bag and `R` types `rawResponse`. Both default to today's
368
- * untyped shapes, so existing callers are unaffected.
369
- *
370
- * Every prompt carries an `accessRule` deciding who may execute it. A
371
- * refusal rejects with a `JsBaoApiError` whose `status` is `403` and whose
372
- * `code` is `"PROMPT_ACCESS_DENIED"` — including when the prompt has no rule
373
- * stored at all, which denies every caller who is not an app admin or owner.
374
- * A prompt that is not in service rejects with a `400` whose `code` is
375
- * `"PROMPT_NOT_EXECUTABLE"`. Availability is a single server-owned `status`:
376
- * only an `active` prompt executes here, and `primitive prompts enable`
377
- * puts an inactive one back in service.
378
- * @deprecated Call a server function instead: it runs the prompt with
379
- * `ctx.prompts.run` (see the Server Functions guide).
380
- */
381
- execute<V extends object = Record<string, unknown>, R = unknown>(promptKey: string, options: ExecutePromptOptions<V>): Promise<ExecutePromptResult<R>>;
382
- }
383
- /** Options for executing a prompt */
384
- export interface ExecutePromptOptions<V extends object = Record<string, unknown>> {
385
- /** Variables to pass to the prompt template */
386
- variables: V;
387
- /** Override the model specified in the prompt config */
388
- modelOverride?: string;
389
- /** Specific config ID to use (defaults to activeConfigId) */
390
- configId?: string;
391
- }
392
- /** Result from executing a prompt */
393
- export interface ExecutePromptResult<R = unknown> {
394
- success: boolean;
395
- output: string;
396
- error?: string;
397
- /**
398
- * The upstream provider's own HTTP status, on a failure where the call
399
- * reached the provider and it answered. It does not depend on which provider
400
- * the prompt's configuration names, and it is what a retry decision is made
401
- * on without parsing `error`: retry on 408, 429, 502, 503 and 504; any other
402
- * 4xx will fail the same way next time.
403
- *
404
- * Absent on success, and absent on a failure where no provider answer was
405
- * observed — an unset provider key, an oversized payload, a completion that
406
- * came back empty — so a number here is always the provider's own.
407
- */
408
- upstreamStatus?: number;
409
- /**
410
- * `"PROMPT_UPSTREAM_TIMEOUT"` when the provider itself ran out of time;
411
- * `"PROMPT_UPSTREAM_REJECTED"` when the provider refused the request as
412
- * invalid (`upstreamStatus` 400) — a setting the model does not support,
413
- * such as a reasoning level, with the provider's message in `error`; fix
414
- * the configuration rather than retrying;
415
- * `"PROMPT_STRICT_OUTPUT_SCHEMA_MISSING"` when a strict-output config's
416
- * prompt has no usable `outputSchema`, refused before the provider call; and
417
- * `"PROMPT_OUTPUT_TRUNCATED"` when the completion came back empty because
418
- * it spent the whole output token limit (`truncated` is `true` beside it).
419
- * Absent on success and on every other provider failure, so `error` with no
420
- * `errorCode` still means "the call failed for some other reason".
421
- */
422
- errorCode?: "PROMPT_UPSTREAM_TIMEOUT" | "PROMPT_STRICT_OUTPUT_SCHEMA_MISSING" | "PROMPT_OUTPUT_TRUNCATED" | "PROMPT_UPSTREAM_REJECTED";
423
- /**
424
- * `true` when the provider stopped at the output token limit (the config's
425
- * `maxTokens`) before the answer was finished; absent otherwise. A cut-off
426
- * answer is still `success: true`, with the partial text in `output`. On
427
- * Gemini, reasoning tokens count against the same limit. Raise `maxTokens`.
428
- */
429
- truncated?: true;
430
- metrics: {
431
- durationMs: number;
432
- inputTokens?: number;
433
- outputTokens?: number;
434
- totalTokens?: number;
435
- /**
436
- * The reasoning/thinking tokens the provider reports for this call,
437
- * separately from `outputTokens`. It is how the effect of a config's
438
- * `reasoningEffort` / `reasoningBudget` is measured: OpenRouter counts
439
- * reasoning INSIDE its output tokens and Gemini counts it OUTSIDE, so
440
- * neither headline number says how much of the decode was deliberation.
441
- * Absent when the provider reports none.
442
- */
443
- reasoningTokens?: number;
444
- /**
445
- * What this call cost, in USD, as the provider reported it.
446
- *
447
- * A decisions model's case is largely economic — a fraction of a chat
448
- * model's cost on the same workload — so a result that reported tokens
449
- * and not price would leave the number the choice turns on off the wire.
450
- * Absent when the provider reports none.
451
- */
452
- cost?: number;
453
- };
454
- rawResponse: R;
455
- configId: string;
456
- }
457
281
  /**
458
282
  * Configuration for constructing a {@link JsBaoClient} (or calling
459
283
  * {@link initializeClient}). Only `apiUrl`, `wsUrl`, and `appId` are
@@ -1177,71 +1001,6 @@ export interface WorkflowStartedEvent {
1177
1001
  contextDocId?: string;
1178
1002
  meta?: Record<string, unknown>;
1179
1003
  }
1180
- /** Options for synchronously running a workflow via `workflows.runSync`. */
1181
- export interface RunSyncWorkflowOptions {
1182
- /** The workflow key identifying which workflow to run. */
1183
- workflowKey: string;
1184
- /** Input data to pass to the workflow. Defaults to {} if not provided. */
1185
- input?: Record<string, any>;
1186
- /** Key to identify this run (for idempotency). Auto-generated if not provided. */
1187
- runKey?: string;
1188
- /** Document ID to associate the run with. Defaults to the user's root document. */
1189
- contextDocId?: string;
1190
- /** User-defined metadata attached to the run (max 1KB). Returned in listRuns and runSync envelope. */
1191
- meta?: Record<string, unknown>;
1192
- /**
1193
- * Hard wall-clock ceiling in milliseconds. Defaults to 5000. Capped
1194
- * server-side to 30000 (Workers CPU budget). When exceeded, the run
1195
- * resolves with `status: "timeout"`.
1196
- */
1197
- timeoutMs?: number;
1198
- /**
1199
- * Optional AbortSignal. When fired before the workflow completes the
1200
- * run resolves with `status: "terminated"`. The promise is rejected
1201
- * only if the transport call itself is aborted before the request is
1202
- * sent — completed work still resolves.
1203
- */
1204
- signal?: AbortSignal;
1205
- }
1206
- /**
1207
- * Result envelope from `workflows.runSync`. All non-transport outcomes
1208
- * resolve with this shape — promise rejection is reserved for
1209
- * connectivity / abort-before-send errors.
1210
- */
1211
- export interface RunSyncWorkflowResult<O = any> {
1212
- runId: string;
1213
- runKey: string;
1214
- /**
1215
- * Status from the run.
1216
- * - "completed" — workflow finished without error
1217
- * - "failed" — engine raised an error (see `error`)
1218
- * - "terminated" — caller-side AbortSignal fired mid-execution
1219
- * - "timeout" — server-side timeout ceiling tripped
1220
- * - "apply_pending" — workflow needs the client-side apply step
1221
- *
1222
- * On an idempotency hit or write-race loss (`existing: true`), runSync
1223
- * echoes the matched run's raw persisted `WorkflowRun.status`, which can
1224
- * still be transient — `"queued"`, `"running"`, or `"apply_claimed"` — so
1225
- * this is `WorkflowRunStatus` (the model's full set) plus the runSync-only
1226
- * `"timeout"` value.
1227
- */
1228
- status: WorkflowRunStatus | "timeout";
1229
- /** Final output of the workflow, when `status === "completed"`. */
1230
- output?: O;
1231
- /** Error message when `status === "failed"`. */
1232
- error?: string;
1233
- /**
1234
- * Why the workflow did not run, when `status === "skipped"`: the run's
1235
- * declarative lock was held and the definition declared
1236
- * `onContention: "ignore"`. The envelope then carries neither `output` nor
1237
- * `error` — nothing went wrong, the work simply did not happen.
1238
- */
1239
- skipReason?: WorkflowRunSkipReason;
1240
- /** Persisted `WorkflowRun` row for the call (always present on success). */
1241
- run?: WorkflowRun;
1242
- /** True if the runKey matched an existing run; no new execution occurred. */
1243
- existing?: boolean;
1244
- }
1245
1004
  /** Options for starting a workflow */
1246
1005
  export interface StartWorkflowOptions {
1247
1006
  /** The workflow key identifying which workflow to start */
@@ -1500,7 +1259,7 @@ export interface TerminateWorkflowOptions {
1500
1259
  *
1501
1260
  * The server reconciles the run's status and returns exactly one of these
1502
1261
  * values — the same canonical set as {@link WorkflowRunStatus}, the
1503
- * `workflowStatus` event, `runSync`, and the persisted `run.status`. Raw
1262
+ * `workflowStatus` event, and the persisted `run.status`. Raw
1504
1263
  * platform spellings never reach the client, so no client-side mapping is
1505
1264
  * needed: read the value as-is.
1506
1265
  *
@@ -2595,12 +2354,6 @@ export declare class JsBaoClient extends Observable<any> {
2595
2354
  /** Sub-API for the notification inbox (list, unread count, mark read, send).
2596
2355
  * @group Sub-APIs */
2597
2356
  notifications: NotificationsAPI;
2598
- /** Sub-API for managing third-party integrations.
2599
- * @group Sub-APIs
2600
- * @deprecated Call a server function instead: it calls the integration with
2601
- * `ctx.integrations.call` (see the Server Functions guide).
2602
- */
2603
- integrations: IntegrationsAPI;
2604
2357
  /** Sub-API for managing and executing workflows.
2605
2358
  * @group Sub-APIs
2606
2359
  * @deprecated Call a server function instead: `client.functions.invoke` for a
@@ -2608,12 +2361,6 @@ export declare class JsBaoClient extends Observable<any> {
2608
2361
  * Functions guide).
2609
2362
  */
2610
2363
  workflows: WorkflowsAPI;
2611
- /** Sub-API for managing and executing prompts.
2612
- * @group Sub-APIs
2613
- * @deprecated Call a server function instead: it runs the prompt with
2614
- * `ctx.prompts.run` (see the Server Functions guide).
2615
- */
2616
- prompts: PromptsAPI;
2617
2364
  private workflowApplyHandlers;
2618
2365
  private httpClient;
2619
2366
  private applyingTokenFromController;
@@ -2895,16 +2642,7 @@ export declare class JsBaoClient extends Observable<any> {
2895
2642
  * Used by blob downloads that return raw bytes.
2896
2643
  * @group Connection */
2897
2644
  fetchBinary(method: string, path: string): Promise<ArrayBuffer>;
2898
- private makeRawRequest;
2899
- private callIntegration;
2900
- private normalizeIntegrationHeaders;
2901
- private createIntegrationError;
2902
2645
  private startWorkflow;
2903
- /**
2904
- * Synchronously invoke a workflow and wait for its terminal state. See
2905
- * `WorkflowsAPI.runSync` for the full contract.
2906
- */
2907
- private runSyncWorkflow;
2908
2646
  private getWorkflowStatus;
2909
2647
  /**
2910
2648
  * Unpack a `{ status, run, slice? }` status response into a
@@ -2958,7 +2696,6 @@ export declare class JsBaoClient extends Observable<any> {
2958
2696
  private getWorkflowPendingApplies;
2959
2697
  private defineWorkflow;
2960
2698
  private handleWorkflowApply;
2961
- private executePrompt;
2962
2699
  /** Check if the current user has read-only access to a document.
2963
2700
  * @param documentId - The document to check
2964
2701
  * @group Documents */
@@ -4329,8 +4066,9 @@ export declare class JsBaoClient extends Observable<any> {
4329
4066
  * const tags = await Tag.query({});
4330
4067
  * ```
4331
4068
  *
4332
- * @param model - The model class to register, built with `createModelClass`
4333
- * (or `defineModelSchema` plus `attachAndRegisterModel`)
4069
+ * @param model - The model class to register: a class extending `BaseModel`
4070
+ * whose schema comes from `defineModelSchema`, attached with
4071
+ * `attachAndRegisterModel`
4334
4072
  * @throws If the client is destroyed, the class has no name, another class is
4335
4073
  * already registered under its name, or it belongs to another live client
4336
4074
  * @group Documents