@odata2ts/odata-query-objects
Version:
Q-Objects are the magic sauce for the odata-query-builder and allow for renaming and type conversion
22 lines (21 loc) • 2.29 kB
TypeScript
import { ParamValueModel } from "@odata2ts/converter-api";
import { CollectionFilterFunctions, DateTimeFilterFunctions, NumberFilterFunctions, NumberFilterOperators, StandardFilterOperators, StringFilterFunctions } from "../odata/ODataModel.js";
import { QPathModel } from "../path/QPathModel";
import { QFilterExpression } from "../QFilterExpression";
import { UrlExpressionValueModel, UrlValueModel } from "./UrlParamModel";
export declare function formatLiteralParam(value: ParamValueModel<UrlExpressionValueModel>): UrlValueModel;
export declare function formatLiteral(value: UrlExpressionValueModel): string;
export declare function parseLiteral(value: UrlValueModel): ParamValueModel<string>;
export declare function formatParamWithTypePrefix(typePrefix: string, value: ParamValueModel<UrlExpressionValueModel>): string | undefined;
export declare function formatWithTypePrefix(typePrefix: string, value: UrlExpressionValueModel): string;
export declare function parseWithTypePrefix(typePrefix: string, value: UrlValueModel): string | null | undefined;
export declare function formatParamWithTypeSuffix(typeSuffix: string, value: ParamValueModel<UrlExpressionValueModel>): string | undefined;
export declare function formatWithTypeSuffix(typeSuffix: string, value: UrlExpressionValueModel): string;
export declare function parseWithTypeSuffix(typeSuffix: string, value: UrlValueModel): ParamValueModel<string>;
export declare function formatParamWithQuotes(value: ParamValueModel<UrlExpressionValueModel>): UrlValueModel;
export declare function formatWithQuotes(value: UrlExpressionValueModel): string;
export declare function parseWithQuotes(value: UrlValueModel): string | null | undefined;
export declare function isPathValue(value: QPathModel | any): value is QPathModel;
export declare function buildOperatorExpression(path: string, operator: StandardFilterOperators | NumberFilterOperators, value: string): string;
export declare function buildFunctionExpression(functionName: CollectionFilterFunctions | StringFilterFunctions | NumberFilterFunctions | DateTimeFilterFunctions, param1: string, param2?: string): string;
export declare function buildQFilterOperation(path: string, operator: StandardFilterOperators | NumberFilterOperators, value: string): QFilterExpression;