import { Filter, SortDirection } from "mongodb"; import { Callout } from "./features/index.js"; export declare enum MicroserviceName { workspace = "workspace", init = "init", query = "query", auth = "auth", security = "security", blueprint = "blueprint" } export declare enum Env { development = "development", production = "production" } export type TsApiKitOptions = { env: Env; }; export type ApiQueryOptions = { limit?: number; skip?: number; sort?: Array<{ field: string; direction: SortDirection; }>; }; export type ApiQueryRequest = { filter?: Filter; fields?: Array; options?: ApiQueryOptions; }; export type Constructable = { new (...args: any[]): {}; }; export type Constructor = new (...args: any[]) => T; export type HasApiName = { apiName: string; }; export type HasCallouts = { [Method in keyof Result as Method extends string ? `${Method}Callout` : never]: Result[Method] extends (...params: infer EntityParams) => infer EntityResult ? () => Callout : never; }; export type HasDBId = { _id: string; }; export type HasDescription = { description: string; }; export type HasEmail = { email: string; }; export type HasId = { id: string | number; }; export type HasLabel = { label: string; }; export type HasMode = { mode: keyof values; }; export interface HasNamespace { namespace: string; } export type HasOrder = { order: number; };