stackpress
Version:
Incept is a content management framework.
32 lines (31 loc) • 1.01 kB
TypeScript
import type { UnknownNest } from '@stackpress/lib/types';
import type Engine from '@stackpress/inquire/Engine';
import type Model from '../../schema/spec/Model.js';
export type Action = 'check' | 'create' | 'update';
export default function batch<M extends UnknownNest = UnknownNest>(model: Model, engine: Engine, rows: M[], seed?: string): Promise<{
code: number;
status: string;
results: any;
total: number;
} | {
code: number;
status: string;
results: any;
total?: number;
} | {
code: number;
status: string;
error: string;
results: Partial<Partial<import("@stackpress/lib/types").ResponseStatus & {
error: string;
errors?: import("@stackpress/lib/types").NestedObject<string | string[]>;
start?: number;
end?: number;
stack?: import("@stackpress/lib/types").Trace[];
} & {
results: Partial<M>;
total?: number;
}>>[];
total: number;
stack: import("@stackpress/lib/types").Trace[];
}>;