@arrowsphere/api-client 3.68.0 → 3.69.0-rc.bdj-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.
@@ -9,7 +9,10 @@ export declare enum ActionsGetFields {
9
9
  COLUMN_REACTIVATE = "reactivate",
10
10
  COLUMN_AUTO_RENEW_OFF = "autoRenewOff",
11
11
  COLUMN_AUTO_RENEW_ON = "autoRenewOn",
12
- COLUMN_CANCEL = "cancel"
12
+ COLUMN_CANCEL = "cancel",
13
+ COLUMN_CONVERSION = "conversion",
14
+ COLUMN_PAUSE = "pause",
15
+ COLUMN_UPGRADE = "upgrade"
13
16
  }
14
17
  export declare type ActionsGetData = {
15
18
  [ActionsGetFields.COLUMN_HISTORY]: string;
@@ -22,6 +25,9 @@ export declare type ActionsGetData = {
22
25
  [ActionsGetFields.COLUMN_AUTO_RENEW_OFF]?: string;
23
26
  [ActionsGetFields.COLUMN_AUTO_RENEW_ON]?: string;
24
27
  [ActionsGetFields.COLUMN_CANCEL]?: string;
28
+ [ActionsGetFields.COLUMN_CONVERSION]?: string;
29
+ [ActionsGetFields.COLUMN_PAUSE]?: string;
30
+ [ActionsGetFields.COLUMN_UPGRADE]?: string;
25
31
  };
26
32
  export declare class ActionsGetResult extends AbstractEntity<ActionsGetData> {
27
33
  #private;
@@ -36,5 +42,8 @@ export declare class ActionsGetResult extends AbstractEntity<ActionsGetData> {
36
42
  get autoRenewOff(): string | undefined;
37
43
  get autoRenewOn(): string | undefined;
38
44
  get cancel(): string | undefined;
45
+ get conversion(): string | undefined;
46
+ get pause(): string | undefined;
47
+ get upgrade(): string | undefined;
39
48
  toJSON(): ActionsGetData;
40
49
  }
@@ -10,7 +10,7 @@ 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 _ActionsGetResult_history, _ActionsGetResult_update, _ActionsGetResult_increaseSeats, _ActionsGetResult_decreaseSeats, _ActionsGetResult_addons_catalog, _ActionsGetResult_suspend, _ActionsGetResult_reactivate, _ActionsGetResult_autoRenewOff, _ActionsGetResult_autoRenewOn, _ActionsGetResult_cancel;
13
+ var _ActionsGetResult_history, _ActionsGetResult_update, _ActionsGetResult_increaseSeats, _ActionsGetResult_decreaseSeats, _ActionsGetResult_addons_catalog, _ActionsGetResult_suspend, _ActionsGetResult_reactivate, _ActionsGetResult_autoRenewOff, _ActionsGetResult_autoRenewOn, _ActionsGetResult_cancel, _ActionsGetResult_conversion, _ActionsGetResult_pause, _ActionsGetResult_upgrade;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.ActionsGetResult = exports.ActionsGetFields = void 0;
16
16
  const abstractEntity_1 = require("../../../abstractEntity");
@@ -26,6 +26,9 @@ var ActionsGetFields;
26
26
  ActionsGetFields["COLUMN_AUTO_RENEW_OFF"] = "autoRenewOff";
27
27
  ActionsGetFields["COLUMN_AUTO_RENEW_ON"] = "autoRenewOn";
28
28
  ActionsGetFields["COLUMN_CANCEL"] = "cancel";
29
+ ActionsGetFields["COLUMN_CONVERSION"] = "conversion";
30
+ ActionsGetFields["COLUMN_PAUSE"] = "pause";
31
+ ActionsGetFields["COLUMN_UPGRADE"] = "upgrade";
29
32
  })(ActionsGetFields = exports.ActionsGetFields || (exports.ActionsGetFields = {}));
