import { Observable, Subject, Subscription } from 'rxjs'; import * as angular_odata from 'angular-odata'; import { HttpContext, HttpHeaders, HttpParams, HttpResponse, HttpResponseBase, HttpErrorResponse, HttpClient, HttpEvent } from '@angular/common/http'; import * as i0 from '@angular/core'; import { EventEmitter, Provider, InjectionToken, EnvironmentProviders, ModuleWithProviders } from '@angular/core'; import * as i1 from '@angular/common'; type ODataVersion = '2.0' | '3.0' | '4.0'; type FetchPolicy = 'cache-first' | 'cache-and-network' | 'network-only' | 'no-cache' | 'cache-only'; type ODataMetadataType = 'minimal' | 'full' | 'none'; type CacheCacheability = 'public' | 'private' | 'no-cache' | 'no-store'; declare enum PathSegment { batch = "batch", metadata = "metadata", entitySet = "entitySet", singleton = "singleton", type = "type", property = "property", navigationProperty = "navigationProperty", reference = "reference", value = "value", count = "count", function = "function", action = "action" } declare enum QueryOption { select = "select", expand = "expand", compute = "compute", apply = "apply", filter = "filter", search = "search", transform = "transform", orderBy = "orderBy", top = "top", skip = "skip", skiptoken = "skiptoken", format = "format", levels = "levels", count = "count" } declare enum EdmType { Guid = "Edm.Guid", Int16 = "Edm.Int16", String = "Edm.String", Boolean = "Edm.Boolean", Byte = "Edm.Byte", SByte = "Edm.SByte", Int32 = "Edm.Int32", Int64 = "Edm.Int64", Date = "Edm.Date", TimeOfDay = "Edm.TimeOfDay", DateTimeOffset = "Edm.DateTimeOffset", Duration = "Edm.Duration", Decimal = "Edm.Decimal", Double = "Edm.Double", Single = "Edm.Single", Binary = "Edm.Binary", Stream = "Edm.Stream", Geography = "Edm.Geography", GeographyPoint = "Edm.GeographyPoint", GeographyLineString = "Edm.GeographyLineString", GeographyPolygon = "Edm.GeographyPolygon", GeographyMultiPoint = "Edm.GeographyMultiPoint", GeographyMultiLineString = "Edm.GeographyMultiLineString", GeographyMultiPolygon = "Edm.GeographyMultiPolygon", GeographyCollection = "Edm.GeographyCollection", Geometry = "Edm.Geometry", GeometryPoint = "Edm.GeometryPoint", GeometryLineString = "Edm.GeometryLineString", GeometryPolygon = "Edm.GeometryPolygon", GeometryMultiPoint = "Edm.GeometryMultiPoint", GeometryMultiLineString = "Edm.GeometryMultiLineString", GeometryMultiPolygon = "Edm.GeometryMultiPolygon", GeometryCollection = "Edm.GeometryCollection" } declare enum JsonType { string = "string", number = "number", integer = "integer", object = "object", array = "array", boolean = "boolean", null = "null" } interface ParserOptions { version?: ODataVersion; exponentialDecimals?: boolean; metadata?: ODataMetadataType; ieee754Compatible?: boolean; streaming?: boolean; stringAsEnum?: boolean; deleteRefBy?: 'path' | 'id'; nonParenthesisForEmptyParameterFunction?: boolean; } interface ResponseOptions extends ParserOptions { cacheability?: CacheCacheability; maxAge?: number; } interface StructuredTypeFieldOptions extends ParserOptions { field: ODataStructuredTypeFieldConfig; } interface Parser { deserialize(value: any, options?: ParserOptions | StructuredTypeFieldOptions): T | T[]; serialize(value: T, options?: ParserOptions | StructuredTypeFieldOptions): any; encode(value: T, options?: ParserOptions | StructuredTypeFieldOptions): any; } interface FieldParser extends Parser { nullable?: boolean; default?: any; maxLength?: number; precision?: number; scale?: number | 'variable'; } declare const NONE_PARSER: Parser; interface ODataCache { put(key: string, payload: T, ...opts: any[]): void; get(key: string, ...opts: any[]): T | undefined; handleRequest(req: any, res$: Observable): Observable; flush(): void; } interface ODataApiConfigOptions { version?: ODataVersion; params?: { [param: string]: string | string[]; }; headers?: { [param: string]: string | string[]; }; withCredentials?: boolean; accept?: { exponentialDecimals?: boolean; metadata?: ODataMetadataType; ieee754Compatible?: boolean; streaming?: boolean; }; etag?: { ifMatch?: boolean; ifNoneMatch?: boolean; }; prefer?: { maxPageSize?: number; return?: 'representation' | 'minimal'; continueOnError?: boolean; includeAnnotations?: string; }; stripMetadata?: ODataMetadataType; fetchPolicy?: FetchPolicy; bodyQueryOptions?: QueryOption[]; stringAsEnum?: boolean; deleteRefBy?: 'path' | 'id'; nonParenthesisForEmptyParameterFunction?: boolean; jsonBatchFormat?: boolean; relativeUrls?: boolean; } type ODataApiConfig = { serviceRootUrl: string; metadataUrl?: string; name?: string; version?: ODataVersion; default?: boolean; creation?: Date; cache?: ODataCache; errorHandler?: (error: any, caught: Observable) => Observable; options?: ODataApiConfigOptions; parsers?: { [type: string]: Parser; }; schemas?: ODataSchemaConfig[]; references?: ODataReferenceConfig[]; models?: { [type: string]: { new (...params: any[]): any; }; }; collections?: { [type: string]: { new (...params: any[]): any; }; }; }; type ODataAnnotationConfig = { term: string; string?: string; bool?: boolean; int?: number; permissions?: string[]; properties?: string[]; }; type ODataReferenceConfig = { uri: string; includes?: string; annotations?: ODataAnnotationConfig[]; enums?: ODataEnumTypeConfig[]; entities?: ODataStructuredTypeConfig[]; callables?: ODataCallableConfig[]; containers?: ODataEntityContainerConfig[]; }; type ODataSchemaConfig = { namespace: string; alias?: string; annotations?: ODataAnnotationConfig[]; enums?: ODataEnumTypeConfig[]; entities?: ODataStructuredTypeConfig[]; callables?: ODataCallableConfig[]; containers?: ODataEntityContainerConfig[]; }; type ODataEntityContainerConfig = { name: string; annotations?: ODataAnnotationConfig[]; entitySets?: ODataEntitySetConfig[]; singletons?: ODataSingletonConfig[]; }; type ODataEnumTypeFieldConfig = { value: number; annotations?: ODataAnnotationConfig[]; }; type ODataEnumTypeConfig = { name: string; flags?: boolean; annotations?: ODataAnnotationConfig[]; members: { [name: string]: number; } | { [value: number]: string; }; fields: { [member: string]: ODataEnumTypeFieldConfig; }; }; type ODataStructuredTypeFieldConfig = { type: string; default?: any; maxLength?: number; key?: boolean; collection?: boolean; nullable?: boolean; navigation?: boolean; precision?: number; annotations?: ODataAnnotationConfig[]; scale?: number | 'variable'; referentials?: { property: string; referencedProperty: string; }[]; referential?: string; referenced?: string; }; type ODataStructuredTypeConfig = { name: string; base?: string; open?: boolean; model?: { new (...params: any[]): any; }; collection?: { new (...params: any[]): any; }; annotations?: ODataAnnotationConfig[]; keys?: { name: string; alias?: string; }[]; fields?: { [name: string]: ODataStructuredTypeFieldConfig; }; }; type ODataParameterConfig = { type: string; nullable?: boolean; collection?: boolean; }; type ODataCallableConfig = { name: string; entitySetPath?: string; bound?: boolean; composable?: boolean; parameters?: { [name: string]: ODataParameterConfig; }; return?: { type: string; collection?: boolean; }; }; type ODataEntitySetConfig = { name: string; entityType: string; service: { new (...params: any[]): any; }; annotations?: ODataAnnotationConfig[]; }; type ODataSingletonConfig = { name: string; type: string; service: { new (...params: any[]): any; }; annotations?: ODataAnnotationConfig[]; }; type LooseUnion = U | (U extends string ? Record & string : never); type ObjectValues = T[keyof T]; type Unpacked = NonNullable extends (infer U)[] ? U : NonNullable; type Select = SelectType | SelectType[]; type SelectType = LooseUnion; type Filter = FilterType | FilterType[]; type FilterType = string | Record; declare const StandardAggregateMethods: { readonly sum: "sum"; readonly min: "min"; readonly max: "max"; readonly average: "average"; readonly countdistinct: "countdistinct"; }; type StandardAggregateMethods = ObjectValues; type AggregateType = string | Record; type OrderBy = OrderByType | OrderByType[]; type OrderByType = LooseUnion>; type OrderByObject = keyof T | [keyof T | string, 'asc' | 'desc'] | NestedOrderBy; type NestedOrderBy = { [P in keyof T]?: T[P] extends Array ? OrderBy : OrderBy; }; type Expand = ExpandType | ExpandType[]; type ExpandType = LooseUnion>; type ExpandObject = keyof T | NestedExpandOptions; type NestedExpandOptions = { [P in keyof T]?: ExpandOptions>; }; type ExpandOptions = { select?: Select; filter?: Filter; orderBy?: OrderBy; top?: number; skip?: number; levels?: number | 'max'; count?: boolean | Filter; expand?: Expand; }; type Transform = { aggregate?: AggregateType | Array>; filter?: Filter | null; groupBy?: GroupByType; }; type GroupByType = { properties: Array>; transform?: Transform; }; declare const QueryCustomTypes: { readonly Raw: "Raw"; readonly Alias: "Alias"; readonly Duration: "Duration"; readonly Binary: "Binary"; }; type QueryCustomTypes = ObjectValues; type QueryCustomType = { type: QueryCustomTypes; value: any; name?: string; }; type Value = string | Date | number | boolean | QueryCustomType; declare const raw: (value: string) => QueryCustomType; declare const alias: (value: any, name?: string) => QueryCustomType; declare const duration: (value: string) => QueryCustomType; declare const binary: (value: string) => QueryCustomType; declare const isQueryCustomType: (value: any) => boolean; declare const isRawType: (value: any) => boolean; type QueryOptions = ExpandOptions & { search: string; apply: string; transform: Transform | Transform[]; compute: string; skip: number; skiptoken: string; key: string | number | Record; count: boolean | Filter; action: string; func: string | { [functionName: string]: { [parameterName: string]: any; }; }; format: string; aliases: QueryCustomType[]; escape: boolean; }; declare const ITEM_ROOT = ""; declare function buildPathAndQuery({ select, search, skiptoken, format, top, skip, filter, apply, transform, compute, orderBy, key, count, expand, action, func, aliases, escape, }?: Partial>): [string, { [name: string]: any; }]; declare function normalizeValue(value: Value, { aliases, escape }?: { aliases?: QueryCustomType[]; escape?: boolean; }): any; type Normalize = 'all' | 'right' | 'left' | 'none'; interface Renderable { render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; toJson(): any; clone(): any; resolve(parser: any): any; toString(): any; } declare const FieldFactory: (names?: (string | Renderable)[]) => any; declare const RenderableFactory: (value: any) => Renderable; declare function render(value: any, { aliases, normalize, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; normalize?: boolean; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string | number | boolean | null; declare function resolve(values: any, parser?: Parser): any; declare function encode(values: any, parser?: Parser, options?: ParserOptions): any; declare class Function implements Renderable { protected name: string; protected values: any[]; protected normalize: Normalize; protected escape: boolean; constructor(name: string, values: any[], normalize: Normalize, escape?: boolean); get [Symbol.toStringTag](): string; toJson(): { $type: string; name: string; values: any[]; normalize: Normalize; }; static fromJson(json: { [name: string]: any; }): Function; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): Function; resolve(parser: any): any; } declare class StringAndCollectionFunctions { concat(left: any, right: any, normalize?: Normalize): Function; contains(left: any, right: any, normalize?: Normalize): Function; endsWith(left: any, right: any, normalize?: Normalize): Function; indexOf(left: any, right: any, normalize?: Normalize): Function; length(left: any, normalize?: Normalize): Function; startsWith(left: any, right: any, normalize?: Normalize): Function; subString(left: any, right: number, length?: number, normalize?: Normalize): Function; } declare class CollectionFunctions { hasSubset(left: T, right: any, normalize?: Normalize): Function; hasSubsequence(left: T, right: any, normalize?: Normalize): Function; } declare class StringFunctions { matchesPattern(left: any | string, pattern: string, normalize?: Normalize): Function; toLower(left: any, normalize?: Normalize): Function; toUpper(left: any, normalize?: Normalize): Function; trim(left: any, normalize?: Normalize): Function; } declare class DateAndTimeFunctions { date(left: any, normalize?: Normalize): Function; day(left: any, normalize?: Normalize): Function; fractionalseconds(left: any, normalize?: Normalize): Function; hour(left: any, normalize?: Normalize): Function; maxdatetime(left: any, normalize?: Normalize): Function; mindatetime(left: any, normalize?: Normalize): Function; minute(left: any, normalize?: Normalize): Function; month(left: any, normalize?: Normalize): Function; now(): Function; second(left: any, normalize?: Normalize): Function; time(left: any, normalize?: Normalize): Function; totaloffsetminutes(left: any, normalize?: Normalize): Function; totalseconds(left: any, normalize?: Normalize): Function; year(left: any, normalize?: Normalize): Function; } declare class ArithmeticFunctions { ceiling(left: T | string, normalize?: Normalize): Function; floor(left: T | string, normalize?: Normalize): Function; round(left: T | string, normalize?: Normalize): Function; } declare class TypeFunctions { cast(left: T | string, type?: string): N; isof(left: T | string, type?: string): Type; } declare class GeoFunctions { geoDistance(left: T, right: string, normalize?: Normalize): Function; geoIntersects(left: T, right: string, normalize?: Normalize): Function; geoLength(left: T, normalize?: Normalize): Function; } declare class ConditionalFunctions { case(left: T | string, right: any, normalize?: Normalize): Function; } declare class Operator implements Renderable { protected op: string; protected values: any[]; protected normalize: Normalize; constructor(op: string, values: any[], normalize: Normalize); get [Symbol.toStringTag](): string; toJson(): { $type: string; op: string; values: any[]; normalize: Normalize; }; static fromJson(json: { [name: string]: any; }): Operator; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): Operator; resolve(parser: any): any; } declare class LogicalOperators { eq(left: any, right: any, normalize?: Normalize): Operator; ne(left: any, right: any, normalize?: Normalize): Operator; gt(left: any, right: any, normalize?: Normalize): Operator; ge(left: any, right: any, normalize?: Normalize): Operator; lt(left: any, right: any, normalize?: Normalize): Operator; le(left: any, right: any, normalize?: Normalize): Operator; not(left: any, normalize?: Normalize): Operator; has(left: any, right: any, normalize?: Normalize): Operator; in(left: any, right: any, normalize?: Normalize): Operator; } declare class ArithmeticOperators { add(left: any, right: any, normalize?: Normalize): Operator; sub(left: any, right: any, normalize?: Normalize): Operator; mul(left: any, right: any, normalize?: Normalize): Operator; div(left: any, right: any, normalize?: Normalize): Operator; mod(left: any, right: any, normalize?: Normalize): Operator; neg(value: any, normalize?: Normalize): Operator; } declare class Grouping implements Renderable { protected group: Renderable; constructor(group: Renderable); get [Symbol.toStringTag](): string; toJson(): { $type: string; group: any; }; static fromJson(json: { [name: string]: any; }): Grouping; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): Grouping; resolve(parser: any): any; } declare class GroupingOperators { group(value: any): Grouping; rollup(...values: any): Function; } type AggregateMethod = 'sum' | 'min' | 'max' | 'average' | 'countdistinct'; declare class Aggregate implements Renderable { protected value: Renderable; protected method: AggregateMethod; protected alias: string; constructor(value: Renderable, method: AggregateMethod, alias: string); get [Symbol.toStringTag](): string; toJson(): { $type: string; value: any; method: AggregateMethod; alias: string; }; static fromJson(json: { [name: string]: any; }): Aggregate; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): Aggregate; resolve(parser: any): any; } declare class GroupBy implements Renderable { protected properties: Renderable[]; protected transformations?: Renderable | undefined; constructor(properties: Renderable[], transformations?: Renderable | undefined); get [Symbol.toStringTag](): string; toJson(): { $type: string; properties: any[]; transformations: any; }; static fromJson(json: { [name: string]: any; }): GroupBy; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): GroupBy; resolve(parser: any): any; } declare class Transformations { aggregate(value: Renderable, method: AggregateMethod, alias: string): Aggregate; groupby(properties: Renderable[], options?: Renderable): GroupBy; topCount(value: number, field: Renderable, normalize?: Normalize): Function; topSum(value: number, field: Renderable, normalize?: Normalize): Function; topPercent(value: number, field: Renderable, normalize?: Normalize): Function; bottomCount(value: number, field: Renderable, normalize?: Normalize): Function; bottomSum(value: number, field: Renderable, normalize?: Normalize): Function; bottomPercent(value: number, field: Renderable, normalize?: Normalize): Function; identity(): Function; search(value: any, normalize?: Normalize): Function; filter(value: any, normalize?: Normalize): Function; skip(value: number, normalize?: Normalize): Function; top(value: number, normalize?: Normalize): Function; orderby(value: any, normalize?: Normalize): Function; } declare class Type implements Renderable { protected name: string; protected type: string; protected value?: any | undefined; constructor(name: string, type: string, value?: any | undefined); get [Symbol.toStringTag](): string; toJson(): { $type: string; name: string; type: string; value: any; }; static fromJson(json: { [name: string]: any; }): Type; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): Type; resolve(parser: any): any; } declare class Lambda implements Renderable { protected op: string; protected values: any[]; protected alias?: string | undefined; constructor(op: string, values: any[], alias?: string | undefined); get [Symbol.toStringTag](): string; toJson(): { $type: string; op: string; values: any[]; alias: string | undefined; }; static fromJson(json: { [name: string]: any; }): Lambda; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): Lambda; resolve(parser: any): any; } declare class LambdaOperators { any(left: T, right: any, alias?: string): Lambda; all(left: T, right: any, alias?: string): Lambda; } declare class ODataOperators { } interface ODataOperators extends LogicalOperators, ArithmeticOperators, GroupingOperators, LambdaOperators { } declare const operators: ODataOperators; declare class ODataFunctions { } interface ODataFunctions extends StringAndCollectionFunctions, CollectionFunctions, StringFunctions, DateAndTimeFunctions, ArithmeticFunctions, TypeFunctions, GeoFunctions, ConditionalFunctions { } declare const functions: ODataFunctions; declare class ODataTransformations { } interface ODataTransformations extends Transformations { } declare const transformations: ODataTransformations; declare class ODataSyntax { } interface ODataSyntax extends ODataOperators, ODataFunctions, ODataTransformations { } declare const syntax: ODataSyntax; declare abstract class Expression implements Renderable { protected _children: Renderable[]; constructor({ children, }?: { children?: Renderable[]; }); get [Symbol.toStringTag](): string; abstract render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; abstract clone(): Expression; children(): Renderable[]; length(): number; toJson(): { $type: string; children: any[]; }; resolve(parser: any): any; toString(): string; } type ComputeExpressionBuilder = { t: Required; e: () => ComputeExpression; }; declare class ComputeExpression extends Expression { protected names: string[]; constructor({ children, names, }?: { children?: Renderable[]; names?: string[]; }); get [Symbol.toStringTag](): string; static factory(opts: (builder: ComputeExpressionBuilder, current: ComputeExpression) => ComputeExpression, current?: ComputeExpression): ComputeExpression; toJson(): { $type: string; children: any[]; } & { names: string[]; }; static fromJson(json: { [name: string]: any; }): ComputeExpression; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): ComputeExpression; private _add; field(name: string, opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ComputeExpression; } declare class CountField implements Renderable { protected field: any; private values; constructor(field: any, values?: { [name: string]: any; }); get [Symbol.toStringTag](): string; toJson(): { field: any; }; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; filter(opts: (builder: FilterExpressionBuilder, current?: FilterExpression) => FilterExpression): any; clone(): CountField; resolve(parser: any): any; private option; } type CountExpressionBuilder = { t: Required; e: () => CountExpression; }; declare class CountExpression extends Expression { constructor({ children, }?: { children?: Renderable[]; }); get [Symbol.toStringTag](): string; static factory(opts: (builder: CountExpressionBuilder, current: CountExpression) => CountExpression, current?: CountExpression): CountExpression; private _add; toJson(): { $type: string; children: any[]; }; static fromJson(json: { [name: string]: any; }): CountExpression; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): CountExpression; field(field: F[], opts?: (e: { t: F; f: CountField; }) => CountExpression): CountExpression; } type FilterConnector = 'and' | 'or'; type FilterExpressionBuilder = { t: Required; e: (connector?: FilterConnector) => FilterExpression; o: ODataOperators; f: ODataFunctions; }; declare class FilterExpression extends Expression { private _connector; private _negated; constructor({ children, connector, negated, }?: { children?: Renderable[]; connector?: FilterConnector; negated?: boolean; }); get [Symbol.toStringTag](): string; static factory(opts: (builder: FilterExpressionBuilder, current: FilterExpression) => FilterExpression, current?: FilterExpression): FilterExpression; toJson(): { $type: string; children: any[]; } & { connector: FilterConnector; negated: boolean; }; static fromJson(json: { [name: string]: any; }): FilterExpression; connector(): FilterConnector; negated(): boolean; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): FilterExpression; private _add; or(exp: FilterExpression): FilterExpression; and(exp: FilterExpression): FilterExpression; not(exp: FilterExpression): FilterExpression; eq(left: any, right: any, normalize?: Normalize): FilterExpression; ne(left: any, right: any, normalize?: Normalize): FilterExpression; gt(left: any, right: any, normalize?: Normalize): FilterExpression; ge(left: any, right: any, normalize?: Normalize): FilterExpression; lt(left: any, right: any, normalize?: Normalize): FilterExpression; le(left: any, right: any, normalize?: Normalize): FilterExpression; has(left: any, right: any, normalize?: Normalize): FilterExpression; in(left: any, right: any, normalize?: Normalize): FilterExpression; contains(left: any, right: any, normalize?: Normalize): FilterExpression; startsWith(left: any, right: any, normalize?: Normalize): FilterExpression; endsWith(left: any, right: any, normalize?: Normalize): FilterExpression; any(left: N[], opts?: (e: { e: (connector?: FilterConnector) => FilterExpression; t: N; o: ODataOperators; f: ODataFunctions; }) => FilterExpression, alias?: string): FilterExpression; all(left: N[], opts?: (e: { t: N; e: (connector?: FilterConnector) => FilterExpression; o: ODataOperators; f: ODataFunctions; }) => FilterExpression, alias?: string): FilterExpression; count(left: N[], opts?: (e: { t: N; f: CountField; }) => CountExpression): FilterExpression; isof(type: string): FilterExpression; isof(left: F, type: string): FilterExpression; combine(exp: FilterExpression, connector?: FilterConnector): FilterExpression; } type SearchConnector = 'AND' | 'OR'; declare class SearchTerm implements Renderable { protected value: string; constructor(value: string); get [Symbol.toStringTag](): string; toJson(): { $type: string; value: string; }; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): SearchTerm; resolve(parser: any): any; } type SearchExpressionBuilder = { e: (connector?: SearchConnector) => SearchExpression; }; declare class SearchExpression extends Expression { private _connector; private _negated; constructor({ children, connector, negated, }?: { children?: Renderable[]; connector?: SearchConnector; negated?: boolean; }); get [Symbol.toStringTag](): string; static factory(opts: (builder: SearchExpressionBuilder, current: SearchExpression) => SearchExpression, current?: SearchExpression): SearchExpression; private _add; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): SearchExpression; toJson(): { $type: string; children: any[]; } & { connector: SearchConnector; negated: boolean; }; static fromJson(json: { [name: string]: any; }): SearchExpression; connector(): SearchConnector; negated(): boolean; or(exp: SearchExpression): SearchExpression; and(exp: SearchExpression): SearchExpression; not(exp: SearchExpression): SearchExpression; term(value: any): SearchExpression; combine(expression: SearchExpression, connector?: SearchConnector): SearchExpression; } declare class GroupByTransformations extends Expression { protected methods: (AggregateMethod | string)[]; protected aliases: string[]; constructor({ children, methods, aliases, }?: { children?: Renderable[]; methods?: (AggregateMethod | string)[]; aliases?: string[]; }); get [Symbol.toStringTag](): string; toJson(): { $type: string; children: any[]; } & { methods: string[]; aliases: string[]; }; static fromJson(json: { [name: string]: any; }): GroupByTransformations; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): GroupByTransformations; private _add; aggregate(value: any, method: AggregateMethod | string, alias: string): GroupByTransformations; sum(value: any, alias: string): GroupByTransformations; min(value: any, alias: string): GroupByTransformations; max(value: any, alias: string): GroupByTransformations; average(value: any, alias: string): GroupByTransformations; countdistinct(value: any, alias: string): GroupByTransformations; count(alias: string): GroupByTransformations; } type ApplyExpressionBuilder = { t: Required; e: () => ApplyExpression; }; declare class ApplyExpression extends Expression { constructor({ children, }?: { children?: Renderable[]; }); get [Symbol.toStringTag](): string; static factory(opts: (builder: ApplyExpressionBuilder, current: ApplyExpression) => ApplyExpression, current?: ApplyExpression): ApplyExpression; toJson(): { $type: string; children: any[]; }; static fromJson(json: { [name: string]: any; }): ApplyExpression; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): ApplyExpression; private _add; aggregate(value: any, method: AggregateMethod, alias: string): ApplyExpression; topCount(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; topSum(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; topPercent(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; bottomCount(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; bottomSum(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; bottomPercent(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; identity(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; concat(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; groupBy(props: (e: { rollup: (f: any) => any; }) => any | any[], opts?: (e: GroupByTransformations) => GroupByTransformations): ApplyExpression; filter(opts: (e: { t: T; e: (connector?: FilterConnector) => FilterExpression; o: ODataOperators; f: ODataFunctions; }) => FilterExpression): ApplyExpression; expand(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; search(opts: (e: { t: T; e: (connector?: SearchConnector) => SearchExpression; o: ODataOperators; f: ODataFunctions; }) => SearchExpression): ApplyExpression; compute(opts: (e: { o: ODataOperators; f: ODataFunctions; }) => Renderable): ApplyExpression; } type OrderAttribute = 'asc' | 'desc'; declare class OrderByField implements Renderable { protected field: Renderable; protected order: OrderAttribute; constructor(field: Renderable, order: OrderAttribute); get [Symbol.toStringTag](): string; toJson(): { $type: string; field: any; order: OrderAttribute; }; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): OrderByField; resolve(parser: any): any; } type OrderByExpressionBuilder = { t: Required; e: () => OrderByExpression; }; declare class OrderByExpression extends Expression { constructor({ children, }?: { children?: Renderable[]; }); get [Symbol.toStringTag](): string; static factory(opts: (builder: OrderByExpressionBuilder, current: OrderByExpression) => OrderByExpression, current?: OrderByExpression): OrderByExpression; private _add; toJson(): { $type: string; children: any[]; }; static fromJson(json: { [name: string]: any; }): OrderByExpression; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): OrderByExpression; ascending(field: any): OrderByExpression; descending(field: any): OrderByExpression; combine(expression: OrderByExpression): OrderByExpression; } type SelectExpressionBuilder = { t: Required; e: () => SelectExpression; }; declare class SelectExpression extends Expression { constructor({ children, }?: { children?: Renderable[]; }); get [Symbol.toStringTag](): string; static factory(opts: (builder: SelectExpressionBuilder, current: SelectExpression) => SelectExpression, current?: SelectExpression): SelectExpression; toJson(): { $type: string; children: any[]; }; static fromJson(json: { [name: string]: any; }): SelectExpression; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): SelectExpression; private _add; field(field: any): SelectExpression; fields(...fields: any[]): SelectExpression; combine(expression: SelectExpression): SelectExpression; } declare class ExpandField implements Renderable { protected field: any; private values; constructor(field: any, values?: { [name: string]: any; }); get [Symbol.toStringTag](): string; toJson(): { field: any; }; render({ aliases, escape, prefix, parser, options, }: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): ExpandField; resolve(parser: any): any; select(opts: (builder: SelectExpressionBuilder, current: SelectExpression) => SelectExpression): SelectExpression; expand(opts: (builder: ExpandExpressionBuilder, current: ExpandExpression) => ExpandExpression): ExpandExpression; filter(opts: (builder: FilterExpressionBuilder, current: FilterExpression) => FilterExpression): FilterExpression; search(opts: (builder: SearchExpressionBuilder, current: SearchExpression) => SearchExpression): SearchExpression; orderBy(opts: (builder: OrderByExpressionBuilder, current: OrderByExpression) => OrderByExpression): OrderByExpression; compute(opts: (builder: ComputeExpressionBuilder, current: ComputeExpression) => ComputeExpression): ComputeExpression; skip(n: number): number; top(n: number): number; levels(n: number | 'max'): number | "max"; count(): boolean; private option; } type ExpandExpressionBuilder = { t: Required; e: () => ExpandExpression; }; declare class ExpandExpression extends Expression { constructor({ children, }?: { children?: Renderable[]; }); get [Symbol.toStringTag](): string; static factory(opts: (builder: ExpandExpressionBuilder, current: ExpandExpression) => ExpandExpression, current?: ExpandExpression): ExpandExpression; toJson(): { $type: string; children: any[]; }; static fromJson(json: { [name: string]: any; }): ExpandExpression; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser; options?: ParserOptions; }): string; clone(): ExpandExpression; private _add; field(field: F, opts?: (e: ExpandField>) => void): ExpandExpression; combine(expression: ExpandExpression): ExpandExpression; } declare class ODataQueryOptionHandler { private o; private n; constructor(o: Map, n: QueryOption); /** * The name of the managed odata query option. */ get name(): QueryOption; /** * Converts the managed odata query option to a json object. * @returns {any} */ toJson(): any; /** * Returns a boolean indicating if the managed odata query option is empty. * @returns True if the managed odata query option is empty. */ empty(): boolean; /** * Get or Set the value of the managed odata query option. * @param v The value to set. * @returns */ value(v?: any): any; private assertArray; /** * Push value to the managed odata query option. * @param value Value to push */ push(value: any): void; /** * Remove value from the managed odata query option. * @param value Value to remove */ remove(value: any): void; /** * Return value at index of the managed odata query option. * @param index Index of the value * @returns The value */ at(index: number): any; some(predicate: (value: any) => boolean): boolean; every(predicate: (value: any) => boolean): boolean; find(predicate: (value: any) => boolean): any; private assertObject; /** * Set the value for path in the managed odata query option. * @param path Path for set the value * @param value Value to set */ set(path: string, value: any): void; /** * Get the value for path from the managed odata query option. * @param path The path from get the value * @param def Default if not found * @returns */ get(path: string, def?: any): any; /** * Unset the value for path in the managed odata query option. * @param path */ unset(path: string): void; /** * Test if the managed odata query option has the value. * @param path The path fot test if the value is set * @returns Boolean indicating if the value is set */ has(path: string): boolean; /** * Merge values from object into the managed odata query option. * @param values Object to merge * @returns */ assign(values: { [attr: string]: any; }): { [attr: string]: any; }; /** * Clear the managed odata query option. */ clear(): void; toString({ escape, parser }?: { escape?: boolean; parser?: Parser; }): string; } declare class ODataQueryOptionsHandler { protected options: ODataQueryOptions; constructor(options: ODataQueryOptions); /** * Create a raw odata value * @param value The value to raw * @returns The raw value */ raw(value: any): angular_odata.QueryCustomType; /** * Create a new odata alias parameter * @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_ParameterAliases * @param value The value of the alias * @param name The name of the alias * @returns The alias */ alias(value: any, name?: string): angular_odata.QueryCustomType; /** * Create a duration odata value * @param value The value to duration * @returns The duration value */ duration(value: any): angular_odata.QueryCustomType; /** * Create a binary odata value * @param value The value to binary * @returns The binary value */ binary(value: any): angular_odata.QueryCustomType; /** * Normalize the given value to a valid odata value * @param value The value to normalize * @returns The normalized value */ normalize(value: any): any; /** * Build and return a handler for modifying the $select option. * If opts is given then set te value as new value for $select. * @param opts Select value or builder function for SelectExpression */ select(opts: (builder: SelectExpressionBuilder, current: SelectExpression) => SelectExpression): SelectExpression; select(opts: Select): ODataQueryOptionHandler; select(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $expand option. * If opts is given then set te value as new value for $expand. * @param opts Expand value or builder function for ExpandExpression */ expand(opts: (builder: ExpandExpressionBuilder, current: ExpandExpression) => ExpandExpression): ExpandExpression; expand(opts: Expand): ODataQueryOptionHandler; expand(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $compute option. * If opts is given then set te value as new value for $compute. * @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptioncompute * @param opts string value or builder function for ComputeExpression */ compute(opts: (builder: ComputeExpressionBuilder, current: ComputeExpression) => ComputeExpression): ComputeExpression; compute(opts: string): ODataQueryOptionHandler; compute(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $apply option. * If opts is given then set te value as new value for $compute. * @link http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/odata-data-aggregation-ext-v4.0-cs02.html * @param opts string value or builder function for ApplyExpression */ apply(opts: (builder: ApplyExpressionBuilder, current: ApplyExpression) => ApplyExpression): ApplyExpression; apply(opts: string): ODataQueryOptionHandler; apply(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $format option. * If opts is given then set te value as new value for $format. * @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionformat * @param opts string value for format */ format(opts: string): ODataQueryOptionHandler; format(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $transform option. * If opts is given then set te value as new value for $transform. * @param opts string value for transform */ transform(opts: Transform): ODataQueryOptionHandler; transform(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $search option. * If opts is given then set te value as new value for $search. * @param opts string value or builder function for SearchExpression */ search(opts: (builder: SearchExpressionBuilder, current: SearchExpression) => SearchExpression): SearchExpression; search(opts: string): ODataQueryOptionHandler; search(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $filter option. * If opts is given then set te value as new value for $filter. * @param opts Filter value or builder function for FilterExpression */ filter(opts: (builder: FilterExpressionBuilder, current: FilterExpression) => FilterExpression): FilterExpression; filter(opts: Filter): ODataQueryOptionHandler; filter(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $orderby option. * If opts is given then set te value as new value for $orderby. * @param opts OrderBy value or builder function for OrderByExpression */ orderBy(opts: (builder: OrderByExpressionBuilder, current: OrderByExpression) => OrderByExpression): OrderByExpression; orderBy(opts: OrderBy): ODataQueryOptionHandler; orderBy(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $top option. * If opts is given then set te value as new value for $top. * @param opts number value */ top(opts: number): ODataQueryOptionHandler; top(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $skip option. * If opts is given then set te value as new value for $skip. * @param opts number value */ skip(opts: number): ODataQueryOptionHandler; skip(): ODataQueryOptionHandler; /** * Build and return a handler for modifying the $skiptoken option. * If opts is given then set te value as new value for $skiptoken. * @param opts string value */ skiptoken(opts: string): ODataQueryOptionHandler; skiptoken(): ODataQueryOptionHandler; remove(...keys: QueryOption[]): void; keep(...keys: QueryOption[]): void; /** * Shortcut for set $top, $skip, $skiptoken. * @param param0 skip or top or skiptoken */ paging({ skip, skiptoken, top, }?: { skip?: number | null; skiptoken?: string | null; top?: number | null; }): void; /** * Shortcut for clear pagination by unset $top, $skip, $skiptoken. */ removePaging(): void; /** * Shortcut for clear query. */ clear(): void; /** * Store the query options from the current query. */ store(): ODataQueryArguments; /** * Restore the given query options to the current query. * @param options The query to be applied. */ restore(options: ODataQueryArguments): void; /** * Combine the given query options with the current query. * @param options The query to be combined. */ combine(options: ODataQueryArguments): void; toJson(): {}; fromJson(json: { [name: string]: any; }): void; toString({ escape, parser }?: { escape?: boolean; parser?: Parser; }): string; pathAndParams({ escape, parser, options, }?: { escape?: boolean; parser?: Parser; options?: ParserOptions; }): [string, { [name: string]: any; }]; } type ODataQueryArguments = { [QueryOption.select]?: Select | SelectExpression | null; [QueryOption.expand]?: Expand | ExpandExpression | null; [QueryOption.compute]?: string | ComputeExpression | null; [QueryOption.apply]?: string | ApplyExpression | null; [QueryOption.filter]?: Filter | FilterExpression | null; [QueryOption.search]?: string | SearchExpression | null; [QueryOption.transform]?: Transform | null; [QueryOption.orderBy]?: OrderBy | OrderByExpression | null; [QueryOption.top]?: number | null; [QueryOption.skip]?: number | null; [QueryOption.skiptoken]?: string | null; [QueryOption.format]?: string | null; [QueryOption.levels]?: number | 'max' | null; [QueryOption.count]?: boolean | null; }; declare const pathAndParamsFromQueryOptions: (values: Map, { escape, parser, options, }?: { escape?: boolean; parser?: Parser; options?: ParserOptions; }) => [string, { [name: string]: any; }]; declare class ODataQueryOptions { private _values; constructor(values?: Map); pathAndParams({ escape, parser, options, }?: { escape?: boolean; parser?: Parser; options?: ParserOptions; }): [string, { [name: string]: any; }]; toString({ escape, parser }?: { escape?: boolean; parser?: Parser; }): string; toJson(): {}; fromJson(json: { [name: string]: any; }): this; static fromJson(json: { [name: string]: any; }): ODataQueryOptions; toQueryArguments(): ODataQueryArguments; clone(): ODataQueryOptions; expression(key: QueryOption, exp?: Expression): any; option(key: QueryOption, opts?: O): ODataQueryOptionHandler; has(key: QueryOption): boolean; remove(...keys: QueryOption[]): void; keep(...keys: QueryOption[]): void; clear(): void; } type ODataContext = { serviceRootUrl?: string; metadataUrl?: string; entitySet?: string; key?: string; expand?: string; type?: string; property?: string; entity?: boolean; }; interface ODataVersionHelper { VALUE: string; ODATA_ANNOTATION_PREFIX: string; ODATA_FUNCTION_PREFIX: string; ODATA_ID: string; ODATA_TYPE: string; ODATA_COUNT: string; ODATA_ETAG: string; ODATA_CONTEXT: string; ODATA_MEDIA_ETAG: string; ODATA_NEXTLINK: string; ODATA_DEFERRED: string; ODATA_ANNOTATION: string; entity(value: { [name: string]: any; }): any; entities(value: { [name: string]: any; }): any; property(value: { [name: string]: any; }): any; annotations(value: { [name: string]: any; }): Map; attributes(value: { [name: string]: any; }, metadata: ODataMetadataType): any; context(annots: Map | { [name: string]: any; }): ODataContext; id(annots: Map | { [name: string]: any; }): string | undefined; etag(annots: Map | { [name: string]: any; }): string | undefined; type(annots: Map | { [name: string]: any; }): string | undefined; count(annots: Map): number | undefined; functions(annots: Map): Map; properties(annots: Map): Map>; mediaEtag(annots: Map): string | undefined; metadataEtag(annots: Map): string | undefined; nextLink(annots: Map): string | undefined; readLink(annots: Map): string | undefined; mediaReadLink(annots: Map): string | undefined; editLink(annots: Map): string | undefined; mediaEditLink(annots: Map): string | undefined; mediaContentType(annots: Map): string | undefined; deltaLink(annots: Map): string | undefined; countParam(): { [name: string]: string; }; } declare abstract class ODataAnnotations { helper: ODataVersionHelper; protected annotations: Map; protected context?: ODataContext | undefined; constructor(helper: ODataVersionHelper, annotations?: Map, context?: ODataContext | undefined); attributes(data: { [name: string]: any; }, metadata: ODataMetadataType): Partial; update(data: { [name: string]: any; }): void; get entitySet(): string | undefined; get type(): string | undefined; abstract union(other: ODataAnnotations): ODataAnnotations; abstract clone(): ODataAnnotations; abstract data(data: { [name: string]: any; }): { [name: string]: any; }; } declare class ODataPropertyAnnotations extends ODataAnnotations { union(other: ODataPropertyAnnotations): ODataPropertyAnnotations; clone(): ODataPropertyAnnotations; data(data: { [name: string]: any; }): any; } declare class ODataEntityAnnotations extends ODataAnnotations { union(other: ODataEntityAnnotations): ODataEntityAnnotations; clone(): ODataEntityAnnotations; data(data: { [name: string]: any; }): any; get id(): string | undefined; get etag(): string | undefined; get mediaEtag(): string | undefined; get metadataEtag(): string | undefined; get readLink(): string | undefined; get editLink(): string | undefined; get mediaReadLink(): string | undefined; get mediaEditLink(): string | undefined; get mediaContentType(): string | undefined; private _properties?; get properties(): Map>; property(name: keyof T, type: 'collection'): ODataEntitiesAnnotations; property(name: keyof T, type: 'single'): ODataEntityAnnotations; private _functions?; get functions(): { [name: string]: any; }; function(name: string): any; } declare class ODataEntitiesAnnotations extends ODataAnnotations { union(other: ODataEntitiesAnnotations): ODataEntitiesAnnotations; clone(): ODataEntitiesAnnotations; data(data: { [name: string]: any; }): any; get readLink(): string | undefined; get count(): number | undefined; get nextLink(): string | undefined; get deltaLink(): string | undefined; get top(): number | undefined; get skip(): number | undefined; get skiptoken(): string | undefined; private _functions?; get functions(): { [name: string]: any; }; function(name: string): any; entity(): ODataEntityAnnotations; } declare class ODataAnnotation { term: string; string?: string; bool?: boolean; int?: number; permissions?: string[]; properties?: string[]; constructor(annot: ODataAnnotationConfig); } declare class ODataAnnotatable { annotations: ODataAnnotation[]; constructor(config: { annotations?: ODataAnnotationConfig[]; }); /** * Find an annotation inside the annotatable. * @param predicate Function that returns true if the annotation match. * @returns The annotation that matches the predicate. */ findAnnotation(predicate: (annot: ODataAnnotation) => boolean): ODataAnnotation | undefined; /** * Find an annotation inside the annotatable and return its value. * @param term The term of the annotation to find. * @returns The value of the annotation. */ annotatedValue(term: string | RegExp): T | undefined; } declare class ODataSchemaElement extends ODataAnnotatable { name: string; schema: ODataSchema; constructor(config: { annotations?: ODataAnnotationConfig[]; name: string; }, schema: ODataSchema); get api(): angular_odata.ODataApi; /** * Create a nicer looking title. * Titleize is meant for creating pretty output. * @param term The term of the annotation to find. * @returns The titleized string. */ titleize(term?: string | RegExp): string; /** * Returns a full type of the structured type including the namespace/alias. * @param alias Use the alias of the namespace instead of the namespace. * @returns The string representation of the type. */ type({ alias }?: { alias?: boolean; }): string; /** * Returns a boolean indicating if the structured type is of the given type. * @param type String representation of the type * @returns True if the callable is type of the given type */ isTypeOf(element: ODataSchemaElement): boolean; /** * Returns a boolean indicating if the structured type is a subtype of the given type. * @param type String representation of the type * @returns True if the callable is type of the given type */ isSubtypeOf(element: ODataSchemaElement): boolean; /** * Returns a boolean indicating if the structured type is a supertype of the given type. * @param type String representation of the type * @returns True if the callable is type of the given type */ isSupertypeOf(element: ODataSchemaElement): boolean; } declare class ODataParserSchemaElement> extends ODataSchemaElement { parser: P; constructor(config: { annotations?: ODataAnnotationConfig[]; name: string; }, schema: ODataSchema, parser: P); } declare const EDM_PARSERS: { [type: string]: FieldParser; }; declare class ODataEnumTypeFieldParser extends ODataAnnotatable { name: string; value: number; constructor(name: string, field: ODataEnumTypeFieldConfig); titleize(term?: string | RegExp): string; } declare class ODataEnumTypeParser extends ODataAnnotatable implements FieldParser { name: string; namespace: string; alias?: string; flags?: boolean; members: { [name: string]: number; } | { [value: number]: string; }; private _fields; parserOptions?: ParserOptions; constructor(config: ODataEnumTypeConfig, namespace: string, alias?: string); configure({ options }: { options: ParserOptions; }): void; isTypeOf(type: string): boolean; fields(namesValue?: string | number | number[]): ODataEnumTypeFieldParser[]; field(nameValue: string | number): ODataEnumTypeFieldParser | undefined; /** * Map the fields of the enum type. * @param mapper Function that maps the value to the new value * @returns The fields mapped by the mapper */ mapFields(mapper: (field: ODataEnumTypeFieldParser) => R): R[]; deserialize(value: string, options?: ParserOptions): E; serialize(value: E, options?: ParserOptions): string | undefined; encode(value: E, options?: ParserOptions): any; toJsonSchema(): { title: string; type: JsonType; items: { type: JsonType; }; enum?: undefined; } | { type: JsonType; enum: number[]; title?: undefined; items?: undefined; }; validate(value: string | number, { method, navigation, }?: { method?: 'create' | 'update' | 'modify'; navigation?: boolean; }): string[] | undefined; unpack(value: string | number): number[]; pack(value: string | number | number[]): number; } type JsonSchemaSelect = Array; type JsonSchemaCustom = { [P in keyof T]?: (schema: any, field: ODataStructuredTypeFieldParser) => any; }; type JsonSchemaExpand = { [P in keyof T]?: JsonSchemaOptions; }; type JsonSchemaRequired = { [P in keyof T]?: boolean; }; type JsonSchemaOptions = { select?: JsonSchemaSelect; custom?: JsonSchemaCustom; expand?: JsonSchemaExpand; required?: JsonSchemaRequired; }; declare class ODataEntityTypeKey { name: string; alias?: string; constructor({ name, alias }: { name: string; alias?: string; }); } declare class ODataReferential { property: string; referencedProperty: string; constructor({ property, referencedProperty }: { property: string; referencedProperty: string; }); } declare class ODataStructuredTypeFieldParser extends ODataAnnotatable implements FieldParser { name: string; private structured; type: string | EdmType; private parser; collection: boolean; navigation: boolean; nullable?: boolean; default?: any; maxLength?: number; precision?: number; scale?: number | 'variable'; referentials: ODataReferential[]; parserOptions?: ParserOptions; constructor(name: string, structured: ODataStructuredTypeParser, field: ODataStructuredTypeFieldConfig); validate(value: any, { method, navigation, }?: { method?: 'create' | 'update' | 'modify'; navigation?: boolean; }): { [name: string]: any; } | { [name: string]: any; }[] | string[] | undefined; private parse; deserialize(value: any, options?: ParserOptions): T | T[]; private toJson; serialize(value: T, options?: ParserOptions): any; encode(value: T, options?: ParserOptions): string; configure({ options, parserForType, }: { options: ParserOptions; parserForType: (type: string) => Parser; }): void; toJsonSchema(options?: JsonSchemaOptions): any; isKey(): boolean; hasReferentials(): boolean; isEdmType(): boolean; isEnumType(): boolean; enumType(): ODataEnumTypeParser; isStructuredType(): boolean; structuredType(): ODataStructuredTypeParser; field(name: string): ODataStructuredTypeFieldParser; } declare class ODataStructuredTypeParser extends ODataAnnotatable implements Parser { name: string; namespace: string; open: boolean; children: ODataStructuredTypeParser[]; alias?: string; base?: string; parent?: ODataStructuredTypeParser; private _keys?; private _fields; parserOptions?: ParserOptions; constructor(config: ODataStructuredTypeConfig, namespace: string, alias?: string); addField(name: string, config: ODataStructuredTypeFieldConfig): ODataStructuredTypeFieldParser; /** * Create a nicer looking title. * Titleize is meant for creating pretty output. * @param term The term of the annotation to find. * @returns The titleized string. */ titleize(term?: string | RegExp): string; isTypeOf(type: string): boolean; isSubtypeOf(type: string): boolean; isSupertypeOf(type: string): boolean; isOpenType(): boolean; findChildParser(predicate: (p: ODataStructuredTypeParser) => boolean): ODataStructuredTypeParser | undefined; childParser(predicate: (p: ODataStructuredTypeParser) => boolean): Parser; deserialize(value: any, options?: ParserOptions): T; serialize(value: Partial, options?: ParserOptions): any; encode(value: T, options?: ParserOptions): any; configure({ options, parserForType, }: { options: ParserOptions; parserForType: (type: string) => Parser; }): void; /** * Returns all fields of the structured type. * @param include_navigation Include navigation properties in the result. * @param include_parents Include the parent types in the result. * @returns All fields of the structured type. */ fields({ include_navigation, include_parents, }: { include_parents: boolean; include_navigation: boolean; }): ODataStructuredTypeFieldParser[]; /** * Returns the keys of the structured type. * @param include_parents Include the parent fields * @returns The keys of the structured type */ keys({ include_parents }: { include_parents: boolean; }): ODataEntityTypeKey[]; isEntityType(): boolean; isComplexType(): boolean; /** * Find the field parser for the given field name. * @param name Name of the field * @returns The field parser */ field(name: keyof T): ODataStructuredTypeFieldParser; /** * Picks the fields from attributes. * @param attrs * @param include_parents Include the parent fields * @param include_navigation Include the navigation fields * @param include_etag Include the etag field * @returns The picked fields */ pick(attrs: { [name: string]: any; }, { include_id, include_key, include_parents, include_navigation, include_computed, include_etag, options, }?: { include_id?: boolean; include_key?: boolean; include_parents?: boolean; include_navigation?: boolean; include_computed?: boolean; include_etag?: boolean; options?: ParserOptions; }): Partial; resolveKey(value: any, { resolve, single }?: { resolve?: boolean; single?: boolean; }): any; defaults(): { [name: string]: any; }; toJsonSchema(options?: JsonSchemaOptions): any; validate(attrs: any, { method, navigation, }?: { create?: boolean; method?: 'create' | 'update' | 'modify'; navigation?: boolean; }): { [name: string]: any; } | undefined; } declare class ODataParameterParser { name: string; type: string; private parser; collection?: boolean; nullable?: boolean; parserOptions?: ParserOptions; constructor(name: string, parameter: ODataParameterConfig); serialize(value: T, options?: ParserOptions): any; encode(value: any, options?: ParserOptions): any; configure({ options, parserForType, }: { options: ParserOptions; parserForType: (type: string) => Parser; }): void; isEdmType(): boolean; isEnumType(): boolean; enumType(): ODataEnumTypeParser; isStructuredType(): boolean; structuredType(): ODataStructuredTypeParser; field(name: string): angular_odata.ODataStructuredTypeFieldParser; } declare class ODataCallableParser implements Parser { name: string; namespace: string; alias?: string; return?: { type: string; collection?: boolean; }; parser: Parser; parameters: ODataParameterParser[]; parserOptions?: ParserOptions; constructor(config: ODataCallableConfig, namespace: string, alias?: string); isTypeOf(type: string): boolean; deserialize(value: any, options?: ParserOptions): R; serialize(params: any, options?: ParserOptions): any; encode(params: any, options?: ParserOptions): any; configure({ options, parserForType, }: { options: ParserOptions; parserForType: (type: string) => Parser; }): void; binding(): ODataParameterParser | undefined; returnType(): string | undefined; } declare class ODataCallable extends ODataParserSchemaElement> { entitySetPath?: string; bound?: boolean; composable?: boolean; constructor(config: ODataCallableConfig, schema: ODataSchema); path(): string; configure({ options }: { options: ParserOptions; }): void; /** * Deseialize the given value from the callable. * @param value Value to deserialize * @param options Options for deserialization * @returns Deserialized value */ deserialize(value: any, options?: ParserOptions): any; /** * Serialize the given value for the callable. * @param value Value to serialize * @param options Options for serialization * @returns Serialized value */ serialize(value: any, options?: ParserOptions): any; /** * Encode the given value for the callable. * @param value Value to encode * @param options Options for encoding * @returns Encoded value */ encode(value: any, options?: ParserOptions): any; /** * Returns the binding parameter of the callable. * @returns The binding parameter of the callable. */ binding(): angular_odata.ODataParameterParser | undefined; returnType(): string | undefined; } declare class ODataEntitySet extends ODataSchemaElement { entityType: string; service: { new (...params: any[]): any; }; constructor(config: ODataEntitySetConfig, schema: ODataSchema); } declare class ODataSingleton extends ODataSchemaElement { singletonType: string; service: { new (...params: any[]): any; }; constructor(config: ODataSingletonConfig, schema: ODataSchema); } declare class ODataEntityContainer extends ODataSchemaElement { entitySets: ODataEntitySet[]; singletons: ODataSingleton[]; constructor(config: ODataEntityContainerConfig, schema: ODataSchema); } declare class ODataEnumType extends ODataParserSchemaElement> { members: { [name: string]: number; } | { [value: number]: string; }; constructor(config: ODataEnumTypeConfig, schema: ODataSchema); configure({ options }: { options: ParserOptions; }): void; /** * Returns the fields of the enum type. * @returns The fields of the enum type. */ fields(namesValue?: string | number): ODataEnumTypeFieldParser[]; /** * Find a field by name or value. * @param enu The name or value of the field * @returns The field with the given name or value */ field(nameValue: string | number): ODataEnumTypeFieldParser | undefined; /** * Map the fields of the enum type. * @param mapper Function that maps the value to the new value * @returns The fields mapped by the mapper */ mapFields(mapper: (field: ODataEnumTypeFieldParser) => T): T[]; /** * Deseialize the given value from the enum type. * @param value Value to deserialize * @param options Options for deserialization * @returns Deserialized value */ deserialize(value: any, options?: ParserOptions): E; /** * Serialize the given value for the enum type. * @param value Value to serialize * @param options Options for serialization * @returns Serialized value */ serialize(value: E, options?: ParserOptions): any; /** * Encode the given value for the enum type. * @param value Value to encode * @param options Options for encoding * @returns Encoded value */ encode(value: E, options?: ParserOptions): any; unpack(value: string | number): number[]; pack(value: string | number | number[]): number; } declare class ODataModel { static options: ModelOptions; static meta: ODataModelOptions; _parent: [ODataModel | ODataCollection>, ODataModelField | null] | null; _resource: ODataResource | null; _resources: { parent: [ODataModel | ODataCollection>, ODataModelField | null] | null; resource: ODataResource | null; }[]; _attributes: Map>; _annotations: ODataEntityAnnotations; _meta: ODataModelOptions; events$: ODataModelEventEmitter; static buildMetaOptions({ config, structuredType, }: { config?: ModelOptions; structuredType: ODataStructuredType; }): ODataModelOptions; constructor(data?: Partial | { [name: string]: any; }, { parent, resource, annots, reset, }?: { parent?: [ ODataModel | ODataCollection>, ODataModelField | null ]; resource?: ODataResource | null; annots?: ODataEntityAnnotations; reset?: boolean; }); resource(): ODataEntityResource | ODataNavigationPropertyResource | ODataPropertyResource | ODataSingletonResource | null; pushResource(resource: ODataEntityResource | ODataNavigationPropertyResource | ODataPropertyResource | ODataSingletonResource | null): void; popResource(): { parent: [ODataModel | ODataCollection>, ODataModelField | null] | null; resource: ODataResource | null; } | undefined; navigationProperty(name: keyof T | string): ODataNavigationPropertyResource; property(name: string): ODataPropertyResource; attach(resource: ODataEntityResource | ODataNavigationPropertyResource | ODataPropertyResource | ODataSingletonResource): void; schema(): ODataStructuredType; annots(): ODataEntityAnnotations; key({ field_mapping, resolve, }?: { field_mapping?: boolean; resolve?: boolean; }): EntityKey | { [name: string]: any; } | undefined; isOpenModel(): boolean; isParentOf(child: ODataModel | ODataCollection>): boolean; referential(attr: ODataModelAttribute | ODataModelField, { field_mapping, resolve }?: { field_mapping?: boolean; resolve?: boolean; }): { [name: string]: any; } | null | undefined; referenced(attr: ODataModelAttribute | ODataModelField, { field_mapping, resolve }?: { field_mapping?: boolean; resolve?: boolean; }): { [name: string]: any; } | null | undefined; _errors?: { [name: string]: any; }; validate({ method, navigation, }?: { method?: 'create' | 'update' | 'modify'; navigation?: boolean; }): { [name: string]: string[]; } | undefined; isValid({ method, navigation, }?: { method?: 'create' | 'update' | 'modify'; navigation?: boolean; }): boolean; defaults(): any; toEntity({ client_id, include_navigation, include_concurrency, include_computed, include_key, include_id, include_non_field, changes_only, field_mapping, chain, }?: { client_id?: boolean; include_navigation?: boolean; include_concurrency?: boolean; include_computed?: boolean; include_key?: boolean; include_id?: boolean; include_non_field?: boolean; changes_only?: boolean; field_mapping?: boolean; chain?: (ODataModel | ODataCollection>)[]; }): T | { [name: string]: any; }; toJson(): T | { [name: string]: any; }; set(path: keyof T | string | string[], value: any, { type }?: { type?: EdmType | string; }): any; get(path: keyof T | string | string[]): any; has(path: keyof T | string | string[]): boolean; reset({ path, silent }?: { path?: keyof T | string | string[]; silent?: boolean; }): void; clear({ silent }?: { silent?: boolean; }): void; assign(entity: Partial | { [name: string]: any; }, { add, merge, remove, reset, reparent, silent, }?: { add?: boolean; merge?: boolean; remove?: boolean; reset?: boolean; reparent?: boolean; silent?: boolean; }): this; clone>(): M; private _request; fetch({ ...options }?: ODataOptions & { options?: ODataOptions; }): Observable; save({ method, navigation, validate, ...options }?: ODataOptions & { method?: 'create' | 'update' | 'modify'; navigation?: boolean; validate?: boolean; options?: ODataOptions; }): Observable; destroy({ ...options }?: ODataOptions & { options?: ODataOptions; }): Observable; /** * Create an execution context for change the internal query of a resource * @param ctx Function to execute */ query(ctx: (q: ODataQueryOptionsHandler, s?: ODataStructuredType) => void): this; /** * Perform a check on the internal state of the model and return true if the model is changed. * @param include_navigation Check in navigation properties * @returns true if the model has changed, false otherwise */ hasChanged({ include_navigation }?: { include_navigation?: boolean; }): boolean; encode(name: keyof T, options?: ParserOptions): any; isNew(): boolean; withResource(resource: any, ctx: (model: this) => R): R; /** * Create an execution context for a given function, where the model is bound to its entity endpoint * @param ctx Context function * @returns The result of the context */ asEntity(ctx: (model: this) => R): R; callFunction(name: string, params: P | null, responseType: 'property' | 'model' | 'collection' | 'none' | 'blob' | 'arraybuffer', options?: ODataFunctionOptions): Observable | ODataCollection> | null | Blob | ArrayBuffer>; callAction(name: string, params: P | null, responseType?: 'property' | 'model' | 'collection' | 'none' | 'blob' | 'arraybuffer', { ...options }?: {} & ODataActionOptions): Observable | ODataCollection> | null | Blob | ArrayBuffer>; cast(type: string, ModelType?: typeof ODataModel): ODataModel & ModelInterface; cast>(type: string, ModelType?: typeof ODataModel): M; fetchNavigationProperty(name: keyof T | string, responseType: 'model' | 'collection', options?: ODataQueryArgumentsOptions): Observable | ODataCollection> | null>; fetchAttribute

(name: keyof T, options?: ODataQueryArgumentsOptions

): Observable

| ODataCollection> | null>; getAttribute

(name: keyof T | string): P | ODataModel

| ODataCollection> | null; setAttribute(name: keyof T, model: ODataModel | ODataCollection> | null, options?: ODataOptions): Observable; setReference(name: keyof T | string, model: ODataModel | ODataCollection> | null, options?: ODataOptions): Observable; get [Symbol.toStringTag](): string; equals(other: ODataModel): boolean; collection(): ODataCollection> | undefined; next(): ODataModel | undefined; prev(): ODataModel | undefined; } declare class ODataCollection> implements Iterable { static model: typeof ODataModel | null; _parent: [ODataModel | ODataCollection>, ODataModelField | null] | null; _resource: ODataEntitySetResource | ODataNavigationPropertyResource | ODataPropertyResource | null; _resources: { parent: [ODataModel | ODataCollection>, ODataModelField | null] | null; resource: ODataEntitySetResource | ODataNavigationPropertyResource | ODataPropertyResource | null; }[]; _annotations: ODataEntitiesAnnotations; _entries: ODataModelEntry[]; _model: typeof ODataModel; models(): M[]; get length(): number; events$: ODataModelEventEmitter; constructor(entities?: Partial[] | { [name: string]: any; }[], { parent, resource, annots, model, reset, }?: { parent?: [ODataModel, ODataModelField]; resource?: ODataResource | null; annots?: ODataEntitiesAnnotations; model?: typeof ODataModel; reset?: boolean; }); isParentOf(child: ODataModel | ODataCollection>): boolean; resource(): ODataEntitySetResource | ODataNavigationPropertyResource | ODataPropertyResource | null; pushResource(resource: ODataEntitySetResource | ODataNavigationPropertyResource | ODataPropertyResource | null): void; popResource(): { parent: [ODataModel | ODataCollection>, ODataModelField | null] | null; resource: ODataEntitySetResource | ODataNavigationPropertyResource | ODataPropertyResource | null; } | undefined; attach(resource: ODataEntitySetResource | ODataNavigationPropertyResource | ODataPropertyResource): void; withResource(resource: ODataEntitySetResource | ODataNavigationPropertyResource | ODataPropertyResource | null, ctx: (collection: this) => R): R; asEntitySet(ctx: (collection: this) => R): R; annots(): ODataEntitiesAnnotations; private modelFactory; toEntities({ client_id, include_navigation, include_concurrency, include_computed, include_key, include_id, include_non_field, changes_only, field_mapping, chain, }?: { client_id?: boolean; include_navigation?: boolean; include_concurrency?: boolean; include_computed?: boolean; include_key?: boolean; include_id?: boolean; include_non_field?: boolean; changes_only?: boolean; field_mapping?: boolean; chain?: (ODataModel | ODataCollection>)[]; }): (Partial | { [name: string]: any; })[]; toJson(): (Partial | { [name: string]: any; })[]; hasChanged({ include_navigation }?: { include_navigation?: boolean; }): boolean; clone>(): C; private _request; fetch({ add, merge, remove, withCount, ...options }?: ODataOptions & { add?: boolean; merge?: boolean; remove?: boolean; withCount?: boolean; }): Observable; fetchAll({ add, merge, remove, withCount, ...options }?: ODataOptions & { add?: boolean; merge?: boolean; remove?: boolean; withCount?: boolean; }): Observable; fetchMany(top: number, { add, merge, remove, withCount, ...options }?: ODataOptions & { add?: boolean; merge?: boolean; remove?: boolean; withCount?: boolean; }): Observable; fetchOne({ add, merge, remove, withCount, ...options }?: ODataOptions & { add?: boolean; merge?: boolean; remove?: boolean; withCount?: boolean; }): Observable; /** * Save all models in the collection * @param relModel The model is relationship * @param method The method to use * @param options HttpOptions */ save({ relModel, method, ...options }?: ODataOptions & { relModel?: boolean; method?: 'update' | 'modify'; }): Observable; private _addServer; private _addModel; add(model: M, { silent, reparent, server, merge, position, reset, }?: { silent?: boolean; reparent?: boolean; server?: boolean; merge?: boolean; position?: number; reset?: boolean; }): Observable; private _removeServer; private _removeModel; remove(model: M, { silent, server, reset, }?: { silent?: boolean; server?: boolean; reset?: boolean; }): Observable; private _moveModel; create(attrs?: T, { silent, server }?: { silent?: boolean; server?: boolean; }): Observable; set(path: string | string[], value: any, {}: {} & ModelFieldOptions): any; get(path: number): M | undefined; get(path: string | string[]): any; has(path: number | string | string[]): boolean; reset({ path, silent }?: { path?: string | string[]; silent?: boolean; }): void; clear({ silent }?: { silent?: boolean; }): void; assign(objects: Partial[] | { [name: string]: any; }[] | M[], { add, merge, remove, reset, reparent, silent, }?: { add?: boolean; merge?: boolean; remove?: boolean; reset?: boolean; reparent?: boolean; silent?: boolean; }): M[]; query(ctx: (q: ODataQueryOptionsHandler, s?: ODataStructuredType) => void): this; callFunction(name: string, params: P | null, responseType: 'property' | 'model' | 'collection' | 'none', options?: ODataFunctionOptions): Observable | ODataCollection> | null>; callAction(name: string, params: P | null, responseType: 'property' | 'model' | 'collection' | 'none', options?: ODataActionOptions): Observable | ODataCollection> | null>; private _unlink; private _link; private _findEntry; equals(other: ODataCollection>): boolean; get [Symbol.toStringTag](): string; [Symbol.iterator](): Iterator; filter(predicate: (value: M, index: number, array: M[]) => unknown, thisArg?: any): M[]; map(callbackfn: (value: M, index: number, array: M[]) => U, thisArg?: any): U[]; find(predicate: (value: M, index: number, obj: M[]) => unknown): M | undefined; reduce(callbackfn: (previousValue: U, currentValue: M, currentIndex: number, array: M[]) => U, initialValue: U): U; first(): M | undefined; last(): M | undefined; next(model: M): M | undefined; prev(model: M): M | undefined; every(predicate: (m: M, index: number) => boolean): boolean; some(predicate: (m: M, index: number) => boolean): boolean; includes(model: M, start?: number): boolean; indexOf(model: M): number; forEach(predicate: (value: M, index: number, array: M[]) => void, thisArg?: any): void; isEmpty(): boolean; private _compare; _sortBy: { field: string | keyof T; order?: 1 | -1; }[] | null; isSorted(): boolean; sort(by: { field: string | keyof T; order?: 1 | -1; comparator?: (a: any, b: any) => number; }[], { silent }?: { silent?: boolean; }): void; } declare class ODataStructuredType extends ODataParserSchemaElement> { base?: string; parent?: ODataStructuredType; children: ODataStructuredType[]; model?: typeof ODataModel; collection?: typeof ODataCollection>; constructor(config: ODataStructuredTypeConfig, schema: ODataSchema); configure({ options }: { options: ParserOptions; }): void; /** * Returns a boolean indicating if the structured type is a subtype of the given type. * @param type String representation of the type * @returns True if the callable is type of the given type */ isSubtypeOf(schema: ODataStructuredType): boolean; /** * Returns a boolean indicating if the structured type is a supertype of the given type. * @param type String representation of the type * @returns True if the callable is type of the given type */ isSupertypeOf(schema: ODataStructuredType): boolean; /** * Returns a boolean indicating if the structured type has a simple key. * @returns True if the structured type has a simple key */ isSimpleKey(): boolean; /** * Returns a boolean indicating if the structured type has a compound key. * @returns True if the structured type has a compound key. */ isCompoundKey(): boolean; isOpenType(): boolean; isEntityType(): boolean; isComplexType(): boolean; /** * Find the field parser for the given field name. * @param name Name of the field * @returns The field parser */ field(name: keyof T): ODataStructuredTypeFieldParser; addField(name: string, config: ODataStructuredTypeFieldConfig): ODataStructuredTypeFieldParser; /** * Find a parent schema of the structured type. * @param predicate Function for evaluate the schemas in the hierarchy. * @returns The schema that matches the predicate. */ findParentSchema(predicate: (p: ODataStructuredType) => boolean): ODataStructuredType | undefined; findChildSchema(predicate: (p: ODataStructuredType) => boolean): ODataStructuredType | undefined; /** * Find a parent schema of the structured type for the given field. * @param field Field that belongs to the structured type * @returns The schema of the field */ findParentSchemaForField(field: ODataStructuredTypeFieldParser): ODataStructuredType; /** * Picks the fields from attributes. * @param attrs * @param include_parents Include the parent fields * @param include_navigation Include the navigation fields * @param include_etag Include the etag field * @returns The picked fields */ pick(attrs: { [name: string]: any; }, { include_id, include_key, include_parents, include_navigation, include_computed, include_etag, }?: { include_id?: boolean; include_key?: boolean; include_parents?: boolean; include_navigation?: boolean; include_computed?: boolean; include_etag?: boolean; }): Partial; /** * Deseialize the given value from the structured type. * @param value Value to deserialize * @param options Options for deserialization * @returns Deserialized value */ deserialize(value: any, options?: ParserOptions): T; /** * Serialize the given value for the structured type. * @param value Value to serialize * @param options Options for serialization * @returns Serialized value */ serialize(value: T, options?: ParserOptions): any; /** * Encode the given value for the structured type. * @param value Value to encode * @param options Options for encoding * @returns Encoded value */ encode(value: T, options?: ParserOptions): any; /** * Returns all fields of the structured type. * @param include_navigation Include navigation properties in the result. * @param include_parents Include the parent types in the result. * @returns All fields of the structured type. */ fields({ include_navigation, include_parents, }: { include_parents: boolean; include_navigation: boolean; }): ODataStructuredTypeFieldParser[]; /** * Returns the keys of the structured type. * @param include_parents Include the parent fields * @returns The keys of the structured type */ keys({ include_parents, }?: { include_parents?: boolean; }): ODataEntityTypeKey[]; /** * Resolve the key of the structured type for the given value. * @param attrs Attributes of the value * @returns Resolved key */ resolveKey(attrs: T | { [name: string]: any; }): any; /** * Returns the defaults values for the structured type. * @returns Default values for the structured type */ defaults(): { [name: string]: any; }; /** * Convert the structured type to json schema * @param options Options for json schema * @returns Json Schema */ toJsonSchema(options?: JsonSchemaOptions): any; /** * Validate the given value against the structured type. * @param attrs Attributes of the value * @param method Method to use for the process validation * @returns Object with the errors */ validate(attrs: Partial, { method, navigation, }?: { method?: 'create' | 'update' | 'modify'; navigation?: boolean; }): { [name: string]: any; } | undefined; } declare class ODataSchema extends ODataAnnotatable { api: ODataApi; namespace: string; alias?: string; enums: ODataEnumType[]; entities: ODataStructuredType[]; callables: ODataCallable[]; containers: ODataEntityContainer[]; constructor(config: ODataSchemaConfig, api: ODataApi); isNamespaceOf(type: string): boolean; get entitySets(): ODataEntitySet[]; get singletons(): ODataSingleton[]; createStructuredType(config: ODataStructuredTypeConfig): ODataStructuredType; configure({ options }: { options: ParserOptions; }): void; } type ODataOptions = { etag?: string; context?: HttpContext; headers?: HttpHeaders | { [header: string]: string | string[]; }; params?: HttpParams | { [param: string]: string | number | boolean | ReadonlyArray; }; reportProgress?: boolean; withCredentials?: boolean; fetchPolicy?: FetchPolicy; parserOptions?: ParserOptions; }; type ODataEntityOptions = ODataOptions & { responseType?: 'entity'; }; type ODataEntitiesOptions = ODataOptions & { responseType?: 'entities'; withCount?: boolean; }; type ODataPropertyOptions = ODataOptions & { responseType?: 'property'; }; type ODataQueryArgumentsOptions = ODataOptions & ODataQueryArguments; type ODataActionOptions = ODataQueryArgumentsOptions; type ODataFunctionOptions = ODataQueryArgumentsOptions & { alias?: boolean; }; declare class ODataRequest { readonly api: ODataApi; readonly observe: 'events' | 'response'; readonly context?: HttpContext; readonly reportProgress?: boolean; readonly withCredentials?: boolean; readonly bodyQueryOptions: QueryOption[]; readonly fetchPolicy: 'cache-first' | 'cache-and-network' | 'network-only' | 'no-cache' | 'cache-only'; readonly resource: ODataResource; private readonly _responseType?; private readonly _method; private readonly _body; private readonly _headers; private readonly _params; private readonly _path; constructor(init: { method: string; api: ODataApi; resource: ODataResource; body: any; observe: 'events' | 'response'; context?: HttpContext; etag?: string; headers?: HttpHeaders | { [header: string]: string | string[]; }; reportProgress?: boolean; params?: HttpParams | { [param: string]: string | number | boolean | ReadonlyArray; }; responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities'; fetchPolicy?: FetchPolicy; parserOptions?: ParserOptions; withCredentials?: boolean; bodyQueryOptions?: QueryOption[]; }); static factory(api: ODataApi, method: string, resource: ODataResource, options: ODataOptions & { body?: any; etag?: string; responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities'; observe: 'events' | 'response'; withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): ODataRequest; get responseType(): 'arraybuffer' | 'blob' | 'json' | 'text'; get path(): string; get method(): string; get body(): any; get params(): HttpParams; get headers(): HttpHeaders; get pathWithParams(): string; get url(): string; get urlWithParams(): string; get cacheKey(): string; isQueryBody(): boolean; isBatch(): boolean; isFetch(): boolean; isMutate(): boolean; } declare class ODataResponseOptions implements ResponseOptions { version: ODataVersion; streaming?: boolean; metadata?: ODataMetadataType; ieee754Compatible?: boolean; location?: string; cacheability?: 'public' | 'private' | 'no-cache' | 'no-store'; maxAge?: number; constructor(config: ParserOptions); get helper(): ODataVersionHelper; clone(): ODataResponseOptions; setFeatures(features: string): void; setVersion(version: string): void; setLocation(location: string): void; setPreferenceApplied(preference: string): void; setCache(cacheControl: string): void; } type ODataEntity = { entity: T | null; annots: ODataEntityAnnotations; }; type ODataEntities = { entities: T[] | null; annots: ODataEntitiesAnnotations; }; type ODataProperty = { property: T | null; annots: ODataPropertyAnnotations; }; type ODataResponseJson = { body: T | null; headers: { [name: string]: string | string[]; }; status: number; statusText: string; url: string | null; }; /** * OData Response */ declare class ODataResponse extends HttpResponse { readonly api: ODataApi; readonly resource: ODataResource; constructor(init: { api: ODataApi; resource: ODataResource; body: T | null; headers: HttpHeaders; status: number; statusText: string; url?: string; }); static fromHttpResponse(req: ODataRequest, res: HttpResponse): ODataResponse; static fromJson(req: ODataRequest, json: ODataResponseJson): ODataResponse; toJson(): ODataResponseJson; private _options?; get options(): ODataResponseOptions; private _payload?; get payload(): any; private _context?; get context(): ODataContext; private _annotations?; get annotations(): Map; /** * Handle the response body as an entity * @returns */ entity(): ODataEntity; /** * Handle the response body as entities * @returns */ entities(): ODataEntities; /** * Handle the response body as a property * @returns */ property(): ODataProperty; /** * Handle the response body as a value * @returns */ value(): T | null; } declare class ODataActionResource extends ODataResource { static factory(api: ODataApi, { path, outgoingType, incomingType, bindingType, segments, }: { path: string; outgoingType?: string; incomingType?: string; bindingType?: string; segments?: ODataPathSegments; }): ODataActionResource; static fromResource(resource: ODataResource, path: string): ODataActionResource; clone(): ODataActionResource; protected post(params: P | null, options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable; /** * Execute the action * @param params Parameters to be sent to the action * @param options Options for the request */ call(params: P | null, options?: ODataEntityOptions): Observable>; call(params: P | null, options?: ODataEntitiesOptions): Observable>; call(params: P | null, options?: ODataPropertyOptions): Observable>; call(params: P | null, options?: { alias?: boolean; responseType?: 'blob'; } & ODataOptions): Observable; call(params: P | null, options?: { alias?: boolean; responseType?: 'arraybuffer'; } & ODataOptions): Observable; call(params: P | null, options?: { alias?: boolean; responseType?: 'none'; } & ODataOptions): Observable; /** * Execute the action and return the result as a property * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callProperty(params: P | null, options?: ODataOptions): Observable; /** * Execute the action and return the result as a entity * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callEntity(params: P | null, options?: ODataOptions): Observable; /** * Execute the action and return the result as a model * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callModel(params: P | null, options?: ODataOptions & { ModelType?: typeof ODataModel; }): Observable<(ODataModel & angular_odata.ModelInterface) | null>; /** * Execute the action and return the result as a entities * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callEntities(params: P | null, options?: ODataOptions): Observable; /** * Execute the action and return the result as a collection * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callCollection(params: P | null, options?: ODataOptions & { CollectionType?: typeof ODataCollection; }): Observable & angular_odata.ModelInterface> | null>; callArraybuffer(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable; callBlob(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable; } declare class ODataApiOptions implements ODataApiConfigOptions { /** * Default OData version */ version: ODataVersion; /** * Send enum as string in the request */ stringAsEnum: boolean; /** * Delete reference by path or by id */ deleteRefBy: 'path' | 'id'; /** * No use parenthesis for empty parameters functions */ nonParenthesisForEmptyParameterFunction: boolean; /** * Strip metadata from the response */ stripMetadata: ODataMetadataType; /** * Use JSON Batch Format */ jsonBatchFormat: boolean; /** * Relative urls * http://docs.oasis-open.org/odata/odata-json-format/v4.0/cs01/odata-json-format-v4.0-cs01.html#_Toc365464682 */ relativeUrls: boolean; /** * Cache fetch policy */ fetchPolicy: FetchPolicy; /** * Extra params to be sent in the request */ params: { [param: string]: string | string[]; }; /** * Extra headers to be sent in the request */ headers: { [param: string]: string | string[]; }; /** * Http request with credentials */ withCredentials?: boolean; /** * Send query options in the request body */ bodyQueryOptions: QueryOption[]; /** * Customize accept header with OData options * @link http://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_RequestingtheJSONFormat */ accept?: { exponentialDecimals?: boolean; ieee754Compatible?: boolean; metadata?: ODataMetadataType; streaming?: boolean; }; etag: { /** * @link http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398229 */ ifMatch: boolean; /** * @link http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398230 */ ifNoneMatch: boolean; }; prefer?: { /** * @link http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398238 */ maxPageSize?: number; /** * @link http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398240 */ return?: 'representation' | 'minimal'; /** * @link http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398236 */ continueOnError?: boolean; /** * @link http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398237 */ includeAnnotations?: string; /** * @link https://devblogs.microsoft.com/odata/extension-omit-null-value-properties-in-asp-net-core-odata/ */ omitNullValues?: boolean; }; constructor(config: ODataApiConfigOptions); get parserOptions(): ParserOptions; get helper(): ODataVersionHelper; } declare class ODataBatchRequest extends Subject { request: ODataRequest; id: string; group: string; constructor(request: ODataRequest); toString(): string; toLegacy({ relativeUrls }?: { relativeUrls?: boolean; }): string; toJson({ relativeUrls }?: { relativeUrls?: boolean; }): { [name: string]: any; }; onLoad(response: HttpResponseBase): void; onError(response: HttpErrorResponse): void; } /** * OData Batch Resource * https://www.odata.org/getting-started/advanced-tutorial/#batch */ declare class ODataBatchResource extends ODataResource { private _requests; requests(): ODataRequest[]; private _responses; responses(): HttpResponseBase[] | null; static factory(api: ODataApi): ODataBatchResource; clone(): ODataBatchResource; private storeRequester; private restoreRequester; /** * Add to batch request * @param ctx The context for the request * @returns The result of execute the context */ add(ctx: (batch: this) => R): R; send(options?: ODataOptions): Observable>; private sendJson; private sendLegacy; /** * Execute the batch request * @param ctx The context for the request * @param options The options of the batch request * @returns The result of execute the context */ exec(ctx: (batch: this) => R, options?: ODataOptions): Observable<[R, ODataResponse]>; body(): string; json(): Object; static buildLegacyBody(batchBoundary: string, requests: ODataBatchRequest[], options: ODataApiOptions): string; static buildJsonBody(requests: ODataBatchRequest[], options: ODataApiOptions): Object; static parseLegacyResponse(requests: ODataBatchRequest[], response: ODataResponse): HttpResponseBase[]; static parseJsonResponse(requests: ODataBatchRequest[], response: ODataResponse): HttpResponseBase[]; } declare class ODataCountResource extends ODataResource { static factory(api: ODataApi, { segments, query, }: { segments: ODataPathSegments; query?: ODataQueryOptions; }): ODataCountResource; clone(): ODataCountResource; protected get(options?: ODataOptions): Observable; /** * Fetch the count of the set. * @param options Options for the request * @returns The count of the set */ fetch(options?: ODataOptions): Observable; } declare class ODataFunctionResource extends ODataResource { static factory(api: ODataApi, { path, outgoingType, incomingType, bindingType, segments, }: { path: string; outgoingType?: string; incomingType?: string; bindingType?: string; segments?: ODataPathSegments; }): ODataFunctionResource; static fromResource(resource: ODataResource, path: string): ODataFunctionResource; clone(): ODataFunctionResource; parameters(params: P | null, { alias }?: { alias?: boolean; }): ODataFunctionResource; protected get(options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable; /** * Execute the function * @param params Parameters to be sent to the function * @param alias If true, the parameters will be send using aliases * @param options Options for the request */ call(params: P | null, options?: { alias?: boolean; } & ODataEntityOptions): Observable>; call(params: P | null, options?: { alias?: boolean; } & ODataEntitiesOptions): Observable>; call(params: P | null, options?: { alias?: boolean; } & ODataPropertyOptions): Observable>; call(params: P | null, options?: { alias?: boolean; responseType?: 'blob'; } & ODataOptions): Observable; call(params: P | null, options?: { alias?: boolean; responseType?: 'arraybuffer'; } & ODataOptions): Observable; call(params: P | null, options?: { alias?: boolean; responseType?: 'none'; } & ODataOptions): Observable; /** * Execute the function with the given parameters and return the result as a property * @param params Parameters to be sent to the function * @param alias If true, the parameters will be send using aliases * @param options Options for the request * @returns Observable of the result of the function */ callProperty(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable; /** * Execute the function with the given parameters and return the result as a entity * @param params Parameters to be sent to the function * @param alias If true, the parameters will be send using aliases * @param options Options for the request * @returns Observable of the result of the function */ callEntity(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable; /** * Execute the function with the given parameters and return the result as a model * @param params Parameters to be sent to the function * @param alias If true, the parameters will be send using aliases * @param options Options for the request * @returns Observable of the result of the function */ callModel(params: P | null, { alias, ModelType, ...options }?: ODataOptions & { alias?: boolean; ModelType?: typeof ODataModel; }): Observable<(ODataModel & angular_odata.ModelInterface) | null>; /** * Execute the function with the given parameters and return the result as a entities * @param params Parameters to be sent to the function * @param alias If true, the parameters will be send using aliases * @param options Options for the request * @returns Observable of the result of the function */ callEntities(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable; /** * Execute the function with the given parameters and return the result as a collection * @param params Parameters to be sent to the function * @param alias If true, the parameters will be send using aliases * @param options Options for the request * @returns Observable of the result of the function */ callCollection(params: P | null, { alias, CollectionType, ...options }?: { alias?: boolean; CollectionType?: typeof ODataCollection; } & ODataOptions): Observable & angular_odata.ModelInterface> | null>; callArraybuffer(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable; callBlob(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable; } declare class ODataMediaResource extends ODataResource { static factory(api: ODataApi, { segments, query, }: { segments: ODataPathSegments; query?: ODataQueryOptions; }): ODataMediaResource; clone(): ODataMediaResource; protected get(options: { responseType: 'arraybuffer' | 'blob'; } & ODataOptions): Observable; protected put(data: ArrayBuffer | Blob, options?: ODataOptions): Observable; fetch(options: { responseType: 'arraybuffer'; } & ODataOptions): Observable; fetch(options: { responseType: 'blob'; } & ODataOptions): Observable; fetchArraybuffer(options?: ODataOptions): Observable; fetchBlob(options?: ODataOptions): Observable; upload(data: ArrayBuffer | Blob, options?: ODataOptions): Observable; uploadArrayBuffer(data: ArrayBuffer, contentType: string, options?: ODataOptions): Observable; uploadBlob(data: Blob, options?: ODataOptions): Observable; } declare class ODataValueResource extends ODataResource { static factory(api: ODataApi, { segments, }: { segments: ODataPathSegments; }): ODataValueResource; static fromResource(resource: ODataResource): ODataValueResource; clone(): ODataValueResource; protected get(options?: ODataOptions): Observable; /** * Fetch the value of the resource. * @param options OData options. * @returns Observable of the value. */ fetch(options?: ODataOptions): Observable; } declare class ODataPropertyResource extends ODataResource { static factory

(api: ODataApi, { path, type, segments, }: { path: string; type?: string; segments: ODataPathSegments; }): ODataPropertyResource

; static fromResource(resource: ODataResource, path: string): ODataPropertyResource; clone(): ODataPropertyResource; transform(opts: (builder: ApplyExpressionBuilder, current?: ApplyExpression) => ApplyExpression, { type, fields, }?: { type?: string; fields?: { [name: string]: ODataStructuredTypeFieldConfig; }; }): ODataPropertyResource; key(value: any): ODataPropertyResource; keys(values: any[]): ODataPropertyResource; value(): ODataValueResource; count(): ODataCountResource; property

(path: string): ODataPropertyResource

; protected get(options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable; /** * Fetch the property * @param options Options for the request * @return The entity / entities / property value */ fetch(options?: ODataEntityOptions): Observable>; fetch(options?: ODataEntitiesOptions): Observable>; fetch(options?: ODataPropertyOptions): Observable>; /** * Fetch the property value * @param options Options for the request * @returns The property value */ fetchProperty(options?: ODataOptions): Observable; /** * Fetch the entity * @param options Options for the request * @returns The entity */ fetchEntity(options?: ODataOptions): Observable; /** * Fetch the entity and return as model * @param options Options for the request * @returns The model */ fetchModel(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; ModelType?: typeof ODataModel; }): Observable<(ODataModel & ModelInterface) | null>; fetchModel>(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; ModelType?: typeof ODataModel; }): Observable; /** * Fetch the entities * @param options Options for the request * @returns The entities */ fetchEntities(options?: ODataOptions & { withCount?: boolean; }): Observable; /** * Fetch the entities and return as collection * @param options Options for the request * @returns The collection */ fetchCollection(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; CollectionType?: typeof ODataCollection; }): Observable & ModelInterface> | null>; fetchCollection, C extends ODataCollection>(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; CollectionType?: typeof ODataCollection; }): Observable; fetchOne(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entity: T | null; annots: ODataEntitiesAnnotations; }>; fetchMany(top: number, options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entities: T[]; annots: ODataEntitiesAnnotations; }>; /** * Fetch all entities * @param options Options for the request * @returns All entities */ fetchAll(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entities: T[]; annots: ODataEntitiesAnnotations; }>; } declare class ODataReferenceResource extends ODataResource { static factory

(api: ODataApi, { segments }: { segments: ODataPathSegments; }): ODataReferenceResource

; clone(): ODataReferenceResource; protected post(target: ODataEntityResource, options?: ODataOptions): Observable; protected put(target: ODataEntityResource, options?: ODataOptions): Observable; protected delete({ etag, target, ...options }?: { etag?: string; target?: ODataEntityResource; } & ODataOptions): Observable; /** * Add the given target to the collection. * @param target The target resource * @param options Options for the request * @returns Observable of the response */ add(target: ODataEntityResource, options?: ODataOptions): Observable; /** * Remove the given target from the collection. * @param target The target resource * @param options Options for the request * @returns Observable of the response */ remove(target?: ODataEntityResource, options?: ODataOptions): Observable; /** * Set the reference to the given target. * @param target The target resource * @param options Options for the request * @returns Observable of the response */ set(target: ODataEntityResource, options?: ODataOptions): Observable; /** * Unset the reference to the given target. * @param options Options for the request. * @returns Observable of the response */ unset(options?: ODataOptions): Observable; /** * Fetch entity / entities * @param options Options for the request * @return An observable of the entity or entities with annotations */ fetch(options?: ODataEntityOptions & { bodyQueryOptions?: QueryOption[]; }): Observable>; fetch(options?: ODataEntitiesOptions & { bodyQueryOptions?: QueryOption[]; }): Observable>; /** * Fetch the entity * @param options Options for the request * @returns The entity */ fetchEntity(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; /** * Fetch entities * @param options Options for the request * @returns The entities */ fetchEntities(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; } /** * OData Navigation Property Resource * https://www.odata.org/getting-started/advanced-tutorial/#containment * https://www.odata.org/getting-started/advanced-tutorial/#derived */ declare class ODataNavigationPropertyResource extends ODataResource { static factory(api: ODataApi, { path, type, segments, }: { path: string; type?: string; segments: ODataPathSegments; }): ODataNavigationPropertyResource; static fromResource(resource: ODataResource, path: string): ODataNavigationPropertyResource; clone(): ODataNavigationPropertyResource; transform(opts: (builder: ApplyExpressionBuilder, current?: ApplyExpression) => ApplyExpression, { type, fields, }?: { type?: string; fields?: { [name: string]: ODataStructuredTypeFieldConfig; }; }): ODataNavigationPropertyResource; key(value: any): ODataNavigationPropertyResource; keys(values: any[]): ODataNavigationPropertyResource; media(): ODataMediaResource; reference(): ODataReferenceResource; navigationProperty(path: string): ODataNavigationPropertyResource; property

(path: string): ODataPropertyResource

; count(): ODataCountResource; cast(type: string): ODataNavigationPropertyResource; protected post(attrs: Partial, options?: ODataOptions): Observable>; protected put(attrs: Partial, options?: ODataOptions): Observable>; protected patch(attrs: Partial, options?: ODataOptions): Observable>; protected delete(options?: ODataOptions): Observable; protected get(options?: ODataEntityOptions & ODataEntitiesOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; /** * Create a new entity * @param attrs The entity attributes * @param options Options for the request * @returns The created entity with the annotations */ create(attrs: Partial, options?: ODataOptions): Observable>; /** * Update an existing entity * @param attrs The entity attributes * @param options Options for the request * @returns The updated entity with the annotations */ update(attrs: Partial, options?: ODataOptions): Observable>; /** * Modify an existing entity * @param attrs The entity attributes * @param options Options for the request * @returns The modified entity with the annotations */ modify(attrs: Partial, options?: ODataOptions): Observable>; /** * Delete an existing entity * @param options Options for the request * @returns An observable of the destroy */ destroy(options?: ODataOptions): Observable; /** * Fetch entity / entities * @param options Options for the request * @return An observable of the entity or entities with annotations */ fetch(options?: ODataEntityOptions & { bodyQueryOptions?: QueryOption[]; }): Observable>; fetch(options?: ODataEntitiesOptions & { bodyQueryOptions?: QueryOption[]; }): Observable>; /** * Fetch the entity * @param options Options for the request * @returns The entity */ fetchEntity(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; /** * Fetch the entity and return as model * @param options Options for the request * @returns The model */ fetchModel(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; ModelType?: typeof ODataModel; }): Observable<(ODataModel & ModelInterface) | null>; fetchModel>(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; ModelType?: typeof ODataModel; }): Observable; /** * Fetch entities * @param options Options for the request * @returns The entities */ fetchEntities(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; /** * Fetch entities and return as collection * @param options Options for the request * @returns The collection */ fetchCollection(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; CollectionType?: typeof ODataCollection; }): Observable & ModelInterface> | null>; fetchCollection, C extends ODataCollection>(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; CollectionType?: typeof ODataCollection; }): Observable; /** * Fetch all entities * @param options Options for the request * @returns All entities */ fetchAll(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entities: T[]; annots: ODataEntitiesAnnotations; }>; fetchMany(top: number, options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entities: T[]; annots: ODataEntitiesAnnotations; }>; fetchOne(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entity: T | null; annots: ODataEntitiesAnnotations; }>; } declare class ODataEntityResource extends ODataResource { static factory(api: ODataApi, { segments, query, }: { segments: ODataPathSegments; query?: ODataQueryOptions; }): ODataEntityResource; clone(): ODataEntityResource; key(value: any): ODataEntityResource; keys(values: any[]): ODataEntityResource; media(): ODataMediaResource; navigationProperty(path: string): ODataNavigationPropertyResource; property

(path: string): ODataPropertyResource

; action(path: string): ODataActionResource; function(path: string): ODataFunctionResource; cast(type: string): ODataEntityResource; protected post(attrs: Partial, options?: ODataOptions): Observable; protected put(attrs: Partial, options?: ODataOptions): Observable; protected patch(attrs: Partial, options?: ODataOptions): Observable; protected delete(options?: ODataOptions): Observable; protected get(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; create(attrs: Partial, options?: ODataOptions): Observable>; update(attrs: Partial, options?: ODataOptions): Observable>; modify(attrs: Partial, options?: ODataOptions): Observable>; destroy(options?: ODataOptions): Observable; fetch(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable>; fetchEntity(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; fetchModel(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; ModelType?: typeof ODataModel; }): Observable<(ODataModel & ModelInterface) | null>; fetchModel>(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; ModelType?: typeof ODataModel; }): Observable; } declare class ODataEntitySetResource extends ODataResource { static factory(api: ODataApi, { path, type, query, }: { path: string; type?: string; query?: ODataQueryOptions; }): ODataEntitySetResource; clone(): ODataEntitySetResource; transform(opts: (builder: ApplyExpressionBuilder, current?: ApplyExpression) => ApplyExpression, { type, fields, }?: { type?: string; fields?: { [name: string]: ODataStructuredTypeFieldConfig; }; }): ODataEntitySetResource; entity(key?: any): ODataEntityResource; action(path: string): ODataActionResource; function(path: string): ODataFunctionResource; count(): ODataCountResource; cast(type: string): ODataEntitySetResource; protected post(attrs: Partial, options?: ODataOptions): Observable; protected get(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable; create(attrs: Partial, options?: ODataOptions): Observable>; fetch(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable>; fetchAll(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entities: any[]; annots: angular_odata.ODataEntitiesAnnotations; }>; fetchMany(top: number, options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entities: T[]; annots: angular_odata.ODataEntitiesAnnotations; } | { entities: T[]; annots: angular_odata.ODataEntitiesAnnotations; }>; fetchOne(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable<{ entity: T | null; annots: angular_odata.ODataEntitiesAnnotations; }>; fetchEntities(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable; fetchCollection(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; CollectionType?: typeof ODataCollection; }): Observable & ModelInterface> | null>; fetchCollection, C extends ODataCollection>(options?: ODataOptions & { withCount?: boolean; bodyQueryOptions?: QueryOption[]; CollectionType?: typeof ODataCollection; }): Observable; } declare class CsdlTypeDefinition extends CsdlAnnotable { private schema; Name: string; UnderlayingType: string; MaxLength?: number; Precision?: number; Scale?: number; Unicode?: boolean; SRID?: string; constructor(schema: CsdlSchema, { Name, UnderlayingType, MaxLength, Precision, Scale, Unicode, SRID, Annotation, }: { Name: string; UnderlayingType: string; MaxLength?: number; Precision?: number; Scale?: number; Unicode?: boolean; SRID?: string; Annotation?: CsdlAnnotation[]; }); toJson(): { [key: string]: any; }; } declare class CsdlEnumType extends CsdlAnnotable { private schema; Name: string; Member: CsdlMember[]; UnderlyingType?: string; IsFlags?: boolean; constructor(schema: CsdlSchema, { Name, Member, UnderlyingType, IsFlags, Annotation, }: { Name: string; Member: any[]; UnderlyingType?: string; IsFlags?: boolean; Annotation?: any[]; }); toJson(): { [key: string]: any; }; name(): string; namespace(): string; fullName(): string; toConfig(base?: Partial): ODataEnumTypeConfig; } declare class CsdlMember extends CsdlAnnotable { Name: string; Value?: number; constructor({ Name, Value, Annotation }: { Name: string; Value?: number; Annotation?: any[]; }); toJson(): { [key: string]: any; }; toConfig(base?: Partial): ODataEnumTypeFieldConfig; } declare abstract class CsdlStructuralProperty extends CsdlAnnotable { Name: string; Type: string; Collection: boolean; Nullable?: boolean; constructor({ Name, Type, Nullable, Annotation, }: { Name: string; Type: string; Nullable?: boolean; Annotation?: any[]; }); toJson(): { [key: string]: any; }; } declare class CsdlProperty extends CsdlStructuralProperty { MaxLength?: number; Precision?: number; Scale?: number; Unicode?: boolean; SRID?: string; DefaultValue?: string; constructor({ Name, Type, Nullable, MaxLength, Precision, Scale, Unicode, SRID, DefaultValue, Annotation, }: { Name: string; Type: string; Nullable?: boolean; MaxLength?: number; Precision?: number; Scale?: number; Unicode?: boolean; SRID?: string; DefaultValue?: string; Annotation?: any[]; }); toJson(): { [key: string]: any; }; toConfig(): ODataStructuredTypeFieldConfig & { name: string; }; } declare class CsdlNavigationProperty extends CsdlStructuralProperty { Partner?: string; ContainsTarget?: boolean; ReferentialConstraints?: CsdlReferentialConstraint[]; OnDelete?: CsdlOnDelete; constructor({ Name, Type, Nullable, Partner, ContainsTarget, ReferentialConstraints, OnDelete, Annotation, }: { Name: string; Type: string; Nullable?: boolean; Partner?: string; ContainsTarget?: boolean; ReferentialConstraints?: any[]; OnDelete?: any; Annotation?: any[]; }); toJson(): { [key: string]: any; }; toConfig(): ODataStructuredTypeFieldConfig & { name: string; }; } declare class CsdlReferentialConstraint { Property: string; ReferencedProperty: string; constructor({ Property, ReferencedProperty }: { Property: string; ReferencedProperty: string; }); toJson(): { Property: string; ReferencedProperty: string; }; } declare class CsdlOnDelete { Action: string; constructor({ Action }: { Action: string; }); toJson(): { Action: string; }; } declare class CsdlStructuredType extends CsdlAnnotable { private schema; Name: string; Property?: CsdlProperty[]; NavigationProperty?: CsdlNavigationProperty[]; BaseType?: string; OpenType?: boolean; Abstract?: boolean; constructor(schema: CsdlSchema, { Name, Property, NavigationProperty, BaseType, OpenType, Abstract, Annotation, }: { Name: string; Property?: any[]; NavigationProperty?: any[]; BaseType?: string; OpenType?: boolean; Abstract?: boolean; Annotation?: any[]; }); toJson(): { [key: string]: any; }; name(): string; namespace(): string; fullName(): string; } declare class CsdlComplexType extends CsdlStructuredType { constructor(schema: CsdlSchema, { Name, Property, NavigationProperty, BaseType, OpenType, Abstract, Annotation, }: { Name: string; Property?: any[]; NavigationProperty?: any[]; BaseType?: string; OpenType?: boolean; Abstract?: boolean; Annotation?: any[]; }); toJson(): { [key: string]: any; }; toConfig(base?: Partial): ODataStructuredTypeConfig; } declare class CsdlEntityType extends CsdlStructuredType { Key?: CsdlKey; HasStream?: boolean; constructor(schema: CsdlSchema, { Name, Key, Property, NavigationProperty, BaseType, OpenType, Abstract, HasStream, Annotation, }: { Name: string; Key?: any; Property?: any[]; NavigationProperty?: any[]; BaseType?: string; OpenType?: boolean; Abstract?: boolean; HasStream?: boolean; Annotation?: any[]; }); toJson(): { [key: string]: any; }; toConfig(base?: Partial): ODataStructuredTypeConfig; } declare class CsdlKey { PropertyRef: CsdlPropertyRef[]; constructor({ PropertyRef }: { PropertyRef: any[]; }); toJson(): { PropertyRef: { Name: string; Alias: string | undefined; }[]; }; toConfig(): { name: string; alias?: string; }[]; } declare class CsdlPropertyRef { Name: string; Alias?: string; constructor({ Name, Alias }: { Name: string; Alias?: string; }); toJson(): { Name: string; Alias: string | undefined; }; toConfig(): { name: string; alias?: string; }; } declare class CsdlNavigationPropertyBinding { Path: string; Target: string; constructor({ Path, Target }: { Path: string; Target: string; }); toJson(): { Path: string; Target: string; }; } declare class CsdlEntitySet extends CsdlAnnotable { private container; Name: string; EntityType: string; NavigationPropertyBinding?: CsdlNavigationPropertyBinding[]; IncludeInServiceDocument?: boolean; constructor(container: CsdlEntityContainer, { Name, EntityType, NavigationPropertyBinding, IncludeInServiceDocument, Annotation, }: { Name: string; EntityType: string; NavigationPropertyBinding?: any[]; IncludeInServiceDocument?: boolean; Annotation?: any[]; }); toJson(): { [key: string]: any; }; name(): string; namespace(): string; fullName(): string; toConfig(): ODataEntitySetConfig; } declare class CsdlSingleton extends CsdlAnnotable { private container; Name: string; Type: string; NavigationPropertyBindings?: CsdlNavigationPropertyBinding[]; constructor(container: CsdlEntityContainer, { Name, Type, NavigationPropertyBindings, Annotation, }: { Name: string; Type: string; NavigationPropertyBindings?: any[]; Annotation?: any[]; }); toJson(): { [key: string]: any; }; name(): string; namespace(): string; fullName(): string; } declare class CsdlEntityContainer extends CsdlAnnotable { private schema; Name: string; Extend?: string; EntitySet?: CsdlEntitySet[]; Singleton?: CsdlSingleton[]; FunctionImport?: CsdlFunctionImport[]; ActionImport?: CsdlActionImport[]; constructor(schema: CsdlSchema, { Name, Extend, EntitySet, Singleton, FunctionImport, ActionImport, Annotation, }: { Name: string; Extend?: string; EntitySet?: any[]; Singleton?: any[]; FunctionImport?: any[]; ActionImport?: any[]; Annotation?: any[]; }); toJson(): { [key: string]: any; }; name(): string; namespace(): string; fullName(): string; toConfig(base?: Partial): ODataEntityContainerConfig; } declare class CsdlSchema { Namespace: string; Alias?: string; EnumType?: CsdlEnumType[]; ComplexType?: CsdlComplexType[]; EntityType?: CsdlEntityType[]; Function?: CsdlFunction[]; Action?: CsdlAction[]; EntityContainer?: CsdlEntityContainer[]; TypeDefinition?: CsdlTypeDefinition[]; Term?: CsdlTerm[]; Annotations?: CsdlAnnotations[]; constructor({ Namespace, Alias, EnumType, ComplexType, EntityType, Function, Action, EntityContainer, TypeDefinition, Term, Annotations, }: { Namespace: string; Alias?: string; EnumType?: any[]; ComplexType?: any[]; EntityType?: any[]; Function?: any[]; Action?: any[]; EntityContainer?: any[]; TypeDefinition?: any[]; Term?: any[]; Annotations?: any[]; }); toJson(): { [key: string]: any; }; toConfig(base?: Partial): ODataSchemaConfig; } declare class CsdlAnnotable { Annotation?: CsdlAnnotation[]; constructor({ Annotation }: { Annotation?: any[]; }); toJson(): { [key: string]: any; }; toConfig(): { [key: string]: any; }; } declare class CsdlAnnotations extends CsdlAnnotable { private schema; Target: string; Qualifier?: string; constructor(schema: CsdlSchema, { Target, Qualifier, Annotation, }: { Target: string; Qualifier?: string; Annotation: any[]; }); toJson(): { [key: string]: any; }; toConfig(): ODataAnnotationConfig[]; } declare class CsdlAnnotation { Term: string; String?: string; Bool?: boolean; Int?: number; Collection?: CsdlCollection[]; Record?: CsdlRecord[]; EnumMember?: CsdlEnumMember[]; constructor({ Term, String, Bool, Int, Collection, Record, EnumMember, }: { Term: string; String?: string; Bool?: boolean; Int?: number; Collection?: any[]; Record?: any[]; EnumMember?: any[]; }); toJson(): { [key: string]: any; }; toConfig(): ODataAnnotationConfig; } declare class CsdlTerm { private schema; Name: string; Type: string; BaseTerm?: string; DefaultValue?: string; AppliesTo?: string; Nullable?: boolean; MaxLength?: number; Precision?: number; Scale?: number; SRID?: string; String?: string; Bool?: boolean; Int?: number; constructor(schema: CsdlSchema, { Name, Type, BaseTerm, DefaultValue, AppliesTo, Nullable, MaxLength, Precision, Scale, SRID, String, Bool, Int, }: { Name: string; Type: string; BaseTerm?: string; DefaultValue?: string; AppliesTo?: string; Nullable?: boolean; MaxLength?: number; Precision?: number; Scale?: number; SRID?: string; String?: string; Bool?: boolean; Int?: number; }); toJson(): { [key: string]: any; }; } declare class CsdlCollection { String: CsdlString[]; Record: CsdlRecord[]; PropertyPath: CsdlPropertyPath[]; NavigationPropertyPath: CsdlNavigationPropertyPath[]; constructor({ String, Record, PropertyPath, NavigationPropertyPath, }: { String: any[]; Record: any[]; PropertyPath: any[]; NavigationPropertyPath: any[]; }); toJson(): { [key: string]: any; }; } declare class CsdlRecord { PropertyValue: CsdlPropertyValue[]; constructor({ PropertyValue }: { PropertyValue: any[]; }); toJson(): { [key: string]: any; }; } declare class CsdlPropertyValue { Name: string; String?: string; Date?: Date; EnumMember?: CsdlEnumMember[]; constructor({ Name, String, Date, EnumMember, }: { Name: string; String?: string; Date?: Date; EnumMember?: any[]; }); toJson(): { [key: string]: any; }; } declare class CsdlEnumMember { TextContent: string; constructor({ TextContent }: { TextContent: string; }); toJson(): { TextContent: string; }; } declare class CsdlString { TextContent: string; constructor({ TextContent }: { TextContent: string; }); toJson(): { TextContent: string; }; } declare class CsdlPropertyPath { TextContent: string; constructor({ TextContent }: { TextContent: string; }); toJson(): { TextContent: string; }; } declare class CsdlNavigationPropertyPath { TextContent: string; constructor({ TextContent }: { TextContent: string; }); toJson(): { TextContent: string; }; } declare class CsdlCallable { private schema; Name: string; ReturnType?: CsdlReturnType; IsBound?: boolean; EntitySetPath?: string; Parameter?: CsdlParameter[]; constructor(schema: CsdlSchema, { Name, ReturnType, IsBound, EntitySetPath, Parameter, }: { Name: string; ReturnType?: any; IsBound?: boolean; EntitySetPath?: string; Parameter?: any[]; }); toJson(): { [key: string]: any; }; name(): string; namespace(): string; fullName(): string; } declare class CsdlFunction extends CsdlCallable { IsComposable?: boolean; constructor(schema: CsdlSchema, { Name, ReturnType, IsBound, EntitySetPath, IsComposable, Parameter, }: { Name: string; ReturnType: any; IsBound?: boolean; EntitySetPath?: string; IsComposable?: boolean; Parameter?: any[]; }); toJson(): { IsComposable: boolean | undefined; }; toConfig(base?: Partial): ODataCallableConfig; } declare class CsdlAction extends CsdlCallable { constructor(schema: CsdlSchema, { Name, ReturnType, IsBound, EntitySetPath, Parameter, }: { Name: string; ReturnType?: any; IsBound?: boolean; EntitySetPath?: string; Parameter?: any[]; }); toJson(): { [key: string]: any; }; toConfig(base?: Partial): ODataCallableConfig; } declare class CsdlFunctionImport { private container; Name: string; FunctionName: string; EntitySet?: string; IncludeInServiceDocument?: boolean; constructor(container: CsdlEntityContainer, { Name, FunctionName, EntitySet, IncludeInServiceDocument, }: { Name: string; FunctionName: string; EntitySet?: string; IncludeInServiceDocument?: boolean; }); toJson(): { Name: string; FunctionName: string; EntitySet: string | undefined; IncludeInServiceDocument: boolean | undefined; }; } declare class CsdlActionImport { private container; Name: string; Action: string; EntitySet?: string; constructor(container: CsdlEntityContainer, { Name, Action, EntitySet, }: { Name: string; Action: string; EntitySet?: string; }); toJson(): { Name: string; Action: string; EntitySet: string | undefined; }; } declare class CsdlParameter extends CsdlAnnotable { Name: string; Type: string; Collection: boolean; Nullable?: boolean; MaxLength?: number; Precision?: number; Scale?: number; SRID?: string; constructor({ Name, Type, Nullable, MaxLength, Precision, Scale, SRID, Annotation, }: { Name: string; Type: string; Nullable?: boolean; MaxLength?: number; Precision?: number; Scale?: number; SRID?: string; Annotation?: any[]; }); toJson(): { Name: string; Type: string; Nullable: boolean | undefined; MaxLength: number | undefined; Precision: number | undefined; Scale: number | undefined; SRID: string | undefined; }; toConfig(): ODataParameterConfig; } declare class CsdlReturnType { Type: string; Collection: boolean; Nullable?: boolean; MaxLength?: number; Precision?: number; Scale?: number; SRID?: string; constructor({ Type, Nullable, MaxLength, Precision, Scale, SRID, }: { Type: string; Nullable?: boolean; MaxLength?: number; Precision?: number; Scale?: number; SRID?: string; }); toJson(): { Type: string; Nullable: boolean | undefined; MaxLength: number | undefined; Precision: number | undefined; Scale: number | undefined; SRID: string | undefined; }; toConfig(): { type: string; collection?: boolean | undefined; } | undefined; } declare class CsdlReference extends CsdlAnnotable { Uri: string; Include?: CsdlInclude[]; IncludeAnnotations?: CsdlIncludeAnnotations[]; constructor({ Uri, Include, IncludeAnnotations, Annotation, }: { Uri: string; Include?: any[]; IncludeAnnotations?: any[]; Annotation?: any[]; }); toJson(): { [key: string]: any; }; toConfig(base?: Partial): ODataReferenceConfig; } declare class CsdlInclude { Namespace: string; Alias?: string; constructor({ Namespace, Alias }: { Namespace: string; Alias?: string; }); toJson(): { Namespace: string; Alias: string | undefined; }; toConfig(): { namespace: string; alias: string | undefined; }; } declare class CsdlIncludeAnnotations { TermNamespace: string; Qualifier?: string; TargetNamespace?: string; constructor({ TermNamespace, Qualifier, TargetNamespace, }: { TermNamespace: string; Qualifier?: string; TargetNamespace?: string; }); toJson(): { TermNamespace: string; Qualifier: string | undefined; TargetNamespace: string | undefined; }; toConfig(): { termNamespace: string; qualifier: string | undefined; targetNamespace: string | undefined; }; } declare class ODataMetadata { Version: string; References: CsdlReference[]; Schemas: CsdlSchema[]; constructor(Version: string, References: any[], Schemas: any[]); toConfig(base?: Partial): ODataApiConfig; toJson(): { Version: string; References: { [key: string]: any; }[]; Schemas: { [key: string]: any; }[]; }; functions(): CsdlFunction[]; actions(): CsdlAction[]; static fromJson(json: any): ODataMetadata; } declare class ODataMetadataResource extends ODataResource { constructor(api: ODataApi, segments?: ODataPathSegments); static factory(api: ODataApi): ODataMetadataResource; clone(): ODataMetadataResource; protected get(options?: ODataOptions): Observable; fetch(options?: ODataOptions): Observable; } declare class ODataSingletonResource extends ODataResource { static factory(api: ODataApi, { path, type, }: { path: string; type?: string; }): ODataSingletonResource; clone(): ODataSingletonResource; key(value: any): ODataSingletonResource; keys(values: any[]): ODataSingletonResource; navigationProperty(path: string): ODataNavigationPropertyResource; property

(path: string): ODataPropertyResource

; action(path: string): ODataActionResource; function(path: string): ODataFunctionResource; protected post(attrs: Partial, options?: ODataOptions): Observable; protected put(attrs: Partial, options?: ODataOptions): Observable; protected patch(attrs: Partial, options?: ODataOptions): Observable; protected delete(options?: ODataOptions): Observable; protected get(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; /** * Creates a new entity. * @param attrs The entity attributes to create. * @param options The options for the request. * @returns The created entity with the annotations. */ create(attrs: Partial, options?: ODataOptions): Observable>; /** * Updates an existing entity. * @param attrs The entity attributes to update. * @param options The options for the request. * @returns The updated entity with the annotations. */ update(attrs: Partial, options?: ODataOptions): Observable>; /** * Modifies an existing entity. * @param attrs The entity attributes to modify. * @param options The options for the request. * @returns The modified entity with the annotations. */ modify(attrs: Partial, options?: ODataOptions): Observable>; /** * Delete an existing entity. * @param options The options for the request. * @returns Observable of the deleted entity. */ destroy(options?: ODataOptions): Observable; /** * Fetch an existing entity. * @param options The options for the request. * @returns Observable of the entity with the annotations. */ fetch(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable>; /** * Fetch an existing entity. * @param options The options for the request. * @returns Observable of the entity. */ fetchEntity(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; }): Observable; /** * Fetch an existing entity and return a model. * @param options The options for the request. * @returns Observable of the entity. */ fetchModel(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; ModelType?: typeof ODataModel; }): Observable<(ODataModel & ModelInterface) | null>; fetchModel>(options?: ODataOptions & { bodyQueryOptions?: QueryOption[]; ModelType?: typeof ODataModel; }): Observable; } type EntityKey = { readonly [P in keyof T]?: T[P]; } | QueryCustomType | string | number; declare class ODataResource { api: ODataApi; protected pathSegments: ODataPathSegments; protected queryOptions: ODataQueryOptions; constructor(api: ODataApi, { segments, query, }?: { segments?: ODataPathSegments; query?: ODataQueryOptions; }); /** * @returns string The outgoing type of the resource */ outgoingType(): string | undefined; /** * @returns string The incoming type of the resource */ incomingType(): string | undefined; /** * @returns string The binding type of the resource */ bindingType(): string | undefined; /** * @returns string All covered types of the resource */ types(): string[]; callable(): angular_odata.ODataCallable | undefined; enumType(): angular_odata.ODataEnumType | undefined; structuredType(): ODataStructuredType | ODataStructuredType | undefined; /** * @returns boolean The resource has key ? */ hasKey(): boolean; hasEntityKey(): boolean; clearKey(): void | undefined; asModel(entity?: Partial | { [name: string]: any; }): ODataModel & ModelInterface; asModel(entity: Partial | { [name: string]: any; }, { reset, annots, ModelType, }: { reset?: boolean; annots?: ODataEntityAnnotations; ModelType?: typeof ODataModel; }): ODataModel & ModelInterface; asModel>(entity?: Partial | { [name: string]: any; }): M; asModel>(entity: Partial | { [name: string]: any; }, { reset, annots, ModelType, }: { reset?: boolean; annots?: ODataEntityAnnotations; ModelType?: typeof ODataModel; }): M; asCollection(entities?: Partial[] | { [name: string]: any; }[]): ODataCollection & ModelInterface>; asCollection(entities: Partial[] | { [name: string]: any; }[], { reset, annots, CollectionType, }: { reset?: boolean; annots?: ODataEntitiesAnnotations; CollectionType?: typeof ODataCollection>; }): ODataCollection & ModelInterface>; asCollection, C extends ODataCollection>(entities?: Partial[] | { [name: string]: any; }[]): C; asCollection, C extends ODataCollection>(entities: Partial[] | { [name: string]: any; }[], { reset, annots, CollectionType, }: { reset?: boolean; annots?: ODataEntitiesAnnotations; CollectionType?: typeof ODataCollection>; }): C; isTypeOf(other: ODataResource): boolean; isSubtypeOf(other: ODataResource): boolean; isSupertypeOf(other: ODataResource): boolean; isEqualTo(other: ODataResource, test?: 'path' | 'params'): boolean; pathAndParams({ escape, ...options }?: ParserOptions & { escape?: boolean; }): [string, { [name: string]: any; }]; endpointUrl({ escape, params, ...options }?: ParserOptions & { escape?: boolean; params?: boolean; }): string; toString({ escape, ...options }?: ParserOptions & { escape?: boolean; }): string; clone(): ODataResource; private __parser; deserialize(value: any, options?: ParserOptions): any; serialize(value: any, options?: ParserOptions): any; encode(value: any, options?: ParserOptions): any; toJson(): { segments: any[]; options: {}; }; cloneSegments(): ODataPathSegments; clearQuery(): this; cloneQuery

(): ODataQueryOptions

; /** * Handle the path segments of the resource * Create an object handler for mutate the path segments of the resource * @param f Function context for handle the segments * @returns ODataActionResource */ segment(f: (q: ODataPathSegmentsHandler, s?: ODataStructuredType) => void): this; /** * Handle the query options of the resource * Create an object handler for mutate the query options of the resource * @param f Function context for handle the query options */ query(f: (q: ODataQueryOptionsHandler, s?: ODataStructuredType) => void): this; transform(opts: (builder: ApplyExpressionBuilder, current?: ApplyExpression) => ApplyExpression, { type, fields, }?: { type?: string; fields?: { [name: string]: ODataStructuredTypeFieldConfig; }; }): ODataResource; static resolveKey(value: any, schema?: ODataStructuredType): EntityKey | undefined; protected resolveKey(value: any): EntityKey | undefined; protected get(options?: ODataOptions & { etag?: string; responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities'; withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable; protected post(body: any, options?: ODataOptions & { responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities'; withCount?: boolean; }): Observable; protected put(body: any, options?: ODataOptions & { etag?: string; responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities'; withCount?: boolean; }): Observable; protected patch(body: any, options?: ODataOptions & { etag?: string; responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities'; withCount?: boolean; }): Observable; protected delete(options?: ODataOptions & { etag?: string; responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities'; withCount?: boolean; }): Observable; } declare class SegmentHandler { private segment; constructor(segment: ODataSegment); get name(): PathSegment; outgoingType(value?: string): string | undefined; incomingType(value?: string): string | undefined; bindingType(value?: string): string | undefined; path(value?: string): string; key(value?: EntityKey): EntityKey; hasKey(): boolean; clearKey(): void; parameters(value?: T): T; hasParameters(): boolean; clearParameters(): void; } declare class ODataPathSegmentsHandler { protected segments: ODataPathSegments; constructor(segments: ODataPathSegments); entitySet(): SegmentHandler; singleton(): SegmentHandler; action(): SegmentHandler; function(): SegmentHandler; keys(values?: (EntityKey | undefined)[]): (EntityKey | undefined)[]; property(): SegmentHandler; navigationProperty(): SegmentHandler; } type ODataSegment = { name: PathSegment; path: string; outgoingType?: string; incomingType?: string; bindingType?: string; key?: any; parameters?: any; }; declare const pathAndParamsFromSegments: (segments: ODataSegment[], { escape, parser, options, }?: { escape?: boolean; parser?: Parser; options?: ParserOptions; }) => [string, { [name: string]: any; }]; declare class ODataPathSegments { private _segments; constructor(segments?: ODataSegment[]); pathAndParams({ escape, parser, options, }?: { escape?: boolean; parser?: Parser; options?: ParserOptions; }): [string, { [name: string]: any; }]; types({ key }?: { key?: boolean; }): string[]; keys(values?: (EntityKey | undefined)[]): (EntityKey | undefined)[]; toString({ escape }?: { escape?: boolean; }): string; toJson(): any[]; static fromJson(json: { [name: string]: any; }[]): ODataPathSegments; clone(): ODataPathSegments; find(predicate: (segment: ODataSegment) => boolean): ODataSegment | undefined; segments({ key }?: { key?: boolean; }): SegmentHandler[]; first({ key }?: { key?: boolean; }): SegmentHandler | undefined; last({ key }?: { key?: boolean; }): SegmentHandler | undefined; add(name: string, path: string): SegmentHandler; get(name: string): SegmentHandler; } declare enum ODataModelEventType { Change = "change", Reset = "reset", Update = "update", Sort = "sort", Destroy = "destroy", Add = "add", Remove = "remove", Invalid = "invalid", Request = "request", Sync = "sync", Attach = "attach" } declare class ODataModelEvent { type: ODataModelEventType | string; value?: any; previous?: any; options?: any; constructor(type: ODataModelEventType | string, { model, collection, previous, value, attr, options, bubbles, chain, }?: { model?: ODataModel; collection?: ODataCollection>; attr?: ODataModelAttribute | number; previous?: any; value?: any; options?: any; bubbles?: boolean; chain?: [ ODataModel | ODataCollection>, ODataModelAttribute | number | null ][]; }); chain: [ ODataModel | ODataCollection>, ODataModelAttribute | number | null ][]; push(model: ODataModel | ODataCollection>, attr: ODataModelAttribute | number): ODataModelEvent; bubbles: boolean; stopPropagation(): void; visited(model: ODataModel | ODataCollection>): boolean; canContinueWith(self: ODataModel | ODataCollection>): boolean; get path(): string; model?: ODataModel; get currentModel(): ODataModel | undefined; collection?: ODataCollection>; get currentCollection(): ODataCollection> | undefined; } declare class ODataModelEventEmitter extends EventEmitter> { model?: ODataModel; collection?: ODataCollection>; constructor({ model, collection, }?: { model?: ODataModel; collection?: ODataCollection>; }); trigger(type: ODataModelEventType | string, { collection, previous, value, attr, options, bubbles, }?: { collection?: ODataCollection>; attr?: ODataModelAttribute | number; previous?: any; value?: any; options?: any; bubbles?: boolean; }): void; } declare const BUBBLES: (ODataModelEventType | string)[]; declare const INCLUDE_SHALLOW: { include_concurrency: boolean; include_computed: boolean; include_key: boolean; include_id: boolean; }; declare const INCLUDE_DEEP: { include_concurrency: boolean; include_computed: boolean; include_key: boolean; include_id: boolean; include_navigation: boolean; include_non_field: boolean; }; declare enum ODataModelState { Added = 0, Removed = 1, Changed = 2, Unchanged = 3 } type ModelInterface = { [P in keyof T]: T[P] extends (infer U)[] ? ODataCollection & ModelInterface> : T[P] extends object ? ODataModel & ModelInterface : T[P]; }; type ModelOptions = { cid?: string; fields: Map; }; type ModelFieldOptions = { field?: string; parser?: ODataStructuredTypeFieldParser; default?: any; required?: boolean; concurrency?: boolean; maxLength?: number; minLength?: number; min?: number; max?: number; pattern?: RegExp; }; declare function Model({ cid }?: { cid?: string; }): (constructor: T) => T; declare function ModelField({ name, ...options }?: { name?: string; } & ModelFieldOptions): (target: any, key: string) => void; type ODataModelFieldOptions = ModelFieldOptions & { name: string; field: string; parser: ODataStructuredTypeFieldParser; }; declare class ODataModelField { name: string; field: string; parser: ODataStructuredTypeFieldParser; options: ODataModelOptions; optionsForType?: (type: string) => ODataModelOptions | undefined; modelForType?: (t: string) => typeof ODataModel | undefined; collectionForType?: (t: string) => typeof ODataCollection> | undefined; enumForType?: (t: string) => ODataEnumType | undefined; structuredForType?: (t: string) => ODataStructuredType | undefined; default?: any; required: boolean; concurrency: boolean; maxLength?: number; minLength?: number; min?: number; max?: number; pattern?: RegExp; parserOptions?: ParserOptions; constructor(options: ODataModelOptions, { name, field, parser, ...opts }: ODataModelFieldOptions); get type(): string; get navigation(): boolean; get collection(): boolean; annotatedValue(term: string | RegExp): T | undefined; configure({ optionsForType, modelForType, collectionForType, enumForType, structuredForType, concurrency, options, }: { optionsForType: (type: string) => ODataModelOptions | undefined; modelForType: (t: string) => typeof ODataModel | undefined; collectionForType: (t: string) => typeof ODataCollection | undefined; enumForType: (t: string) => ODataEnumType | undefined; structuredForType: (t: string) => ODataStructuredType | undefined; concurrency: boolean; options: ParserOptions; }): void; isKey(): boolean; hasReferentials(): boolean; get referentials(): angular_odata.ODataReferential[]; isStructuredType(): boolean; structuredType(): ODataStructuredType; isEnumType(): boolean; enumType(): ODataEnumType; validate(value: any, { method, navigation, }?: { method?: 'create' | 'update' | 'modify'; navigation?: boolean; }): any; defaults(): any; deserialize(value: any, options?: ParserOptions): F | F[]; serialize(value: F, options?: ParserOptions): any; encode(value: F, options?: ParserOptions): any; resourceFactory(base: ODataResource): ODataNavigationPropertyResource | ODataPropertyResource; annotationsFactory(base: ODataEntityAnnotations): ODataEntityAnnotations | ODataEntitiesAnnotations; modelFactory({ parent, value, reset, }: { parent: ODataModel; value?: Partial | { [name: string]: any; }; reset?: boolean; }): ODataModel; collectionFactory({ parent, value, reset, }: { parent: ODataModel; value?: Partial[] | { [name: string]: any; }[]; reset?: boolean; }): ODataCollection>; } declare class ODataModelAttribute { private _model; private _field; private state; private value?; private change?; private subscription?; events$: ODataModelEventEmitter; constructor(_model: ODataModel, _field: ODataModelField); get type(): string; get navigation(): boolean; get computed(): boolean | undefined; get concurrency(): boolean; get referentials(): angular_odata.ODataReferential[]; get options(): ODataModelOptions; get name(): string; get fieldName(): string; get(): T | ODataModel | ODataCollection> | null | undefined; set(value: T | ODataModel | ODataCollection> | null | undefined, reset?: boolean, reparent?: boolean): boolean; isChanged({ include_navigation }?: { include_navigation?: boolean; }): boolean; reset(): void; private link; private unlink; } type ODataModelEntry> = { state: ODataModelState; model: M; key?: EntityKey | { [name: string]: any; }; subscription?: Subscription; }; declare class ODataModelOptions { name: string; cid: string; base?: string; private _fields; structuredType: ODataStructuredType; entitySet?: ODataEntitySet; parent?: ODataModelOptions; children: ODataModelOptions[]; events$: ODataModelEventEmitter; constructor({ config, structuredType, }: { config: ModelOptions; structuredType: ODataStructuredType; }); get api(): angular_odata.ODataApi; type({ alias }?: { alias?: boolean; }): string; isOpenType(): boolean; isEntityType(): boolean; isComplexType(): boolean; isTypeOf(type: string): boolean; isModelFor(entity: T | { [name: string]: any; }): boolean; findChildOptions(predicate: (options: ODataModelOptions) => boolean): ODataModelOptions | undefined; configure({ options }: { options: ParserOptions; }): void; fields({ include_navigation, include_parents, }: { include_parents: boolean; include_navigation: boolean; }): ODataModelField[]; field(name: keyof T | string): ODataModelField; findField(name: keyof T | string, { reset }?: { reset?: boolean; }): ODataModelField | undefined; addField(name: string, options: ModelFieldOptions): ODataModelField; tsToEdm: Record; private modelFieldFactory; attach(self: ODataModel, resource: ODataEntityResource | ODataNavigationPropertyResource | ODataPropertyResource | ODataSingletonResource): void; static chain(child: ODataModel | ODataCollection>): [ODataModel | ODataCollection>, ODataModelField | null][]; static resource(child: ODataModel | ODataCollection>): ODataResource | null; collectionResourceFactory(query?: ODataQueryOptions): ODataEntitySetResource | ODataNavigationPropertyResource | ODataPropertyResource | null; modelResourceFactory(query?: ODataQueryOptions): ODataEntityResource | ODataNavigationPropertyResource | ODataPropertyResource | ODataSingletonResource | null; bind(self: ODataModel, { parent, resource, annots, }?: { parent?: [ ODataModel | ODataCollection>, ODataModelField | null ]; resource?: ODataResource | null; annots?: ODataEntityAnnotations; }): void; query(self: ODataModel, resource: ODataEntityResource | ODataPropertyResource | ODataNavigationPropertyResource | ODataSingletonResource, func: (q: ODataQueryOptionsHandler, s?: ODataStructuredType) => void): ODataModel; resolveKey(value: ODataModel | T | { [name: string]: any; }, { field_mapping, resolve, single, }?: { field_mapping?: boolean; resolve?: boolean; single?: boolean; }): EntityKey | { [name: string]: any; } | undefined; resolveReferential(value: ODataModel | T | { [name: string]: any; } | null, attr: ODataModelAttribute | ODataModelField, { field_mapping, resolve, single, }?: { field_mapping?: boolean; resolve?: boolean; single?: boolean; }): { [name: string]: any; } | null | undefined; resolveReferenced(value: ODataModel | T | { [name: string]: any; } | null, attr: ODataModelAttribute | ODataModelField, { field_mapping, resolve, single, }?: { field_mapping?: boolean; resolve?: boolean; single?: boolean; }): { [name: string]: any; } | null | undefined; validate(self: ODataModel, { method, navigation, }?: { method?: 'create' | 'update' | 'modify'; navigation?: boolean; }): { [name: string]: string[]; } | undefined; defaults(): T | { [name: string]: any; } | undefined; hasChanged(self: ODataModel, { include_navigation }?: { include_navigation?: boolean; }): boolean; hasKey(self: ODataModel): boolean; withResource>(self: M, resource: ODataEntityResource | ODataPropertyResource | ODataNavigationPropertyResource | ODataSingletonResource | null, ctx: (model: M) => R): R; asEntity>(self: M, ctx: (model: M) => R): R; toEntity(self: ODataModel, { client_id, include_navigation, include_concurrency, include_computed, include_key, include_id, include_non_field, changes_only, field_mapping, chain, }?: { client_id?: boolean; include_navigation?: boolean; include_concurrency?: boolean; include_computed?: boolean; include_key?: boolean; include_id?: boolean; include_non_field?: boolean; changes_only?: boolean; field_mapping?: boolean; chain?: (ODataModel | ODataCollection>)[]; }): T | { [name: string]: any; }; reset(self: ODataModel, { name, silent }?: { name?: string; silent?: boolean; }): void; assign(self: ODataModel, entity: Partial | { [name: string]: any; }, { add, merge, remove, reset, reparent, silent, }?: { add?: boolean; merge?: boolean; remove?: boolean; reset?: boolean; reparent?: boolean; silent?: boolean; }): ODataModel; static isModel(obj: any): boolean; static isCollection(obj: any): boolean; get(self: ODataModel, field: ODataModelField | string): F | ODataModel | ODataCollection> | null | undefined; set(self: ODataModel, field: ODataModelField | string, value: F | F[] | { [name: string]: any; } | { [name: string]: any; }[] | ODataModel | ODataCollection> | null, { add, merge, remove, reset, reparent, silent, type, }?: { add?: boolean; merge?: boolean; remove?: boolean; reset?: boolean; reparent?: boolean; silent?: boolean; type?: EdmType | string; }): boolean; private _link; } /** * Api abstraction for consuming OData services. */ declare class ODataApi { requester?: (request: ODataRequest) => Observable; serviceRootUrl: string; metadataUrl: string; name?: string; version: ODataVersion; default: boolean; creation: Date; options: ODataApiOptions; cache?: ODataCache; errorHandler?: (error: any, caught: Observable) => Observable; parsers: Map>; schemas: ODataSchema[]; models: { [type: string]: typeof ODataModel; }; collections: { [type: string]: typeof ODataCollection>; }; constructor(config: ODataApiConfig); configure(settings?: { requester?: (request: ODataRequest) => Observable; }): void; populate(metadata: ODataMetadata): void; fromJson(json: { segments: ODataSegment[]; options: { [name: string]: any; }; }): ODataActionResource | ODataFunctionResource; fromJson(json: { segments: ODataSegment[]; options: { [name: string]: any; }; }): ODataEntityResource | ODataEntitySetResource | ODataNavigationPropertyResource | ODataSingletonResource; /** * Build a metadata resource. * @returns ODataMetadataResource */ metadata(): ODataMetadataResource; /** * Build a batch resource. * @returns ODataBatchResource */ batch(): ODataBatchResource; /** * Build a singleton resource. * @param path Name of the singleton * @returns */ singleton(name: string): ODataSingletonResource; /** * Build an entity set resource. * @param path Name of the entity set * @returns */ entitySet(name: string): ODataEntitySetResource; /** * Unbound Action * @param {string} path? * @returns ODataActionResource */ action(path: string): ODataActionResource; /** * Unbound Function * @param {string} path? * @returns ODataFunctionResource */ function(path: string): ODataFunctionResource; callable(type: string): ODataCallable | undefined; enumType(type: string): ODataEnumType | undefined; structuredType(type: string): ODataStructuredType | ODataStructuredType | undefined; request(method: string, resource: ODataResource, options: ODataOptions & { body?: any; etag?: string; responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities'; observe?: 'body' | 'events' | 'response'; withCount?: boolean; bodyQueryOptions?: QueryOption[]; }): Observable; private memo; createSchema(config: ODataSchemaConfig): ODataSchema; findSchema(type: string): ODataSchema | undefined; findEnumType(value: string): ODataEnumType | undefined; findStructuredType(value: string): ODataStructuredType | ODataStructuredType | undefined; findCallable(value: string, bindingType?: string): ODataCallable | undefined; findEntitySet(value: string): ODataEntitySet | undefined; findSingleton(value: string): ODataSingleton | undefined; configureModel(structured: ODataStructuredType, model: typeof ODataModel): void; findModel(type: string): typeof ODataModel | undefined; createModel(structured: ODataStructuredType): typeof ODataModel | typeof ODataModel; modelForType(type: string): { new (data?: { [name: string]: any; } | Partial, { parent, resource, annots, reset, }?: { parent?: [ODataModel | ODataCollection>, angular_odata.ODataModelField | null]; resource?: ODataResource | null | undefined; annots?: angular_odata.ODataEntityAnnotations | undefined; reset?: boolean; }): ODataModel; options: ModelOptions; meta: ODataModelOptions; buildMetaOptions({ config, structuredType, }: { config?: ModelOptions; structuredType: ODataStructuredType; }): ODataModelOptions; }; findCollection(type: string): typeof ODataCollection> | undefined; createCollection(structured: ODataStructuredType, model?: typeof ODataModel): typeof ODataCollection> | typeof ODataCollection>; collectionForType(type: string): { new (entities?: { [name: string]: any; }[] | Partial[], { parent, resource, annots, model, reset, }?: { parent?: [ODataModel, angular_odata.ODataModelField]; resource?: ODataResource | null | undefined; annots?: angular_odata.ODataEntitiesAnnotations | undefined; model?: typeof ODataModel; reset?: boolean; }): ODataCollection>; model: typeof ODataModel | null; }; findEntitySetForEntityType(entityType: string): ODataEntitySet | undefined; parserForType(type: string | EdmType, bindingType?: string): Parser; optionsForType(type: string, { structuredType, config, }?: { structuredType?: ODataStructuredType; config?: ModelOptions; }): ODataModelOptions | undefined; } declare class ODataSettings { apis: ODataApi[]; constructor(configs: ODataApiConfig[]); configure(settings: { requester?: (request: ODataRequest) => Observable; }): void; defaultApi(): ODataApi; findApiByName(name: string): ODataApi | undefined; apiByName(name: string): ODataApi; findApiForTypes(types: string[]): ODataApi | undefined; findApiForType(type: string): ODataApi | undefined; apiForType(type: string): ODataApi; enumTypeForType(type: string): ODataEnumType; structuredTypeForType(type: string): ODataStructuredType; callableForType(type: string, bindingType?: string): ODataCallable; entitySetForType(type: string): ODataEntitySet; parserForType(type: string | EdmType): Parser; modelForType(type: string): typeof ODataModel; collectionForType(type: string): typeof ODataCollection; } declare abstract class ODataConfigLoader { abstract loadConfigs(): Observable; } declare class ODataConfigSyncLoader implements ODataConfigLoader { private readonly passedConfigs; constructor(passedConfigs: ODataApiConfig | ODataApiConfig[]); loadConfigs(): Observable; } declare class ODataConfigAsyncLoader implements ODataConfigLoader { private readonly configs$; constructor(configs$: Observable[] | Observable); loadConfigs(): Observable; } declare class ODataMetadataLoader implements ODataConfigLoader { private readonly sources$; private readonly baseConfigs; constructor(sources$: Observable, baseConfigs: ODataApiConfig | ODataApiConfig[]); loadConfigs(): Observable; } declare class ODataClient { private http; private loader; settings?: ODataSettings; constructor(http: HttpClient, loader: ODataConfigLoader); /** * Resolve the api for the given value. * Where value is: string type or an string name or an instance of resource. * @param value The value to resolve. * @returns The api for the value. */ apiFor(value?: ODataResource | string): ODataApi; defaultApi(): ODataApi; /** * Resolve the parser for the given string type. * @param type The string type of the parser. * @returns The parser for the given type. */ parserForType(type: string): angular_odata.Parser; /** * Resolve the enum type for the given string type. * @param type The string type of the enum type. * @returns The enum type for the given type. */ enumTypeForType(type: string): angular_odata.ODataEnumType; /** * Resolve the structured type for the given string type. * @param type The string type of the structured type. * @returns The structured type for the given type. */ structuredTypeForType(type: string): angular_odata.ODataStructuredType; /** * Resolve the callable for the given string type. * @param type The string type of the callable. * @returns The callable for the given type. */ callableForType(type: string): angular_odata.ODataCallable; /** * Resolve the entity set for the given string type. * @param type The string type of the entity set. * @returns The entity set for the given type. */ entitySetForType(type: string): angular_odata.ODataEntitySet; /** * Resolve the model for the given string type. * @param type The string type of the model. * @returns The model for the given type. */ modelForType(type: string): typeof ODataModel; /** * Resolve the collection for the given string type. * @param type The string type of the collection. * @returns The collection for the given type. */ collectionForType(type: string): typeof ODataCollection; fromJson(json: { segments: ODataSegment[]; options: { [name: string]: any; }; }, apiNameOrType?: string): ODataEntityResource | ODataEntitySetResource | ODataNavigationPropertyResource | ODataSingletonResource; /** * Build a resource for the metadata. * @param apiName The name of the API. * @returns The metadata resource. */ metadata(apiName?: string): ODataMetadataResource; /** * Build a resource for the batch. * @param apiName The name of the API. * @returns The batch resource. */ batch(apiName?: string): ODataBatchResource; /** * Build a resource for the singleton. * @param path The full path to the singleton. * @param apiNameOrType The name of the API or the type of the singleton. * @returns The singleton resource. */ singleton(path: string, apiNameOrType?: string): ODataSingletonResource; /** * Build a resource for the entity set. * @param path The full path to the entity set. * @param apiNameOrType The name of the API or the type of the entity set. * @returns The entity set resource. */ entitySet(path: string, apiNameOrType?: string): ODataEntitySetResource; /** * Build a resource for unbound action. * @param path The full path to the action. * @param apiNameOrType The name of the API or the type of the entity. * @returns The unbound action resource. */ action(path: string, apiNameOrType?: string): ODataActionResource; /** * Build a resource for unbound function. * @param path The full path to the function. * @param apiNameOrType The name of the API or the type of the callable. * @returns The unbound function resource. */ function(path: string, apiNameOrType?: string): ODataFunctionResource; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe?: 'body'; responseType: 'arraybuffer'; }): Observable; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe?: 'body'; responseType: 'blob'; }): Observable; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe?: 'body'; responseType: 'text'; }): Observable; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'events'; responseType: 'arraybuffer'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'events'; responseType: 'blob'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'events'; responseType: 'text'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'events'; responseType?: 'json'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'events'; responseType?: 'json'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'response'; responseType: 'arraybuffer'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'response'; responseType: 'blob'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'response'; responseType: 'text'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'response'; responseType?: 'json'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe: 'response'; responseType?: 'json'; }): Observable>; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe?: 'body'; responseType?: 'json'; }): Observable; request(method: string, resource: ODataResource, options: ODataOptions & { body: any | null; observe?: 'body'; responseType?: 'json'; }): Observable; delete(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'arraybuffer'; }): Observable; delete(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'blob'; }): Observable; delete(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'text'; }): Observable; delete(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'arraybuffer'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'blob'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'text'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'arraybuffer'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'blob'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'text'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; delete(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; delete(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; get(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'arraybuffer'; }): Observable; get(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'blob'; }): Observable; get(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'text'; }): Observable; get(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'arraybuffer'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'blob'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'text'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'arraybuffer'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'blob'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'text'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; get(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; get(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; head(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'arraybuffer'; }): Observable; head(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'blob'; }): Observable; head(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'text'; }): Observable; head(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'arraybuffer'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'blob'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'text'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'arraybuffer'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'blob'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'text'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; head(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; head(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; jsonp(resource: ODataResource, callbackParam: string): Observable; jsonp(resource: ODataResource, callbackParam: string): Observable; options(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'arraybuffer'; }): Observable; options(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'blob'; }): Observable; options(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType: 'text'; }): Observable; options(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'arraybuffer'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'blob'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType: 'text'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'arraybuffer'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'blob'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType: 'text'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; options(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; options(resource: ODataResource, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'arraybuffer'; }): Observable; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'blob'; }): Observable; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'text'; }): Observable; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'arraybuffer'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'blob'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'text'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'arraybuffer'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'blob'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'text'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; patch(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'arraybuffer'; }): Observable; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'blob'; }): Observable; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'text'; }): Observable; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'arraybuffer'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'blob'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'text'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'arraybuffer'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'blob'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'text'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; post(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'arraybuffer'; }): Observable; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'blob'; }): Observable; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType: 'text'; }): Observable; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'arraybuffer'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'blob'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType: 'text'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'events'; responseType?: 'json'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'arraybuffer'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'blob'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType: 'text'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe: 'response'; responseType?: 'json'; }): Observable>; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; put(resource: ODataResource, body: any | null, options: ODataOptions & { observe?: 'body'; responseType?: 'json'; }): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface PassedInitialConfig { config?: ODataApiConfig | ODataApiConfig[]; loader?: Provider; } declare const ODATA_CONFIG: InjectionToken; declare function createSyncLoader(passedConfig: PassedInitialConfig): ODataConfigSyncLoader; declare function provideODataClient(passedConfig: PassedInitialConfig): EnvironmentProviders; declare class ODataModule { static forRoot(passedConfig: PassedInitialConfig): ModuleWithProviders; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const Dates: { isoStringToDate(value: any): any; }; type Duration = { sign?: 1 | -1; years?: number; months?: number; weeks?: number; days?: number; hours?: number; minutes?: number; seconds?: number; }; declare const Durations: { toDuration(v: string): Duration; toString(v: Duration): string; }; declare const Enums: { names(enums: E): string[]; values(enums: E): number[]; toValue(enums: E, value: any): number | undefined; toValues(enums: E, value: any): number[]; toName(enums: E, value: any): string | undefined; toNames(enums: E, value: any): string[]; toFlags(enums: E, value: any): string[]; }; declare const Http: { mergeHttpHeaders(...values: (HttpHeaders | { [header: string]: string | string[]; })[]): HttpHeaders; mergeHttpParams(...values: (HttpParams | { [param: string]: string | number | boolean | ReadonlyArray; })[]): HttpParams; splitHttpParams(params: HttpParams, keys: string[]): [HttpParams, HttpParams]; withoutHttpParams(params: HttpParams, keys: string[]): HttpParams; resolveHeaderKey(headers: HttpHeaders | { [param: string]: string | string[]; }, options: string[]): string | undefined; headerValue(header: string): string; parseResponseStatus(line: string): { status: string; code: number; message: string; }; boundaryDelimiter(contentType: string): string; boundaryEnd(boundaryDelimiter: string): string; }; declare const Objects: { set(obj: { [attr: string]: any; }, path: string, value: any): void; get(obj: { [attr: string]: any; }, path: string, def?: any): any; unset(obj: { [attr: string]: any; }, path: string): void; has(obj: { [attr: string]: any; }, path: string): boolean; merge(target: { [attr: string]: any; }, source: { [attr: string]: any; }): { [attr: string]: any; }; equal(object1: { [attr: string]: any; }, object2: { [attr: string]: any; }): boolean; difference(object1: { [attr: string]: any; }, object2: { [attr: string]: any; }): { [attr: string]: any; }; resolveKey(key: any, { single }?: { single?: boolean; }): any; clone(target: any, map?: WeakMap): any; }; declare const OData: { mergeCallableParameters(callables: ODataCallableConfig[]): ODataCallableConfig[]; }; declare const Strings: { uniqueId({ prefix, suffix }?: { prefix?: string; suffix?: string; }): string; titleCase(text: string): string; hashCode(text: string): number; }; declare const Types: { rawType(value: any): string; isObject(value: any): boolean; isPlainObject(value: any): boolean; isFunction(value: any): boolean; isArray(value: any): boolean; isMap(value: any): boolean; isEmpty(value: any): boolean; isEqual(value1: any, value2: any): boolean; clone(target: any): any; }; declare const Urls: { parseQueryString(query: string): {}; escapeIllegalChars(string: string): string; }; declare abstract class ODataBaseService { protected client: ODataClient; protected name: string; protected apiNameOrEntityType?: string | undefined; constructor(client: ODataClient, name: string, apiNameOrEntityType?: string | undefined); get api(): angular_odata.ODataApi; protected callFunction(params: P | null, resource: ODataFunctionResource, responseType: 'entity', options?: ODataFunctionOptions): Observable>; protected callFunction(params: P | null, resource: ODataFunctionResource, responseType: 'entities', options?: ODataFunctionOptions): Observable>; protected callFunction(params: P | null, resource: ODataFunctionResource, responseType: 'property', options?: ODataFunctionOptions): Observable>; protected callFunction(params: P | null, resource: ODataFunctionResource, responseType: 'none', options?: ODataFunctionOptions): Observable; protected callAction(params: P | null, resource: ODataActionResource, responseType: 'entity', options?: ODataActionOptions): Observable>; protected callAction(params: P | null, resource: ODataActionResource, responseType: 'entities', options?: ODataActionOptions): Observable>; protected callAction(params: P | null, resource: ODataActionResource, responseType: 'property', options?: ODataActionOptions): Observable>; protected callAction(params: P | null, resource: ODataActionResource, responseType: 'none', options?: ODataActionOptions): Observable; protected fetchNavigationProperty(resource: ODataNavigationPropertyResource, responseType: 'entity', options?: ODataQueryArgumentsOptions): Observable>; protected fetchNavigationProperty(resource: ODataNavigationPropertyResource, responseType: 'entities', options?: ODataQueryArgumentsOptions): Observable>; } declare abstract class ODataEntityService extends ODataBaseService { abstract entity(key?: EntityKey): ODataResource; abstract attach>(value: M): void; /** * The schema for the structured type. */ get structuredTypeSchema(): angular_odata.ODataStructuredType | angular_odata.ODataStructuredType | undefined; } declare class ODataEntitySetService extends ODataEntityService { static Model?: typeof ODataModel; static Collection?: typeof ODataCollection>; model(entity?: Partial, reset?: boolean): ODataModel & angular_odata.ModelInterface; collection(entities?: Partial[], reset?: boolean): ODataCollection & angular_odata.ModelInterface>; /** * Get the entity set resource for this service. */ entities(): ODataEntitySetResource; /** * Get the entity resource for this service. * @param key The entity key. */ entity(key?: EntityKey): ODataEntityResource; /** * Attach an existing model to this service. * @param model The model to attach. */ attach>(model: M): void; attach>>(model: C): void; /** * The schema for the entity set. */ get entitySetSchema(): angular_odata.ODataEntitySet | undefined; /** * Get all entities from the entity set. * @param options The options for the request. */ fetchAll(options?: ODataOptions): Observable<{ entities: any[]; annots: angular_odata.ODataEntitiesAnnotations; }>; /** * Get entities from the entity set. * @param withCount Get the count of the entities. * @param options The options for the request. */ fetchMany(top: number, options?: ODataOptions & { withCount?: boolean; }): Observable<{ entities: T[]; annots: angular_odata.ODataEntitiesAnnotations; } | { entities: T[]; annots: angular_odata.ODataEntitiesAnnotations; }>; /** * Get an entity from the entity set. * @param key The entity key. * @param etag The etag for the entity. * @param options The options for the request. */ fetchOne(options?: ODataOptions & { etag?: string; }): Observable<{ entity: T | null; annots: angular_odata.ODataEntitiesAnnotations; }>; /** * Create an entity in the entity set. * @param attrs The attributes for the entity. * @param options The options for the request. */ create(attrs: Partial, options?: ODataOptions): Observable>; /** * Update an entity in the entity set. * @param key The entity key. * @param attrs The attributes for the entity. * @param etag The etag for the entity. * @param options The options for the request. */ update(key: EntityKey, attrs: Partial, options?: ODataOptions & { etag?: string; }): Observable>; /** * Patch an entity in the entity set. * @param key The entity key. * @param attrs The attributes for the entity. * @param etag The etag for the entity. * @param options The options for the request. */ modify(key: EntityKey, attrs: Partial, options?: ODataOptions & { etag?: string; }): Observable>; /** * Delete an entity in the entity set. * @param key The entity key. * @param etag The etag for the entity. * @param options The options for the request. */ destroy(key: EntityKey, options?: ODataOptions & { etag?: string; }): Observable; /** * Get or create an entity in the entity set. * @param key The entity key. * @param attrs The attributes for the entity. * @param etag The etag for the entity. * @param options The options for the request. */ fetchOrCreate(key: EntityKey, attrs: Partial, { etag, ...options }?: { etag?: string; } & ODataOptions): Observable>; /** * Save an entity in the entity set. * @param attrs The attributes for the entity. * @param method The method to use. * @param etag The etag for the entity. * @param options The options for the request. */ save(attrs: Partial, { etag, method, ...options }?: { etag?: string; method?: 'create' | 'update' | 'modify'; } & ODataOptions): Observable>; } /** * OData Singleton Service * www.odata.org/getting-started/advanced-tutorial/#singleton */ declare class ODataSingletonService extends ODataEntityService { static Model?: typeof ODataModel; model(entity?: Partial): ODataModel & angular_odata.ModelInterface; /** * Get the entity resource for this service. * @param key The entity key. */ entity(): ODataSingletonResource; /** * Attach an existing model to this service. * @param model The model to attach. */ attach>(model: M): void; /** * The schema for the singleton. */ get singletonSchema(): angular_odata.ODataEntitySet | undefined; /** * Update the singleton entity * @param attrs The attributes for the entity. * @param etag The etag for the entity. * @param options The options for the request. */ update(attrs: Partial, options?: ODataOptions & { etag?: string; }): Observable>; /** * Patch the singleton entity * @param attrs The attributes for the entity. * @param etag The etag for the entity. * @param options The options for the request. */ patch(attrs: Partial, options?: ODataOptions & { etag?: string; }): Observable>; } declare class ODataServiceFactory { protected client: ODataClient; constructor(client: ODataClient); /** * Factory method to create an entity set service. * @param entitySetName Name of the entity set. * @param apiNameOrEntityType Name of the API or the type of the entity. */ entitySet(entitySetName: string, apiNameOrEntityType?: string, options?: { Model?: { new (...params: any[]): ODataModel; }; Collection?: { new (...params: any[]): ODataCollection>; }; }): ODataEntitySetService; /** Factory method to create a singleton service. * @param singletonName Name of the singleton. * @param apiNameOrEntityType Name of the API or the type of the entity. */ singleton(singletonName: string, apiNameOrEntityType?: string, options?: { Model?: { new (...params: any[]): ODataModel; }; }): ODataSingletonService; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * A cache entry that holds a payload, a last read time, and a timeout for the entry. * @param payload The payload to cache. * @param lastRead The last read time. * @param timeout The timeout. * @param tags Some tags to identify the entry. */ interface ODataCacheEntry { payload: T; lastRead: number; timeout: number; tags: string[]; } declare abstract class ODataBaseCache implements ODataCache { timeout: number; entries: Map>; constructor({ timeout }: { timeout?: number; }); abstract getResponse(req: ODataRequest): ODataResponse | undefined; abstract putResponse(req: ODataRequest, res: ODataResponse): void; /** * Using the resource on the request build an array of string to identify the scope of the request * @param req The request with the resource to build the scope * @returns Array of string to identify the scope of the request */ scope(req: ODataRequest): string[]; /** * Using the odata context on the response build an array of string to identify the tags of the response * @param res The response to build the tags * @returns Array of string to identify the tags of the response */ tags(res: ODataResponse): string[]; /** * Build an entry from a payload and some options * @param payload The payload to store in the cache * @param timeout The timeout for the entry * @param tags The tags for the entry * @returns The entry to store in the cache */ buildEntry(payload: T, { timeout, tags }: { timeout?: number; tags?: string[]; }): ODataCacheEntry; /** * Build a key from store an entry in the cache * @param names The names of the entry * @returns The key for the entry */ buildKey(names: string[]): string; /** * Put some payload in the cache * @param name The name for the entry * @param payload The payload to store in the cache * @param timeout The timeout for the entry * @param scope The scope for the entry * @param tags The tags for the entry */ put(name: string, payload: T, { timeout, scope, tags }?: { timeout?: number; scope?: string[]; tags?: string[]; }): void; /** * Return the payload from the cache if it exists and is not expired * @param name The name of the entry * @param scope The scope of the entry * @returns The payload of the entry */ get(name: string, { scope }?: { scope?: string[]; }): T | undefined; /** * Remove all cache entries that are matching with the given options * @param options The options to forget */ forget({ name, scope, tags, }?: { name?: string; scope?: string[]; tags?: string[]; }): void; /** * Remove all cache entries */ flush(): void; /** * Check if the entry is expired * @param entry The cache entry * @returns Boolean indicating if the entry is expired */ isExpired(entry: ODataCacheEntry): boolean; /** * Using the request, handle the fetching of the response * @param req The request to fetch * @param res$ Observable of the response * @returns */ handleRequest(req: ODataRequest, res$: Observable>): Observable>; private handleFetch; private handleMutate; } declare class ODataInMemoryCache extends ODataBaseCache { constructor({ timeout }?: { timeout?: number; }); /** * Store the response in the cache * @param req The request with the resource to store the response * @param res The response to store in the cache */ putResponse(req: ODataRequest, res: ODataResponse): void; /** * Restore the response from the cache * @param req The request with the resource to get the response * @returns The response from the cache */ getResponse(req: ODataRequest): ODataResponse | undefined; } declare class ODataInStorageCache extends ODataBaseCache { name: string; storage: Storage; constructor({ name, storage, timeout, }: { timeout?: number; name: string; storage?: Storage; }); /** * Store the cache in the storage */ store(): void; /** * Restore the cache from the storage */ restore(): void; /** * Flush the cache and clean the storage */ flush(): void; /** * Store the response in the cache * @param req The request with the resource to store the response * @param res The response to store in the cache */ putResponse(req: ODataRequest, res: ODataResponse): void; /** * Restore the response from the cache * @param req The request with the resource to get the response * @returns The response from the cache */ getResponse(req: ODataRequest): ODataResponse | undefined; } declare enum FieldType { ATTRIBUTE = 0, TAG = 1 } declare class Field { name: string; fieldType: FieldType; constructor(name: string, fieldType: FieldType); } declare class ODataMetadataParser { private static readonly TAG_EDMX; private static readonly TAG_DATA_SERVICES; private static readonly TAG_REFERENCE; private static readonly TAG_INCLUDE; private static readonly TAG_INCLUDE_ANNOTATIONS; private static readonly TAG_TERM; private static readonly TAG_ANNOTATIONS; private static readonly TAG_ANNOTATION; private static readonly TAG_SCHEMA; private static readonly TAG_ENUM_TYPE; private static readonly TAG_MEMBER; private static readonly TAG_COMPLEX_TYPE; private static readonly TAG_ENTITY_TYPE; private static readonly TAG_PROPERTY; private static readonly TAG_KEY; private static readonly TAG_PROPERTY_REF; private static readonly TAG_NAVIGATION_PROPERTY; private static readonly TAG_REFERENTIAL_CONSTRAINT; private static readonly TAG_ON_DELETE; private static readonly TAG_FUNCTION; private static readonly TAG_RETURN_TYPE; private static readonly TAG_PARAMETER; private static readonly TAG_ACTION; private static readonly TAG_ENTITY_CONTAINER; private static readonly TAG_ENTITY_SET; private static readonly TAG_SINGLETON; private static readonly TAG_COLLECTION; private static readonly TAG_RECORD; private static readonly TAG_STRING; private static readonly TAG_ENUM_MEMBER; private static readonly TAG_PROPERTY_VALUE; private static readonly TAG_PROPERTY_PATH; private static readonly TAG_NAVIGATION_PROPERTY_PATH; private static readonly TAG_FUNCTION_IMPORT; private static readonly TAG_ACTION_IMPORT; private static readonly TAG_NAVIGATION_PROPERTY_BINDING; private static readonly TAG_TYPE_DEFINITION; private static readonly ATTRIBUTE_VERSION; private static readonly ATTRIBUTE_URI; private static readonly ATTRIBUTE_ALIAS; private static readonly ATTRIBUTE_NAMESPACE; private static readonly ATTRIBUTE_TERM_NAMESPACE; private static readonly ATTRIBUTE_QUALIFIER; private static readonly ATTRIBUTE_STRING; private static readonly ATTRIBUTE_DATE; private static readonly ATTRIBUTE_BOOL; private static readonly ATTRIBUTE_INT; private static readonly ATTRIBUTE_TARGET_NAMESPACE; private static readonly ATTRIBUTE_TERM; private static readonly ATTRIBUTE_NAME; private static readonly ATTRIBUTE_VALUE; private static readonly ATTRIBUTE_BASE_TYPE; private static readonly ATTRIBUTE_OPEN_TYPE; private static readonly ATTRIBUTE_TYPE; private static readonly ATTRIBUTE_NULLABLE; private static readonly ATTRIBUTE_MAX_LENGTH; private static readonly ATTRIBUTE_PRECISION; private static readonly ATTRIBUTE_SCALE; private static readonly ATTRIBUTE_UNICODE; private static readonly ATTRIBUTE_SRID; private static readonly ATTRIBUTE_DEFAULT_VALUE; private static readonly ATTRIBUTE_PARTNER; private static readonly ATTRIBUTE_PROPERTY; private static readonly ATTRIBUTE_REFERENCED_PROPERTY; private static readonly ATTRIBUTE_HAS_STREAM; private static readonly ATTRIBUTE_CONTAINS_TARGET; private static readonly ATTRIBUTE_IS_BOUND; private static readonly ATTRIBUTE_ENTITY_SET_PATH; private static readonly ATTRIBUTE_IS_COMPOSABLE; private static readonly ATTRIBUTE_ENTITY_TYPE; private static readonly ATTRIBUTE_PATH; private static readonly ATTRIBUTE_TARGET; private static readonly ATTRIBUTE_FUNCTION; private static readonly ATTRIBUTE_ACTION; private static readonly ATTRIBUTE_ENTITY_SET; private static readonly ATTRIBUTE_INCLUDE_IN_SERVICE_DOCUMENT; private static readonly ATTRIBUTE_ABSTRACT; private static readonly ATTRIBUTE_UNDERLYING_TYPE; private static readonly ATTRIBUTE_IS_FLAGS; private static readonly ATTRIBUTE_EXTENDS; private static readonly ATTRIBUTE_BASE_TERM; private static readonly ATTRIBUTE_APPLIES_TO; readonly document: Document; constructor(xml: string); metadata(): ODataMetadata; protected checkVersion(doc: Document): void; protected getObjects(parentElement: Element, tag: string, fieldNames: Field[]): any[]; protected getObject(parentElement: Element, tag: string, fieldNames: Field[]): any; protected getFieldValues(fields: Field[], attributes: NamedNodeMap, element: Element): { [name: string]: any; }; protected getFieldValueByAttribute(field: Field, attributes: NamedNodeMap): any; protected getFieldValueByTag(field: Field, element: Element): any[]; protected getAttributeValue(attributes: NamedNodeMap, attributeName: string): string | undefined; protected propertyValueToNumber(attributeValue?: string): number | undefined; protected propertyValueToBoolean(attributeValue?: string): boolean; protected propertyValueToDate(attributeValue?: string): Date | undefined; } export { Aggregate, ApplyExpression, ArithmeticFunctions, ArithmeticOperators, BUBBLES, CollectionFunctions, ComputeExpression, ConditionalFunctions, DateAndTimeFunctions, Dates, Durations, EDM_PARSERS, EdmType, Enums, ExpandExpression, ExpandField, Expression, FieldFactory, FilterExpression, Function, GeoFunctions, GroupBy, GroupByTransformations, Grouping, GroupingOperators, Http, INCLUDE_DEEP, INCLUDE_SHALLOW, ITEM_ROOT, JsonType, Lambda, LambdaOperators, LogicalOperators, Model, ModelField, NONE_PARSER, ODATA_CONFIG, OData, ODataActionResource, ODataAnnotations, ODataApi, ODataBaseCache, ODataBaseService, ODataBatchRequest, ODataBatchResource, ODataCallable, ODataCallableParser, ODataClient, ODataCollection, ODataConfigAsyncLoader, ODataConfigLoader, ODataConfigSyncLoader, ODataCountResource, ODataEntitiesAnnotations, ODataEntityAnnotations, ODataEntityContainer, ODataEntityResource, ODataEntitySet, ODataEntitySetResource, ODataEntitySetService, ODataEntityTypeKey, ODataEnumType, ODataEnumTypeFieldParser, ODataEnumTypeParser, ODataFunctionResource, ODataFunctions, ODataInMemoryCache, ODataInStorageCache, ODataMediaResource, ODataMetadata, ODataMetadataLoader, ODataMetadataParser, ODataMetadataResource, ODataModel, ODataModelAttribute, ODataModelEvent, ODataModelEventEmitter, ODataModelEventType, ODataModelField, ODataModelOptions, ODataModelState, ODataModule, ODataNavigationPropertyResource, ODataOperators, ODataParameterParser, ODataPathSegments, ODataPathSegmentsHandler, ODataPropertyAnnotations, ODataPropertyResource, ODataQueryOptionHandler, ODataQueryOptions, ODataQueryOptionsHandler, ODataReferenceResource, ODataReferential, ODataRequest, ODataResource, ODataResponse, ODataSchema, ODataServiceFactory, ODataSettings, ODataSingleton, ODataSingletonResource, ODataSingletonService, ODataStructuredType, ODataStructuredTypeFieldParser, ODataStructuredTypeParser, ODataSyntax, ODataTransformations, ODataValueResource, Objects, Operator, OrderByExpression, OrderByField, PathSegment, QueryCustomTypes, QueryOption, RenderableFactory, SearchExpression, SearchTerm, SegmentHandler, SelectExpression, StandardAggregateMethods, StringAndCollectionFunctions, StringFunctions, Strings, Transformations, Type, TypeFunctions, Types, Urls, alias, binary, buildPathAndQuery, createSyncLoader, duration, encode, functions, isQueryCustomType, isRawType, normalizeValue, operators, pathAndParamsFromQueryOptions, pathAndParamsFromSegments, provideODataClient, raw, render, resolve, syntax, transformations }; export type { AggregateMethod, AggregateType, ApplyExpressionBuilder, CacheCacheability, ComputeExpressionBuilder, Duration, EntityKey, Expand, ExpandExpressionBuilder, ExpandObject, ExpandOptions, ExpandType, FetchPolicy, FieldParser, Filter, FilterConnector, FilterExpressionBuilder, FilterType, GroupByType, JsonSchemaOptions, LooseUnion, ModelFieldOptions, ModelInterface, ModelOptions, NestedExpandOptions, NestedOrderBy, Normalize, ODataActionOptions, ODataAnnotationConfig, ODataApiConfig, ODataApiConfigOptions, ODataCache, ODataCacheEntry, ODataCallableConfig, ODataEntities, ODataEntitiesOptions, ODataEntity, ODataEntityContainerConfig, ODataEntityOptions, ODataEntitySetConfig, ODataEnumTypeConfig, ODataEnumTypeFieldConfig, ODataFunctionOptions, ODataMetadataType, ODataModelEntry, ODataModelFieldOptions, ODataOptions, ODataParameterConfig, ODataProperty, ODataPropertyOptions, ODataQueryArguments, ODataQueryArgumentsOptions, ODataReferenceConfig, ODataResponseJson, ODataSchemaConfig, ODataSegment, ODataSingletonConfig, ODataStructuredTypeConfig, ODataStructuredTypeFieldConfig, ODataVersion, ObjectValues, OrderAttribute, OrderBy, OrderByExpressionBuilder, OrderByObject, OrderByType, Parser, ParserOptions, PassedInitialConfig, QueryCustomType, QueryOptions, Renderable, ResponseOptions, SearchConnector, SearchExpressionBuilder, Select, SelectExpressionBuilder, SelectType, StructuredTypeFieldOptions, Transform, Unpacked, Value };