@arrowsphere/api-client 3.77.0 → 3.77.1-bdj.2

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,21 +1,21 @@
1
1
  import { AbstractEntity } from '../../../abstractEntity';
2
2
  export declare enum LicenseRequestFields {
3
- ACTION = "action",
4
- CREATED_AT = "createdAt",
5
- LICENSE_REFERENCE = "licenseReference",
6
- MESSAGE = "message",
7
- STATUS = "status",
8
- UPDATED_AT = "updatedAt",
9
- USER_NAME = "userName"
3
+ COLUMN_ACTION = "action",
4
+ COLUMN_CREATED_AT = "createdAt",
5
+ COLUMN_LICENSE_REFERENCE = "licenseReference",
6
+ COLUMN_MESSAGE = "message",
7
+ COLUMN_STATUS = "status",
8
+ COLUMN_UPDATED_AT = "updatedAt",
9
+ COLUMN_USER_NAME = "userName"
10
10
  }
11
11
  export declare type LicenseRequestType = {
12
- [LicenseRequestFields.ACTION]?: string;
13
- [LicenseRequestFields.CREATED_AT]?: string;
14
- [LicenseRequestFields.LICENSE_REFERENCE]?: string;
15
- [LicenseRequestFields.MESSAGE]?: string;
16
- [LicenseRequestFields.STATUS]?: string;
17
- [LicenseRequestFields.UPDATED_AT]?: string;
18
- [LicenseRequestFields.USER_NAME]?: string;
12
+ [LicenseRequestFields.COLUMN_ACTION]?: string;
13
+ [LicenseRequestFields.COLUMN_CREATED_AT]?: string;
14
+ [LicenseRequestFields.COLUMN_LICENSE_REFERENCE]?: string;
15
+ [LicenseRequestFields.COLUMN_MESSAGE]?: string;
16
+ [LicenseRequestFields.COLUMN_STATUS]?: string;
17
+ [LicenseRequestFields.COLUMN_UPDATED_AT]?: string;
18
+ [LicenseRequestFields.COLUMN_USER_NAME]?: string;
19
19
  };
20
20
  export declare class LicenseRequest extends AbstractEntity<LicenseRequestType> {
21
21
  #private;
@@ -29,3 +29,15 @@ export declare class LicenseRequest extends AbstractEntity<LicenseRequestType> {
29
29
  get message(): string | undefined;
30
30
  toJSON(): LicenseRequestType;
31
31
  }
32
+ export declare enum LicenseRequestResultFields {
33
+ COLUMN_LICENSE_REQUEST = "licenseRequests"
34
+ }
35
+ export declare type LicenseRequestResultType = {
36
+ [LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]?: LicenseRequestType[];
37
+ };
38
+ export declare class LicenseRequestResult extends AbstractEntity<LicenseRequestResultType> {
39
+ #private;
40
+ constructor(input: LicenseRequestResultType);
41
+ get licenseRequest(): LicenseRequest[] | undefined;
42
+ toJSON(): LicenseRequestResultType;
43
+ }
@@ -10,19 +10,19 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
11
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
12
  };
13
- var _LicenseRequest_action, _LicenseRequest_createdAt, _LicenseRequest_licenseReference, _LicenseRequest_message, _LicenseRequest_status, _LicenseRequest_updatedAt, _LicenseRequest_userName;
13
+ var _LicenseRequest_action, _LicenseRequest_createdAt, _LicenseRequest_licenseReference, _LicenseRequest_message, _LicenseRequest_status, _LicenseRequest_updatedAt, _LicenseRequest_userName, _LicenseRequestResult_licenseRequests;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.LicenseRequest = exports.LicenseRequestFields = void 0;
15
+ exports.LicenseRequestResult = exports.LicenseRequestResultFields = exports.LicenseRequest = exports.LicenseRequestFields = void 0;
16
16
  const abstractEntity_1 = require("../../../abstractEntity");
17
17
  var LicenseRequestFields;
