UNPKG

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

Version:

DynamoDB and Elasticsearch storage operations plugin for Headless CMS API.

25 lines (24 loc) 592 B
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js"; class LongTextFieldIndexImpl { fieldType = "long-text"; toIndex({ rawValue }) { return { value: Array.isArray(rawValue) ? rawValue : rawValue || "" }; } fromIndex({ value }) { if (Array.isArray(value)) { return value; } return value || ""; } } export const LongTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({ implementation: LongTextFieldIndexImpl, dependencies: [] }); //# sourceMappingURL=LongTextFieldIndex.js.map