@sap-cloud-sdk/odata-common 4.2.1-20251219014401.0 → 4.2.1-20251221014402.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/dist/batch-response.d.ts +3 -3
- package/dist/de-serializers/custom-de-serializers.d.ts +2 -2
- package/dist/de-serializers/de-serializers.d.ts +3 -3
- package/dist/entity-api.d.ts +3 -3
- package/dist/entity-builder.d.ts +1 -1
- package/dist/expandable.d.ts +1 -1
- package/dist/filter/filter-link.d.ts +2 -2
- package/dist/filter/filter-link.js +2 -2
- package/dist/filter/filter-link.js.map +1 -1
- package/dist/filter/filter-list.d.ts +1 -1
- package/dist/filter/filter-list.js +1 -1
- package/dist/filter/filter-list.js.map +1 -1
- package/dist/filter/filter.d.ts +2 -2
- package/dist/filter/filter.js +2 -2
- package/dist/filter/filter.js.map +1 -1
- package/dist/filter/filterable.d.ts +3 -3
- package/dist/header-builder.d.ts +1 -1
- package/dist/order/order-link.d.ts +2 -2
- package/dist/order/order-link.js +2 -2
- package/dist/order/order.d.ts +1 -1
- package/dist/order/order.js +1 -1
- package/dist/order/order.js.map +1 -1
- package/dist/order/orderable.d.ts +5 -5
- package/dist/order/orderable.js +2 -2
- package/dist/request/odata-batch-request-config.js +2 -2
- package/dist/request/odata-batch-request-config.js.map +1 -1
- package/dist/request/odata-count-request-config.d.ts +1 -1
- package/dist/request/odata-count-request-config.js +1 -1
- package/dist/request/odata-create-request-config.d.ts +1 -1
- package/dist/request/odata-create-request-config.js +1 -1
- package/dist/request/odata-delete-request-config.d.ts +1 -1
- package/dist/request/odata-delete-request-config.js +1 -1
- package/dist/request/odata-function-request-config.d.ts +2 -2
- package/dist/request/odata-function-request-config.js +2 -2
- package/dist/request/odata-get-all-request-config.d.ts +1 -1
- package/dist/request/odata-get-all-request-config.js +1 -1
- package/dist/request/odata-get-by-key-request-config.d.ts +1 -1
- package/dist/request/odata-get-by-key-request-config.js +1 -1
- package/dist/request/odata-request.d.ts +1 -1
- package/dist/request/odata-request.js +1 -1
- package/dist/request/odata-update-request-config.d.ts +1 -1
- package/dist/request/odata-update-request-config.js +1 -1
- package/dist/request/operation-parameter.d.ts +2 -2
- package/dist/request/operation-parameter.js +1 -1
- package/dist/request-builder/batch/batch-change-set.js +2 -2
- package/dist/request-builder/batch/batch-change-set.js.map +1 -1
- package/dist/request-builder/count-request-builder.d.ts +1 -1
- package/dist/request-builder/count-request-builder.js +1 -1
- package/dist/request-builder/create-request-builder-base.d.ts +1 -1
- package/dist/request-builder/create-request-builder-base.js +3 -3
- package/dist/request-builder/create-request-builder-base.js.map +1 -1
- package/dist/request-builder/delete-request-builder-base.d.ts +1 -1
- package/dist/request-builder/delete-request-builder-base.js +3 -3
- package/dist/request-builder/delete-request-builder-base.js.map +1 -1
- package/dist/request-builder/get-all-request-builder-base.d.ts +1 -1
- package/dist/request-builder/get-all-request-builder-base.js +1 -1
- package/dist/request-builder/get-by-key-request-builder-base.d.ts +1 -1
- package/dist/request-builder/get-by-key-request-builder-base.js +3 -3
- package/dist/request-builder/get-by-key-request-builder-base.js.map +1 -1
- package/dist/request-builder/operation-request-builder-base.d.ts +3 -3
- package/dist/request-builder/operation-request-builder-base.js +5 -5
- package/dist/request-builder/operation-request-builder-base.js.map +1 -1
- package/dist/request-builder/request-builder.js.map +1 -1
- package/dist/request-builder/update-request-builder-base.d.ts +1 -1
- package/dist/request-builder/update-request-builder-base.js +3 -3
- package/dist/request-builder/update-request-builder-base.js.map +1 -1
- package/dist/selectable/collection-field.d.ts +6 -6
- package/dist/selectable/collection-field.js +5 -5
- package/dist/selectable/complex-type-field.d.ts +5 -5
- package/dist/selectable/complex-type-field.js +5 -5
- package/dist/selectable/edm-type-field.d.ts +9 -9
- package/dist/selectable/edm-type-field.js +5 -5
- package/dist/selectable/enum-field.d.ts +4 -4
- package/dist/selectable/enum-field.js +4 -4
- package/dist/selectable/field-builder.d.ts +3 -3
- package/dist/selectable/field-builder.js +2 -2
- package/dist/selectable/field.d.ts +3 -3
- package/dist/selectable/field.js +3 -3
- package/dist/selectable/link.d.ts +4 -4
- package/dist/selectable/link.js +4 -4
- package/dist/selectable/link.js.map +1 -1
- package/dist/selectable/one-to-one-link.d.ts +2 -2
- package/dist/selectable/one-to-one-link.js +2 -2
- package/dist/selectable/orderable-edm-type-field.d.ts +4 -4
- package/dist/selectable/orderable-edm-type-field.js +4 -4
- package/dist/uri-conversion/get-filter.js +1 -1
- package/package.json +5 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateRequestBuilderBase = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
4
5
|
const util_1 = require("@sap-cloud-sdk/util");
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
6
6
|
const request_1 = require("../request");
|
|
7
7
|
const request_builder_base_1 = require("./request-builder-base");
|
|
8
8
|
/**
|
|
9
9
|
* Abstract create request class holding the parts shared in OData v2 and v4.
|
|
10
|
-
* @
|
|
10
|
+
* @template EntityT - Type of the entity to be created.
|
|
11
11
|
*/
|
|
12
12
|
class CreateRequestBuilderBase extends request_builder_base_1.MethodRequestBuilder {
|
|
13
13
|
/**
|
|
@@ -38,7 +38,7 @@ class CreateRequestBuilderBase extends request_builder_base_1.MethodRequestBuild
|
|
|
38
38
|
*/
|
|
39
39
|
getBatchReference() {
|
|
40
40
|
if (!this._batchReference) {
|
|
41
|
-
this.setBatchId((0,
|
|
41
|
+
this.setBatchId((0, node_crypto_1.randomUUID)());
|
|
42
42
|
}
|
|
43
43
|
return this._batchReference;
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/create-request-builder-base.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AACrD
|
|
1
|
+
{"version":3,"file":"create-request-builder-base.js","sourceRoot":"","sources":["../../src/request-buil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GAAG,SAAS,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,WAA0C;QACtD,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;aAChC,IAAI,CAAC,QAAQ,CAAC,EAAE,CACf,IAAI,CAAC,YAAY,CAAC,iBAAiB,CACjC,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EACxD,IAAI,CAAC,UAAU,EACf,QAAQ,CAAC,OAAO,CACjB,CACF;aACA,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,MAAM,IAAI,qBAAc,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,UAAU,CACd,WAA0C;QAE1C,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AA1GD,4DA0GC"}
|
|
@@ -10,7 +10,7 @@ import type { EntityApi } from '../entity-api';
|
|
|
10
10
|
import type { BatchReference, WithBatchReference } from '../request';
|
|
11
11
|
/**
|
|
12
12
|
* Abstract class to delete an entity holding the shared parts between OData v2 and v4.
|
|
13
|
-
* @
|
|
13
|
+
* @template EntityT - Type of the entity to be deleted.
|
|
14
14
|
*/
|
|
15
15
|
export declare abstract class DeleteRequestBuilderBase<EntityT extends EntityBase, DeSerializersT extends DeSerializers> extends MethodRequestBuilder<ODataDeleteRequestConfig<EntityT, DeSerializersT>> implements EntityIdentifiable<EntityT, DeSerializersT>, WithBatchReference {
|
|
16
16
|
readonly _entityApi: EntityApi<EntityT, DeSerializersT>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteRequestBuilderBase = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
4
5
|
const util_1 = require("@sap-cloud-sdk/util");
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
6
6
|
const entity_base_1 = require("../entity-base");
|
|
7
7
|
const request_1 = require("../request");
|
|
8
8
|
const request_builder_base_1 = require("./request-builder-base");
|
|
9
9
|
/**
|
|
10
10
|
* Abstract class to delete an entity holding the shared parts between OData v2 and v4.
|
|
11
|
-
* @
|
|
11
|
+
* @template EntityT - Type of the entity to be deleted.
|
|
12
12
|
*/
|
|
13
13
|
class DeleteRequestBuilderBase extends request_builder_base_1.MethodRequestBuilder {
|
|
14
14
|
/**
|
|
@@ -34,7 +34,7 @@ class DeleteRequestBuilderBase extends request_builder_base_1.MethodRequestBuild
|
|
|
34
34
|
*/
|
|
35
35
|
getBatchReference() {
|
|
36
36
|
if (!this._batchReference) {
|
|
37
|
-
this.setBatchId((0,
|
|
37
|
+
this.setBatchId((0, node_crypto_1.randomUUID)());
|
|
38
38
|
}
|
|
39
39
|
return this._batchReference;
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/delete-request-builder-base.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AACrD
|
|
1
|
+
{"version":3,"file":"delete-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/delete-request-builder-base.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,8CAAqD;AACrD,gDAA4C;AAC5C,wCAAsD;AACtD,iEAA8D;AAQ9D;;;GAGG;AACH,MAAsB,wBAIpB,SAAQ,2CAEP;IAOD;;;;;OAKG;IACH,YACW,UAA8C,EACvD,QAAkC,EAClC,YAA8C;QAE9C,KAAK,CAAC,IAAI,kCAAwB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;QAJjD,eAAU,GAAV,UAAU,CAAoC;QAKvD,IAAI,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AA5FD,4DA4FC"}
|
|
@@ -11,7 +11,7 @@ import type { DeSerializers } from '../de-serializers';
|
|
|
11
11
|
import type { EntityApi } from '../entity-api';
|
|
12
12
|
/**
|
|
13
13
|
* Base class for the get all request builders {@link @sap-cloud-sdk/odata-v2!GetAllRequestBuilder | GetAllRequestBuilderV2} and {@link @sap-cloud-sdk/odata-v4!GetAllRequestBuilder | GetAllRequestBuilderV4}.
|
|
14
|
-
* @
|
|
14
|
+
* @template EntityT - Type of the entity to be requested.
|
|
15
15
|
*/
|
|
16
16
|
export declare abstract class GetAllRequestBuilderBase<EntityT extends EntityBase, DeSerializersT extends DeSerializers> extends GetRequestBuilderBase<EntityT, DeSerializersT, ODataGetAllRequestConfig<EntityT, DeSerializersT>> {
|
|
17
17
|
readonly entityDeserializer: EntityDeserializer;
|
|
@@ -7,7 +7,7 @@ const count_request_builder_1 = require("./count-request-builder");
|
|
|
7
7
|
const get_request_builder_base_1 = require("./get-request-builder-base");
|
|
8
8
|
/**
|
|
9
9
|
* Base class for the get all request builders {@link @sap-cloud-sdk/odata-v2!GetAllRequestBuilder | GetAllRequestBuilderV2} and {@link @sap-cloud-sdk/odata-v4!GetAllRequestBuilder | GetAllRequestBuilderV4}.
|
|
10
|
-
* @
|
|
10
|
+
* @template EntityT - Type of the entity to be requested.
|
|
11
11
|
*/
|
|
12
12
|
class GetAllRequestBuilderBase extends get_request_builder_base_1.GetRequestBuilderBase {
|
|
13
13
|
/**
|
|
@@ -11,7 +11,7 @@ import type { EntityApi } from '../entity-api';
|
|
|
11
11
|
import type { BatchReference, WithBatchReference } from '../request';
|
|
12
12
|
/**
|
|
13
13
|
* Abstract class to create a get by key request containing the shared functionality for OData v2 and v4.
|
|
14
|
-
* @
|
|
14
|
+
* @template EntityT - Type of the entity to be requested.
|
|
15
15
|
*/
|
|
16
16
|
export declare abstract class GetByKeyRequestBuilderBase<EntityT extends EntityBase, DeSerializersT extends DeSerializers> extends GetRequestBuilderBase<EntityT, DeSerializersT, ODataGetByKeyRequestConfig<EntityT, DeSerializersT>> implements WithBatchReference {
|
|
17
17
|
readonly entityDeserializer: EntityDeserializer;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetByKeyRequestBuilderBase = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
4
5
|
const util_1 = require("@sap-cloud-sdk/util");
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
6
6
|
const request_1 = require("../request");
|
|
7
7
|
const get_request_builder_base_1 = require("./get-request-builder-base");
|
|
8
8
|
/**
|
|
9
9
|
* Abstract class to create a get by key request containing the shared functionality for OData v2 and v4.
|
|
10
|
-
* @
|
|
10
|
+
* @template EntityT - Type of the entity to be requested.
|
|
11
11
|
*/
|
|
12
12
|
class GetByKeyRequestBuilderBase extends get_request_builder_base_1.GetRequestBuilderBase {
|
|
13
13
|
/**
|
|
@@ -30,7 +30,7 @@ class GetByKeyRequestBuilderBase extends get_request_builder_base_1.GetRequestBu
|
|
|
30
30
|
*/
|
|
31
31
|
getBatchReference() {
|
|
32
32
|
if (!this._batchReference) {
|
|
33
|
-
this.setBatchId((0,
|
|
33
|
+
this.setBatchId((0, node_crypto_1.randomUUID)());
|
|
34
34
|
}
|
|
35
35
|
return this._batchReference;
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-by-key-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/get-by-key-request-builder-base.ts"],"names":[],"mappings":";;;AAAA,8CAG6B;AAC7B
|
|
1
|
+
{"version":3,"file":"get-by-key-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/get-by-key-request-builder-base.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,8CAG6B;AAC7B,wCAAwD;AACxD,yEAAmE;AAUnE;;;GAGG;AACH,MAAsB,0BAIpB,SAAQ,gDAIP;IAKD;;;;;;;OAO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|
|
@@ -5,9 +5,9 @@ import type { ODataRequestConfig, BatchReference, WithBatchReference } from '../
|
|
|
5
5
|
import type { DeSerializers } from '../de-serializers';
|
|
6
6
|
/**
|
|
7
7
|
* Create OData request to execute an action or function.
|
|
8
|
-
* @
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
8
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
9
|
+
* @template ReturnT - Type of the function return value.
|
|
10
|
+
* @template RequestConfigT - Type of the request config.
|
|
11
11
|
*/
|
|
12
12
|
export declare abstract class OperationRequestBuilderBase<DeSerializersT extends DeSerializers, ReturnT, RequestConfigT extends ODataRequestConfig> extends MethodRequestBuilder<RequestConfigT> implements WithBatchReference {
|
|
13
13
|
readonly responseTransformer: (data: any) => ReturnT;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OperationRequestBuilderBase = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
5
|
const request_builder_base_1 = require("./request-builder-base");
|
|
6
6
|
/**
|
|
7
7
|
* Create OData request to execute an action or function.
|
|
8
|
-
* @
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
8
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
9
|
+
* @template ReturnT - Type of the function return value.
|
|
10
|
+
* @template RequestConfigT - Type of the request config.
|
|
11
11
|
*/
|
|
12
12
|
class OperationRequestBuilderBase extends request_builder_base_1.MethodRequestBuilder {
|
|
13
13
|
/**
|
|
@@ -49,7 +49,7 @@ class OperationRequestBuilderBase extends request_builder_base_1.MethodRequestBu
|
|
|
49
49
|
*/
|
|
50
50
|
getBatchReference() {
|
|
51
51
|
if (!this._batchReference) {
|
|
52
|
-
this.setBatchId((0,
|
|
52
|
+
this.setBatchId((0, node_crypto_1.randomUUID)());
|
|
53
53
|
}
|
|
54
54
|
return this._batchReference;
|
|
55
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/operation-request-builder-base.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"operation-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/operation-request-builder-base.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,iEAA8D;AAU9D;;;;;GAKG;AACH,MAAsB,2BAKpB,SAAQ,2CAAoC;IAI5C;;;;;OAKG;IACH,YACW,mBAA2C,EACpD,aAA6B,EACpB,cAA8B;QAEvC,KAAK,CAAC,aAAa,CAAC,CAAC;QAJZ,wBAAmB,GAAnB,mBAAmB,CAAwB;QAE3C,mBAAc,GAAd,cAAc,CAAgB;IAGzC,CAAC;IACD;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,WAA0C,EAC1C,YAAiC;QAEjC,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAClD,MAAM,IAAI,GAAG,YAAY;gBACvB,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBACpC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,UAAU,CACd,WAA0C;QAE1C,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;OAGG;IACH,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAC1B,IAAI,CAAC,UAAU,CAAC,IAAA,wBAAU,GAAE,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,EAAU;QACnB,IAAI,CAAC,eAAe,GAAG,EAAE,EAAE,EAAE,CAAC;IAChC,CAAC;CACF;AArED,kEAqEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-builder.js","sourceRoot":"","sources":["../../src/request-builder/request-builder.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,MAAsB,cAAc;
|
|
1
|
+
{"version":3,"file":"request-builder.js","sourceRoot":"","sources":["../../src/request-builder/request-builder.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,MAAsB,cAAc;IAOlC,YAAmB,SAA6C;QAA7C,cAAS,GAAT,SAAS,CAAoC;IAAG,CAAC;CACrE;AARD,wCAQC"}
|
|
@@ -10,7 +10,7 @@ import type { DeSerializers } from '../de-serializers';
|
|
|
10
10
|
import type { EntityApi } from '../entity-api';
|
|
11
11
|
/**
|
|
12
12
|
* Abstract class to create OData query to update an entity containing methods shared for OData v2 and v4.
|
|
13
|
-
* @
|
|
13
|
+
* @template EntityT - Type of the entity to be updated.
|
|
14
14
|
*/
|
|
15
15
|
export declare abstract class UpdateRequestBuilderBase<EntityT extends EntityBase, DeSerializersT extends DeSerializers> extends MethodRequestBuilder<ODataUpdateRequestConfig<EntityT, DeSerializersT>> implements EntityIdentifiable<EntityT, DeSerializersT>, WithBatchReference {
|
|
16
16
|
readonly _entityApi: EntityApi<EntityT, DeSerializersT>;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateRequestBuilderBase = void 0;
|
|
4
4
|
exports.removePropertyOnCondition = removePropertyOnCondition;
|
|
5
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
6
|
const util_1 = require("@sap-cloud-sdk/util");
|
|
6
|
-
const uuid_1 = require("uuid");
|
|
7
7
|
const entity_deserializer_1 = require("../entity-deserializer");
|
|
8
8
|
const request_1 = require("../request");
|
|
9
9
|
const request_builder_base_1 = require("./request-builder-base");
|
|
10
10
|
/**
|
|
11
11
|
* Abstract class to create OData query to update an entity containing methods shared for OData v2 and v4.
|
|
12
|
-
* @
|
|
12
|
+
* @template EntityT - Type of the entity to be updated.
|
|
13
13
|
*/
|
|
14
14
|
class UpdateRequestBuilderBase extends request_builder_base_1.MethodRequestBuilder {
|
|
15
15
|
/**
|
|
@@ -44,7 +44,7 @@ class UpdateRequestBuilderBase extends request_builder_base_1.MethodRequestBuild
|
|
|
44
44
|
*/
|
|
45
45
|
getBatchReference() {
|
|
46
46
|
if (!this._batchReference) {
|
|
47
|
-
this.setBatchId((0,
|
|
47
|
+
this.setBatchId((0, node_crypto_1.randomUUID)());
|
|
48
48
|
}
|
|
49
49
|
return this._batchReference;
|
|
50
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/update-request-builder-base.ts"],"names":[],"mappings":";;;AAgRA,8DAUC;AA1RD,8CAG6B;AAC7B
|
|
1
|
+
{"version":3,"file":"update-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/update-request-builder-base.ts"],"names":[],"mappings":";;;AAgRA,8DAUC;AA1RD,6CAAyC;AACzC,8CAG6B;AAC7B,gEAA+D;AAC/D,wCAAsD;AACtD,iEAA8D;AAc9D;;;GAGG;AACH,MAAsB,wBAIpB,SAAQ,2CAEP;IAQD;;;;;;;;OAQG;IACH,YACW,UAA8C,EAC9C,OAAgB,EAChB,QAAkC,EAClC,gBAAkC,EAClC,gBAEc,EACd,kBAEe;QAExB,KAAK,CAAC,IAAI,kCAAwB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;QAXjD,eAAU,GAAV,UAAU,CAAoC;QAC9C,YAAO,GAAP,OAAO,CAAS;QAChB,aAAQ,GAAR,QAAQ,CAA0B;QAClC,qBAAgB,GAAhB,gBAAgB,CAAkB;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AC;IACvC,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -7,11 +7,11 @@ import type { ConstructorOrField } from './constructor-or-field';
|
|
|
7
7
|
import type { ComplexTypeNamespace } from './complex-type-namespace';
|
|
8
8
|
/**
|
|
9
9
|
* Represents a field of an entity or a complex type, that can have a collection as value.
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
13
|
-
* @
|
|
14
|
-
* @
|
|
10
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
11
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
12
|
+
* @template CollectionFieldT - Type of of elements of the collection. This can either be an EDM type or complex type.
|
|
13
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
14
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
15
15
|
*/
|
|
16
16
|
export declare class CollectionField<EntityT extends EntityBase, DeSerializersT extends DeSerializers, CollectionFieldT extends EdmTypeShared<'any'> | Record<string, any> = any, NullableT extends boolean = false, SelectableT extends boolean = false> extends Field<EntityT, NullableT, SelectableT> {
|
|
17
17
|
readonly _fieldOf: ConstructorOrField<EntityT>;
|
|
@@ -34,6 +34,6 @@ export declare class CollectionField<EntityT extends EntityBase, DeSerializersT
|
|
|
34
34
|
/**
|
|
35
35
|
* Convenience type to reflect the type of the instances of a collection field.
|
|
36
36
|
* The actual type of the elements for complex type collections is {@link ComplexTypeNamespace}.
|
|
37
|
-
* @
|
|
37
|
+
* @template CollectionFieldT - Type of of elements of the collection. This can either be an EDM type or complex type.
|
|
38
38
|
*/
|
|
39
39
|
export type CollectionFieldType<CollectionFieldT extends EdmTypeShared<'any'> | Record<string, any>> = CollectionFieldT | ComplexTypeNamespace<CollectionFieldT>;
|
|
@@ -5,11 +5,11 @@ const field_1 = require("./field");
|
|
|
5
5
|
const complex_type_field_1 = require("./complex-type-field");
|
|
6
6
|
/**
|
|
7
7
|
* Represents a field of an entity or a complex type, that can have a collection as value.
|
|
8
|
-
* @
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
8
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
9
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
10
|
+
* @template CollectionFieldT - Type of of elements of the collection. This can either be an EDM type or complex type.
|
|
11
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
12
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
13
13
|
*/
|
|
14
14
|
class CollectionField extends field_1.Field {
|
|
15
15
|
/**
|
|
@@ -17,11 +17,11 @@ import type { ConstructorOrField } from './constructor-or-field';
|
|
|
17
17
|
* Moreover, classes implementing this abstract class will provide property fields, that can be used for filtering and ordering.
|
|
18
18
|
*
|
|
19
19
|
* See also: {@link Selectable}.
|
|
20
|
-
* @
|
|
21
|
-
* @
|
|
22
|
-
* @
|
|
23
|
-
* @
|
|
24
|
-
* @
|
|
20
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
21
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
22
|
+
* @template ComplexT - Type of complex type represented by this field.
|
|
23
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
24
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
25
25
|
*/
|
|
26
26
|
export declare abstract class ComplexTypeField<EntityT extends EntityBase, DeSerializersT extends DeSerializers, ComplexT = any, NullableT extends boolean = false, SelectableT extends boolean = false> extends Field<EntityT, NullableT, SelectableT> {
|
|
27
27
|
readonly fieldOf: ConstructorOrField<EntityT, ComplexT>;
|
|
@@ -16,11 +16,11 @@ const field_1 = require("./field");
|
|
|
16
16
|
* Moreover, classes implementing this abstract class will provide property fields, that can be used for filtering and ordering.
|
|
17
17
|
*
|
|
18
18
|
* See also: {@link Selectable}.
|
|
19
|
-
* @
|
|
20
|
-
* @
|
|
21
|
-
* @
|
|
22
|
-
* @
|
|
23
|
-
* @
|
|
19
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
20
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
21
|
+
* @template ComplexT - Type of complex type represented by this field.
|
|
22
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
23
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
24
24
|
*/
|
|
25
25
|
class ComplexTypeField extends field_1.Field {
|
|
26
26
|
/**
|
|
@@ -7,14 +7,14 @@ import type { ConstructorOrField } from './constructor-or-field';
|
|
|
7
7
|
import type { FieldOptions } from './field';
|
|
8
8
|
/**
|
|
9
9
|
* Convenience type that maps the given field type to a new type that is either nullable or not, depending on the given `NullableT`.
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
10
|
+
* @template FieldT - Field type of the field.
|
|
11
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
12
12
|
*/
|
|
13
13
|
export type NullableFieldType<FieldT, NullableT extends boolean> = NullableT extends true ? FieldT | null : FieldT;
|
|
14
14
|
/**
|
|
15
15
|
* Convenience type that maps the given EDM type to a field type. It also considers whether the field is nullable.
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
16
|
+
* @template EdmT - EDM type of the field. Deprecated: Field type of the field.
|
|
17
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
18
18
|
*/
|
|
19
19
|
export type FieldTypeByEdmType<T extends DeSerializers, EdmT extends EdmTypeShared<'any'>, NullableT extends boolean> = NullableFieldType<DeserializedType<T, EdmT>, NullableT>;
|
|
20
20
|
/**
|
|
@@ -27,11 +27,11 @@ export type FieldTypeByEdmType<T extends DeSerializers, EdmT extends EdmTypeShar
|
|
|
27
27
|
* can be supplied as argument to the select function, e.g. `BusinessPartner.FIRST_NAME`.
|
|
28
28
|
*
|
|
29
29
|
* See also: {@link Selectable}.
|
|
30
|
-
* @
|
|
31
|
-
* @
|
|
32
|
-
* @
|
|
33
|
-
* @
|
|
34
|
-
* @
|
|
30
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
31
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
32
|
+
* @template EdmT - EDM type of the field.
|
|
33
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
34
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
35
35
|
*/
|
|
36
36
|
export declare class EdmTypeField<EntityT extends EntityBase, DeSerializersT extends DeSerializers, EdmT extends EdmTypeShared<'any'>, NullableT extends boolean = false, SelectableT extends boolean = false> extends Field<EntityT, NullableT, SelectableT> implements EntityIdentifiable<EntityT, DeSerializersT> {
|
|
37
37
|
readonly _fieldOf: ConstructorOrField<EntityT>;
|
|
@@ -14,11 +14,11 @@ const field_1 = require("./field");
|
|
|
14
14
|
* can be supplied as argument to the select function, e.g. `BusinessPartner.FIRST_NAME`.
|
|
15
15
|
*
|
|
16
16
|
* See also: {@link Selectable}.
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
19
|
-
* @
|
|
20
|
-
* @
|
|
21
|
-
* @
|
|
17
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
18
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
19
|
+
* @template EdmT - EDM type of the field.
|
|
20
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
21
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
22
22
|
*/
|
|
23
23
|
class EdmTypeField extends field_1.Field {
|
|
24
24
|
/**
|
|
@@ -7,10 +7,10 @@ import type { FieldOptions } from './field';
|
|
|
7
7
|
import type { ConstructorOrField } from './constructor-or-field';
|
|
8
8
|
/**
|
|
9
9
|
* Represents a property with an enum value.
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
13
|
-
* @
|
|
10
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
11
|
+
* @template EnumT - Enum type that contains all valid enum entries for this field.
|
|
12
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
13
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
14
14
|
*/
|
|
15
15
|
export declare class EnumField<EntityT extends EntityBase, DeSerializersT extends DeSerializers, EnumT extends string = string, NullableT extends boolean = false, SelectableT extends boolean = false> extends Field<EntityT, NullableT, SelectableT> {
|
|
16
16
|
readonly _fieldOf: ConstructorOrField<EntityT>;
|
|
@@ -6,10 +6,10 @@ const field_1 = require("./field");
|
|
|
6
6
|
const complex_type_field_1 = require("./complex-type-field");
|
|
7
7
|
/**
|
|
8
8
|
* Represents a property with an enum value.
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
9
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
10
|
+
* @template EnumT - Enum type that contains all valid enum entries for this field.
|
|
11
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
12
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
13
13
|
*/
|
|
14
14
|
class EnumField extends field_1.Field {
|
|
15
15
|
/**
|
|
@@ -15,7 +15,7 @@ import type { FieldOptions } from './field';
|
|
|
15
15
|
export type ComplexTypeFieldConstructor<ComplexTypeFieldT extends ComplexTypeField<EntityT, DeSerializersT, ComplexT, NullableT, SelectableT>, EntityT extends EntityBase, DeSerializersT extends DeSerializers, ComplexT, NullableT extends boolean, SelectableT extends boolean> = new (fieldName: string, fieldOf: ConstructorOrField<EntityT>, deSerializers: DeSerializersT, fieldOptions?: FieldOptions<NullableT, SelectableT>) => ComplexTypeFieldT;
|
|
16
16
|
/**
|
|
17
17
|
* Convenience type to determine whether a field should be selectable. If the given `FieldOfT` is the type of an entity, it is selectable.
|
|
18
|
-
* @
|
|
18
|
+
* @template FieldOfT - Type of the entity or complex type field this field belongs to.
|
|
19
19
|
*/
|
|
20
20
|
export type IsSelectableField<FieldOfT extends ConstructorOrField<any>> = FieldOfT extends Constructable<any> ? true : false;
|
|
21
21
|
/**
|
|
@@ -30,8 +30,8 @@ export type IsOrderableField<EdmT extends EdmTypeShared<'any'>> = EdmT extends O
|
|
|
30
30
|
export type EntityTypeFromFieldOf<FieldOfT extends ConstructorOrField<any>> = FieldOfT extends ConstructorOrField<infer EntityT> ? EntityT : never;
|
|
31
31
|
/**
|
|
32
32
|
* Field builder to orchestrate the creation of the different kinds of fields.
|
|
33
|
-
* @
|
|
34
|
-
* @
|
|
33
|
+
* @template FieldOfT - Type of the entity or complex type field this field belongs to.
|
|
34
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
35
35
|
*/
|
|
36
36
|
export declare class FieldBuilder<FieldOfT extends ConstructorOrField<any>, DeSerializersT extends DeSerializers> {
|
|
37
37
|
fieldOf: FieldOfT;
|
|
@@ -10,8 +10,8 @@ const collection_field_1 = require("./collection-field");
|
|
|
10
10
|
const enum_field_1 = require("./enum-field");
|
|
11
11
|
/**
|
|
12
12
|
* Field builder to orchestrate the creation of the different kinds of fields.
|
|
13
|
-
* @
|
|
14
|
-
* @
|
|
13
|
+
* @template FieldOfT - Type of the entity or complex type field this field belongs to.
|
|
14
|
+
* @template DeSerializersT - Type of the (de-)serializers.
|
|
15
15
|
*/
|
|
16
16
|
class FieldBuilder {
|
|
17
17
|
/**
|
|
@@ -32,9 +32,9 @@ export declare function getFieldOptions<NullableT extends boolean = false, Selec
|
|
|
32
32
|
* Fields are used to represent the domain of values that can be used in select, filter and order by functions.
|
|
33
33
|
*
|
|
34
34
|
* See also: {@link Selectable}, {@link EdmTypeField}, {@link ComplexTypeField}.
|
|
35
|
-
* @
|
|
36
|
-
* @
|
|
37
|
-
* @
|
|
35
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
36
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
37
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
38
38
|
*/
|
|
39
39
|
export declare class Field<EntityT extends EntityBase, NullableT extends boolean = false, SelectableT extends boolean = false> {
|
|
40
40
|
readonly _fieldName: string;
|
package/dist/selectable/field.js
CHANGED
|
@@ -25,9 +25,9 @@ const defaultFieldOptions = {
|
|
|
25
25
|
* Fields are used to represent the domain of values that can be used in select, filter and order by functions.
|
|
26
26
|
*
|
|
27
27
|
* See also: {@link Selectable}, {@link EdmTypeField}, {@link ComplexTypeField}.
|
|
28
|
-
* @
|
|
29
|
-
* @
|
|
30
|
-
* @
|
|
28
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
29
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
30
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
31
31
|
*/
|
|
32
32
|
class Field {
|
|
33
33
|
/**
|
|
@@ -17,8 +17,8 @@ import type { Selectable } from './selectable';
|
|
|
17
17
|
* OData v4 entity: 1:N is a {@link OneToManyLink}, 1:0..1 is a {@link OneToOneLink}.
|
|
18
18
|
*
|
|
19
19
|
* See also: {@link Selectable}.
|
|
20
|
-
* @
|
|
21
|
-
* @
|
|
20
|
+
* @template EntityT - Type of the entity to be linked from.
|
|
21
|
+
* @template LinkedEntityT - Type of the entity to be linked to.
|
|
22
22
|
*/
|
|
23
23
|
export declare class Link<EntityT extends EntityBase, DeSerializersT extends DeSerializers, LinkedEntityApiT extends EntityApi<EntityBase, DeSerializersT>> implements EntityIdentifiable<EntityT, DeSerializersT> {
|
|
24
24
|
readonly _fieldName: string;
|
|
@@ -49,8 +49,8 @@ export declare class Link<EntityT extends EntityBase, DeSerializersT extends DeS
|
|
|
49
49
|
expand(...expands: Expandable<EntityType<LinkedEntityApiT>, DeSerializersT, EntityApi<EntityBase, DeSerializersT>>[]): this;
|
|
50
50
|
/**
|
|
51
51
|
* Create a new link based on a given link.
|
|
52
|
-
* @
|
|
53
|
-
* @
|
|
52
|
+
* @template EntityT - Type of the entity to be linked from.
|
|
53
|
+
* @template LinkedEntityT - Type of the entity to be linked to.
|
|
54
54
|
* @returns Newly created link.
|
|
55
55
|
*/
|
|
56
56
|
clone(): this;
|
package/dist/selectable/link.js
CHANGED
|
@@ -15,8 +15,8 @@ exports.Link = void 0;
|
|
|
15
15
|
* OData v4 entity: 1:N is a {@link OneToManyLink}, 1:0..1 is a {@link OneToOneLink}.
|
|
16
16
|
*
|
|
17
17
|
* See also: {@link Selectable}.
|
|
18
|
-
* @
|
|
19
|
-
* @
|
|
18
|
+
* @template EntityT - Type of the entity to be linked from.
|
|
19
|
+
* @template LinkedEntityT - Type of the entity to be linked to.
|
|
20
20
|
*/
|
|
21
21
|
class Link {
|
|
22
22
|
/**
|
|
@@ -54,8 +54,8 @@ class Link {
|
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Create a new link based on a given link.
|
|
57
|
-
* @
|
|
58
|
-
* @
|
|
57
|
+
* @template EntityT - Type of the entity to be linked from.
|
|
58
|
+
* @template LinkedEntityT - Type of the entity to be linked to.
|
|
59
59
|
* @returns Newly created link.
|
|
60
60
|
*/
|
|
61
61
|
clone() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/selectable/link.ts"],"names":[],"mappings":";;;AAMA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,IAAI;
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/selectable/link.ts"],"names":[],"mappings":";;;AAMA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,IAAI;IAkBf;;;;;OAKG;IACH,YACW,UAAkB,EAClB,UAA8C,EAC9C,gBAAkC;QAFlC,eAAU,GAAV,UAAU,CAAQ;QAClB,eAAU,GAAV,UAAU,CAAoC;QAC9C,qBAAgB,GAAhB,gBAAgB,CAAkB;QAnB7C;;WAEG;QACH,aAAQ,GAA+D,EAAE,CAAC;QAC1E,YAAO,GAID,EAAE,CAAC;IAYN,CAAC;IAEJ;;;;;;OAMG;IACH,MAAM,CACJ,GAAG,OAAmE;QAEtE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CACJ,GAAG,OAIA;QAEH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,KAAK;QACH,MAAM,UAAU,GAAG,IAAK,IAAI,CAAC,WAAmB,CAC9C,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,gBAAgB,CACtB,CAAC;QACF,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACpC,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAClC,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAzED,oBAyEC"}
|
|
@@ -8,8 +8,8 @@ import type { DeSerializers } from '../de-serializers';
|
|
|
8
8
|
import type { EntityApi, EntityType } from '../entity-api';
|
|
9
9
|
/**
|
|
10
10
|
* Represents a link from one entity to one other linked entity (as opposed to a list of linked entities). In OData v2 a `OneToOneLink` can be used to filter and order a selection on an entity based on filters and orders on a linked entity.
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
11
|
+
* @template EntityT - Type of the entity to be linked from.
|
|
12
|
+
* @template LinkedEntityT - Type of the entity to be linked to.
|
|
13
13
|
*/
|
|
14
14
|
export declare class OneToOneLink<EntityT extends EntityBase, DeSerializersT extends DeSerializers, LinkedEntityApiT extends EntityApi<EntityBase, DeSerializersT>> extends Link<EntityT, DeSerializersT, LinkedEntityApiT> {
|
|
15
15
|
/**
|
|
@@ -6,8 +6,8 @@ const filter_1 = require("../filter");
|
|
|
6
6
|
const link_1 = require("./link");
|
|
7
7
|
/**
|
|
8
8
|
* Represents a link from one entity to one other linked entity (as opposed to a list of linked entities). In OData v2 a `OneToOneLink` can be used to filter and order a selection on an entity based on filters and orders on a linked entity.
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
9
|
+
* @template EntityT - Type of the entity to be linked from.
|
|
10
|
+
* @template LinkedEntityT - Type of the entity to be linked to.
|
|
11
11
|
*/
|
|
12
12
|
class OneToOneLink extends link_1.Link {
|
|
13
13
|
constructor() {
|
|
@@ -6,10 +6,10 @@ import type { DeSerializers } from '../de-serializers';
|
|
|
6
6
|
import type { FieldTypeByEdmType } from './edm-type-field';
|
|
7
7
|
/**
|
|
8
8
|
* {@link EdmTypeField}, that represents a property with an EDM type, that can be compared with `greaterThan`, `greaterOrEqual`, `lessThan` and `lessOrEqual`.
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
9
|
+
* @template EntityT - Type of the entity the field belongs to.
|
|
10
|
+
* @template EdmT - EDM type of the field.
|
|
11
|
+
* @template NullableT - Boolean type that represents whether the field is nullable.
|
|
12
|
+
* @template SelectableT - Boolean type that represents whether the field is selectable.
|
|
13
13
|
*/
|
|
14
14
|
export declare class OrderableEdmTypeField<EntityT extends EntityBase, DeSerializersT extends DeSerializers, EdmT extends EdmTypeShared<'any'>, NullableT extends boolean = false, SelectableT extends boolean = false> extends EdmTypeField<EntityT, DeSerializersT, EdmT, NullableT, SelectableT> {
|
|
15
15
|
/**
|