@arrowsphere/api-client 3.8.0 → 3.9.0-rc.2
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 +9 -0
- package/build/consumption/consumptionClient.d.ts +13 -0
- package/build/consumption/consumptionClient.js +30 -0
- package/build/consumption/entities/bi/consumptionBI.d.ts +27 -0
- package/build/consumption/entities/bi/consumptionBI.js +75 -0
- package/build/consumption/entities/bi/period/period.d.ts +16 -0
- package/build/consumption/entities/bi/period/period.js +47 -0
- package/build/consumption/entities/bi/top/top.d.ts +22 -0
- package/build/consumption/entities/bi/top/top.js +61 -0
- package/build/consumption/entities/consumption/consumption.d.ts +16 -0
- package/build/consumption/entities/consumption/consumption.js +47 -0
- package/build/consumption/index.d.ts +5 -0
- package/build/consumption/index.js +18 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/publicApiClient.d.ts +2 -0
- package/build/publicApiClient.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
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.9.0] - 2022-07-05
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- Adding 3 new EndPoints of consumption:
|
|
11
|
+
- Get Monthly Consumption
|
|
12
|
+
- Get Daily Consumption
|
|
13
|
+
- Get BI Consumption
|
|
14
|
+
|
|
6
15
|
## [3.8.0] - 2022-07-04
|
|
7
16
|
|
|
8
17
|
### Changed
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractClient, Parameters } from '../abstractClient';
|
|
2
|
+
import { ConsumptionBI } from './entities/bi/consumptionBI';
|
|
3
|
+
import { GetResult } from '../getResult';
|
|
4
|
+
import { Consumption } from './entities/consumption/consumption';
|
|
5
|
+
export declare class ConsumptionClient extends AbstractClient {
|
|
6
|
+
/**
|
|
7
|
+
* The base path of the API
|
|
8
|
+
*/
|
|
9
|
+
protected basePath: string;
|
|
10
|
+
getMonthlyConsumption(licenseReference: string, parameters: Parameters): Promise<GetResult<Consumption>>;
|
|
11
|
+
getDailyConsumption(licenseReference: string, parameters: Parameters): Promise<GetResult<Consumption>>;
|
|
12
|
+
getBIConsumption(parameters: Parameters): Promise<GetResult<ConsumptionBI>>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsumptionClient = void 0;
|
|
4
|
+
const abstractClient_1 = require("../abstractClient");
|
|
5
|
+
const consumptionBI_1 = require("./entities/bi/consumptionBI");
|
|
6
|
+
const getResult_1 = require("../getResult");
|
|
7
|
+
const consumption_1 = require("./entities/consumption/consumption");
|
|
8
|
+
class ConsumptionClient extends abstractClient_1.AbstractClient {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
/**
|
|
12
|
+
* The base path of the API
|
|
13
|
+
*/
|
|
14
|
+
this.basePath = '/consumption';
|
|
15
|
+
}
|
|
16
|
+
async getMonthlyConsumption(licenseReference, parameters) {
|
|
17
|
+
this.path = `/monthly/license/${licenseReference}`;
|
|
18
|
+
return new getResult_1.GetResult(consumption_1.Consumption, await this.get(parameters));
|
|
19
|
+
}
|
|
20
|
+
async getDailyConsumption(licenseReference, parameters) {
|
|
21
|
+
this.path = `/daily/license/${licenseReference}`;
|
|
22
|
+
return new getResult_1.GetResult(consumption_1.Consumption, await this.get(parameters));
|
|
23
|
+
}
|
|
24
|
+
async getBIConsumption(parameters) {
|
|
25
|
+
this.path = '/bi/top/monthly';
|
|
26
|
+
return new getResult_1.GetResult(consumptionBI_1.ConsumptionBI, await this.get(parameters));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ConsumptionClient = ConsumptionClient;
|
|
30
|
+
//# sourceMappingURL=consumptionClient.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
import { Period, PeriodType } from './period/period';
|
|
3
|
+
import { Top, TopType } from './top/top';
|
|
4
|
+
export declare enum ConsumptionBIFields {
|
|
5
|
+
COLUMN_CURRENCY = "currency",
|
|
6
|
+
COLUMN_PERIOD = "period",
|
|
7
|
+
COLUMN_AGGREGATE = "aggregate",
|
|
8
|
+
COLUMN_METRIC = "metric",
|
|
9
|
+
COLUMN_TOP = "top"
|
|
10
|
+
}
|
|
11
|
+
export declare type ConsumptionBIType = {
|
|
12
|
+
[ConsumptionBIFields.COLUMN_CURRENCY]?: string;
|
|
13
|
+
[ConsumptionBIFields.COLUMN_PERIOD]?: PeriodType;
|
|
14
|
+
[ConsumptionBIFields.COLUMN_AGGREGATE]?: string;
|
|
15
|
+
[ConsumptionBIFields.COLUMN_METRIC]?: string;
|
|
16
|
+
[ConsumptionBIFields.COLUMN_TOP]?: Array<TopType>;
|
|
17
|
+
};
|
|
18
|
+
export declare class ConsumptionBI extends AbstractEntity<ConsumptionBIType> {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(consumptionResponse: ConsumptionBIType);
|
|
21
|
+
get currency(): string | undefined;
|
|
22
|
+
get period(): Period | undefined;
|
|
23
|
+
get aggregate(): string | undefined;
|
|
24
|
+
get metric(): string | undefined;
|
|
25
|
+
get top(): Array<Top> | undefined;
|
|
26
|
+
toJSON(): ConsumptionBIType;
|
|
27
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _currency, _period, _aggregate, _metric, _top;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ConsumptionBI = exports.ConsumptionBIFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
19
|
+
const period_1 = require("./period/period");
|
|
20
|
+
const top_1 = require("./top/top");
|
|
21
|
+
var ConsumptionBIFields;
|
|
22
|
+
(function (ConsumptionBIFields) {
|
|
23
|
+
ConsumptionBIFields["COLUMN_CURRENCY"] = "currency";
|
|
24
|
+
ConsumptionBIFields["COLUMN_PERIOD"] = "period";
|
|
25
|
+
ConsumptionBIFields["COLUMN_AGGREGATE"] = "aggregate";
|
|
26
|
+
ConsumptionBIFields["COLUMN_METRIC"] = "metric";
|
|
27
|
+
ConsumptionBIFields["COLUMN_TOP"] = "top";
|
|
28
|
+
})(ConsumptionBIFields = exports.ConsumptionBIFields || (exports.ConsumptionBIFields = {}));
|
|
29
|
+
class ConsumptionBI extends abstractEntity_1.AbstractEntity {
|
|
30
|
+
constructor(consumptionResponse) {
|
|
31
|
+
super(consumptionResponse);
|
|
32
|
+
_currency.set(this, void 0);
|
|
33
|
+
_period.set(this, void 0);
|
|
34
|
+
_aggregate.set(this, void 0);
|
|
35
|
+
_metric.set(this, void 0);
|
|
36
|
+
_top.set(this, void 0);
|
|
37
|
+
__classPrivateFieldSet(this, _currency, consumptionResponse[ConsumptionBIFields.COLUMN_CURRENCY]);
|
|
38
|
+
__classPrivateFieldSet(this, _period, consumptionResponse[ConsumptionBIFields.COLUMN_PERIOD]
|
|
39
|
+
? new period_1.Period(consumptionResponse[ConsumptionBIFields.COLUMN_PERIOD])
|
|
40
|
+
: undefined);
|
|
41
|
+
__classPrivateFieldSet(this, _aggregate, consumptionResponse[ConsumptionBIFields.COLUMN_AGGREGATE]);
|
|
42
|
+
__classPrivateFieldSet(this, _metric, consumptionResponse[ConsumptionBIFields.COLUMN_METRIC]);
|
|
43
|
+
__classPrivateFieldSet(this, _top, consumptionResponse[ConsumptionBIFields.COLUMN_TOP]
|
|
44
|
+
? consumptionResponse[ConsumptionBIFields.COLUMN_TOP].map((top) => new top_1.Top(top))
|
|
45
|
+
: undefined);
|
|
46
|
+
}
|
|
47
|
+
get currency() {
|
|
48
|
+
return __classPrivateFieldGet(this, _currency);
|
|
49
|
+
}
|
|
50
|
+
get period() {
|
|
51
|
+
return __classPrivateFieldGet(this, _period);
|
|
52
|
+
}
|
|
53
|
+
get aggregate() {
|
|
54
|
+
return __classPrivateFieldGet(this, _aggregate);
|
|
55
|
+
}
|
|
56
|
+
get metric() {
|
|
57
|
+
return __classPrivateFieldGet(this, _metric);
|
|
58
|
+
}
|
|
59
|
+
get top() {
|
|
60
|
+
return __classPrivateFieldGet(this, _top);
|
|
61
|
+
}
|
|
62
|
+
toJSON() {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
return {
|
|
65
|
+
[ConsumptionBIFields.COLUMN_CURRENCY]: this.currency,
|
|
66
|
+
[ConsumptionBIFields.COLUMN_PERIOD]: (_a = this.period) === null || _a === void 0 ? void 0 : _a.toJSON(),
|
|
67
|
+
[ConsumptionBIFields.COLUMN_AGGREGATE]: this.aggregate,
|
|
68
|
+
[ConsumptionBIFields.COLUMN_METRIC]: this.metric,
|
|
69
|
+
[ConsumptionBIFields.COLUMN_TOP]: (_b = this.top) === null || _b === void 0 ? void 0 : _b.map((top) => top.toJSON()),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.ConsumptionBI = ConsumptionBI;
|
|
74
|
+
_currency = new WeakMap(), _period = new WeakMap(), _aggregate = new WeakMap(), _metric = new WeakMap(), _top = new WeakMap();
|
|
75
|
+
//# sourceMappingURL=consumptionBI.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
export declare enum PeriodFields {
|
|
3
|
+
COLUMN_FROM = "from",
|
|
4
|
+
COLUMN_TO = "to"
|
|
5
|
+
}
|
|
6
|
+
export declare type PeriodType = {
|
|
7
|
+
[PeriodFields.COLUMN_FROM]: string;
|
|
8
|
+
[PeriodFields.COLUMN_TO]: string;
|
|
9
|
+
};
|
|
10
|
+
export declare class Period extends AbstractEntity<PeriodType> {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(periodResponse: PeriodType);
|
|
13
|
+
get from(): string;
|
|
14
|
+
get to(): string;
|
|
15
|
+
toJSON(): PeriodType;
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _from, _to;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Period = exports.PeriodFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
var PeriodFields;
|
|
20
|
+
(function (PeriodFields) {
|
|
21
|
+
PeriodFields["COLUMN_FROM"] = "from";
|
|
22
|
+
PeriodFields["COLUMN_TO"] = "to";
|
|
23
|
+
})(PeriodFields = exports.PeriodFields || (exports.PeriodFields = {}));
|
|
24
|
+
class Period extends abstractEntity_1.AbstractEntity {
|
|
25
|
+
constructor(periodResponse) {
|
|
26
|
+
super(periodResponse);
|
|
27
|
+
_from.set(this, void 0);
|
|
28
|
+
_to.set(this, void 0);
|
|
29
|
+
__classPrivateFieldSet(this, _from, periodResponse[PeriodFields.COLUMN_FROM]);
|
|
30
|
+
__classPrivateFieldSet(this, _to, periodResponse[PeriodFields.COLUMN_TO]);
|
|
31
|
+
}
|
|
32
|
+
get from() {
|
|
33
|
+
return __classPrivateFieldGet(this, _from);
|
|
34
|
+
}
|
|
35
|
+
get to() {
|
|
36
|
+
return __classPrivateFieldGet(this, _to);
|
|
37
|
+
}
|
|
38
|
+
toJSON() {
|
|
39
|
+
return {
|
|
40
|
+
[PeriodFields.COLUMN_FROM]: this.from,
|
|
41
|
+
[PeriodFields.COLUMN_TO]: this.to,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Period = Period;
|
|
46
|
+
_from = new WeakMap(), _to = new WeakMap();
|
|
47
|
+
//# sourceMappingURL=period.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
export declare enum TopFields {
|
|
3
|
+
COLUMN_RANK = "rank",
|
|
4
|
+
COLUMN_METRIC = "metric",
|
|
5
|
+
COLUMN_NAME = "name",
|
|
6
|
+
COLUMN_REF = "ref"
|
|
7
|
+
}
|
|
8
|
+
export declare type TopType = {
|
|
9
|
+
[TopFields.COLUMN_RANK]: string;
|
|
10
|
+
[TopFields.COLUMN_METRIC]: number;
|
|
11
|
+
[TopFields.COLUMN_NAME]: string;
|
|
12
|
+
[TopFields.COLUMN_REF]: string;
|
|
13
|
+
};
|
|
14
|
+
export declare class Top extends AbstractEntity<TopType> {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(topResponse: TopType);
|
|
17
|
+
get rank(): string;
|
|
18
|
+
get metric(): number;
|
|
19
|
+
get name(): string;
|
|
20
|
+
get ref(): string;
|
|
21
|
+
toJSON(): TopType;
|
|
22
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _rank, _metric, _name, _ref;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Top = exports.TopFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
var TopFields;
|
|
20
|
+
(function (TopFields) {
|
|
21
|
+
TopFields["COLUMN_RANK"] = "rank";
|
|
22
|
+
TopFields["COLUMN_METRIC"] = "metric";
|
|
23
|
+
TopFields["COLUMN_NAME"] = "name";
|
|
24
|
+
TopFields["COLUMN_REF"] = "ref";
|
|
25
|
+
})(TopFields = exports.TopFields || (exports.TopFields = {}));
|
|
26
|
+
class Top extends abstractEntity_1.AbstractEntity {
|
|
27
|
+
constructor(topResponse) {
|
|
28
|
+
super(topResponse);
|
|
29
|
+
_rank.set(this, void 0);
|
|
30
|
+
_metric.set(this, void 0);
|
|
31
|
+
_name.set(this, void 0);
|
|
32
|
+
_ref.set(this, void 0);
|
|
33
|
+
__classPrivateFieldSet(this, _rank, topResponse[TopFields.COLUMN_RANK]);
|
|
34
|
+
__classPrivateFieldSet(this, _metric, topResponse[TopFields.COLUMN_METRIC]);
|
|
35
|
+
__classPrivateFieldSet(this, _name, topResponse[TopFields.COLUMN_NAME]);
|
|
36
|
+
__classPrivateFieldSet(this, _ref, topResponse[TopFields.COLUMN_REF]);
|
|
37
|
+
}
|
|
38
|
+
get rank() {
|
|
39
|
+
return __classPrivateFieldGet(this, _rank);
|
|
40
|
+
}
|
|
41
|
+
get metric() {
|
|
42
|
+
return __classPrivateFieldGet(this, _metric);
|
|
43
|
+
}
|
|
44
|
+
get name() {
|
|
45
|
+
return __classPrivateFieldGet(this, _name);
|
|
46
|
+
}
|
|
47
|
+
get ref() {
|
|
48
|
+
return __classPrivateFieldGet(this, _ref);
|
|
49
|
+
}
|
|
50
|
+
toJSON() {
|
|
51
|
+
return {
|
|
52
|
+
[TopFields.COLUMN_RANK]: this.rank,
|
|
53
|
+
[TopFields.COLUMN_METRIC]: this.metric,
|
|
54
|
+
[TopFields.COLUMN_NAME]: this.name,
|
|
55
|
+
[TopFields.COLUMN_REF]: this.ref,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.Top = Top;
|
|
60
|
+
_rank = new WeakMap(), _metric = new WeakMap(), _name = new WeakMap(), _ref = new WeakMap();
|
|
61
|
+
//# sourceMappingURL=top.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare enum ConsumptionFields {
|
|
3
|
+
COLUMN_HEADERS = "headers",
|
|
4
|
+
COLUMN_LINES = "lines"
|
|
5
|
+
}
|
|
6
|
+
export declare type ConsumptionType = {
|
|
7
|
+
[ConsumptionFields.COLUMN_HEADERS]: Array<string>;
|
|
8
|
+
[ConsumptionFields.COLUMN_LINES]: Array<string | number>;
|
|
9
|
+
};
|
|
10
|
+
export declare class Consumption extends AbstractEntity<ConsumptionType> {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(consumptionResponse: ConsumptionType);
|
|
13
|
+
get headers(): Array<string>;
|
|
14
|
+
get lines(): Array<string | number>;
|
|
15
|
+
toJSON(): ConsumptionType;
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _headers, _lines;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Consumption = exports.ConsumptionFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
19
|
+
var ConsumptionFields;
|
|
20
|
+
(function (ConsumptionFields) {
|
|
21
|
+
ConsumptionFields["COLUMN_HEADERS"] = "headers";
|
|
22
|
+
ConsumptionFields["COLUMN_LINES"] = "lines";
|
|
23
|
+
})(ConsumptionFields = exports.ConsumptionFields || (exports.ConsumptionFields = {}));
|
|
24
|
+
class Consumption extends abstractEntity_1.AbstractEntity {
|
|
25
|
+
constructor(consumptionResponse) {
|
|
26
|
+
super(consumptionResponse);
|
|
27
|
+
_headers.set(this, void 0);
|
|
28
|
+
_lines.set(this, void 0);
|
|
29
|
+
__classPrivateFieldSet(this, _headers, consumptionResponse[ConsumptionFields.COLUMN_HEADERS]);
|
|
30
|
+
__classPrivateFieldSet(this, _lines, consumptionResponse[ConsumptionFields.COLUMN_LINES]);
|
|
31
|
+
}
|
|
32
|
+
get headers() {
|
|
33
|
+
return __classPrivateFieldGet(this, _headers);
|
|
34
|
+
}
|
|
35
|
+
get lines() {
|
|
36
|
+
return __classPrivateFieldGet(this, _lines);
|
|
37
|
+
}
|
|
38
|
+
toJSON() {
|
|
39
|
+
return {
|
|
40
|
+
[ConsumptionFields.COLUMN_HEADERS]: this.headers,
|
|
41
|
+
[ConsumptionFields.COLUMN_LINES]: this.lines,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Consumption = Consumption;
|
|
46
|
+
_headers = new WeakMap(), _lines = new WeakMap();
|
|
47
|
+
//# sourceMappingURL=consumption.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./entities/consumption/consumption"), exports);
|
|
14
|
+
__exportStar(require("./entities/bi/period/period"), exports);
|
|
15
|
+
__exportStar(require("./entities/bi/top/top"), exports);
|
|
16
|
+
__exportStar(require("./entities/bi/consumptionBI"), exports);
|
|
17
|
+
__exportStar(require("./consumptionClient"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/build/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './abstractClient';
|
|
|
6
6
|
export * from './abstractGraphQLClient';
|
|
7
7
|
export * from './campaign/';
|
|
8
8
|
export * from './catalog/';
|
|
9
|
+
export * from './consumption';
|
|
9
10
|
export { ContactInformation };
|
|
10
11
|
export * from './customers/';
|
|
11
12
|
export * from './general/';
|
package/build/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __exportStar(require("./abstractClient"), exports);
|
|
|
32
32
|
__exportStar(require("./abstractGraphQLClient"), exports);
|
|
33
33
|
__exportStar(require("./campaign/"), exports);
|
|
34
34
|
__exportStar(require("./catalog/"), exports);
|
|
35
|
+
__exportStar(require("./consumption"), exports);
|
|
35
36
|
__exportStar(require("./customers/"), exports);
|
|
36
37
|
__exportStar(require("./general/"), exports);
|
|
37
38
|
__exportStar(require("./licenses/"), exports);
|
|
@@ -6,6 +6,7 @@ import { CustomersClient } from './customers/customersClient';
|
|
|
6
6
|
import { OrdersClient } from './orders';
|
|
7
7
|
import { ContactClient } from './contact/contactClient';
|
|
8
8
|
import { CampaignClient } from './campaign';
|
|
9
|
+
import { ConsumptionClient } from './consumption/consumptionClient';
|
|
9
10
|
/**
|
|
10
11
|
* Public API Client class, should be the main entry point for your calls
|
|
11
12
|
*/
|
|
@@ -51,5 +52,6 @@ export declare class PublicApiClient extends AbstractClient {
|
|
|
51
52
|
* @returns {@link ContactClient}
|
|
52
53
|
*/
|
|
53
54
|
getCampaignClient(): CampaignClient;
|
|
55
|
+
getConsumptionClient(): ConsumptionClient;
|
|
54
56
|
}
|
|
55
57
|
export default PublicApiClient;
|
package/build/publicApiClient.js
CHANGED
|
@@ -9,6 +9,7 @@ const customersClient_1 = require("./customers/customersClient");
|
|
|
9
9
|
const orders_1 = require("./orders");
|
|
10
10
|
const contactClient_1 = require("./contact/contactClient");
|
|
11
11
|
const campaign_1 = require("./campaign");
|
|
12
|
+
const consumptionClient_1 = require("./consumption/consumptionClient");
|
|
12
13
|
/**
|
|
13
14
|
* Public API Client class, should be the main entry point for your calls
|
|
14
15
|
*/
|
|
@@ -88,6 +89,11 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
88
89
|
.setUrl(this.url)
|
|
89
90
|
.setApiKey(this.apiKey);
|
|
90
91
|
}
|
|
92
|
+
getConsumptionClient() {
|
|
93
|
+
return new consumptionClient_1.ConsumptionClient(this.client)
|
|
94
|
+
.setUrl(this.url)
|
|
95
|
+
.setApiKey(this.apiKey);
|
|
96
|
+
}
|
|
91
97
|
}
|
|
92
98
|
exports.PublicApiClient = PublicApiClient;
|
|
93
99
|
exports.default = PublicApiClient;
|
package/package.json
CHANGED