Initial Commit
This commit is contained in:
150
packages/security-stack/security/vault/src/index.ts
Normal file
150
packages/security-stack/security/vault/src/index.ts
Normal file
@@ -0,0 +1,150 @@
|
||||
// Attachments
|
||||
export {
|
||||
type AttachmentsOptions,
|
||||
DEFAULT_MAX_ATTACHMENT_BYTES,
|
||||
decodeAttachmentMetadata,
|
||||
encodeAttachmentMetadata,
|
||||
type UploadAttachmentInput,
|
||||
VaultAttachments,
|
||||
} from "./attachments/attachments.js";
|
||||
// Container
|
||||
export {
|
||||
type ContainerLoadResult,
|
||||
type CreateContainerInput,
|
||||
createEmptyContainer,
|
||||
decryptContainer,
|
||||
deserialiseState,
|
||||
type EncryptContainerInput,
|
||||
encryptContainer,
|
||||
loadContainer,
|
||||
type SaveContainerInput,
|
||||
saveContainer,
|
||||
serialiseState,
|
||||
} from "./container/container.js";
|
||||
// Encryption
|
||||
export {
|
||||
type DecryptFieldOptions,
|
||||
decryptConcealedFields,
|
||||
decryptField,
|
||||
type EncryptedField,
|
||||
type EncryptFieldOptions,
|
||||
encryptConcealedFields,
|
||||
encryptField,
|
||||
} from "./encryption/field-encryption.js";
|
||||
// Errors
|
||||
export {
|
||||
VAULT_CODES,
|
||||
VaultError,
|
||||
type VaultErrorCode,
|
||||
} from "./errors/index.js";
|
||||
export {
|
||||
applyPatch,
|
||||
generateItemId,
|
||||
rowToItem,
|
||||
} from "./items/helpers.js";
|
||||
// Items
|
||||
export { type ItemsOptions, VaultItems } from "./items/items.js";
|
||||
export {
|
||||
emptyContainerState,
|
||||
headSchemaVersion,
|
||||
type MigrationLedgerEntry,
|
||||
type MigrationResult,
|
||||
runMigrations,
|
||||
VAULT_MIGRATIONS,
|
||||
type VaultContainerState,
|
||||
type VaultHistoryRow,
|
||||
type VaultItemRow,
|
||||
type VaultMigration,
|
||||
} from "./items/migrations/migrations.js";
|
||||
// Manifest
|
||||
export {
|
||||
type CreateManifestInput,
|
||||
createManifest,
|
||||
hashVaultId,
|
||||
MANIFEST_AEAD_XCHACHA20_POLY1305,
|
||||
MANIFEST_BYTE_SIZE,
|
||||
MANIFEST_FORMAT_VERSION,
|
||||
MANIFEST_KDF_ARGON2ID_2SKD,
|
||||
packManifest,
|
||||
touchManifest,
|
||||
unpackManifest,
|
||||
} from "./manifest/manifest.js";
|
||||
// OTel
|
||||
export {
|
||||
getVaultInstruments,
|
||||
getVaultTracer,
|
||||
resetVaultInstruments,
|
||||
resetVaultTracer,
|
||||
setVaultMeterProvider,
|
||||
setVaultTracerProvider,
|
||||
type VaultInstruments,
|
||||
} from "./otel/instruments.js";
|
||||
// Schemas
|
||||
export {
|
||||
AttachmentSchema,
|
||||
ItemFieldsSchema,
|
||||
ListOptionsSchema,
|
||||
ManifestArgon2idSchema,
|
||||
PartialItemFieldsSchema,
|
||||
SearchQuerySchema,
|
||||
ShareLinkSchema,
|
||||
VaultItemSchema,
|
||||
VaultManifestSchema,
|
||||
} from "./schemas/schemas.js";
|
||||
// Search
|
||||
export {
|
||||
type SearchOptions,
|
||||
type SearchResult,
|
||||
VaultSearch,
|
||||
} from "./search/search.js";
|
||||
// Shares
|
||||
export {
|
||||
type CreateLinkInput,
|
||||
type SharesOptions,
|
||||
VaultShares,
|
||||
} from "./shares/shares.js";
|
||||
// Sync
|
||||
export { type SyncOptions, VaultSync } from "./sync/sync.js";
|
||||
// Types — adapters
|
||||
export type {
|
||||
CreatedShareLink,
|
||||
CreateShareLinkInput,
|
||||
DriveLike,
|
||||
DriveSharingLike,
|
||||
SyncDelegationResult,
|
||||
SyncSnapshot,
|
||||
SyncSnapshotItem,
|
||||
VaultSyncLike,
|
||||
} from "./types/adapters.js";
|
||||
// Types — main
|
||||
export type {
|
||||
Attachment,
|
||||
ItemFields,
|
||||
ListOptions,
|
||||
SearchQuery,
|
||||
ShareLink,
|
||||
SyncResult,
|
||||
VaultConfig,
|
||||
VaultItem,
|
||||
VaultManifest,
|
||||
VaultState,
|
||||
} from "./types/types.js";
|
||||
export {
|
||||
type DeriveVaultKeyInput,
|
||||
deriveVaultKeyBuffer,
|
||||
type LoadOrCreateInput,
|
||||
type LoadOrCreateResult,
|
||||
loadOrCreateContainer,
|
||||
} from "./vault/lifecycle.js";
|
||||
// Vault
|
||||
export { VAULT_HEAD_SCHEMA_VERSION, Vault } from "./vault/vault.js";
|
||||
export {
|
||||
buildAttachments,
|
||||
buildItems,
|
||||
buildSearch,
|
||||
buildShares,
|
||||
buildSync,
|
||||
freshRuntimeIndex,
|
||||
type RuntimeIndex,
|
||||
type WiringInputs,
|
||||
} from "./vault/wiring.js";
|
||||
Reference in New Issue
Block a user