@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
18 lines (17 loc) • 789 B
TypeScript
import type { CollectionOverview, FieldOverview, Relation, SchemaOverview } from '@directus/types';
import { type RelationInfo } from './get-relation-info.js';
/**
* Allows to deep map the response from the ItemsService with collection, field and relation context for each entry.
* Bottom to Top depth first mapping of values.
*/
export declare function deepMapResponse(object: Record<string, any>, callback: (entry: [key: string | number, value: unknown], context: {
collection: CollectionOverview;
field: FieldOverview;
relation: Relation | null;
leaf: boolean;
relationType: RelationInfo['relationType'] | null;
}) => [key: string | number, value: unknown], context: {
schema: SchemaOverview;
collection: string;
relationInfo?: RelationInfo;
}): any;