81 lines
1.7 KiB
TypeScript
81 lines
1.7 KiB
TypeScript
// Crypto-sync
|
|
export {
|
|
decryptSyncPayload,
|
|
type EncryptSyncPayloadOptions,
|
|
encryptSyncPayload,
|
|
MAX_SYNC_PAYLOAD_BYTES,
|
|
SYNC_PAYLOAD_VERSION,
|
|
} from "./crypto-sync/crypto-sync.js";
|
|
// Engine
|
|
export { SyncEngine, type SyncEngineOptions } from "./engine/engine.js";
|
|
// Errors
|
|
export {
|
|
VAULT_SYNC_CODES,
|
|
type VaultSyncCode,
|
|
VaultSyncError,
|
|
} from "./errors/index.js";
|
|
// Merge
|
|
export {
|
|
assertMergeStrategy,
|
|
MERGE_STRATEGIES,
|
|
mergeVaultItems,
|
|
} from "./merge/merge.js";
|
|
// OTel
|
|
export {
|
|
getVaultSyncInstruments,
|
|
getVaultSyncTracer,
|
|
resetVaultSyncInstruments,
|
|
resetVaultSyncTracer,
|
|
setVaultSyncMeterProvider,
|
|
setVaultSyncTracerProvider,
|
|
type VaultSyncInstruments,
|
|
} from "./otel/instruments.js";
|
|
// Patch
|
|
export {
|
|
applyPatch,
|
|
diffVaultItems,
|
|
type JsonPatch,
|
|
} from "./patch/patch.js";
|
|
// Queue
|
|
export {
|
|
collapseOperations,
|
|
DEFAULT_MAX_QUEUE_DEPTH,
|
|
type EnqueueInput,
|
|
SyncQueue,
|
|
type SyncQueueOptions,
|
|
} from "./queue/queue.js";
|
|
// Schemas
|
|
export {
|
|
EncryptedSyncPayloadSchema,
|
|
MergeStrategySchema,
|
|
SyncOperationKindSchema,
|
|
SyncOperationSchema,
|
|
VaultHistoryEntrySchema,
|
|
VaultItemSchema,
|
|
VaultSnapshotSchema,
|
|
VectorClockSchema,
|
|
} from "./schemas/schemas.js";
|
|
// Types
|
|
export type {
|
|
EncryptedSyncPayload,
|
|
MergeStrategy,
|
|
SyncOperation,
|
|
SyncOperationKind,
|
|
SyncResult,
|
|
SyncTransport,
|
|
VaultHistoryEntry,
|
|
VaultItem,
|
|
VaultSnapshot,
|
|
VectorClockRelation,
|
|
VectorClockState,
|
|
} from "./types/types.js";
|
|
// Vector clock
|
|
export {
|
|
compare,
|
|
empty,
|
|
happensBefore,
|
|
increment,
|
|
lwwTotalOrder,
|
|
merge,
|
|
} from "./vector-clock/vector-clock.js";
|