@arrowsphere/api-client 3.13.3-rc.1 → 3.14.0-rc.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4
4
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [3.13.3] - 2022-09-26
7
+
8
+ ### Changed
9
+
10
+ - update Consumption lines Type
11
+
6
12
  ## [3.13.2] - 2022-09-23
7
13
 
8
14
  ### Changed
@@ -0,0 +1,14 @@
1
+ import { AbstractEntity } from '../../../abstractEntity';
2
+ import { LicenseHistoryGetData, LicenseHistoryResult } from '../history/getLicenseHistoryResult';
3
+ export declare enum GetLicenceHistoryResultFields {
4
+ COLUMN_LICENSE_HISTORY = "actions"
5
+ }
6
+ export declare type GetLicenceHistoryResultData = {
7
+ [GetLicenceHistoryResultFields.COLUMN_LICENSE_HISTORY]: LicenseHistoryGetData[];
8
+ };
9
+ export declare class GetLicenceHistoryResult extends AbstractEntity<GetLicenceHistoryResultData> {
10
+ #private;
11
+ constructor(getLicenseHistoryResultDataInput: GetLicenceHistoryResultData);
12
+ get licenseHistory(): LicenseHistoryResult[];
13
+ toJSON(): GetLicenceHistoryResultData;
14
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
3
+ if (!privateMap.has(receiver)) {
4
+ throw new TypeError("attempted to set private field on non-instance");
5
+ }
6
+ privateMap.set(receiver, value);
7
+ return value;
8
+ };
9
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
10
+ if (!privateMap.has(receiver)) {
11
+ throw new TypeError("attempted to get private field on non-instance");
12
+ }
13
+ return privateMap.get(receiver);
14
+ };
15
+ var _licenseHistory;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.GetLicenceHistoryResult = exports.GetLicenceHistoryResultFields = void 0;
18
+ const abstractEntity_1 = require("../../../abstractEntity");
19
+ const getLicenseHistoryResult_1 = require("../history/getLicenseHistoryResult");
20
+ var GetLicenceHistoryResultFields;
21
+ (function (GetLicenceHistoryResultFields) {
22
+ GetLicenceHistoryResultFields["COLUMN_LICENSE_HISTORY"] = "actions";
23
+ })(GetLicenceHistoryResultFields = exports.GetLicenceHistoryResultFields || (exports.GetLicenceHistoryResultFields = {}));
24
+ class GetLicenceHistoryResult extends abstractEntity_1.AbstractEntity {
25
+ constructor(getLicenseHistoryResultDataInput) {
26
+ super(getLicenseHistoryResultDataInput);
27
+ _licenseHistory.set(this, void 0);
28
+ __classPrivateFieldSet(this, _licenseHistory, getLicenseHistoryResultDataInput[GetLicenceHistoryResultFields.COLUMN_LICENSE_HISTORY].map((result) => new getLicenseHistoryResult_1.LicenseHistoryResult(result)));
29
+ }
30
+ get licenseHistory() {
31
+ return __classPrivateFieldGet(this, _licenseHistory);
32
+ }
33
+ toJSON() {
34
+ return {
35
+ [GetLicenceHistoryResultFields.COLUMN_LICENSE_HISTORY]: this.licenseHistory.map((result) => result.toJSON()),
36
+ };
37
+ }
38
+ }
39
+ exports.GetLicenceHistoryResult = GetLicenceHistoryResult;
40
+ _licenseHistory = new WeakMap();
41
+ //# sourceMappingURL=licenceHistoryResult.js.map
@@ -0,0 +1,32 @@
1
+ import { AbstractEntity } from '../../../abstractEntity';
2
+ export declare enum HistoryNotesFields {
3
+ COLUMN_BEFORE = "before",
4
+ COLUMN_AFTER = "after",
5
+ COLUMN_EXTRA_INFORMATION = "extra_information"
6
+ }
7
+ export declare type HistoryNotesGetData = {
8
+ [HistoryNotesFields.COLUMN_BEFORE]: Record<string, unknown>;
9
+ [HistoryNotesFields.COLUMN_AFTER]: Record<string, unknown>;
10
+ [HistoryNotesFields.COLUMN_EXTRA_INFORMATION]: Record<string, unknown>;
11
+ };
12
+ export declare enum LicenseHistoryGetFields {
13
+ COLUMN_LICENSE_HISTORY_ACTION = "action",
14
+ COLUMN_LICENSE_HISTORY_NOTES = "notes",
15
+ COLUMN_LICENSE_HISTORY_CREATED_AT = "created_at",
16
+ COLUMN_LICENSE_HISTORY_UPDATED_AT = "updated_at"
17
+ }
18
+ export declare type LicenseHistoryGetData = {
19
+ [LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_ACTION]: string;
20
+ [LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_NOTES]: HistoryNotesGetData;
21
+ [LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_CREATED_AT]: string;
22
+ [LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_UPDATED_AT]: string;
23
+ };
24
+ export declare class LicenseHistoryResult extends AbstractEntity<LicenseHistoryGetData> {
25
+ #private;
26
+ constructor(licenseHistoryGetDataInput: LicenseHistoryGetData);
27
+ get action(): string;
28
+ get notes(): HistoryNotesGetData;
29
+ get createdAt(): string;
30
+ get updatedAt(): string;
31
+ toJSON(): LicenseHistoryGetData;
32
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
3
+ if (!privateMap.has(receiver)) {
4
+ throw new TypeError("attempted to set private field on non-instance");
5
+ }
6
+ privateMap.set(receiver, value);
7
+ return value;
8
+ };
9
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
10
+ if (!privateMap.has(receiver)) {
11
+ throw new TypeError("attempted to get private field on non-instance");
12
+ }
13
+ return privateMap.get(receiver);
14
+ };
15
+ var _action, _notes, _created_at, _updated_at;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.LicenseHistoryResult = exports.LicenseHistoryGetFields = exports.HistoryNotesFields = void 0;
18
+ const abstractEntity_1 = require("../../../abstractEntity");
19
+ var HistoryNotesFields;
20
+ (function (HistoryNotesFields) {
21
+ HistoryNotesFields["COLUMN_BEFORE"] = "before";
22
+ HistoryNotesFields["COLUMN_AFTER"] = "after";
23
+ HistoryNotesFields["COLUMN_EXTRA_INFORMATION"] = "extra_information";
24
+ })(HistoryNotesFields = exports.HistoryNotesFields || (exports.HistoryNotesFields = {}));
25
+ var LicenseHistoryGetFields;
26
+ (function (LicenseHistoryGetFields) {
27
+ LicenseHistoryGetFields["COLUMN_LICENSE_HISTORY_ACTION"] = "action";
28
+ LicenseHistoryGetFields["COLUMN_LICENSE_HISTORY_NOTES"] = "notes";
29
+ LicenseHistoryGetFields["COLUMN_LICENSE_HISTORY_CREATED_AT"] = "created_at";
30
+ LicenseHistoryGetFields["COLUMN_LICENSE_HISTORY_UPDATED_AT"] = "updated_at";
31
+ })(LicenseHistoryGetFields = exports.LicenseHistoryGetFields || (exports.LicenseHistoryGetFields = {}));
32
+ class LicenseHistoryResult extends abstractEntity_1.AbstractEntity {
33
+ constructor(licenseHistoryGetDataInput) {
34
+ super(licenseHistoryGetDataInput);
35
+ _action.set(this, void 0);
36
+ _notes.set(this, void 0);
37
+ _created_at.set(this, void 0);
38
+ _updated_at.set(this, void 0);
39
+ __classPrivateFieldSet(this, _action, licenseHistoryGetDataInput[LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_ACTION]);
40
+ __classPrivateFieldSet(this, _notes, licenseHistoryGetDataInput[LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_NOTES]);
41
+ __classPrivateFieldSet(this, _created_at, licenseHistoryGetDataInput[LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_CREATED_AT]);
42
+ __classPrivateFieldSet(this, _updated_at, licenseHistoryGetDataInput[LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_UPDATED_AT]);
43
+ }
44
+ get action() {
45
+ return __classPrivateFieldGet(this, _action);
46
+ }
47
+ get notes() {
48
+ return __classPrivateFieldGet(this, _notes);
49
+ }
50
+ get createdAt() {
51
+ return __classPrivateFieldGet(this, _created_at);
52
+ }
53
+ get updatedAt() {
54
+ return __classPrivateFieldGet(this, _updated_at);
55
+ }
56
+ toJSON() {
57
+ return {
58
+ [LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_ACTION]: this.action,
59
+ [LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_NOTES]: this.notes,
60
+ [LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_CREATED_AT]: this
61
+ .createdAt,
62
+ [LicenseHistoryGetFields.COLUMN_LICENSE_HISTORY_UPDATED_AT]: this
63
+ .updatedAt,
64
+ };
65
+ }
66
+ }
67
+ exports.LicenseHistoryResult = LicenseHistoryResult;
68
+ _action = new WeakMap(), _notes = new WeakMap(), _created_at = new WeakMap(), _updated_at = new WeakMap();
69
+ //# sourceMappingURL=getLicenseHistoryResult.js.map
@@ -14,6 +14,7 @@ import { PriceBandFindResultDataKeywords, PriceBandFindResultDataSortParameters
14
14
  import { GetResult } from '../getResult';
15
15
  import { LicenseGetFields } from './entities/getLicense/licenseGetResult';
16
16
  import { GetLicenseResult } from './entities/getResult/getLicenseResult';
17
+ import { GetLicenceHistoryResult } from './entities/getLicense/licenceHistoryResult';
17
18
  /**
18
19
  * Parameters passable to the request for refining search.
19
20
  */
@@ -225,7 +226,11 @@ export declare class LicensesClient extends AbstractClient {
225
226
  /**
226
227
  * The path of update friendlyName endpoint
227
228
  */
228
- private UPDATE_FRIENDLYNAME;
229
+ private UPDATE_FRIENDLYNAME_PATH;
230
+ /**
231
+ * The path of license history
232
+ */
233
+ private GET_LICENSE_HISTORY_PATH;
229
234
  /**
230
235
  * Returns the raw result from the find endpoint call
231
236
  *
@@ -257,4 +262,5 @@ export declare class LicensesClient extends AbstractClient {
257
262
  reactivateLicense(licenseReference: string, parameters?: Parameters): Promise<void>;
258
263
  cancelLicense(licenseReference: string, parameters?: Parameters): Promise<void>;
259
264
  updateFriendlyName(licenseReference: string, putData: PutFriendlyName, parameters?: Parameters): Promise<void>;
265
+ getHistory(licenseReference: string, parameters?: Parameters): Promise<GetResult<GetLicenceHistoryResult>>;
260
266
  }
@@ -10,6 +10,7 @@ const configFindResult_1 = require("./entities/license/configFindResult");
10
10
  const getResult_1 = require("../getResult");
11
11
  const licenseGetResult_1 = require("./entities/getLicense/licenseGetResult");
12
12
  const getLicenseResult_1 = require("./entities/getResult/getLicenseResult");
13
+ const licenceHistoryResult_1 = require("./entities/getLicense/licenceHistoryResult");
13
14
  /**
14
15
  * Parameters passable to the request for refining search.
15
16
  */
@@ -142,7 +143,11 @@ class LicensesClient extends abstractClient_1.AbstractClient {
142
143
  /**
143
144
  * The path of update friendlyName endpoint
144
145
  */
145
- this.UPDATE_FRIENDLYNAME = '/friendlyName';
146
+ this.UPDATE_FRIENDLYNAME_PATH = '/friendlyName';
147
+ /**
148
+ * The path of license history
149
+ */
150
+ this.GET_LICENSE_HISTORY_PATH = '/history';
146
151
  }
147
152
  /**
148
153
  * Returns the raw result from the find endpoint call
@@ -274,9 +279,13 @@ class LicensesClient extends abstractClient_1.AbstractClient {
274
279
  return this.put(undefined, parameters);
275
280
  }
276
281
  async updateFriendlyName(licenseReference, putData, parameters = {}) {
277
- this.path = licenseReference + this.UPDATE_FRIENDLYNAME;
282
+ this.path = licenseReference + this.UPDATE_FRIENDLYNAME_PATH;
278
283
  return await this.put(putData, parameters);
279
284
  }
285
+ async getHistory(licenseReference, parameters = {}) {
286
+ this.path = licenseReference + this.GET_LICENSE_HISTORY_PATH;
287
+ return new getResult_1.GetResult(licenceHistoryResult_1.GetLicenceHistoryResult, await this.get(parameters));
288
+ }
280
289
  }
281
290
  exports.LicensesClient = LicensesClient;
282
291
  //# sourceMappingURL=licensesClient.js.map
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.13.3-rc.1",
7
+ "version": "3.14.0-rc.1",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",