UNPKG

@forestadmin/datasource-toolkit

Version:
31 lines 1.97 kB
import { ActionFormElement, ActionResult } from '../interfaces/action'; import { Caller } from '../interfaces/caller'; import { Chart } from '../interfaces/chart'; import { Collection, DataSource, GetFormMetas } from '../interfaces/collection'; import Aggregation, { AggregateResult } from '../interfaces/query/aggregation'; import PaginatedFilter from '../interfaces/query/filter/paginated'; import Filter from '../interfaces/query/filter/unpaginated'; import Projection from '../interfaces/query/projection'; import { CompositeId, RecordData } from '../interfaces/record'; import { CollectionSchema } from '../interfaces/schema'; export default class CollectionDecorator implements Collection { readonly dataSource: DataSource; protected childCollection: Collection; private lastSchema; get nativeDriver(): unknown; get schema(): CollectionSchema; get name(): string; constructor(childCollection: Collection, dataSource: DataSource); execute(caller: Caller, name: string, data: RecordData, filter?: Filter): Promise<ActionResult>; getForm(caller: Caller, name: string, data?: RecordData, filter?: Filter, metas?: GetFormMetas): Promise<ActionFormElement[]>; create(caller: Caller, data: RecordData[]): Promise<RecordData[]>; list(caller: Caller, filter: PaginatedFilter, projection: Projection): Promise<RecordData[]>; update(caller: Caller, filter: Filter, patch: RecordData): Promise<void>; delete(caller: Caller, filter: Filter): Promise<void>; aggregate(caller: Caller, filter: Filter, aggregation: Aggregation, limit?: number): Promise<AggregateResult[]>; renderChart(caller: Caller, name: string, recordId: CompositeId): Promise<Chart>; protected markSchemaAsDirty(): void; protected refineFilter(caller: Caller, filter?: PaginatedFilter): Promise<PaginatedFilter>; protected refineSchema(subSchema: CollectionSchema): CollectionSchema; } //# sourceMappingURL=collection-decorator.d.ts.map