@arrowsphere/api-client 3.9.0-rc.1 → 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.
@@ -9,19 +9,19 @@ export declare enum ConsumptionBIFields {
9
9
  COLUMN_TOP = "top"
10
10
  }
11
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>;
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
17
  };
18
18
  export declare class ConsumptionBI extends AbstractEntity<ConsumptionBIType> {
19
19
  #private;
20
20
  constructor(consumptionResponse: ConsumptionBIType);
21
- get currency(): string;
22
- get period(): Period;
23
- get aggregate(): string;
24
- get metric(): string;
25
- get top(): Array<Top>;
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
26
  toJSON(): ConsumptionBIType;
27
27
  }
@@ -35,10 +35,14 @@ class ConsumptionBI extends abstractEntity_1.AbstractEntity {
35
35
  _metric.set(this, void 0);
36
36
  _top.set(this, void 0);
37
37
  __classPrivateFieldSet(this, _currency, consumptionResponse[ConsumptionBIFields.COLUMN_CURRENCY]);
38
- __classPrivateFieldSet(this, _period, new period_1.Period(consumptionResponse[ConsumptionBIFields.COLUMN_PERIOD]));
38
+ __classPrivateFieldSet(this, _period, consumptionResponse[ConsumptionBIFields.COLUMN_PERIOD]
39
+ ? new period_1.Period(consumptionResponse[ConsumptionBIFields.COLUMN_PERIOD])
40
+ : undefined);
39
41
  __classPrivateFieldSet(this, _aggregate, consumptionResponse[ConsumptionBIFields.COLUMN_AGGREGATE]);
40
42
  __classPrivateFieldSet(this, _metric, consumptionResponse[ConsumptionBIFields.COLUMN_METRIC]);
41
- __classPrivateFieldSet(this, _top, consumptionResponse[ConsumptionBIFields.COLUMN_TOP].map((top) => new top_1.Top(top)));
43
+ __classPrivateFieldSet(this, _top, consumptionResponse[ConsumptionBIFields.COLUMN_TOP]
44
+ ? consumptionResponse[ConsumptionBIFields.COLUMN_TOP].map((top) => new top_1.Top(top))
45
+ : undefined);
42
46
  }
43
47
  get currency() {
44
48
  return __classPrivateFieldGet(this, _currency);
@@ -56,12 +60,13 @@ class ConsumptionBI extends abstractEntity_1.AbstractEntity {
56
60
  return __classPrivateFieldGet(this, _top);
57
61
  }
58
62
  toJSON() {
63
+ var _a, _b;
59
64
  return {
60
65
  [ConsumptionBIFields.COLUMN_CURRENCY]: this.currency,
61
- [ConsumptionBIFields.COLUMN_PERIOD]: this.period.toJSON(),
66
+ [ConsumptionBIFields.COLUMN_PERIOD]: (_a = this.period) === null || _a === void 0 ? void 0 : _a.toJSON(),
62
67
  [ConsumptionBIFields.COLUMN_AGGREGATE]: this.aggregate,
63
68
  [ConsumptionBIFields.COLUMN_METRIC]: this.metric,
64
- [ConsumptionBIFields.COLUMN_TOP]: this.top.map((top) => top.toJSON()),
69
+ [ConsumptionBIFields.COLUMN_TOP]: (_b = this.top) === null || _b === void 0 ? void 0 : _b.map((top) => top.toJSON()),
65
70
  };
66
71
  }
67
72
  }
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.9.0-rc.1",
7
+ "version": "3.9.0-rc.2",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",