strata.client.core 0.0.0-snapshot.7 → 0.0.0-snapshot.9

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.
@@ -2,6 +2,7 @@ import { IResponse } from "./IResponse";
2
2
  export declare class StandardResponse implements IResponse {
3
3
  private readonly requestPath;
4
4
  private readonly response;
5
+ private readonly mapper;
5
6
  constructor(rootPath: string, methodPath: string, response: Response);
6
7
  getRequestPath(): string;
7
8
  getMediaType(): string;
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StandardResponse = void 0;
4
+ const jackson_js_1 = require("jackson-js");
4
5
  class StandardResponse {
5
6
  requestPath;
6
7
  response;
8
+ mapper;
7
9
  constructor(rootPath, methodPath, response) {
8
10
  this.requestPath = rootPath + '/' + methodPath;
9
11
  this.response = response;
12
+ this.mapper = new jackson_js_1.ObjectMapper();
10
13
  }
11
14
  getRequestPath() {
12
15
  return this.requestPath;
@@ -22,8 +25,12 @@ class StandardResponse {
22
25
  getStatusReason() {
23
26
  return this.response.statusText;
24
27
  }
25
- readEntity(entityType) {
26
- return this.response.json().then(value => this.instantiate(entityType, value));
28
+ async readEntity(entityType) {
29
+ return this.mapper.parse(await this.response.text());
30
+ /*
31
+ const value = await this.response.json();
32
+ return this.instantiate(entityType,value);
33
+ */
27
34
  }
28
35
  close() {
29
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StandardResponse.js","sourceRoot":"","sources":["../../../main/typescript/Service/StandardResponse.ts"],"names":[],"mappings":";;;AAEA,MACM,gBAAgB;IAGD,WAAW,CAAS;IACpB,QAAQ,CAAW;IAEpC,YAAY,QAAgB,EAAC,UAAkB,EAAC,QAAkB;QAE9D,IAAI,CAAC,WAAW,GAAG,QAAQ,GAAG,GAAG,GAAG,UAAU,CAAC;QAC/C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,cAAc;QAEV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AI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;YACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAErD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,SAAS;QAEL,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAChC,CAAC;IAED,eAAe;QAEX,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,UAAU,CAAI,UAAwB;QAExC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAI,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QACxD;;;WAGG;IACP,CAAC;IAED,KAAK;IAEL,CAAC;IAES,WAAW,CAAI,UAAsB,EAAC,KAAU;QAEtD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,UAAU,EAAE,EAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACJ;AAvDD,4CAuDC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strata.client.core",
3
- "version": "0.0.0-snapshot.7",
3
+ "version": "0.0.0-snapshot.9",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "increment-snapshot": "npm version prerelease",
@@ -9,8 +9,10 @@
9
9
  "increment-patch": "npm version patch"
10
10
  },
11
11
  "dependencies": {
12
+ "@types/node": "^20.6.2",
12
13
  "rxjs": "^6.5.5",
13
14
  "strata.foundation.core": "^0.0.0-snapshot.18",
15
+ "jackson-js": "^1.1.0",
14
16
  "guid-typescript": "^1.0.9"
15
17
  }
16
18
  }