UNPKG

@odata2ts/odata-query-objects

Version:

Q-Objects are the magic sauce for the odata-query-builder and allow for renaming and type conversion

29 lines (28 loc) 1.1 kB
import { HttpResponseModel } from "@odata2ts/http-client-api"; import { QParamModel } from "../param/QParamModel"; import { OperationReturnType } from "./OperationReturnType"; /** * Base class for handling an OData function (v2 and V4). * * This includes handling of entity id paths (same format as V4 functions). */ export declare abstract class QFunction<ParamModel = undefined> { protected name: string; protected qReturnType: OperationReturnType<any>; protected config: { v2Mode?: boolean; }; constructor(name: string, qReturnType?: OperationReturnType<any>, config?: { v2Mode?: boolean; }); abstract getParams(): Array<QParamModel<any, any>> | Array<Array<QParamModel<any, any>>>; private getParamSets; getName(): string; isV2(): boolean; buildUrl(params?: ParamModel, notEncoded?: boolean): string; private formatParams; parseUrl(url: string, notDecoded?: boolean): ParamModel; convertResponse(response: HttpResponseModel<any>): HttpResponseModel<any>; private findSingleParam; private findBestMatchingParamSet; }