@arrowsphere/api-client 3.108.2-rc.bdj.1 → 3.109.0-rc.cpu.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 +10 -0
- package/build/licenses/licensesClient.d.ts +5 -0
- package/build/licenses/licensesClient.js +21 -5
- package/build/user/index.d.ts +0 -1
- package/build/user/index.js +0 -1
- package/package.json +1 -1
- package/build/user/userGraphqlClient.d.ts +0 -9
- package/build/user/userGraphqlClient.js +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.109.0] - 2024.04.15
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- [License schedules tasks] Update/Get/Delete scheduled tasks
|
|
10
|
+
|
|
11
|
+
## [3.108.1] - 2024.04.12
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- [License schedules tasks] Fixes get all schedules tasks to prevent breaking changes of api
|
|
15
|
+
|
|
6
16
|
## [3.108.0] - 2024.04.08
|
|
7
17
|
|
|
8
18
|
### Added
|
|
@@ -26,6 +26,7 @@ import { BulkBodyArgument, SpecialPriceRateActive } from './types/bulkArguments'
|
|
|
26
26
|
import { EndCustomerOrganizationUnitFiltersParameters, EndCustomerOrganizationUnitSortParameters } from './entities/endCustomerOrganizationUnit/endCustomerOrganizationUnitFindResult';
|
|
27
27
|
import { ConsumptionDailyPrediction } from '../consumption';
|
|
28
28
|
import { GetSchedulesTasksResult } from './entities/schedule/getSchedulesTasksResult';
|
|
29
|
+
import { GetScheduleTaskResult } from './entities/schedule/getScheduleTaskResult';
|
|
29
30
|
/**
|
|
30
31
|
* Parameters passable to the request for refining search.
|
|
31
32
|
*/
|
|
@@ -242,6 +243,7 @@ export declare type ScheduleTasks = {
|
|
|
242
243
|
seats: number;
|
|
243
244
|
executionDate: string;
|
|
244
245
|
};
|
|
246
|
+
export declare type ScheduledTasksRequestType = Omit<ScheduleTasks, 'executionDate'>;
|
|
245
247
|
export declare type LicensePricingRate = {
|
|
246
248
|
rateType: RateTypeEnum;
|
|
247
249
|
rateValue: number;
|
|
@@ -396,6 +398,9 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
396
398
|
setPricingRate(licenseReference: string, payload: LicensePricingRate, parameters?: Parameters): Promise<void>;
|
|
397
399
|
scheduleTasks(licenseReference: string, payload: ScheduleTasks, parameters?: Parameters): Promise<GetResult<ScheduleTasksResult>>;
|
|
398
400
|
getSchedulesTasks(licenseReference: string, parameters?: Parameters): Promise<GetResult<GetSchedulesTasksResult>>;
|
|
401
|
+
updateScheduledTasks(licenseReference: string, scheduledTaskId: number, payload: ScheduledTasksRequestType, parameters?: Parameters): Promise<void>;
|
|
402
|
+
getScheduledTasks(licenseReference: string, scheduledTaskId: number, parameters?: Parameters): Promise<GetResult<GetScheduleTaskResult>>;
|
|
403
|
+
deleteScheduledTasks(licenseReference: string, scheduledTaskId: number, parameters?: Parameters): Promise<void>;
|
|
399
404
|
getLicenseDailyPredictions(licenseReference: string, parameters?: Parameters): Promise<GetResult<ConsumptionDailyPrediction>>;
|
|
400
405
|
saveSpecialdBid(licenseReference: string, payload: SaveSpecialBidInputType, parameters?: Parameters): Promise<void>;
|
|
401
406
|
rewriteRateHistory(licenseReference: string, payload: RewriteRateHistoryInputType, parameters?: Parameters): Promise<void>;
|
|
@@ -20,6 +20,7 @@ const http2_1 = require("http2");
|
|
|
20
20
|
const bulkArguments_1 = require("./types/bulkArguments");
|
|
21
21
|
const consumption_1 = require("../consumption");
|
|
22
22
|
const getSchedulesTasksResult_1 = require("./entities/schedule/getSchedulesTasksResult");
|
|
23
|
+
const getScheduleTaskResult_1 = require("./entities/schedule/getScheduleTaskResult");
|
|
23
24
|
/**
|
|
24
25
|
* Parameters passable to the request for refining search.
|
|
25
26
|
*/
|
|
@@ -440,17 +441,32 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
440
441
|
return new getResult_1.GetResult(scheduleTasksResult_1.ScheduleTasksResult, await this.post(payload, parameters));
|
|
441
442
|
}
|
|
442
443
|
async getSchedulesTasks(licenseReference, parameters = {}) {
|
|
444
|
+
var _a;
|
|
443
445
|
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}`;
|
|
444
446
|
const response = await this.get(parameters);
|
|
445
447
|
//A workaround, the public api endpoint is not returning "schedulesTasks" in the payload
|
|
446
448
|
//@todo: remove this workaround when the public api endpoint is fixed
|
|
447
|
-
response[getResult_1.GetResultFields.COLUMN_DATA]
|
|
448
|
-
[
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
449
|
+
if (!((_a = response[getResult_1.GetResultFields.COLUMN_DATA]) === null || _a === void 0 ? void 0 : _a[getSchedulesTasksResult_1.GetSchedulesTasksResultFields.COLUMN_SCHEDULES_TASKS])) {
|
|
450
|
+
response[getResult_1.GetResultFields.COLUMN_DATA] = {
|
|
451
|
+
[getSchedulesTasksResult_1.GetSchedulesTasksResultFields.COLUMN_SCHEDULES_TASKS]: getResult_1.GetResultFields.COLUMN_DATA in response
|
|
452
|
+
? response[getResult_1.GetResultFields.COLUMN_DATA]
|
|
453
|
+
: [],
|
|
454
|
+
};
|
|
455
|
+
}
|
|
452
456
|
return new getResult_1.GetResult(getSchedulesTasksResult_1.GetSchedulesTasksResult, response);
|
|
453
457
|
}
|
|
458
|
+
async updateScheduledTasks(licenseReference, scheduledTaskId, payload, parameters = {}) {
|
|
459
|
+
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}/${scheduledTaskId}`;
|
|
460
|
+
return await this.patch(payload, parameters);
|
|
461
|
+
}
|
|
462
|
+
async getScheduledTasks(licenseReference, scheduledTaskId, parameters = {}) {
|
|
463
|
+
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}/${scheduledTaskId}`;
|
|
464
|
+
return new getResult_1.GetResult(getScheduleTaskResult_1.GetScheduleTaskResult, await this.get(parameters));
|
|
465
|
+
}
|
|
466
|
+
async deleteScheduledTasks(licenseReference, scheduledTaskId, parameters = {}) {
|
|
467
|
+
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}/${scheduledTaskId}`;
|
|
468
|
+
return this.delete(parameters);
|
|
469
|
+
}
|
|
454
470
|
async getLicenseDailyPredictions(licenseReference, parameters = {}) {
|
|
455
471
|
this.path = `/${licenseReference}/predictions/daily`;
|
|
456
472
|
return new getResult_1.GetResult(consumption_1.ConsumptionDailyPrediction, await this.get(parameters));
|
package/build/user/index.d.ts
CHANGED
package/build/user/index.js
CHANGED
|
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./UserClient"), exports);
|
|
18
|
-
__exportStar(require("./userGraphqlClient"), exports);
|
|
19
18
|
__exportStar(require("./types"), exports);
|
|
20
19
|
//# sourceMappingURL=index.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.
|
|
7
|
+
"version": "3.109.0-rc.cpu.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",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AbstractGraphQLClient } from '../abstractGraphQLClient';
|
|
2
|
-
export declare class UserGraphqlClient extends AbstractGraphQLClient {
|
|
3
|
-
/**
|
|
4
|
-
* The Path of graphql catalog API
|
|
5
|
-
*/
|
|
6
|
-
private GRAPHQL;
|
|
7
|
-
findRaw<GraphQLResponseTypes>(request: string): Promise<GraphQLResponseTypes | null>;
|
|
8
|
-
find(): Promise<unknown | null>;
|
|
9
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserGraphqlClient = void 0;
|
|
4
|
-
const abstractGraphQLClient_1 = require("../abstractGraphQLClient");
|
|
5
|
-
class UserGraphqlClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
/**
|
|
9
|
-
* The Path of graphql catalog API
|
|
10
|
-
*/
|
|
11
|
-
this.GRAPHQL = '/v2/graphql';
|
|
12
|
-
}
|
|
13
|
-
async findRaw(request) {
|
|
14
|
-
this.path = this.GRAPHQL;
|
|
15
|
-
try {
|
|
16
|
-
return await this.post(request);
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
async find() {
|
|
23
|
-
const queryStr = '{ getUsers { updatedBy isEnabled extraData { name value} } }';
|
|
24
|
-
const result = await this.findRaw(queryStr);
|
|
25
|
-
console.log(result);
|
|
26
|
-
return result;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.UserGraphqlClient = UserGraphqlClient;
|
|
30
|
-
//# sourceMappingURL=userGraphqlClient.js.map
|