18
18
  (function (LicenseRequestFields) {
19
- LicenseRequestFields["ACTION"] = "action";
20
- LicenseRequestFields["CREATED_AT"] = "createdAt";
21
- LicenseRequestFields["LICENSE_REFERENCE"] = "licenseReference";
22
- LicenseRequestFields["MESSAGE"] = "message";
23
- LicenseRequestFields["STATUS"] = "status";
24
- LicenseRequestFields["UPDATED_AT"] = "updatedAt";
25
- LicenseRequestFields["USER_NAME"] = "userName";
19
+ LicenseRequestFields["COLUMN_ACTION"] = "action";
20
+ LicenseRequestFields["COLUMN_CREATED_AT"] = "createdAt";
21
+ LicenseRequestFields["COLUMN_LICENSE_REFERENCE"] = "licenseReference";
22
+ LicenseRequestFields["COLUMN_MESSAGE"] = "message";
23
+ LicenseRequestFields["COLUMN_STATUS"] = "status";
24
+ LicenseRequestFields["COLUMN_UPDATED_AT"] = "updatedAt";
25
+ LicenseRequestFields["COLUMN_USER_NAME"] = "userName";
26
26
  })(LicenseRequestFields = exports.LicenseRequestFields || (exports.LicenseRequestFields = {}));
