@vantage-sh/vantage-client 0.1.0 → 2.0.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/README.md +201 -80
- package/dist/index.d.mts +20895 -0
- package/dist/index.d.ts +20895 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +38 -43
- package/.swagger-codegen/VERSION +0 -1
- package/.swagger-codegen-ignore +0 -23
- package/.travis.yml +0 -4
- package/babel.config.json +0 -10
- package/docs/Cost.md +0 -11
- package/docs/Costs.md +0 -11
- package/docs/CostsApi.md +0 -168
- package/docs/PingApi.md +0 -51
- package/docs/Price.md +0 -14
- package/docs/Prices.md +0 -9
- package/docs/PricesApi.md +0 -328
- package/docs/Product.md +0 -13
- package/docs/Products.md +0 -9
- package/docs/Provider.md +0 -10
- package/docs/Providers.md +0 -9
- package/docs/Report.md +0 -13
- package/docs/Reports.md +0 -9
- package/docs/Service.md +0 -11
- package/docs/Services.md +0 -9
- package/lib/Vantage/ApiClient.js +0 -645
- package/lib/Vantage/Vantage/CostsApi.js +0 -183
- package/lib/Vantage/Vantage/PingApi.js +0 -71
- package/lib/Vantage/Vantage/PricesApi.js +0 -325
- package/lib/Vantage/index.js +0 -133
- package/lib/Vantage/model/Cost.js +0 -81
- package/lib/Vantage/model/Costs.js +0 -82
- package/lib/Vantage/model/Price.js +0 -102
- package/lib/Vantage/model/Prices.js +0 -68
- package/lib/Vantage/model/Product.js +0 -95
- package/lib/Vantage/model/Products.js +0 -68
- package/lib/Vantage/model/Provider.js +0 -73
- package/lib/Vantage/model/Providers.js +0 -68
- package/lib/Vantage/model/Report.js +0 -95
- package/lib/Vantage/model/Reports.js +0 -68
- package/lib/Vantage/model/Service.js +0 -80
- package/lib/Vantage/model/Services.js +0 -68
- package/mocha.opts +0 -1
- package/test/Vantage/Vantage/CostsApi.spec.js +0 -164
- package/test/Vantage/Vantage/PingApi.spec.js +0 -61
- package/test/Vantage/Vantage/PricesApi.spec.js +0 -280
- package/test/Vantage/model/Cost.spec.js +0 -71
- package/test/Vantage/model/Costs.spec.js +0 -71
- package/test/Vantage/model/Price.spec.js +0 -89
- package/test/Vantage/model/Prices.spec.js +0 -59
- package/test/Vantage/model/Product.spec.js +0 -83
- package/test/Vantage/model/Products.spec.js +0 -59
- package/test/Vantage/model/Provider.spec.js +0 -65
- package/test/Vantage/model/Providers.spec.js +0 -59
- package/test/Vantage/model/Report.spec.js +0 -83
- package/test/Vantage/model/Reports.spec.js +0 -59
- package/test/Vantage/model/Service.spec.js +0 -71
- package/test/Vantage/model/Services.spec.js +0 -59
- package/test/assert-equals.js +0 -81
- package/vantage-sh-vantage-client-0.1.0-beta7.tgz +0 -0
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Provider = void 0;
|
|
7
|
-
|
|
8
|
-
var _ApiClient = require("../ApiClient");
|
|
9
|
-
|
|
10
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
-
|
|
12
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
-
|
|
14
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The Provider model module.
|
|
18
|
-
* @module Vantage/model/Provider
|
|
19
|
-
* @version 1.0.0
|
|
20
|
-
*/
|
|
21
|
-
var Provider = /*#__PURE__*/function () {
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new <code>Provider</code>.
|
|
24
|
-
* @alias module:Vantage/model/Provider
|
|
25
|
-
* @class
|
|
26
|
-
*/
|
|
27
|
-
function Provider() {
|
|
28
|
-
_classCallCheck(this, Provider);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Constructs a <code>Provider</code> from a plain JavaScript object, optionally creating a new instance.
|
|
32
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
33
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
34
|
-
* @param {module:Vantage/model/Provider} obj Optional instance to populate.
|
|
35
|
-
* @return {module:Vantage/model/Provider} The populated <code>Provider</code> instance.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
_createClass(Provider, null, [{
|
|
40
|
-
key: "constructFromObject",
|
|
41
|
-
value: function constructFromObject(data, obj) {
|
|
42
|
-
if (data) {
|
|
43
|
-
obj = obj || new Provider();
|
|
44
|
-
if (data.hasOwnProperty('id')) obj.id = _ApiClient.ApiClient.convertToType(data['id'], 'String');
|
|
45
|
-
if (data.hasOwnProperty('name')) obj.name = _ApiClient.ApiClient.convertToType(data['name'], 'String');
|
|
46
|
-
if (data.hasOwnProperty('description')) obj.description = _ApiClient.ApiClient.convertToType(data['description'], 'String');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return obj;
|
|
50
|
-
}
|
|
51
|
-
}]);
|
|
52
|
-
|
|
53
|
-
return Provider;
|
|
54
|
-
}();
|
|
55
|
-
/**
|
|
56
|
-
* @member {String} id
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
exports.Provider = Provider;
|
|
61
|
-
Provider.prototype.id = undefined;
|
|
62
|
-
/**
|
|
63
|
-
* The common name of the provider.
|
|
64
|
-
* @member {String} name
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
Provider.prototype.name = undefined;
|
|
68
|
-
/**
|
|
69
|
-
* The full descriptive name of the provider.
|
|
70
|
-
* @member {String} description
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
Provider.prototype.description = undefined;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Providers = void 0;
|
|
7
|
-
|
|
8
|
-
var _ApiClient = require("../ApiClient");
|
|
9
|
-
|
|
10
|
-
var _Provider = require("./Provider");
|
|
11
|
-
|
|
12
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
-
|
|
14
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
15
|
-
|
|
16
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The Providers model module.
|
|
20
|
-
* @module Vantage/model/Providers
|
|
21
|
-
* @version 1.0.0
|
|
22
|
-
*/
|
|
23
|
-
var Providers = /*#__PURE__*/function () {
|
|
24
|
-
/**
|
|
25
|
-
* Constructs a new <code>Providers</code>.
|
|
26
|
-
* Providers model
|
|
27
|
-
* @alias module:Vantage/model/Providers
|
|
28
|
-
* @class
|
|
29
|
-
*/
|
|
30
|
-
function Providers() {
|
|
31
|
-
_classCallCheck(this, Providers);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Constructs a <code>Providers</code> from a plain JavaScript object, optionally creating a new instance.
|
|
35
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
36
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
37
|
-
* @param {module:Vantage/model/Providers} obj Optional instance to populate.
|
|
38
|
-
* @return {module:Vantage/model/Providers} The populated <code>Providers</code> instance.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
_createClass(Providers, null, [{
|
|
43
|
-
key: "constructFromObject",
|
|
44
|
-
value: function constructFromObject(data, obj) {
|
|
45
|
-
if (data) {
|
|
46
|
-
obj = obj || new Providers();
|
|
47
|
-
if (data.hasOwnProperty('links')) obj.links = _ApiClient.ApiClient.convertToType(data['links'], Object);
|
|
48
|
-
if (data.hasOwnProperty('providers')) obj.providers = _ApiClient.ApiClient.convertToType(data['providers'], [_Provider.Provider]);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return obj;
|
|
52
|
-
}
|
|
53
|
-
}]);
|
|
54
|
-
|
|
55
|
-
return Providers;
|
|
56
|
-
}();
|
|
57
|
-
/**
|
|
58
|
-
* @member {Object} links
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
exports.Providers = Providers;
|
|
63
|
-
Providers.prototype.links = undefined;
|
|
64
|
-
/**
|
|
65
|
-
* @member {Array.<module:Vantage/model/Provider>} providers
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
Providers.prototype.providers = undefined;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Report = void 0;
|
|
7
|
-
|
|
8
|
-
var _ApiClient = require("../ApiClient");
|
|
9
|
-
|
|
10
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
-
|
|
12
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
-
|
|
14
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The Report model module.
|
|
18
|
-
* @module Vantage/model/Report
|
|
19
|
-
* @version 1.0.0
|
|
20
|
-
*/
|
|
21
|
-
var Report = /*#__PURE__*/function () {
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new <code>Report</code>.
|
|
24
|
-
* Report model
|
|
25
|
-
* @alias module:Vantage/model/Report
|
|
26
|
-
* @class
|
|
27
|
-
*/
|
|
28
|
-
function Report() {
|
|
29
|
-
_classCallCheck(this, Report);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Constructs a <code>Report</code> from a plain JavaScript object, optionally creating a new instance.
|
|
33
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
34
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
35
|
-
* @param {module:Vantage/model/Report} obj Optional instance to populate.
|
|
36
|
-
* @return {module:Vantage/model/Report} The populated <code>Report</code> instance.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_createClass(Report, null, [{
|
|
41
|
-
key: "constructFromObject",
|
|
42
|
-
value: function constructFromObject(data, obj) {
|
|
43
|
-
if (data) {
|
|
44
|
-
obj = obj || new Report();
|
|
45
|
-
if (data.hasOwnProperty('id')) obj.id = _ApiClient.ApiClient.convertToType(data['id'], 'String');
|
|
46
|
-
if (data.hasOwnProperty('title')) obj.title = _ApiClient.ApiClient.convertToType(data['title'], 'String');
|
|
47
|
-
if (data.hasOwnProperty('earliest_cost_date')) obj.earliestCostDate = _ApiClient.ApiClient.convertToType(data['earliest_cost_date'], 'String');
|
|
48
|
-
if (data.hasOwnProperty('latest_cost_date')) obj.latestCostDate = _ApiClient.ApiClient.convertToType(data['latest_cost_date'], 'String');
|
|
49
|
-
if (data.hasOwnProperty('created_at')) obj.createdAt = _ApiClient.ApiClient.convertToType(data['created_at'], 'String');
|
|
50
|
-
if (data.hasOwnProperty('workspace')) obj.workspace = _ApiClient.ApiClient.convertToType(data['workspace'], 'String');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return obj;
|
|
54
|
-
}
|
|
55
|
-
}]);
|
|
56
|
-
|
|
57
|
-
return Report;
|
|
58
|
-
}();
|
|
59
|
-
/**
|
|
60
|
-
* @member {String} id
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
exports.Report = Report;
|
|
65
|
-
Report.prototype.id = undefined;
|
|
66
|
-
/**
|
|
67
|
-
* The title of the cost report.
|
|
68
|
-
* @member {String} title
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
Report.prototype.title = undefined;
|
|
72
|
-
/**
|
|
73
|
-
* The date and time, in UTC, the report was created. ISO 8601 Formatted - 2021-01-01 or 2021-01-01T00:00:00Z.
|
|
74
|
-
* @member {String} earliestCostDate
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
Report.prototype.earliestCostDate = undefined;
|
|
78
|
-
/**
|
|
79
|
-
* The date and time, in UTC, the report was created. ISO 8601 Formatted - 2021-07-31 or 2021-07-31T00:00:00Z.
|
|
80
|
-
* @member {String} latestCostDate
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
Report.prototype.latestCostDate = undefined;
|
|
84
|
-
/**
|
|
85
|
-
* The date and time, in UTC, the report was created. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T00:00:00Z.
|
|
86
|
-
* @member {String} createdAt
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
|
-
Report.prototype.createdAt = undefined;
|
|
90
|
-
/**
|
|
91
|
-
* The name of the workspace the report is a part of.
|
|
92
|
-
* @member {String} workspace
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
Report.prototype.workspace = undefined;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Reports = void 0;
|
|
7
|
-
|
|
8
|
-
var _ApiClient = require("../ApiClient");
|
|
9
|
-
|
|
10
|
-
var _Report = require("./Report");
|
|
11
|
-
|
|
12
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
-
|
|
14
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
15
|
-
|
|
16
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The Reports model module.
|
|
20
|
-
* @module Vantage/model/Reports
|
|
21
|
-
* @version 1.0.0
|
|
22
|
-
*/
|
|
23
|
-
var Reports = /*#__PURE__*/function () {
|
|
24
|
-
/**
|
|
25
|
-
* Constructs a new <code>Reports</code>.
|
|
26
|
-
* Reports model
|
|
27
|
-
* @alias module:Vantage/model/Reports
|
|
28
|
-
* @class
|
|
29
|
-
*/
|
|
30
|
-
function Reports() {
|
|
31
|
-
_classCallCheck(this, Reports);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Constructs a <code>Reports</code> from a plain JavaScript object, optionally creating a new instance.
|
|
35
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
36
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
37
|
-
* @param {module:Vantage/model/Reports} obj Optional instance to populate.
|
|
38
|
-
* @return {module:Vantage/model/Reports} The populated <code>Reports</code> instance.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
_createClass(Reports, null, [{
|
|
43
|
-
key: "constructFromObject",
|
|
44
|
-
value: function constructFromObject(data, obj) {
|
|
45
|
-
if (data) {
|
|
46
|
-
obj = obj || new Reports();
|
|
47
|
-
if (data.hasOwnProperty('links')) obj.links = _ApiClient.ApiClient.convertToType(data['links'], Object);
|
|
48
|
-
if (data.hasOwnProperty('reports')) obj.reports = _ApiClient.ApiClient.convertToType(data['reports'], [_Report.Report]);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return obj;
|
|
52
|
-
}
|
|
53
|
-
}]);
|
|
54
|
-
|
|
55
|
-
return Reports;
|
|
56
|
-
}();
|
|
57
|
-
/**
|
|
58
|
-
* @member {Object} links
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
exports.Reports = Reports;
|
|
63
|
-
Reports.prototype.links = undefined;
|
|
64
|
-
/**
|
|
65
|
-
* @member {Array.<module:Vantage/model/Report>} reports
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
Reports.prototype.reports = undefined;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Service = void 0;
|
|
7
|
-
|
|
8
|
-
var _ApiClient = require("../ApiClient");
|
|
9
|
-
|
|
10
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
-
|
|
12
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
-
|
|
14
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The Service model module.
|
|
18
|
-
* @module Vantage/model/Service
|
|
19
|
-
* @version 1.0.0
|
|
20
|
-
*/
|
|
21
|
-
var Service = /*#__PURE__*/function () {
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new <code>Service</code>.
|
|
24
|
-
* @alias module:Vantage/model/Service
|
|
25
|
-
* @class
|
|
26
|
-
*/
|
|
27
|
-
function Service() {
|
|
28
|
-
_classCallCheck(this, Service);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Constructs a <code>Service</code> from a plain JavaScript object, optionally creating a new instance.
|
|
32
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
33
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
34
|
-
* @param {module:Vantage/model/Service} obj Optional instance to populate.
|
|
35
|
-
* @return {module:Vantage/model/Service} The populated <code>Service</code> instance.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
_createClass(Service, null, [{
|
|
40
|
-
key: "constructFromObject",
|
|
41
|
-
value: function constructFromObject(data, obj) {
|
|
42
|
-
if (data) {
|
|
43
|
-
obj = obj || new Service();
|
|
44
|
-
if (data.hasOwnProperty('id')) obj.id = _ApiClient.ApiClient.convertToType(data['id'], 'String');
|
|
45
|
-
if (data.hasOwnProperty('category')) obj.category = _ApiClient.ApiClient.convertToType(data['category'], 'String');
|
|
46
|
-
if (data.hasOwnProperty('name')) obj.name = _ApiClient.ApiClient.convertToType(data['name'], 'String');
|
|
47
|
-
if (data.hasOwnProperty('description')) obj.description = _ApiClient.ApiClient.convertToType(data['description'], 'String');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return obj;
|
|
51
|
-
}
|
|
52
|
-
}]);
|
|
53
|
-
|
|
54
|
-
return Service;
|
|
55
|
-
}();
|
|
56
|
-
/**
|
|
57
|
-
* @member {String} id
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
exports.Service = Service;
|
|
62
|
-
Service.prototype.id = undefined;
|
|
63
|
-
/**
|
|
64
|
-
* The type of cloud service.
|
|
65
|
-
* @member {String} category
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
Service.prototype.category = undefined;
|
|
69
|
-
/**
|
|
70
|
-
* The common name of the service. Usually an abbreviation.
|
|
71
|
-
* @member {String} name
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
Service.prototype.name = undefined;
|
|
75
|
-
/**
|
|
76
|
-
* The full name of the service.
|
|
77
|
-
* @member {String} description
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
Service.prototype.description = undefined;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Services = void 0;
|
|
7
|
-
|
|
8
|
-
var _ApiClient = require("../ApiClient");
|
|
9
|
-
|
|
10
|
-
var _Service = require("./Service");
|
|
11
|
-
|
|
12
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
-
|
|
14
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
15
|
-
|
|
16
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The Services model module.
|
|
20
|
-
* @module Vantage/model/Services
|
|
21
|
-
* @version 1.0.0
|
|
22
|
-
*/
|
|
23
|
-
var Services = /*#__PURE__*/function () {
|
|
24
|
-
/**
|
|
25
|
-
* Constructs a new <code>Services</code>.
|
|
26
|
-
* Services model
|
|
27
|
-
* @alias module:Vantage/model/Services
|
|
28
|
-
* @class
|
|
29
|
-
*/
|
|
30
|
-
function Services() {
|
|
31
|
-
_classCallCheck(this, Services);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Constructs a <code>Services</code> from a plain JavaScript object, optionally creating a new instance.
|
|
35
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
36
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
37
|
-
* @param {module:Vantage/model/Services} obj Optional instance to populate.
|
|
38
|
-
* @return {module:Vantage/model/Services} The populated <code>Services</code> instance.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
_createClass(Services, null, [{
|
|
43
|
-
key: "constructFromObject",
|
|
44
|
-
value: function constructFromObject(data, obj) {
|
|
45
|
-
if (data) {
|
|
46
|
-
obj = obj || new Services();
|
|
47
|
-
if (data.hasOwnProperty('links')) obj.links = _ApiClient.ApiClient.convertToType(data['links'], Object);
|
|
48
|
-
if (data.hasOwnProperty('services')) obj.services = _ApiClient.ApiClient.convertToType(data['services'], [_Service.Service]);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return obj;
|
|
52
|
-
}
|
|
53
|
-
}]);
|
|
54
|
-
|
|
55
|
-
return Services;
|
|
56
|
-
}();
|
|
57
|
-
/**
|
|
58
|
-
* @member {Object} links
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
exports.Services = Services;
|
|
63
|
-
Services.prototype.links = undefined;
|
|
64
|
-
/**
|
|
65
|
-
* @member {Array.<module:Vantage/model/Service>} services
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
Services.prototype.services = undefined;
|
package/mocha.opts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--timeout 10000
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Vantage
|
|
3
|
-
* Vantage API
|
|
4
|
-
*
|
|
5
|
-
* OpenAPI spec version: 1.0.0
|
|
6
|
-
* Contact: support@vantage.sh
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
-
*
|
|
11
|
-
* Swagger Codegen version: 2.4.21
|
|
12
|
-
*
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
(function(root, factory) {
|
|
18
|
-
if (typeof define === 'function' && define.amd) {
|
|
19
|
-
// AMD.
|
|
20
|
-
define(['expect.js', '../../../src/Vantage/index'], factory);
|
|
21
|
-
} else if (typeof module === 'object' && module.exports) {
|
|
22
|
-
// CommonJS-like environments that support module.exports, like Node.
|
|
23
|
-
factory(require('expect.js'), require('../../../src/Vantage/index'));
|
|
24
|
-
} else {
|
|
25
|
-
// Browser globals (root is window)
|
|
26
|
-
factory(root.expect, root.Vantage);
|
|
27
|
-
}
|
|
28
|
-
}(this, function(expect, Vantage) {
|
|
29
|
-
'use strict';
|
|
30
|
-
|
|
31
|
-
var instance;
|
|
32
|
-
|
|
33
|
-
beforeEach(function() {
|
|
34
|
-
instance = new Vantage.CostsApi();
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
describe('Vantage', function() {
|
|
38
|
-
describe('CostsApi', function() {
|
|
39
|
-
describe('getCosts', function() {
|
|
40
|
-
it('should call getCosts successfully', function(done) {
|
|
41
|
-
// TODO: uncomment, update parameter values for getCosts call and complete the assertions
|
|
42
|
-
/*
|
|
43
|
-
var reportId = "reportId_example";
|
|
44
|
-
var opts = {};
|
|
45
|
-
opts.startDate = "startDate_example";
|
|
46
|
-
opts.endDate = "endDate_example";
|
|
47
|
-
opts.page = 56;
|
|
48
|
-
opts.limit = 56;
|
|
49
|
-
|
|
50
|
-
instance.getCosts(reportId, opts).then(function(data) {
|
|
51
|
-
// TODO: update response assertions
|
|
52
|
-
expect(data).to.be.a(Vantage.Costs);
|
|
53
|
-
expect(data.links).to.be.a(Object);
|
|
54
|
-
// expect(data.links).to.be();
|
|
55
|
-
expect(data.total).to.be.a('string');
|
|
56
|
-
// expect(data.total).to.be("");
|
|
57
|
-
expect(data.currency).to.be.a('string');
|
|
58
|
-
// expect(data.currency).to.be("");
|
|
59
|
-
{
|
|
60
|
-
let dataCtr = data.costs;
|
|
61
|
-
expect(dataCtr).to.be.an(Array);
|
|
62
|
-
expect(dataCtr).to.not.be.empty();
|
|
63
|
-
for (let p in dataCtr) {
|
|
64
|
-
let data = dataCtr[p];
|
|
65
|
-
expect(data).to.be.a(Vantage.Cost);
|
|
66
|
-
expect(data.accruedAt).to.be.a('string');
|
|
67
|
-
// expect(data.accruedAt).to.be("2021-04-01");
|
|
68
|
-
expect(data.amount).to.be.a('string');
|
|
69
|
-
// expect(data.amount).to.be("4.25");
|
|
70
|
-
expect(data.provider).to.be.a('string');
|
|
71
|
-
// expect(data.provider).to.be("AWS");
|
|
72
|
-
expect(data.service).to.be.a('string');
|
|
73
|
-
// expect(data.service).to.be("Amazon Elastic Compute Cloud - Compute");
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
done();
|
|
78
|
-
}, function(error) {
|
|
79
|
-
done(error);
|
|
80
|
-
});
|
|
81
|
-
*/
|
|
82
|
-
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
|
83
|
-
done();
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
describe('getReport', function() {
|
|
87
|
-
it('should call getReport successfully', function(done) {
|
|
88
|
-
// TODO: uncomment, update parameter values for getReport call and complete the assertions
|
|
89
|
-
/*
|
|
90
|
-
var reportId = "reportId_example";
|
|
91
|
-
|
|
92
|
-
instance.getReport(reportId).then(function(data) {
|
|
93
|
-
// TODO: update response assertions
|
|
94
|
-
expect(data).to.be.a(Vantage.Report);
|
|
95
|
-
expect(data.id).to.be.a('string');
|
|
96
|
-
// expect(data.id).to.be("");
|
|
97
|
-
expect(data.title).to.be.a('string');
|
|
98
|
-
// expect(data.title).to.be("Production Environment");
|
|
99
|
-
expect(data.earliestCostDate).to.be.a('string');
|
|
100
|
-
// expect(data.earliestCostDate).to.be("2021-07-09T00:00:00Z");
|
|
101
|
-
expect(data.latestCostDate).to.be.a('string');
|
|
102
|
-
// expect(data.latestCostDate).to.be("2021-07-09T00:00:00Z");
|
|
103
|
-
expect(data.createdAt).to.be.a('string');
|
|
104
|
-
// expect(data.createdAt).to.be("2021-07-09T00:00:00Z");
|
|
105
|
-
expect(data.workspace).to.be.a('string');
|
|
106
|
-
// expect(data.workspace).to.be("");
|
|
107
|
-
|
|
108
|
-
done();
|
|
109
|
-
}, function(error) {
|
|
110
|
-
done(error);
|
|
111
|
-
});
|
|
112
|
-
*/
|
|
113
|
-
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
|
114
|
-
done();
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
describe('getReports', function() {
|
|
118
|
-
it('should call getReports successfully', function(done) {
|
|
119
|
-
// TODO: uncomment, update parameter values for getReports call and complete the assertions
|
|
120
|
-
/*
|
|
121
|
-
var opts = {};
|
|
122
|
-
opts.page = 56;
|
|
123
|
-
opts.limit = 56;
|
|
124
|
-
|
|
125
|
-
instance.getReports(opts).then(function(data) {
|
|
126
|
-
// TODO: update response assertions
|
|
127
|
-
expect(data).to.be.a(Vantage.Reports);
|
|
128
|
-
expect(data.links).to.be.a(Object);
|
|
129
|
-
// expect(data.links).to.be();
|
|
130
|
-
{
|
|
131
|
-
let dataCtr = data.reports;
|
|
132
|
-
expect(dataCtr).to.be.an(Array);
|
|
133
|
-
expect(dataCtr).to.not.be.empty();
|
|
134
|
-
for (let p in dataCtr) {
|
|
135
|
-
let data = dataCtr[p];
|
|
136
|
-
expect(data).to.be.a(Vantage.Report);
|
|
137
|
-
expect(data.id).to.be.a('string');
|
|
138
|
-
// expect(data.id).to.be("");
|
|
139
|
-
expect(data.title).to.be.a('string');
|
|
140
|
-
// expect(data.title).to.be("Production Environment");
|
|
141
|
-
expect(data.earliestCostDate).to.be.a('string');
|
|
142
|
-
// expect(data.earliestCostDate).to.be("2021-07-09T00:00:00Z");
|
|
143
|
-
expect(data.latestCostDate).to.be.a('string');
|
|
144
|
-
// expect(data.latestCostDate).to.be("2021-07-09T00:00:00Z");
|
|
145
|
-
expect(data.createdAt).to.be.a('string');
|
|
146
|
-
// expect(data.createdAt).to.be("2021-07-09T00:00:00Z");
|
|
147
|
-
expect(data.workspace).to.be.a('string');
|
|
148
|
-
// expect(data.workspace).to.be("");
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
done();
|
|
153
|
-
}, function(error) {
|
|
154
|
-
done(error);
|
|
155
|
-
});
|
|
156
|
-
*/
|
|
157
|
-
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
|
158
|
-
done();
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
}));
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Vantage
|
|
3
|
-
* Vantage API
|
|
4
|
-
*
|
|
5
|
-
* OpenAPI spec version: 1.0.0
|
|
6
|
-
* Contact: support@vantage.sh
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
-
*
|
|
11
|
-
* Swagger Codegen version: 2.4.21
|
|
12
|
-
*
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
(function(root, factory) {
|
|
18
|
-
if (typeof define === 'function' && define.amd) {
|
|
19
|
-
// AMD.
|
|
20
|
-
define(['expect.js', '../../../src/Vantage/index'], factory);
|
|
21
|
-
} else if (typeof module === 'object' && module.exports) {
|
|
22
|
-
// CommonJS-like environments that support module.exports, like Node.
|
|
23
|
-
factory(require('expect.js'), require('../../../src/Vantage/index'));
|
|
24
|
-
} else {
|
|
25
|
-
// Browser globals (root is window)
|
|
26
|
-
factory(root.expect, root.Vantage);
|
|
27
|
-
}
|
|
28
|
-
}(this, function(expect, Vantage) {
|
|
29
|
-
'use strict';
|
|
30
|
-
|
|
31
|
-
var instance;
|
|
32
|
-
|
|
33
|
-
beforeEach(function() {
|
|
34
|
-
instance = new Vantage.PingApi();
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
describe('Vantage', function() {
|
|
38
|
-
describe('PingApi', function() {
|
|
39
|
-
describe('ping', function() {
|
|
40
|
-
it('should call ping successfully', function(done) {
|
|
41
|
-
// TODO: uncomment ping call and complete the assertions
|
|
42
|
-
/*
|
|
43
|
-
|
|
44
|
-
instance.ping().then(function(data) {
|
|
45
|
-
// TODO: update response assertions
|
|
46
|
-
expect(data).to.be.a(Object);
|
|
47
|
-
// expect(data).to.be(null);
|
|
48
|
-
|
|
49
|
-
done();
|
|
50
|
-
}, function(error) {
|
|
51
|
-
done(error);
|
|
52
|
-
});
|
|
53
|
-
*/
|
|
54
|
-
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
|
55
|
-
done();
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
}));
|