UNPKG

streamby-core

Version:

StreamBy middleware framework for media storage management

19 lines (18 loc) 1.17 kB
import { MongoClient, Document } from 'mongodb'; import { FieldDefinition } from '../../types'; export declare const ensureCollectionsExist: (client: MongoClient) => Promise<void>; export declare const createNoSQLExportCollection: (connection: MongoClient, projectId: string, exportName: string, fields: FieldDefinition[]) => Promise<{ collectionName: string; exportId: string; }>; export declare const createNoSQLRawExportCollection: (connection: MongoClient, projectId: string, exportName: string, method: string, jsonData?: any) => Promise<{ collectionName: string; exportId: string; }>; export declare const nosqlAdapter: { find: (connection: MongoClient, tableName: string, filter: any) => Promise<Document[]>; findOne: (connection: MongoClient, tableName: string, filter: any) => Promise<Document | null>; create: <T extends Document>(connection: MongoClient, tableName: string, data: T) => Promise<T>; update: (connection: MongoClient, tableName: string, filter: any, data: Document | Partial<Document>) => Promise<Document | null>; delete: (connection: MongoClient, tableName: string, filter: any) => Promise<number>; };