CoolFace
Apppublic

opusdev/vector-similarity-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
index.ts640 linesDownload Raw Back to src
1import { Admin } from './admin';2import { OrderedBulkOperation } from './bulk/ordered';3import { UnorderedBulkOperation } from './bulk/unordered';4import { ChangeStream } from './change_stream';5import { Collection } from './collection';6import { AbstractCursor } from './cursor/abstract_cursor';7import { AggregationCursor } from './cursor/aggregation_cursor';8import { FindCursor } from './cursor/find_cursor';9import { ListCollectionsCursor } from './cursor/list_collections_cursor';10import { ListIndexesCursor } from './cursor/list_indexes_cursor';11import type { RunCommandCursor } from './cursor/run_command_cursor';12import { Db } from './db';13import { GridFSBucket } from './gridfs';14import { GridFSBucketReadStream } from './gridfs/download';15import { GridFSBucketWriteStream } from './gridfs/upload';16import { MongoClient } from './mongo_client';17import { CancellationToken } from './mongo_types';18import { ClientSession } from './sessions';19 20/** @public */21export { BSON } from './bson';22export {23  Binary,24  BSONRegExp,25  BSONSymbol,26  BSONType,27  Code,28  DBRef,29  Decimal128,30  Double,31  Int32,32  Long,33  MaxKey,34  MinKey,35  ObjectId,36  Timestamp,37  UUID38} from './bson';39export {40  type AnyBulkWriteOperation,41  type BulkWriteOptions,42  MongoBulkWriteError43} from './bulk/common';44export { ClientEncryption } from './client-side-encryption/client_encryption';45export { ChangeStreamCursor } from './cursor/change_stream_cursor';46export { ExplainableCursor } from './cursor/explainable_cursor';47export {48  MongoAPIError,49  MongoAWSError,50  MongoAzureError,51  MongoBatchReExecutionError,52  MongoChangeStreamError,53  MongoClientBulkWriteCursorError,54  MongoClientBulkWriteError,55  MongoClientBulkWriteExecutionError,56  MongoClientClosedError,57  MongoCompatibilityError,58  MongoCursorExhaustedError,59  MongoCursorInUseError,60  MongoDecompressionError,61  MongoDriverError,62  MongoError,63  MongoExpiredSessionError,64  MongoGCPError,65  MongoGridFSChunkError,66  MongoGridFSStreamError,67  MongoInvalidArgumentError,68  MongoKerberosError,69  MongoMissingCredentialsError,70  MongoMissingDependencyError,71  MongoNetworkError,72  MongoNetworkTimeoutError,73  MongoNotConnectedError,74  MongoOIDCError,75  MongoOperationTimeoutError,76  MongoParseError,77  MongoRuntimeError,78  MongoServerClosedError,79  MongoServerError,80  MongoServerSelectionError,81  MongoStalePrimaryError,82  MongoSystemError,83  MongoTailableCursorError,84  MongoTopologyClosedError,85  MongoTransactionError,86  MongoUnexpectedServerResponseError,87  MongoWriteConcernError,88  WriteConcernErrorResult89} from './error';90export { configureExplicitResourceManagement } from './resource_management';91export {92  AbstractCursor,93  // Actual driver classes exported94  Admin,95  AggregationCursor,96  CancellationToken,97  ChangeStream,98  ClientSession,99  Collection,100  Db,101  FindCursor,102  GridFSBucket,103  GridFSBucketReadStream,104  GridFSBucketWriteStream,105  ListCollectionsCursor,106  ListIndexesCursor,107  MongoClient,108  OrderedBulkOperation,109  RunCommandCursor,110  UnorderedBulkOperation111};112 113// enums114export { BatchType } from './bulk/common';115export { AutoEncryptionLoggerLevel } from './client-side-encryption/auto_encrypter';116export { GSSAPICanonicalizationValue } from './cmap/auth/gssapi';117export { AuthMechanism } from './cmap/auth/providers';118export { Compressor } from './cmap/wire_protocol/compression';119export { CURSOR_FLAGS, CursorTimeoutMode } from './cursor/abstract_cursor';120export { MongoErrorLabel } from './error';121export { ExplainVerbosity } from './explain';122export { ServerApiVersion } from './mongo_client';123export { MongoLoggableComponent, SeverityLevel } from './mongo_logger';124export { ReturnDocument } from './operations/find_and_modify';125export { ProfilingLevel } from './operations/set_profiling_level';126export { ReadConcernLevel } from './read_concern';127export { ReadPreferenceMode } from './read_preference';128export { ServerType, TopologyType } from './sdam/common';129 130// Helper classes131export type { AWSCredentialProvider } from './cmap/auth/aws_temporary_credentials';132export type { AWSCredentials } from './deps';133export { ReadConcern } from './read_concern';134export { ReadPreference } from './read_preference';135export { WriteConcern } from './write_concern';136// events137export {138  CommandFailedEvent,139  CommandStartedEvent,140  CommandSucceededEvent141} from './cmap/command_monitoring_events';142export {143  ConnectionCheckedInEvent,144  ConnectionCheckedOutEvent,145  ConnectionCheckOutFailedEvent,146  ConnectionCheckOutStartedEvent,147  ConnectionClosedEvent,148  ConnectionCreatedEvent,149  ConnectionPoolClearedEvent,150  ConnectionPoolClosedEvent,151  ConnectionPoolCreatedEvent,152  ConnectionPoolMonitoringEvent,153  ConnectionPoolReadyEvent,154  ConnectionReadyEvent155} from './cmap/connection_pool_events';156export {157  ServerClosedEvent,158  ServerDescriptionChangedEvent,159  ServerHeartbeatFailedEvent,160  ServerHeartbeatStartedEvent,161  ServerHeartbeatSucceededEvent,162  ServerOpeningEvent,163  TopologyClosedEvent,164  TopologyDescriptionChangedEvent,165  TopologyOpeningEvent166} from './sdam/events';167export {168  ServerSelectionEvent,169  ServerSelectionFailedEvent,170  ServerSelectionStartedEvent,171  ServerSelectionSucceededEvent,172  WaitingForSuitableServerEvent173} from './sdam/server_selection_events';174export { SrvPollingEvent } from './sdam/srv_polling';175 176// type only exports below, these are removed from emitted JS177export type { AdminPrivate } from './admin';178export type { BSONElement, BSONSerializeOptions, Document } from './bson';179export type { deserialize, serialize } from './bson';180export type {181  BulkResult,182  BulkWriteOperationError,183  BulkWriteResult,184  DeleteManyModel,185  DeleteOneModel,186  InsertOneModel,187  ReplaceOneModel,188  UpdateManyModel,189  UpdateOneModel,190  WriteConcernError,191  WriteError192} from './bulk/common';193export type {194  Batch,195  BulkOperationBase,196  BulkOperationPrivate,197  FindOperators,198  WriteConcernErrorData199} from './bulk/common';200export type {201  ChangeStreamCollModDocument,202  ChangeStreamCreateDocument,203  ChangeStreamCreateIndexDocument,204  ChangeStreamDeleteDocument,205  ChangeStreamDocument,206  ChangeStreamDocumentCollectionUUID,207  ChangeStreamDocumentCommon,208  ChangeStreamDocumentKey,209  ChangeStreamDocumentOperationDescription,210  ChangeStreamDocumentWallTime,211  ChangeStreamDropDatabaseDocument,212  ChangeStreamDropDocument,213  ChangeStreamDropIndexDocument,214  ChangeStreamEvents,215  ChangeStreamInsertDocument,216  ChangeStreamInvalidateDocument,217  ChangeStreamNameSpace,218  ChangeStreamOptions,219  ChangeStreamRefineCollectionShardKeyDocument,220  ChangeStreamRenameDocument,221  ChangeStreamReplaceDocument,222  ChangeStreamReshardCollectionDocument,223  ChangeStreamShardCollectionDocument,224  ChangeStreamSplitEvent,225  ChangeStreamUpdateDocument,226  OperationTime,227  ResumeOptions,228  ResumeToken,229  UpdateDescription230} from './change_stream';231export type { AutoEncrypter } from './client-side-encryption/auto_encrypter';232export type { AutoEncryptionOptions } from './client-side-encryption/auto_encrypter';233export type { AutoEncryptionExtraOptions } from './client-side-encryption/auto_encrypter';234export type {235  AWSEncryptionKeyOptions,236  AzureEncryptionKeyOptions,237  ClientEncryptionCreateDataKeyProviderOptions,238  ClientEncryptionEncryptOptions,239  ClientEncryptionOptions,240  ClientEncryptionRewrapManyDataKeyProviderOptions,241  ClientEncryptionRewrapManyDataKeyResult,242  DataKey,243  GCPEncryptionKeyOptions,244  KMIPEncryptionKeyOptions,245  RangeOptions,246  TextQueryOptions247} from './client-side-encryption/client_encryption';248export {249  MongoCryptAzureKMSRequestError,250  MongoCryptCreateDataKeyError,251  MongoCryptCreateEncryptedCollectionError,252  MongoCryptError,253  MongoCryptInvalidArgumentError,254  MongoCryptKMSRequestNetworkTimeoutError255} from './client-side-encryption/errors';256export type { MongocryptdManager } from './client-side-encryption/mongocryptd_manager';257export type {258  AWSKMSProviderConfiguration,259  AzureKMSProviderConfiguration,260  ClientEncryptionDataKeyProvider,261  CredentialProviders,262  GCPKMSProviderConfiguration,263  KMIPKMSProviderConfiguration,264  KMSProviders,265  LocalKMSProviderConfiguration266} from './client-side-encryption/providers/index';267export type {268  ClientEncryptionSocketOptions,269  ClientEncryptionTlsOptions,270  CSFLEKMSTlsOptions,271  StateMachineExecutable272} from './client-side-encryption/state_machine';273export type { AuthContext, AuthProvider } from './cmap/auth/auth_provider';274export type {275  AuthMechanismProperties,276  MongoCredentials,277  MongoCredentialsOptions278} from './cmap/auth/mongo_credentials';279export type {280  IdPInfo,281  IdPServerResponse,282  OIDCCallbackFunction,283  OIDCCallbackParams,284  OIDCResponse285} from './cmap/auth/mongodb_oidc';286export type { Workflow } from './cmap/auth/mongodb_oidc';287export type { TokenCache } from './cmap/auth/mongodb_oidc/token_cache';288export type {289  MessageHeader,290  OpCompressedRequest,291  OpCompressesRequestOptions,292  OpMsgOptions,293  OpMsgRequest,294  OpMsgResponse,295  OpQueryOptions,296  OpQueryRequest,297  OpReply,298  WriteProtocolMessageType299} from './cmap/commands';300export type { HandshakeDocument } from './cmap/connect';301export type { LEGAL_TCP_SOCKET_OPTIONS, LEGAL_TLS_SOCKET_OPTIONS, Stream } from './cmap/connect';302export type {303  CommandOptions,304  Connection,305  ConnectionEvents,306  ConnectionOptions,307  ProxyOptions308} from './cmap/connection';309export type {310  CloseOptions,311  ConnectionPool,312  ConnectionPoolEvents,313  ConnectionPoolOptions,314  PoolState,315  WaitQueueMember,316  WithConnectionCallback317} from './cmap/connection_pool';318export type { ClientMetadata, ClientMetadataOptions } from './cmap/handshake/client_metadata';319export type { ConnectionPoolMetrics } from './cmap/metrics';320export type { StreamDescription, StreamDescriptionOptions } from './cmap/stream_description';321export type { CompressorName } from './cmap/wire_protocol/compression';322export type {323  JSTypeOf,324  OnDemandDocument,325  OnDemandDocumentDeserializeOptions326} from './cmap/wire_protocol/on_demand/document';327export type {328  CursorResponse,329  MongoDBResponse,330  MongoDBResponseConstructor331} from './cmap/wire_protocol/responses';332export type {333  CollectionOptions,334  CollectionPrivate,335  CountDocumentsOptions,336  ModifyResult337} from './collection';338export type {339  COMMAND_FAILED,340  COMMAND_STARTED,341  COMMAND_SUCCEEDED,342  CONNECTION_CHECK_OUT_FAILED,343  CONNECTION_CHECK_OUT_STARTED,344  CONNECTION_CHECKED_IN,345  CONNECTION_CHECKED_OUT,346  CONNECTION_CLOSED,347  CONNECTION_CREATED,348  CONNECTION_POOL_CLEARED,349  CONNECTION_POOL_CLOSED,350  CONNECTION_POOL_CREATED,351  CONNECTION_POOL_READY,352  CONNECTION_READY,353  MONGO_CLIENT_EVENTS,354  SERVER_CLOSED,355  SERVER_DESCRIPTION_CHANGED,356  SERVER_HEARTBEAT_FAILED,357  SERVER_HEARTBEAT_STARTED,358  SERVER_HEARTBEAT_SUCCEEDED,359  SERVER_OPENING,360  SERVER_SELECTION_FAILED,361  SERVER_SELECTION_STARTED,362  SERVER_SELECTION_SUCCEEDED,363  TOPOLOGY_CLOSED,364  TOPOLOGY_DESCRIPTION_CHANGED,365  TOPOLOGY_OPENING,366  WAITING_FOR_SUITABLE_SERVER367} from './constants';368export type {369  AbstractCursorEvents,370  AbstractCursorOptions,371  CursorFlag,372  CursorStreamOptions373} from './cursor/abstract_cursor';374export type {375  CursorTimeoutContext,376  InitialCursorResponse,377  InternalAbstractCursorOptions378} from './cursor/abstract_cursor';379export type { AggregationCursorOptions } from './cursor/aggregation_cursor';380export type { ChangeStreamCursorOptions } from './cursor/change_stream_cursor';381export type {382  ListSearchIndexesCursor,383  ListSearchIndexesOptions384} from './cursor/list_search_indexes_cursor';385export type { RunCursorCommandOptions } from './cursor/run_command_cursor';386export type { DbOptions, DbPrivate } from './db';387export type { Encrypter, EncrypterOptions } from './encrypter';388export type { AnyError, ErrorDescription, MongoNetworkErrorOptions } from './error';389export type {390  Explain,391  ExplainCommandOptions,392  ExplainOptions,393  ExplainVerbosityLike394} from './explain';395export type {396  GridFSBucketReadStreamOptions,397  GridFSBucketReadStreamOptionsWithRevision,398  GridFSBucketReadStreamPrivate,399  GridFSFile400} from './gridfs/download';401export type { GridFSBucketEvents, GridFSBucketOptions, GridFSBucketPrivate } from './gridfs/index';402export type { GridFSBucketWriteStreamOptions, GridFSChunk } from './gridfs/upload';403export type {404  Auth,405  DriverInfo,406  MongoClientEvents,407  MongoClientOptions,408  MongoClientPrivate,409  MongoOptions,410  PkFactory,411  ServerApi,412  SupportedNodeConnectionOptions,413  SupportedSocketOptions,414  SupportedTLSConnectionOptions,415  SupportedTLSSocketOptions,416  WithSessionCallback417} from './mongo_client';418export { MongoClientAuthProviders } from './mongo_client_auth_providers';419export type {420  Log,421  LogComponentSeveritiesClientOptions,422  LogConvertible,423  Loggable,424  LoggableCommandFailedEvent,425  LoggableCommandSucceededEvent,426  LoggableEvent,427  LoggableServerHeartbeatFailedEvent,428  LoggableServerHeartbeatStartedEvent,429  LoggableServerHeartbeatSucceededEvent,430  MongoDBLogWritable,431  MongoLogger,432  MongoLoggerEnvOptions,433  MongoLoggerMongoClientOptions,434  MongoLoggerOptions435} from './mongo_logger';436export type {437  Abortable,438  CommonEvents,439  EventsDescription,440  GenericListener,441  TypedEventEmitter442} from './mongo_types';443export type {444  AcceptedFields,445  AddToSetOperators,446  AlternativeType,447  ArrayElement,448  ArrayOperator,449  BitwiseFilter,450  BSONTypeAlias,451  Condition,452  EnhancedOmit,453  Filter,454  FilterOperations,455  FilterOperators,456  Flatten,457  InferIdType,458  IntegerType,459  IsAny,460  Join,461  KeysOfAType,462  KeysOfOtherType,463  MatchKeysAndValues,464  NestedPaths,465  NestedPathsOfType,466  NonObjectIdLikeDocument,467  NotAcceptedFields,468  NumericType,469  OneOrMore,470  OnlyFieldsOfType,471  OptionalId,472  OptionalUnlessRequiredId,473  PropertyType,474  PullAllOperator,475  PullOperator,476  PushOperator,477  RegExpOrString,478  RootFilterOperators,479  SchemaMember,480  SetFields,481  StrictFilter,482  StrictMatchKeysAndValues,483  StrictUpdateFilter,484  UpdateFilter,485  WithId,486  WithoutId487} from './mongo_types';488export type {489  AggregateOperation,490  AggregateOptions,491  DB_AGGREGATE_COLLECTION492} from './operations/aggregate';493export type {494  AnyClientBulkWriteModel,495  ClientBulkWriteError,496  ClientBulkWriteModel,497  ClientBulkWriteOptions,498  ClientBulkWriteResult,499  ClientDeleteManyModel,500  ClientDeleteOneModel,501  ClientDeleteResult,502  ClientInsertOneModel,503  ClientInsertOneResult,504  ClientReplaceOneModel,505  ClientUpdateManyModel,506  ClientUpdateOneModel,507  ClientUpdateResult,508  ClientWriteModel509} from './operations/client_bulk_write/common';510export type {511  CollationOptions,512  CommandOperation,513  CommandOperationOptions,514  OperationParent515} from './operations/command';516export type { CountOptions } from './operations/count';517export type {518  ClusteredCollectionOptions,519  CreateCollectionOptions,520  TimeSeriesCollectionOptions521} from './operations/create_collection';522export type { DeleteOptions, DeleteResult, DeleteStatement } from './operations/delete';523export type { DistinctOptions } from './operations/distinct';524export type { DropCollectionOptions, DropDatabaseOptions } from './operations/drop';525export type { EstimatedDocumentCountOptions } from './operations/estimated_document_count';526export type { FindOneOptions, FindOptions } from './operations/find';527export type {528  FindOneAndDeleteOptions,529  FindOneAndReplaceOptions,530  FindOneAndUpdateOptions531} from './operations/find_and_modify';532export type { IndexInformationOptions } from './operations/indexes';533export type {534  CreateIndexesOptions,535  DropIndexesOptions,536  IndexDescription,537  IndexDescriptionCompact,538  IndexDescriptionInfo,539  IndexDirection,540  IndexSpecification,541  ListIndexesOptions542} from './operations/indexes';543export type { InsertManyResult, InsertOneOptions, InsertOneResult } from './operations/insert';544export type { CollectionInfo, ListCollectionsOptions } from './operations/list_collections';545export type { ListDatabasesOptions, ListDatabasesResult } from './operations/list_databases';546export type { AbstractOperation, Hint, OperationOptions } from './operations/operation';547export type { ProfilingLevelOptions } from './operations/profiling_level';548export type { RemoveUserOptions } from './operations/remove_user';549export type { RenameOptions } from './operations/rename';550export type { RunCommandOptions } from './operations/run_command';551export type { SearchIndexDescription } from './operations/search_indexes/create';552export type { SetProfilingLevelOptions } from './operations/set_profiling_level';553export type { DbStatsOptions } from './operations/stats';554export type {555  ReplaceOptions,556  UpdateOptions,557  UpdateResult,558  UpdateStatement559} from './operations/update';560export type { ValidateCollectionOptions } from './operations/validate_collection';561export type { ReadConcernLike } from './read_concern';562export type {563  HedgeOptions,564  ReadPreferenceFromOptions,565  ReadPreferenceLike,566  ReadPreferenceLikeOptions,567  ReadPreferenceOptions568} from './read_preference';569export type { AsyncDisposable } from './resource_management';570export type { ClusterTime } from './sdam/common';571export type {572  Monitor,573  MonitorEvents,574  MonitorInterval,575  MonitorIntervalOptions,576  MonitorOptions,577  MonitorPrivate,578  RTTPinger,579  RTTPingerOptions,580  RTTSampler,581  ServerMonitoringMode582} from './sdam/monitor';583export type {584  Server,585  ServerCommandOptions,586  ServerEvents,587  ServerOptions,588  ServerPrivate589} from './sdam/server';590export type {591  ServerDescription,592  ServerDescriptionOptions,593  TagSet,594  TopologyVersion595} from './sdam/server_description';596export type { ServerSelector } from './sdam/server_selection';597export type { SrvPoller, SrvPollerEvents, SrvPollerOptions } from './sdam/srv_polling';598export type {599  ConnectOptions,600  SelectServerOptions,601  ServerCapabilities,602  ServerSelectionCallback,603  ServerSelectionRequest,604  Topology,605  TopologyEvents,606  TopologyOptions,607  TopologyPrivate608} from './sdam/topology';609export type { TopologyDescription, TopologyDescriptionOptions } from './sdam/topology_description';610export type {611  ClientSessionEvents,612  ClientSessionOptions,613  EndSessionOptions,614  ServerSession,615  ServerSessionId,616  ServerSessionPool,617  WithTransactionCallback618} from './sessions';619export type { Sort, SortDirection, SortDirectionForCmd, SortForCmd } from './sort';620export type {621  CSOTTimeoutContext,622  CSOTTimeoutContextOptions,623  LegacyTimeoutContext,624  LegacyTimeoutContextOptions,625  Timeout,626  TimeoutContext,627  TimeoutContextOptions628} from './timeout';629export type { Transaction, TransactionOptions, TxnState } from './transactions';630export type {631  BufferPool,632  Callback,633  EventEmitterWithState,634  HostAddress,635  List,636  MongoDBCollectionNamespace,637  MongoDBNamespace638} from './utils';639export type { W, WriteConcernOptions, WriteConcernSettings } from './write_concern';640