import type { Constructable, StoreToken } from '@furystack/core'; import type { MongoClientOptions } from 'mongodb'; /** * Options accepted by {@link defineMongoDbStore}. */ export type DefineMongoDbStoreOptions = { name: string; model: Constructable; primaryKey: TPrimaryKey; /** MongoDB deployment URL (e.g. `mongodb://localhost:27017`) — also acts as the pool key. */ url: string; db: string; collection: string; options?: MongoClientOptions; }; /** * Mints a singleton {@link StoreToken} backed by a {@link MongodbStore}. * * Internally resolves the singleton {@link MongoClientFactory} so every store * declared against the same `url` shares one {@link MongoClient}. Declare the * token once at module scope — inline calls mint new identities and defeat * singleton caching. * * @example * ```ts * export const UserStore = defineMongoDbStore({ * name: 'my-app/UserStore', * model: User, * primaryKey: 'username', * url: 'mongodb://localhost:27017', * db: 'my-app', * collection: 'users', * }) * ``` */ export declare const defineMongoDbStore: (options: DefineMongoDbStoreOptions) => StoreToken; //# sourceMappingURL=define-mongodb-store.d.ts.map