@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.
Files changed (62) hide show
  1. package/README.md +201 -80
  2. package/dist/index.d.mts +20895 -0
  3. package/dist/index.d.ts +20895 -0
  4. package/dist/index.js +2 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +2 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +38 -43
  9. package/.swagger-codegen/VERSION +0 -1
  10. package/.swagger-codegen-ignore +0 -23
  11. package/.travis.yml +0 -4
  12. package/babel.config.json +0 -10
  13. package/docs/Cost.md +0 -11
  14. package/docs/Costs.md +0 -11
  15. package/docs/CostsApi.md +0 -168
  16. package/docs/PingApi.md +0 -51
  17. package/docs/Price.md +0 -14
  18. package/docs/Prices.md +0 -9
  19. package/docs/PricesApi.md +0 -328
  20. package/docs/Product.md +0 -13
  21. package/docs/Products.md +0 -9
  22. package/docs/Provider.md +0 -10
  23. package/docs/Providers.md +0 -9
  24. package/docs/Report.md +0 -13
  25. package/docs/Reports.md +0 -9
  26. package/docs/Service.md +0 -11
  27. package/docs/Services.md +0 -9
  28. package/lib/Vantage/ApiClient.js +0 -645
  29. package/lib/Vantage/Vantage/CostsApi.js +0 -183
  30. package/lib/Vantage/Vantage/PingApi.js +0 -71
  31. package/lib/Vantage/Vantage/PricesApi.js +0 -325
  32. package/lib/Vantage/index.js +0 -133
  33. package/lib/Vantage/model/Cost.js +0 -81
  34. package/lib/Vantage/model/Costs.js +0 -82
  35. package/lib/Vantage/model/Price.js +0 -102
  36. package/lib/Vantage/model/Prices.js +0 -68
  37. package/lib/Vantage/model/Product.js +0 -95
  38. package/lib/Vantage/model/Products.js +0 -68
  39. package/lib/Vantage/model/Provider.js +0 -73
  40. package/lib/Vantage/model/Providers.js +0 -68
  41. package/lib/Vantage/model/Report.js +0 -95
  42. package/lib/Vantage/model/Reports.js +0 -68
  43. package/lib/Vantage/model/Service.js +0 -80
  44. package/lib/Vantage/model/Services.js +0 -68
  45. package/mocha.opts +0 -1
  46. package/test/Vantage/Vantage/CostsApi.spec.js +0 -164
  47. package/test/Vantage/Vantage/PingApi.spec.js +0 -61
  48. package/test/Vantage/Vantage/PricesApi.spec.js +0 -280
  49. package/test/Vantage/model/Cost.spec.js +0 -71
  50. package/test/Vantage/model/Costs.spec.js +0 -71
  51. package/test/Vantage/model/Price.spec.js +0 -89
  52. package/test/Vantage/model/Prices.spec.js +0 -59
  53. package/test/Vantage/model/Product.spec.js +0 -83
  54. package/test/Vantage/model/Products.spec.js +0 -59
  55. package/test/Vantage/model/Provider.spec.js +0 -65
  56. package/test/Vantage/model/Providers.spec.js +0 -59
  57. package/test/Vantage/model/Report.spec.js +0 -83
  58. package/test/Vantage/model/Reports.spec.js +0 -59
  59. package/test/Vantage/model/Service.spec.js +0 -71
  60. package/test/Vantage/model/Services.spec.js +0 -59
  61. package/test/assert-equals.js +0 -81
  62. package/vantage-sh-vantage-client-0.1.0-beta7.tgz +0 -0
