import type { BinaryMode } from './types'; import type { AggregateResult, Aggregation, Caller, CollectionSchema, DataSourceDecorator, Filter, PaginatedFilter, Projection, RecordData } from '@forestadmin/datasource-toolkit'; import { CollectionDecorator } from '@forestadmin/datasource-toolkit'; /** * As the transport layer between the forest admin agent and the frontend is JSON-API, binary data * is not supported. * * This decorator implement binary to string translation for binary fields and back. * Binary fields can either by represented in the frontend as: * - data-uris (so that the current file widgets can be used) * - hex strings (for primarykeys, foreign keys, etc...) */ export default class BinaryCollectionDecorator extends CollectionDecorator { private static readonly operatorsWithValueReplacement; dataSource: DataSourceDecorator; private useHexConversion; setBinaryMode(name: string, type: BinaryMode): void; private shouldUseHex; list(caller: Caller, filter: PaginatedFilter, projection: Projection): Promise; aggregate(caller: Caller, filter: Filter, aggregation: Aggregation, limit?: number): Promise; create(caller: Caller, data: RecordData[]): Promise; update(caller: Caller, filter: Filter, patch: RecordData): Promise; refineFilter(caller: Caller, filter?: PaginatedFilter): Promise; protected refineSchema(subSchema: CollectionSchema): CollectionSchema; private convertRecord; private convertConditionTreeLeaf; private convertValue; private convertValueHelper; private parseHex; private convertScalar; private replaceColumnType; private replaceValidation; } //# sourceMappingURL=collection.d.ts.map