@webiny/api-headless-cms-ddb
Version:
DynamoDB storage operations plugin for Headless CMS API.
27 lines (26 loc) • 846 B
TypeScript
import { CmsEntryListWhere } from "@webiny/api-headless-cms/types";
import { ValueFilterPlugin } from "@webiny/db-dynamodb/plugins/definitions/ValueFilterPlugin";
import { PluginsContainer } from "@webiny/plugins";
import { Field } from "./types";
interface Params {
plugins: PluginsContainer;
where: Partial<CmsEntryListWhere>;
fields: Record<string, Field>;
}
export type ExpressionCondition = "AND" | "OR";
export interface Expression {
expressions: Expression[];
filters: Filter[];
condition: ExpressionCondition;
}
export interface Filter {
field: Field;
path: string;
fieldPathId: string;
plugin: ValueFilterPlugin;
negate: boolean;
compareValue: any;
transformValue: <I = any, O = any>(value: I) => O;
}
export declare const createExpressions: (params: Params) => Expression;
export {};