30
33
  class ActionsGetResult extends abstractEntity_1.AbstractEntity {
31
34
  constructor(data) {
@@ -40,6 +43,9 @@ class ActionsGetResult extends abstractEntity_1.AbstractEntity {
40
43
  _ActionsGetResult_autoRenewOff.set(this, void 0);
41
44
  _ActionsGetResult_autoRenewOn.set(this, void 0);
42
45
  _ActionsGetResult_cancel.set(this, void 0);
46
+ _ActionsGetResult_conversion.set(this, void 0);
47
+ _ActionsGetResult_pause.set(this, void 0);
48
+ _ActionsGetResult_upgrade.set(this, void 0);
43
49
  __classPrivateFieldSet(this, _ActionsGetResult_history, data[ActionsGetFields.COLUMN_HISTORY], "f");
44
50
  __classPrivateFieldSet(this, _ActionsGetResult_update, data[ActionsGetFields.COLUMN_UPDATE], "f");
45
51
  __classPrivateFieldSet(this, _ActionsGetResult_increaseSeats, data[ActionsGetFields.COLUMN_INCREASE_SEATS], "f");
@@ -50,6 +56,9 @@ class ActionsGetResult extends abstractEntity_1.AbstractEntity {
50
56
  __classPrivateFieldSet(this, _ActionsGetResult_autoRenewOff, data[ActionsGetFields.COLUMN_AUTO_RENEW_OFF], "f");
51
57
  __classPrivateFieldSet(this, _ActionsGetResult_autoRenewOn, data[ActionsGetFields.COLUMN_AUTO_RENEW_ON], "f");
52
58
  __classPrivateFieldSet(this, _ActionsGetResult_cancel, data[ActionsGetFields.COLUMN_CANCEL], "f");
59
+ __classPrivateFieldSet(this, _ActionsGetResult_conversion, data[ActionsGetFields.COLUMN_CONVERSION], "f");
60
+ __classPrivateFieldSet(this, _ActionsGetResult_pause, data[ActionsGetFields.COLUMN_PAUSE], "f");
61
+ __classPrivateFieldSet(this, _ActionsGetResult_upgrade, data[ActionsGetFields.COLUMN_UPGRADE], "f");
53
62
  }
54
63
  get history() {
55
64
  return __classPrivateFieldGet(this, _ActionsGetResult_history, "f");
@@ -81,6 +90,15 @@ class ActionsGetResult extends abstractEntity_1.AbstractEntity {
81
90
  get cancel() {
82
91
  return __classPrivateFieldGet(this, _ActionsGetResult_cancel, "f");
83
92
  }
93
+ get conversion() {
94
+ return __classPrivateFieldGet(this, _ActionsGetResult_conversion, "f");
95
+ }
96
+ get pause() {
97
+ return __classPrivateFieldGet(this, _ActionsGetResult_pause, "f");
98
+ }
99
+ get upgrade() {
100
+ return __classPrivateFieldGet(this, _ActionsGetResult_upgrade, "f");
101
+ }
84
102
  toJSON() {
85
103
  return {
86
104
  [ActionsGetFields.COLUMN_HISTORY]: this.history,
@@ -93,9 +111,12 @@ class ActionsGetResult extends abstractEntity_1.AbstractEntity {
93
111
  [ActionsGetFields.COLUMN_AUTO_RENEW_OFF]: this.autoRenewOff,
94
112
  [ActionsGetFields.COLUMN_AUTO_RENEW_ON]: this.autoRenewOn,
95
113
  [ActionsGetFields.COLUMN_CANCEL]: this.cancel,
114
+ [ActionsGetFields.COLUMN_CONVERSION]: this.conversion,
115
+ [ActionsGetFields.COLUMN_PAUSE]: this.pause,
116
+ [ActionsGetFields.COLUMN_UPGRADE]: this.upgrade,
96
117
  };
97
118
  }
98
119
  }
99
120
  exports.ActionsGetResult = ActionsGetResult;
100
- _ActionsGetResult_history = new WeakMap(), _ActionsGetResult_update = new WeakMap(), _ActionsGetResult_increaseSeats = new WeakMap(), _ActionsGetResult_decreaseSeats = new WeakMap(), _ActionsGetResult_addons_catalog = new WeakMap(), _ActionsGetResult_suspend = new WeakMap(), _ActionsGetResult_reactivate = new WeakMap(), _ActionsGetResult_autoRenewOff = new WeakMap(), _ActionsGetResult_autoRenewOn = new WeakMap(), _ActionsGetResult_cancel = new WeakMap();
121
+ _ActionsGetResult_history = new WeakMap(), _ActionsGetResult_update = new WeakMap(), _ActionsGetResult_increaseSeats = new WeakMap(), _ActionsGetResult_decreaseSeats = new WeakMap(), _ActionsGetResult_addons_catalog = new WeakMap(), _ActionsGetResult_suspend = new WeakMap(), _ActionsGetResult_reactivate = new WeakMap(), _ActionsGetResult_autoRenewOff = new WeakMap(), _ActionsGetResult_autoRenewOn = new WeakMap(), _ActionsGetResult_cancel = new WeakMap(), _ActionsGetResult_conversion = new WeakMap(), _ActionsGetResult_pause = new WeakMap(), _ActionsGetResult_upgrade = new WeakMap();
101
122
  //# sourceMappingURL=actionsGetResult.js.map
@@ -0,0 +1,44 @@
1
+ import { AbstractEntity } from '../../../abstractEntity';
2
+ export declare enum UpgradeResultOrderFields {
3
+ COLUMN_LINK = "link",
4
+ COLUMN_REFERENCE = "reference"
5
+ }
6
+ declare type UpgradeResultOrderType = {
7
+ [UpgradeResultOrderFields.COLUMN_LINK]?: string;
8
+ [UpgradeResultOrderFields.COLUMN_REFERENCE]?: string;
9
+ };
10
+ export declare class UpgradeResultOrder extends AbstractEntity<UpgradeResultOrderType> {
11
+ #private;
12
+ constructor(input: UpgradeResultOrderType);
13
+ get link(): string | undefined;
14
+ get reference(): string | undefined;
15
+ toJSON(): UpgradeResultOrderType;
16
+ }
17
+ export declare enum UpgradeResultFields {
18
+ COLUMN_QUANTITY = "quantity",
19
+ COLUMN_NAME = "name",
20
+ COLUMN_ORDER = "order",
21
+ COLUMN_PERIODICITY = "periodicity",
22
+ COLUMN_SKU = "sku",
23
+ COLUMN_TERM = "term"
24
+ }
25
+ export declare type UpgradeResultType = {
26
+ [UpgradeResultFields.COLUMN_QUANTITY]?: number;
27
+ [UpgradeResultFields.COLUMN_NAME]?: string;
28
+ [UpgradeResultFields.COLUMN_ORDER]?: UpgradeResultOrderType;
29
+ [UpgradeResultFields.COLUMN_PERIODICITY]?: string;
30
+ [UpgradeResultFields.COLUMN_SKU]?: string;
31
+ [UpgradeResultFields.COLUMN_TERM]?: string;
32
+ };
33
+ export declare class UpgradeResult extends AbstractEntity<UpgradeResultType> {
34
+ #private;
35
+ constructor(input: UpgradeResultType);
36
+ get quantity(): number | undefined;
37
+ get name(): string | undefined;
38
+ get order(): UpgradeResultOrder | undefined;
39
+ get periodicity(): string | undefined;
40
+ get sku(): string | undefined;
41
+ get term(): string | undefined;
42
+ toJSON(): UpgradeResultType;
43
+ }
44
+ export {};
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _UpgradeResultOrder_link, _UpgradeResultOrder_reference, _UpgradeResult_quantity, _UpgradeResult_name, _UpgradeResult_order, _UpgradeResult_periodicity, _UpgradeResult_sku, _UpgradeResult_term;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.UpgradeResult = exports.UpgradeResultFields = exports.UpgradeResultOrder = exports.UpgradeResultOrderFields = void 0;
16
+ const abstractEntity_1 = require("../../../abstractEntity");
17
+ var UpgradeResultOrderFields;
18
+ (function (UpgradeResultOrderFields) {
19
+ UpgradeResultOrderFields["COLUMN_LINK"] = "link";
20
+ UpgradeResultOrderFields["COLUMN_REFERENCE"] = "reference";
21
+ })(UpgradeResultOrderFields = exports.UpgradeResultOrderFields || (exports.UpgradeResultOrderFields = {}));
22
+ class UpgradeResultOrder extends abstractEntity_1.AbstractEntity {
23
+ constructor(input) {
24
+ super(input);
25
+ _UpgradeResultOrder_link.set(this, void 0);
26
+ _UpgradeResultOrder_reference.set(this, void 0);
27
+ __classPrivateFieldSet(this, _UpgradeResultOrder_link, input[UpgradeResultOrderFields.COLUMN_LINK], "f");
28
+ __classPrivateFieldSet(this, _UpgradeResultOrder_reference, input[UpgradeResultOrderFields.COLUMN_REFERENCE], "f");
29
+ }
30
+ get link() {
31
+ return __classPrivateFieldGet(this, _UpgradeResultOrder_link, "f");
32
+ }
33
+ get reference() {
34
+ return __classPrivateFieldGet(this, _UpgradeResultOrder_reference, "f");
35
+ }
36
+ toJSON() {
37
+ return {
38
+ [UpgradeResultOrderFields.COLUMN_LINK]: this.link,
39
+ [UpgradeResultOrderFields.COLUMN_REFERENCE]: this.reference,
40
+ };
41
+ }
42
+ }
43
+ exports.UpgradeResultOrder = UpgradeResultOrder;
44
+ _UpgradeResultOrder_link = new WeakMap(), _UpgradeResultOrder_reference = new WeakMap();
45
+ var UpgradeResultFields;
46
+ (function (UpgradeResultFields) {
47
+ UpgradeResultFields["COLUMN_QUANTITY"] = "quantity";
48
+ UpgradeResultFields["COLUMN_NAME"] = "name";
49
+ UpgradeResultFields["COLUMN_ORDER"] = "order";
50
+ UpgradeResultFields["COLUMN_PERIODICITY"] = "periodicity";
51
+ UpgradeResultFields["COLUMN_SKU"] = "sku";
52
+ UpgradeResultFields["COLUMN_TERM"] = "term";
53
+ })(UpgradeResultFields = exports.UpgradeResultFields || (exports.UpgradeResultFields = {}));
54
+ class UpgradeResult extends abstractEntity_1.AbstractEntity {
55
+ constructor(input) {
56
+ super(input);
57
+ _UpgradeResult_quantity.set(this, void 0);
58
+ _UpgradeResult_name.set(this, void 0);
59
+ _UpgradeResult_order.set(this, void 0);
60
+ _UpgradeResult_periodicity.set(this, void 0);
61
+ _UpgradeResult_sku.set(this, void 0);
62
+ _UpgradeResult_term.set(this, void 0);
63
+ __classPrivateFieldSet(this, _UpgradeResult_quantity, input[UpgradeResultFields.COLUMN_QUANTITY], "f");
64
+ __classPrivateFieldSet(this, _UpgradeResult_name, input[UpgradeResultFields.COLUMN_NAME], "f");
65
+ __classPrivateFieldSet(this, _UpgradeResult_order, input[UpgradeResultFields.COLUMN_ORDER]
66
+ ? new UpgradeResultOrder(input[UpgradeResultFields.COLUMN_ORDER])
67
+ : undefined, "f");
68
+ __classPrivateFieldSet(this, _UpgradeResult_periodicity, input[UpgradeResultFields.COLUMN_PERIODICITY], "f");
69
+ __classPrivateFieldSet(this, _UpgradeResult_sku, input[UpgradeResultFields.COLUMN_SKU], "f");
70
+ __classPrivateFieldSet(this, _UpgradeResult_term, input[UpgradeResultFields.COLUMN_TERM], "f");
71
+ }
72
+ get quantity() {
73
+ return __classPrivateFieldGet(this, _UpgradeResult_quantity, "f");
74
+ }
75
+ get name() {
76
+ return __classPrivateFieldGet(this, _UpgradeResult_name, "f");
77
+ }
78
+ get order() {
79
+ return __classPrivateFieldGet(this, _UpgradeResult_order, "f");
80
+ }
81
+ get periodicity() {
82
+ return __classPrivateFieldGet(this, _UpgradeResult_periodicity, "f");
83
+ }
84
+ get sku() {
85
+ return __classPrivateFieldGet(this, _UpgradeResult_sku, "f");
86
+ }
87
+ get term() {
88
+ return __classPrivateFieldGet(this, _UpgradeResult_term, "f");
89
+ }
90
+ toJSON() {
91
+ var _a;
92
+ return {
93
+ [UpgradeResultFields.COLUMN_QUANTITY]: this.quantity,
94
+ [UpgradeResultFields.COLUMN_NAME]: this.name,
95
+ [UpgradeResultFields.COLUMN_ORDER]: (_a = this.order) === null || _a === void 0 ? void 0 : _a.toJSON(),
96
+ [UpgradeResultFields.COLUMN_PERIODICITY]: this.periodicity,
97
+ [UpgradeResultFields.COLUMN_SKU]: this.sku,
98
+ [UpgradeResultFields.COLUMN_TERM]: this.term,
99
+ };
100
+ }
101
+ }
102
+ exports.UpgradeResult = UpgradeResult;
103
+ _UpgradeResult_quantity = new WeakMap(), _UpgradeResult_name = new WeakMap(), _UpgradeResult_order = new WeakMap(), _UpgradeResult_periodicity = new WeakMap(), _UpgradeResult_sku = new WeakMap(), _UpgradeResult_term = new WeakMap();
104
+ //# sourceMappingURL=upgradeResult.js.map
@@ -16,6 +16,7 @@ import { GetResult } from '../getResult';
16
16
  import { LicenseGetFields } from './entities/getLicense/licenseGetResult';
17
17
  import { GetLicenseResult } from './entities/getResult/getLicenseResult';
18
18
  import { LicenceHistoryResult } from './entities/history/licenceHistoryResult';
19
+ import { UpgradeResult } from './entities/license/upgradeResult';
19
20
  /**
20
21
  * Parameters passable to the request for refining search.
21
22
  */
@@ -192,6 +193,12 @@ export declare type PutSuspend = ExtraInformationType;
192
193
  export declare type PutCancel = ExtraInformationType;
193
194
  export declare type PutCancelAutoRenew = ExtraInformationType;
194
195
  export declare type PutReactivateAutoRenew = ExtraInformationType;
196
+ export declare type PostUpgrade = {
197
+ sku: string;
198
+ billingCycle: number;
199
+ term: number;
200
+ quantity: number;
201
+ };
195
202
  export declare class LicensesClient extends AbstractRestfulClient {
196
203
  /**
197
204
  * The base path of the API
@@ -237,6 +244,10 @@ export declare class LicensesClient extends AbstractRestfulClient {
237
244
  * The path of reactivate license auto-renew
238
245
  */
239
246
  private REACTIVATE_AUTO_RENEW_PATH;
247
+ /**
248
+ * The path of reactivate license auto-renew
249
+ */
250
+ private UPGRADE_PATH;
240
251
  /**
241
252
  * Returns the raw result from the find endpoint call
242
253
  *
@@ -271,6 +282,7 @@ export declare class LicensesClient extends AbstractRestfulClient {
271
282
  getHistory(licenseReference: string, parameters?: Parameters): Promise<GetResult<LicenceHistoryResult>>;
272
283
  cancelAutoRenew(licenseReference: string, payload?: PutCancelAutoRenew, parameters?: Parameters): Promise<void>;
273
284
  reactivateAutoRenew(licenseReference: string, payload?: PutReactivateAutoRenew, parameters?: Parameters): Promise<void>;
285
+ upgrade(licenseReference: string, payload: PostUpgrade, parameters?: Parameters): Promise<GetResult<UpgradeResult>>;
274
286
  private createFilters;
275
287
  private createKeywords;
276
288
  }
@@ -11,6 +11,7 @@ const getResult_1 = require("../getResult");
11
11
  const licenseGetResult_1 = require("./entities/getLicense/licenseGetResult");
12
12
  const getLicenseResult_1 = require("./entities/getResult/getLicenseResult");
13
13
  const licenceHistoryResult_1 = require("./entities/history/licenceHistoryResult");
14
+ const upgradeResult_1 = require("./entities/license/upgradeResult");
14
15
  /**
15
16
  * Parameters passable to the request for refining search.
16
17
  */
@@ -156,6 +157,10 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
156
157
  * The path of reactivate license auto-renew
157
158
  */
158
159
  this.REACTIVATE_AUTO_RENEW_PATH = '/autorenew/reactivate';
160
+ /**
161
+ * The path of reactivate license auto-renew
162
+ */
163
+ this.UPGRADE_PATH = '/conversion';
159
164
  }
160
165
  /**
161
166
  * Returns the raw result from the find endpoint call
@@ -277,6 +282,10 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
277
282
  this.path = `/${licenseReference}${this.REACTIVATE_AUTO_RENEW_PATH}`;
278
283
  return await this.put(payload, parameters);
279
284
  }
285
+ async upgrade(licenseReference, payload, parameters = {}) {
286
+ this.path = `/${licenseReference}${this.UPGRADE_PATH}`;
287
+ return new getResult_1.GetResult(upgradeResult_1.UpgradeResult, await this.post(payload, parameters));
288
+ }
280
289
  createFilters(parameters, keyParent) {
281
290
  let appropriateParameters;
282
291
  if (typeof parameters === 'object') {
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.68.0",
7
+ "version": "3.69.0-rc.bdj-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",