27
27
  class LicenseRequest extends abstractEntity_1.AbstractEntity {
28
28
  constructor(input) {
@@ -34,13 +34,13 @@ class LicenseRequest extends abstractEntity_1.AbstractEntity {
34
34
  _LicenseRequest_status.set(this, void 0);
35
35
  _LicenseRequest_updatedAt.set(this, void 0);
36
36
  _LicenseRequest_userName.set(this, void 0);
37
- __classPrivateFieldSet(this, _LicenseRequest_action, input[LicenseRequestFields.ACTION], "f");
38
- __classPrivateFieldSet(this, _LicenseRequest_createdAt, input[LicenseRequestFields.CREATED_AT], "f");
39
- __classPrivateFieldSet(this, _LicenseRequest_licenseReference, input[LicenseRequestFields.LICENSE_REFERENCE], "f");
40
- __classPrivateFieldSet(this, _LicenseRequest_message, input[LicenseRequestFields.MESSAGE], "f");
41
- __classPrivateFieldSet(this, _LicenseRequest_status, input[LicenseRequestFields.STATUS], "f");
42
- __classPrivateFieldSet(this, _LicenseRequest_updatedAt, input[LicenseRequestFields.UPDATED_AT], "f");
43
- __classPrivateFieldSet(this, _LicenseRequest_userName, input[LicenseRequestFields.USER_NAME], "f");
37
+ __classPrivateFieldSet(this, _LicenseRequest_action, input[LicenseRequestFields.COLUMN_ACTION], "f");
38
+ __classPrivateFieldSet(this, _LicenseRequest_createdAt, input[LicenseRequestFields.COLUMN_CREATED_AT], "f");
39
+ __classPrivateFieldSet(this, _LicenseRequest_licenseReference, input[LicenseRequestFields.COLUMN_LICENSE_REFERENCE], "f");
40
+ __classPrivateFieldSet(this, _LicenseRequest_message, input[LicenseRequestFields.COLUMN_MESSAGE], "f");
41
+ __classPrivateFieldSet(this, _LicenseRequest_status, input[LicenseRequestFields.COLUMN_STATUS], "f");
42
+ __classPrivateFieldSet(this, _LicenseRequest_updatedAt, input[LicenseRequestFields.COLUMN_UPDATED_AT], "f");
43
+ __classPrivateFieldSet(this, _LicenseRequest_userName, input[LicenseRequestFields.COLUMN_USER_NAME], "f");
44
44
  }
45
45
  get userName() {
46
46
  return __classPrivateFieldGet(this, _LicenseRequest_userName, "f");
@@ -65,16 +65,39 @@ class LicenseRequest extends abstractEntity_1.AbstractEntity {
65
65
  }
66
66
  toJSON() {
67
67
  return {
68
- [LicenseRequestFields.ACTION]: this.action,
69
- [LicenseRequestFields.CREATED_AT]: this.createdAt,
70
- [LicenseRequestFields.LICENSE_REFERENCE]: this.licenseReference,
71
- [LicenseRequestFields.MESSAGE]: this.message,
72
- [LicenseRequestFields.STATUS]: this.status,
73
- [LicenseRequestFields.UPDATED_AT]: this.updatedAt,
74
- [LicenseRequestFields.USER_NAME]: this.userName,
68
+ [LicenseRequestFields.COLUMN_ACTION]: this.action,
69
+ [LicenseRequestFields.COLUMN_CREATED_AT]: this.createdAt,
70
+ [LicenseRequestFields.COLUMN_LICENSE_REFERENCE]: this.licenseReference,
71
+ [LicenseRequestFields.COLUMN_MESSAGE]: this.message,
72
+ [LicenseRequestFields.COLUMN_STATUS]: this.status,
73
+ [LicenseRequestFields.COLUMN_UPDATED_AT]: this.updatedAt,
74
+ [LicenseRequestFields.COLUMN_USER_NAME]: this.userName,
75
75
  };
76
76
  }
77
77
  }
78
78
  exports.LicenseRequest = LicenseRequest;
79
79
  _LicenseRequest_action = new WeakMap(), _LicenseRequest_createdAt = new WeakMap(), _LicenseRequest_licenseReference = new WeakMap(), _LicenseRequest_message = new WeakMap(), _LicenseRequest_status = new WeakMap(), _LicenseRequest_updatedAt = new WeakMap(), _LicenseRequest_userName = new WeakMap();
80
+ var LicenseRequestResultFields;
81
+ (function (LicenseRequestResultFields) {
82
+ LicenseRequestResultFields["COLUMN_LICENSE_REQUEST"] = "licenseRequests";
83
+ })(LicenseRequestResultFields = exports.LicenseRequestResultFields || (exports.LicenseRequestResultFields = {}));
84
+ class LicenseRequestResult extends abstractEntity_1.AbstractEntity {
85
+ constructor(input) {
86
+ var _a;
87
+ super(input);
88
+ _LicenseRequestResult_licenseRequests.set(this, void 0);
89
+ __classPrivateFieldSet(this, _LicenseRequestResult_licenseRequests, (_a = input[LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]) === null || _a === void 0 ? void 0 : _a.map((result) => new LicenseRequest(result)), "f");
90
+ }
91
+ get licenseRequest() {
92
+ return __classPrivateFieldGet(this, _LicenseRequestResult_licenseRequests, "f");
93
+ }
94
+ toJSON() {
95
+ var _a;
96
+ return {
97
+ [LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]: (_a = this.licenseRequest) === null || _a === void 0 ? void 0 : _a.map((result) => result.toJSON()),
98
+ };
99
+ }
100
+ }
101
+ exports.LicenseRequestResult = LicenseRequestResult;
102
+ _LicenseRequestResult_licenseRequests = new WeakMap();
80
103
  //# sourceMappingURL=licenseRequest.js.map
@@ -3,8 +3,8 @@
3
3
  */
4
4
  import { AbstractRestfulClient } from '../abstractRestfulClient';
5
5
  import { GetResult } from '../getResult';
6
- import { LicenseRequest } from './entities/request/licenseRequest';
6
+ import { LicenseRequestResult } from './entities/request/licenseRequest';
7
7
  export declare class LicenseRequestClient extends AbstractRestfulClient {
8
8
  protected basePath: string;
9
- getLastRequests(licenseReference: string): Promise<GetResult<LicenseRequest>>;
9
+ getLastRequests(licenseReference: string): Promise<GetResult<LicenseRequestResult>>;
10
10
  }
@@ -14,7 +14,14 @@ class LicenseRequestClient extends abstractRestfulClient_1.AbstractRestfulClient
14
14
  }
15
15
  async getLastRequests(licenseReference) {
16
16
  this.path = `/${licenseReference}/request`;
17
- return new getResult_1.GetResult(licenseRequest_1.LicenseRequest, await this.get());
17
+ const response = await this.get();
18
+ //A workaround, the public api endpoint is not returning "data" in the payload
19
+ response[getResult_1.GetResultFields.COLUMN_DATA] = {
20
+ [licenseRequest_1.LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]: licenseRequest_1.LicenseRequestResultFields.COLUMN_LICENSE_REQUEST in response
21
+ ? response[licenseRequest_1.LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]
22
+ : [],
23
+ };
24
+ return new getResult_1.GetResult(licenseRequest_1.LicenseRequestResult, response);
18
25
  }
19
26
  }
20
27
  exports.LicenseRequestClient = LicenseRequestClient;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.77.0",
7
+ "version": "3.77.1-bdj.2",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",