burdy
Version:
Open Source Headless Platform
22 lines (21 loc) • 712 B
TypeScript
/**
* DB Actions are used as a communicator between CLI and the Burdy Project.
* Ensure that all types are parsable by JSON and primitives, as the communication is done via webpack.
*/
export declare type AbstractDbAction<T extends string, P extends {}> = {
type: T;
payload: P;
};
export declare type ImportAction = AbstractDbAction<'import', {
file: string;
force: boolean;
publish: boolean;
}>;
export declare type ExportAction = AbstractDbAction<'export', {
file: string;
force: boolean;
}>;
export declare type GenerateApiKeyAction = AbstractDbAction<'generateApiKey', {
name: string;
}>;
export declare type DbAction = ImportAction | ExportAction | GenerateApiKeyAction;