UNPKG

@webiny/api-headless-cms-ddb-es

Version:

DynamoDB and Elasticsearch storage operations plugin for Headless CMS API.

35 lines (34 loc) 959 B
import type { OpenSearchQueryBuilderOperatorPlugin } from "@webiny/api-opensearch"; import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js"; /** * ./fields */ type ModelFieldPath = string | ((value: string) => string); export type FieldType = "text" | "date" | "datetime" | "time" | "number" | "boolean" | string; export interface ModelFieldParent { fieldId: string; storageId: string; type: FieldType; } export interface ModelField { unmappedType?: string; keyword?: boolean; searchable: boolean; sortable: boolean; type: FieldType; systemField?: boolean; field: CmsModelField; path?: ModelFieldPath; fullTextSearch?: boolean; parents: ModelFieldParent[]; } export interface ModelFields { [fieldId: string]: ModelField; } /** * ./plugins/operator */ export interface OpenSearchQueryBuilderOperatorPlugins { [key: string]: OpenSearchQueryBuilderOperatorPlugin; } export {};