/** * Main entry point for the proseql library. * * Exports the Effect-based API: typed errors, Schema validation, * Stream query pipeline, Ref state, Service/Layer persistence. */ export type { DocumentGraphMetadata, EffectCollection, EffectDatabase, EffectDatabaseOptions, EffectDatabasePersistenceConfig, EffectDatabaseWithPersistence, RunnableEffect, RunnableStream, } from "./factories/database-effect.js"; export { createEffectDatabase, createPersistentEffectDatabase, } from "./factories/database-effect.js"; export type { CrudMethods } from "./factories/crud-factory.js"; export type { CrudMethodsWithRelationships } from "./factories/crud-factory-with-relationships.js"; export type { CrudError } from "./errors/crud-errors.js"; export { ConcurrencyError, DuplicateKeyError, ForeignKeyError, HookError, NotFoundError, OperationError, TransactionError, UniqueConstraintError, ValidationError, } from "./errors/crud-errors.js"; export type { DatabaseError } from "./errors/index.js"; export type { MigrationErrors } from "./errors/migration-errors.js"; export { MigrationError } from "./errors/migration-errors.js"; export type { QueryError } from "./errors/query-errors.js"; export { CollectionNotFoundError, DanglingReferenceError, PopulationError, } from "./errors/query-errors.js"; export type { SourceError, SourceRecordOrigin, } from "./errors/source-errors.js"; export { DocumentGraphSourceError, DuplicatePhysicalFileError, DuplicateRecordError, InvalidDocumentSourceError, SourceConfigError, UnknownCollectionError, } from "./errors/source-errors.js"; export type { PersistenceError } from "./errors/storage-errors.js"; export { SerializationError, StorageError, UnsupportedFormatError, } from "./errors/storage-errors.js"; export { Schema } from "effect"; export type { EntitySchema, InferEncoded, InferEntity, } from "./types/schema-types.js"; export { dryRunMigrations } from "./migrations/migration-runner.js"; export type { DryRunCollectionResult, DryRunMigration, DryRunResult, DryRunStatus, Migration, } from "./migrations/migration-types.js"; export { makeProseQLTag } from "./context-tag.js"; export type { DocumentGraphDiagnostic, DocumentGraphDiagnosticAction, DocumentGraphRecordContribution, DocumentGraphRecordProvenance, LoadedDocumentGraph, } from "./storage/document-graph-source.js"; export { loadDocumentGraphSources } from "./storage/document-graph-source.js"; export type { LoadedDocumentSources } from "./storage/document-source.js"; export { loadDocumentSources, saveDocumentSource, } from "./storage/document-source.js"; export type { OriginIndex, RecordOrigin } from "./storage/origin-index.js"; export { getOrigin } from "./storage/origin-index.js"; export type { DatabaseSourceConfig, DocumentGraphFragmentErrorPolicy, DocumentGraphRootConfig, DocumentGraphSourceConfig, DocumentGraphTransform, DocumentGraphTransformContext, DocumentSourceConfig, NormalizedDatabaseSourceConfig, NormalizedDocumentGraphRootConfig, NormalizedDocumentGraphSourceConfig, NormalizedDocumentSourceConfig, NormalizedSourceConfig, } from "./storage/source-config.js"; export { normalizeSourceConfig } from "./storage/source-config.js"; export type { CollectionConfig, ConfiguredCollections, DatabaseConfig, DatabaseReactiveOptions, DerivedIdConfig, LegacyDatabaseConfig, ReactiveConfig, SourceOrientedDatabaseConfig, } from "./types/database-config-types.js"; export { getCollectionConfigs, isCollectionDirectoryMode, isSourceOrientedDatabaseConfig, } from "./types/database-config-types.js"; export type { ApplyPopulateObject, ApplySelectAndPopulate, ApplySelectConfig, DatasetFor, GenerateDatabase, GenerateDatabaseWithPersistence, PopulateConfig, QueryConfig, QueryReturnType, RelationshipDef, ResolveRelationships, RuntimeEntityFromCollection, SelectConfig, SmartCollection, SortConfig, WhereClause, } from "./types/types.js"; export type { AggregateConfig, AggregateResult, GroupedAggregateConfig, GroupedAggregateResult, GroupResult, InferAggregateResult, ScalarAggregateConfig, } from "./types/aggregate-types.js"; export { isGroupedAggregateConfig } from "./types/aggregate-types.js"; export type { ChangeEvent, WatchByIdMethod, WatchConfig, WatchMethod, } from "./types/reactive-types.js"; export { createChangeEvent, reloadEvent } from "./reactive/change-event.js"; export { createChangePubSub } from "./reactive/change-pubsub.js"; export type { EvaluateQueryConfig } from "./reactive/evaluate-query.js"; export { evaluateQuery } from "./reactive/evaluate-query.js"; export type { WatchQueryConfig } from "./reactive/watch.js"; export { watch } from "./reactive/watch.js"; export { watchById } from "./reactive/watch-by-id.js"; export type { CursorConfig, CursorPageInfo, CursorPageResult, RunnableCursorPage, } from "./types/cursor-types.js"; export type { CollectionIndexes, IndexMap, IndexRef, NormalizedIndex, } from "./types/index-types.js"; export type { AfterCreateContext, AfterCreateHook, AfterDeleteContext, AfterDeleteHook, AfterUpdateContext, AfterUpdateHook, BeforeCreateContext, BeforeCreateHook, BeforeDeleteContext, BeforeDeleteHook, BeforeUpdateContext, BeforeUpdateHook, HooksConfig, OnChangeContext, OnChangeCreateContext, OnChangeDeleteContext, OnChangeHook, OnChangeUpdateContext, } from "./types/hook-types.js"; export type { TransactionContext } from "./types/crud-types.js"; export type { CreateInput, CreateManyOptions, CreateManyResult, DeleteManyResult, MinimalEntity, UpdateManyResult, UpdateWithOperators, UpsertInput, UpsertManyResult, UpsertResult, } from "./types/crud-types.js"; export { $transaction, createTransaction } from "./transactions/transaction.js"; export type { CreateWithRelationshipsInput, DeleteWithRelationshipsOptions, DeleteWithRelationshipsResult, UpdateWithRelationshipsInput, } from "./types/crud-relationship-types.js"; export { resolveWithIndex } from "./indexes/index-lookup.js"; export { addManyToIndex, addToIndex, buildIndexes, normalizeIndexes, removeFromIndex, removeManyFromIndex, updateInIndex, } from "./indexes/index-manager.js"; export { encodeEntity, validateEntity } from "./validators/schema-validator.js"; export { createCollectionState } from "./state/collection-state.js"; export { getAllEntities, getEntity, getEntityOrFail, removeEntity, setEntity, updateEntity, } from "./state/state-operations.js"; export { filterData } from "./operations/query/filter.js"; export { applyFilter } from "./operations/query/filter-stream.js"; export { applyPagination } from "./operations/query/paginate-stream.js"; export { applyObjectSelection, applySelectionSafe, applySelectionToArray, createFieldSelector, mergeObjectFieldSelections, } from "./operations/query/select.js"; export { applySelect } from "./operations/query/select-stream.js"; export { applySort } from "./operations/query/sort-stream.js"; export { applyPopulate } from "./operations/relationships/populate-stream.js"; export { InMemoryStorageLayer, makeInMemoryStorageLayer, } from "./storage/in-memory-adapter-layer.js"; export type { DebouncedWriter, DirectoryWatcherConfig, FileWatcher, FileWatcherConfig, LoadCollectionConfig, LoadDataFromDirectoryOptions, LoadDataOptions, SaveCollectionConfig, SaveDataOptions, StreamCollectionEntry, } from "./storage/persistence-effect.js"; export { createDebouncedWriter, createDirectoryWatcher, createFileWatcher, createFileWatchers, loadCollectionsFromFile, loadData, loadDataFromDirectory, removeEntityFromDirectory, saveCollectionsToFile, saveData, saveEntityToDirectory, streamCollectionFromDirectory, } from "./storage/persistence-effect.js"; export type { ReadDocumentOptions } from "./storage/read-document.js"; export { readDocument } from "./storage/read-document.js"; export type { StorageAdapterShape, StorageReadWriteError, } from "./storage/storage-service.js"; export { StorageAdapter as StorageAdapterService } from "./storage/storage-service.js"; export { hjsonCodec } from "./serializers/codecs/hjson.js"; export { jsonCodec } from "./serializers/codecs/json.js"; export { json5Codec } from "./serializers/codecs/json5.js"; export { jsoncCodec } from "./serializers/codecs/jsonc.js"; export type { ParsedLine } from "./serializers/codecs/jsonl.js"; export { jsonlCodec, jsonlDecodeLines } from "./serializers/codecs/jsonl.js"; export type { CompiledTemplate, ProseCodecOptions, ProseSegment, } from "./serializers/codecs/prose.js"; export { proseCodec } from "./serializers/codecs/prose.js"; export { tomlCodec } from "./serializers/codecs/toml.js"; export { toonCodec } from "./serializers/codecs/toon.js"; export { yamlCodec } from "./serializers/codecs/yaml.js"; export type { FormatCodec, FormatOptions, } from "./serializers/format-codec.js"; export { makeSerializerLayer, mergeSerializerWithPluginCodecs, } from "./serializers/format-codec.js"; export { inferCodecsFromConfig } from "./serializers/infer-codecs.js"; export { AllTextFormatsLayer, DefaultSerializerLayer, } from "./serializers/presets.js"; export type { SerializerRegistryShape } from "./serializers/serializer-service.js"; export { getSupportedExtensions, SerializerRegistry as SerializerRegistryService, } from "./serializers/serializer-service.js"; export { arrayToMap, arrayToObject, extractCollectionsForFile, extractCollectionsFromMaps, getConfigFilePaths, groupByFile, isCollectionPersistent, mapToArray, mapToObject, mergeFileDataIntoDataset, mergeFileDataIntoMaps, objectToArray, objectToMap, } from "./storage/transforms.js"; export { getFileExtension } from "./utils/path.js"; export { hasSelectedComputedFields, resolveComputedFields, resolveComputedStream, resolveComputedStreamWithLazySkip, stripComputedFields, } from "./operations/query/resolve-computed.js"; export type { ComputedFieldDefinition, ComputedFieldKeys, ComputedFieldsConfig, InferComputedFields, WithComputed, } from "./types/computed-types.js"; export { addToSearchIndex, buildSearchIndex, lookupSearchIndex, removeFromSearchIndex, resolveWithSearchIndex, updateInSearchIndex, } from "./indexes/search-index.js"; export type { SearchConfig, SearchIndexMap, SearchScore, } from "./types/search-types.js"; export { SEARCH_SCORE_KEY, STOP_WORDS } from "./types/search-types.js"; export type { IdGeneratorConfig } from "./utils/id-generator.js"; export { CollectionIdGenerators, compareIds, createIdGenerator, defaultIdConfig, extractTimestamp, extractType, generateId, generateNanoId, generatePrefixedId, generateTimestampId, generateTypedId, generateULID, generateUUID, isValidId, isValidIdFormat, } from "./utils/id-generator.js"; export { PluginError } from "./errors/plugin-errors.js"; export type { CustomIdGenerator, CustomOperator, GlobalHooksConfig, PluginRegistry, ProseQLPlugin, } from "./plugins/plugin-types.js"; export { validateDependencies, validateOperatorConflicts, validatePlugin, } from "./plugins/plugin-validation.js"; //# sourceMappingURL=index.d.ts.map