angular-odata 0.146.2 → 0.148.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import * as json_schema from 'json-schema';
2
2
  import { JSONSchema7 } from 'json-schema';
3
3
  import { Observable, Subject, Subscription } from 'rxjs';
4
- import { HttpContext, HttpHeaders, HttpParams, HttpResponseBase, HttpErrorResponse, HttpResponse, HttpClient, HttpEvent } from '@angular/common/http';
4
+ import { HttpContext, HttpHeaders, HttpParams, HttpResponseBase, HttpErrorResponse, HttpResponse, HttpEvent, HttpClient } from '@angular/common/http';
5
5
  import * as angular_odata from 'angular-odata';
6
6
  import * as i0 from '@angular/core';
7
7
  import { EventEmitter, Provider, InjectionToken, EnvironmentProviders, ModuleWithProviders } from '@angular/core';
@@ -2794,15 +2794,15 @@ declare class CsdlProperty extends CsdlStructuralProperty {
2794
2794
  declare class CsdlNavigationProperty extends CsdlStructuralProperty {
2795
2795
  Partner?: string;
2796
2796
  ContainsTarget?: boolean;
2797
- ReferentialConstraints?: CsdlReferentialConstraint[];
2797
+ ReferentialConstraint?: CsdlReferentialConstraint[];
2798
2798
  OnDelete?: CsdlOnDelete;
2799
- constructor({ Name, Type, Nullable, Partner, ContainsTarget, ReferentialConstraints, OnDelete, Annotation, }: {
2799
+ constructor({ Name, Type, Nullable, Partner, ContainsTarget, ReferentialConstraint, OnDelete, Annotation, }: {
2800
2800
  Name: string;
2801
2801
  Type: string;
2802
2802
  Nullable?: boolean;
2803
2803
  Partner?: string;
2804
2804
  ContainsTarget?: boolean;
2805
- ReferentialConstraints?: any[];
2805
+ ReferentialConstraint?: any[];
2806
2806
  OnDelete?: any;
2807
2807
  Annotation?: any[];
2808
2808
  });
@@ -3661,10 +3661,7 @@ declare class ODataModel<T> {
3661
3661
  constructor(data?: Partial<T> | {
3662
3662
  [name: string]: any;
3663
3663
  }, { parent, resource, annots, reset, }?: {
3664
- parent?: [
3665
- ODataModel<any> | ODataCollection<any, ODataModel<any>>,
3666
- ODataModelField<any> | null
3667
- ];
3664
+ parent?: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
3668
3665
  resource?: ODataEntityResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | ODataSingletonResource<T>;
3669
3666
  annots?: ODataEntityAnnotations<T>;
3670
3667
  reset?: boolean;
@@ -3672,10 +3669,7 @@ declare class ODataModel<T> {
3672
3669
  static factory<T>(data?: Partial<T> | {
3673
3670
  [name: string]: any;
3674
3671
  }, { parent, resource, annots, reset, }?: {
3675
- parent?: [
3676
- ODataModel<any> | ODataCollection<any, ODataModel<any>>,
3677
- ODataModelField<any> | null
3678
- ];
3672
+ parent?: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
3679
3673
  resource?: ODataEntityResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | ODataSingletonResource<T>;
3680
3674
  annots?: ODataEntityAnnotations<T>;
3681
3675
  reset?: boolean;
@@ -3804,8 +3798,8 @@ declare class ODataModel<T> {
3804
3798
  asEntity<R>(ctx: (model: this) => R): R;
3805
3799
  callFunction<P, R>(name: string, params: P | null, responseType: 'property' | 'model' | 'collection' | 'none' | 'blob' | 'arraybuffer', options?: ODataFunctionOptions<R>): Observable<R | ODataModel<R> | ODataCollection<R, ODataModel<R>> | null | Blob | ArrayBuffer>;
3806
3800
  callAction<P, R>(name: string, params: P | null, responseType?: 'property' | 'model' | 'collection' | 'none' | 'blob' | 'arraybuffer', { ...options }?: {} & ODataActionOptions<R>): Observable<R | ODataModel<R> | ODataCollection<R, ODataModel<R>> | null | Blob | ArrayBuffer>;
3807
- cast<S>(type: string, ModelType?: typeof ODataModel): ODataModel<T> & ModelInterface<T>;
3808
- cast<S, M extends ODataModel<S>>(type: string, ModelType?: typeof ODataModel): M;
3801
+ cast<S>(type: string, ModelType?: typeof ODataModel<S>): ODataModel<S> & ModelInterface<S>;
3802
+ cast<S, M extends ODataModel<S>>(type: string, ModelType?: typeof ODataModel<S>): M;
3809
3803
  fetchNavigationProperty<S>(name: keyof T | string, responseType: 'model' | 'collection', options?: ODataQueryArgumentsOptions<S>): Observable<ODataModel<S> | ODataCollection<S, ODataModel<S>> | null>;
3810
3804
  fetchAttribute<P>(name: keyof T, options?: ODataQueryArgumentsOptions<P>): Observable<P | ODataModel<P> | ODataCollection<P, ODataModel<P>> | null>;
3811
3805
  getAttribute<P>(name: keyof T | string): P | ODataModel<P> | ODataCollection<P, ODataModel<P>> | null;
@@ -3820,10 +3814,10 @@ declare class ODataModel<T> {
3820
3814
 
3821
3815
  declare class ODataCollection<T, M extends ODataModel<T>> implements Iterable<M> {
3822
3816
  static model: typeof ODataModel<any> | null;
3823
- _parent: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
3817
+ _parent: [ODataModel<any>, ODataModelField<any>] | null;
3824
3818
  _resource: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | null;
3825
3819
  _resources: {
3826
- parent: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
3820
+ parent: [ODataModel<any>, ODataModelField<any>] | null;
3827
3821
  resource: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | null;
3828
3822
  }[];
3829
3823
  _annotations: ODataEntitiesAnnotations<T>;
@@ -3835,7 +3829,7 @@ declare class ODataCollection<T, M extends ODataModel<T>> implements Iterable<M>
3835
3829
  constructor(entities?: Partial<T>[] | {
3836
3830
  [name: string]: any;
3837
3831
  }[], { parent, resource, annots, model, reset, }?: {
3838
- parent?: [ODataModel<any>, ODataModelField<any>];
3832
+ parent?: [ODataModel<any>, ODataModelField<any>] | null;
3839
3833
  resource?: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T>;
3840
3834
  annots?: ODataEntitiesAnnotations<T>;
3841
3835
  model?: typeof ODataModel;
@@ -3844,7 +3838,7 @@ declare class ODataCollection<T, M extends ODataModel<T>> implements Iterable<M>
3844
3838
  static factory<T>(entities?: Partial<T>[] | {
3845
3839
  [name: string]: any;
3846
3840
  }[], { parent, resource, annots, model, reset, }?: {
3847
- parent?: [ODataModel<any>, ODataModelField<any>];
3841
+ parent?: [ODataModel<any>, ODataModelField<any>] | null;
3848
3842
  resource?: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T>;
3849
3843
  annots?: ODataEntitiesAnnotations<T>;
3850
3844
  model?: typeof ODataModel;
@@ -3854,7 +3848,7 @@ declare class ODataCollection<T, M extends ODataModel<T>> implements Iterable<M>
3854
3848
  resource(): ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | null;
3855
3849
  pushResource(resource: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | null): void;
3856
3850
  popResource(): {
3857
- parent: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
3851
+ parent: [ODataModel<any>, ODataModelField<any>] | null;
3858
3852
  resource: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | null;
3859
3853
  } | undefined;
3860
3854
  attach(resource: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T>): void;
@@ -4047,13 +4041,13 @@ declare class ODataStructuredType<T> extends ODataParserSchemaElement<T, ODataSt
4047
4041
  * @returns The schema that matches the predicate.
4048
4042
  */
4049
4043
  findParentSchema(predicate: (p: ODataStructuredType<any>) => boolean): ODataStructuredType<any> | undefined;
4050
- findChildSchema(predicate: (p: ODataStructuredType<any>) => boolean): ODataStructuredType<any> | undefined;
4051
4044
  /**
4052
4045
  * Find a parent schema of the structured type for the given field.
4053
4046
  * @param field Field that belongs to the structured type
4054
4047
  * @returns The schema of the field
4055
4048
  */
4056
4049
  findParentSchemaForField<E>(field: ODataStructuredTypeFieldParser<any>): ODataStructuredType<E>;
4050
+ findChildSchema(predicate: (p: ODataStructuredType<any>) => boolean): ODataStructuredType<any> | undefined;
4057
4051
  /**
4058
4052
  * Picks the fields from attributes.
4059
4053
  * @param attrs
@@ -4284,11 +4278,6 @@ declare class ODataModelField<F> {
4284
4278
  field: string;
4285
4279
  parser: ODataStructuredTypeFieldParser<F>;
4286
4280
  options: ODataModelOptions<any>;
4287
- optionsForType?: (type: string) => ODataModelOptions<any> | undefined;
4288
- modelForType?: (t: string) => typeof ODataModel<any> | undefined;
4289
- collectionForType?: (t: string) => typeof ODataCollection<any, ODataModel<any>> | undefined;
4290
- enumForType?: (t: string) => ODataEnumType<F> | undefined;
4291
- structuredForType?: (t: string) => ODataStructuredType<F> | undefined;
4292
4281
  default?: any;
4293
4282
  required: boolean;
4294
4283
  concurrency: boolean;
@@ -4303,12 +4292,7 @@ declare class ODataModelField<F> {
4303
4292
  get navigation(): boolean;
4304
4293
  get collection(): boolean;
4305
4294
  annotatedValue<T>(term: string | RegExp): T | undefined;
4306
- configure({ optionsForType, modelForType, collectionForType, enumForType, structuredForType, concurrency, options, }: {
4307
- optionsForType: (type: string) => ODataModelOptions<any> | undefined;
4308
- modelForType: (t: string) => typeof ODataModel<any> | undefined;
4309
- collectionForType: (t: string) => typeof ODataCollection<any, any> | undefined;
4310
- enumForType: (t: string) => ODataEnumType<any> | undefined;
4311
- structuredForType: (t: string) => ODataStructuredType<any> | undefined;
4295
+ configure({ concurrency, options }: {
4312
4296
  concurrency: boolean;
4313
4297
  options: ParserOptions;
4314
4298
  }): void;
@@ -4398,10 +4382,7 @@ declare class ODataModelOptions<T> {
4398
4382
  modelFactory<T>(Model: typeof ODataModel<T>, data?: Partial<T> | {
4399
4383
  [name: string]: any;
4400
4384
  }, { parent, resource, annots, reset, }?: {
4401
- parent?: [
4402
- ODataModel<any> | ODataCollection<any, ODataModel<any>>,
4403
- ODataModelField<any> | null
4404
- ];
4385
+ parent?: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
4405
4386
  resource?: ODataEntityResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | ODataSingletonResource<T>;
4406
4387
  annots?: ODataEntityAnnotations<T>;
4407
4388
  reset?: boolean;
@@ -4409,7 +4390,7 @@ declare class ODataModelOptions<T> {
4409
4390
  collectionFactory<T>(Collection: typeof ODataCollection<T, ODataModel<T>>, entities?: Partial<T>[] | {
4410
4391
  [name: string]: any;
4411
4392
  }[], { parent, resource, annots, model, reset, }?: {
4412
- parent?: [ODataModel<any>, ODataModelField<any>];
4393
+ parent?: [ODataModel<any>, ODataModelField<any>] | null;
4413
4394
  resource?: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T>;
4414
4395
  annots?: ODataEntitiesAnnotations<T>;
4415
4396
  model?: typeof ODataModel;
@@ -4448,10 +4429,7 @@ declare class ODataModelOptions<T> {
4448
4429
  collectionResourceFactory(query?: ODataQueryOptions<T>): ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | null;
4449
4430
  modelResourceFactory(query?: ODataQueryOptions<T>): ODataEntityResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | ODataSingletonResource<T> | null;
4450
4431
  bind(self: ODataModel<T>, { parent, resource, annots, }?: {
4451
- parent?: [
4452
- ODataModel<any> | ODataCollection<any, ODataModel<any>>,
4453
- ODataModelField<any> | null
4454
- ];
4432
+ parent?: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
4455
4433
  resource?: ODataResource<T> | null;
4456
4434
  annots?: ODataEntityAnnotations<T>;
4457
4435
  }): void;
@@ -4545,6 +4523,43 @@ declare class ODataModelOptions<T> {
4545
4523
  private _link;
4546
4524
  }
4547
4525
 
4526
+ declare class ODataInclude {
4527
+ namespace: string;
4528
+ alias?: string;
4529
+ reference: ODataReference;
4530
+ constructor(config: {
4531
+ namespace: string;
4532
+ alias?: string;
4533
+ }, reference: ODataReference);
4534
+ configure({ options }: {
4535
+ options: ParserOptions;
4536
+ }): void;
4537
+ }
4538
+ declare class ODataIncludeAnnotation {
4539
+ termNamespace: string;
4540
+ qualifier?: string;
4541
+ targetNamespace?: string;
4542
+ reference: ODataReference;
4543
+ constructor(config: {
4544
+ termNamespace: string;
4545
+ qualifier?: string;
4546
+ targetNamespace?: string;
4547
+ }, reference: ODataReference);
4548
+ configure({ options }: {
4549
+ options: ParserOptions;
4550
+ }): void;
4551
+ }
4552
+ declare class ODataReference extends ODataAnnotatable {
4553
+ api: ODataApi;
4554
+ uri: string;
4555
+ includes: ODataInclude[];
4556
+ includeAnnotations: ODataIncludeAnnotation[];
4557
+ constructor(config: ODataReferenceConfig, api: ODataApi);
4558
+ configure({ options }: {
4559
+ options: ParserOptions;
4560
+ }): void;
4561
+ }
4562
+
4548
4563
  /**
4549
4564
  * Api abstraction for consuming OData services.
4550
4565
  */
@@ -4560,7 +4575,9 @@ declare class ODataApi {
4560
4575
  cache?: ODataCache;
4561
4576
  errorHandler?: (error: any, caught: Observable<any>) => Observable<never>;
4562
4577
  parsers: Map<string, Parser<any>>;
4578
+ populateFromMetadata: boolean;
4563
4579
  schemas: ODataSchema[];
4580
+ references: ODataReference[];
4564
4581
  models: {
4565
4582
  [type: string]: typeof ODataModel<any>;
4566
4583
  };
@@ -4568,10 +4585,8 @@ declare class ODataApi {
4568
4585
  [type: string]: typeof ODataCollection<any, ODataModel<any>>;
4569
4586
  };
4570
4587
  constructor(config: ODataApiConfig);
4571
- configure(settings?: {
4572
- requester?: (request: ODataRequest<any>) => Observable<any>;
4573
- }): void;
4574
- populate(metadata: ODataMetadata): void;
4588
+ initialize(requester: (request: ODataRequest<any>) => Observable<any>): Promise<boolean>;
4589
+ populate(metadata: ODataMetadata): boolean;
4575
4590
  fromJson<P, R>(json: {
4576
4591
  segments: ODataSegment[];
4577
4592
  options: {
@@ -4618,9 +4633,9 @@ declare class ODataApi {
4618
4633
  * @returns ODataFunctionResource
4619
4634
  */
4620
4635
  function<P, R>(path: string): ODataFunctionResource<P, R>;
4621
- callable<T>(type: string): ODataCallable<any> | undefined;
4622
- enumType<T>(type: string): ODataEnumType<any> | ODataEnumType<T> | undefined;
4623
- structuredType<T>(type: string): ODataStructuredType<any> | ODataStructuredType<T> | undefined;
4636
+ callable<T>(type: string): ODataCallable<T> | undefined;
4637
+ enumType<T>(type: string): ODataEnumType<T> | undefined;
4638
+ structuredType<T>(type: string): ODataStructuredType<T> | undefined;
4624
4639
  request<T>(method: string, resource: ODataResource<any>, options: ODataOptions & {
4625
4640
  body?: any;
4626
4641
  etag?: string;
@@ -4632,18 +4647,18 @@ declare class ODataApi {
4632
4647
  /**
4633
4648
  * Using the request, handle the fetching of the response
4634
4649
  * @param req The request to fetch
4635
- * @param res$ Observable of the response
4636
4650
  * @returns
4637
4651
  */
4638
4652
  private handleRequest;
4639
- private handleFetch;
4640
- private handleMutate;
4653
+ private handleRequester;
4654
+ private handleCacheFetch;
4655
+ private handleCacheMutate;
4641
4656
  private memo;
4642
4657
  createSchema(config: ODataSchemaConfig): ODataSchema;
4643
4658
  findSchema(type: string): ODataSchema | undefined;
4644
- findEnumType<T>(value: string): ODataEnumType<any> | ODataEnumType<T> | undefined;
4645
- findStructuredType<T>(value: string): ODataStructuredType<any> | ODataStructuredType<T> | undefined;
4646
- findCallable<R>(value: string, bindingType?: string): ODataCallable<any> | undefined;
4659
+ findEnumType<T>(value: string): ODataEnumType<T> | undefined;
4660
+ findStructuredType<T>(value: string): ODataStructuredType<T> | undefined;
4661
+ findCallable<R>(value: string, bindingType?: string): ODataCallable<R> | undefined;
4647
4662
  findEntitySet(value: string): ODataEntitySet | undefined;
4648
4663
  findSingleton(value: string): ODataSingleton | undefined;
4649
4664
  configureModel<T>(structured: ODataStructuredType<T>, model: typeof ODataModel<T>): void;
@@ -4653,7 +4668,7 @@ declare class ODataApi {
4653
4668
  new (data?: {
4654
4669
  [name: string]: any;
4655
4670
  } | Partial<T>, { parent, resource, annots, reset, }?: {
4656
- parent?: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null];
4671
+ parent?: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
4657
4672
  resource?: ODataEntityResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | ODataSingletonResource<T> | undefined;
4658
4673
  annots?: ODataEntityAnnotations<T> | undefined;
4659
4674
  reset?: boolean;
@@ -4663,7 +4678,7 @@ declare class ODataApi {
4663
4678
  factory<T_1>(data?: Partial<T_1> | {
4664
4679
  [name: string]: any;
4665
4680
  }, { parent, resource, annots, reset, }?: {
4666
- parent?: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null];
4681
+ parent?: [ODataModel<any> | ODataCollection<any, ODataModel<any>>, ODataModelField<any> | null] | null;
4667
4682
  resource?: ODataEntityResource<T_1> | ODataNavigationPropertyResource<T_1> | ODataPropertyResource<T_1> | ODataSingletonResource<T_1>;
4668
4683
  annots?: ODataEntityAnnotations<T_1>;
4669
4684
  reset?: boolean;
@@ -4675,7 +4690,7 @@ declare class ODataApi {
4675
4690
  new (entities?: {
4676
4691
  [name: string]: any;
4677
4692
  }[] | Partial<T>[], { parent, resource, annots, model, reset, }?: {
4678
- parent?: [ODataModel<any>, ODataModelField<any>];
4693
+ parent?: [ODataModel<any>, ODataModelField<any>] | null;
4679
4694
  resource?: ODataEntitySetResource<T> | ODataNavigationPropertyResource<T> | ODataPropertyResource<T> | undefined;
4680
4695
  annots?: angular_odata.ODataEntitiesAnnotations<T> | undefined;
4681
4696
  model?: typeof ODataModel;
@@ -4685,7 +4700,7 @@ declare class ODataApi {
4685
4700
  factory<T_1>(entities?: Partial<T_1>[] | {
4686
4701
  [name: string]: any;
4687
4702
  }[], { parent, resource, annots, model, reset, }?: {
4688
- parent?: [ODataModel<any>, ODataModelField<any>];
4703
+ parent?: [ODataModel<any>, ODataModelField<any>] | null;
4689
4704
  resource?: ODataEntitySetResource<T_1> | ODataNavigationPropertyResource<T_1> | ODataPropertyResource<T_1>;
4690
4705
  annots?: angular_odata.ODataEntitiesAnnotations<T_1>;
4691
4706
  model?: typeof ODataModel;
@@ -4727,9 +4742,9 @@ declare class ODataResource<T> {
4727
4742
  * @returns string All covered types of the resource
4728
4743
  */
4729
4744
  types(): string[];
4730
- callable(): angular_odata.ODataCallable<any> | undefined;
4731
- enumType(): angular_odata.ODataEnumType<any> | angular_odata.ODataEnumType<T> | undefined;
4732
- structuredType(): ODataStructuredType<any> | ODataStructuredType<T> | undefined;
4745
+ callable(): angular_odata.ODataCallable<T> | undefined;
4746
+ enumType(): angular_odata.ODataEnumType<T> | undefined;
4747
+ structuredType(): ODataStructuredType<T> | undefined;
4733
4748
  /**
4734
4749
  * @returns boolean The resource has key ?
4735
4750
  */
@@ -4791,8 +4806,10 @@ declare class ODataResource<T> {
4791
4806
  }): string;
4792
4807
  toString({ escape, ...options }?: ParserOptions & {
4793
4808
  escape?: boolean;
4809
+ params?: boolean;
4794
4810
  }): string;
4795
4811
  clone(): ODataResource<T>;
4812
+ cast<C>(type: string): ODataResource<C>;
4796
4813
  private __parser;
4797
4814
  deserialize(value: any, options?: ParserOptions): any;
4798
4815
  serialize(value: any, options?: ParserOptions): any;
@@ -5120,6 +5137,7 @@ type ODataApiConfig = {
5120
5137
  parsers?: {
5121
5138
  [type: string]: Parser<any>;
5122
5139
  };
5140
+ populateFromMetadata?: boolean;
5123
5141
  schemas?: ODataSchemaConfig[];
5124
5142
  references?: ODataReferenceConfig[];
5125
5143
  models?: {
@@ -5143,12 +5161,16 @@ type ODataAnnotationConfig = {
5143
5161
  };
5144
5162
  type ODataReferenceConfig = {
5145
5163
  uri: string;
5146
- includes?: string;
5147
5164
  annotations?: ODataAnnotationConfig[];
5148
- enums?: ODataEnumTypeConfig[];
5149
- entities?: ODataStructuredTypeConfig[];
5150
- callables?: ODataCallableConfig[];
5151
- containers?: ODataEntityContainerConfig[];
5165
+ includes?: {
5166
+ namespace: string;
5167
+ alias?: string;
5168
+ }[];
5169
+ includeAnnotations?: {
5170
+ termNamespace: string;
5171
+ qualifier?: string;
5172
+ targetNamespace?: string;
5173
+ }[];
5152
5174
  };
5153
5175
  type ODataSchemaConfig = {
5154
5176
  namespace: string;
@@ -5257,9 +5279,7 @@ type ODataSingletonConfig = {
5257
5279
  declare class ODataSettings {
5258
5280
  apis: ODataApi[];
5259
5281
  constructor(configs: ODataApiConfig[]);
5260
- configure(settings: {
5261
- requester?: (request: ODataRequest<any>) => Observable<any>;
5262
- }): void;
5282
+ initialize(requester: (request: ODataRequest<any>) => Observable<any>): Promise<boolean[]>;
5263
5283
  defaultApi(): ODataApi;
5264
5284
  findApiByName(name: string): ODataApi | undefined;
5265
5285
  apiByName(name: string): ODataApi;
@@ -5275,31 +5295,46 @@ declare class ODataSettings {
5275
5295
  collectionForType(type: string): typeof ODataCollection;
5276
5296
  }
5277
5297
 
5278
- declare abstract class ODataConfigLoader {
5279
- abstract loadConfigs(): Observable<ODataApiConfig[]>;
5298
+ declare abstract class ODataLoader {
5299
+ abstract load(): Promise<{
5300
+ configs: ODataApiConfig[];
5301
+ requester: (req: ODataRequest<any>) => Observable<any>;
5302
+ }>;
5280
5303
  }
5281
- declare class ODataConfigSyncLoader implements ODataConfigLoader {
5304
+ declare class ODataSyncLoader implements ODataLoader {
5282
5305
  private readonly passedConfigs;
5283
- constructor(passedConfigs: ODataApiConfig | ODataApiConfig[]);
5284
- loadConfigs(): Observable<ODataApiConfig[]>;
5306
+ private readonly requester;
5307
+ constructor(passedConfigs: ODataApiConfig | ODataApiConfig[], requester: (req: ODataRequest<any>) => Observable<any>);
5308
+ load(): Promise<{
5309
+ configs: ODataApiConfig[];
5310
+ requester: (req: ODataRequest<any>) => Observable<any>;
5311
+ }>;
5285
5312
  }
5286
- declare class ODataConfigAsyncLoader implements ODataConfigLoader {
5313
+ declare class ODataAsyncLoader implements ODataLoader {
5287
5314
  private readonly configs$;
5288
- constructor(configs$: Observable<ODataApiConfig>[] | Observable<ODataApiConfig | ODataApiConfig[]>);
5289
- loadConfigs(): Observable<ODataApiConfig[]>;
5315
+ private readonly requester;
5316
+ constructor(configs$: Observable<ODataApiConfig>[] | Observable<ODataApiConfig | ODataApiConfig[]>, requester: (req: ODataRequest<any>) => Observable<any>);
5317
+ load(): Promise<{
5318
+ configs: ODataApiConfig[];
5319
+ requester: (req: ODataRequest<any>) => Observable<any>;
5320
+ }>;
5290
5321
  }
5291
- declare class ODataMetadataLoader implements ODataConfigLoader {
5322
+ declare class ODataMetadataLoader implements ODataLoader {
5292
5323
  private readonly sources$;
5293
5324
  private readonly baseConfigs;
5294
- constructor(sources$: Observable<string | string[]>, baseConfigs: ODataApiConfig | ODataApiConfig[]);
5295
- loadConfigs(): Observable<ODataApiConfig[]>;
5325
+ private readonly requester;
5326
+ constructor(sources$: Observable<string | string[]>, baseConfigs: ODataApiConfig | ODataApiConfig[], requester: (req: ODataRequest<any>) => Observable<any>);
5327
+ load(): Promise<{
5328
+ configs: ODataApiConfig[];
5329
+ requester: (req: ODataRequest<any>) => Observable<any>;
5330
+ }>;
5296
5331
  }
5297
5332
 
5298
5333
  declare class ODataClient {
5299
- private http;
5300
5334
  private loader;
5301
5335
  settings?: ODataSettings;
5302
- constructor(http: HttpClient, loader: ODataConfigLoader);
5336
+ constructor(loader: ODataLoader);
5337
+ initialize(): Promise<boolean>;
5303
5338
  /**
5304
5339
  * Resolve the api for the given value.
5305
5340
  * Where value is: string type or an string name or an instance of resource.
@@ -5905,8 +5940,8 @@ interface PassedInitialConfig {
5905
5940
  config?: ODataApiConfig | ODataApiConfig[];
5906
5941
  loader?: Provider;
5907
5942
  }
5908
- declare const ODATA_CONFIG: InjectionToken<ODataApiConfig>;
5909
- declare function createSyncLoader(passedConfig: PassedInitialConfig): ODataConfigSyncLoader;
5943
+ declare const ODATA_CONFIG: InjectionToken<ODataApiConfig | ODataApiConfig[]>;
5944
+ declare function defaultHttpSyncLoader(config: ODataApiConfig | ODataApiConfig[], http: HttpClient): ODataSyncLoader;
5910
5945
  declare function provideODataClient(passedConfig: PassedInitialConfig): EnvironmentProviders;
5911
5946
  declare class ODataModule {
5912
5947
  static forRoot(passedConfig: PassedInitialConfig): ModuleWithProviders<ODataModule>;
@@ -6072,7 +6107,7 @@ declare abstract class ODataEntityService<T> extends ODataBaseService {
6072
6107
  /**
6073
6108
  * The schema for the structured type.
6074
6109
  */
6075
- get structuredTypeSchema(): angular_odata.ODataStructuredType<any> | angular_odata.ODataStructuredType<T> | undefined;
6110
+ get structuredTypeSchema(): angular_odata.ODataStructuredType<T> | undefined;
6076
6111
  }
6077
6112
 
6078
6113
  declare class ODataEntitySetService<T> extends ODataEntityService<T> {
@@ -6326,7 +6361,7 @@ declare abstract class ODataBaseCache implements ODataCache {
6326
6361
  }): T | undefined;
6327
6362
  abstract getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
6328
6363
  abstract putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
6329
- abstract forget({ name, scope, tags }: {
6364
+ abstract forget({ name, scope, tags, }: {
6330
6365
  name?: string;
6331
6366
  scope?: string[];
6332
6367
  tags?: string[];
@@ -6574,5 +6609,5 @@ declare class ODataMetadataParser {
6574
6609
  protected propertyValueToDate(attributeValue?: string): Date | undefined;
6575
6610
  }
6576
6611
 
6577
- export { Aggregate, ApplyExpression, ArithmeticFunctions, ArithmeticOperators, BUBBLES, Casting, CastingOperators, 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, JsonSchemaType, 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, ODataIndexedDBCache, 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, 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, transformations };
6612
+ export { Aggregate, ApplyExpression, ArithmeticFunctions, ArithmeticOperators, BUBBLES, Casting, CastingOperators, 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, JsonSchemaType, Lambda, LambdaOperators, LogicalOperators, Model, ModelField, NONE_PARSER, ODATA_CONFIG, OData, ODataActionResource, ODataAnnotations, ODataApi, ODataAsyncLoader, ODataBaseCache, ODataBaseService, ODataBatchRequest, ODataBatchResource, ODataCallable, ODataCallableParser, ODataClient, ODataCollection, ODataCountResource, ODataEntitiesAnnotations, ODataEntityAnnotations, ODataEntityContainer, ODataEntityResource, ODataEntitySet, ODataEntitySetResource, ODataEntitySetService, ODataEntityTypeKey, ODataEnumType, ODataEnumTypeFieldParser, ODataEnumTypeParser, ODataFunctionResource, ODataFunctions, ODataInMemoryCache, ODataInStorageCache, ODataIndexedDBCache, ODataLoader, 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, ODataSyncLoader, 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, defaultHttpSyncLoader, duration, encode, functions, isQueryCustomType, isRawType, normalizeValue, operators, pathAndParamsFromQueryOptions, pathAndParamsFromSegments, provideODataClient, raw, render, resolve, transformations };
6578
6613
  export type { AggregateMethod, AggregateType, ApplyExpressionBuilder, CacheCacheability, ComputeExpressionBuilder, Duration, EntityKey, Expand, ExpandExpressionBuilder, ExpandObject, ExpandOptions, ExpandType, FetchPolicy, FieldParser, Filter, FilterConnector, FilterExpressionBuilder, FilterType, GroupByType, JsonSchemaCustom, JsonSchemaExpand, JsonSchemaFieldOptions, JsonSchemaOptions, JsonSchemaRequired, JsonSchemaSelect, 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 };