@noy-db/hub 0.1.0-pre.9 → 0.2.0-pre.2
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/dist/aggregate/index.cjs +91 -36
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +2 -2
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/aggregate/index.js +16 -9
- package/dist/aggregate/index.js.map +1 -1
- package/dist/attestation/index.cjs +305 -0
- package/dist/attestation/index.cjs.map +1 -0
- package/dist/attestation/index.d.cts +52 -0
- package/dist/attestation/index.d.ts +52 -0
- package/dist/attestation/index.js +36 -0
- package/dist/attestation/index.js.map +1 -0
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +7 -6
- package/dist/blobs/index.d.ts +7 -6
- package/dist/blobs/index.js +10 -8
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.cjs +16923 -60
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +175 -6
- package/dist/bundle/index.d.ts +175 -6
- package/dist/bundle/index.js +543 -4
- package/dist/bundle/index.js.map +1 -1
- package/dist/{chunk-PTVMYYON.js → chunk-243PNUA6.js} +3 -3
- package/dist/{chunk-MR4424N3.js → chunk-2PAQNPE3.js} +2 -2
- package/dist/chunk-3QAKZ37R.js +83 -0
- package/dist/chunk-3QAKZ37R.js.map +1 -0
- package/dist/chunk-3S4BJX25.js +36 -0
- package/dist/chunk-3S4BJX25.js.map +1 -0
- package/dist/chunk-3XHOCQK4.js +118 -0
- package/dist/chunk-3XHOCQK4.js.map +1 -0
- package/dist/{chunk-AVVPZ4BC.js → chunk-3Y53S2SA.js} +4 -4
- package/dist/chunk-3Z2TPHC4.js +291 -0
- package/dist/chunk-3Z2TPHC4.js.map +1 -0
- package/dist/chunk-4HIL6AHQ.js +57 -0
- package/dist/chunk-4HIL6AHQ.js.map +1 -0
- package/dist/chunk-5ZGZ6HIZ.js +100 -0
- package/dist/chunk-5ZGZ6HIZ.js.map +1 -0
- package/dist/{chunk-ZFKD4QMV.js → chunk-7BRE6EUA.js} +3 -3
- package/dist/chunk-7BUTTVMR.js +34 -0
- package/dist/chunk-7BUTTVMR.js.map +1 -0
- package/dist/{chunk-VQBTTTUN.js → chunk-7Q5PLD5C.js} +4 -4
- package/dist/{chunk-VQBTTTUN.js.map → chunk-7Q5PLD5C.js.map} +1 -1
- package/dist/{chunk-QAVUREFT.js → chunk-7Z23ZFLV.js} +12 -6
- package/dist/chunk-7Z23ZFLV.js.map +1 -0
- package/dist/chunk-AHPFONIL.js +59 -0
- package/dist/chunk-AHPFONIL.js.map +1 -0
- package/dist/chunk-CXSCDO5T.js +51 -0
- package/dist/chunk-CXSCDO5T.js.map +1 -0
- package/dist/chunk-E535SAN4.js +8834 -0
- package/dist/chunk-E535SAN4.js.map +1 -0
- package/dist/chunk-EUYOGYGV.js +830 -0
- package/dist/chunk-EUYOGYGV.js.map +1 -0
- package/dist/chunk-FAQVNJD4.js +61 -0
- package/dist/chunk-FAQVNJD4.js.map +1 -0
- package/dist/{chunk-SCZXXXU4.js → chunk-G6FRSBKK.js} +7 -32
- package/dist/chunk-G6FRSBKK.js.map +1 -0
- package/dist/chunk-GIV6DWBG.js +79 -0
- package/dist/chunk-GIV6DWBG.js.map +1 -0
- package/dist/chunk-HXJXPZRE.js +73 -0
- package/dist/chunk-HXJXPZRE.js.map +1 -0
- package/dist/{chunk-GOUT6DND.js → chunk-J4KLMEUL.js} +173 -91
- package/dist/chunk-J4KLMEUL.js.map +1 -0
- package/dist/{chunk-2CSJGFCB.js → chunk-JYQTXEIO.js} +6 -229
- package/dist/chunk-JYQTXEIO.js.map +1 -0
- package/dist/{chunk-MDDTIZUO.js → chunk-LRAZDV5X.js} +7 -119
- package/dist/chunk-LRAZDV5X.js.map +1 -0
- package/dist/{chunk-M5INGEFC.js → chunk-MRIBLZL3.js} +3 -1
- package/dist/chunk-MRIBLZL3.js.map +1 -0
- package/dist/{chunk-USKYUS74.js → chunk-MUWOSVEP.js} +2 -2
- package/dist/{chunk-4PWAI7Q4.js → chunk-NWZ3I6R6.js} +5 -5
- package/dist/chunk-OVZDFEOR.js +124 -0
- package/dist/chunk-OVZDFEOR.js.map +1 -0
- package/dist/chunk-PEULZC6M.js +118 -0
- package/dist/chunk-PEULZC6M.js.map +1 -0
- package/dist/chunk-PFSNOPBQ.js +233 -0
- package/dist/chunk-PFSNOPBQ.js.map +1 -0
- package/dist/chunk-PLI5TV7N.js +53 -0
- package/dist/chunk-PLI5TV7N.js.map +1 -0
- package/dist/{chunk-WDM5XGGS.js → chunk-Q6W2CMEJ.js} +181 -11
- package/dist/chunk-Q6W2CMEJ.js.map +1 -0
- package/dist/{chunk-QGZRWRSL.js → chunk-QPEXPHJR.js} +4 -4
- package/dist/{chunk-R36SIKES.js → chunk-QXQRKXCU.js} +2 -2
- package/dist/chunk-RTZVQAJ7.js +82 -0
- package/dist/chunk-RTZVQAJ7.js.map +1 -0
- package/dist/chunk-TBKOGSYR.js +296 -0
- package/dist/chunk-TBKOGSYR.js.map +1 -0
- package/dist/chunk-UMLVJTYV.js +20 -0
- package/dist/chunk-UMLVJTYV.js.map +1 -0
- package/dist/chunk-UND4XIB6.js +251 -0
- package/dist/chunk-UND4XIB6.js.map +1 -0
- package/dist/chunk-VCGTOS2A.js +795 -0
- package/dist/chunk-VCGTOS2A.js.map +1 -0
- package/dist/chunk-VE6YVP32.js +19 -0
- package/dist/chunk-VE6YVP32.js.map +1 -0
- package/dist/{chunk-M62XNWRA.js → chunk-VK5EER6C.js} +2 -2
- package/dist/{chunk-NXFEYLVG.js → chunk-VPSUZLOJ.js} +4 -3
- package/dist/{chunk-NXFEYLVG.js.map → chunk-VPSUZLOJ.js.map} +1 -1
- package/dist/{chunk-TDR6T5CJ.js → chunk-VRBCTEKQ.js} +91 -132
- package/dist/chunk-VRBCTEKQ.js.map +1 -0
- package/dist/{chunk-ACLDOTNQ.js → chunk-W3XXT26A.js} +303 -3
- package/dist/chunk-W3XXT26A.js.map +1 -0
- package/dist/{chunk-CIMZBAZB.js → chunk-XG3PTSCD.js} +1 -1
- package/dist/chunk-XG3PTSCD.js.map +1 -0
- package/dist/chunk-Y2RKOPNC.js +145 -0
- package/dist/chunk-Y2RKOPNC.js.map +1 -0
- package/dist/{chunk-NPC4LFV5.js → chunk-YMYK7US4.js} +2 -2
- package/dist/{chunk-RKJ6OL7K.js → chunk-YS3POABP.js} +1 -1
- package/dist/chunk-YS3POABP.js.map +1 -0
- package/dist/chunk-YTXSFG3C.js +179 -0
- package/dist/chunk-YTXSFG3C.js.map +1 -0
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +7 -6
- package/dist/consent/index.d.ts +7 -6
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-IVKU7YTT.js → crypto-5ZDIY3NG.js} +3 -3
- package/dist/{delegation-2DBS2EOH.js → delegation-QYXZW25W.js} +5 -4
- package/dist/derivations/index.cjs +351 -0
- package/dist/derivations/index.cjs.map +1 -0
- package/dist/derivations/index.d.cts +72 -0
- package/dist/derivations/index.d.ts +72 -0
- package/dist/derivations/index.js +27 -0
- package/dist/{dev-unlock-Da1B0TIK.d.cts → dev-unlock-DQCNDfFp.d.cts} +1 -1
- package/dist/{dev-unlock-BdPp68qn.d.ts → dev-unlock-utkybTKb.d.ts} +1 -1
- package/dist/executor-AS2IDHKZ.js +11 -0
- package/dist/executor-HLXFXNFM.js +8 -0
- package/dist/executor-HLXFXNFM.js.map +1 -0
- package/dist/executor-HN6YBHZ5.js +8 -0
- package/dist/executor-HN6YBHZ5.js.map +1 -0
- package/dist/fanout-sidecar-VJ52RIEY.js +51 -0
- package/dist/fanout-sidecar-VJ52RIEY.js.map +1 -0
- package/dist/guards/index.cjs +315 -0
- package/dist/guards/index.cjs.map +1 -0
- package/dist/guards/index.d.cts +31 -0
- package/dist/guards/index.d.ts +31 -0
- package/dist/guards/index.js +29 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/{hash-lsoL3eEW.d.ts → hash-DcoYWfJ_.d.ts} +1 -1
- package/dist/{hash-BEfzPKwo.d.cts → hash-jDowCrK2.d.cts} +1 -1
- package/dist/history/index.cjs +8 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +8 -7
- package/dist/history/index.d.ts +8 -7
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.cjs +81 -0
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +7 -6
- package/dist/i18n/index.d.ts +7 -6
- package/dist/i18n/index.js +27 -12
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-6xNpPsxR.d.cts → index-BCKdioeh.d.ts} +331 -5
- package/dist/{index-DJTf9yxn.d.ts → index-BMjrzNZr.d.cts} +331 -5
- package/dist/index.cjs +6065 -959
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +208 -16
- package/dist/index.d.ts +208 -16
- package/dist/index.js +242 -7392
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +2 -0
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.d.cts +3 -3
- package/dist/indexing/index.d.ts +3 -3
- package/dist/indexing/index.js +4 -4
- package/dist/issue-ORP37MVW.js +12 -0
- package/dist/issue-ORP37MVW.js.map +1 -0
- package/dist/{lazy-builder-CZVLKh0Z.d.cts → lazy-builder-C-rPfWG0.d.cts} +1 -1
- package/dist/{lazy-builder-BwEoBQZ9.d.ts → lazy-builder-Rpd-V3jP.d.ts} +1 -1
- package/dist/{ledger-QZTTHQAQ.js → ledger-3IU5GMXA.js} +6 -6
- package/dist/ledger-3IU5GMXA.js.map +1 -0
- package/dist/materialized-views/index.cjs +837 -0
- package/dist/materialized-views/index.cjs.map +1 -0
- package/dist/materialized-views/index.d.cts +184 -0
- package/dist/materialized-views/index.d.ts +184 -0
- package/dist/materialized-views/index.js +45 -0
- package/dist/materialized-views/index.js.map +1 -0
- package/dist/noydb-5H3C24GG.js +34 -0
- package/dist/noydb-5H3C24GG.js.map +1 -0
- package/dist/overlay-views/index.cjs +359 -0
- package/dist/overlay-views/index.cjs.map +1 -0
- package/dist/overlay-views/index.d.cts +82 -0
- package/dist/overlay-views/index.d.ts +82 -0
- package/dist/overlay-views/index.js +25 -0
- package/dist/overlay-views/index.js.map +1 -0
- package/dist/periods/index.cjs +7 -1
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +7 -6
- package/dist/periods/index.d.ts +7 -6
- package/dist/periods/index.js +6 -6
- package/dist/{predicate-SBHmi6D0.d.cts → predicate-Dnu81tsS.d.cts} +25 -1
- package/dist/{predicate-SBHmi6D0.d.ts → predicate-Dnu81tsS.d.ts} +25 -1
- package/dist/{public-envelope-6JTACYJV.js → public-envelope-U3CMEOMV.js} +4 -4
- package/dist/public-envelope-U3CMEOMV.js.map +1 -0
- package/dist/query/index.cjs +302 -124
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +26 -11
- package/dist/read-only-facade-ITU6L7BL.js +7 -0
- package/dist/read-only-facade-ITU6L7BL.js.map +1 -0
- package/dist/registry-3ALP62P6.js +10 -0
- package/dist/registry-3ALP62P6.js.map +1 -0
- package/dist/registry-7HE6VJGC.js +8 -0
- package/dist/registry-7HE6VJGC.js.map +1 -0
- package/dist/registry-PSIPG2QR.js +8 -0
- package/dist/registry-PSIPG2QR.js.map +1 -0
- package/dist/registry-RFGGMVNJ.js +7 -0
- package/dist/registry-RFGGMVNJ.js.map +1 -0
- package/dist/revoke-KY2GB4KP.js +17 -0
- package/dist/revoke-KY2GB4KP.js.map +1 -0
- package/dist/session/index.cjs +7 -1
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +8 -7
- package/dist/session/index.d.ts +8 -7
- package/dist/session/index.js +10 -3
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +7 -6
- package/dist/shadow/index.d.ts +7 -6
- package/dist/shadow/index.js +2 -2
- package/dist/signer-GRI5TZKH.js +18 -0
- package/dist/signer-GRI5TZKH.js.map +1 -0
- package/dist/stale-OTOF3FH7.js +13 -0
- package/dist/stale-OTOF3FH7.js.map +1 -0
- package/dist/store/index.cjs +14 -0
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +7 -6
- package/dist/store/index.d.ts +7 -6
- package/dist/store/index.js +5 -2
- package/dist/{strategy-D-SrOLCl.d.cts → strategy-DSTrsZ8t.d.cts} +72 -19
- package/dist/{strategy-D-SrOLCl.d.ts → strategy-DSTrsZ8t.d.ts} +72 -19
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +6 -5
- package/dist/sync/index.d.ts +6 -5
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs +1554 -2
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +7 -6
- package/dist/team/index.d.ts +7 -6
- package/dist/team/index.js +77 -8
- package/dist/tx/index.cjs +296 -44
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +7 -6
- package/dist/tx/index.d.ts +7 -6
- package/dist/tx/index.js +2 -2
- package/dist/{types-Bo7NSXJr.d.ts → types-BoFFiskX.d.ts} +2714 -321
- package/dist/{types-Bnb82f5R.d.cts → types-DJG8HG6F.d.cts} +2714 -321
- package/dist/{index-CywCC1qZ.d.cts → ulid-BmBgooGm.d.ts} +215 -26
- package/dist/{index-8QDuznDr.d.ts → ulid-C7ms9oli.d.cts} +215 -26
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/with-derivation-BKXXa8Vt.d.ts +13 -0
- package/dist/with-derivation-BjQ7q4NE.d.cts +13 -0
- package/dist/with-guard-C25yNjzd.d.ts +18 -0
- package/dist/with-guard-DQme5DKE.d.cts +18 -0
- package/dist/with-materialized-view-BbEPFIIJ.d.cts +27 -0
- package/dist/with-materialized-view-CqnRwI2S.d.ts +27 -0
- package/dist/with-overlayed-view-Ct1fSJt-.d.ts +13 -0
- package/dist/with-overlayed-view-bwlmmFjx.d.cts +13 -0
- package/package.json +65 -2
- package/dist/chunk-2CSJGFCB.js.map +0 -1
- package/dist/chunk-ACLDOTNQ.js.map +0 -1
- package/dist/chunk-BTDCBVJW.js +0 -160
- package/dist/chunk-BTDCBVJW.js.map +0 -1
- package/dist/chunk-CIMZBAZB.js.map +0 -1
- package/dist/chunk-EXHNQEV4.js +0 -392
- package/dist/chunk-EXHNQEV4.js.map +0 -1
- package/dist/chunk-GOUT6DND.js.map +0 -1
- package/dist/chunk-M5INGEFC.js.map +0 -1
- package/dist/chunk-MDDTIZUO.js.map +0 -1
- package/dist/chunk-QAVUREFT.js.map +0 -1
- package/dist/chunk-RKJ6OL7K.js.map +0 -1
- package/dist/chunk-SCZXXXU4.js.map +0 -1
- package/dist/chunk-TDR6T5CJ.js.map +0 -1
- package/dist/chunk-WDM5XGGS.js.map +0 -1
- /package/dist/{chunk-PTVMYYON.js.map → chunk-243PNUA6.js.map} +0 -0
- /package/dist/{chunk-MR4424N3.js.map → chunk-2PAQNPE3.js.map} +0 -0
- /package/dist/{chunk-AVVPZ4BC.js.map → chunk-3Y53S2SA.js.map} +0 -0
- /package/dist/{chunk-ZFKD4QMV.js.map → chunk-7BRE6EUA.js.map} +0 -0
- /package/dist/{chunk-USKYUS74.js.map → chunk-MUWOSVEP.js.map} +0 -0
- /package/dist/{chunk-4PWAI7Q4.js.map → chunk-NWZ3I6R6.js.map} +0 -0
- /package/dist/{chunk-QGZRWRSL.js.map → chunk-QPEXPHJR.js.map} +0 -0
- /package/dist/{chunk-R36SIKES.js.map → chunk-QXQRKXCU.js.map} +0 -0
- /package/dist/{chunk-M62XNWRA.js.map → chunk-VK5EER6C.js.map} +0 -0
- /package/dist/{chunk-NPC4LFV5.js.map → chunk-YMYK7US4.js.map} +0 -0
- /package/dist/{crypto-IVKU7YTT.js.map → crypto-5ZDIY3NG.js.map} +0 -0
- /package/dist/{delegation-2DBS2EOH.js.map → delegation-QYXZW25W.js.map} +0 -0
- /package/dist/{ledger-QZTTHQAQ.js.map → derivations/index.js.map} +0 -0
- /package/dist/{public-envelope-6JTACYJV.js.map → executor-AS2IDHKZ.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { aO as NoydbStore, bo as UserEnvelope, ba as PublicEnvelope, bp as GateName, bq as GatePolicy, br as VaultPolicy, bs as ActiveTier, bt as FactorProof, bu as PersistedSchemaEnvelope, bv as DirectoryConfig, bw as UserVisibility, aM as UnlockedKeyring, bf as Vault, aV as DiffEntry } from './types-DJG8HG6F.cjs';
|
|
2
|
+
export { bx as AccessibleVault, aS as AppendInput, ay as ArrayOutputSpec, p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, by as BUNDLE_STORE_POLICY, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, bz as BuiltInGateName, bc as BundleRecipient, _ as CONSENT_AUDIT_COLLECTION, bA as CacheOptions, bB as CacheStats, bC as ChangeEvent, aT as ChangeType, a7 as ClosePeriodOptions, aH as Collection, bD as CollectionChangeEvent, bE as CollectionConflictResolver, bF as CollectionDescriptor, ao as CollectionFrame, aU as CollectionInstant, bG as CollectionStats, bH as Conflict, bI as ConflictPolicy, bJ as ConflictStrategy, $ as ConsentAuditEntry, a0 as ConsentAuditFilter, a1 as ConsentContext, a2 as ConsentOp, bK as CrossTierAccessEvent, L as DEFAULT_CHUNK_SIZE, bL as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bM as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bN as DeepPartial, bO as DeepPartialOrNull, bP as DelegationToken, bQ as DeleteManyResult, bR as DerivationDescriptor, aw as DerivationStrategy, aA as DerivationStrategyHandle, aB as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, bS as DirtyEntry, bT as DumpSchemaOptions, bU as ELEVATION_AUDIT_COLLECTION, bV as ElevatedHandle, aQ as EncryptedEnvelope, bW as EnrollAuthenticatorOptions, bX as EnrollAuthenticatorWrappingDEKsOptions, bY as EnrollAuthenticatorWrappingKEKOptions, bZ as EnrollRecoveryResult, b_ as ExportCapability, b$ as ExportChunk, c0 as ExportFormat, c1 as ExportStreamOptions, c2 as FactorKind, c3 as FactorProofBundle, c4 as FactorRequirement, c5 as FieldDescriptor, c6 as FieldSource, c7 as GhostRecord, c8 as GrantOptions, ai as GuardChange, aj as GuardContext, ah as GuardStrategy, al as GuardStrategyHandle, c9 as HistoryConfig, ca as HistoryEntry, aP as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, cb as INDEXED_STORE_POLICY, cc as ImportCapability, cd as InferOutput, ce as InternalCollectionStats, cf as IssueDelegationOptions, cg as IssueMagicLinkGrantOptions, aW as JsonPatch, aX as JsonPatchOp, ch as KeyringAuthenticator, ci as KeyringAuthenticatorWrappingDEKs, cj as KeyringAuthenticatorWrappingKEK, ck as KeyringFile, aY as LedgerEntry, aZ as LedgerStore, cl as ListAccessibleVaultsOptions, cm as ListPageResult, cn as ListUsersOptions, co as LiveUserEnvelope, cp as LocaleReadOptions, cq as Lru, cr as LruOptions, cs as LruStats, ct as MAGIC_LINK_CONTENT_INFO_PREFIX, cu as MAGIC_LINK_GRANTS_COLLECTION, cv as MAGIC_LINK_KEK_INFO_PREFIX, cw as MagicLinkGrantPayload, cx as MagicLinkGrantRecord, bl as MaterializedFromMeta, cy as MaterializedViewDescriptor, bm as MaterializedViewOutput, aE as MaterializedViewStrategy, aF as MaterializedViewStrategyHandle, cz as MemoryRecipientSealer, cA as MemorySealingKeyProvider, cB as NOYDB_BACKUP_VERSION, cC as NOYDB_FORMAT_VERSION, cD as NOYDB_KEYRING_VERSION, cE as NOYDB_SYNC_VERSION, cF as Noydb, cG as NoydbBundleStore, cH as NoydbEventMap, cI as NoydbOptions, a8 as OpenPeriodOptions, aC as OutputSpec, cJ as OverlayViewDescriptor, aG as OverlayedViewStrategy, aJ as OverlayedViewStrategyHandle, a9 as PERIODS_COLLECTION, cK as PUBLIC_ENVELOPE_FIELDS, cL as PaperRecoveryDoc, cM as PaperRecoveryEntry, cN as PassphrasePolicy, cO as PassphraseValidationResult, aa as PeriodRecord, cP as Permission, cQ as Permissions, cR as PersistedSchemaKind, cS as PlaintextTranslatorContext, cT as PlaintextTranslatorFn, P as PolicyEnforcer, cU as PresenceHandle, cV as PresencePeer, aR as PruneOptions, cW as PublicEnvelopeField, cX as PublicEnvelopeSchema, cY as PublicEnvelopeText, cZ as PullMode, c_ as PullOptions, c$ as PullPolicy, d0 as PullResult, d1 as PushMode, d2 as PushOptions, d3 as PushPolicy, d4 as PushResult, d5 as PutManyItemOptions, d6 as PutManyOptions, d7 as PutManyResult, d8 as QueryAcrossOptions, d9 as QueryAcrossResult, da as QuickUnlockState, db as QuickUnlockStore, dc as ReAuthOperation, be as RecipientHint, bd as RecipientSealer, aD as RecordOutputSpec, dd as RecoverPassphraseInput, de as RecoverPassphraseResult, df as RecoverUserOptions, dg as RecoveryProof, dh as ResolvedPublicEnvelopeSchema, di as RevokeOptions, aL as Role, dj as RotatePassphraseInput, dk as RotateRecoveryOptions, dl as RotateRecoveryResult, dm as SEALED_PASSPHRASE_RECORD_ID, dn as SealedEnvelope, dp as SealedPassphrase, bb as SealingKeyProvider, dq as SessionPolicy, dr as SetPublicEnvelopeInput, ds as ShamirRecoveryDoc, dt as ShamirRecoveryEntry, bh as ShamirRecoveryProvider, U as SlotInfo, V as SlotRecord, du as SlotRewrapCeremony, dv as SlotRewrapContext, dw as StandardSchemaV1, dx as StandardSchemaV1Issue, dy as StandardSchemaV1SyncResult, dz as StoreAuth, dA as StoreAuthKind, dB as StoreCapabilities, dC as SyncEngine, dD as SyncMetadata, dE as SyncPolicy, dF as SyncScheduler, dG as SyncSchedulerStatus, dH as SyncStatus, dI as SyncTarget, dJ as SyncTargetRole, dK as SyncTransaction, dL as SyncTransactionResult, dM as TierMode, dN as TranslatorAuditEntry, as as TxCollection, at as TxContext, dO as TxOp, au as TxVault, dP as USER_ENVELOPE_COLLECTION, dQ as USER_ENVELOPE_MAX_BYTES, bn as UnionSource, dR as Unsubscribe, dS as UpdateAuthenticatorOptions, dT as UpdateUserOptions, dU as UserApi, dV as UserEnvelopeCheckGate, dW as UserEnvelopeOversizedError, dX as UserEnvelopePresented, dY as UserInfo, dZ as VaultBackup, a_ as VaultEngine, ap as VaultFrame, a$ as VaultInstant, d_ as VaultPolicyOnDisk, d$ as VaultSchemaSnapshot, e0 as VaultSnapshot, b0 as VerifyResult, W as VersionRecord, e1 as WarningRules, e2 as WeakPassphraseError, e3 as WeakPassphraseReason, e4 as WrappedDeksBlob, g as applyI18nLocale, b1 as applyPatch, e5 as assertStrongPassphrase, e6 as buildRecipientKeyringFile, e7 as burnPaperRecoveryEntry, b2 as canonicalJson, b3 as computePatch, n as createEnforcer, e8 as createNoydb, e9 as createStore, ea as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, b4 as diff, eb as enrollAuthenticator, ec as estimateEntropy, ed as evaluateExportCapability, ee as evaluateImportCapability, ef as findAuthenticator, b5 as formatDiff, eg as hasExportCapability, eh as hasImportCapability, ei as hasRecoveryEnrolled, b6 as hashEntry, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, ej as isMagicLinkGrantExpired, ek as isPublicEnvelope, el as issueDelegation, em as keyringRecoverPassphrase, en as keyringRotatePassphrase, eo as listMagicLinkGrants, ep as listUsers, eq as listUsersWithEnvelopes, er as loadActiveDelegations, es as loadPaperRecoveryEntries, et as loadSealedPassphrase, eu as loadShamirRecoveryEntries, ev as magicLinkGrantRecordId, ew as mintPaperRecoveryEntry, ex as mintShamirRecoveryEntry, ey as mintWrappedDeksBlob, b7 as paddedIndex, b8 as parseIndex, ez as parseSealedEnvelope, eA as readMagicLinkGrantRecord, eB as recoverUser, eC as removeAuthenticator, r as resolveI18nText, eD as resolvePublicEnvelopeSchema, eE as revokeDelegation, eF as revokeMagicLinkGrant, av as runTransaction, eG as savePaperRecoveryEntries, eH as saveSealedPassphrase, eI as saveShamirRecoveryEntries, b9 as sha256Hex, eJ as unwrapDeksFromBlob, eK as unwrapDeksFromPaperEntry, eL as unwrapDeksFromShamirEntry, eM as unwrapMagicLinkGrant, v as validateI18nTextValue, eN as validatePassphrase, eO as validatePublicEnvelopeInput, eP as validateSchemaInput, eQ as validateSchemaOutput, o as validateSessionPolicy, eR as writeMagicLinkGrant } from './types-DJG8HG6F.cjs';
|
|
3
3
|
export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from './mime-magic-CBBSOkjm.cjs';
|
|
4
4
|
export { AgeRoute, BlobLifecyclePolicy, BlobStoreRoute, CircuitBreakerOptions, HealthCheckOptions, LogLevel, LoggingOptions, MetricsOptions, OverrideOptions, OverrideTarget, RetryOptions, RouteStatus, RouteStoreOptions, RoutedNoydbStore, StoreCacheOptions, StoreMiddleware, StoreOperation, SuspendOptions, WrapBundleStoreOptions, WrappedBundleNoydbStore, createBundleStore, routeStore, withCache, withCircuitBreaker, withHealthCheck, withLogging, withMetrics, withRetry, wrapBundleStore, wrapStore } from './store/index.cjs';
|
|
5
|
-
import { N as NoydbError } from './index-
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
5
|
+
import { N as NoydbError } from './index-BMjrzNZr.cjs';
|
|
6
|
+
export { x as AlreadyElevatedError, A as AmendmentForbiddenError, m as AttestationError, B as BackupCorruptedError, o as BackupLedgerError, p as BundleIntegrityError, q as BundleSealMismatchError, r as BundleVersionConflictError, C as ConflictError, y as DEFAULT_JOIN_MAX_ROWS, z as DanglingReferenceError, E as DecryptionError, G as DelegationTargetMissingError, e as DerivationCapExceededError, f as DerivationCycleError, g as DerivationDepthError, h as DerivationOutputShapeError, i as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, H as DirectoryDisabledError, J as ElevationExpiredError, K as ExportCapabilityError, F as FieldFrozenError, U as FilenameSanitizationError, V as GroupCardinalityError, W as ImportCapabilityError, X as IndexRequiredError, Y as IndexWriteFailureError, Z as InvalidKeyError, I as InvariantError, _ as JoinContext, $ as JoinLeg, a0 as JoinStrategy, a1 as JoinTooLargeError, a2 as JoinableSource, a3 as KeyringCorruptError, a4 as KeyringExpiredError, a5 as LedgerContentionError, a6 as LiveQuery, a7 as LiveUpstream, L as LocaleNotSpecifiedError, t as MaterializedViewConfigError, u as MaterializedViewCycleError, v as MaterializedViewSourceUnknownError, w as MaterializedViewTooLargeError, M as MissingTranslationError, a8 as NetworkError, a9 as NoAccessError, aa as NotFoundError, ab as OrderBy, O as OverlayBaseIsVirtualError, j as OverlayCollectionUnavailableError, k as OverlayIdMismatchError, l as OverlayNameCollisionError, ac as PathEscapeError, ad as PeriodClosedError, ae as PermissionDeniedError, af as PrivilegeEscalationError, Q as Query, ag as QueryPlan, ah as QuerySource, ai as ReadOnlyAtInstantError, aj as ReadOnlyError, ak as ReadOnlyFrameError, d as RecordLockedError, al as RefDescriptor, am as RefIntegrityError, an as RefMode, ao as RefRegistry, ap as RefScopeError, aq as RefViolation, R as ReservedCollectionNameError, ar as ScanBuilder, as as ScanPageProvider, at as SchemaValidationError, S as SessionExpiredError, b as SessionNotFoundError, c as SessionPolicyError, au as StoreCapabilityError, av as TamperedError, aw as TierDemoteDeniedError, ax as TierNotGrantedError, T as TranslatorNotConfiguredError, ay as ValidationError, az as applyJoins, aA as buildLiveQuery, aB as executePlan, aC as ref, aD as resetJoinWarnings } from './index-BMjrzNZr.cjs';
|
|
7
|
+
export { A as AutoCredential, n as AutoCredentialKind, c as CompressionAlgo, N as NOYDB_BUNDLE_FORMAT_VERSION, e as NOYDB_BUNDLE_MAGIC, f as NOYDB_BUNDLE_PREFIX_BYTES, g as NoydbBundleHeader, h as NoydbBundleReadResult, R as ReadNoydbBundleOptions, W as WriteNoydbBundleOptions, j as generateULID, o as hasNoydbBundleMagic, k as isULID, r as readNoydbBundle, l as readNoydbBundleHeader, p as readNoydbBundlePublicEnvelope, m as resetBrotliSupportCache, w as writeNoydbBundle } from './ulid-C7ms9oli.cjs';
|
|
8
8
|
export { a as CrdtMode, b as CrdtState, L as LwwMapState, R as RgaState, Y as YjsState, m as mergeCrdtStates, r as resolveCrdtSnapshot } from './strategy-BSxFXGzb.cjs';
|
|
9
|
+
export { w as withGuard } from './with-guard-DQme5DKE.cjs';
|
|
10
|
+
export { w as withDerivation } from './with-derivation-BjQ7q4NE.cjs';
|
|
11
|
+
export { w as withMaterializedView } from './with-materialized-view-BbEPFIIJ.cjs';
|
|
12
|
+
export { a as Clause, C as CollectionIndexes, F as FieldClause, b as FilterClause, G as GroupClause, H as HashIndex, I as IndexDef, O as Operator, e as evaluateClause, c as evaluateFieldClause, r as readPath } from './predicate-Dnu81tsS.cjs';
|
|
13
|
+
export { w as withOverlayedView } from './with-overlayed-view-bwlmmFjx.cjs';
|
|
9
14
|
export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.cjs';
|
|
10
|
-
export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-
|
|
11
|
-
export { a as
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
import '
|
|
15
|
+
export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-DQCNDfFp.cjs';
|
|
16
|
+
export { a as AggregateResult, b as AggregateSpec, c as Aggregation, d as AggregationUpstream, G as GROUPBY_MAX_CARDINALITY, e as GROUPBY_WARN_CARDINALITY, f as GroupedAggregation, g as GroupedQuery, h as GroupedQueryN, i as GroupedRow, j as GroupedRowN, L as LiveAggregation, R as Reducer, k as ReducerOptions, l as avg, n as count, o as groupAndReduce, p as max, q as min, r as reduceRecords, t as sum } from './strategy-DSTrsZ8t.cjs';
|
|
17
|
+
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-jDowCrK2.cjs';
|
|
18
|
+
import './lazy-builder-C-rPfWG0.cjs';
|
|
19
|
+
import '@noy-db/attestation';
|
|
15
20
|
|
|
16
21
|
/**
|
|
17
22
|
* Persistence helpers for per-principal user envelopes stored at
|
|
@@ -164,13 +169,39 @@ declare class RecoveryNotEnrolledError extends NoydbError {
|
|
|
164
169
|
constructor(message?: string);
|
|
165
170
|
}
|
|
166
171
|
/**
|
|
167
|
-
* Raised by `
|
|
168
|
-
* recovery profile
|
|
169
|
-
*
|
|
170
|
-
*
|
|
172
|
+
* Raised by `openVault` when a managed-passphrase-mode vault has no
|
|
173
|
+
* STRONG recovery profile enrolled (#195).
|
|
174
|
+
*
|
|
175
|
+
* Managed mode means the user never types a passphrase — the unlock
|
|
176
|
+
* material lives in a `SealingKeyProvider` (`at-*` package). If that
|
|
177
|
+
* provider's key is lost AND no strong recovery is enrolled, the
|
|
178
|
+
* vault is irrecoverable. To prevent that footgun, managed-mode vaults
|
|
179
|
+
* require at least one strong recovery profile (Shamir today;
|
|
180
|
+
* multi-channel / admin-mediated when those ship).
|
|
181
|
+
*
|
|
182
|
+
* Paper recovery alone is NOT strong under managed mode: the user has
|
|
183
|
+
* no memorized passphrase to fall back on, so losing the paper sheet =
|
|
184
|
+
* losing every record permanently.
|
|
185
|
+
*
|
|
186
|
+
* Bootstrap with `db.openVaultAndEnrollRecovery(vault, { recovery: [{ profile: "shamir", k, n }] })`
|
|
187
|
+
* to atomically create-and-enroll, or call `db.enrollRecovery(vault, { profile: "shamir", ... })`
|
|
188
|
+
* separately before re-attempting `openVault`.
|
|
189
|
+
*/
|
|
190
|
+
declare class ManagedRecoveryNotEnrolledError extends NoydbError {
|
|
191
|
+
readonly vault: string;
|
|
192
|
+
constructor(vault: string);
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Raised by `db.recoverPassphrase` / `db.enrollRecovery` /
|
|
196
|
+
* `db.rotateRecovery` when the developer requests a recovery profile
|
|
197
|
+
* not yet wired in this hub release.
|
|
198
|
+
*
|
|
199
|
+
* Implemented: `paper` (#10, pre.5) and `shamir` (#196 slice 1, pre.16).
|
|
200
|
+
* Pending: `multi-channel` and `admin-mediated` (tracked under #196
|
|
201
|
+
* follow-up slices).
|
|
171
202
|
*
|
|
172
203
|
* The carried `profile` and `tracking` fields let consumers steer the
|
|
173
|
-
* UI ("
|
|
204
|
+
* UI ("multi-channel recovery is not yet wired up — open issue #N to follow").
|
|
174
205
|
*/
|
|
175
206
|
declare class RecoveryProfileNotImplementedError extends NoydbError {
|
|
176
207
|
readonly profile: string;
|
|
@@ -308,6 +339,89 @@ declare function loadVaultPolicy(store: NoydbStore, vault: string): Promise<Vaul
|
|
|
308
339
|
*/
|
|
309
340
|
declare function saveVaultPolicy(store: NoydbStore, vault: string, policy: VaultPolicy): Promise<void>;
|
|
310
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Derive a {@link PersistedSchemaEnvelope} from a Standard Schema v1
|
|
344
|
+
* validator. v0 supports Zod via `zod-to-json-schema` (optional peer-dep);
|
|
345
|
+
* other families write a stub envelope flagging the kind.
|
|
346
|
+
*
|
|
347
|
+
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
348
|
+
*
|
|
349
|
+
* @module
|
|
350
|
+
*/
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Heuristic Zod detection — Zod schemas carry a `_def.typeName` property
|
|
354
|
+
* starting with `Zod` (e.g. `ZodObject`, `ZodString`). This survives Zod's
|
|
355
|
+
* minor-version bumps because the typeName naming is stable across v3.
|
|
356
|
+
*/
|
|
357
|
+
declare function isZodSchema(value: unknown): boolean;
|
|
358
|
+
declare function derivePersistedSchema(validator: unknown): Promise<PersistedSchemaEnvelope>;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Read / write the per-collection persisted-schema envelope. Mirrors the
|
|
362
|
+
* standard noy-db record envelope shape and is **AES-GCM encrypted with
|
|
363
|
+
* the collection's DEK** — the schema body (field names, enum values,
|
|
364
|
+
* constraints) is sensitive metadata, so it gets the same encryption
|
|
365
|
+
* envelope as the records it describes.
|
|
366
|
+
*
|
|
367
|
+
* Storage layout:
|
|
368
|
+
*
|
|
369
|
+
* <vault>/_schemas/<collection> → EncryptedEnvelope
|
|
370
|
+
*
|
|
371
|
+
* The DEK passed to {@link savePersistedSchema} / {@link loadPersistedSchema}
|
|
372
|
+
* is the same key the collection uses for its records.
|
|
373
|
+
*
|
|
374
|
+
* @module
|
|
375
|
+
*/
|
|
376
|
+
|
|
377
|
+
/** Reserved collection name where persisted schemas live. */
|
|
378
|
+
declare const SCHEMAS_COLLECTION: "_schemas";
|
|
379
|
+
/**
|
|
380
|
+
* Read and decrypt the persisted-schema envelope for one collection.
|
|
381
|
+
* Returns `undefined` when no envelope has been written or when decryption
|
|
382
|
+
* fails (e.g. wrong DEK passed). Tolerates corrupted records — JSON parse
|
|
383
|
+
* failures surface as `undefined`, mirroring `_meta/handle`'s contract.
|
|
384
|
+
*/
|
|
385
|
+
declare function loadPersistedSchema(store: NoydbStore, vault: string, collection: string, dek: CryptoKey): Promise<PersistedSchemaEnvelope | undefined>;
|
|
386
|
+
/**
|
|
387
|
+
* Encrypt and persist a schema envelope for one collection. Always
|
|
388
|
+
* overwrites any prior write (callers gate on hash equality before calling
|
|
389
|
+
* to avoid no-op writes).
|
|
390
|
+
*/
|
|
391
|
+
declare function savePersistedSchema(store: NoydbStore, vault: string, collection: string, dek: CryptoKey, payload: PersistedSchemaEnvelope): Promise<void>;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Orchestrate the derive → hash → skip-or-write cycle for a collection's
|
|
395
|
+
* persisted JSON Schema. Called by the Vault at collection-registration
|
|
396
|
+
* time when the developer opts in via `collection({ persistJsonSchema:
|
|
397
|
+
* true })`.
|
|
398
|
+
*
|
|
399
|
+
* Skip semantics:
|
|
400
|
+
*
|
|
401
|
+
* - Zod validators: skip when the new hash equals the stored hash.
|
|
402
|
+
* - Non-Zod (stub envelopes have hash=null): skip when the stored
|
|
403
|
+
* envelope's `kind` matches the freshly-detected kind (since there's
|
|
404
|
+
* no body to compare yet — a kind change is the only signal).
|
|
405
|
+
*
|
|
406
|
+
* @module
|
|
407
|
+
*/
|
|
408
|
+
|
|
409
|
+
interface PersistSchemaResult {
|
|
410
|
+
/** True when a fresh envelope was written to storage. */
|
|
411
|
+
readonly written: boolean;
|
|
412
|
+
/** True when an existing envelope matched and the write was skipped. */
|
|
413
|
+
readonly skipped: boolean;
|
|
414
|
+
/** The envelope that was either written or matched. */
|
|
415
|
+
readonly envelope: PersistedSchemaEnvelope;
|
|
416
|
+
}
|
|
417
|
+
declare function persistSchemaIfNeeded(opts: {
|
|
418
|
+
readonly store: NoydbStore;
|
|
419
|
+
readonly vault: string;
|
|
420
|
+
readonly collectionName: string;
|
|
421
|
+
readonly validator: unknown;
|
|
422
|
+
readonly dek: CryptoKey;
|
|
423
|
+
}): Promise<PersistSchemaResult>;
|
|
424
|
+
|
|
311
425
|
/**
|
|
312
426
|
* Authentication introspection — issue #13.
|
|
313
427
|
*
|
|
@@ -353,6 +467,84 @@ declare function describeAllUsersAuth(store: NoydbStore, vault: string): Promise
|
|
|
353
467
|
description: string;
|
|
354
468
|
}>>;
|
|
355
469
|
|
|
470
|
+
/**
|
|
471
|
+
* Persistence helpers for the vault-level user-directory toggle
|
|
472
|
+
* (`_meta/directory`). Mirrors the bypass-AES pattern used by
|
|
473
|
+
* `_meta/policy` — the directory document is plain JSON, the
|
|
474
|
+
* envelope's `_iv` field is left empty.
|
|
475
|
+
*
|
|
476
|
+
* @see docs/subsystems/user-envelope.md → Directory visibility
|
|
477
|
+
* @see docs/subsystems/plaintext-bypass.md — every `_iv: ''` write site
|
|
478
|
+
*
|
|
479
|
+
* @module
|
|
480
|
+
*/
|
|
481
|
+
|
|
482
|
+
/** Reserved id for the vault-level directory document. */
|
|
483
|
+
declare const DIRECTORY_RECORD_ID = "directory";
|
|
484
|
+
/**
|
|
485
|
+
* Read the directory toggle from `_meta/directory`. Returns `undefined`
|
|
486
|
+
* when no document has been persisted — callers treat that as the
|
|
487
|
+
* default-on case (`{ enabled: true }`).
|
|
488
|
+
*
|
|
489
|
+
* Tolerates corrupted documents the same way `_meta/policy` does: a
|
|
490
|
+
* JSON parse failure surfaces as `undefined`, not a thrown error, so a
|
|
491
|
+
* bad write never permanently breaks team enumeration.
|
|
492
|
+
*/
|
|
493
|
+
declare function readDirectoryConfig(store: NoydbStore, vault: string): Promise<DirectoryConfig | undefined>;
|
|
494
|
+
/**
|
|
495
|
+
* Persist the directory toggle at `_meta/directory`. Idempotent — call
|
|
496
|
+
* on every `db.setDirectoryEnabled()` invocation. Owner-only at the
|
|
497
|
+
* caller site; this primitive does not check roles.
|
|
498
|
+
*/
|
|
499
|
+
declare function persistDirectoryConfig(store: NoydbStore, vault: string, config: DirectoryConfig): Promise<void>;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Persistence helpers for the per-user visibility flag
|
|
503
|
+
* (`_meta/visibility/<keyringId>`). Mirrors the bypass-AES pattern used
|
|
504
|
+
* by `_meta/policy` — the visibility document is plain JSON, the
|
|
505
|
+
* envelope's `_iv` field is left empty.
|
|
506
|
+
*
|
|
507
|
+
* Stored alongside the keyring file rather than inside the encrypted
|
|
508
|
+
* user envelope (`_users/<keyringId>`) because:
|
|
509
|
+
*
|
|
510
|
+
* - `UserEnvelope<T>.data` is opaque-to-hub by contract — hub does not
|
|
511
|
+
* introspect or reserve any keys inside it. Adding `hidden` there
|
|
512
|
+
* would violate that contract.
|
|
513
|
+
* - `listUsersWithEnvelopes` filters by the flag, and the filter must
|
|
514
|
+
* work even when decryption fails (legacy keyrings predating the
|
|
515
|
+
* envelope feature, or a corrupted envelope).
|
|
516
|
+
*
|
|
517
|
+
* @see docs/subsystems/user-envelope.md → Directory visibility
|
|
518
|
+
* @see docs/subsystems/plaintext-bypass.md — every `_iv: ''` write site
|
|
519
|
+
*
|
|
520
|
+
* @module
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
/** Prefix for per-user visibility records inside `_meta`. */
|
|
524
|
+
declare const VISIBILITY_RECORD_PREFIX = "visibility/";
|
|
525
|
+
/** Compose the `_meta` record id for a keyring's visibility doc. */
|
|
526
|
+
declare function visibilityRecordId(keyringId: string): string;
|
|
527
|
+
/**
|
|
528
|
+
* Read the visibility flag for `keyringId`. Returns `undefined` when no
|
|
529
|
+
* document has been persisted — callers treat that as the default-visible
|
|
530
|
+
* case (`{ hidden: false }`).
|
|
531
|
+
*/
|
|
532
|
+
declare function readUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<UserVisibility | undefined>;
|
|
533
|
+
/**
|
|
534
|
+
* Persist the visibility flag for `keyringId` at
|
|
535
|
+
* `_meta/visibility/<keyringId>`. Idempotent — call on every
|
|
536
|
+
* `vault.user.setMyVisibility()` invocation. Own-only at the caller
|
|
537
|
+
* site; this primitive does not enforce keyring ownership.
|
|
538
|
+
*/
|
|
539
|
+
declare function persistUserVisibility(store: NoydbStore, vault: string, keyringId: string, visibility: UserVisibility): Promise<void>;
|
|
540
|
+
/**
|
|
541
|
+
* Delete the visibility flag for `keyringId`. Called from `revoke()`
|
|
542
|
+
* alongside `deleteUserEnvelope` so the sidecar does not leak to a
|
|
543
|
+
* re-granted principal with the same `userId`. Idempotent — the store's
|
|
544
|
+
* `delete()` is already a no-op when the record is absent.
|
|
545
|
+
*/
|
|
546
|
+
declare function deleteUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<void>;
|
|
547
|
+
|
|
356
548
|
interface EncryptResult {
|
|
357
549
|
iv: string;
|
|
358
550
|
data: string;
|
|
@@ -562,4 +754,4 @@ type DiffCandidate<T = unknown> = Vault | Record<string, readonly T[]> | string;
|
|
|
562
754
|
*/
|
|
563
755
|
declare function diffVault<T = unknown>(vault: Vault, candidate: DiffCandidate<T>, options?: DiffOptions): Promise<VaultDiff<T>>;
|
|
564
756
|
|
|
565
|
-
export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, type DiffCandidate, DiffEntry, type DiffOptions, FactorProof, GateName, GatePolicy, META_COLLECTION, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, STRICT_POLICY, UnlockedKeyring, UserEnvelope, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, listUserEnvelopeIds, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, mergePolicy, parseBytes, readPublicEnvelope, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy };
|
|
757
|
+
export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, type DiffCandidate, DiffEntry, type DiffOptions, DirectoryConfig, FactorProof, GateName, GatePolicy, META_COLLECTION, ManagedRecoveryNotEnrolledError, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, type PersistSchemaResult, PersistedSchemaEnvelope, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, SCHEMAS_COLLECTION, STRICT_POLICY, UnlockedKeyring, UserEnvelope, UserVisibility, VISIBILITY_RECORD_PREFIX, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, mergePolicy, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPublicEnvelope, readUserVisibility, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, visibilityRecordId };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { aO as NoydbStore, bo as UserEnvelope, ba as PublicEnvelope, bp as GateName, bq as GatePolicy, br as VaultPolicy, bs as ActiveTier, bt as FactorProof, bu as PersistedSchemaEnvelope, bv as DirectoryConfig, bw as UserVisibility, aM as UnlockedKeyring, bf as Vault, aV as DiffEntry } from './types-BoFFiskX.js';
|
|
2
|
+
export { bx as AccessibleVault, aS as AppendInput, ay as ArrayOutputSpec, p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, by as BUNDLE_STORE_POLICY, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, bz as BuiltInGateName, bc as BundleRecipient, _ as CONSENT_AUDIT_COLLECTION, bA as CacheOptions, bB as CacheStats, bC as ChangeEvent, aT as ChangeType, a7 as ClosePeriodOptions, aH as Collection, bD as CollectionChangeEvent, bE as CollectionConflictResolver, bF as CollectionDescriptor, ao as CollectionFrame, aU as CollectionInstant, bG as CollectionStats, bH as Conflict, bI as ConflictPolicy, bJ as ConflictStrategy, $ as ConsentAuditEntry, a0 as ConsentAuditFilter, a1 as ConsentContext, a2 as ConsentOp, bK as CrossTierAccessEvent, L as DEFAULT_CHUNK_SIZE, bL as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bM as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bN as DeepPartial, bO as DeepPartialOrNull, bP as DelegationToken, bQ as DeleteManyResult, bR as DerivationDescriptor, aw as DerivationStrategy, aA as DerivationStrategyHandle, aB as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, bS as DirtyEntry, bT as DumpSchemaOptions, bU as ELEVATION_AUDIT_COLLECTION, bV as ElevatedHandle, aQ as EncryptedEnvelope, bW as EnrollAuthenticatorOptions, bX as EnrollAuthenticatorWrappingDEKsOptions, bY as EnrollAuthenticatorWrappingKEKOptions, bZ as EnrollRecoveryResult, b_ as ExportCapability, b$ as ExportChunk, c0 as ExportFormat, c1 as ExportStreamOptions, c2 as FactorKind, c3 as FactorProofBundle, c4 as FactorRequirement, c5 as FieldDescriptor, c6 as FieldSource, c7 as GhostRecord, c8 as GrantOptions, ai as GuardChange, aj as GuardContext, ah as GuardStrategy, al as GuardStrategyHandle, c9 as HistoryConfig, ca as HistoryEntry, aP as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, cb as INDEXED_STORE_POLICY, cc as ImportCapability, cd as InferOutput, ce as InternalCollectionStats, cf as IssueDelegationOptions, cg as IssueMagicLinkGrantOptions, aW as JsonPatch, aX as JsonPatchOp, ch as KeyringAuthenticator, ci as KeyringAuthenticatorWrappingDEKs, cj as KeyringAuthenticatorWrappingKEK, ck as KeyringFile, aY as LedgerEntry, aZ as LedgerStore, cl as ListAccessibleVaultsOptions, cm as ListPageResult, cn as ListUsersOptions, co as LiveUserEnvelope, cp as LocaleReadOptions, cq as Lru, cr as LruOptions, cs as LruStats, ct as MAGIC_LINK_CONTENT_INFO_PREFIX, cu as MAGIC_LINK_GRANTS_COLLECTION, cv as MAGIC_LINK_KEK_INFO_PREFIX, cw as MagicLinkGrantPayload, cx as MagicLinkGrantRecord, bl as MaterializedFromMeta, cy as MaterializedViewDescriptor, bm as MaterializedViewOutput, aE as MaterializedViewStrategy, aF as MaterializedViewStrategyHandle, cz as MemoryRecipientSealer, cA as MemorySealingKeyProvider, cB as NOYDB_BACKUP_VERSION, cC as NOYDB_FORMAT_VERSION, cD as NOYDB_KEYRING_VERSION, cE as NOYDB_SYNC_VERSION, cF as Noydb, cG as NoydbBundleStore, cH as NoydbEventMap, cI as NoydbOptions, a8 as OpenPeriodOptions, aC as OutputSpec, cJ as OverlayViewDescriptor, aG as OverlayedViewStrategy, aJ as OverlayedViewStrategyHandle, a9 as PERIODS_COLLECTION, cK as PUBLIC_ENVELOPE_FIELDS, cL as PaperRecoveryDoc, cM as PaperRecoveryEntry, cN as PassphrasePolicy, cO as PassphraseValidationResult, aa as PeriodRecord, cP as Permission, cQ as Permissions, cR as PersistedSchemaKind, cS as PlaintextTranslatorContext, cT as PlaintextTranslatorFn, P as PolicyEnforcer, cU as PresenceHandle, cV as PresencePeer, aR as PruneOptions, cW as PublicEnvelopeField, cX as PublicEnvelopeSchema, cY as PublicEnvelopeText, cZ as PullMode, c_ as PullOptions, c$ as PullPolicy, d0 as PullResult, d1 as PushMode, d2 as PushOptions, d3 as PushPolicy, d4 as PushResult, d5 as PutManyItemOptions, d6 as PutManyOptions, d7 as PutManyResult, d8 as QueryAcrossOptions, d9 as QueryAcrossResult, da as QuickUnlockState, db as QuickUnlockStore, dc as ReAuthOperation, be as RecipientHint, bd as RecipientSealer, aD as RecordOutputSpec, dd as RecoverPassphraseInput, de as RecoverPassphraseResult, df as RecoverUserOptions, dg as RecoveryProof, dh as ResolvedPublicEnvelopeSchema, di as RevokeOptions, aL as Role, dj as RotatePassphraseInput, dk as RotateRecoveryOptions, dl as RotateRecoveryResult, dm as SEALED_PASSPHRASE_RECORD_ID, dn as SealedEnvelope, dp as SealedPassphrase, bb as SealingKeyProvider, dq as SessionPolicy, dr as SetPublicEnvelopeInput, ds as ShamirRecoveryDoc, dt as ShamirRecoveryEntry, bh as ShamirRecoveryProvider, U as SlotInfo, V as SlotRecord, du as SlotRewrapCeremony, dv as SlotRewrapContext, dw as StandardSchemaV1, dx as StandardSchemaV1Issue, dy as StandardSchemaV1SyncResult, dz as StoreAuth, dA as StoreAuthKind, dB as StoreCapabilities, dC as SyncEngine, dD as SyncMetadata, dE as SyncPolicy, dF as SyncScheduler, dG as SyncSchedulerStatus, dH as SyncStatus, dI as SyncTarget, dJ as SyncTargetRole, dK as SyncTransaction, dL as SyncTransactionResult, dM as TierMode, dN as TranslatorAuditEntry, as as TxCollection, at as TxContext, dO as TxOp, au as TxVault, dP as USER_ENVELOPE_COLLECTION, dQ as USER_ENVELOPE_MAX_BYTES, bn as UnionSource, dR as Unsubscribe, dS as UpdateAuthenticatorOptions, dT as UpdateUserOptions, dU as UserApi, dV as UserEnvelopeCheckGate, dW as UserEnvelopeOversizedError, dX as UserEnvelopePresented, dY as UserInfo, dZ as VaultBackup, a_ as VaultEngine, ap as VaultFrame, a$ as VaultInstant, d_ as VaultPolicyOnDisk, d$ as VaultSchemaSnapshot, e0 as VaultSnapshot, b0 as VerifyResult, W as VersionRecord, e1 as WarningRules, e2 as WeakPassphraseError, e3 as WeakPassphraseReason, e4 as WrappedDeksBlob, g as applyI18nLocale, b1 as applyPatch, e5 as assertStrongPassphrase, e6 as buildRecipientKeyringFile, e7 as burnPaperRecoveryEntry, b2 as canonicalJson, b3 as computePatch, n as createEnforcer, e8 as createNoydb, e9 as createStore, ea as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, b4 as diff, eb as enrollAuthenticator, ec as estimateEntropy, ed as evaluateExportCapability, ee as evaluateImportCapability, ef as findAuthenticator, b5 as formatDiff, eg as hasExportCapability, eh as hasImportCapability, ei as hasRecoveryEnrolled, b6 as hashEntry, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, ej as isMagicLinkGrantExpired, ek as isPublicEnvelope, el as issueDelegation, em as keyringRecoverPassphrase, en as keyringRotatePassphrase, eo as listMagicLinkGrants, ep as listUsers, eq as listUsersWithEnvelopes, er as loadActiveDelegations, es as loadPaperRecoveryEntries, et as loadSealedPassphrase, eu as loadShamirRecoveryEntries, ev as magicLinkGrantRecordId, ew as mintPaperRecoveryEntry, ex as mintShamirRecoveryEntry, ey as mintWrappedDeksBlob, b7 as paddedIndex, b8 as parseIndex, ez as parseSealedEnvelope, eA as readMagicLinkGrantRecord, eB as recoverUser, eC as removeAuthenticator, r as resolveI18nText, eD as resolvePublicEnvelopeSchema, eE as revokeDelegation, eF as revokeMagicLinkGrant, av as runTransaction, eG as savePaperRecoveryEntries, eH as saveSealedPassphrase, eI as saveShamirRecoveryEntries, b9 as sha256Hex, eJ as unwrapDeksFromBlob, eK as unwrapDeksFromPaperEntry, eL as unwrapDeksFromShamirEntry, eM as unwrapMagicLinkGrant, v as validateI18nTextValue, eN as validatePassphrase, eO as validatePublicEnvelopeInput, eP as validateSchemaInput, eQ as validateSchemaOutput, o as validateSessionPolicy, eR as writeMagicLinkGrant } from './types-BoFFiskX.js';
|
|
3
3
|
export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from './mime-magic-CBBSOkjm.js';
|
|
4
4
|
export { AgeRoute, BlobLifecyclePolicy, BlobStoreRoute, CircuitBreakerOptions, HealthCheckOptions, LogLevel, LoggingOptions, MetricsOptions, OverrideOptions, OverrideTarget, RetryOptions, RouteStatus, RouteStoreOptions, RoutedNoydbStore, StoreCacheOptions, StoreMiddleware, StoreOperation, SuspendOptions, WrapBundleStoreOptions, WrappedBundleNoydbStore, createBundleStore, routeStore, withCache, withCircuitBreaker, withHealthCheck, withLogging, withMetrics, withRetry, wrapBundleStore, wrapStore } from './store/index.js';
|
|
5
|
-
import { N as NoydbError } from './index-
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
5
|
+
import { N as NoydbError } from './index-BCKdioeh.js';
|
|
6
|
+
export { x as AlreadyElevatedError, A as AmendmentForbiddenError, m as AttestationError, B as BackupCorruptedError, o as BackupLedgerError, p as BundleIntegrityError, q as BundleSealMismatchError, r as BundleVersionConflictError, C as ConflictError, y as DEFAULT_JOIN_MAX_ROWS, z as DanglingReferenceError, E as DecryptionError, G as DelegationTargetMissingError, e as DerivationCapExceededError, f as DerivationCycleError, g as DerivationDepthError, h as DerivationOutputShapeError, i as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, H as DirectoryDisabledError, J as ElevationExpiredError, K as ExportCapabilityError, F as FieldFrozenError, U as FilenameSanitizationError, V as GroupCardinalityError, W as ImportCapabilityError, X as IndexRequiredError, Y as IndexWriteFailureError, Z as InvalidKeyError, I as InvariantError, _ as JoinContext, $ as JoinLeg, a0 as JoinStrategy, a1 as JoinTooLargeError, a2 as JoinableSource, a3 as KeyringCorruptError, a4 as KeyringExpiredError, a5 as LedgerContentionError, a6 as LiveQuery, a7 as LiveUpstream, L as LocaleNotSpecifiedError, t as MaterializedViewConfigError, u as MaterializedViewCycleError, v as MaterializedViewSourceUnknownError, w as MaterializedViewTooLargeError, M as MissingTranslationError, a8 as NetworkError, a9 as NoAccessError, aa as NotFoundError, ab as OrderBy, O as OverlayBaseIsVirtualError, j as OverlayCollectionUnavailableError, k as OverlayIdMismatchError, l as OverlayNameCollisionError, ac as PathEscapeError, ad as PeriodClosedError, ae as PermissionDeniedError, af as PrivilegeEscalationError, Q as Query, ag as QueryPlan, ah as QuerySource, ai as ReadOnlyAtInstantError, aj as ReadOnlyError, ak as ReadOnlyFrameError, d as RecordLockedError, al as RefDescriptor, am as RefIntegrityError, an as RefMode, ao as RefRegistry, ap as RefScopeError, aq as RefViolation, R as ReservedCollectionNameError, ar as ScanBuilder, as as ScanPageProvider, at as SchemaValidationError, S as SessionExpiredError, b as SessionNotFoundError, c as SessionPolicyError, au as StoreCapabilityError, av as TamperedError, aw as TierDemoteDeniedError, ax as TierNotGrantedError, T as TranslatorNotConfiguredError, ay as ValidationError, az as applyJoins, aA as buildLiveQuery, aB as executePlan, aC as ref, aD as resetJoinWarnings } from './index-BCKdioeh.js';
|
|
7
|
+
export { A as AutoCredential, n as AutoCredentialKind, c as CompressionAlgo, N as NOYDB_BUNDLE_FORMAT_VERSION, e as NOYDB_BUNDLE_MAGIC, f as NOYDB_BUNDLE_PREFIX_BYTES, g as NoydbBundleHeader, h as NoydbBundleReadResult, R as ReadNoydbBundleOptions, W as WriteNoydbBundleOptions, j as generateULID, o as hasNoydbBundleMagic, k as isULID, r as readNoydbBundle, l as readNoydbBundleHeader, p as readNoydbBundlePublicEnvelope, m as resetBrotliSupportCache, w as writeNoydbBundle } from './ulid-BmBgooGm.js';
|
|
8
8
|
export { a as CrdtMode, b as CrdtState, L as LwwMapState, R as RgaState, Y as YjsState, m as mergeCrdtStates, r as resolveCrdtSnapshot } from './strategy-BSxFXGzb.js';
|
|
9
|
+
export { w as withGuard } from './with-guard-C25yNjzd.js';
|
|
10
|
+
export { w as withDerivation } from './with-derivation-BKXXa8Vt.js';
|
|
11
|
+
export { w as withMaterializedView } from './with-materialized-view-CqnRwI2S.js';
|
|
12
|
+
export { a as Clause, C as CollectionIndexes, F as FieldClause, b as FilterClause, G as GroupClause, H as HashIndex, I as IndexDef, O as Operator, e as evaluateClause, c as evaluateFieldClause, r as readPath } from './predicate-Dnu81tsS.js';
|
|
13
|
+
export { w as withOverlayedView } from './with-overlayed-view-Ct1fSJt-.js';
|
|
9
14
|
export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.js';
|
|
10
|
-
export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-
|
|
11
|
-
export { a as
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
import '
|
|
15
|
+
export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-utkybTKb.js';
|
|
16
|
+
export { a as AggregateResult, b as AggregateSpec, c as Aggregation, d as AggregationUpstream, G as GROUPBY_MAX_CARDINALITY, e as GROUPBY_WARN_CARDINALITY, f as GroupedAggregation, g as GroupedQuery, h as GroupedQueryN, i as GroupedRow, j as GroupedRowN, L as LiveAggregation, R as Reducer, k as ReducerOptions, l as avg, n as count, o as groupAndReduce, p as max, q as min, r as reduceRecords, t as sum } from './strategy-DSTrsZ8t.js';
|
|
17
|
+
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-DcoYWfJ_.js';
|
|
18
|
+
import './lazy-builder-Rpd-V3jP.js';
|
|
19
|
+
import '@noy-db/attestation';
|
|
15
20
|
|
|
16
21
|
/**
|
|
17
22
|
* Persistence helpers for per-principal user envelopes stored at
|
|
@@ -164,13 +169,39 @@ declare class RecoveryNotEnrolledError extends NoydbError {
|
|
|
164
169
|
constructor(message?: string);
|
|
165
170
|
}
|
|
166
171
|
/**
|
|
167
|
-
* Raised by `
|
|
168
|
-
* recovery profile
|
|
169
|
-
*
|
|
170
|
-
*
|
|
172
|
+
* Raised by `openVault` when a managed-passphrase-mode vault has no
|
|
173
|
+
* STRONG recovery profile enrolled (#195).
|
|
174
|
+
*
|
|
175
|
+
* Managed mode means the user never types a passphrase — the unlock
|
|
176
|
+
* material lives in a `SealingKeyProvider` (`at-*` package). If that
|
|
177
|
+
* provider's key is lost AND no strong recovery is enrolled, the
|
|
178
|
+
* vault is irrecoverable. To prevent that footgun, managed-mode vaults
|
|
179
|
+
* require at least one strong recovery profile (Shamir today;
|
|
180
|
+
* multi-channel / admin-mediated when those ship).
|
|
181
|
+
*
|
|
182
|
+
* Paper recovery alone is NOT strong under managed mode: the user has
|
|
183
|
+
* no memorized passphrase to fall back on, so losing the paper sheet =
|
|
184
|
+
* losing every record permanently.
|
|
185
|
+
*
|
|
186
|
+
* Bootstrap with `db.openVaultAndEnrollRecovery(vault, { recovery: [{ profile: "shamir", k, n }] })`
|
|
187
|
+
* to atomically create-and-enroll, or call `db.enrollRecovery(vault, { profile: "shamir", ... })`
|
|
188
|
+
* separately before re-attempting `openVault`.
|
|
189
|
+
*/
|
|
190
|
+
declare class ManagedRecoveryNotEnrolledError extends NoydbError {
|
|
191
|
+
readonly vault: string;
|
|
192
|
+
constructor(vault: string);
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Raised by `db.recoverPassphrase` / `db.enrollRecovery` /
|
|
196
|
+
* `db.rotateRecovery` when the developer requests a recovery profile
|
|
197
|
+
* not yet wired in this hub release.
|
|
198
|
+
*
|
|
199
|
+
* Implemented: `paper` (#10, pre.5) and `shamir` (#196 slice 1, pre.16).
|
|
200
|
+
* Pending: `multi-channel` and `admin-mediated` (tracked under #196
|
|
201
|
+
* follow-up slices).
|
|
171
202
|
*
|
|
172
203
|
* The carried `profile` and `tracking` fields let consumers steer the
|
|
173
|
-
* UI ("
|
|
204
|
+
* UI ("multi-channel recovery is not yet wired up — open issue #N to follow").
|
|
174
205
|
*/
|
|
175
206
|
declare class RecoveryProfileNotImplementedError extends NoydbError {
|
|
176
207
|
readonly profile: string;
|
|
@@ -308,6 +339,89 @@ declare function loadVaultPolicy(store: NoydbStore, vault: string): Promise<Vaul
|
|
|
308
339
|
*/
|
|
309
340
|
declare function saveVaultPolicy(store: NoydbStore, vault: string, policy: VaultPolicy): Promise<void>;
|
|
310
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Derive a {@link PersistedSchemaEnvelope} from a Standard Schema v1
|
|
344
|
+
* validator. v0 supports Zod via `zod-to-json-schema` (optional peer-dep);
|
|
345
|
+
* other families write a stub envelope flagging the kind.
|
|
346
|
+
*
|
|
347
|
+
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
348
|
+
*
|
|
349
|
+
* @module
|
|
350
|
+
*/
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Heuristic Zod detection — Zod schemas carry a `_def.typeName` property
|
|
354
|
+
* starting with `Zod` (e.g. `ZodObject`, `ZodString`). This survives Zod's
|
|
355
|
+
* minor-version bumps because the typeName naming is stable across v3.
|
|
356
|
+
*/
|
|
357
|
+
declare function isZodSchema(value: unknown): boolean;
|
|
358
|
+
declare function derivePersistedSchema(validator: unknown): Promise<PersistedSchemaEnvelope>;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Read / write the per-collection persisted-schema envelope. Mirrors the
|
|
362
|
+
* standard noy-db record envelope shape and is **AES-GCM encrypted with
|
|
363
|
+
* the collection's DEK** — the schema body (field names, enum values,
|
|
364
|
+
* constraints) is sensitive metadata, so it gets the same encryption
|
|
365
|
+
* envelope as the records it describes.
|
|
366
|
+
*
|
|
367
|
+
* Storage layout:
|
|
368
|
+
*
|
|
369
|
+
* <vault>/_schemas/<collection> → EncryptedEnvelope
|
|
370
|
+
*
|
|
371
|
+
* The DEK passed to {@link savePersistedSchema} / {@link loadPersistedSchema}
|
|
372
|
+
* is the same key the collection uses for its records.
|
|
373
|
+
*
|
|
374
|
+
* @module
|
|
375
|
+
*/
|
|
376
|
+
|
|
377
|
+
/** Reserved collection name where persisted schemas live. */
|
|
378
|
+
declare const SCHEMAS_COLLECTION: "_schemas";
|
|
379
|
+
/**
|
|
380
|
+
* Read and decrypt the persisted-schema envelope for one collection.
|
|
381
|
+
* Returns `undefined` when no envelope has been written or when decryption
|
|
382
|
+
* fails (e.g. wrong DEK passed). Tolerates corrupted records — JSON parse
|
|
383
|
+
* failures surface as `undefined`, mirroring `_meta/handle`'s contract.
|
|
384
|
+
*/
|
|
385
|
+
declare function loadPersistedSchema(store: NoydbStore, vault: string, collection: string, dek: CryptoKey): Promise<PersistedSchemaEnvelope | undefined>;
|
|
386
|
+
/**
|
|
387
|
+
* Encrypt and persist a schema envelope for one collection. Always
|
|
388
|
+
* overwrites any prior write (callers gate on hash equality before calling
|
|
389
|
+
* to avoid no-op writes).
|
|
390
|
+
*/
|
|
391
|
+
declare function savePersistedSchema(store: NoydbStore, vault: string, collection: string, dek: CryptoKey, payload: PersistedSchemaEnvelope): Promise<void>;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Orchestrate the derive → hash → skip-or-write cycle for a collection's
|
|
395
|
+
* persisted JSON Schema. Called by the Vault at collection-registration
|
|
396
|
+
* time when the developer opts in via `collection({ persistJsonSchema:
|
|
397
|
+
* true })`.
|
|
398
|
+
*
|
|
399
|
+
* Skip semantics:
|
|
400
|
+
*
|
|
401
|
+
* - Zod validators: skip when the new hash equals the stored hash.
|
|
402
|
+
* - Non-Zod (stub envelopes have hash=null): skip when the stored
|
|
403
|
+
* envelope's `kind` matches the freshly-detected kind (since there's
|
|
404
|
+
* no body to compare yet — a kind change is the only signal).
|
|
405
|
+
*
|
|
406
|
+
* @module
|
|
407
|
+
*/
|
|
408
|
+
|
|
409
|
+
interface PersistSchemaResult {
|
|
410
|
+
/** True when a fresh envelope was written to storage. */
|
|
411
|
+
readonly written: boolean;
|
|
412
|
+
/** True when an existing envelope matched and the write was skipped. */
|
|
413
|
+
readonly skipped: boolean;
|
|
414
|
+
/** The envelope that was either written or matched. */
|
|
415
|
+
readonly envelope: PersistedSchemaEnvelope;
|
|
416
|
+
}
|
|
417
|
+
declare function persistSchemaIfNeeded(opts: {
|
|
418
|
+
readonly store: NoydbStore;
|
|
419
|
+
readonly vault: string;
|
|
420
|
+
readonly collectionName: string;
|
|
421
|
+
readonly validator: unknown;
|
|
422
|
+
readonly dek: CryptoKey;
|
|
423
|
+
}): Promise<PersistSchemaResult>;
|
|
424
|
+
|
|
311
425
|
/**
|
|
312
426
|
* Authentication introspection — issue #13.
|
|
313
427
|
*
|
|
@@ -353,6 +467,84 @@ declare function describeAllUsersAuth(store: NoydbStore, vault: string): Promise
|
|
|
353
467
|
description: string;
|
|
354
468
|
}>>;
|
|
355
469
|
|
|
470
|
+
/**
|
|
471
|
+
* Persistence helpers for the vault-level user-directory toggle
|
|
472
|
+
* (`_meta/directory`). Mirrors the bypass-AES pattern used by
|
|
473
|
+
* `_meta/policy` — the directory document is plain JSON, the
|
|
474
|
+
* envelope's `_iv` field is left empty.
|
|
475
|
+
*
|
|
476
|
+
* @see docs/subsystems/user-envelope.md → Directory visibility
|
|
477
|
+
* @see docs/subsystems/plaintext-bypass.md — every `_iv: ''` write site
|
|
478
|
+
*
|
|
479
|
+
* @module
|
|
480
|
+
*/
|
|
481
|
+
|
|
482
|
+
/** Reserved id for the vault-level directory document. */
|
|
483
|
+
declare const DIRECTORY_RECORD_ID = "directory";
|
|
484
|
+
/**
|
|
485
|
+
* Read the directory toggle from `_meta/directory`. Returns `undefined`
|
|
486
|
+
* when no document has been persisted — callers treat that as the
|
|
487
|
+
* default-on case (`{ enabled: true }`).
|
|
488
|
+
*
|
|
489
|
+
* Tolerates corrupted documents the same way `_meta/policy` does: a
|
|
490
|
+
* JSON parse failure surfaces as `undefined`, not a thrown error, so a
|
|
491
|
+
* bad write never permanently breaks team enumeration.
|
|
492
|
+
*/
|
|
493
|
+
declare function readDirectoryConfig(store: NoydbStore, vault: string): Promise<DirectoryConfig | undefined>;
|
|
494
|
+
/**
|
|
495
|
+
* Persist the directory toggle at `_meta/directory`. Idempotent — call
|
|
496
|
+
* on every `db.setDirectoryEnabled()` invocation. Owner-only at the
|
|
497
|
+
* caller site; this primitive does not check roles.
|
|
498
|
+
*/
|
|
499
|
+
declare function persistDirectoryConfig(store: NoydbStore, vault: string, config: DirectoryConfig): Promise<void>;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Persistence helpers for the per-user visibility flag
|
|
503
|
+
* (`_meta/visibility/<keyringId>`). Mirrors the bypass-AES pattern used
|
|
504
|
+
* by `_meta/policy` — the visibility document is plain JSON, the
|
|
505
|
+
* envelope's `_iv` field is left empty.
|
|
506
|
+
*
|
|
507
|
+
* Stored alongside the keyring file rather than inside the encrypted
|
|
508
|
+
* user envelope (`_users/<keyringId>`) because:
|
|
509
|
+
*
|
|
510
|
+
* - `UserEnvelope<T>.data` is opaque-to-hub by contract — hub does not
|
|
511
|
+
* introspect or reserve any keys inside it. Adding `hidden` there
|
|
512
|
+
* would violate that contract.
|
|
513
|
+
* - `listUsersWithEnvelopes` filters by the flag, and the filter must
|
|
514
|
+
* work even when decryption fails (legacy keyrings predating the
|
|
515
|
+
* envelope feature, or a corrupted envelope).
|
|
516
|
+
*
|
|
517
|
+
* @see docs/subsystems/user-envelope.md → Directory visibility
|
|
518
|
+
* @see docs/subsystems/plaintext-bypass.md — every `_iv: ''` write site
|
|
519
|
+
*
|
|
520
|
+
* @module
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
/** Prefix for per-user visibility records inside `_meta`. */
|
|
524
|
+
declare const VISIBILITY_RECORD_PREFIX = "visibility/";
|
|
525
|
+
/** Compose the `_meta` record id for a keyring's visibility doc. */
|
|
526
|
+
declare function visibilityRecordId(keyringId: string): string;
|
|
527
|
+
/**
|
|
528
|
+
* Read the visibility flag for `keyringId`. Returns `undefined` when no
|
|
529
|
+
* document has been persisted — callers treat that as the default-visible
|
|
530
|
+
* case (`{ hidden: false }`).
|
|
531
|
+
*/
|
|
532
|
+
declare function readUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<UserVisibility | undefined>;
|
|
533
|
+
/**
|
|
534
|
+
* Persist the visibility flag for `keyringId` at
|
|
535
|
+
* `_meta/visibility/<keyringId>`. Idempotent — call on every
|
|
536
|
+
* `vault.user.setMyVisibility()` invocation. Own-only at the caller
|
|
537
|
+
* site; this primitive does not enforce keyring ownership.
|
|
538
|
+
*/
|
|
539
|
+
declare function persistUserVisibility(store: NoydbStore, vault: string, keyringId: string, visibility: UserVisibility): Promise<void>;
|
|
540
|
+
/**
|
|
541
|
+
* Delete the visibility flag for `keyringId`. Called from `revoke()`
|
|
542
|
+
* alongside `deleteUserEnvelope` so the sidecar does not leak to a
|
|
543
|
+
* re-granted principal with the same `userId`. Idempotent — the store's
|
|
544
|
+
* `delete()` is already a no-op when the record is absent.
|
|
545
|
+
*/
|
|
546
|
+
declare function deleteUserVisibility(store: NoydbStore, vault: string, keyringId: string): Promise<void>;
|
|
547
|
+
|
|
356
548
|
interface EncryptResult {
|
|
357
549
|
iv: string;
|
|
358
550
|
data: string;
|
|
@@ -562,4 +754,4 @@ type DiffCandidate<T = unknown> = Vault | Record<string, readonly T[]> | string;
|
|
|
562
754
|
*/
|
|
563
755
|
declare function diffVault<T = unknown>(vault: Vault, candidate: DiffCandidate<T>, options?: DiffOptions): Promise<VaultDiff<T>>;
|
|
564
756
|
|
|
565
|
-
export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, type DiffCandidate, DiffEntry, type DiffOptions, FactorProof, GateName, GatePolicy, META_COLLECTION, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, STRICT_POLICY, UnlockedKeyring, UserEnvelope, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, listUserEnvelopeIds, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, mergePolicy, parseBytes, readPublicEnvelope, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy };
|
|
757
|
+
export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, type DiffCandidate, DiffEntry, type DiffOptions, DirectoryConfig, FactorProof, GateName, GatePolicy, META_COLLECTION, ManagedRecoveryNotEnrolledError, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, type PersistSchemaResult, PersistedSchemaEnvelope, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, SCHEMAS_COLLECTION, STRICT_POLICY, UnlockedKeyring, UserEnvelope, UserVisibility, VISIBILITY_RECORD_PREFIX, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, mergePolicy, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPublicEnvelope, readUserVisibility, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, visibilityRecordId };
|