@@ -1,59 +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
- describe('Vantage', function() {
34
- describe('Products', function() {
35
- beforeEach(function() {
36
- instance = new Vantage.Products();
37
- });
38
-
39
- it('should create an instance of Products', function() {
40
- // TODO: update the code to test Products
41
- expect(instance).to.be.a(Vantage.Products);
42
- });
43
-
44
- it('should have the property links (base name: "links")', function() {
45
- // TODO: update the code to test the property links
46
- expect(instance).to.have.property('links');
47
- // expect(instance.links).to.be(expectedValueLiteral);
48
- });
49
-
50
- it('should have the property products (base name: "products")', function() {
51
- // TODO: update the code to test the property products
52
- expect(instance).to.have.property('products');
53
- // expect(instance.products).to.be(expectedValueLiteral);
54
- });
55
-
56
- });
57
- });
58
-
59
- }));
@@ -1,65 +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
- describe('Vantage', function() {
34
- describe('Provider', function() {
35
- beforeEach(function() {
36
- instance = new Vantage.Provider();
37
- });
38
-
39
- it('should create an instance of Provider', function() {
40
- // TODO: update the code to test Provider
41
- expect(instance).to.be.a(Vantage.Provider);
42
- });
43
-
44
- it('should have the property id (base name: "id")', function() {
45
- // TODO: update the code to test the property id
46
- expect(instance).to.have.property('id');
47
- // expect(instance.id).to.be(expectedValueLiteral);
48
- });
49
-
50
- it('should have the property name (base name: "name")', function() {
51
- // TODO: update the code to test the property name
52
- expect(instance).to.have.property('name');
53
- // expect(instance.name).to.be(expectedValueLiteral);
54
- });
55
-
56
- it('should have the property description (base name: "description")', function() {
57
- // TODO: update the code to test the property description
58
- expect(instance).to.have.property('description');
59
- // expect(instance.description).to.be(expectedValueLiteral);
60
- });
61
-
62
- });
63
- });
64
-
65
- }));
@@ -1,59 +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
- describe('Vantage', function() {
34
- describe('Providers', function() {
35
- beforeEach(function() {
36
- instance = new Vantage.Providers();
37
- });
38
-
39
- it('should create an instance of Providers', function() {
40
- // TODO: update the code to test Providers
41
- expect(instance).to.be.a(Vantage.Providers);
42
- });
43
-
44
- it('should have the property links (base name: "links")', function() {
45
- // TODO: update the code to test the property links
46
- expect(instance).to.have.property('links');
47
- // expect(instance.links).to.be(expectedValueLiteral);
48
- });
49
-
50
- it('should have the property providers (base name: "providers")', function() {
51
- // TODO: update the code to test the property providers
52
- expect(instance).to.have.property('providers');
53
- // expect(instance.providers).to.be(expectedValueLiteral);
54
- });
55
-
56
- });
57
- });
58
-
59
- }));
@@ -1,83 +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
- describe('Vantage', function() {
34
- describe('Report', function() {
35
- beforeEach(function() {
36
- instance = new Vantage.Report();
37
- });
38
-
39
- it('should create an instance of Report', function() {
40
- // TODO: update the code to test Report
41
- expect(instance).to.be.a(Vantage.Report);
42
- });
43
-
44
- it('should have the property id (base name: "id")', function() {
45
- // TODO: update the code to test the property id
46
- expect(instance).to.have.property('id');
47
- // expect(instance.id).to.be(expectedValueLiteral);
48
- });
49
-
50
- it('should have the property title (base name: "title")', function() {
51
- // TODO: update the code to test the property title
52
- expect(instance).to.have.property('title');
53
- // expect(instance.title).to.be(expectedValueLiteral);
54
- });
55
-
56
- it('should have the property earliestCostDate (base name: "earliest_cost_date")', function() {
57
- // TODO: update the code to test the property earliestCostDate
58
- expect(instance).to.have.property('earliestCostDate');
59
- // expect(instance.earliestCostDate).to.be(expectedValueLiteral);
60
- });
61
-
62
- it('should have the property latestCostDate (base name: "latest_cost_date")', function() {
63
- // TODO: update the code to test the property latestCostDate
64
- expect(instance).to.have.property('latestCostDate');
65
- // expect(instance.latestCostDate).to.be(expectedValueLiteral);
66
- });
67
-
68
- it('should have the property createdAt (base name: "created_at")', function() {
69
- // TODO: update the code to test the property createdAt
70
- expect(instance).to.have.property('createdAt');
71
- // expect(instance.createdAt).to.be(expectedValueLiteral);
72
- });
73
-
74
- it('should have the property workspace (base name: "workspace")', function() {
75
- // TODO: update the code to test the property workspace
76
- expect(instance).to.have.property('workspace');
77
- // expect(instance.workspace).to.be(expectedValueLiteral);
78
- });
79
-
80
- });
81
- });
82
-
83
- }));
@@ -1,59 +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
- describe('Vantage', function() {
34
- describe('Reports', function() {
35
- beforeEach(function() {
36
- instance = new Vantage.Reports();
37
- });
38
-
39
- it('should create an instance of Reports', function() {
40
- // TODO: update the code to test Reports
41
- expect(instance).to.be.a(Vantage.Reports);
42
- });
43
-
44
- it('should have the property links (base name: "links")', function() {
45
- // TODO: update the code to test the property links
46
- expect(instance).to.have.property('links');
47
- // expect(instance.links).to.be(expectedValueLiteral);
48
- });
49
-
50
- it('should have the property reports (base name: "reports")', function() {
51
- // TODO: update the code to test the property reports
52
- expect(instance).to.have.property('reports');
53
- // expect(instance.reports).to.be(expectedValueLiteral);
54
- });
55
-
56
- });
57
- });
58
-
59
- }));
@@ -1,71 +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
- describe('Vantage', function() {
34
- describe('Service', function() {
35
- beforeEach(function() {
36
- instance = new Vantage.Service();
37
- });
38
-
39
- it('should create an instance of Service', function() {
40
- // TODO: update the code to test Service
41
- expect(instance).to.be.a(Vantage.Service);
42
- });
43
-
44
- it('should have the property id (base name: "id")', function() {
45
- // TODO: update the code to test the property id
46
- expect(instance).to.have.property('id');
47
- // expect(instance.id).to.be(expectedValueLiteral);
48
- });
49
-
50
- it('should have the property category (base name: "category")', function() {
51
- // TODO: update the code to test the property category
52
- expect(instance).to.have.property('category');
53
- // expect(instance.category).to.be(expectedValueLiteral);
54
- });
55
-
56
- it('should have the property name (base name: "name")', function() {
57
- // TODO: update the code to test the property name
58
- expect(instance).to.have.property('name');
59
- // expect(instance.name).to.be(expectedValueLiteral);
60
- });
61
-
62
- it('should have the property description (base name: "description")', function() {
63
- // TODO: update the code to test the property description
64
- expect(instance).to.have.property('description');
65
- // expect(instance.description).to.be(expectedValueLiteral);
66
- });
67
-
68
- });
69
- });
70
-
71
- }));
@@ -1,59 +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
- describe('Vantage', function() {
34
- describe('Services', function() {
35
- beforeEach(function() {
36
- instance = new Vantage.Services();
37
- });
38
-
39
- it('should create an instance of Services', function() {
40
- // TODO: update the code to test Services
41
- expect(instance).to.be.a(Vantage.Services);
42
- });
43
-
44
- it('should have the property links (base name: "links")', function() {
45
- // TODO: update the code to test the property links
46
- expect(instance).to.have.property('links');
47
- // expect(instance.links).to.be(expectedValueLiteral);
48
- });
49
-
50
- it('should have the property services (base name: "services")', function() {
51
- // TODO: update the code to test the property services
52
- expect(instance).to.have.property('services');
53
- // expect(instance.services).to.be(expectedValueLiteral);
54
- });
55
-
56
- });
57
- });
58
-
59
- }));
@@ -1,81 +0,0 @@
1
- (function(root, factory) {
2
- if (typeof define === 'function' && define.amd) {
3
- // AMD.
4
- define(factory);
5
- } else if (typeof module === 'object' && module.exports) {
6
- // CommonJS-like environments that support module.exports, like Node.
7
- module.exports = factory();
8
- } else {
9
- // Browser globals (root is window)
10
- root.assertEquals = factory();
11
- }
12
- }(this, function() {
13
- 'use strict';
14
-
15
- var assertEquals = function(expected, actual, ptr) {
16
- if (!ptr)
17
- ptr = "";
18
- if (actual === expected)
19
- return;
20
- if (expected instanceof Date || actual instanceof Date) {
21
- expected = toISODateString(expected);
22
- actual = toISODateString(actual);
23
- if (actual !== expected)
24
- fail(expected, actual, ptr, "date value incorrect;");
25
- }
26
- if (!expected || !actual || typeof expected != 'object' && typeof actual != 'object') {
27
- if (typeof actual != typeof expected)
28
- fail(typeof expected, typeof actual, ptr, "value type incorrect;");
29
- if (actual != expected)
30
- fail(expected, actual, ptr, "value incorrect;");
31
- }
32
- return checkObject(expected, actual, ptr);
33
- }
34
-
35
- function toISODateString(value) {
36
- if (value instanceof Date) {
37
- // JavaScript's ISO string contains a milliseconds component that must be stripped out.
38
- value = value.toISOString().replace('.000', '');
39
- }
40
- return value;
41
- }
42
-
43
- function checkObject(expected, actual, ptr) {
44
- if (undefOrNull(expected) || undefOrNull(actual))
45
- fail(expected, actual, ptr, "missing value;");
46
- if (typeof expected !== typeof actual)
47
- fail(typeof expected, typeof actual, ptr, "wrong type;");
48
- if (expected.prototype !== actual.prototype)
49
- fail(expected.prototype, actual.prototype, ptr, "wrong prototype;");
50
- try {
51
- var expectedKeys = Object.keys(expected);
52
- var actualKeys = Object.keys(actual);
53
- } catch (e) {
54
- fail(expectedKeys, actualKeys, ptr, "wrong keys;");
55
- }
56
- if (actualKeys.length != expectedKeys.length)
57
- fail(expectedKeys.length, actualKeys.length, ptr, "key count incorrect;");
58
- expectedKeys.sort();
59
- actualKeys.sort();
60
- for (var i = 0; i < expectedKeys.length; i++) {
61
- if (actualKeys[i] != expectedKeys[i])
62
- fail(expectedKeys, actualKeys, ptr, "wrong keys;");
63
- }
64
- for (i = 0; i < expectedKeys.length; i++) {
65
- var key = expectedKeys[i];
66
- assertEquals(expected[key], actual[key], ptr + '/' + key);
67
- }
68
- }
69
-
70
- function undefOrNull(v) {
71
- return v === undefined || v === null;
72
- }
73
-
74
- function fail(expected, actual, ptr, msg) {
75
- var text = ptr + ' ' + msg + " expected: " + expected + ", actual: " + actual;
76
- console.log(text);
77
- throw new Error(text);
78
- }
79
-
80
- return assertEquals;
81
- }));