@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,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CostsApi = void 0;
|
|
7
|
-
|
|
8
|
-
var _ApiClient = require("../ApiClient");
|
|
9
|
-
|
|
10
|
-
var _Costs = require("../model/Costs");
|
|
11
|
-
|
|
12
|
-
var _Report = require("../model/Report");
|
|
13
|
-
|
|
14
|
-
var _Reports = require("../model/Reports");
|
|
15
|
-
|
|
16
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
-
|
|
18
|
-
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); } }
|
|
19
|
-
|
|
20
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Costs service.
|
|
24
|
-
* @module Vantage/Vantage/CostsApi
|
|
25
|
-
* @version 1.0.0
|
|
26
|
-
*/
|
|
27
|
-
var CostsApi = /*#__PURE__*/function () {
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a new CostsApi.
|
|
30
|
-
* @alias module:Vantage/Vantage/CostsApi
|
|
31
|
-
* @class
|
|
32
|
-
* @param {module:Vantage/ApiClient} [apiClient] Optional API client implementation to use,
|
|
33
|
-
* default to {@link module:Vantage/ApiClient#instance} if unspecified.
|
|
34
|
-
*/
|
|
35
|
-
function CostsApi(apiClient) {
|
|
36
|
-
_classCallCheck(this, CostsApi);
|
|
37
|
-
|
|
38
|
-
this.apiClient = apiClient || _ApiClient.ApiClient.instance;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Return available Costs for the specified Cost Report and optional time period. If no time period is specified it will return all available costs for the report.
|
|
42
|
-
* @param {String} reportId
|
|
43
|
-
* @param {Object} opts Optional parameters
|
|
44
|
-
* @param {String} opts.startDate Query costs by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
|
|
45
|
-
* @param {String} opts.endDate Query costs by the last date you would like to filter to. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
|
|
46
|
-
* @param {Number} opts.page The page of results to return.
|
|
47
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
48
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Costs} and HTTP response
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
_createClass(CostsApi, [{
|
|
53
|
-
key: "getCostsWithHttpInfo",
|
|
54
|
-
value: function getCostsWithHttpInfo(reportId, opts) {
|
|
55
|
-
opts = opts || {};
|
|
56
|
-
var postBody = null; // verify the required parameter 'reportId' is set
|
|
57
|
-
|
|
58
|
-
if (reportId === undefined || reportId === null) {
|
|
59
|
-
throw new Error("Missing the required parameter 'reportId' when calling getCosts");
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
var pathParams = {
|
|
63
|
-
'report_id': reportId
|
|
64
|
-
};
|
|
65
|
-
var queryParams = {
|
|
66
|
-
'start_date': opts['startDate'],
|
|
67
|
-
'end_date': opts['endDate'],
|
|
68
|
-
'page': opts['page'],
|
|
69
|
-
'limit': opts['limit']
|
|
70
|
-
};
|
|
71
|
-
var headerParams = {};
|
|
72
|
-
var formParams = {};
|
|
73
|
-
var authNames = ['oauth2'];
|
|
74
|
-
var contentTypes = [];
|
|
75
|
-
var accepts = ['application/json'];
|
|
76
|
-
var returnType = _Costs.Costs;
|
|
77
|
-
return this.apiClient.callApi('/v1/reports/{report_id}/costs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Return available Costs for the specified Cost Report and optional time period. If no time period is specified it will return all available costs for the report.
|
|
81
|
-
* @param {String} reportId
|
|
82
|
-
* @param {Object} opts Optional parameters
|
|
83
|
-
* @param {String} opts.startDate Query costs by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
|
|
84
|
-
* @param {String} opts.endDate Query costs by the last date you would like to filter to. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
|
|
85
|
-
* @param {Number} opts.page The page of results to return.
|
|
86
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
87
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Costs}
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
}, {
|
|
91
|
-
key: "getCosts",
|
|
92
|
-
value: function getCosts(reportId, opts) {
|
|
93
|
-
return this.getCostsWithHttpInfo(reportId, opts).then(function (response_and_data) {
|
|
94
|
-
return response_and_data.data;
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Return a Cost Report.
|
|
99
|
-
* @param {String} reportId
|
|
100
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Report} and HTTP response
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
}, {
|
|
104
|
-
key: "getReportWithHttpInfo",
|
|
105
|
-
value: function getReportWithHttpInfo(reportId) {
|
|
106
|
-
var postBody = null; // verify the required parameter 'reportId' is set
|
|
107
|
-
|
|
108
|
-
if (reportId === undefined || reportId === null) {
|
|
109
|
-
throw new Error("Missing the required parameter 'reportId' when calling getReport");
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
var pathParams = {
|
|
113
|
-
'report_id': reportId
|
|
114
|
-
};
|
|
115
|
-
var queryParams = {};
|
|
116
|
-
var headerParams = {};
|
|
117
|
-
var formParams = {};
|
|
118
|
-
var authNames = ['oauth2'];
|
|
119
|
-
var contentTypes = [];
|
|
120
|
-
var accepts = ['application/json'];
|
|
121
|
-
var returnType = _Report.Report;
|
|
122
|
-
return this.apiClient.callApi('/v1/reports/{report_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Return a Cost Report.
|
|
126
|
-
* @param {String} reportId
|
|
127
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Report}
|
|
128
|
-
*/
|
|
129
|
-
|
|
130
|
-
}, {
|
|
131
|
-
key: "getReport",
|
|
132
|
-
value: function getReport(reportId) {
|
|
133
|
-
return this.getReportWithHttpInfo(reportId).then(function (response_and_data) {
|
|
134
|
-
return response_and_data.data;
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Return all Cost Reports.
|
|
139
|
-
* @param {Object} opts Optional parameters
|
|
140
|
-
* @param {Number} opts.page The page of results to return.
|
|
141
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
142
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Reports} and HTTP response
|
|
143
|
-
*/
|
|
144
|
-
|
|
145
|
-
}, {
|
|
146
|
-
key: "getReportsWithHttpInfo",
|
|
147
|
-
value: function getReportsWithHttpInfo(opts) {
|
|
148
|
-
opts = opts || {};
|
|
149
|
-
var postBody = null;
|
|
150
|
-
var pathParams = {};
|
|
151
|
-
var queryParams = {
|
|
152
|
-
'page': opts['page'],
|
|
153
|
-
'limit': opts['limit']
|
|
154
|
-
};
|
|
155
|
-
var headerParams = {};
|
|
156
|
-
var formParams = {};
|
|
157
|
-
var authNames = ['oauth2'];
|
|
158
|
-
var contentTypes = [];
|
|
159
|
-
var accepts = ['application/json'];
|
|
160
|
-
var returnType = _Reports.Reports;
|
|
161
|
-
return this.apiClient.callApi('/v1/reports', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Return all Cost Reports.
|
|
165
|
-
* @param {Object} opts Optional parameters
|
|
166
|
-
* @param {Number} opts.page The page of results to return.
|
|
167
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
168
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Reports}
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
|
-
}, {
|
|
172
|
-
key: "getReports",
|
|
173
|
-
value: function getReports(opts) {
|
|
174
|
-
return this.getReportsWithHttpInfo(opts).then(function (response_and_data) {
|
|
175
|
-
return response_and_data.data;
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
}]);
|
|
179
|
-
|
|
180
|
-
return CostsApi;
|
|
181
|
-
}();
|
|
182
|
-
|
|
183
|
-
exports.CostsApi = CostsApi;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PingApi = 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
|
-
* Ping service.
|
|
18
|
-
* @module Vantage/Vantage/PingApi
|
|
19
|
-
* @version 1.0.0
|
|
20
|
-
*/
|
|
21
|
-
var PingApi = /*#__PURE__*/function () {
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new PingApi.
|
|
24
|
-
* @alias module:Vantage/Vantage/PingApi
|
|
25
|
-
* @class
|
|
26
|
-
* @param {module:Vantage/ApiClient} [apiClient] Optional API client implementation to use,
|
|
27
|
-
* default to {@link module:Vantage/ApiClient#instance} if unspecified.
|
|
28
|
-
*/
|
|
29
|
-
function PingApi(apiClient) {
|
|
30
|
-
_classCallCheck(this, PingApi);
|
|
31
|
-
|
|
32
|
-
this.apiClient = apiClient || _ApiClient.ApiClient.instance;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* This is a health check endpoint that can be used to determine Vantage API healthiness. It will return 200 if everything is running smoothly.
|
|
36
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_createClass(PingApi, [{
|
|
41
|
-
key: "pingWithHttpInfo",
|
|
42
|
-
value: function pingWithHttpInfo() {
|
|
43
|
-
var postBody = null;
|
|
44
|
-
var pathParams = {};
|
|
45
|
-
var queryParams = {};
|
|
46
|
-
var headerParams = {};
|
|
47
|
-
var formParams = {};
|
|
48
|
-
var authNames = ['oauth2'];
|
|
49
|
-
var contentTypes = [];
|
|
50
|
-
var accepts = ['application/json'];
|
|
51
|
-
var returnType = Object;
|
|
52
|
-
return this.apiClient.callApi('/v1/ping', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* This is a health check endpoint that can be used to determine Vantage API healthiness. It will return 200 if everything is running smoothly.
|
|
56
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
}, {
|
|
60
|
-
key: "ping",
|
|
61
|
-
value: function ping() {
|
|
62
|
-
return this.pingWithHttpInfo().then(function (response_and_data) {
|
|
63
|
-
return response_and_data.data;
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}]);
|
|
67
|
-
|
|
68
|
-
return PingApi;
|
|
69
|
-
}();
|
|
70
|
-
|
|
71
|
-
exports.PingApi = PingApi;
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PricesApi = void 0;
|
|
7
|
-
|
|
8
|
-
var _ApiClient = require("../ApiClient");
|
|
9
|
-
|
|
10
|
-
var _Price = require("../model/Price");
|
|
11
|
-
|
|
12
|
-
var _Prices = require("../model/Prices");
|
|
13
|
-
|
|
14
|
-
var _Product = require("../model/Product");
|
|
15
|
-
|
|
16
|
-
var _Products = require("../model/Products");
|
|
17
|
-
|
|
18
|
-
var _Providers = require("../model/Providers");
|
|
19
|
-
|
|
20
|
-
var _Services = require("../model/Services");
|
|
21
|
-
|
|
22
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
-
|
|
24
|
-
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); } }
|
|
25
|
-
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Prices service.
|
|
30
|
-
* @module Vantage/Vantage/PricesApi
|
|
31
|
-
* @version 1.0.0
|
|
32
|
-
*/
|
|
33
|
-
var PricesApi = /*#__PURE__*/function () {
|
|
34
|
-
/**
|
|
35
|
-
* Constructs a new PricesApi.
|
|
36
|
-
* @alias module:Vantage/Vantage/PricesApi
|
|
37
|
-
* @class
|
|
38
|
-
* @param {module:Vantage/ApiClient} [apiClient] Optional API client implementation to use,
|
|
39
|
-
* default to {@link module:Vantage/ApiClient#instance} if unspecified.
|
|
40
|
-
*/
|
|
41
|
-
function PricesApi(apiClient) {
|
|
42
|
-
_classCallCheck(this, PricesApi);
|
|
43
|
-
|
|
44
|
-
this.apiClient = apiClient || _ApiClient.ApiClient.instance;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Returns a price
|
|
48
|
-
* @param {String} productId
|
|
49
|
-
* @param {String} id
|
|
50
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Price} and HTTP response
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_createClass(PricesApi, [{
|
|
55
|
-
key: "getPriceWithHttpInfo",
|
|
56
|
-
value: function getPriceWithHttpInfo(productId, id) {
|
|
57
|
-
var postBody = null; // verify the required parameter 'productId' is set
|
|
58
|
-
|
|
59
|
-
if (productId === undefined || productId === null) {
|
|
60
|
-
throw new Error("Missing the required parameter 'productId' when calling getPrice");
|
|
61
|
-
} // verify the required parameter 'id' is set
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (id === undefined || id === null) {
|
|
65
|
-
throw new Error("Missing the required parameter 'id' when calling getPrice");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var pathParams = {
|
|
69
|
-
'product_id': productId,
|
|
70
|
-
'id': id
|
|
71
|
-
};
|
|
72
|
-
var queryParams = {};
|
|
73
|
-
var headerParams = {};
|
|
74
|
-
var formParams = {};
|
|
75
|
-
var authNames = ['oauth2'];
|
|
76
|
-
var contentTypes = [];
|
|
77
|
-
var accepts = ['application/json'];
|
|
78
|
-
var returnType = _Price.Price;
|
|
79
|
-
return this.apiClient.callApi('/v1/products/{product_id}/prices/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Returns a price
|
|
83
|
-
* @param {String} productId
|
|
84
|
-
* @param {String} id
|
|
85
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Price}
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
}, {
|
|
89
|
-
key: "getPrice",
|
|
90
|
-
value: function getPrice(productId, id) {
|
|
91
|
-
return this.getPriceWithHttpInfo(productId, id).then(function (response_and_data) {
|
|
92
|
-
return response_and_data.data;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Return available Prices across all Regions for a Product.
|
|
97
|
-
* @param {String} productId
|
|
98
|
-
* @param {Object} opts Optional parameters
|
|
99
|
-
* @param {Number} opts.page The page of results to return.
|
|
100
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
101
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Prices} and HTTP response
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
}, {
|
|
105
|
-
key: "getPricesWithHttpInfo",
|
|
106
|
-
value: function getPricesWithHttpInfo(productId, opts) {
|
|
107
|
-
opts = opts || {};
|
|
108
|
-
var postBody = null; // verify the required parameter 'productId' is set
|
|
109
|
-
|
|
110
|
-
if (productId === undefined || productId === null) {
|
|
111
|
-
throw new Error("Missing the required parameter 'productId' when calling getPrices");
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var pathParams = {
|
|
115
|
-
'product_id': productId
|
|
116
|
-
};
|
|
117
|
-
var queryParams = {
|
|
118
|
-
'page': opts['page'],
|
|
119
|
-
'limit': opts['limit']
|
|
120
|
-
};
|
|
121
|
-
var headerParams = {};
|
|
122
|
-
var formParams = {};
|
|
123
|
-
var authNames = ['oauth2'];
|
|
124
|
-
var contentTypes = [];
|
|
125
|
-
var accepts = ['application/json'];
|
|
126
|
-
var returnType = _Prices.Prices;
|
|
127
|
-
return this.apiClient.callApi('/v1/products/{product_id}/prices', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Return available Prices across all Regions for a Product.
|
|
131
|
-
* @param {String} productId
|
|
132
|
-
* @param {Object} opts Optional parameters
|
|
133
|
-
* @param {Number} opts.page The page of results to return.
|
|
134
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
135
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Prices}
|
|
136
|
-
*/
|
|
137
|
-
|
|
138
|
-
}, {
|
|
139
|
-
key: "getPrices",
|
|
140
|
-
value: function getPrices(productId, opts) {
|
|
141
|
-
return this.getPricesWithHttpInfo(productId, opts).then(function (response_and_data) {
|
|
142
|
-
return response_and_data.data;
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Return a product
|
|
147
|
-
* @param {String} id
|
|
148
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Product} and HTTP response
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
}, {
|
|
152
|
-
key: "getProductWithHttpInfo",
|
|
153
|
-
value: function getProductWithHttpInfo(id) {
|
|
154
|
-
var postBody = null; // verify the required parameter 'id' is set
|
|
155
|
-
|
|
156
|
-
if (id === undefined || id === null) {
|
|
157
|
-
throw new Error("Missing the required parameter 'id' when calling getProduct");
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
var pathParams = {
|
|
161
|
-
'id': id
|
|
162
|
-
};
|
|
163
|
-
var queryParams = {};
|
|
164
|
-
var headerParams = {};
|
|
165
|
-
var formParams = {};
|
|
166
|
-
var authNames = ['oauth2'];
|
|
167
|
-
var contentTypes = [];
|
|
168
|
-
var accepts = ['application/json'];
|
|
169
|
-
var returnType = _Product.Product;
|
|
170
|
-
return this.apiClient.callApi('/v1/products/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Return a product
|
|
174
|
-
* @param {String} id
|
|
175
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Product}
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
|
-
}, {
|
|
179
|
-
key: "getProduct",
|
|
180
|
-
value: function getProduct(id) {
|
|
181
|
-
return this.getProductWithHttpInfo(id).then(function (response_and_data) {
|
|
182
|
-
return response_and_data.data;
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Return available Products for a Service. For example, with a Provider of AWS and a Service of EC2, Products will be a list of all EC2 Instances. By default, this endpoint returns all Products across all Services and Providers but has optional query parameters for filtering listed below.
|
|
187
|
-
* @param {Object} opts Optional parameters
|
|
188
|
-
* @param {String} opts.providerId Query by Provider to list all Products across all Services for a Provider. e.g. aws
|
|
189
|
-
* @param {String} opts.serviceId Query by Service to list all Products for a specific provider service. e.g. aws-ec2
|
|
190
|
-
* @param {String} opts.name Query by name of the Product to see a list of products which match that name. e.g. m5a.16xlarge
|
|
191
|
-
* @param {Number} opts.page The page of results to return.
|
|
192
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
193
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Products} and HTTP response
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
}, {
|
|
197
|
-
key: "getProductsWithHttpInfo",
|
|
198
|
-
value: function getProductsWithHttpInfo(opts) {
|
|
199
|
-
opts = opts || {};
|
|
200
|
-
var postBody = null;
|
|
201
|
-
var pathParams = {};
|
|
202
|
-
var queryParams = {
|
|
203
|
-
'provider_id': opts['providerId'],
|
|
204
|
-
'service_id': opts['serviceId'],
|
|
205
|
-
'name': opts['name'],
|
|
206
|
-
'page': opts['page'],
|
|
207
|
-
'limit': opts['limit']
|
|
208
|
-
};
|
|
209
|
-
var headerParams = {};
|
|
210
|
-
var formParams = {};
|
|
211
|
-
var authNames = ['oauth2'];
|
|
212
|
-
var contentTypes = [];
|
|
213
|
-
var accepts = ['application/json'];
|
|
214
|
-
var returnType = _Products.Products;
|
|
215
|
-
return this.apiClient.callApi('/v1/products', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Return available Products for a Service. For example, with a Provider of AWS and a Service of EC2, Products will be a list of all EC2 Instances. By default, this endpoint returns all Products across all Services and Providers but has optional query parameters for filtering listed below.
|
|
219
|
-
* @param {Object} opts Optional parameters
|
|
220
|
-
* @param {String} opts.providerId Query by Provider to list all Products across all Services for a Provider. e.g. aws
|
|
221
|
-
* @param {String} opts.serviceId Query by Service to list all Products for a specific provider service. e.g. aws-ec2
|
|
222
|
-
* @param {String} opts.name Query by name of the Product to see a list of products which match that name. e.g. m5a.16xlarge
|
|
223
|
-
* @param {Number} opts.page The page of results to return.
|
|
224
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
225
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Products}
|
|
226
|
-
*/
|
|
227
|
-
|
|
228
|
-
}, {
|
|
229
|
-
key: "getProducts",
|
|
230
|
-
value: function getProducts(opts) {
|
|
231
|
-
return this.getProductsWithHttpInfo(opts).then(function (response_and_data) {
|
|
232
|
-
return response_and_data.data;
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Providers are cloud infrastructure and service providers from which all cloud prices are derived. You can think of example Providers as being AWS, GCP, Cloudflare or Datadog. Currently, Vantage only supports a single provider of AWS but over time more will be added. Use this endpoint to retrieve a provider id for other API calls.
|
|
237
|
-
* @param {Object} opts Optional parameters
|
|
238
|
-
* @param {Number} opts.page The page of results to return.
|
|
239
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
240
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Providers} and HTTP response
|
|
241
|
-
*/
|
|
242
|
-
|
|
243
|
-
}, {
|
|
244
|
-
key: "getProvidersWithHttpInfo",
|
|
245
|
-
value: function getProvidersWithHttpInfo(opts) {
|
|
246
|
-
opts = opts || {};
|
|
247
|
-
var postBody = null;
|
|
248
|
-
var pathParams = {};
|
|
249
|
-
var queryParams = {
|
|
250
|
-
'page': opts['page'],
|
|
251
|
-
'limit': opts['limit']
|
|
252
|
-
};
|
|
253
|
-
var headerParams = {};
|
|
254
|
-
var formParams = {};
|
|
255
|
-
var authNames = ['oauth2'];
|
|
256
|
-
var contentTypes = [];
|
|
257
|
-
var accepts = ['application/json'];
|
|
258
|
-
var returnType = _Providers.Providers;
|
|
259
|
-
return this.apiClient.callApi('/v1/providers', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Providers are cloud infrastructure and service providers from which all cloud prices are derived. You can think of example Providers as being AWS, GCP, Cloudflare or Datadog. Currently, Vantage only supports a single provider of AWS but over time more will be added. Use this endpoint to retrieve a provider id for other API calls.
|
|
263
|
-
* @param {Object} opts Optional parameters
|
|
264
|
-
* @param {Number} opts.page The page of results to return.
|
|
265
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
266
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Providers}
|
|
267
|
-
*/
|
|
268
|
-
|
|
269
|
-
}, {
|
|
270
|
-
key: "getProviders",
|
|
271
|
-
value: function getProviders(opts) {
|
|
272
|
-
return this.getProvidersWithHttpInfo(opts).then(function (response_and_data) {
|
|
273
|
-
return response_and_data.data;
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Return all Services. Examples of Services are EC2 for AWS. This endpoint will return all Services by default but you have the ability to filter Services by Provider using the optional query parameter documented below.
|
|
278
|
-
* @param {Object} opts Optional parameters
|
|
279
|
-
* @param {String} opts.providerId Query services for a specific provider. e.g. aws
|
|
280
|
-
* @param {Number} opts.page The page of results to return.
|
|
281
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
282
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Vantage/model/Services} and HTTP response
|
|
283
|
-
*/
|
|
284
|
-
|
|
285
|
-
}, {
|
|
286
|
-
key: "getServicesWithHttpInfo",
|
|
287
|
-
value: function getServicesWithHttpInfo(opts) {
|
|
288
|
-
opts = opts || {};
|
|
289
|
-
var postBody = null;
|
|
290
|
-
var pathParams = {};
|
|
291
|
-
var queryParams = {
|
|
292
|
-
'provider_id': opts['providerId'],
|
|
293
|
-
'page': opts['page'],
|
|
294
|
-
'limit': opts['limit']
|
|
295
|
-
};
|
|
296
|
-
var headerParams = {};
|
|
297
|
-
var formParams = {};
|
|
298
|
-
var authNames = ['oauth2'];
|
|
299
|
-
var contentTypes = [];
|
|
300
|
-
var accepts = ['application/json'];
|
|
301
|
-
var returnType = _Services.Services;
|
|
302
|
-
return this.apiClient.callApi('/v1/services', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Return all Services. Examples of Services are EC2 for AWS. This endpoint will return all Services by default but you have the ability to filter Services by Provider using the optional query parameter documented below.
|
|
306
|
-
* @param {Object} opts Optional parameters
|
|
307
|
-
* @param {String} opts.providerId Query services for a specific provider. e.g. aws
|
|
308
|
-
* @param {Number} opts.page The page of results to return.
|
|
309
|
-
* @param {Number} opts.limit The amount of results to return. The maximum is 1000
|
|
310
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Vantage/model/Services}
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
|
-
}, {
|
|
314
|
-
key: "getServices",
|
|
315
|
-
value: function getServices(opts) {
|
|
316
|
-
return this.getServicesWithHttpInfo(opts).then(function (response_and_data) {
|
|
317
|
-
return response_and_data.data;
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
}]);
|
|
321
|
-
|
|
322
|
-
return PricesApi;
|
|
323
|
-
}();
|
|
324
|
-
|
|
325
|
-
exports.PricesApi = PricesApi;
|