angular-odata 0.160.0 → 0.161.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-odata",
3
- "version": "0.160.0",
3
+ "version": "0.161.0",
4
4
  "license": "MIT",
5
5
  "description": "Client side OData typescript library for Angular",
6
6
  "repository": {
@@ -1530,14 +1530,22 @@ declare class ODataEnumTypeParser<E> extends ODataAnnotatable implements FieldPa
1530
1530
  serialize(value: E, options?: ParserOptions): string | undefined;
1531
1531
  encode(value: E, options?: ParserOptions): any;
1532
1532
  toJsonSchema(options?: JsonSchemaOptions<E>, parent?: JSONSchema7): JSONSchema7;
1533
- validate(value: string | number, { method, navigation, }?: {
1534
- method?: 'create' | 'update' | 'modify';
1533
+ validate(value: string | number, { method, navigation, }: {
1534
+ method: 'create' | 'update' | 'modify';
1535
1535
  navigation?: boolean;
1536
1536
  }): string[] | undefined;
1537
1537
  unpack(value: string | number): number[];
1538
1538
  pack(value: string | number | number[]): number;
1539
1539
  }
1540
1540
 
1541
+ declare class ODataEntitySet extends ODataSchemaElement {
1542
+ entityType: string;
1543
+ service: {
1544
+ new (...params: any[]): any;
1545
+ };
1546
+ constructor(config: ODataEntitySetConfig, schema: ODataSchema);
1547
+ }
1548
+
1541
1549
  declare class ODataEntityTypeKey {
1542
1550
  name: string;
1543
1551
  alias?: string;
@@ -1563,14 +1571,15 @@ declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable impleme
1563
1571
  navigation: boolean;
1564
1572
  nullable?: boolean;
1565
1573
  default?: any;
1574
+ optimisticConcurrency: boolean;
1566
1575
  maxLength?: number;
1567
1576
  precision?: number;
1568
1577
  scale?: number | 'variable';
1569
1578
  referentials: ODataReferential[];
1570
1579
  parserOptions?: ParserOptions;
1571
1580
  constructor(name: string, structured: ODataStructuredTypeParser<any>, field: ODataStructuredTypeFieldConfig);
1572
- validate(value: any, { method, navigation, }?: {
1573
- method?: 'create' | 'update' | 'modify';
1581
+ validate(value: any, { method, navigation, }: {
1582
+ method: 'create' | 'update' | 'modify';
1574
1583
  navigation?: boolean;
1575
1584
  }): {
1576
1585
  [name: string]: any;
@@ -1582,12 +1591,15 @@ declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable impleme
1582
1591
  private toJson;
1583
1592
  serialize(value: T, options?: ParserOptions): any;
1584
1593
  encode(value: T, options?: ParserOptions): string;
1585
- configure({ options, parserForType, }: {
1594
+ configure({ options, optimisticConcurrency, parserForType, }: {
1586
1595
  options: ParserOptions;
1596
+ optimisticConcurrency?: boolean;
1587
1597
  parserForType: (type: string) => Parser<any>;
1588
1598
  }): void;
1589
1599
  toJsonSchema(options?: JsonSchemaOptions<T>, parent?: JSONSchema7): JSONSchema7;
1590
1600
  isKey(): boolean;
1601
+ isComputed(): boolean | undefined;
1602
+ isOptimisticConcurrency(): boolean;
1591
1603
  hasReferentials(): boolean;
1592
1604
  isEdmType(): boolean;
1593
1605
  isEnumType(): boolean;
@@ -1625,8 +1637,9 @@ declare class ODataStructuredTypeParser<T> extends ODataAnnotatable implements P
1625
1637
  deserialize(value: any, options?: ParserOptions): T;
1626
1638
  serialize(value: Partial<T>, options?: ParserOptions): any;
1627
1639
  encode(value: T, options?: ParserOptions): any;
1628
- configure({ options, parserForType, }: {
1640
+ configure({ options, entitySet, parserForType, }: {
1629
1641
  options: ParserOptions;
1642
+ entitySet?: ODataEntitySet;
1630
1643
  parserForType: (type: string) => Parser<any>;
1631
1644
  }): void;
1632
1645
  /**
@@ -1682,9 +1695,8 @@ declare class ODataStructuredTypeParser<T> extends ODataAnnotatable implements P
1682
1695
  [name: string]: any;
1683
1696
  };
1684
1697
  toJsonSchema(options?: JsonSchemaOptions<T>, parent?: JSONSchema7): JSONSchema7;
1685
- validate(attrs: any, { method, navigation, }?: {
1686
- create?: boolean;
1687
- method?: 'create' | 'update' | 'modify';
1698
+ validate(attrs: any, { method, navigation, }: {
1699
+ method: 'create' | 'update' | 'modify';
1688
1700
  navigation?: boolean;
1689
1701
  }): {
1690
1702
  [name: string]: any;
@@ -1774,14 +1786,6 @@ declare class ODataCallable<R> extends ODataParserSchemaElement<R, ODataCallable
1774
1786
  returnType(): string | undefined;
1775
1787
  }
1776
1788
 
1777
- declare class ODataEntitySet extends ODataSchemaElement {
1778
- entityType: string;
1779
- service: {
1780
- new (...params: any[]): any;
1781
- };
1782
- constructor(config: ODataEntitySetConfig, schema: ODataSchema);
1783
- }
1784
-
1785
1789
  declare class ODataSingleton extends ODataSchemaElement {
1786
1790
  singletonType: string;
1787
1791
  service: {
@@ -3716,14 +3720,14 @@ declare class ODataModel<T> {
3716
3720
  _errors?: {
3717
3721
  [name: string]: any;
3718
3722
  };
3719
- validate({ method, navigation, }?: {
3720
- method?: 'create' | 'update' | 'modify';
3723
+ validate({ method, navigation, }: {
3724
+ method: 'create' | 'update' | 'modify';
3721
3725
  navigation?: boolean;
3722
3726
  }): {
3723
3727
  [name: string]: string[];
3724
3728
  } | undefined;
3725
- isValid({ method, navigation, }?: {
3726
- method?: 'create' | 'update' | 'modify';
3729
+ isValid({ method, navigation, }: {
3730
+ method: 'create' | 'update' | 'modify';
3727
3731
  navigation?: boolean;
3728
3732
  }): boolean;
3729
3733
  defaults(): {
@@ -4150,8 +4154,8 @@ declare class ODataStructuredType<T> extends ODataParserSchemaElement<T, ODataSt
4150
4154
  * @param method Method to use for the process validation
4151
4155
  * @returns Object with the errors
4152
4156
  */
4153
- validate(attrs: Partial<T>, { method, navigation, }?: {
4154
- method?: 'create' | 'update' | 'modify';
4157
+ validate(attrs: Partial<T>, { method, navigation, }: {
4158
+ method: 'create' | 'update' | 'modify';
4155
4159
  navigation?: boolean;
4156
4160
  }): {
4157
4161
  [name: string]: any;
@@ -4297,9 +4301,6 @@ declare class ODataModelField<F> {
4297
4301
  parser: ODataStructuredTypeFieldParser<F>;
4298
4302
  options: ODataModelOptions<any>;
4299
4303
  default?: any;
4300
- required: boolean;
4301
- concurrency: boolean;
4302
- maxLength?: number;
4303
4304
  minLength?: number;
4304
4305
  min?: number;
4305
4306
  max?: number;
@@ -4310,11 +4311,12 @@ declare class ODataModelField<F> {
4310
4311
  get navigation(): boolean;
4311
4312
  get collection(): boolean;
4312
4313
  annotatedValue<T>(term: string | RegExp): T | undefined;
4313
- configure({ concurrency, options }: {
4314
- concurrency: boolean;
4314
+ configure({ options }: {
4315
4315
  options: ParserOptions;
4316
4316
  }): void;
4317
4317
  isKey(): boolean;
4318
+ isComputed(): boolean | undefined;
4319
+ isOptimisticConcurrency(): boolean;
4318
4320
  hasReferentials(): boolean;
4319
4321
  get referentials(): angular_odata.ODataReferential[];
4320
4322
  isStructuredType(): boolean;
@@ -4322,8 +4324,8 @@ declare class ODataModelField<F> {
4322
4324
  isEnumType(): boolean;
4323
4325
  isEdmType(): boolean;
4324
4326
  enumType(): angular_odata.ODataEnumType<F>;
4325
- validate(value: any, { method, navigation, }?: {
4326
- method?: 'create' | 'update' | 'modify';
4327
+ validate(value: any, { method, navigation, }: {
4328
+ method: 'create' | 'update' | 'modify';
4327
4329
  navigation?: boolean;
4328
4330
  }): any;
4329
4331
  defaults(): any;
@@ -4358,8 +4360,8 @@ declare class ODataModelAttribute<T> {
4358
4360
  constructor(_model: ODataModel<any>, _field: ODataModelField<T>);
4359
4361
  get type(): string;
4360
4362
  get navigation(): boolean;
4361
- get computed(): boolean | undefined;
4362
- get concurrency(): boolean;
4363
+ isComputed(): boolean | undefined;
4364
+ isOptimisticConcurrency(): boolean;
4363
4365
  get referentials(): angular_odata.ODataReferential[];
4364
4366
  get options(): ODataModelOptions<any>;
4365
4367
  get name(): string;
@@ -4479,8 +4481,8 @@ declare class ODataModelOptions<T> {
4479
4481
  }): {
4480
4482
  [name: string]: any;
4481
4483
  } | null | undefined;
4482
- validate(self: ODataModel<T>, { method, navigation, }?: {
4483
- method?: 'create' | 'update' | 'modify';
4484
+ validate(self: ODataModel<T>, { method, navigation, }: {
4485
+ method: 'create' | 'update' | 'modify';
4484
4486
  navigation?: boolean;
4485
4487
  }): {
4486
4488
  [name: string]: string[];