mindoodb-app-sdk 0.0.36 → 0.0.37

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
@@ -326,7 +326,7 @@ const window = await db.documents.list({
326
326
  // Read
327
327
  const doc = await db.documents.get(docId);
328
328
 
329
- // Create (MindooDB generates a UUID7 id; optionally use a named document key)
329
+ // Create (MindooDB generates an ObjectId; optionally use a named document key)
330
330
  const created = await db.documents.create({
331
331
  set: { title: "Meeting notes", content: "..." },
332
332
  decryptionKeyId: "team-key", // omit to use "default"
@@ -335,15 +335,16 @@ const created = await db.documents.create({
335
335
  // Create with a caller-provided id (e.g. a known well-known document the app
336
336
  // always loads on launch, or migrating an id from another system).
337
337
  const settings = await db.documents.create({
338
- id: "AppSettings",
338
+ id: "appsettings",
339
339
  set: { theme: "dark" },
340
340
  });
341
341
  // Subsequent calls with the same id return the existing document and DO NOT
342
342
  // overwrite `set`, so `documents.create({ id })` is safe to call on every app
343
343
  // launch as a "create-if-missing" primitive. Custom ids must match
344
- // /^[A-Za-z][A-Za-z0-9_]*$/ (first char must be a letter, subsequent chars
345
- // may be letters, digits, or `_`). Documents created with the same custom id
346
- // on different replicas merge correctly when synced.
344
+ // /^[a-z][a-z0-9_]*$/ (lowercase only — ids become on-disk filenames, which are
345
+ // case-insensitive: first char must be a lowercase letter, subsequent chars may
346
+ // be lowercase letters, digits, or `_`). Documents created with the same custom
347
+ // id on different replicas merge correctly when synced.
347
348
 
348
349
  // Update top-level fields
349
350
  const updated = await db.documents.update(docId, {
@@ -1493,8 +1494,13 @@ Connect options: `launchId?`, `targetOrigin?`, `connectTimeoutMs?`.
1493
1494
  | `applyAutomergeChanges(docId, patch)` | `Promise<MindooDBAppAutomergePatchResult>` |
1494
1495
  | `create(input)` | `Promise<MindooDBAppDocument>` |
1495
1496
  | `update(docId, patch)` | `Promise<MindooDBAppDocument>` |
1497
+ | `addRecipients(docId, recipients)` | `Promise<MindooDBAppDocument>` |
1498
+ | `removeRecipients(docId, recipients)` | `Promise<MindooDBAppDocument>` |
1499
+ | `setRecipients(docId, recipients)` | `Promise<MindooDBAppDocument>` |
1496
1500
  | `delete(docId)` | `Promise<{ ok: true }>` |
1497
1501
  | `undelete(docId)` | `Promise<{ ok: true }>` |
1502
+ | `getDefaultCreateKeyId()` | `Promise<string>` |
1503
+ | `listCreateKeys()` | `Promise<MindooDBAppCreateKeyInfo[]>` |
1498
1504
  | `listHistory(docId)` | `Promise<MindooDBAppDocumentHistoryEntry[]>` |
1499
1505
  | `getAtTimestamp(docId, timestamp)` | `Promise<MindooDBAppHistoricalDocument>` |
1500
1506
  | `getAtRevision(docId, revisionId, opts?)` | `Promise<MindooDBAppHistoricalDocument>` |
@@ -1504,7 +1510,7 @@ Connect options: `launchId?`, `targetOrigin?`, `connectTimeoutMs?`.
1504
1510
 
1505
1511
  `list(query?)` accepts the changefeed query options documented above. The `cursor` value is an opaque checkpoint string managed by Haven and should be stored and passed back unchanged.
1506
1512
 
1507
- For `create(input)`, use `MindooDBAppCreateDocumentInput` with shape `{ set: Record<string, unknown>; decryptionKeyId?: string; id?: string }`. The optional `id` lets the app pick the document id instead of letting MindooDB generate a UUID7; when provided it must match `/^[A-Za-z][A-Za-z0-9_]*$/` and existing live documents with that id are returned as-is (idempotent create-if-missing). If an existing custom-id document is deleted, `create({ id })` undeletes it and preserves the previous document body. Documents created with the same custom id on different replicas converge correctly when synced.
1513
+ For `create(input)`, use `MindooDBAppCreateDocumentInput` with shape `{ set: Record<string, unknown>; decryptionKeyId?: string; recipients?: string[]; recipientOptions?: { includeSelf?: boolean }; id?: string }`. Omit both `decryptionKeyId` and `recipients` to use the database default shared key (`getDefaultCreateKeyId()` / `listCreateKeys()`). Pass `recipients` to encrypt the document for specific directory users (the launching user is included unless `recipientOptions.includeSelf` is `false`). Use `includeSelf: false` to write initial `set` values and hand the document to someone else — empty `recipients` with `includeSelf: false` is rejected. Changing that list later is `addRecipients` / `removeRecipients` / `setRecipients` — do not write `_encryptFor` via `update`. The optional `id` lets the app pick the document id instead of letting MindooDB generate an ObjectId; when provided it must match `/^[a-z][a-z0-9_]*$/` (lowercase only, since ids become on-disk filenames) and existing live documents with that id are returned as-is (idempotent create-if-missing). If an existing custom-id document is deleted, `create({ id })` undeletes it and preserves the previous document body. Documents created with the same custom id on different replicas converge correctly when synced.
1508
1514
 
1509
1515
  `delete(docId)` writes a lifecycle tombstone; it does not erase the document body from the append-only history. Use `undelete(docId)` to make the latest document state live again. If you want to record a deletion reason, first call `update(docId, { set: { intendedDeletionReason: "..." } })`, then call `delete(docId)`.
1510
1516
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MindooDBAppAttachmentPreviewMode, a as MindooDBAppBridge, b as MindooDBAppDatabase, c as MindooDBAppDocument, d as MindooDBAppRichTextSpan, e as MindooDBAppRichTextSnapshot } from './types-qW1XwmiZ.js';
2
- export { f as MINDOODB_APP_SEAL_SIGNING_DOMAIN, g as MindooDBAppAccessDecision, h as MindooDBAppAccessTier, i as MindooDBAppAttachmentApi, j as MindooDBAppAttachmentChunk, k as MindooDBAppAttachmentInfo, l as MindooDBAppAttachmentPreviewOptions, m as MindooDBAppAttachmentPreviewSession, n as MindooDBAppAutomergeChangesPatch, o as MindooDBAppAutomergeChangesSince, p as MindooDBAppAutomergeGetOptions, q as MindooDBAppAutomergePatchResult, r as MindooDBAppAutomergeSnapshot, s as MindooDBAppBridgeConnectMessage, t as MindooDBAppBridgeConnectOptions, u as MindooDBAppBridgeConnectedMessage, v as MindooDBAppBridgeErrorPayload, w as MindooDBAppBridgeHandshakeErrorMessage, x as MindooDBAppBridgeLocaleChangedMessage, y as MindooDBAppBridgePortMessage, z as MindooDBAppBridgeQueryResultMessage, A as MindooDBAppBridgeRpcError, B as MindooDBAppBridgeRpcMessage, C as MindooDBAppBridgeRpcRequest, D as MindooDBAppBridgeRpcSuccess, E as MindooDBAppBridgeStreamAbortRequest, F as MindooDBAppBridgeStreamAck, G as MindooDBAppBridgeStreamCloseRequest, H as MindooDBAppBridgeStreamError, I as MindooDBAppBridgeStreamMessage, J as MindooDBAppBridgeStreamOpenResult, K as MindooDBAppBridgeStreamReadRequest, L as MindooDBAppBridgeStreamWriteRequest, N as MindooDBAppBridgeThemeChangedMessage, O as MindooDBAppBridgeUiPreferencesChangedMessage, P as MindooDBAppBridgeViewChangedMessage, Q as MindooDBAppBridgeViewportChangedMessage, R as MindooDBAppCapability, S as MindooDBAppConfiguredViewCategorizationStyle, T as MindooDBAppConfiguredViewColumn, U as MindooDBAppConfiguredViewColumnRole, V as MindooDBAppConfiguredViewExpressionMode, W as MindooDBAppConfiguredViewFieldExpression, X as MindooDBAppConfiguredViewFilterDefinition, Y as MindooDBAppConfiguredViewFilterMode, Z as MindooDBAppConfiguredViewFilterRule, _ as MindooDBAppConfiguredViewFormulaExpression, $ as MindooDBAppConfiguredViewFormulaFilterDefinition, a0 as MindooDBAppConfiguredViewPreviewMode, a1 as MindooDBAppConfiguredViewRuleFilterDefinition, a2 as MindooDBAppConfiguredViewRuleMatchMode, a3 as MindooDBAppConfiguredViewRuleOperator, a4 as MindooDBAppConfiguredViewValueExpression, a5 as MindooDBAppCreateDocumentInput, a6 as MindooDBAppCreateViewInput, a7 as MindooDBAppCreateViewNavigatorInput, a8 as MindooDBAppDatabaseInfo, a9 as MindooDBAppDirectoryApi, aa as MindooDBAppDirectoryEntry, ab as MindooDBAppDocumentApi, ac as MindooDBAppDocumentHeadCursorResult, ad as MindooDBAppDocumentHistoryEntry, ae as MindooDBAppDocumentListQuery, af as MindooDBAppDocumentListResult, ag as MindooDBAppDocumentQuery, ah as MindooDBAppDocumentRevisionId, ai as MindooDBAppDocumentScanPreset, aj as MindooDBAppDocumentSummary, ak as MindooDBAppEntryAttachmentRef, al as MindooDBAppEntryProvenance, am as MindooDBAppExtractDocumentTextInput, an as MindooDBAppExtractDocumentTextResult, ao as MindooDBAppExtractTextFormat, ap as MindooDBAppExtractionSetup, aq as MindooDBAppFulltextSetup, ar as MindooDBAppHistoricalDocument, as as MindooDBAppHistoryQuery, at as MindooDBAppHostTheme, au as MindooDBAppIdentityApi, av as MindooDBAppJsonListDeletePatch, aw as MindooDBAppJsonListInsertPatch, ax as MindooDBAppJsonPatch, ay as MindooDBAppJsonSetPatch, az as MindooDBAppJsonTextMarkPatch, aA as MindooDBAppJsonTextSplicePatch, aB as MindooDBAppJsonTextUnmarkPatch, aC as MindooDBAppJsonUnsetPatch, aD as MindooDBAppLaunchContext, aE as MindooDBAppLiveQuerySubscription, aF as MindooDBAppMenuAnchor, aG as MindooDBAppMenuApi, aH as MindooDBAppMenuCommandItem, aI as MindooDBAppMenuDismissReason, aJ as MindooDBAppMenuDismissedResult, aK as MindooDBAppMenuItem, aL as MindooDBAppMenuKind, aM as MindooDBAppMenuPlacement, aN as MindooDBAppMenuPointAnchor, aO as MindooDBAppMenuRect, aP as MindooDBAppMenuRectAnchor, aQ as MindooDBAppMenuSelectionResult, aR as MindooDBAppMenuSeparatorItem, aS as MindooDBAppQueryCoverage, aT as MindooDBAppQueryResult, aU as MindooDBAppQueryRow, aV as MindooDBAppQuerySortKey, aW as MindooDBAppQueryTextClause, aX as MindooDBAppReadableAttachmentStream, aY as MindooDBAppResolvedViewDefinition, aZ as MindooDBAppResolvedViewSource, a_ as MindooDBAppRevisionPhase, a$ as MindooDBAppRevisionVerification, b0 as MindooDBAppRichTextBlockSpan, b1 as MindooDBAppRichTextGetOptions, b2 as MindooDBAppRichTextImmutableString, b3 as MindooDBAppRichTextMarkRange, b4 as MindooDBAppRichTextMaterializeValue, b5 as MindooDBAppRichTextPatch, b6 as MindooDBAppRichTextScalar, b7 as MindooDBAppRichTextSpliceStep, b8 as MindooDBAppRichTextStep, b9 as MindooDBAppRichTextStepPatch, ba as MindooDBAppRichTextTextSpan, bb as MindooDBAppRuntime, bc as MindooDBAppScanAttachmentOptions, bd as MindooDBAppScanAttachmentResult, be as MindooDBAppScopedDocId, bf as MindooDBAppScopedDocumentSummary, bg as MindooDBAppSealIntent, bh as MindooDBAppSession, bi as MindooDBAppShowMenuInput, bj as MindooDBAppShowMenuResult, bk as MindooDBAppSignPreview, bl as MindooDBAppSignPreviewScope, bm as MindooDBAppSignStatementInput, bn as MindooDBAppSignStatementResult, bo as MindooDBAppTextEdit, bp as MindooDBAppTextPatch, bq as MindooDBAppThemeMode, br as MindooDBAppTimestampApi, bs as MindooDBAppTimestampInput, bt as MindooDBAppTimestampProvider, bu as MindooDBAppTimestampResult, bv as MindooDBAppUiPreferences, bw as MindooDBAppUpdateDocumentInput, bx as MindooDBAppViewCursorDocumentListResult, by as MindooDBAppViewCursorResult, bz as MindooDBAppViewEntry, bA as MindooDBAppViewEntryKind, bB as MindooDBAppViewNavigator, bC as MindooDBAppViewNavigatorExpansionState, bD as MindooDBAppViewNavigatorOpenOptions, bE as MindooDBAppViewNavigatorPageOptions, bF as MindooDBAppViewNavigatorPageResult, bG as MindooDBAppViewNavigatorRangeQuery, bH as MindooDBAppViewNavigatorSelectionState, bI as MindooDBAppViewUpdateStats, bJ as MindooDBAppViewport, bK as MindooDBAppWritableAttachmentStream } from './types-qW1XwmiZ.js';
1
+ import { M as MindooDBAppAttachmentPreviewMode, a as MindooDBAppBridge, b as MindooDBAppDatabase, c as MindooDBAppDocument, d as MindooDBAppRichTextSpan, e as MindooDBAppRichTextSnapshot } from './types-Plb92iSn.js';
2
+ export { f as MINDOODB_APP_SEAL_SIGNING_DOMAIN, g as MindooDBAppAccessDecision, h as MindooDBAppAccessTier, i as MindooDBAppAttachmentApi, j as MindooDBAppAttachmentChunk, k as MindooDBAppAttachmentInfo, l as MindooDBAppAttachmentPreviewOptions, m as MindooDBAppAttachmentPreviewSession, n as MindooDBAppAutomergeChangesPatch, o as MindooDBAppAutomergeChangesSince, p as MindooDBAppAutomergeGetOptions, q as MindooDBAppAutomergePatchResult, r as MindooDBAppAutomergeSnapshot, s as MindooDBAppBridgeConnectMessage, t as MindooDBAppBridgeConnectOptions, u as MindooDBAppBridgeConnectedMessage, v as MindooDBAppBridgeErrorPayload, w as MindooDBAppBridgeHandshakeErrorMessage, x as MindooDBAppBridgeLocaleChangedMessage, y as MindooDBAppBridgePortMessage, z as MindooDBAppBridgeQueryResultMessage, A as MindooDBAppBridgeRpcError, B as MindooDBAppBridgeRpcMessage, C as MindooDBAppBridgeRpcRequest, D as MindooDBAppBridgeRpcSuccess, E as MindooDBAppBridgeStreamAbortRequest, F as MindooDBAppBridgeStreamAck, G as MindooDBAppBridgeStreamCloseRequest, H as MindooDBAppBridgeStreamError, I as MindooDBAppBridgeStreamMessage, J as MindooDBAppBridgeStreamOpenResult, K as MindooDBAppBridgeStreamReadRequest, L as MindooDBAppBridgeStreamWriteRequest, N as MindooDBAppBridgeThemeChangedMessage, O as MindooDBAppBridgeUiPreferencesChangedMessage, P as MindooDBAppBridgeViewChangedMessage, Q as MindooDBAppBridgeViewportChangedMessage, R as MindooDBAppCapability, S as MindooDBAppConfiguredViewCategorizationStyle, T as MindooDBAppConfiguredViewColumn, U as MindooDBAppConfiguredViewColumnRole, V as MindooDBAppConfiguredViewExpressionMode, W as MindooDBAppConfiguredViewFieldExpression, X as MindooDBAppConfiguredViewFilterDefinition, Y as MindooDBAppConfiguredViewFilterMode, Z as MindooDBAppConfiguredViewFilterRule, _ as MindooDBAppConfiguredViewFormulaExpression, $ as MindooDBAppConfiguredViewFormulaFilterDefinition, a0 as MindooDBAppConfiguredViewPreviewMode, a1 as MindooDBAppConfiguredViewRuleFilterDefinition, a2 as MindooDBAppConfiguredViewRuleMatchMode, a3 as MindooDBAppConfiguredViewRuleOperator, a4 as MindooDBAppConfiguredViewValueExpression, a5 as MindooDBAppCreateDocumentInput, a6 as MindooDBAppCreateKeyInfo, a7 as MindooDBAppCreateViewInput, a8 as MindooDBAppCreateViewNavigatorInput, a9 as MindooDBAppDatabaseInfo, aa as MindooDBAppDirectoryApi, ab as MindooDBAppDirectoryEntry, ac as MindooDBAppDocumentApi, ad as MindooDBAppDocumentHeadCursorResult, ae as MindooDBAppDocumentHistoryEntry, af as MindooDBAppDocumentListQuery, ag as MindooDBAppDocumentListResult, ah as MindooDBAppDocumentQuery, ai as MindooDBAppDocumentRevisionId, aj as MindooDBAppDocumentScanPreset, ak as MindooDBAppDocumentSummary, al as MindooDBAppEntryAttachmentRef, am as MindooDBAppEntryProvenance, an as MindooDBAppExtractDocumentTextInput, ao as MindooDBAppExtractDocumentTextResult, ap as MindooDBAppExtractTextFormat, aq as MindooDBAppExtractionSetup, ar as MindooDBAppFulltextSetup, as as MindooDBAppHistoricalDocument, at as MindooDBAppHistoryQuery, au as MindooDBAppHostTheme, av as MindooDBAppIdentityApi, aw as MindooDBAppJsonListDeletePatch, ax as MindooDBAppJsonListInsertPatch, ay as MindooDBAppJsonPatch, az as MindooDBAppJsonSetPatch, aA as MindooDBAppJsonTextMarkPatch, aB as MindooDBAppJsonTextSplicePatch, aC as MindooDBAppJsonTextUnmarkPatch, aD as MindooDBAppJsonUnsetPatch, aE as MindooDBAppLaunchContext, aF as MindooDBAppLiveQuerySubscription, aG as MindooDBAppMenuAnchor, aH as MindooDBAppMenuApi, aI as MindooDBAppMenuCommandItem, aJ as MindooDBAppMenuDismissReason, aK as MindooDBAppMenuDismissedResult, aL as MindooDBAppMenuItem, aM as MindooDBAppMenuKind, aN as MindooDBAppMenuPlacement, aO as MindooDBAppMenuPointAnchor, aP as MindooDBAppMenuRect, aQ as MindooDBAppMenuRectAnchor, aR as MindooDBAppMenuSelectionResult, aS as MindooDBAppMenuSeparatorItem, aT as MindooDBAppQueryCoverage, aU as MindooDBAppQueryResult, aV as MindooDBAppQueryRow, aW as MindooDBAppQuerySortKey, aX as MindooDBAppQueryTextClause, aY as MindooDBAppReadableAttachmentStream, aZ as MindooDBAppRecipientOptions, a_ as MindooDBAppResolvedViewDefinition, a$ as MindooDBAppResolvedViewSource, b0 as MindooDBAppRevisionPhase, b1 as MindooDBAppRevisionVerification, b2 as MindooDBAppRichTextBlockSpan, b3 as MindooDBAppRichTextGetOptions, b4 as MindooDBAppRichTextImmutableString, b5 as MindooDBAppRichTextMarkRange, b6 as MindooDBAppRichTextMaterializeValue, b7 as MindooDBAppRichTextPatch, b8 as MindooDBAppRichTextScalar, b9 as MindooDBAppRichTextSpliceStep, ba as MindooDBAppRichTextStep, bb as MindooDBAppRichTextStepPatch, bc as MindooDBAppRichTextTextSpan, bd as MindooDBAppRuntime, be as MindooDBAppScanAttachmentOptions, bf as MindooDBAppScanAttachmentResult, bg as MindooDBAppScopedDocId, bh as MindooDBAppScopedDocumentSummary, bi as MindooDBAppSealIntent, bj as MindooDBAppSession, bk as MindooDBAppShowMenuInput, bl as MindooDBAppShowMenuResult, bm as MindooDBAppSignPreview, bn as MindooDBAppSignPreviewScope, bo as MindooDBAppSignStatementInput, bp as MindooDBAppSignStatementResult, bq as MindooDBAppTextEdit, br as MindooDBAppTextPatch, bs as MindooDBAppThemeMode, bt as MindooDBAppTimestampApi, bu as MindooDBAppTimestampInput, bv as MindooDBAppTimestampProvider, bw as MindooDBAppTimestampResult, bx as MindooDBAppUiPreferences, by as MindooDBAppUpdateDocumentInput, bz as MindooDBAppViewCursorDocumentListResult, bA as MindooDBAppViewCursorResult, bB as MindooDBAppViewEntry, bC as MindooDBAppViewEntryKind, bD as MindooDBAppViewNavigator, bE as MindooDBAppViewNavigatorExpansionState, bF as MindooDBAppViewNavigatorOpenOptions, bG as MindooDBAppViewNavigatorPageOptions, bH as MindooDBAppViewNavigatorPageResult, bI as MindooDBAppViewNavigatorRangeQuery, bJ as MindooDBAppViewNavigatorSelectionState, bK as MindooDBAppViewUpdateStats, bL as MindooDBAppViewport, bM as MindooDBAppWritableAttachmentStream } from './types-Plb92iSn.js';
3
3
  import { MindooDBAppBooleanExpression } from 'mindoodb-view-language';
4
4
  export { MindooDBAppBooleanExpression, MindooDBAppExpression, MindooDBAppFilterDefinition, MindooDBAppViewCategoryChildrenPageRequest, MindooDBAppViewColumn, MindooDBAppViewColumnRole, MindooDBAppViewDefinition, MindooDBAppViewExpansionState, MindooDBAppViewExpressionBase, MindooDBAppViewExpressionDatePart, MindooDBAppViewExpressionOperation, MindooDBAppViewFieldExpression, MindooDBAppViewIfExpression, MindooDBAppViewLetExpression, MindooDBAppViewLiteralExpression, MindooDBAppViewLookupByPath, MindooDBAppViewOperationExpression, MindooDBAppViewOriginExpression, MindooDBAppViewPageRequest, MindooDBAppViewPageResult, MindooDBAppViewRow, MindooDBAppViewSortDirection, MindooDBAppViewTotalMode, MindooDBAppViewValueExpressionRef, MindooDBAppViewVariableExpression, createViewLanguage } from 'mindoodb-view-language';
5
5
  import { MindooDB, MindooQuerySortKey, MindooQueryOptions, MindooQueryResult } from 'mindoodb';
package/dist/index.js CHANGED
@@ -852,6 +852,22 @@ var MindooDBAppDatabaseImpl = class {
852
852
  docId,
853
853
  patch
854
854
  }),
855
+ addRecipients: async (docId, recipients) => await this.rpc.call("documents.addRecipients", {
856
+ databaseId: this.databaseId,
857
+ docId,
858
+ recipients
859
+ }),
860
+ removeRecipients: async (docId, recipients) => await this.rpc.call("documents.removeRecipients", {
861
+ databaseId: this.databaseId,
862
+ docId,
863
+ recipients
864
+ }),
865
+ setRecipients: async (docId, recipients, options) => await this.rpc.call("documents.setRecipients", {
866
+ databaseId: this.databaseId,
867
+ docId,
868
+ recipients,
869
+ recipientOptions: options
870
+ }),
855
871
  delete: async (docId) => await this.rpc.call("documents.delete", {
856
872
  databaseId: this.databaseId,
857
873
  docId
@@ -901,6 +917,21 @@ var MindooDBAppDatabaseImpl = class {
901
917
  getDefaultCreateKeyId: async () => await this.rpc.call("documents.getDefaultCreateKeyId", {
902
918
  databaseId: this.databaseId
903
919
  }),
920
+ listCreateKeys: async () => {
921
+ try {
922
+ return await this.rpc.call("documents.listCreateKeys", {
923
+ databaseId: this.databaseId
924
+ });
925
+ } catch (error) {
926
+ if (!isMethodNotFoundError(error)) {
927
+ throw error;
928
+ }
929
+ const keyId = await this.rpc.call("documents.getDefaultCreateKeyId", {
930
+ databaseId: this.databaseId
931
+ });
932
+ return [{ keyId, isDefault: true }];
933
+ }
934
+ },
904
935
  listHistory: async (docId) => await this.rpc.call("documents.history.list", {
905
936
  databaseId: this.databaseId,
906
937
  docId
@@ -946,7 +977,19 @@ var MindooDBAppDatabaseImpl = class {
946
977
  excerpt: async (publicKeys) => await this.rpc.call("directory.excerpt", {
947
978
  databaseId: this.databaseId,
948
979
  publicKeys
949
- })
980
+ }),
981
+ listUsers: async () => {
982
+ try {
983
+ return await this.rpc.call("directory.listUsers", {
984
+ databaseId: this.databaseId
985
+ });
986
+ } catch (error) {
987
+ if (!isMethodNotFoundError(error)) {
988
+ throw error;
989
+ }
990
+ return [];
991
+ }
992
+ }
950
993
  };
951
994
  this.attachments = {
952
995
  list: async (docId, options) => await this.rpc.call("attachments.list", {
@@ -1,4 +1,4 @@
1
- import { a7 as MindooDBAppCreateViewNavigatorInput, bB as MindooDBAppViewNavigator, aD as MindooDBAppLaunchContext, a8 as MindooDBAppDatabaseInfo, ab as MindooDBAppDocumentApi, bD as MindooDBAppViewNavigatorOpenOptions, i as MindooDBAppAttachmentApi, au as MindooDBAppIdentityApi, br as MindooDBAppTimestampApi, a9 as MindooDBAppDirectoryApi, c as MindooDBAppDocument, aq as MindooDBAppFulltextSetup, ap as MindooDBAppExtractionSetup, a as MindooDBAppBridge, bh as MindooDBAppSession, C as MindooDBAppBridgeRpcRequest, at as MindooDBAppHostTheme, bJ as MindooDBAppViewport, bv as MindooDBAppUiPreferences, aT as MindooDBAppQueryResult, bI as MindooDBAppViewUpdateStats, y as MindooDBAppBridgePortMessage } from '../types-qW1XwmiZ.js';
1
+ import { a8 as MindooDBAppCreateViewNavigatorInput, bD as MindooDBAppViewNavigator, aE as MindooDBAppLaunchContext, a9 as MindooDBAppDatabaseInfo, ac as MindooDBAppDocumentApi, bF as MindooDBAppViewNavigatorOpenOptions, i as MindooDBAppAttachmentApi, av as MindooDBAppIdentityApi, bt as MindooDBAppTimestampApi, aa as MindooDBAppDirectoryApi, c as MindooDBAppDocument, ar as MindooDBAppFulltextSetup, aq as MindooDBAppExtractionSetup, a as MindooDBAppBridge, bj as MindooDBAppSession, C as MindooDBAppBridgeRpcRequest, au as MindooDBAppHostTheme, bL as MindooDBAppViewport, bx as MindooDBAppUiPreferences, aU as MindooDBAppQueryResult, bK as MindooDBAppViewUpdateStats, y as MindooDBAppBridgePortMessage } from '../types-Plb92iSn.js';
2
2
  import * as mindoodb from 'mindoodb';
3
3
  import 'mindoodb-view-language';
4
4
 
@@ -1246,6 +1246,43 @@ function createDatabaseHandle(definition) {
1246
1246
  }
1247
1247
  }
1248
1248
  };
1249
+ function mockEncryptForMap(names) {
1250
+ const encryptFor = {};
1251
+ for (const name of names) {
1252
+ const trimmed = name.trim();
1253
+ if (trimmed) {
1254
+ encryptFor[trimmed] = { kind: "user" };
1255
+ }
1256
+ }
1257
+ return encryptFor;
1258
+ }
1259
+ function persistEncryptFor(docId, nextEncryptFor) {
1260
+ const existing = storedDocuments.get(docId);
1261
+ if (!existing || existing.isDeleted) {
1262
+ throw new Error(`Recipient mutators require an existing document (${docId})`);
1263
+ }
1264
+ const raw = existing.data._encryptFor;
1265
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
1266
+ throw new Error("Recipient mutators require a document created with `recipients`");
1267
+ }
1268
+ const updatedAt = (/* @__PURE__ */ new Date()).toISOString();
1269
+ const updated = {
1270
+ id: docId,
1271
+ data: { ...existing.data, _encryptFor: nextEncryptFor },
1272
+ heads: [`mock-head-${++changeCounter}`],
1273
+ attachments: existing.attachments ? structuredClone(existing.attachments) : [],
1274
+ updatedAt
1275
+ };
1276
+ storedDocuments.set(docId, {
1277
+ ...updated,
1278
+ data: structuredClone(updated.data),
1279
+ attachments: updated.attachments ? structuredClone(updated.attachments) : [],
1280
+ isDeleted: false,
1281
+ automergeBinary: void 0
1282
+ });
1283
+ notifyLiveQueries();
1284
+ return updated;
1285
+ }
1249
1286
  const defaultDocuments = {
1250
1287
  async query(query) {
1251
1288
  return runMockDocumentQuery(storedDocuments, definition.info.id, query);
@@ -1433,9 +1470,17 @@ function createDatabaseHandle(definition) {
1433
1470
  id = `doc-${createCounter}`;
1434
1471
  }
1435
1472
  const createdAt = (/* @__PURE__ */ new Date()).toISOString();
1473
+ if (Array.isArray(input.recipients) && input.recipientOptions?.includeSelf === false && input.recipients.every((name) => name.trim().length === 0)) {
1474
+ throw new Error(
1475
+ "recipients: [] with includeSelf: false would produce a document nobody can read"
1476
+ );
1477
+ }
1436
1478
  const created = {
1437
1479
  id,
1438
- data: { ...input.set },
1480
+ data: {
1481
+ ...input.set,
1482
+ ...Array.isArray(input.recipients) ? { _encryptFor: mockEncryptForMap(input.recipients) } : {}
1483
+ },
1439
1484
  heads: [`mock-head-${++changeCounter}`],
1440
1485
  attachments: [],
1441
1486
  updatedAt: createdAt
@@ -1479,6 +1524,49 @@ function createDatabaseHandle(definition) {
1479
1524
  notifyLiveQueries();
1480
1525
  return updated;
1481
1526
  },
1527
+ async addRecipients(docId, recipients) {
1528
+ const existing = storedDocuments.get(docId);
1529
+ const current = existing?.data._encryptFor && typeof existing.data._encryptFor === "object" && !Array.isArray(existing.data._encryptFor) ? { ...existing.data._encryptFor } : null;
1530
+ if (!current) {
1531
+ throw new Error("Recipient mutators require a document created with `recipients`");
1532
+ }
1533
+ for (const name of recipients) {
1534
+ const trimmed = name.trim();
1535
+ if (!trimmed) {
1536
+ continue;
1537
+ }
1538
+ const key = Object.keys(current).find(
1539
+ (entry) => entry.trim().toLowerCase() === trimmed.toLowerCase()
1540
+ );
1541
+ if (key) {
1542
+ delete current[key].removedAt;
1543
+ } else {
1544
+ current[trimmed] = { kind: "user" };
1545
+ }
1546
+ }
1547
+ return persistEncryptFor(docId, current);
1548
+ },
1549
+ async removeRecipients(docId, recipients) {
1550
+ const existing = storedDocuments.get(docId);
1551
+ const current = existing?.data._encryptFor && typeof existing.data._encryptFor === "object" && !Array.isArray(existing.data._encryptFor) ? { ...existing.data._encryptFor } : {};
1552
+ const drop = new Set(
1553
+ recipients.map((name) => name.trim().toLowerCase()).filter(Boolean)
1554
+ );
1555
+ for (const key of Object.keys(current)) {
1556
+ if (drop.has(key.trim().toLowerCase())) {
1557
+ delete current[key];
1558
+ }
1559
+ }
1560
+ return persistEncryptFor(docId, current);
1561
+ },
1562
+ async setRecipients(docId, recipients, options) {
1563
+ if (options?.includeSelf === false && recipients.every((name) => name.trim().length === 0)) {
1564
+ throw new Error(
1565
+ "recipients: [] with includeSelf: false would produce a document nobody can read"
1566
+ );
1567
+ }
1568
+ return persistEncryptFor(docId, mockEncryptForMap(recipients));
1569
+ },
1482
1570
  async delete(_docId) {
1483
1571
  const existing = storedDocuments.get(_docId);
1484
1572
  if (existing) {
@@ -1525,6 +1613,9 @@ function createDatabaseHandle(definition) {
1525
1613
  async getDefaultCreateKeyId() {
1526
1614
  return "default";
1527
1615
  },
1616
+ async listCreateKeys() {
1617
+ return [{ keyId: "default", isDefault: true }];
1618
+ },
1528
1619
  async listHistory(_docId) {
1529
1620
  return [];
1530
1621
  },
@@ -1610,6 +1701,9 @@ function createDatabaseHandle(definition) {
1610
1701
  fingerprint: "0".repeat(64),
1611
1702
  status: "unknown"
1612
1703
  }));
1704
+ },
1705
+ async listUsers() {
1706
+ return [];
1613
1707
  }
1614
1708
  };
1615
1709
  const defaultViews = {
@@ -2237,6 +2331,22 @@ function createFakeBridgeHost(options = {}) {
2237
2331
  String(params.docId),
2238
2332
  params.patch
2239
2333
  );
2334
+ case "documents.addRecipients":
2335
+ return await state.getDatabase(String(params.databaseId)).documents.addRecipients(
2336
+ String(params.docId),
2337
+ Array.isArray(params.recipients) ? params.recipients.map(String) : []
2338
+ );
2339
+ case "documents.removeRecipients":
2340
+ return await state.getDatabase(String(params.databaseId)).documents.removeRecipients(
2341
+ String(params.docId),
2342
+ Array.isArray(params.recipients) ? params.recipients.map(String) : []
2343
+ );
2344
+ case "documents.setRecipients":
2345
+ return await state.getDatabase(String(params.databaseId)).documents.setRecipients(
2346
+ String(params.docId),
2347
+ Array.isArray(params.recipients) ? params.recipients.map(String) : [],
2348
+ params.recipientOptions && typeof params.recipientOptions === "object" && !Array.isArray(params.recipientOptions) ? params.recipientOptions : void 0
2349
+ );
2240
2350
  case "documents.delete":
2241
2351
  return await state.getDatabase(String(params.databaseId)).documents.delete(String(params.docId));
2242
2352
  case "documents.undelete":
@@ -2253,6 +2363,8 @@ function createFakeBridgeHost(options = {}) {
2253
2363
  return await state.getDatabase(String(params.databaseId)).documents.canUndelete(String(params.docId));
2254
2364
  case "documents.getDefaultCreateKeyId":
2255
2365
  return await state.getDatabase(String(params.databaseId)).documents.getDefaultCreateKeyId();
2366
+ case "documents.listCreateKeys":
2367
+ return await state.getDatabase(String(params.databaseId)).documents.listCreateKeys();
2256
2368
  case "documents.history.list":
2257
2369
  return await state.getDatabase(String(params.databaseId)).documents.listHistory(String(params.docId));
2258
2370
  case "documents.history.getAtTimestamp":
@@ -2292,6 +2404,8 @@ function createFakeBridgeHost(options = {}) {
2292
2404
  return await state.getDatabase(String(params.databaseId)).directory.excerpt(
2293
2405
  Array.isArray(params.publicKeys) ? params.publicKeys.map(String) : []
2294
2406
  );
2407
+ case "directory.listUsers":
2408
+ return await state.getDatabase(String(params.databaseId)).directory.listUsers();
2295
2409
  case "attachments.list":
2296
2410
  return await state.getDatabase(String(params.databaseId)).attachments.list(
2297
2411
  String(params.docId),
@@ -406,6 +406,22 @@ interface MindooDBAppAccessDecision {
406
406
  tier: MindooDBAppAccessTier;
407
407
  matchedRuleId?: string;
408
408
  }
409
+ /**
410
+ * Options for person-bound (`recipients`) encryption.
411
+ *
412
+ * Matches MindooDB `recipientOptions`. The launching user is included as a
413
+ * reader unless {@link includeSelf} is `false`.
414
+ */
415
+ interface MindooDBAppRecipientOptions {
416
+ /**
417
+ * When `false`, the launching user is not added as a reader. Use this to
418
+ * create a document for someone else (a drop box): `set` still writes the
419
+ * initial values, then only `recipients` can decrypt later. Defaults to
420
+ * `true`. Empty `recipients` with `includeSelf: false` is rejected by the
421
+ * host — it would produce a document nobody can read.
422
+ */
423
+ includeSelf?: boolean;
424
+ }
409
425
  /**
410
426
  * Payload used when creating a new document.
411
427
  *
@@ -416,11 +432,22 @@ interface MindooDBAppCreateDocumentInput {
416
432
  set: Record<string, unknown>;
417
433
  /** Optional named document key. Defaults to `"default"` when omitted. */
418
434
  decryptionKeyId?: string;
435
+ /**
436
+ * Usernames to encrypt this new document for (person-bound User-Keys).
437
+ * Mutually exclusive with {@link decryptionKeyId}. The launching user is
438
+ * included by the host unless {@link recipientOptions}.includeSelf is
439
+ * `false`.
440
+ */
441
+ recipients?: string[];
442
+ /** Sealed-create options. Only used when {@link recipients} is set. */
443
+ recipientOptions?: MindooDBAppRecipientOptions;
419
444
  /**
420
445
  * Optional caller-provided document id. When omitted, MindooDB generates a
421
- * UUID7. When provided, the id must match `^[A-Za-z][A-Za-z0-9_]*$`: the
422
- * first character is an ASCII letter and subsequent characters may be ASCII
423
- * letters, ASCII digits, or `_`.
446
+ * MongoDB-style ObjectId (24 lowercase hex characters). When provided, the id
447
+ * must match `^[a-z][a-z0-9_]*$`: the first character is a lowercase ASCII
448
+ * letter and subsequent characters may be lowercase ASCII letters, ASCII
449
+ * digits, or `_`. Uppercase is rejected because ids end up in on-disk
450
+ * filenames, and those file systems are case-insensitive.
424
451
  *
425
452
  * If a document with this id already exists locally, MindooDB returns the
426
453
  * existing document instead of creating a new one (idempotent create), and
@@ -1221,6 +1248,27 @@ interface MindooDBAppDocumentApi {
1221
1248
  * each other. Requires the `update` capability.
1222
1249
  */
1223
1250
  update(docId: string, patch: MindooDBAppUpdateDocumentInput): Promise<MindooDBAppDocument>;
1251
+ /**
1252
+ * Add readers to a document created with {@link MindooDBAppCreateDocumentInput.recipients}.
1253
+ * One key wrap per new user, no rotation — new readers can decrypt the
1254
+ * whole history. The launching user is already on the list and does not
1255
+ * need to be passed. Requires the `update` capability.
1256
+ */
1257
+ addRecipients(docId: string, recipients: string[]): Promise<MindooDBAppDocument>;
1258
+ /**
1259
+ * Drop readers from a sealed document. Rotates the document key so
1260
+ * removed readers keep what they already have and cannot read later
1261
+ * changes. Do not write `_encryptFor` via {@link update}. Requires the
1262
+ * `update` capability.
1263
+ */
1264
+ removeRecipients(docId: string, recipients: string[]): Promise<MindooDBAppDocument>;
1265
+ /**
1266
+ * Replace the extra-recipient list of a sealed document. Diffs against
1267
+ * the current set (additions wrap, removals rotate). The launching user
1268
+ * stays on the list unless {@link MindooDBAppRecipientOptions.includeSelf}
1269
+ * is `false`. Requires the `update` capability.
1270
+ */
1271
+ setRecipients(docId: string, recipients: string[], options?: MindooDBAppRecipientOptions): Promise<MindooDBAppDocument>;
1224
1272
  /**
1225
1273
  * Mark a document as deleted by writing a lifecycle tombstone. The
1226
1274
  * append-only history keeps the document body, so {@link undelete} can
@@ -1257,6 +1305,8 @@ interface MindooDBAppDocumentApi {
1257
1305
  */
1258
1306
  canCreate(input?: {
1259
1307
  decryptionKeyId?: string;
1308
+ recipients?: string[];
1309
+ recipientOptions?: MindooDBAppRecipientOptions;
1260
1310
  }): Promise<MindooDBAppAccessDecision>;
1261
1311
  /**
1262
1312
  * Predict whether `update` would be allowed for the given document, without
@@ -1275,6 +1325,12 @@ interface MindooDBAppDocumentApi {
1275
1325
  * and falls back to `"default"`.
1276
1326
  */
1277
1327
  getDefaultCreateKeyId(): Promise<string>;
1328
+ /**
1329
+ * Shared document keys this user can create with in this database, plus
1330
+ * which one {@link getDefaultCreateKeyId} would pick. Use this to populate a
1331
+ * "New document" key picker. Requires the `create` capability.
1332
+ */
1333
+ listCreateKeys(): Promise<MindooDBAppCreateKeyInfo[]>;
1278
1334
  /**
1279
1335
  * List the document's revision timeline (newest first), including author
1280
1336
  * identity metadata and the stable `revisionId` per entry. Entries are
@@ -1358,6 +1414,13 @@ interface MindooDBAppTimestampApi {
1358
1414
  /** Providers this host can currently reach, best first. */
1359
1415
  listProviders(): Promise<MindooDBAppTimestampProvider[]>;
1360
1416
  }
1417
+ /** A shared document key the launching user can create with. */
1418
+ interface MindooDBAppCreateKeyInfo {
1419
+ /** Key id as stored on the document (`"default"`, `"$publicinfos"`, …). */
1420
+ keyId: string;
1421
+ /** True when this is the database/tenant default for new documents. */
1422
+ isDefault: boolean;
1423
+ }
1361
1424
  /** Read-only lookups against the tenant's user directory. */
1362
1425
  interface MindooDBAppDirectoryApi {
1363
1426
  /**
@@ -1368,6 +1431,11 @@ interface MindooDBAppDirectoryApi {
1368
1431
  * name the keys it could not resolve. Requires the `directory` capability.
1369
1432
  */
1370
1433
  excerpt(publicKeys: string[]): Promise<MindooDBAppDirectoryEntry[]>;
1434
+ /**
1435
+ * Active directory usernames in this tenant, for recipient pickers.
1436
+ * Requires the `directory` capability.
1437
+ */
1438
+ listUsers(): Promise<string[]>;
1371
1439
  }
1372
1440
  /**
1373
1441
  * The only signing domain apps may request today. Domain separation is not
@@ -1958,4 +2026,4 @@ interface MindooDBAppBridge {
1958
2026
  connect(options?: MindooDBAppBridgeConnectOptions): Promise<MindooDBAppSession>;
1959
2027
  }
1960
2028
 
1961
- export { type MindooDBAppConfiguredViewFormulaFilterDefinition as $, type MindooDBAppBridgeRpcError as A, type MindooDBAppBridgeRpcMessage as B, type MindooDBAppBridgeRpcRequest as C, type MindooDBAppBridgeRpcSuccess as D, type MindooDBAppBridgeStreamAbortRequest as E, type MindooDBAppBridgeStreamAck as F, type MindooDBAppBridgeStreamCloseRequest as G, type MindooDBAppBridgeStreamError as H, type MindooDBAppBridgeStreamMessage as I, type MindooDBAppBridgeStreamOpenResult as J, type MindooDBAppBridgeStreamReadRequest as K, type MindooDBAppBridgeStreamWriteRequest as L, type MindooDBAppAttachmentPreviewMode as M, type MindooDBAppBridgeThemeChangedMessage as N, type MindooDBAppBridgeUiPreferencesChangedMessage as O, type MindooDBAppBridgeViewChangedMessage as P, type MindooDBAppBridgeViewportChangedMessage as Q, type MindooDBAppCapability as R, type MindooDBAppConfiguredViewCategorizationStyle as S, type MindooDBAppConfiguredViewColumn as T, type MindooDBAppConfiguredViewColumnRole as U, type MindooDBAppConfiguredViewExpressionMode as V, type MindooDBAppConfiguredViewFieldExpression as W, type MindooDBAppConfiguredViewFilterDefinition as X, type MindooDBAppConfiguredViewFilterMode as Y, type MindooDBAppConfiguredViewFilterRule as Z, type MindooDBAppConfiguredViewFormulaExpression as _, type MindooDBAppBridge as a, type MindooDBAppRevisionVerification as a$, type MindooDBAppConfiguredViewPreviewMode as a0, type MindooDBAppConfiguredViewRuleFilterDefinition as a1, type MindooDBAppConfiguredViewRuleMatchMode as a2, type MindooDBAppConfiguredViewRuleOperator as a3, type MindooDBAppConfiguredViewValueExpression as a4, type MindooDBAppCreateDocumentInput as a5, type MindooDBAppCreateViewInput as a6, type MindooDBAppCreateViewNavigatorInput as a7, type MindooDBAppDatabaseInfo as a8, type MindooDBAppDirectoryApi as a9, type MindooDBAppJsonTextSplicePatch as aA, type MindooDBAppJsonTextUnmarkPatch as aB, type MindooDBAppJsonUnsetPatch as aC, type MindooDBAppLaunchContext as aD, type MindooDBAppLiveQuerySubscription as aE, type MindooDBAppMenuAnchor as aF, type MindooDBAppMenuApi as aG, type MindooDBAppMenuCommandItem as aH, type MindooDBAppMenuDismissReason as aI, type MindooDBAppMenuDismissedResult as aJ, type MindooDBAppMenuItem as aK, type MindooDBAppMenuKind as aL, type MindooDBAppMenuPlacement as aM, type MindooDBAppMenuPointAnchor as aN, type MindooDBAppMenuRect as aO, type MindooDBAppMenuRectAnchor as aP, type MindooDBAppMenuSelectionResult as aQ, type MindooDBAppMenuSeparatorItem as aR, type MindooDBAppQueryCoverage as aS, type MindooDBAppQueryResult as aT, type MindooDBAppQueryRow as aU, type MindooDBAppQuerySortKey as aV, type MindooDBAppQueryTextClause as aW, type MindooDBAppReadableAttachmentStream as aX, type MindooDBAppResolvedViewDefinition as aY, type MindooDBAppResolvedViewSource as aZ, type MindooDBAppRevisionPhase as a_, type MindooDBAppDirectoryEntry as aa, type MindooDBAppDocumentApi as ab, type MindooDBAppDocumentHeadCursorResult as ac, type MindooDBAppDocumentHistoryEntry as ad, type MindooDBAppDocumentListQuery as ae, type MindooDBAppDocumentListResult as af, type MindooDBAppDocumentQuery as ag, type MindooDBAppDocumentRevisionId as ah, type MindooDBAppDocumentScanPreset as ai, type MindooDBAppDocumentSummary as aj, type MindooDBAppEntryAttachmentRef as ak, type MindooDBAppEntryProvenance as al, type MindooDBAppExtractDocumentTextInput as am, type MindooDBAppExtractDocumentTextResult as an, type MindooDBAppExtractTextFormat as ao, type MindooDBAppExtractionSetup as ap, type MindooDBAppFulltextSetup as aq, type MindooDBAppHistoricalDocument as ar, type MindooDBAppHistoryQuery as as, type MindooDBAppHostTheme as at, type MindooDBAppIdentityApi as au, type MindooDBAppJsonListDeletePatch as av, type MindooDBAppJsonListInsertPatch as aw, type MindooDBAppJsonPatch as ax, type MindooDBAppJsonSetPatch as ay, type MindooDBAppJsonTextMarkPatch as az, type MindooDBAppDatabase as b, type MindooDBAppRichTextBlockSpan as b0, type MindooDBAppRichTextGetOptions as b1, type MindooDBAppRichTextImmutableString as b2, type MindooDBAppRichTextMarkRange as b3, type MindooDBAppRichTextMaterializeValue as b4, type MindooDBAppRichTextPatch as b5, type MindooDBAppRichTextScalar as b6, type MindooDBAppRichTextSpliceStep as b7, type MindooDBAppRichTextStep as b8, type MindooDBAppRichTextStepPatch as b9, type MindooDBAppViewEntryKind as bA, type MindooDBAppViewNavigator as bB, type MindooDBAppViewNavigatorExpansionState as bC, type MindooDBAppViewNavigatorOpenOptions as bD, type MindooDBAppViewNavigatorPageOptions as bE, type MindooDBAppViewNavigatorPageResult as bF, type MindooDBAppViewNavigatorRangeQuery as bG, type MindooDBAppViewNavigatorSelectionState as bH, type MindooDBAppViewUpdateStats as bI, type MindooDBAppViewport as bJ, type MindooDBAppWritableAttachmentStream as bK, type MindooDBAppRichTextTextSpan as ba, type MindooDBAppRuntime as bb, type MindooDBAppScanAttachmentOptions as bc, type MindooDBAppScanAttachmentResult as bd, type MindooDBAppScopedDocId as be, type MindooDBAppScopedDocumentSummary as bf, type MindooDBAppSealIntent as bg, type MindooDBAppSession as bh, type MindooDBAppShowMenuInput as bi, type MindooDBAppShowMenuResult as bj, type MindooDBAppSignPreview as bk, type MindooDBAppSignPreviewScope as bl, type MindooDBAppSignStatementInput as bm, type MindooDBAppSignStatementResult as bn, type MindooDBAppTextEdit as bo, type MindooDBAppTextPatch as bp, type MindooDBAppThemeMode as bq, type MindooDBAppTimestampApi as br, type MindooDBAppTimestampInput as bs, type MindooDBAppTimestampProvider as bt, type MindooDBAppTimestampResult as bu, type MindooDBAppUiPreferences as bv, type MindooDBAppUpdateDocumentInput as bw, type MindooDBAppViewCursorDocumentListResult as bx, type MindooDBAppViewCursorResult as by, type MindooDBAppViewEntry as bz, type MindooDBAppDocument as c, type MindooDBAppRichTextSpan as d, type MindooDBAppRichTextSnapshot as e, MINDOODB_APP_SEAL_SIGNING_DOMAIN as f, type MindooDBAppAccessDecision as g, type MindooDBAppAccessTier as h, type MindooDBAppAttachmentApi as i, type MindooDBAppAttachmentChunk as j, type MindooDBAppAttachmentInfo as k, type MindooDBAppAttachmentPreviewOptions as l, type MindooDBAppAttachmentPreviewSession as m, type MindooDBAppAutomergeChangesPatch as n, type MindooDBAppAutomergeChangesSince as o, type MindooDBAppAutomergeGetOptions as p, type MindooDBAppAutomergePatchResult as q, type MindooDBAppAutomergeSnapshot as r, type MindooDBAppBridgeConnectMessage as s, type MindooDBAppBridgeConnectOptions as t, type MindooDBAppBridgeConnectedMessage as u, type MindooDBAppBridgeErrorPayload as v, type MindooDBAppBridgeHandshakeErrorMessage as w, type MindooDBAppBridgeLocaleChangedMessage as x, type MindooDBAppBridgePortMessage as y, type MindooDBAppBridgeQueryResultMessage as z };
2029
+ export { type MindooDBAppConfiguredViewFormulaFilterDefinition as $, type MindooDBAppBridgeRpcError as A, type MindooDBAppBridgeRpcMessage as B, type MindooDBAppBridgeRpcRequest as C, type MindooDBAppBridgeRpcSuccess as D, type MindooDBAppBridgeStreamAbortRequest as E, type MindooDBAppBridgeStreamAck as F, type MindooDBAppBridgeStreamCloseRequest as G, type MindooDBAppBridgeStreamError as H, type MindooDBAppBridgeStreamMessage as I, type MindooDBAppBridgeStreamOpenResult as J, type MindooDBAppBridgeStreamReadRequest as K, type MindooDBAppBridgeStreamWriteRequest as L, type MindooDBAppAttachmentPreviewMode as M, type MindooDBAppBridgeThemeChangedMessage as N, type MindooDBAppBridgeUiPreferencesChangedMessage as O, type MindooDBAppBridgeViewChangedMessage as P, type MindooDBAppBridgeViewportChangedMessage as Q, type MindooDBAppCapability as R, type MindooDBAppConfiguredViewCategorizationStyle as S, type MindooDBAppConfiguredViewColumn as T, type MindooDBAppConfiguredViewColumnRole as U, type MindooDBAppConfiguredViewExpressionMode as V, type MindooDBAppConfiguredViewFieldExpression as W, type MindooDBAppConfiguredViewFilterDefinition as X, type MindooDBAppConfiguredViewFilterMode as Y, type MindooDBAppConfiguredViewFilterRule as Z, type MindooDBAppConfiguredViewFormulaExpression as _, type MindooDBAppBridge as a, type MindooDBAppResolvedViewSource as a$, type MindooDBAppConfiguredViewPreviewMode as a0, type MindooDBAppConfiguredViewRuleFilterDefinition as a1, type MindooDBAppConfiguredViewRuleMatchMode as a2, type MindooDBAppConfiguredViewRuleOperator as a3, type MindooDBAppConfiguredViewValueExpression as a4, type MindooDBAppCreateDocumentInput as a5, type MindooDBAppCreateKeyInfo as a6, type MindooDBAppCreateViewInput as a7, type MindooDBAppCreateViewNavigatorInput as a8, type MindooDBAppDatabaseInfo as a9, type MindooDBAppJsonTextMarkPatch as aA, type MindooDBAppJsonTextSplicePatch as aB, type MindooDBAppJsonTextUnmarkPatch as aC, type MindooDBAppJsonUnsetPatch as aD, type MindooDBAppLaunchContext as aE, type MindooDBAppLiveQuerySubscription as aF, type MindooDBAppMenuAnchor as aG, type MindooDBAppMenuApi as aH, type MindooDBAppMenuCommandItem as aI, type MindooDBAppMenuDismissReason as aJ, type MindooDBAppMenuDismissedResult as aK, type MindooDBAppMenuItem as aL, type MindooDBAppMenuKind as aM, type MindooDBAppMenuPlacement as aN, type MindooDBAppMenuPointAnchor as aO, type MindooDBAppMenuRect as aP, type MindooDBAppMenuRectAnchor as aQ, type MindooDBAppMenuSelectionResult as aR, type MindooDBAppMenuSeparatorItem as aS, type MindooDBAppQueryCoverage as aT, type MindooDBAppQueryResult as aU, type MindooDBAppQueryRow as aV, type MindooDBAppQuerySortKey as aW, type MindooDBAppQueryTextClause as aX, type MindooDBAppReadableAttachmentStream as aY, type MindooDBAppRecipientOptions as aZ, type MindooDBAppResolvedViewDefinition as a_, type MindooDBAppDirectoryApi as aa, type MindooDBAppDirectoryEntry as ab, type MindooDBAppDocumentApi as ac, type MindooDBAppDocumentHeadCursorResult as ad, type MindooDBAppDocumentHistoryEntry as ae, type MindooDBAppDocumentListQuery as af, type MindooDBAppDocumentListResult as ag, type MindooDBAppDocumentQuery as ah, type MindooDBAppDocumentRevisionId as ai, type MindooDBAppDocumentScanPreset as aj, type MindooDBAppDocumentSummary as ak, type MindooDBAppEntryAttachmentRef as al, type MindooDBAppEntryProvenance as am, type MindooDBAppExtractDocumentTextInput as an, type MindooDBAppExtractDocumentTextResult as ao, type MindooDBAppExtractTextFormat as ap, type MindooDBAppExtractionSetup as aq, type MindooDBAppFulltextSetup as ar, type MindooDBAppHistoricalDocument as as, type MindooDBAppHistoryQuery as at, type MindooDBAppHostTheme as au, type MindooDBAppIdentityApi as av, type MindooDBAppJsonListDeletePatch as aw, type MindooDBAppJsonListInsertPatch as ax, type MindooDBAppJsonPatch as ay, type MindooDBAppJsonSetPatch as az, type MindooDBAppDatabase as b, type MindooDBAppRevisionPhase as b0, type MindooDBAppRevisionVerification as b1, type MindooDBAppRichTextBlockSpan as b2, type MindooDBAppRichTextGetOptions as b3, type MindooDBAppRichTextImmutableString as b4, type MindooDBAppRichTextMarkRange as b5, type MindooDBAppRichTextMaterializeValue as b6, type MindooDBAppRichTextPatch as b7, type MindooDBAppRichTextScalar as b8, type MindooDBAppRichTextSpliceStep as b9, type MindooDBAppViewCursorResult as bA, type MindooDBAppViewEntry as bB, type MindooDBAppViewEntryKind as bC, type MindooDBAppViewNavigator as bD, type MindooDBAppViewNavigatorExpansionState as bE, type MindooDBAppViewNavigatorOpenOptions as bF, type MindooDBAppViewNavigatorPageOptions as bG, type MindooDBAppViewNavigatorPageResult as bH, type MindooDBAppViewNavigatorRangeQuery as bI, type MindooDBAppViewNavigatorSelectionState as bJ, type MindooDBAppViewUpdateStats as bK, type MindooDBAppViewport as bL, type MindooDBAppWritableAttachmentStream as bM, type MindooDBAppRichTextStep as ba, type MindooDBAppRichTextStepPatch as bb, type MindooDBAppRichTextTextSpan as bc, type MindooDBAppRuntime as bd, type MindooDBAppScanAttachmentOptions as be, type MindooDBAppScanAttachmentResult as bf, type MindooDBAppScopedDocId as bg, type MindooDBAppScopedDocumentSummary as bh, type MindooDBAppSealIntent as bi, type MindooDBAppSession as bj, type MindooDBAppShowMenuInput as bk, type MindooDBAppShowMenuResult as bl, type MindooDBAppSignPreview as bm, type MindooDBAppSignPreviewScope as bn, type MindooDBAppSignStatementInput as bo, type MindooDBAppSignStatementResult as bp, type MindooDBAppTextEdit as bq, type MindooDBAppTextPatch as br, type MindooDBAppThemeMode as bs, type MindooDBAppTimestampApi as bt, type MindooDBAppTimestampInput as bu, type MindooDBAppTimestampProvider as bv, type MindooDBAppTimestampResult as bw, type MindooDBAppUiPreferences as bx, type MindooDBAppUpdateDocumentInput as by, type MindooDBAppViewCursorDocumentListResult as bz, type MindooDBAppDocument as c, type MindooDBAppRichTextSpan as d, type MindooDBAppRichTextSnapshot as e, MINDOODB_APP_SEAL_SIGNING_DOMAIN as f, type MindooDBAppAccessDecision as g, type MindooDBAppAccessTier as h, type MindooDBAppAttachmentApi as i, type MindooDBAppAttachmentChunk as j, type MindooDBAppAttachmentInfo as k, type MindooDBAppAttachmentPreviewOptions as l, type MindooDBAppAttachmentPreviewSession as m, type MindooDBAppAutomergeChangesPatch as n, type MindooDBAppAutomergeChangesSince as o, type MindooDBAppAutomergeGetOptions as p, type MindooDBAppAutomergePatchResult as q, type MindooDBAppAutomergeSnapshot as r, type MindooDBAppBridgeConnectMessage as s, type MindooDBAppBridgeConnectOptions as t, type MindooDBAppBridgeConnectedMessage as u, type MindooDBAppBridgeErrorPayload as v, type MindooDBAppBridgeHandshakeErrorMessage as w, type MindooDBAppBridgeLocaleChangedMessage as x, type MindooDBAppBridgePortMessage as y, type MindooDBAppBridgeQueryResultMessage as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindoodb-app-sdk",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "engines": {
5
5
  "node": ">=22.13.0"
6
6
  },
@@ -36,11 +36,11 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "mindoodb-view-language": "0.0.15"
39
+ "mindoodb-view-language": "0.0.16"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@automerge/automerge": "^3.3.2",
43
- "mindoodb": ">=0.0.48"
43
+ "mindoodb": ">=0.0.53"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "@automerge/automerge": {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@automerge/automerge": "^3.3.2",
55
- "mindoodb": "^0.0.48",
55
+ "mindoodb": "^0.0.53",
56
56
  "@types/node": "25.5.0",
57
57
  "tsup": "^8.5.1",
58
58
  "typescript": "^6.0.2",