@arrowsphere/api-client 3.48.2 → 3.49.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 +13 -0
- package/build/consumption/consumptionClient.d.ts +10 -0
- package/build/consumption/consumptionClient.js +5 -0
- package/build/consumption/entities/consumption/consumptionDownloadRequest.d.ts +19 -0
- package/build/consumption/entities/consumption/consumptionDownloadRequest.js +53 -0
- package/build/consumption/index.d.ts +1 -0
- package/build/consumption/index.js +1 -0
- package/build/orders/entities/orders/products/products.d.ts +2 -2
- package/build/orders/entities/orders/products/products.js +2 -5
- package/build/securityScore/securityScoreGraphQLClient.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.49.0] - 2023-08-16
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- Add consumption download request
|
|
11
|
+
- Revert Fix Order type, field license is now optional [3.48.2]
|
|
12
|
+
|
|
13
|
+
## [3.48.3] - 2023-08-09
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Changes security score graphql path
|
|
18
|
+
|
|
6
19
|
## [3.48.2] - 2023-08-09
|
|
7
20
|
|
|
8
21
|
### Changed
|
|
@@ -2,6 +2,15 @@ import { AbstractRestfulClient, Parameters } from '../abstractRestfulClient';
|
|
|
2
2
|
import { ConsumptionBI } from './entities/bi/consumptionBI';
|
|
3
3
|
import { GetResult } from '../getResult';
|
|
4
4
|
import { Consumption } from './entities/consumption/consumption';
|
|
5
|
+
import { ConsumptionDownloadRequest } from './entities/consumption/consumptionDownloadRequest';
|
|
6
|
+
export declare type ConsumptionDownloadRequestPayload = {
|
|
7
|
+
customer: string;
|
|
8
|
+
licenseRef: string;
|
|
9
|
+
dateStart: string;
|
|
10
|
+
dateEnd: string;
|
|
11
|
+
columns: Array<string>;
|
|
12
|
+
callbackURL: string;
|
|
13
|
+
};
|
|
5
14
|
export declare class ConsumptionClient extends AbstractRestfulClient {
|
|
6
15
|
/**
|
|
7
16
|
* The base path of the API
|
|
@@ -10,4 +19,5 @@ export declare class ConsumptionClient extends AbstractRestfulClient {
|
|
|
10
19
|
getMonthlyConsumption(licenseReference: string, parameters: Parameters): Promise<GetResult<Consumption>>;
|
|
11
20
|
getDailyConsumption(licenseReference: string, parameters: Parameters): Promise<GetResult<Consumption>>;
|
|
12
21
|
getBIConsumption(parameters: Parameters): Promise<GetResult<ConsumptionBI>>;
|
|
22
|
+
consumptionDownloadRequest(payload: ConsumptionDownloadRequestPayload): Promise<ConsumptionDownloadRequest>;
|
|
13
23
|
}
|
|
@@ -5,6 +5,7 @@ const abstractRestfulClient_1 = require("../abstractRestfulClient");
|
|
|
5
5
|
const consumptionBI_1 = require("./entities/bi/consumptionBI");
|
|
6
6
|
const getResult_1 = require("../getResult");
|
|
7
7
|
const consumption_1 = require("./entities/consumption/consumption");
|
|
8
|
+
const consumptionDownloadRequest_1 = require("./entities/consumption/consumptionDownloadRequest");
|
|
8
9
|
class ConsumptionClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -25,6 +26,10 @@ class ConsumptionClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
25
26
|
this.path = '/bi/top/monthly';
|
|
26
27
|
return new getResult_1.GetResult(consumptionBI_1.ConsumptionBI, await this.get(parameters));
|
|
27
28
|
}
|
|
29
|
+
async consumptionDownloadRequest(payload) {
|
|
30
|
+
this.path = '/v2/downloadRequest';
|
|
31
|
+
return new consumptionDownloadRequest_1.ConsumptionDownloadRequest(await this.post(payload));
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
exports.ConsumptionClient = ConsumptionClient;
|
|
30
35
|
//# sourceMappingURL=consumptionClient.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare enum ConsumptionDownloadRequestFields {
|
|
3
|
+
COLUMN_REF = "ref",
|
|
4
|
+
COLUMN_LINK = "link",
|
|
5
|
+
COLUMN_LINK_EXPIRATION_DATE = "linkExpirationDate"
|
|
6
|
+
}
|
|
7
|
+
export declare type ConsumptionDownloadRequestType = {
|
|
8
|
+
[ConsumptionDownloadRequestFields.COLUMN_REF]: string;
|
|
9
|
+
[ConsumptionDownloadRequestFields.COLUMN_LINK]?: Array<string>;
|
|
10
|
+
[ConsumptionDownloadRequestFields.COLUMN_LINK_EXPIRATION_DATE]?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class ConsumptionDownloadRequest extends AbstractEntity<ConsumptionDownloadRequestType> {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(consumptionResponse: ConsumptionDownloadRequestType);
|
|
15
|
+
get ref(): string;
|
|
16
|
+
get link(): Array<string> | undefined;
|
|
17
|
+
get linkExpirationDate(): string | undefined;
|
|
18
|
+
toJSON(): ConsumptionDownloadRequestType;
|
|
19
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 _ConsumptionDownloadRequest_ref, _ConsumptionDownloadRequest_link, _ConsumptionDownloadRequest_linkExpirationDate;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ConsumptionDownloadRequest = exports.ConsumptionDownloadRequestFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
17
|
+
var ConsumptionDownloadRequestFields;
|
|
18
|
+
(function (ConsumptionDownloadRequestFields) {
|
|
19
|
+
ConsumptionDownloadRequestFields["COLUMN_REF"] = "ref";
|
|
20
|
+
ConsumptionDownloadRequestFields["COLUMN_LINK"] = "link";
|
|
21
|
+
ConsumptionDownloadRequestFields["COLUMN_LINK_EXPIRATION_DATE"] = "linkExpirationDate";
|
|
22
|
+
})(ConsumptionDownloadRequestFields = exports.ConsumptionDownloadRequestFields || (exports.ConsumptionDownloadRequestFields = {}));
|
|
23
|
+
class ConsumptionDownloadRequest extends abstractEntity_1.AbstractEntity {
|
|
24
|
+
constructor(consumptionResponse) {
|
|
25
|
+
super(consumptionResponse);
|
|
26
|
+
_ConsumptionDownloadRequest_ref.set(this, void 0);
|
|
27
|
+
_ConsumptionDownloadRequest_link.set(this, void 0);
|
|
28
|
+
_ConsumptionDownloadRequest_linkExpirationDate.set(this, void 0);
|
|
29
|
+
__classPrivateFieldSet(this, _ConsumptionDownloadRequest_ref, consumptionResponse[ConsumptionDownloadRequestFields.COLUMN_REF], "f");
|
|
30
|
+
__classPrivateFieldSet(this, _ConsumptionDownloadRequest_link, consumptionResponse[ConsumptionDownloadRequestFields.COLUMN_LINK], "f");
|
|
31
|
+
__classPrivateFieldSet(this, _ConsumptionDownloadRequest_linkExpirationDate, consumptionResponse[ConsumptionDownloadRequestFields.COLUMN_LINK_EXPIRATION_DATE], "f");
|
|
32
|
+
}
|
|
33
|
+
get ref() {
|
|
34
|
+
return __classPrivateFieldGet(this, _ConsumptionDownloadRequest_ref, "f");
|
|
35
|
+
}
|
|
36
|
+
get link() {
|
|
37
|
+
return __classPrivateFieldGet(this, _ConsumptionDownloadRequest_link, "f");
|
|
38
|
+
}
|
|
39
|
+
get linkExpirationDate() {
|
|
40
|
+
return __classPrivateFieldGet(this, _ConsumptionDownloadRequest_linkExpirationDate, "f");
|
|
41
|
+
}
|
|
42
|
+
toJSON() {
|
|
43
|
+
return {
|
|
44
|
+
[ConsumptionDownloadRequestFields.COLUMN_REF]: this.ref,
|
|
45
|
+
[ConsumptionDownloadRequestFields.COLUMN_LINK]: this.link,
|
|
46
|
+
[ConsumptionDownloadRequestFields.COLUMN_LINK_EXPIRATION_DATE]: this
|
|
47
|
+
.linkExpirationDate,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.ConsumptionDownloadRequest = ConsumptionDownloadRequest;
|
|
52
|
+
_ConsumptionDownloadRequest_ref = new WeakMap(), _ConsumptionDownloadRequest_link = new WeakMap(), _ConsumptionDownloadRequest_linkExpirationDate = new WeakMap();
|
|
53
|
+
//# sourceMappingURL=consumptionDownloadRequest.js.map
|
|
@@ -2,4 +2,5 @@ export * from './entities/consumption/consumption';
|
|
|
2
2
|
export * from './entities/bi/period/period';
|
|
3
3
|
export * from './entities/bi/top/top';
|
|
4
4
|
export * from './entities/bi/consumptionBI';
|
|
5
|
+
export * from './entities/consumption/consumptionDownloadRequest';
|
|
5
6
|
export * from './consumptionClient';
|
|
@@ -18,5 +18,6 @@ __exportStar(require("./entities/consumption/consumption"), exports);
|
|
|
18
18
|
__exportStar(require("./entities/bi/period/period"), exports);
|
|
19
19
|
__exportStar(require("./entities/bi/top/top"), exports);
|
|
20
20
|
__exportStar(require("./entities/bi/consumptionBI"), exports);
|
|
21
|
+
__exportStar(require("./entities/consumption/consumptionDownloadRequest"), exports);
|
|
21
22
|
__exportStar(require("./consumptionClient"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -31,7 +31,7 @@ export declare type OrderProductsType = {
|
|
|
31
31
|
[OrderProductsFields.COLUMN_IS_TRIAL]: boolean;
|
|
32
32
|
[OrderProductsFields.COLUMN_PRICES]: ProductPricesType;
|
|
33
33
|
[OrderProductsFields.COLUMN_SUBSCRIPTION]: ReferenceLinkType;
|
|
34
|
-
[OrderProductsFields.COLUMN_LICENSE]
|
|
34
|
+
[OrderProductsFields.COLUMN_LICENSE]: ReferenceLinkType;
|
|
35
35
|
[OrderProductsFields.COLUMN_NAME]: string;
|
|
36
36
|
[OrderProductsFields.COLUMN_CLASSIFICATION]: string;
|
|
37
37
|
[OrderProductsFields.COLUMN_PROGRAM]: ProductProgramType;
|
|
@@ -50,7 +50,7 @@ export declare class OrderProduct extends AbstractEntity<OrderProductsType> {
|
|
|
50
50
|
get isTrial(): boolean;
|
|
51
51
|
get prices(): ProductPrices;
|
|
52
52
|
get subscription(): ReferenceLink;
|
|
53
|
-
get license(): ReferenceLink
|
|
53
|
+
get license(): ReferenceLink;
|
|
54
54
|
get name(): string;
|
|
55
55
|
get classification(): string;
|
|
56
56
|
get program(): ProductProgram;
|
|
@@ -65,9 +65,7 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
65
65
|
__classPrivateFieldSet(this, _OrderProduct_isTrial, getOrderProducts[OrderProductsFields.COLUMN_IS_TRIAL], "f");
|
|
66
66
|
__classPrivateFieldSet(this, _OrderProduct_prices, new productPrices_1.ProductPrices(getOrderProducts[OrderProductsFields.COLUMN_PRICES]), "f");
|
|
67
67
|
__classPrivateFieldSet(this, _OrderProduct_subscription, new referenceLink_1.ReferenceLink(getOrderProducts[OrderProductsFields.COLUMN_SUBSCRIPTION]), "f");
|
|
68
|
-
__classPrivateFieldSet(this, _OrderProduct_license, getOrderProducts[OrderProductsFields.COLUMN_LICENSE]
|
|
69
|
-
? new referenceLink_1.ReferenceLink(getOrderProducts[OrderProductsFields.COLUMN_LICENSE])
|
|
70
|
-
: undefined, "f");
|
|
68
|
+
__classPrivateFieldSet(this, _OrderProduct_license, new referenceLink_1.ReferenceLink(getOrderProducts[OrderProductsFields.COLUMN_LICENSE]), "f");
|
|
71
69
|
__classPrivateFieldSet(this, _OrderProduct_name, getOrderProducts[OrderProductsFields.COLUMN_NAME], "f");
|
|
72
70
|
__classPrivateFieldSet(this, _OrderProduct_classification, getOrderProducts[OrderProductsFields.COLUMN_CLASSIFICATION], "f");
|
|
73
71
|
__classPrivateFieldSet(this, _OrderProduct_program, new productProgram_1.ProductProgram(getOrderProducts[OrderProductsFields.COLUMN_PROGRAM]), "f");
|
|
@@ -119,7 +117,6 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
119
117
|
return __classPrivateFieldGet(this, _OrderProduct_identifier, "f");
|
|
120
118
|
}
|
|
121
119
|
toJSON() {
|
|
122
|
-
var _a;
|
|
123
120
|
return {
|
|
124
121
|
[OrderProductsFields.COLUMN_SKU]: this.sku,
|
|
125
122
|
[OrderProductsFields.COLUMN_QUANTITY]: this.quantity,
|
|
@@ -131,7 +128,7 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
131
128
|
[OrderProductsFields.COLUMN_IS_TRIAL]: this.isTrial,
|
|
132
129
|
[OrderProductsFields.COLUMN_PRICES]: this.prices.toJSON(),
|
|
133
130
|
[OrderProductsFields.COLUMN_SUBSCRIPTION]: this.subscription.toJSON(),
|
|
134
|
-
[OrderProductsFields.COLUMN_LICENSE]:
|
|
131
|
+
[OrderProductsFields.COLUMN_LICENSE]: this.license.toJSON(),
|
|
135
132
|
[OrderProductsFields.COLUMN_NAME]: this.name,
|
|
136
133
|
[OrderProductsFields.COLUMN_CLASSIFICATION]: this.classification,
|
|
137
134
|
[OrderProductsFields.COLUMN_PROGRAM]: this.program.toJSON(),
|
package/package.json
CHANGED