@arrowsphere/api-client 3.122.0 → 3.123.0
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
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
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
|
+
## [3.123.0] - 2024.06.12
|
|
6
|
+
|
|
7
|
+
### Modified
|
|
8
|
+
- [licenses] Send file in base64 for bulk action
|
|
5
9
|
|
|
6
10
|
## [3.121.0] - 2024.06.12
|
|
7
11
|
|
|
@@ -228,7 +228,7 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
228
228
|
/**
|
|
229
229
|
* The path to apply bulk action on license(s)
|
|
230
230
|
*/
|
|
231
|
-
this.BULK_PATH = '/bulk-action';
|
|
231
|
+
this.BULK_PATH = '/v2/bulk-action';
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
234
|
* Returns the raw result from the find endpoint call
|
|
@@ -319,20 +319,19 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
319
319
|
}
|
|
320
320
|
async bulkAction(bulkData) {
|
|
321
321
|
this.path = this.BULK_PATH;
|
|
322
|
-
let postData
|
|
323
|
-
[bulkArguments_1.BulkBodyFields.ACTION_TYPE]: bulkData.actionType,
|
|
324
|
-
[bulkArguments_1.BulkBodyFields.LICENSES]: bulkData.licenses,
|
|
325
|
-
};
|
|
322
|
+
let postData;
|
|
326
323
|
if (bulkData.actionType == bulkArguments_1.ActionTypes.AUTO_RENEW) {
|
|
327
324
|
const postAutoRenewData = {
|
|
328
|
-
|
|
325
|
+
[bulkArguments_1.BulkBodyFields.ACTION_TYPE]: bulkData.actionType,
|
|
326
|
+
[bulkArguments_1.BulkBodyFields.LICENSES]: bulkData.licenses,
|
|
329
327
|
[bulkArguments_1.BulkBodyFields.AUTO_RENEW_STATUS]: bulkData.autoRenewStatus,
|
|
330
328
|
};
|
|
331
329
|
postData = postAutoRenewData;
|
|
332
330
|
}
|
|
333
331
|
else if (bulkData.actionType == bulkArguments_1.ActionTypes.SET_RATE) {
|
|
334
332
|
const postSetRateData = {
|
|
335
|
-
|
|
333
|
+
[bulkArguments_1.BulkBodyFields.ACTION_TYPE]: bulkData.actionType,
|
|
334
|
+
[bulkArguments_1.BulkBodyFields.LICENSES]: bulkData.licenses,
|
|
336
335
|
[bulkArguments_1.BulkBodyFields.SPECIAL_PRICE_RATE_TYPE]: bulkData.specialPriceRateType,
|
|
337
336
|
[bulkArguments_1.BulkBodyFields.SPECIAL_PRICE_RATE_VALUE]: bulkData.specialPriceRateValue,
|
|
338
337
|
[bulkArguments_1.BulkBodyFields.SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE]: bulkData.specialRateEffectiveApplicationDate,
|
|
@@ -340,11 +339,15 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
340
339
|
postData = postSetRateData;
|
|
341
340
|
}
|
|
342
341
|
else if (bulkData.actionType == bulkArguments_1.ActionTypes.UPLOAD_CHANGES) {
|
|
343
|
-
const
|
|
344
|
-
[
|
|
345
|
-
[
|
|
342
|
+
const postUploadChanges = {
|
|
343
|
+
[bulkArguments_1.BulkBodyFields.ACTION_TYPE]: bulkData[bulkArguments_1.BulkBodyFields.ACTION_TYPE],
|
|
344
|
+
[bulkArguments_1.BulkBodyFields.FILE_BASE64]: bulkData[bulkArguments_1.BulkBodyFields.FILE_BASE64],
|
|
345
|
+
[bulkArguments_1.BulkBodyFields.FILE_NAME]: bulkData[bulkArguments_1.BulkBodyFields.FILE_NAME],
|
|
346
346
|
};
|
|
347
|
-
|
|
347
|
+
postData = postUploadChanges;
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
throw new Error('actionType does not exist');
|
|
348
351
|
}
|
|
349
352
|
return await this.post(postData);
|
|
350
353
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { Except } from 'type-fest';
|
|
3
|
-
import { File } from 'node:buffer';
|
|
4
2
|
export declare enum ActionTypes {
|
|
5
3
|
SET_RATE = "setRate",
|
|
6
4
|
AUTO_RENEW = "autoRenew",
|
|
@@ -25,7 +23,8 @@ export declare enum BulkBodyFields {
|
|
|
25
23
|
SPECIAL_PRICE_RATE_TYPE = "specialPriceRateType",
|
|
26
24
|
SPECIAL_PRICE_RATE_VALUE = "specialPriceRateValue",
|
|
27
25
|
SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE = "specialRateEffectiveApplicationDate",
|
|
28
|
-
|
|
26
|
+
FILE_BASE64 = "fileBase64",
|
|
27
|
+
FILE_NAME = "fileName"
|
|
29
28
|
}
|
|
30
29
|
export declare enum SpecialPriceRateActive {
|
|
31
30
|
ACTIVE_CURRENTLY = 1,
|
|
@@ -34,13 +33,14 @@ export declare enum SpecialPriceRateActive {
|
|
|
34
33
|
}
|
|
35
34
|
export declare type BulkBodyArgument = {
|
|
36
35
|
[BulkBodyFields.ACTION_TYPE]: ActionTypes;
|
|
37
|
-
[BulkBodyFields.LICENSES]
|
|
36
|
+
[BulkBodyFields.LICENSES]?: string[];
|
|
38
37
|
[BulkBodyFields.AUTO_RENEW_STATUS]?: AutoRenewStatuses;
|
|
39
38
|
[BulkBodyFields.SPECIAL_PRICE_RATE_TYPE]?: SpecialPriceRateTypes;
|
|
40
39
|
[BulkBodyFields.SPECIAL_PRICE_RATE_VALUE]?: string;
|
|
41
40
|
[BulkBodyFields.SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE]?: SpecialRateEffectiveApplicationDate;
|
|
42
|
-
[BulkBodyFields.
|
|
41
|
+
[BulkBodyFields.FILE_BASE64]?: string;
|
|
42
|
+
[BulkBodyFields.FILE_NAME]?: string;
|
|
43
43
|
};
|
|
44
|
-
export declare type BulkAutoRenewBody = Except<BulkBodyArgument, BulkBodyFields.
|
|
45
|
-
export declare type BulkSetRateBody = Except<BulkBodyArgument, BulkBodyFields.
|
|
46
|
-
export declare type BulkUploadChangesBody = Except<BulkBodyArgument, BulkBodyFields.
|
|
44
|
+
export declare type BulkAutoRenewBody = Except<BulkBodyArgument, BulkBodyFields.LICENSES & BulkBodyFields.SPECIAL_PRICE_RATE_TYPE & BulkBodyFields.SPECIAL_PRICE_RATE_VALUE & BulkBodyFields.SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE>;
|
|
45
|
+
export declare type BulkSetRateBody = Except<BulkBodyArgument, BulkBodyFields.LICENSES & BulkBodyFields.AUTO_RENEW_STATUS>;
|
|
46
|
+
export declare type BulkUploadChangesBody = Except<BulkBodyArgument, BulkBodyFields.FILE_BASE64 & BulkBodyFields.FILE_NAME>;
|
|
@@ -30,7 +30,8 @@ var BulkBodyFields;
|
|
|
30
30
|
BulkBodyFields["SPECIAL_PRICE_RATE_TYPE"] = "specialPriceRateType";
|
|
31
31
|
BulkBodyFields["SPECIAL_PRICE_RATE_VALUE"] = "specialPriceRateValue";
|
|
32
32
|
BulkBodyFields["SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE"] = "specialRateEffectiveApplicationDate";
|
|
33
|
-
BulkBodyFields["
|
|
33
|
+
BulkBodyFields["FILE_BASE64"] = "fileBase64";
|
|
34
|
+
BulkBodyFields["FILE_NAME"] = "fileName";
|
|
34
35
|
})(BulkBodyFields = exports.BulkBodyFields || (exports.BulkBodyFields = {}));
|
|
35
36
|
var SpecialPriceRateActive;
|
|
36
37
|
(function (SpecialPriceRateActive) {
|
package/package.json
CHANGED