UNPKG

@aradox/multi-orm

Version:

Type-safe ORM with multi-datasource support, row-level security, and Prisma-like API for PostgreSQL, SQL Server, and HTTP APIs

25 lines 1.24 kB
import { Adapter, AdapterCapabilities, FindManyAdapterArgs, FindUniqueAdapterArgs, CreateAdapterArgs, UpdateAdapterArgs, DeleteAdapterArgs, CountAdapterArgs, OAuthHook } from '../types/adapter'; import { Model } from '../types/ir'; export declare class HttpApiAdapter implements Adapter { private client; private models; private oauthHook?; private cachedOAuth?; private storage; capabilities: AdapterCapabilities; constructor(baseUrl: string, models: Model | Model[], oauthHook?: OAuthHook); private getModel; findMany(modelName: string, args: FindManyAdapterArgs): Promise<any[]>; findManyBulkById(modelName: string, ids: string[]): Promise<any[]>; findUnique(modelName: string, args: FindUniqueAdapterArgs): Promise<any | null>; create(modelName: string, args: CreateAdapterArgs): Promise<any>; update(modelName: string, args: UpdateAdapterArgs): Promise<any>; delete(modelName: string, args: DeleteAdapterArgs): Promise<any>; count(modelName: string, args: CountAdapterArgs): Promise<number>; private buildRequest; private resolveMapping; private extractFromResponse; private getOAuthHeaders; private executeWithRetry; } //# sourceMappingURL=http.d.ts.map