@arrowsphere/api-client 3.79.0 → 3.80.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 +11 -0
- package/build/licenses/entities/pricingRate/getPricingRateResult.d.ts +34 -0
- package/build/licenses/entities/pricingRate/getPricingRateResult.js +61 -0
- package/build/licenses/entities/schedule/scheduleTasksResult.d.ts +9 -0
- package/build/licenses/entities/schedule/scheduleTasksResult.js +31 -0
- package/build/licenses/index.d.ts +2 -0
- package/build/licenses/index.js +2 -0
- package/build/licenses/licensesClient.d.ts +24 -0
- package/build/licenses/licensesClient.js +22 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.80.1] - 2023-12-21
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- Fixed get pricing rate unit tests
|
|
10
|
+
|
|
11
|
+
## [3.80.0] - 2023-12-21
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- Adds post schedule tasks
|
|
15
|
+
- Adds Get/Set Pricing rate on a license
|
|
16
|
+
|
|
6
17
|
## [3.79.0] - 2023-12-20
|
|
7
18
|
|
|
8
19
|
### Changed
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare enum CompanyTypeEnum {
|
|
3
|
+
UNKNOWN = "UKW",
|
|
4
|
+
MSP_CUSTOMER = "MSP",
|
|
5
|
+
VAR_CUSTOMER = "VAR",
|
|
6
|
+
ARROW = "ARW"
|
|
7
|
+
}
|
|
8
|
+
export declare enum RateTypeEnum {
|
|
9
|
+
DISCOUNT = "discount",
|
|
10
|
+
UPLIFT = "uplift"
|
|
11
|
+
}
|
|
12
|
+
declare type RateType = {
|
|
13
|
+
id: number;
|
|
14
|
+
name: RateTypeEnum;
|
|
15
|
+
};
|
|
16
|
+
declare type CompanyType = {
|
|
17
|
+
id: number;
|
|
18
|
+
type: CompanyTypeEnum;
|
|
19
|
+
};
|
|
20
|
+
export declare type GetPricingRateData = {
|
|
21
|
+
id: number;
|
|
22
|
+
rate: number;
|
|
23
|
+
start_date: string;
|
|
24
|
+
end_date: string | null;
|
|
25
|
+
created_at: string;
|
|
26
|
+
rateType: RateType;
|
|
27
|
+
companyType: CompanyType;
|
|
28
|
+
};
|
|
29
|
+
export declare class GetPricingRateResult extends AbstractEntity<GetPricingRateData> {
|
|
30
|
+
#private;
|
|
31
|
+
constructor(data: GetPricingRateData);
|
|
32
|
+
toJSON(): GetPricingRateData;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
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 _GetPricingRateResult_id, _GetPricingRateResult_rate, _GetPricingRateResult_start_date, _GetPricingRateResult_end_date, _GetPricingRateResult_created_at, _GetPricingRateResult_rateType, _GetPricingRateResult_companyType;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GetPricingRateResult = exports.RateTypeEnum = exports.CompanyTypeEnum = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
17
|
+
var CompanyTypeEnum;
|
|
18
|
+
(function (CompanyTypeEnum) {
|
|
19
|
+
CompanyTypeEnum["UNKNOWN"] = "UKW";
|
|
20
|
+
CompanyTypeEnum["MSP_CUSTOMER"] = "MSP";
|
|
21
|
+
CompanyTypeEnum["VAR_CUSTOMER"] = "VAR";
|
|
22
|
+
CompanyTypeEnum["ARROW"] = "ARW";
|
|
23
|
+
})(CompanyTypeEnum = exports.CompanyTypeEnum || (exports.CompanyTypeEnum = {}));
|
|
24
|
+
var RateTypeEnum;
|
|
25
|
+
(function (RateTypeEnum) {
|
|
26
|
+
RateTypeEnum["DISCOUNT"] = "discount";
|
|
27
|
+
RateTypeEnum["UPLIFT"] = "uplift";
|
|
28
|
+
})(RateTypeEnum = exports.RateTypeEnum || (exports.RateTypeEnum = {}));
|
|
29
|
+
class GetPricingRateResult extends abstractEntity_1.AbstractEntity {
|
|
30
|
+
constructor(data) {
|
|
31
|
+
super(data);
|
|
32
|
+
_GetPricingRateResult_id.set(this, void 0);
|
|
33
|
+
_GetPricingRateResult_rate.set(this, void 0);
|
|
34
|
+
_GetPricingRateResult_start_date.set(this, void 0);
|
|
35
|
+
_GetPricingRateResult_end_date.set(this, void 0);
|
|
36
|
+
_GetPricingRateResult_created_at.set(this, void 0);
|
|
37
|
+
_GetPricingRateResult_rateType.set(this, void 0);
|
|
38
|
+
_GetPricingRateResult_companyType.set(this, void 0);
|
|
39
|
+
__classPrivateFieldSet(this, _GetPricingRateResult_id, data === null || data === void 0 ? void 0 : data.id, "f");
|
|
40
|
+
__classPrivateFieldSet(this, _GetPricingRateResult_rate, data === null || data === void 0 ? void 0 : data.rate, "f");
|
|
41
|
+
__classPrivateFieldSet(this, _GetPricingRateResult_start_date, data === null || data === void 0 ? void 0 : data.start_date, "f");
|
|
42
|
+
__classPrivateFieldSet(this, _GetPricingRateResult_end_date, data === null || data === void 0 ? void 0 : data.end_date, "f");
|
|
43
|
+
__classPrivateFieldSet(this, _GetPricingRateResult_created_at, data === null || data === void 0 ? void 0 : data.created_at, "f");
|
|
44
|
+
__classPrivateFieldSet(this, _GetPricingRateResult_rateType, data === null || data === void 0 ? void 0 : data.rateType, "f");
|
|
45
|
+
__classPrivateFieldSet(this, _GetPricingRateResult_companyType, data === null || data === void 0 ? void 0 : data.companyType, "f");
|
|
46
|
+
}
|
|
47
|
+
toJSON() {
|
|
48
|
+
return {
|
|
49
|
+
id: __classPrivateFieldGet(this, _GetPricingRateResult_id, "f"),
|
|
50
|
+
rate: __classPrivateFieldGet(this, _GetPricingRateResult_rate, "f"),
|
|
51
|
+
start_date: __classPrivateFieldGet(this, _GetPricingRateResult_start_date, "f"),
|
|
52
|
+
end_date: __classPrivateFieldGet(this, _GetPricingRateResult_end_date, "f"),
|
|
53
|
+
created_at: __classPrivateFieldGet(this, _GetPricingRateResult_created_at, "f"),
|
|
54
|
+
rateType: __classPrivateFieldGet(this, _GetPricingRateResult_rateType, "f"),
|
|
55
|
+
companyType: __classPrivateFieldGet(this, _GetPricingRateResult_companyType, "f"),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.GetPricingRateResult = GetPricingRateResult;
|
|
60
|
+
_GetPricingRateResult_id = new WeakMap(), _GetPricingRateResult_rate = new WeakMap(), _GetPricingRateResult_start_date = new WeakMap(), _GetPricingRateResult_end_date = new WeakMap(), _GetPricingRateResult_created_at = new WeakMap(), _GetPricingRateResult_rateType = new WeakMap(), _GetPricingRateResult_companyType = new WeakMap();
|
|
61
|
+
//# sourceMappingURL=getPricingRateResult.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare type ScheduleTaskData = {
|
|
3
|
+
scheduleTaskId: number;
|
|
4
|
+
};
|
|
5
|
+
export declare class ScheduleTasksResult extends AbstractEntity<ScheduleTaskData> {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(data: ScheduleTaskData);
|
|
8
|
+
toJSON(): ScheduleTaskData;
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 _ScheduleTasksResult_scheduleTaskId;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ScheduleTasksResult = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
17
|
+
class ScheduleTasksResult extends abstractEntity_1.AbstractEntity {
|
|
18
|
+
constructor(data) {
|
|
19
|
+
super(data);
|
|
20
|
+
_ScheduleTasksResult_scheduleTaskId.set(this, void 0);
|
|
21
|
+
__classPrivateFieldSet(this, _ScheduleTasksResult_scheduleTaskId, data.scheduleTaskId, "f");
|
|
22
|
+
}
|
|
23
|
+
toJSON() {
|
|
24
|
+
return {
|
|
25
|
+
scheduleTaskId: __classPrivateFieldGet(this, _ScheduleTasksResult_scheduleTaskId, "f"),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ScheduleTasksResult = ScheduleTasksResult;
|
|
30
|
+
_ScheduleTasksResult_scheduleTaskId = new WeakMap();
|
|
31
|
+
//# sourceMappingURL=scheduleTasksResult.js.map
|
|
@@ -33,6 +33,8 @@ export * from './entities/offer/priceband/priceBandActionFlagsFindResult';
|
|
|
33
33
|
export * from './entities/offer/priceband/priceBandPriceFindResult';
|
|
34
34
|
export * from './entities/offer/priceband/saleConstraintsFindResult';
|
|
35
35
|
export * from './entities/offer/priceband/identifiers/arrowsphereFindResult';
|
|
36
|
+
export * from './entities/schedule/scheduleTasksResult';
|
|
37
|
+
export * from './entities/pricingRate/getPricingRateResult';
|
|
36
38
|
export * from './licenseRequestClient';
|
|
37
39
|
export * from './licensesClient';
|
|
38
40
|
export * from './entities/license/securityFindResult';
|
package/build/licenses/index.js
CHANGED
|
@@ -49,6 +49,8 @@ __exportStar(require("./entities/offer/priceband/priceBandActionFlagsFindResult"
|
|
|
49
49
|
__exportStar(require("./entities/offer/priceband/priceBandPriceFindResult"), exports);
|
|
50
50
|
__exportStar(require("./entities/offer/priceband/saleConstraintsFindResult"), exports);
|
|
51
51
|
__exportStar(require("./entities/offer/priceband/identifiers/arrowsphereFindResult"), exports);
|
|
52
|
+
__exportStar(require("./entities/schedule/scheduleTasksResult"), exports);
|
|
53
|
+
__exportStar(require("./entities/pricingRate/getPricingRateResult"), exports);
|
|
52
54
|
__exportStar(require("./licenseRequestClient"), exports);
|
|
53
55
|
__exportStar(require("./licensesClient"), exports);
|
|
54
56
|
__exportStar(require("./entities/license/securityFindResult"), exports);
|
|
@@ -19,6 +19,8 @@ import { LicenceHistoryResult } from './entities/history/licenceHistoryResult';
|
|
|
19
19
|
import { UpgradeResult } from './entities/license/upgradeResult';
|
|
20
20
|
import { LicenseConversionSkuResult } from './entities/license/licenseConversionSkuResult';
|
|
21
21
|
import { CredentialsResult } from './entities/license/credentialsResult';
|
|
22
|
+
import { ScheduleTasksResult } from './entities/schedule/scheduleTasksResult';
|
|
23
|
+
import { GetPricingRateResult, RateTypeEnum } from './entities/pricingRate/getPricingRateResult';
|
|
22
24
|
/**
|
|
23
25
|
* Parameters passable to the request for refining search.
|
|
24
26
|
*/
|
|
@@ -209,6 +211,17 @@ export declare type SaveBillingCommentsInputType = {
|
|
|
209
211
|
[SaveBillingCommentsInputFields.COLUMN_COMMENT_ONE]?: string | null;
|
|
210
212
|
[SaveBillingCommentsInputFields.COLUMN_COMMENT_TWO]?: string | null;
|
|
211
213
|
};
|
|
214
|
+
export declare type ScheduleTasks = {
|
|
215
|
+
periodicity: number;
|
|
216
|
+
term: number;
|
|
217
|
+
seats: number;
|
|
218
|
+
executionDate: string;
|
|
219
|
+
};
|
|
220
|
+
export declare type LicensePricingRate = {
|
|
221
|
+
rateType: RateTypeEnum;
|
|
222
|
+
rateValue: number;
|
|
223
|
+
applyOnNextBillingPeriod: boolean;
|
|
224
|
+
};
|
|
212
225
|
export declare class LicensesClient extends AbstractRestfulClient {
|
|
213
226
|
/**
|
|
214
227
|
* The base path of the API
|
|
@@ -274,6 +287,14 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
274
287
|
* The path to retrieve license credentials
|
|
275
288
|
*/
|
|
276
289
|
private GET_LICENSE_CREDENTIALS;
|
|
290
|
+
/**
|
|
291
|
+
* The path of schedule tasks on a license
|
|
292
|
+
*/
|
|
293
|
+
private SCHEDULE_TASKS_PATH;
|
|
294
|
+
/**
|
|
295
|
+
* The path to get/set pricing rate on a license
|
|
296
|
+
*/
|
|
297
|
+
private PRICING_RATE_PATH;
|
|
277
298
|
/**
|
|
278
299
|
* Returns the raw result from the find endpoint call
|
|
279
300
|
*
|
|
@@ -314,6 +335,9 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
314
335
|
getConversionSku(licenseReference: string, parameters?: Parameters): Promise<GetResult<LicenseConversionSkuResult>>;
|
|
315
336
|
getExistingConversionSku(licenseReference: string, parameters?: Parameters): Promise<GetResult<LicenseConversionSkuResult>>;
|
|
316
337
|
getCredentials(licenseReference: string, parameters?: Parameters): Promise<GetResult<CredentialsResult>>;
|
|
338
|
+
getPricingRate(licenseReference: string, parameters?: Parameters): Promise<GetResult<GetPricingRateResult>>;
|
|
339
|
+
setPricingRate(licenseReference: string, payload: LicensePricingRate, parameters?: Parameters): Promise<void>;
|
|
340
|
+
scheduleTasks(licenseReference: string, payload: ScheduleTasks, parameters?: Parameters): Promise<GetResult<ScheduleTasksResult>>;
|
|
317
341
|
private createFilters;
|
|
318
342
|
private createKeywords;
|
|
319
343
|
}
|
|
@@ -14,6 +14,8 @@ const licenceHistoryResult_1 = require("./entities/history/licenceHistoryResult"
|
|
|
14
14
|
const upgradeResult_1 = require("./entities/license/upgradeResult");
|
|
15
15
|
const licenseConversionSkuResult_1 = require("./entities/license/licenseConversionSkuResult");
|
|
16
16
|
const credentialsResult_1 = require("./entities/license/credentialsResult");
|
|
17
|
+
const scheduleTasksResult_1 = require("./entities/schedule/scheduleTasksResult");
|
|
18
|
+
const getPricingRateResult_1 = require("./entities/pricingRate/getPricingRateResult");
|
|
17
19
|
/**
|
|
18
20
|
* Parameters passable to the request for refining search.
|
|
19
21
|
*/
|
|
@@ -184,6 +186,14 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
184
186
|
* The path to retrieve license credentials
|
|
185
187
|
*/
|
|
186
188
|
this.GET_LICENSE_CREDENTIALS = '/credentials';
|
|
189
|
+
/**
|
|
190
|
+
* The path of schedule tasks on a license
|
|
191
|
+
*/
|
|
192
|
+
this.SCHEDULE_TASKS_PATH = '/scheduledTasks';
|
|
193
|
+
/**
|
|
194
|
+
* The path to get/set pricing rate on a license
|
|
195
|
+
*/
|
|
196
|
+
this.PRICING_RATE_PATH = '/pricing-rate';
|
|
187
197
|
}
|
|
188
198
|
/**
|
|
189
199
|
* Returns the raw result from the find endpoint call
|
|
@@ -343,6 +353,18 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
343
353
|
this.path = `/${licenseReference}${this.GET_LICENSE_CREDENTIALS}`;
|
|
344
354
|
return new getResult_1.GetResult(credentialsResult_1.CredentialsResult, await this.get(parameters));
|
|
345
355
|
}
|
|
356
|
+
async getPricingRate(licenseReference, parameters = {}) {
|
|
357
|
+
this.path = `/${licenseReference}${this.PRICING_RATE_PATH}`;
|
|
358
|
+
return new getResult_1.GetResult(getPricingRateResult_1.GetPricingRateResult, await this.get(parameters));
|
|
359
|
+
}
|
|
360
|
+
async setPricingRate(licenseReference, payload, parameters = {}) {
|
|
361
|
+
this.path = `/${licenseReference}${this.PRICING_RATE_PATH}`;
|
|
362
|
+
return await this.post(payload, parameters);
|
|
363
|
+
}
|
|
364
|
+
async scheduleTasks(licenseReference, payload, parameters = {}) {
|
|
365
|
+
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}`;
|
|
366
|
+
return new getResult_1.GetResult(scheduleTasksResult_1.ScheduleTasksResult, await this.post(payload, parameters));
|
|
367
|
+
}
|
|
346
368
|
createFilters(parameters, keyParent) {
|
|
347
369
|
let appropriateParameters;
|
|
348
370
|
if (typeof parameters === 'object') {
|
package/package.json
CHANGED