@sap-cloud-sdk/odata-common 2.2.1-20220421081002.0 → 2.3.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/request-builder/action-function-import-request-builder-base.d.ts +2 -1
- package/dist/request-builder/action-function-import-request-builder-base.d.ts.map +1 -1
- package/dist/request-builder/action-function-import-request-builder-base.js +8 -2
- package/dist/request-builder/action-function-import-request-builder-base.js.map +1 -1
- package/package.json +5 -5
|
@@ -18,9 +18,10 @@ export declare abstract class ActionFunctionImportRequestBuilderBase<ReturnT, Re
|
|
|
18
18
|
/**
|
|
19
19
|
* Execute request.
|
|
20
20
|
* @param destination - Destination or DestinationFetchOptions to execute the request against.
|
|
21
|
+
* @param dataAccessor - A function to modify the received response data.
|
|
21
22
|
* @returns A promise resolving to the requested return type.
|
|
22
23
|
*/
|
|
23
|
-
execute(destination: DestinationOrFetchOptions): Promise<ReturnT>;
|
|
24
|
+
execute(destination: DestinationOrFetchOptions, dataAccessor?: (data: any) => any): Promise<ReturnT>;
|
|
24
25
|
/**
|
|
25
26
|
* Execute request and return an [[HttpResponse]].
|
|
26
27
|
* @param destination - Destination or DestinationFetchOptions to execute the request against.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-function-import-request-builder-base.d.ts","sourceRoot":"","sources":["../../src/request-builder/action-function-import-request-builder-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;GAIG;AACH,8BAAsB,sCAAsC,CAC1D,OAAO,EACP,cAAc,SAAS,kBAAkB,CACzC,SAAQ,oBAAoB,CAAC,cAAc,CAAC;IAO1C,QAAQ,CAAC,mBAAmB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO;IANtD;;;;OAIG;IACH,SAAS,aACE,mBAAmB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,EACpD,aAAa,EAAE,cAAc;IAK/B
|
|
1
|
+
{"version":3,"file":"action-function-import-request-builder-base.d.ts","sourceRoot":"","sources":["../../src/request-builder/action-function-import-request-builder-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;GAIG;AACH,8BAAsB,sCAAsC,CAC1D,OAAO,EACP,cAAc,SAAS,kBAAkB,CACzC,SAAQ,oBAAoB,CAAC,cAAc,CAAC;IAO1C,QAAQ,CAAC,mBAAmB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO;IANtD;;;;OAIG;IACH,SAAS,aACE,mBAAmB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,EACpD,aAAa,EAAE,cAAc;IAK/B;;;;;OAKG;IACG,OAAO,CACX,WAAW,EAAE,yBAAyB,EACtC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,GAChC,OAAO,CAAC,OAAO,CAAC;IASnB;;;;OAIG;IACG,UAAU,CACd,WAAW,EAAE,yBAAyB,GACrC,OAAO,CAAC,YAAY,CAAC;CAGzB"}
|
|
@@ -20,10 +20,16 @@ class ActionFunctionImportRequestBuilderBase extends request_builder_base_1.Meth
|
|
|
20
20
|
/**
|
|
21
21
|
* Execute request.
|
|
22
22
|
* @param destination - Destination or DestinationFetchOptions to execute the request against.
|
|
23
|
+
* @param dataAccessor - A function to modify the received response data.
|
|
23
24
|
* @returns A promise resolving to the requested return type.
|
|
24
25
|
*/
|
|
25
|
-
async execute(destination) {
|
|
26
|
-
return this.executeRaw(destination).then(response =>
|
|
26
|
+
async execute(destination, dataAccessor) {
|
|
27
|
+
return this.executeRaw(destination).then(response => {
|
|
28
|
+
const data = dataAccessor
|
|
29
|
+
? { d: dataAccessor(response.data) }
|
|
30
|
+
: response.data;
|
|
31
|
+
return this.responseTransformer(data);
|
|
32
|
+
});
|
|
27
33
|
}
|
|
28
34
|
/**
|
|
29
35
|
* Execute request and return an [[HttpResponse]].
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-function-import-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/action-function-import-request-builder-base.ts"],"names":[],"mappings":";;;AAGA,iEAA8D;AAE9D;;;;GAIG;AACH,MAAsB,sCAGpB,SAAQ,2CAAoC;IAC5C;;;;OAIG;IACH,YACW,mBAA2C,EACpD,aAA6B;QAE7B,KAAK,CAAC,aAAa,CAAC,CAAC;QAHZ,wBAAmB,GAAnB,mBAAmB,CAAwB;IAItD,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"action-function-import-request-builder-base.js","sourceRoot":"","sources":["../../src/request-builder/action-function-import-request-builder-base.ts"],"names":[],"mappings":";;;AAGA,iEAA8D;AAE9D;;;;GAIG;AACH,MAAsB,sCAGpB,SAAQ,2CAAoC;IAC5C;;;;OAIG;IACH,YACW,mBAA2C,EACpD,aAA6B;QAE7B,KAAK,CAAC,aAAa,CAAC,CAAC;QAHZ,wBAAmB,GAAnB,mBAAmB,CAAwB;IAItD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,WAAsC,EACtC,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,WAAsC;QAEtC,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AA5CD,wFA4CC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-cloud-sdk/odata-common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.",
|
|
5
5
|
"homepage": "https://sap.github.io/cloud-sdk/docs/js/overview-cloud-sdk-for-javascript",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"check:dependencies": "depcheck ."
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@sap-cloud-sdk/connectivity": "^2.
|
|
36
|
-
"@sap-cloud-sdk/http-client": "^2.
|
|
37
|
-
"@sap-cloud-sdk/util": "^2.
|
|
35
|
+
"@sap-cloud-sdk/connectivity": "^2.3.0",
|
|
36
|
+
"@sap-cloud-sdk/http-client": "^2.3.0",
|
|
37
|
+
"@sap-cloud-sdk/util": "^2.3.0",
|
|
38
38
|
"bignumber.js": "^9.0.0",
|
|
39
39
|
"moment": "^2.29.0",
|
|
40
40
|
"uuid": "^8.2.0",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "~4.6.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d74f5cad5e4dfebf60bf5082c5857b207d28a6ad"
|
|
47
47
|
}
|