@noy-db/hub 0.2.0-pre.14 → 0.2.0-pre.16
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 +160 -64
- 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 +3 -3
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +5 -5
- package/dist/attestation/index.d.ts +5 -5
- package/dist/attestation/index.js +4 -4
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +6 -6
- package/dist/blobs/index.d.ts +6 -6
- package/dist/blobs/index.js +3 -3
- package/dist/bundle/index.cjs +607 -114
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +7 -7
- package/dist/bundle/index.d.ts +7 -7
- package/dist/bundle/index.js +7 -7
- package/dist/{chunk-BIYRQQV6.js → chunk-3YWP3WBP.js} +3 -3
- package/dist/{chunk-VU7SWWT5.js → chunk-42FEUPZQ.js} +10 -6
- package/dist/chunk-42FEUPZQ.js.map +1 -0
- package/dist/{chunk-ACKFRSAH.js → chunk-667MB6AH.js} +132 -54
- package/dist/chunk-667MB6AH.js.map +1 -0
- package/dist/{chunk-A5ZOOZFB.js → chunk-6H2ZUNR7.js} +2 -2
- package/dist/{chunk-7HT2MEZ5.js → chunk-7BQ4QWYX.js} +3 -3
- package/dist/{chunk-DQU36Q7I.js → chunk-7Z7KSVA5.js} +13 -4
- package/dist/chunk-7Z7KSVA5.js.map +1 -0
- package/dist/{chunk-WBAYSNUQ.js → chunk-BI6ETQPF.js} +2 -2
- package/dist/{chunk-56DJ7JVK.js → chunk-BR3AMFGS.js} +2 -2
- package/dist/chunk-CJORTUJ2.js +524 -0
- package/dist/chunk-CJORTUJ2.js.map +1 -0
- package/dist/{chunk-YNTBADIY.js → chunk-CZI2A4MQ.js} +2 -2
- package/dist/{chunk-COFPAMX6.js → chunk-DLZ2ONOD.js} +3 -3
- package/dist/{chunk-KGCORI4L.js → chunk-DUREQF5W.js} +266 -66
- package/dist/chunk-DUREQF5W.js.map +1 -0
- package/dist/{chunk-PE4AQGFH.js → chunk-E2CDVKMH.js} +3 -3
- package/dist/{chunk-GC4V7RU7.js → chunk-F3BPIPLS.js} +1 -1
- package/dist/{chunk-GC4V7RU7.js.map → chunk-F3BPIPLS.js.map} +1 -1
- package/dist/{chunk-L2FE64BU.js → chunk-FFXM3ZIF.js} +2 -2
- package/dist/{chunk-5LQG6ZO2.js → chunk-G4SCICH5.js} +8 -3
- package/dist/chunk-G4SCICH5.js.map +1 -0
- package/dist/{chunk-WGHU7BLI.js → chunk-GNI5STXQ.js} +2 -2
- package/dist/{chunk-UWNYBOOO.js → chunk-HBXJ37ZY.js} +11 -5
- package/dist/chunk-HBXJ37ZY.js.map +1 -0
- package/dist/{chunk-NP6EZT44.js → chunk-IQLVUT37.js} +2 -2
- package/dist/{chunk-7PS7EOCF.js → chunk-IXBIFDEW.js} +2 -2
- package/dist/{chunk-LX3CB26H.js → chunk-KABJXG2F.js} +2 -2
- package/dist/{chunk-3EWA37FV.js → chunk-L2BNJ6HM.js} +32 -276
- package/dist/chunk-L2BNJ6HM.js.map +1 -0
- package/dist/{chunk-DKO2QFSA.js → chunk-OB2ZJQ2D.js} +2 -2
- package/dist/{chunk-4PEFEETV.js → chunk-OMAMZKKD.js} +2 -2
- package/dist/{chunk-EGD5DXFT.js → chunk-OQSRJG6A.js} +13 -1
- package/dist/chunk-OQSRJG6A.js.map +1 -0
- package/dist/{chunk-KI6HAJWL.js → chunk-QSUK7YWK.js} +2 -2
- package/dist/{chunk-YHPM5D7Y.js → chunk-QVIEAYTP.js} +61 -2
- package/dist/chunk-QVIEAYTP.js.map +1 -0
- package/dist/{chunk-NSCVNK5K.js → chunk-SCJPI4Z5.js} +3 -3
- package/dist/{chunk-ZWTNWAO4.js → chunk-TKIY625R.js} +13 -3
- package/dist/chunk-TKIY625R.js.map +1 -0
- package/dist/{chunk-OHVFWCJP.js → chunk-VLMPU56Q.js} +48 -18
- package/dist/chunk-VLMPU56Q.js.map +1 -0
- package/dist/{chunk-6AJBSQU4.js → chunk-XL35NSEN.js} +2 -2
- package/dist/{chunk-WIBHRONM.js → chunk-XWH4MXIU.js} +2 -2
- package/dist/consent/index.d.cts +6 -6
- package/dist/consent/index.d.ts +6 -6
- package/dist/derivations/index.cjs +24 -3
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +7 -7
- package/dist/derivations/index.d.ts +7 -7
- package/dist/derivations/index.js +2 -2
- package/dist/{dev-unlock-BF4OSxRv.d.cts → dev-unlock-8XzcD2Z4.d.cts} +1 -1
- package/dist/{dev-unlock-DV7ujTCI.d.ts → dev-unlock-DR3upLd1.d.ts} +1 -1
- package/dist/executor-AZLS3KBK.js +11 -0
- package/dist/{fanout-sidecar-N6OJX6QR.js → fanout-sidecar-67CMI3UT.js} +2 -2
- package/dist/guards/index.cjs +9 -5
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +7 -7
- package/dist/guards/index.d.ts +7 -7
- package/dist/guards/index.js +1 -1
- package/dist/{hash-DswxkLtW.d.ts → hash-CDjye9KV.d.ts} +1 -1
- package/dist/{hash-BcF5WQXl.d.cts → hash-DuQ88_5W.d.cts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +7 -7
- package/dist/history/index.d.ts +7 -7
- package/dist/history/index.js +2 -2
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +6 -6
- package/dist/i18n/index.d.ts +6 -6
- package/dist/i18n/index.js +3 -3
- package/dist/{immutable-guard-7KqslW2K.d.cts → immutable-guard-CRPvu24K.d.cts} +16 -1
- package/dist/{immutable-guard-C8IYdzfu.d.ts → immutable-guard-Dov3WvwF.d.ts} +16 -1
- package/dist/{index-Cqzp4tt9.d.ts → index-C8Bk3-VF.d.cts} +11 -3
- package/dist/{index-CUVOMtgg.d.cts → index-nP99bXLg.d.ts} +11 -3
- package/dist/index.cjs +840 -122
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +146 -15
- package/dist/index.d.ts +146 -15
- package/dist/index.js +153 -35
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +92 -31
- 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 +3 -3
- package/dist/{issue-ADVS4OVP.js → issue-RZP3VI6O.js} +4 -4
- package/dist/{lazy-builder-D5GU14TS.d.ts → lazy-builder-ChSqcF5t.d.ts} +1 -1
- package/dist/{lazy-builder-Ci5_YG73.d.cts → lazy-builder-eYZzLEL1.d.cts} +1 -1
- package/dist/{ledger-CWSE3BLF.js → ledger-A3LL253R.js} +3 -3
- package/dist/materialized-views/index.cjs +409 -7
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +7 -7
- package/dist/materialized-views/index.d.ts +7 -7
- package/dist/materialized-views/index.js +6 -6
- package/dist/noydb-WCMY2ZOW.js +35 -0
- package/dist/overlay-views/index.cjs +47 -17
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +28 -10
- package/dist/overlay-views/index.d.ts +28 -10
- package/dist/overlay-views/index.js +1 -1
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +6 -6
- package/dist/periods/index.d.ts +6 -6
- package/dist/periods/index.js +3 -3
- package/dist/{predicate-Bt5ft-9c.d.cts → predicate-BmhBSPCH.d.cts} +59 -2
- package/dist/{predicate-Bt5ft-9c.d.ts → predicate-BmhBSPCH.d.ts} +59 -2
- package/dist/{public-envelope-SYHEYQ3X.js → public-envelope-YP2UWMLG.js} +3 -3
- package/dist/query/index.cjs +604 -205
- 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 +5 -5
- package/dist/{registry-XGLNADIE.js → registry-EB6SISTA.js} +2 -2
- package/dist/{registry-DK5YWAAA.js → registry-UTA4CLQS.js} +2 -2
- package/dist/{revoke-ZDFKMR5E.js → revoke-HNMQZSCL.js} +4 -4
- package/dist/session/index.d.cts +7 -7
- package/dist/session/index.d.ts +7 -7
- package/dist/shadow/index.d.cts +6 -6
- package/dist/shadow/index.d.ts +6 -6
- package/dist/{signer-P5D7Y72U.js → signer-DCMNKXSF.js} +3 -3
- package/dist/snapshots/index.d.cts +6 -6
- package/dist/snapshots/index.d.ts +6 -6
- package/dist/snapshots/index.js +3 -3
- package/dist/{stale-7FRJVHN6.js → stale-W5PQTRYH.js} +2 -2
- package/dist/store/index.d.cts +6 -6
- package/dist/store/index.d.ts +6 -6
- package/dist/{strategy-CrS7PnbE.d.cts → strategy-BtW8fAjz.d.cts} +2 -2
- package/dist/{strategy-CrS7PnbE.d.ts → strategy-BtW8fAjz.d.ts} +2 -2
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +5 -5
- package/dist/sync/index.d.ts +5 -5
- package/dist/sync/index.js +2 -2
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +6 -6
- package/dist/team/index.d.ts +6 -6
- package/dist/team/index.js +5 -5
- package/dist/tx/index.cjs +66 -3
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +24 -8
- package/dist/tx/index.d.ts +24 -8
- package/dist/tx/index.js +7 -3
- package/dist/tx/index.js.map +1 -1
- package/dist/{types-V5R2-pd4.d.cts → types-Bze6vkwm.d.cts} +391 -144
- package/dist/{types-BFHQUjdy.d.ts → types-DrmBTscX.d.ts} +391 -144
- package/dist/{ulid-p2nKiiKg.d.ts → ulid-DbBVrNSt.d.ts} +1 -1
- package/dist/{ulid-CwNf9e6-.d.cts → ulid-DfZlAh0u.d.cts} +1 -1
- package/dist/{vault-group-W7QC4UYW.js → vault-group-DX2HFQMX.js} +3 -3
- package/dist/{with-derivation-C9K43BOB.d.cts → with-derivation-CCqAchD5.d.cts} +1 -1
- package/dist/{with-derivation-Ds9yZgCj.d.ts → with-derivation-_lySGdlm.d.ts} +1 -1
- package/dist/{with-materialized-view-DgQcAjYv.d.cts → with-materialized-view--4PsvMDu.d.cts} +1 -1
- package/dist/{with-materialized-view-DwR4jkV5.d.ts → with-materialized-view-QT1Tp7NO.d.ts} +1 -1
- package/dist/{with-overlayed-view-ByyhHdVr.d.ts → with-overlayed-view-BEXfpzSb.d.ts} +1 -1
- package/dist/{with-overlayed-view-7-rUB3vD.d.cts → with-overlayed-view-DlH5qmeB.d.cts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-3EWA37FV.js.map +0 -1
- package/dist/chunk-5LQG6ZO2.js.map +0 -1
- package/dist/chunk-ACKFRSAH.js.map +0 -1
- package/dist/chunk-DQU36Q7I.js.map +0 -1
- package/dist/chunk-EGD5DXFT.js.map +0 -1
- package/dist/chunk-KGCORI4L.js.map +0 -1
- package/dist/chunk-OHVFWCJP.js.map +0 -1
- package/dist/chunk-TV3YZ35S.js +0 -90
- package/dist/chunk-TV3YZ35S.js.map +0 -1
- package/dist/chunk-UWNYBOOO.js.map +0 -1
- package/dist/chunk-VU7SWWT5.js.map +0 -1
- package/dist/chunk-YHPM5D7Y.js.map +0 -1
- package/dist/chunk-ZWTNWAO4.js.map +0 -1
- package/dist/executor-723ZP6TH.js +0 -11
- package/dist/noydb-VZ4JVW55.js +0 -35
- /package/dist/{chunk-BIYRQQV6.js.map → chunk-3YWP3WBP.js.map} +0 -0
- /package/dist/{chunk-A5ZOOZFB.js.map → chunk-6H2ZUNR7.js.map} +0 -0
- /package/dist/{chunk-7HT2MEZ5.js.map → chunk-7BQ4QWYX.js.map} +0 -0
- /package/dist/{chunk-WBAYSNUQ.js.map → chunk-BI6ETQPF.js.map} +0 -0
- /package/dist/{chunk-56DJ7JVK.js.map → chunk-BR3AMFGS.js.map} +0 -0
- /package/dist/{chunk-YNTBADIY.js.map → chunk-CZI2A4MQ.js.map} +0 -0
- /package/dist/{chunk-COFPAMX6.js.map → chunk-DLZ2ONOD.js.map} +0 -0
- /package/dist/{chunk-PE4AQGFH.js.map → chunk-E2CDVKMH.js.map} +0 -0
- /package/dist/{chunk-L2FE64BU.js.map → chunk-FFXM3ZIF.js.map} +0 -0
- /package/dist/{chunk-WGHU7BLI.js.map → chunk-GNI5STXQ.js.map} +0 -0
- /package/dist/{chunk-NP6EZT44.js.map → chunk-IQLVUT37.js.map} +0 -0
- /package/dist/{chunk-7PS7EOCF.js.map → chunk-IXBIFDEW.js.map} +0 -0
- /package/dist/{chunk-LX3CB26H.js.map → chunk-KABJXG2F.js.map} +0 -0
- /package/dist/{chunk-DKO2QFSA.js.map → chunk-OB2ZJQ2D.js.map} +0 -0
- /package/dist/{chunk-4PEFEETV.js.map → chunk-OMAMZKKD.js.map} +0 -0
- /package/dist/{chunk-KI6HAJWL.js.map → chunk-QSUK7YWK.js.map} +0 -0
- /package/dist/{chunk-NSCVNK5K.js.map → chunk-SCJPI4Z5.js.map} +0 -0
- /package/dist/{chunk-6AJBSQU4.js.map → chunk-XL35NSEN.js.map} +0 -0
- /package/dist/{chunk-WIBHRONM.js.map → chunk-XWH4MXIU.js.map} +0 -0
- /package/dist/{executor-723ZP6TH.js.map → executor-AZLS3KBK.js.map} +0 -0
- /package/dist/{fanout-sidecar-N6OJX6QR.js.map → fanout-sidecar-67CMI3UT.js.map} +0 -0
- /package/dist/{issue-ADVS4OVP.js.map → issue-RZP3VI6O.js.map} +0 -0
- /package/dist/{ledger-CWSE3BLF.js.map → ledger-A3LL253R.js.map} +0 -0
- /package/dist/{noydb-VZ4JVW55.js.map → noydb-WCMY2ZOW.js.map} +0 -0
- /package/dist/{public-envelope-SYHEYQ3X.js.map → public-envelope-YP2UWMLG.js.map} +0 -0
- /package/dist/{registry-DK5YWAAA.js.map → registry-EB6SISTA.js.map} +0 -0
- /package/dist/{registry-XGLNADIE.js.map → registry-UTA4CLQS.js.map} +0 -0
- /package/dist/{revoke-ZDFKMR5E.js.map → revoke-HNMQZSCL.js.map} +0 -0
- /package/dist/{signer-P5D7Y72U.js.map → signer-DCMNKXSF.js.map} +0 -0
- /package/dist/{stale-7FRJVHN6.js.map → stale-W5PQTRYH.js.map} +0 -0
- /package/dist/{vault-group-W7QC4UYW.js.map → vault-group-DX2HFQMX.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a$ as NoydbStore, bD as UserEnvelope, bn as PublicEnvelope, bE as GateName, bF as GatePolicy, bG as VaultPolicy, bH as ActiveTier, bI as FactorProof, bJ as SchemaUpdateStrategy, bK as TransformFn, bL as PersistedSchemaEnvelope, bM as UpdateDecision, bN as DirectoryConfig, bO as UserVisibility, aZ as UnlockedKeyring, bs as Vault, b6 as DiffEntry } from './types-Bze6vkwm.cjs';
|
|
2
|
+
export { bP as AccessibleVault, bQ as AffectedDocument, b3 as AppendInput, bR as ArchivePolicy, bS as ArchiveResult, bT as ArchiveRunOptions, bU as ArchiveStrategy, aJ as ArrayOutputSpec, z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, bV as BUNDLE_STORE_POLICY, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, bW as BuiltInGateName, bp as BundleRecipient, a9 as CONSENT_AUDIT_COLLECTION, bX as CacheOptions, bY as CacheStats, bZ as CapturedBlueprint, b_ as ChangeEvent, b4 as ChangeType, ai as ClosePeriodOptions, aS as Collection, b$ as CollectionChangeEvent, c0 as CollectionConflictResolver, c1 as CollectionDescriptor, az as CollectionFrame, b5 as CollectionInstant, c2 as CollectionStats, c3 as ComputedFieldError, c4 as ComputedFields, c5 as ComputedFn, c6 as Conflict, c7 as ConflictPolicy, c8 as ConflictStrategy, aa as ConsentAuditEntry, ab as ConsentAuditFilter, ac as ConsentContext, ad as ConsentOp, c9 as CrossTierAccessEvent, ca as CrossVaultAggregation, cb as CrossVaultGroupedAggregation, cc as CrossVaultGroupedRow, cd as CrossVaultLiveAggregation, ce as CrossVaultLiveQuery, Y as DEFAULT_CHUNK_SIZE, cf as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, cg as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, ch as DeepPartial, ci as DeepPartialOrNull, cj as DeferredNumberingConfig, ck as DelegationToken, cl as DeleteManyResult, cm as DeploymentEvent, cn as DerivationDescriptor, aH as DerivationStrategy, aL as DerivationStrategyHandle, aM as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, co as DirtyEntry, cp as DryRunResult, cq as DumpSchemaOptions, cr as ELEVATION_AUDIT_COLLECTION, cs as ElevatedHandle, b1 as EncryptedEnvelope, ct as EnrollAuthenticatorOptions, cu as EnrollAuthenticatorWrappingDEKsOptions, cv as EnrollAuthenticatorWrappingKEKOptions, cw as EnrollRecoveryResult, cx as ExportCapability, cy as ExportChunk, cz as ExportFormat, cA as ExportStreamOptions, cB as FactorKind, cC as FactorProofBundle, cD as FactorRequirement, cE as FanoutQueryOptions, cF as FanoutResult, cG as FenceDoc, cH as FenceState, cI as FieldChange, cJ as FieldDescriptor, cK as FieldSource, cL as GhostRecord, cM as GrantOptions, at as GuardChange, au as GuardContext, as as GuardStrategy, aw as GuardStrategyHandle, cN as GuardViolation, cO as HistoryConfig, cP as HistoryEntry, b0 as HistoryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, cQ as INDEXED_STORE_POLICY, cR as ImportCapability, cS as InferOutput, cT as InternalCollectionStats, cU as IssueDelegationOptions, cV as IssueMagicLinkGrantOptions, b7 as JsonPatch, b8 as JsonPatchOp, cW as KeyringAuthenticator, cX as KeyringAuthenticatorWrappingDEKs, cY as KeyringAuthenticatorWrappingKEK, cZ as KeyringFile, L as Layer, b9 as LedgerEntry, ba as LedgerStore, c_ as ListAccessibleVaultsOptions, c$ as ListPageResult, d0 as ListUsersOptions, d1 as LiveQueryOptions, d2 as LiveUserEnvelope, d3 as LocaleReadOptions, d4 as Lru, d5 as LruOptions, d6 as LruStats, d7 as MAGIC_LINK_CONTENT_INFO_PREFIX, d8 as MAGIC_LINK_GRANTS_COLLECTION, d9 as MAGIC_LINK_KEK_INFO_PREFIX, da as MagicLinkGrantPayload, db as MagicLinkGrantRecord, bz as MaterializedFromMeta, dc as MaterializedViewDescriptor, bA as MaterializedViewOutput, aP as MaterializedViewStrategy, aQ as MaterializedViewStrategyHandle, dd as MemoryRecipientSealer, de as MemorySealingKeyProvider, df as NOYDB_BACKUP_VERSION, dg as NOYDB_FORMAT_VERSION, dh as NOYDB_KEYRING_VERSION, di as NOYDB_SYNC_VERSION, dj as NextOptions, dk as Noydb, aB as NoydbBundleStore, dl as NoydbEventMap, dm as NoydbOptions, dn as NumberingAssignment, O as OnMissing, h as OnMissingPolicy, aj as OpenPeriodOptions, aN as OutputSpec, aT as OverlayFieldMergeMode, aU as OverlayFieldMergeRule, dp as OverlayViewDescriptor, aR as OverlayedViewStrategy, aW as OverlayedViewStrategyHandle, ak as PERIODS_COLLECTION, dq as PUBLIC_ENVELOPE_FIELDS, dr as PaperRecoveryDoc, ds as PaperRecoveryEntry, dt as PassphrasePolicy, du as PassphraseValidationResult, al as PeriodRecord, dv as Permission, dw as Permissions, dx as PersistedSchemaKind, dy as PlaintextTranslatorContext, dz as PlaintextTranslatorFn, P as PolicyEnforcer, dA as PresenceHandle, dB as PresencePeer, b2 as PruneOptions, dC as PublicEnvelopeField, dD as PublicEnvelopeSchema, dE as PublicEnvelopeText, dF as PullMode, dG as PullOptions, dH as PullPolicy, dI as PullResult, dJ as PushMode, dK as PushOptions, dL as PushPolicy, dM as PushResult, dN as PutManyItemOptions, dO as PutManyOptions, dP as PutManyResult, dQ as QueryAcrossOptions, dR as QueryAcrossResult, dS as QuickUnlockState, dT as QuickUnlockStore, dU as ReAuthOperation, br as RecipientHint, bq as RecipientSealer, aO as RecordOutputSpec, dV as RecoverPassphraseInput, dW as RecoverPassphraseResult, dX as RecoverUserOptions, dY as RecoveryProof, R as ResolveI18nOptions, dZ as ResolvedPublicEnvelopeSchema, aC as RetentionPolicy, d_ as RevokeOptions, aY as Role, d$ as RotatePassphraseInput, e0 as RotateRecoveryOptions, e1 as RotateRecoveryResult, e2 as SEALED_PASSPHRASE_RECORD_ID, e3 as SchemaDelta, e4 as SchemaIntrospection, e5 as SchemaManifestRow, S as ScriptWarning, e6 as SealedEnvelope, e7 as SealedPassphrase, bo as SealingKeyProvider, e8 as SequenceHandle, e9 as SequenceOptions, ea as SequenceStore, eb as SessionPolicy, ec as SetPublicEnvelopeInput, ed as ShamirRecoveryDoc, ee as ShamirRecoveryEntry, bu as ShamirRecoveryProvider, ef as ShardedCollection, eg as ShardedGroupedQuery, eh as ShardedQuery, ei as ShardingConfig, ej as SkippedVault, a3 as SlotInfo, a4 as SlotRecord, ek as SlotRewrapCeremony, el as SlotRewrapContext, aF as SnapshotMeta, em as StandardSchemaV1, en as StandardSchemaV1Issue, eo as StandardSchemaV1SyncResult, ep as StateManagementVault, eq as StoreAuth, er as StoreAuthKind, es as StoreCapabilities, et as StoreTime, eu as SyncEngine, ev as SyncMetadata, ew as SyncPolicy, ex as SyncScheduler, ey as SyncSchedulerStatus, ez as SyncStatus, eA as SyncTarget, eB as SyncTargetRole, eC as SyncTransaction, eD as SyncTransactionResult, eE as TabChannel, eF as TabCoordinationOptions, eG as TabLockManager, eH as TabPresence, eI as TabRole, eJ as TierMode, eK as TransactionInvariant, eL as TranslatorAuditEntry, eM as TxCollection, bv as TxContext, eN as TxOp, eO as TxVault, eP as USER_ENVELOPE_COLLECTION, eQ as USER_ENVELOPE_MAX_BYTES, bB as UnionArmJoin, bC as UnionSource, eR as Unsubscribe, eS as UpdateAuthenticatorOptions, eT as UpdateContext, eU as UpdateUserOptions, eV as UserApi, eW as UserEnvelopeCheckGate, eX as UserEnvelopeOversizedError, eY as UserEnvelopePresented, eZ as UserInfo, e_ as VaultBackup, bb as VaultEngine, aA as VaultFrame, e$ as VaultGroup, f0 as VaultGroupOptions, bc as VaultInstant, f1 as VaultPolicyOnDisk, f2 as VaultRegistryRow, f3 as VaultSchemaSnapshot, f4 as VaultSnapshot, f5 as VaultTemplate, bd as VerifyResult, a5 as VersionRecord, f6 as WarningRules, f7 as WeakPassphraseError, f8 as WeakPassphraseReason, f9 as WithArchiveOptions, fa as WrappedDeksBlob, fb as WriteConflict, fc as WriteEvent, fd as WriteHook, fe as WriteQueue, i as applyI18nLocale, be as applyPatch, ff as assertStrongPassphrase, fg as buildRecipientKeyringFile, fh as burnPaperRecoveryEntry, bf as canonicalJson, bg as computePatch, x as createEnforcer, fi as createNoydb, fj as createStore, fk as deriveMagicLinkContentKey, j as dictCollectionName, k as dictKey, bh as diff, l as enforceScript, fl as enrollAuthenticator, fm as estimateEntropy, fn as evalComputedFields, fo as evaluateExportCapability, fp as evaluateImportCapability, fq as findAuthenticator, bi as formatDiff, fr as hasExportCapability, fs as hasImportCapability, ft as hasRecoveryEnrolled, bj as hashEntry, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, fu as isMagicLinkGrantExpired, fv as isPublicEnvelope, fw as issueDelegation, fx as keyringRecoverPassphrase, fy as keyringRotatePassphrase, fz as listMagicLinkGrants, fA as listUsers, fB as listUsersWithEnvelopes, fC as loadActiveDelegations, fD as loadPaperRecoveryEntries, fE as loadSealedPassphrase, fF as loadShamirRecoveryEntries, fG as magicLinkGrantRecordId, fH as mintPaperRecoveryEntry, fI as mintShamirRecoveryEntry, fJ as mintWrappedDeksBlob, bk as paddedIndex, bl as parseIndex, fK as parseSealedEnvelope, fL as readMagicLinkGrantRecord, fM as recoverUser, fN as removeAuthenticator, s as resolveI18nText, t as resolvePolicy, fO as resolvePublicEnvelopeSchema, fP as resolveSequenceKey, fQ as revokeDelegation, fR as revokeMagicLinkGrant, fS as runTransaction, fT as savePaperRecoveryEntries, fU as saveSealedPassphrase, fV as saveShamirRecoveryEntries, bm as sha256Hex, fW as unwrapDeksFromBlob, fX as unwrapDeksFromPaperEntry, fY as unwrapDeksFromShamirEntry, fZ as unwrapMagicLinkGrant, v as validateI18nTextValue, f_ as validatePassphrase, f$ as validatePublicEnvelopeInput, g0 as validateSchemaInput, g1 as validateSchemaOutput, y as validateSessionPolicy, g2 as withArchive, g3 as withDeferredNumbering, g4 as writeMagicLinkGrant } from './types-Bze6vkwm.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 { a7 as NoydbError } from './strategy-
|
|
6
|
-
export { e as AggregateResult, f as AggregateSpec, g as Aggregation, h as AggregationUpstream,
|
|
7
|
-
export { D as DEFAULT_CROSS_JOIN_MAX_ROWS, a as DEFAULT_JOIN_MAX_ROWS, J as JoinContext, b as JoinLeg, c as JoinStrategy, d as JoinableSource, L as LiveQuery, e as LiveUpstream, O as OrderBy, Q as Query, f as QueryPlan, g as QuerySource, R as RefDescriptor, h as RefIntegrityError, i as RefMode, j as RefRegistry, k as RefScopeError, l as RefViolation, S as ScanBuilder, m as ScanPageProvider, n as applyJoins, o as buildLiveQuery, p as executePlan, r as ref, q as resetJoinWarnings } from './index-
|
|
8
|
-
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-
|
|
5
|
+
import { a7 as NoydbError, a8 as RoundingMode } from './strategy-BtW8fAjz.cjs';
|
|
6
|
+
export { e as AggregateResult, f as AggregateSpec, g as Aggregation, h as AggregationUpstream, a9 as AlreadyElevatedError, B as AmendmentForbiddenError, W as AttestationError, Y as BackupCorruptedError, Z as BackupLedgerError, _ as BundleIntegrityError, $ as BundleSealMismatchError, a0 as BundleVersionConflictError, aa as ConflictError, ab as CrossJoinSourceUnknownError, ac as CrossJoinTooLargeError, ad as DanglingReferenceError, ae as DecryptionError, af as DelegationTargetMissingError, H as DerivationCapExceededError, J as DerivationCycleError, K as DerivationDepthError, N as DerivationOutputShapeError, O as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, ag as DirectoryDisabledError, ah as ElevationExpiredError, ai as ExportCapabilityError, F as FieldFrozenError, aj as FilenameSanitizationError, G as GROUPBY_MAX_CARDINALITY, i as GROUPBY_WARN_CARDINALITY, ak as GroupCardinalityError, j as GroupedAggregation, k as GroupedQuery, l as GroupedQueryN, m as GroupedRow, n as GroupedRowN, al as ImportCapabilityError, am as IndexRequiredError, an as IndexWriteFailureError, ao as InvalidKeyError, I as InvariantError, ap as JoinTooLargeError, aq as KeyringCorruptError, ar as KeyringExpiredError, as as LedgerContentionError, o as LiveAggregation, L as LocaleNotSpecifiedError, a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError, at as MigrationRequiredError, M as MissingTranslationError, au as MoneyCurrencyError, av as MoneyDescriptor, aw as MoneyOptions, ax as MoneyOptionsFixed, ay as MoneyOptionsMulti, az as MoneyPrecisionError, aA as MoneyUnsupportedError, aB as NetworkError, aC as NoAccessError, aD as NonAdditiveSchemaChangeError, aE as NotFoundError, aF as NumberingUncertaintyError, P as OverlayBaseIsVirtualError, Q as OverlayCollectionUnavailableError, U as OverlayIdMismatchError, V as OverlayNameCollisionError, aG as PathEscapeError, aH as PeriodClosedError, aI as PermissionDeniedError, aJ as PrivilegeEscalationError, aK as QuiesceTimeoutError, aL as ReadOnlyAtInstantError, aM as ReadOnlyError, aN as ReadOnlyFrameError, C as RecordLockedError, p as Reducer, q as ReducerOptions, R as ReservedCollectionNameError, aO as ReservedVaultNameError, aP as SchemaFenceError, aQ as SchemaLockedError, aR as SchemaUpdateError, aS as SchemaValidationError, S as ScriptViolationError, aT as SequenceContentionError, aU as SequenceOfflineError, b as SessionExpiredError, c as SessionNotFoundError, d as SessionPolicyError, aV as ShardProvisioningError, E as SnapshotNotFoundError, aW as StoreCapabilityError, aX as TamperedError, aY as TierDemoteDeniedError, aZ as TierNotGrantedError, T as TranslatorNotConfiguredError, a_ as UniqueConstraintError, a$ as UnknownShardError, b0 as UnsupportedIndexOptionError, b1 as ValidationError, b2 as VaultTemplateNotFoundError, r as avg, t as count, u as groupAndReduce, b3 as isMoneyDescriptor, v as max, w as min, b4 as money, x as reduceRecords, z as sum } from './strategy-BtW8fAjz.cjs';
|
|
7
|
+
export { D as DEFAULT_CROSS_JOIN_MAX_ROWS, a as DEFAULT_JOIN_MAX_ROWS, J as JoinContext, b as JoinLeg, c as JoinStrategy, d as JoinableSource, L as LiveQuery, e as LiveUpstream, O as OrderBy, Q as Query, f as QueryPlan, g as QuerySource, R as RefDescriptor, h as RefIntegrityError, i as RefMode, j as RefRegistry, k as RefScopeError, l as RefViolation, S as ScanBuilder, m as ScanPageProvider, n as applyJoins, o as buildLiveQuery, p as executePlan, r as ref, q as resetJoinWarnings } from './index-C8Bk3-VF.cjs';
|
|
8
|
+
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-DfZlAh0u.cjs';
|
|
9
9
|
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';
|
|
10
|
-
export {
|
|
11
|
-
export { w as
|
|
12
|
-
export { w as
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
10
|
+
export { TransactionStrategyOptions } from './tx/index.cjs';
|
|
11
|
+
export { I as ImmutableGuardConfig, i as immutableGuard, w as withGuard } from './immutable-guard-CRPvu24K.cjs';
|
|
12
|
+
export { w as withDerivation } from './with-derivation-CCqAchD5.cjs';
|
|
13
|
+
export { w as withMaterializedView } from './with-materialized-view--4PsvMDu.cjs';
|
|
14
|
+
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-BmhBSPCH.cjs';
|
|
15
|
+
export { w as withOverlayedView } from './with-overlayed-view-DlH5qmeB.cjs';
|
|
15
16
|
export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.cjs';
|
|
16
|
-
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-
|
|
17
|
+
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-8XzcD2Z4.cjs';
|
|
17
18
|
export { i as isDiscriminant } from './discriminant-BN9REW3o.cjs';
|
|
18
|
-
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-
|
|
19
|
-
import './lazy-builder-
|
|
19
|
+
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-DuQ88_5W.cjs';
|
|
20
|
+
import './lazy-builder-eYZzLEL1.cjs';
|
|
20
21
|
import '@noy-db/attestation';
|
|
21
22
|
|
|
22
23
|
/**
|
|
@@ -662,6 +663,136 @@ declare function scaleForCurrency(code: string): number | null;
|
|
|
662
663
|
|
|
663
664
|
type FxRates = Record<string, number | string>;
|
|
664
665
|
|
|
666
|
+
/**
|
|
667
|
+
* Exact money arithmetic helpers (#337) — `mulRate` and `allocate`.
|
|
668
|
+
*
|
|
669
|
+
* Both operate on the canonical decoded string form that `get()`
|
|
670
|
+
* returns (`'10000.00'`), entirely in scaled-`BigInt` space — no
|
|
671
|
+
* floating-point step anywhere, exact past 2^53. They are pure
|
|
672
|
+
* functions with no vault or descriptor dependency: the working scale
|
|
673
|
+
* is inferred from the amount's fractional digits (a canonical money
|
|
674
|
+
* string always carries exactly the field's scale) or pinned with
|
|
675
|
+
* `opts.scale`.
|
|
676
|
+
*
|
|
677
|
+
* Why these two: app-side invariants of the form
|
|
678
|
+
* `Σ parts === whole` (receipt totals, net-zero WHT pairs, proration)
|
|
679
|
+
* carry ±0.01 tolerances ONLY because the math is major-unit floats +
|
|
680
|
+
* round2. `mulRate` (VAT-style rate application with explicit
|
|
681
|
+
* rounding) and `allocate` (largest-remainder split — parts sum to the
|
|
682
|
+
* input EXACTLY, by construction) make those tolerances zero.
|
|
683
|
+
*/
|
|
684
|
+
|
|
685
|
+
interface MulRateOptions {
|
|
686
|
+
/**
|
|
687
|
+
* Output scale (fraction digits). Defaults to the amount's own
|
|
688
|
+
* fractional digits — for a canonical money string that IS the
|
|
689
|
+
* field's scale.
|
|
690
|
+
*/
|
|
691
|
+
readonly scale?: number;
|
|
692
|
+
/** Rounding for the final re-scale. Default `'half-up'`. */
|
|
693
|
+
readonly rounding?: RoundingMode;
|
|
694
|
+
}
|
|
695
|
+
interface AllocateOptions {
|
|
696
|
+
/** Working scale. Defaults to the amount's own fractional digits. */
|
|
697
|
+
readonly scale?: number;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Multiply a money amount by a decimal rate, exactly.
|
|
701
|
+
*
|
|
702
|
+
* The rate is parsed at its OWN full precision (`0.07` → `7` at scale
|
|
703
|
+
* 2), the product computed in `BigInt` at `amountScale + rateScale`,
|
|
704
|
+
* then re-scaled back to the output scale with the requested rounding —
|
|
705
|
+
* one rounding step, at the very end.
|
|
706
|
+
*
|
|
707
|
+
* ```ts
|
|
708
|
+
* mulRate('10000.00', 0.07) // '700.00' (VAT)
|
|
709
|
+
* mulRate('33.33', '0.07') // '2.33' (half-up)
|
|
710
|
+
* mulRate('33.33', 0.07, { rounding: 'floor' }) // '2.33'
|
|
711
|
+
* mulRate(100, 0.07, { scale: 2 }) // '7.00'
|
|
712
|
+
* ```
|
|
713
|
+
*/
|
|
714
|
+
declare function mulRate(amount: number | string, rate: number | string, opts?: MulRateOptions): string;
|
|
715
|
+
/**
|
|
716
|
+
* Split a money amount across weighted buckets with ZERO drift: the
|
|
717
|
+
* returned parts sum to the input exactly, by construction
|
|
718
|
+
* (largest-remainder method).
|
|
719
|
+
*
|
|
720
|
+
* Each bucket gets `floor(amount × weightᵢ / Σweights)`; the leftover
|
|
721
|
+
* minor units (always fewer than the bucket count) go one each to the
|
|
722
|
+
* buckets with the largest truncated remainders — ties broken by
|
|
723
|
+
* position, earlier bucket first. Weights are parsed as exact decimals
|
|
724
|
+
* (no float division anywhere); they must be non-negative with a
|
|
725
|
+
* positive sum.
|
|
726
|
+
*
|
|
727
|
+
* ```ts
|
|
728
|
+
* allocate('100.00', [1, 1, 1]) // ['33.34', '33.33', '33.33']
|
|
729
|
+
* allocate('0.05', [3, 7]) // ['0.02', '0.03']
|
|
730
|
+
* allocate('-100.00', [1, 1, 1]) // ['-33.34', '-33.33', '-33.33']
|
|
731
|
+
* ```
|
|
732
|
+
*/
|
|
733
|
+
declare function allocate(amount: number | string, weights: ReadonlyArray<number | string>, opts?: AllocateOptions): string[];
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Branded money output type (#338).
|
|
737
|
+
*
|
|
738
|
+
* The decoded read shape of a money field is an exact decimal STRING
|
|
739
|
+
* (`'10000.00'`) — but a hand-written schema types it `string | number`,
|
|
740
|
+
* which is honest about the input side and unhelpful on the output
|
|
741
|
+
* side: every read site hand-coerces, and a missed coercion passes
|
|
742
|
+
* typecheck silently (then surfaces as a runtime template warning, or
|
|
743
|
+
* worse, as `'10000.00' * 100` arithmetic).
|
|
744
|
+
*
|
|
745
|
+
* {@link MoneyString} is the output-side brand: a `string` that has
|
|
746
|
+
* been through noy-db's decode (or {@link asMoney}'s guard). Branding
|
|
747
|
+
* is type-level only — zero runtime cost on the read path.
|
|
748
|
+
*
|
|
749
|
+
* ## Wiring the brand through a validator (the input/output asymmetry)
|
|
750
|
+
*
|
|
751
|
+
* Keep the permissive `string | number` on the INPUT side so write
|
|
752
|
+
* sites are untouched, and brand the OUTPUT side. With Zod:
|
|
753
|
+
*
|
|
754
|
+
* ```ts
|
|
755
|
+
* import type { MoneyString } from '@noy-db/hub'
|
|
756
|
+
*
|
|
757
|
+
* const moneyValue = z.union([z.number(), z.string()]) as unknown as
|
|
758
|
+
* z.ZodType<MoneyString, z.ZodTypeDef, string | number>
|
|
759
|
+
*
|
|
760
|
+
* const Invoice = z.object({ id: z.string(), total: moneyValue })
|
|
761
|
+
* type InvoiceOut = z.output<typeof Invoice> // total: MoneyString
|
|
762
|
+
* type InvoiceIn = z.input<typeof Invoice> // total: string | number
|
|
763
|
+
* ```
|
|
764
|
+
*
|
|
765
|
+
* The cast is sound for fields declared in `moneyFields`: reads pass
|
|
766
|
+
* through `decodeMoneyFields`, which always produces the canonical
|
|
767
|
+
* decimal string.
|
|
768
|
+
*/
|
|
769
|
+
declare const MONEY_BRAND: unique symbol;
|
|
770
|
+
/**
|
|
771
|
+
* An exact decimal string produced by noy-db's money decode
|
|
772
|
+
* (`'10000.00'`). The brand exists only at the type level — at runtime
|
|
773
|
+
* a `MoneyString` is a plain string.
|
|
774
|
+
*/
|
|
775
|
+
type MoneyString = string & {
|
|
776
|
+
readonly [MONEY_BRAND]: true;
|
|
777
|
+
};
|
|
778
|
+
/**
|
|
779
|
+
* Runtime-guarded cast to {@link MoneyString}. Accepts a decimal string
|
|
780
|
+
* or a number, returns the canonical decimal string branded — throws
|
|
781
|
+
* `MoneyUnsupportedError` on anything non-finite / non-decimal. Use at
|
|
782
|
+
* trust boundaries (deserialized JSON, route params); values read
|
|
783
|
+
* through `get()`/`list()` are already canonical.
|
|
784
|
+
*/
|
|
785
|
+
declare function asMoney(value: string | number): MoneyString;
|
|
786
|
+
/** Type guard: is `value` a decimal string acceptable as money? */
|
|
787
|
+
declare function isMoneyString(value: unknown): value is MoneyString;
|
|
788
|
+
/**
|
|
789
|
+
* The ONE sanctioned escape hatch to a JS `number` — explicit because
|
|
790
|
+
* the conversion is lossy past 2^53. For display math and chart axes;
|
|
791
|
+
* never feed the result back into stored amounts (use `mulRate` /
|
|
792
|
+
* `allocate` for exact arithmetic).
|
|
793
|
+
*/
|
|
794
|
+
declare function moneyNumber(value: MoneyString | string | number): number;
|
|
795
|
+
|
|
665
796
|
/**
|
|
666
797
|
* Hierarchical access — tier-aware keyring helpers.
|
|
667
798
|
*
|
|
@@ -816,4 +947,4 @@ type DiffCandidate<T = unknown> = Vault | Record<string, readonly T[]> | string;
|
|
|
816
947
|
*/
|
|
817
948
|
declare function diffVault<T = unknown>(vault: Vault, candidate: DiffCandidate<T>, options?: DiffOptions): Promise<VaultDiff<T>>;
|
|
818
949
|
|
|
819
|
-
export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, type DiffCandidate, DiffEntry, type DiffOptions, DirectoryConfig, FactorProof, type FxRates, 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, STATE_VAULT_NAME, STRICT_POLICY, SchemaUpdateStrategy, UnlockedKeyring, UpdateDecision, UserEnvelope, UserVisibility, VISIBILITY_RECORD_PREFIX, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, additiveOnly, assertTierAccess, base64ToBuffer, blindUpdate, bufferToBase64, checkGate, coordinatedCutover, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, lockSchema, mergePolicy, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPublicEnvelope, readUserVisibility, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, scaleForCurrency, visibilityRecordId };
|
|
950
|
+
export { ActiveTier, type AllocateOptions, type CheckGateContext, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, type DiffCandidate, DiffEntry, type DiffOptions, DirectoryConfig, FactorProof, type FxRates, GateName, GatePolicy, META_COLLECTION, ManagedRecoveryNotEnrolledError, type MoneyString, type MulRateOptions, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, type PersistSchemaResult, PersistedSchemaEnvelope, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, RoundingMode, SCHEMAS_COLLECTION, STATE_VAULT_NAME, STRICT_POLICY, SchemaUpdateStrategy, UnlockedKeyring, UpdateDecision, UserEnvelope, UserVisibility, VISIBILITY_RECORD_PREFIX, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, additiveOnly, allocate, asMoney, assertTierAccess, base64ToBuffer, blindUpdate, bufferToBase64, checkGate, coordinatedCutover, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, isMoneyString, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, lockSchema, mergePolicy, moneyNumber, mulRate, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPublicEnvelope, readUserVisibility, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, scaleForCurrency, visibilityRecordId };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a$ as NoydbStore, bD as UserEnvelope, bn as PublicEnvelope, bE as GateName, bF as GatePolicy, bG as VaultPolicy, bH as ActiveTier, bI as FactorProof, bJ as SchemaUpdateStrategy, bK as TransformFn, bL as PersistedSchemaEnvelope, bM as UpdateDecision, bN as DirectoryConfig, bO as UserVisibility, aZ as UnlockedKeyring, bs as Vault, b6 as DiffEntry } from './types-DrmBTscX.js';
|
|
2
|
+
export { bP as AccessibleVault, bQ as AffectedDocument, b3 as AppendInput, bR as ArchivePolicy, bS as ArchiveResult, bT as ArchiveRunOptions, bU as ArchiveStrategy, aJ as ArrayOutputSpec, z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, bV as BUNDLE_STORE_POLICY, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, bW as BuiltInGateName, bp as BundleRecipient, a9 as CONSENT_AUDIT_COLLECTION, bX as CacheOptions, bY as CacheStats, bZ as CapturedBlueprint, b_ as ChangeEvent, b4 as ChangeType, ai as ClosePeriodOptions, aS as Collection, b$ as CollectionChangeEvent, c0 as CollectionConflictResolver, c1 as CollectionDescriptor, az as CollectionFrame, b5 as CollectionInstant, c2 as CollectionStats, c3 as ComputedFieldError, c4 as ComputedFields, c5 as ComputedFn, c6 as Conflict, c7 as ConflictPolicy, c8 as ConflictStrategy, aa as ConsentAuditEntry, ab as ConsentAuditFilter, ac as ConsentContext, ad as ConsentOp, c9 as CrossTierAccessEvent, ca as CrossVaultAggregation, cb as CrossVaultGroupedAggregation, cc as CrossVaultGroupedRow, cd as CrossVaultLiveAggregation, ce as CrossVaultLiveQuery, Y as DEFAULT_CHUNK_SIZE, cf as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, cg as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, ch as DeepPartial, ci as DeepPartialOrNull, cj as DeferredNumberingConfig, ck as DelegationToken, cl as DeleteManyResult, cm as DeploymentEvent, cn as DerivationDescriptor, aH as DerivationStrategy, aL as DerivationStrategyHandle, aM as DerivedFromMeta, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, co as DirtyEntry, cp as DryRunResult, cq as DumpSchemaOptions, cr as ELEVATION_AUDIT_COLLECTION, cs as ElevatedHandle, b1 as EncryptedEnvelope, ct as EnrollAuthenticatorOptions, cu as EnrollAuthenticatorWrappingDEKsOptions, cv as EnrollAuthenticatorWrappingKEKOptions, cw as EnrollRecoveryResult, cx as ExportCapability, cy as ExportChunk, cz as ExportFormat, cA as ExportStreamOptions, cB as FactorKind, cC as FactorProofBundle, cD as FactorRequirement, cE as FanoutQueryOptions, cF as FanoutResult, cG as FenceDoc, cH as FenceState, cI as FieldChange, cJ as FieldDescriptor, cK as FieldSource, cL as GhostRecord, cM as GrantOptions, at as GuardChange, au as GuardContext, as as GuardStrategy, aw as GuardStrategyHandle, cN as GuardViolation, cO as HistoryConfig, cP as HistoryEntry, b0 as HistoryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, cQ as INDEXED_STORE_POLICY, cR as ImportCapability, cS as InferOutput, cT as InternalCollectionStats, cU as IssueDelegationOptions, cV as IssueMagicLinkGrantOptions, b7 as JsonPatch, b8 as JsonPatchOp, cW as KeyringAuthenticator, cX as KeyringAuthenticatorWrappingDEKs, cY as KeyringAuthenticatorWrappingKEK, cZ as KeyringFile, L as Layer, b9 as LedgerEntry, ba as LedgerStore, c_ as ListAccessibleVaultsOptions, c$ as ListPageResult, d0 as ListUsersOptions, d1 as LiveQueryOptions, d2 as LiveUserEnvelope, d3 as LocaleReadOptions, d4 as Lru, d5 as LruOptions, d6 as LruStats, d7 as MAGIC_LINK_CONTENT_INFO_PREFIX, d8 as MAGIC_LINK_GRANTS_COLLECTION, d9 as MAGIC_LINK_KEK_INFO_PREFIX, da as MagicLinkGrantPayload, db as MagicLinkGrantRecord, bz as MaterializedFromMeta, dc as MaterializedViewDescriptor, bA as MaterializedViewOutput, aP as MaterializedViewStrategy, aQ as MaterializedViewStrategyHandle, dd as MemoryRecipientSealer, de as MemorySealingKeyProvider, df as NOYDB_BACKUP_VERSION, dg as NOYDB_FORMAT_VERSION, dh as NOYDB_KEYRING_VERSION, di as NOYDB_SYNC_VERSION, dj as NextOptions, dk as Noydb, aB as NoydbBundleStore, dl as NoydbEventMap, dm as NoydbOptions, dn as NumberingAssignment, O as OnMissing, h as OnMissingPolicy, aj as OpenPeriodOptions, aN as OutputSpec, aT as OverlayFieldMergeMode, aU as OverlayFieldMergeRule, dp as OverlayViewDescriptor, aR as OverlayedViewStrategy, aW as OverlayedViewStrategyHandle, ak as PERIODS_COLLECTION, dq as PUBLIC_ENVELOPE_FIELDS, dr as PaperRecoveryDoc, ds as PaperRecoveryEntry, dt as PassphrasePolicy, du as PassphraseValidationResult, al as PeriodRecord, dv as Permission, dw as Permissions, dx as PersistedSchemaKind, dy as PlaintextTranslatorContext, dz as PlaintextTranslatorFn, P as PolicyEnforcer, dA as PresenceHandle, dB as PresencePeer, b2 as PruneOptions, dC as PublicEnvelopeField, dD as PublicEnvelopeSchema, dE as PublicEnvelopeText, dF as PullMode, dG as PullOptions, dH as PullPolicy, dI as PullResult, dJ as PushMode, dK as PushOptions, dL as PushPolicy, dM as PushResult, dN as PutManyItemOptions, dO as PutManyOptions, dP as PutManyResult, dQ as QueryAcrossOptions, dR as QueryAcrossResult, dS as QuickUnlockState, dT as QuickUnlockStore, dU as ReAuthOperation, br as RecipientHint, bq as RecipientSealer, aO as RecordOutputSpec, dV as RecoverPassphraseInput, dW as RecoverPassphraseResult, dX as RecoverUserOptions, dY as RecoveryProof, R as ResolveI18nOptions, dZ as ResolvedPublicEnvelopeSchema, aC as RetentionPolicy, d_ as RevokeOptions, aY as Role, d$ as RotatePassphraseInput, e0 as RotateRecoveryOptions, e1 as RotateRecoveryResult, e2 as SEALED_PASSPHRASE_RECORD_ID, e3 as SchemaDelta, e4 as SchemaIntrospection, e5 as SchemaManifestRow, S as ScriptWarning, e6 as SealedEnvelope, e7 as SealedPassphrase, bo as SealingKeyProvider, e8 as SequenceHandle, e9 as SequenceOptions, ea as SequenceStore, eb as SessionPolicy, ec as SetPublicEnvelopeInput, ed as ShamirRecoveryDoc, ee as ShamirRecoveryEntry, bu as ShamirRecoveryProvider, ef as ShardedCollection, eg as ShardedGroupedQuery, eh as ShardedQuery, ei as ShardingConfig, ej as SkippedVault, a3 as SlotInfo, a4 as SlotRecord, ek as SlotRewrapCeremony, el as SlotRewrapContext, aF as SnapshotMeta, em as StandardSchemaV1, en as StandardSchemaV1Issue, eo as StandardSchemaV1SyncResult, ep as StateManagementVault, eq as StoreAuth, er as StoreAuthKind, es as StoreCapabilities, et as StoreTime, eu as SyncEngine, ev as SyncMetadata, ew as SyncPolicy, ex as SyncScheduler, ey as SyncSchedulerStatus, ez as SyncStatus, eA as SyncTarget, eB as SyncTargetRole, eC as SyncTransaction, eD as SyncTransactionResult, eE as TabChannel, eF as TabCoordinationOptions, eG as TabLockManager, eH as TabPresence, eI as TabRole, eJ as TierMode, eK as TransactionInvariant, eL as TranslatorAuditEntry, eM as TxCollection, bv as TxContext, eN as TxOp, eO as TxVault, eP as USER_ENVELOPE_COLLECTION, eQ as USER_ENVELOPE_MAX_BYTES, bB as UnionArmJoin, bC as UnionSource, eR as Unsubscribe, eS as UpdateAuthenticatorOptions, eT as UpdateContext, eU as UpdateUserOptions, eV as UserApi, eW as UserEnvelopeCheckGate, eX as UserEnvelopeOversizedError, eY as UserEnvelopePresented, eZ as UserInfo, e_ as VaultBackup, bb as VaultEngine, aA as VaultFrame, e$ as VaultGroup, f0 as VaultGroupOptions, bc as VaultInstant, f1 as VaultPolicyOnDisk, f2 as VaultRegistryRow, f3 as VaultSchemaSnapshot, f4 as VaultSnapshot, f5 as VaultTemplate, bd as VerifyResult, a5 as VersionRecord, f6 as WarningRules, f7 as WeakPassphraseError, f8 as WeakPassphraseReason, f9 as WithArchiveOptions, fa as WrappedDeksBlob, fb as WriteConflict, fc as WriteEvent, fd as WriteHook, fe as WriteQueue, i as applyI18nLocale, be as applyPatch, ff as assertStrongPassphrase, fg as buildRecipientKeyringFile, fh as burnPaperRecoveryEntry, bf as canonicalJson, bg as computePatch, x as createEnforcer, fi as createNoydb, fj as createStore, fk as deriveMagicLinkContentKey, j as dictCollectionName, k as dictKey, bh as diff, l as enforceScript, fl as enrollAuthenticator, fm as estimateEntropy, fn as evalComputedFields, fo as evaluateExportCapability, fp as evaluateImportCapability, fq as findAuthenticator, bi as formatDiff, fr as hasExportCapability, fs as hasImportCapability, ft as hasRecoveryEnrolled, bj as hashEntry, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, fu as isMagicLinkGrantExpired, fv as isPublicEnvelope, fw as issueDelegation, fx as keyringRecoverPassphrase, fy as keyringRotatePassphrase, fz as listMagicLinkGrants, fA as listUsers, fB as listUsersWithEnvelopes, fC as loadActiveDelegations, fD as loadPaperRecoveryEntries, fE as loadSealedPassphrase, fF as loadShamirRecoveryEntries, fG as magicLinkGrantRecordId, fH as mintPaperRecoveryEntry, fI as mintShamirRecoveryEntry, fJ as mintWrappedDeksBlob, bk as paddedIndex, bl as parseIndex, fK as parseSealedEnvelope, fL as readMagicLinkGrantRecord, fM as recoverUser, fN as removeAuthenticator, s as resolveI18nText, t as resolvePolicy, fO as resolvePublicEnvelopeSchema, fP as resolveSequenceKey, fQ as revokeDelegation, fR as revokeMagicLinkGrant, fS as runTransaction, fT as savePaperRecoveryEntries, fU as saveSealedPassphrase, fV as saveShamirRecoveryEntries, bm as sha256Hex, fW as unwrapDeksFromBlob, fX as unwrapDeksFromPaperEntry, fY as unwrapDeksFromShamirEntry, fZ as unwrapMagicLinkGrant, v as validateI18nTextValue, f_ as validatePassphrase, f$ as validatePublicEnvelopeInput, g0 as validateSchemaInput, g1 as validateSchemaOutput, y as validateSessionPolicy, g2 as withArchive, g3 as withDeferredNumbering, g4 as writeMagicLinkGrant } from './types-DrmBTscX.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 { a7 as NoydbError } from './strategy-
|
|
6
|
-
export { e as AggregateResult, f as AggregateSpec, g as Aggregation, h as AggregationUpstream,
|
|
7
|
-
export { D as DEFAULT_CROSS_JOIN_MAX_ROWS, a as DEFAULT_JOIN_MAX_ROWS, J as JoinContext, b as JoinLeg, c as JoinStrategy, d as JoinableSource, L as LiveQuery, e as LiveUpstream, O as OrderBy, Q as Query, f as QueryPlan, g as QuerySource, R as RefDescriptor, h as RefIntegrityError, i as RefMode, j as RefRegistry, k as RefScopeError, l as RefViolation, S as ScanBuilder, m as ScanPageProvider, n as applyJoins, o as buildLiveQuery, p as executePlan, r as ref, q as resetJoinWarnings } from './index-
|
|
8
|
-
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-
|
|
5
|
+
import { a7 as NoydbError, a8 as RoundingMode } from './strategy-BtW8fAjz.js';
|
|
6
|
+
export { e as AggregateResult, f as AggregateSpec, g as Aggregation, h as AggregationUpstream, a9 as AlreadyElevatedError, B as AmendmentForbiddenError, W as AttestationError, Y as BackupCorruptedError, Z as BackupLedgerError, _ as BundleIntegrityError, $ as BundleSealMismatchError, a0 as BundleVersionConflictError, aa as ConflictError, ab as CrossJoinSourceUnknownError, ac as CrossJoinTooLargeError, ad as DanglingReferenceError, ae as DecryptionError, af as DelegationTargetMissingError, H as DerivationCapExceededError, J as DerivationCycleError, K as DerivationDepthError, N as DerivationOutputShapeError, O as DerivationOutputUnknownError, D as DictKeyInUseError, a as DictKeyMissingError, ag as DirectoryDisabledError, ah as ElevationExpiredError, ai as ExportCapabilityError, F as FieldFrozenError, aj as FilenameSanitizationError, G as GROUPBY_MAX_CARDINALITY, i as GROUPBY_WARN_CARDINALITY, ak as GroupCardinalityError, j as GroupedAggregation, k as GroupedQuery, l as GroupedQueryN, m as GroupedRow, n as GroupedRowN, al as ImportCapabilityError, am as IndexRequiredError, an as IndexWriteFailureError, ao as InvalidKeyError, I as InvariantError, ap as JoinTooLargeError, aq as KeyringCorruptError, ar as KeyringExpiredError, as as LedgerContentionError, o as LiveAggregation, L as LocaleNotSpecifiedError, a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError, at as MigrationRequiredError, M as MissingTranslationError, au as MoneyCurrencyError, av as MoneyDescriptor, aw as MoneyOptions, ax as MoneyOptionsFixed, ay as MoneyOptionsMulti, az as MoneyPrecisionError, aA as MoneyUnsupportedError, aB as NetworkError, aC as NoAccessError, aD as NonAdditiveSchemaChangeError, aE as NotFoundError, aF as NumberingUncertaintyError, P as OverlayBaseIsVirtualError, Q as OverlayCollectionUnavailableError, U as OverlayIdMismatchError, V as OverlayNameCollisionError, aG as PathEscapeError, aH as PeriodClosedError, aI as PermissionDeniedError, aJ as PrivilegeEscalationError, aK as QuiesceTimeoutError, aL as ReadOnlyAtInstantError, aM as ReadOnlyError, aN as ReadOnlyFrameError, C as RecordLockedError, p as Reducer, q as ReducerOptions, R as ReservedCollectionNameError, aO as ReservedVaultNameError, aP as SchemaFenceError, aQ as SchemaLockedError, aR as SchemaUpdateError, aS as SchemaValidationError, S as ScriptViolationError, aT as SequenceContentionError, aU as SequenceOfflineError, b as SessionExpiredError, c as SessionNotFoundError, d as SessionPolicyError, aV as ShardProvisioningError, E as SnapshotNotFoundError, aW as StoreCapabilityError, aX as TamperedError, aY as TierDemoteDeniedError, aZ as TierNotGrantedError, T as TranslatorNotConfiguredError, a_ as UniqueConstraintError, a$ as UnknownShardError, b0 as UnsupportedIndexOptionError, b1 as ValidationError, b2 as VaultTemplateNotFoundError, r as avg, t as count, u as groupAndReduce, b3 as isMoneyDescriptor, v as max, w as min, b4 as money, x as reduceRecords, z as sum } from './strategy-BtW8fAjz.js';
|
|
7
|
+
export { D as DEFAULT_CROSS_JOIN_MAX_ROWS, a as DEFAULT_JOIN_MAX_ROWS, J as JoinContext, b as JoinLeg, c as JoinStrategy, d as JoinableSource, L as LiveQuery, e as LiveUpstream, O as OrderBy, Q as Query, f as QueryPlan, g as QuerySource, R as RefDescriptor, h as RefIntegrityError, i as RefMode, j as RefRegistry, k as RefScopeError, l as RefViolation, S as ScanBuilder, m as ScanPageProvider, n as applyJoins, o as buildLiveQuery, p as executePlan, r as ref, q as resetJoinWarnings } from './index-nP99bXLg.js';
|
|
8
|
+
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-DbBVrNSt.js';
|
|
9
9
|
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';
|
|
10
|
-
export {
|
|
11
|
-
export { w as
|
|
12
|
-
export { w as
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
10
|
+
export { TransactionStrategyOptions } from './tx/index.js';
|
|
11
|
+
export { I as ImmutableGuardConfig, i as immutableGuard, w as withGuard } from './immutable-guard-Dov3WvwF.js';
|
|
12
|
+
export { w as withDerivation } from './with-derivation-_lySGdlm.js';
|
|
13
|
+
export { w as withMaterializedView } from './with-materialized-view-QT1Tp7NO.js';
|
|
14
|
+
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-BmhBSPCH.js';
|
|
15
|
+
export { w as withOverlayedView } from './with-overlayed-view-BEXfpzSb.js';
|
|
15
16
|
export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.js';
|
|
16
|
-
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-
|
|
17
|
+
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-DR3upLd1.js';
|
|
17
18
|
export { i as isDiscriminant } from './discriminant-BN9REW3o.js';
|
|
18
|
-
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-
|
|
19
|
-
import './lazy-builder-
|
|
19
|
+
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-CDjye9KV.js';
|
|
20
|
+
import './lazy-builder-ChSqcF5t.js';
|
|
20
21
|
import '@noy-db/attestation';
|
|
21
22
|
|
|
22
23
|
/**
|
|
@@ -662,6 +663,136 @@ declare function scaleForCurrency(code: string): number | null;
|
|
|
662
663
|
|
|
663
664
|
type FxRates = Record<string, number | string>;
|
|
664
665
|
|
|
666
|
+
/**
|
|
667
|
+
* Exact money arithmetic helpers (#337) — `mulRate` and `allocate`.
|
|
668
|
+
*
|
|
669
|
+
* Both operate on the canonical decoded string form that `get()`
|
|
670
|
+
* returns (`'10000.00'`), entirely in scaled-`BigInt` space — no
|
|
671
|
+
* floating-point step anywhere, exact past 2^53. They are pure
|
|
672
|
+
* functions with no vault or descriptor dependency: the working scale
|
|
673
|
+
* is inferred from the amount's fractional digits (a canonical money
|
|
674
|
+
* string always carries exactly the field's scale) or pinned with
|
|
675
|
+
* `opts.scale`.
|
|
676
|
+
*
|
|
677
|
+
* Why these two: app-side invariants of the form
|
|
678
|
+
* `Σ parts === whole` (receipt totals, net-zero WHT pairs, proration)
|
|
679
|
+
* carry ±0.01 tolerances ONLY because the math is major-unit floats +
|
|
680
|
+
* round2. `mulRate` (VAT-style rate application with explicit
|
|
681
|
+
* rounding) and `allocate` (largest-remainder split — parts sum to the
|
|
682
|
+
* input EXACTLY, by construction) make those tolerances zero.
|
|
683
|
+
*/
|
|
684
|
+
|
|
685
|
+
interface MulRateOptions {
|
|
686
|
+
/**
|
|
687
|
+
* Output scale (fraction digits). Defaults to the amount's own
|
|
688
|
+
* fractional digits — for a canonical money string that IS the
|
|
689
|
+
* field's scale.
|
|
690
|
+
*/
|
|
691
|
+
readonly scale?: number;
|
|
692
|
+
/** Rounding for the final re-scale. Default `'half-up'`. */
|
|
693
|
+
readonly rounding?: RoundingMode;
|
|
694
|
+
}
|
|
695
|
+
interface AllocateOptions {
|
|
696
|
+
/** Working scale. Defaults to the amount's own fractional digits. */
|
|
697
|
+
readonly scale?: number;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Multiply a money amount by a decimal rate, exactly.
|
|
701
|
+
*
|
|
702
|
+
* The rate is parsed at its OWN full precision (`0.07` → `7` at scale
|
|
703
|
+
* 2), the product computed in `BigInt` at `amountScale + rateScale`,
|
|
704
|
+
* then re-scaled back to the output scale with the requested rounding —
|
|
705
|
+
* one rounding step, at the very end.
|
|
706
|
+
*
|
|
707
|
+
* ```ts
|
|
708
|
+
* mulRate('10000.00', 0.07) // '700.00' (VAT)
|
|
709
|
+
* mulRate('33.33', '0.07') // '2.33' (half-up)
|
|
710
|
+
* mulRate('33.33', 0.07, { rounding: 'floor' }) // '2.33'
|
|
711
|
+
* mulRate(100, 0.07, { scale: 2 }) // '7.00'
|
|
712
|
+
* ```
|
|
713
|
+
*/
|
|
714
|
+
declare function mulRate(amount: number | string, rate: number | string, opts?: MulRateOptions): string;
|
|
715
|
+
/**
|
|
716
|
+
* Split a money amount across weighted buckets with ZERO drift: the
|
|
717
|
+
* returned parts sum to the input exactly, by construction
|
|
718
|
+
* (largest-remainder method).
|
|
719
|
+
*
|
|
720
|
+
* Each bucket gets `floor(amount × weightᵢ / Σweights)`; the leftover
|
|
721
|
+
* minor units (always fewer than the bucket count) go one each to the
|
|
722
|
+
* buckets with the largest truncated remainders — ties broken by
|
|
723
|
+
* position, earlier bucket first. Weights are parsed as exact decimals
|
|
724
|
+
* (no float division anywhere); they must be non-negative with a
|
|
725
|
+
* positive sum.
|
|
726
|
+
*
|
|
727
|
+
* ```ts
|
|
728
|
+
* allocate('100.00', [1, 1, 1]) // ['33.34', '33.33', '33.33']
|
|
729
|
+
* allocate('0.05', [3, 7]) // ['0.02', '0.03']
|
|
730
|
+
* allocate('-100.00', [1, 1, 1]) // ['-33.34', '-33.33', '-33.33']
|
|
731
|
+
* ```
|
|
732
|
+
*/
|
|
733
|
+
declare function allocate(amount: number | string, weights: ReadonlyArray<number | string>, opts?: AllocateOptions): string[];
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Branded money output type (#338).
|
|
737
|
+
*
|
|
738
|
+
* The decoded read shape of a money field is an exact decimal STRING
|
|
739
|
+
* (`'10000.00'`) — but a hand-written schema types it `string | number`,
|
|
740
|
+
* which is honest about the input side and unhelpful on the output
|
|
741
|
+
* side: every read site hand-coerces, and a missed coercion passes
|
|
742
|
+
* typecheck silently (then surfaces as a runtime template warning, or
|
|
743
|
+
* worse, as `'10000.00' * 100` arithmetic).
|
|
744
|
+
*
|
|
745
|
+
* {@link MoneyString} is the output-side brand: a `string` that has
|
|
746
|
+
* been through noy-db's decode (or {@link asMoney}'s guard). Branding
|
|
747
|
+
* is type-level only — zero runtime cost on the read path.
|
|
748
|
+
*
|
|
749
|
+
* ## Wiring the brand through a validator (the input/output asymmetry)
|
|
750
|
+
*
|
|
751
|
+
* Keep the permissive `string | number` on the INPUT side so write
|
|
752
|
+
* sites are untouched, and brand the OUTPUT side. With Zod:
|
|
753
|
+
*
|
|
754
|
+
* ```ts
|
|
755
|
+
* import type { MoneyString } from '@noy-db/hub'
|
|
756
|
+
*
|
|
757
|
+
* const moneyValue = z.union([z.number(), z.string()]) as unknown as
|
|
758
|
+
* z.ZodType<MoneyString, z.ZodTypeDef, string | number>
|
|
759
|
+
*
|
|
760
|
+
* const Invoice = z.object({ id: z.string(), total: moneyValue })
|
|
761
|
+
* type InvoiceOut = z.output<typeof Invoice> // total: MoneyString
|
|
762
|
+
* type InvoiceIn = z.input<typeof Invoice> // total: string | number
|
|
763
|
+
* ```
|
|
764
|
+
*
|
|
765
|
+
* The cast is sound for fields declared in `moneyFields`: reads pass
|
|
766
|
+
* through `decodeMoneyFields`, which always produces the canonical
|
|
767
|
+
* decimal string.
|
|
768
|
+
*/
|
|
769
|
+
declare const MONEY_BRAND: unique symbol;
|
|
770
|
+
/**
|
|
771
|
+
* An exact decimal string produced by noy-db's money decode
|
|
772
|
+
* (`'10000.00'`). The brand exists only at the type level — at runtime
|
|
773
|
+
* a `MoneyString` is a plain string.
|
|
774
|
+
*/
|
|
775
|
+
type MoneyString = string & {
|
|
776
|
+
readonly [MONEY_BRAND]: true;
|
|
777
|
+
};
|
|
778
|
+
/**
|
|
779
|
+
* Runtime-guarded cast to {@link MoneyString}. Accepts a decimal string
|
|
780
|
+
* or a number, returns the canonical decimal string branded — throws
|
|
781
|
+
* `MoneyUnsupportedError` on anything non-finite / non-decimal. Use at
|
|
782
|
+
* trust boundaries (deserialized JSON, route params); values read
|
|
783
|
+
* through `get()`/`list()` are already canonical.
|
|
784
|
+
*/
|
|
785
|
+
declare function asMoney(value: string | number): MoneyString;
|
|
786
|
+
/** Type guard: is `value` a decimal string acceptable as money? */
|
|
787
|
+
declare function isMoneyString(value: unknown): value is MoneyString;
|
|
788
|
+
/**
|
|
789
|
+
* The ONE sanctioned escape hatch to a JS `number` — explicit because
|
|
790
|
+
* the conversion is lossy past 2^53. For display math and chart axes;
|
|
791
|
+
* never feed the result back into stored amounts (use `mulRate` /
|
|
792
|
+
* `allocate` for exact arithmetic).
|
|
793
|
+
*/
|
|
794
|
+
declare function moneyNumber(value: MoneyString | string | number): number;
|
|
795
|
+
|
|
665
796
|
/**
|
|
666
797
|
* Hierarchical access — tier-aware keyring helpers.
|
|
667
798
|
*
|
|
@@ -816,4 +947,4 @@ type DiffCandidate<T = unknown> = Vault | Record<string, readonly T[]> | string;
|
|
|
816
947
|
*/
|
|
817
948
|
declare function diffVault<T = unknown>(vault: Vault, candidate: DiffCandidate<T>, options?: DiffOptions): Promise<VaultDiff<T>>;
|
|
818
949
|
|
|
819
|
-
export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, type DiffCandidate, DiffEntry, type DiffOptions, DirectoryConfig, FactorProof, type FxRates, 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, STATE_VAULT_NAME, STRICT_POLICY, SchemaUpdateStrategy, UnlockedKeyring, UpdateDecision, UserEnvelope, UserVisibility, VISIBILITY_RECORD_PREFIX, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, additiveOnly, assertTierAccess, base64ToBuffer, blindUpdate, bufferToBase64, checkGate, coordinatedCutover, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, lockSchema, mergePolicy, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPublicEnvelope, readUserVisibility, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, scaleForCurrency, visibilityRecordId };
|
|
950
|
+
export { ActiveTier, type AllocateOptions, type CheckGateContext, DEFAULT_FRESHNESS_MS, DIRECTORY_RECORD_ID, type DiffCandidate, DiffEntry, type DiffOptions, DirectoryConfig, FactorProof, type FxRates, GateName, GatePolicy, META_COLLECTION, ManagedRecoveryNotEnrolledError, type MoneyString, type MulRateOptions, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, type PersistSchemaResult, PersistedSchemaEnvelope, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, RoundingMode, SCHEMAS_COLLECTION, STATE_VAULT_NAME, STRICT_POLICY, SchemaUpdateStrategy, UnlockedKeyring, UpdateDecision, UserEnvelope, UserVisibility, VISIBILITY_RECORD_PREFIX, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, additiveOnly, allocate, asMoney, assertTierAccess, base64ToBuffer, blindUpdate, bufferToBase64, checkGate, coordinatedCutover, decryptBytes, decryptDeterministic, dekKey, deleteUserEnvelope, deleteUserVisibility, derivePersistedSchema, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, isMoneyString, isZodSchema, listUserEnvelopeIds, loadPersistedSchema, loadPublicEnvelope, loadUserEnvelope, loadVaultPolicy, lockSchema, mergePolicy, moneyNumber, mulRate, parseBytes, persistDirectoryConfig, persistSchemaIfNeeded, persistUserVisibility, readDirectoryConfig, readPublicEnvelope, readUserVisibility, savePersistedSchema, savePublicEnvelope, saveUserEnvelope, saveVaultPolicy, scaleForCurrency, visibilityRecordId };
|