UNPKG

harperdb

Version:

HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.

41 lines (40 loc) 1.38 kB
import * as userSchema from '../security/user.ts'; import { type ServerOptions } from '../server/Server.ts'; import type { OperationFunctionName } from './serverHelpers/serverUtilities.ts'; import type { ParsedSqlObject } from '../sqlTranslator/index.js'; import { Resources } from '../resources/Resources.ts'; export { operationsServer as hdbServer }; export { operationsServer as start }; /** * Builds a HarperDB server. */ declare function operationsServer(options: ServerOptions & { resources?: Resources; }): Promise<void>; interface BaseOperationRequestBody { operation: OperationFunctionName; bypassAuth: boolean; hdb_user?: userSchema.User; hdbAuthHeader?: unknown; bypass_auth?: boolean; password?: string; payload?: string; sql?: string; parsedSqlObject?: ParsedSqlObject; [key: string]: unknown; } type SearchOperation = BaseOperationRequestBody; interface SearchOperationRequestBody { search_operation: SearchOperation; } export type OperationRequestBody = BaseOperationRequestBody & Partial<SearchOperationRequestBody>; export interface OperationRequest { body: OperationRequestBody; } export interface OperationResult { message?: any; } export declare function calculateRestHttpURL(httpPort: string | undefined, httpSecurePort: string | undefined, req: { hostname: string; protocol: string; }): string;