import { EntityDict, OperateOption, SelectOption, OperationResult, AggregationResult } from "oak-domain/lib/types"; import { AmapInstance } from "oak-external-sdk"; import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain'; import { AsyncContext } from "oak-domain/lib/store/AsyncRowStore"; export type CommonAspectDict> = { operate: ( params: { entity: T; operation: ED[T]['Operation'] | ED[T]['Operation'][]; option?: OP; }, context: Cxt ) => Promise[] | OperationResult>; select: < T extends keyof ED, OP extends SelectOption >( params: { entity: T; selection: ED[T]['Selection']; option?: OP; getCount?: true }, context: Cxt ) => Promise<{ data: Record; total?: number; }>; aggregate: ( params: { entity: T; aggregation: ED[T]['Aggregation']; option?: OP; }, context: Cxt ) => Promise>; count: < T extends keyof ED, OP extends SelectOption >( params: { entity: T; selection: Pick; option?: OP }, context: Cxt ) => Promise; fetchRows: ( params: Array<{ entity: keyof ED; selection: ED[keyof ED]['Selection']; option?: OP; }>, context: Cxt ) => Promise; amap: < T extends | 'getDrivingPath' | 'regeo' | 'ipLoc' | 'getDistrict' | 'geocode' >(params: { key: string; method: T; data: Parameters[0]; }) => Promise; getTranslations: (params: { namespace: string | string[]; locale: string; }) => Promise; importEntity: (params: FormData, context: Cxt) => Promise; exportEntity: (params: { entity: T; id: string; filter?: ED[T]['Selection']['filter']; properties?: Record; }, context: Cxt) => Promise; getImportationTemplate: (params: { id: string }, context: Cxt) => Promise; searchPoi: (options: { value: string; areaCode?: string; indexFrom?: number; count?: number; typeCode?: string; }) => Promise<{ id: string; areaId: string; poiName: string; detail: string; coordinate: [number, number] }[]>; loadRelations: (params: { entities: (keyof ED)[], }, context: Cxt) => Promise; crossBridge: (params: { url: string }) => Promise>; };