@or-sdk/ccp 1.1.2 → 1.1.3
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/dist/cjs/Ccp.js +5 -0
- package/dist/cjs/Ccp.js.map +1 -1
- package/dist/cjs/api/accountsApi.js +79 -0
- package/dist/cjs/api/accountsApi.js.map +1 -0
- package/dist/cjs/api/categoriesApi.js +78 -0
- package/dist/cjs/api/categoriesApi.js.map +1 -0
- package/dist/cjs/api/customersApi.js +1 -1
- package/dist/cjs/api/customersApi.js.map +1 -1
- package/dist/cjs/api/environmentsApi.js +79 -0
- package/dist/cjs/api/environmentsApi.js.map +1 -0
- package/dist/cjs/api/index.js +11 -1
- package/dist/cjs/api/index.js.map +1 -1
- package/dist/cjs/api/mappingApi.js +78 -0
- package/dist/cjs/api/mappingApi.js.map +1 -0
- package/dist/cjs/api/reportingApi.js +94 -0
- package/dist/cjs/api/reportingApi.js.map +1 -0
- package/dist/cjs/utils.js +16 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/Ccp.js +6 -1
- package/dist/esm/Ccp.js.map +1 -1
- package/dist/esm/api/accountsApi.js +26 -0
- package/dist/esm/api/accountsApi.js.map +1 -0
- package/dist/esm/api/categoriesApi.js +25 -0
- package/dist/esm/api/categoriesApi.js.map +1 -0
- package/dist/esm/api/customersApi.js +1 -1
- package/dist/esm/api/customersApi.js.map +1 -1
- package/dist/esm/api/environmentsApi.js +26 -0
- package/dist/esm/api/environmentsApi.js.map +1 -0
- package/dist/esm/api/index.js +5 -0
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/api/mappingApi.js +25 -0
- package/dist/esm/api/mappingApi.js.map +1 -0
- package/dist/esm/api/reportingApi.js +36 -0
- package/dist/esm/api/reportingApi.js.map +1 -0
- package/dist/esm/utils.js +11 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/types/Ccp.d.ts +6 -1
- package/dist/types/Ccp.d.ts.map +1 -1
- package/dist/types/api/accountsApi.d.ts +7 -0
- package/dist/types/api/accountsApi.d.ts.map +1 -0
- package/dist/types/api/categoriesApi.d.ts +7 -0
- package/dist/types/api/categoriesApi.d.ts.map +1 -0
- package/dist/types/api/environmentsApi.d.ts +7 -0
- package/dist/types/api/environmentsApi.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +5 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/mappingApi.d.ts +7 -0
- package/dist/types/api/mappingApi.d.ts.map +1 -0
- package/dist/types/api/reportingApi.d.ts +8 -0
- package/dist/types/api/reportingApi.d.ts.map +1 -0
- package/dist/types/types.d.ts +58 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +4 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/Ccp.ts +11 -1
- package/src/api/accountsApi.ts +23 -0
- package/src/api/categoriesApi.ts +16 -0
- package/src/api/customersApi.ts +1 -1
- package/src/api/environmentsApi.ts +21 -0
- package/src/api/index.ts +5 -0
- package/src/api/mappingApi.ts +16 -0
- package/src/api/reportingApi.ts +43 -0
- package/src/types.ts +66 -0
- package/src/utils.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.1.3](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/ccp@1.1.2...@or-sdk/ccp@1.1.3) (2024-08-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **CCP:** update ccp package ([97afe09](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/97afe09dc7e2c391d9fe60e32add59adb9e8c923))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [1.1.2](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/ccp@1.1.1...@or-sdk/ccp@1.1.2) (2024-08-01)
|
|
7
16
|
|
|
8
17
|
|
package/dist/cjs/Ccp.js
CHANGED
|
@@ -45,6 +45,11 @@ var Ccp = (function (_super) {
|
|
|
45
45
|
var apiCall = _this.callApi.bind(_this);
|
|
46
46
|
_this.withApiErrorLog = Boolean(params.withApiErrorLog);
|
|
47
47
|
_this.customersApi = new api_1.CustomersApi(apiCall);
|
|
48
|
+
_this.environmentsApi = new api_1.EnvironmentsApi(apiCall);
|
|
49
|
+
_this.accountsApi = new api_1.AccountsApi(apiCall);
|
|
50
|
+
_this.categoriesApi = new api_1.CategoriesApi(apiCall);
|
|
51
|
+
_this.mappingApi = new api_1.MappingApi(apiCall);
|
|
52
|
+
_this.reportingApi = new api_1.ReportingApi(apiCall);
|
|
48
53
|
return _this;
|
|
49
54
|
}
|
|
50
55
|
Ccp.prototype.callApi = function (params) {
|
package/dist/cjs/Ccp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ccp.js","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA8D;AAC9D,
|
|
1
|
+
{"version":3,"file":"Ccp.js","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA8D;AAC9D,6BAA4G;AAC5G,uCAAsC;AAEtC,yCAA0C;AAS1C;IAAyB,uBAAI;IAe3B,aAAY,MAAiB;QAA7B,iBAoBC;QAnBS,IAAA,KAAK,GAA8B,MAAM,MAApC,EAAE,YAAY,GAAgB,MAAM,aAAtB,EAAE,SAAS,GAAK,MAAM,UAAX,CAAY;QAElD,QAAA,MAAK,YAAC;YACJ,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,uBAA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B,MAAA,CAAC,CAAC,MAAM,0CAAE,GAAG,CAAE,CAAC,CAAC;QAClD,OAAO,CAAC,KAAK,CAAC,0BAAmB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAE,CAAC,CAAC;QACrD,OAAO,CAAC,KAAK,CAAC,0BAAmB,IAAI,CAAC,SAAS,CAAC,CAAA,MAAA,CAAC,CAAC,MAAM,0CAAE,MAAM,KAAI,EAAE,CAAC,CAAE,CAAC,CAAC;QAC3E,OAAO,CAAC,KAAK,CAAC,0BAAmB,CAAC;;YAChC,IAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAA,MAAA,CAAC,CAAC,MAAM,0CAAE,IAAI,KAAI,EAAE,CAAC,CAAC;YACjD,OAAO,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;QAC5D,CAAC,CAAC,EAAE,CAAE,CAAC,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,0BAAmB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,0BAAmB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAE,CAAC,CAAC;QAChE,OAAO,CAAC,KAAK,CAAC,0BAAmB,MAAA,CAAC,CAAC,MAAM,0CAAE,OAAO,CAAC,aAAa,CAAE,CAAC,CAAC;IACtE,CAAC;IACH,UAAC;AAAD,CAAC,AApED,CAAyB,WAAI,GAoE5B;AApEY,kBAAG"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var baseApi_1 = require("./baseApi");
|
|
55
|
+
var AccountsApi = (function (_super) {
|
|
56
|
+
__extends(AccountsApi, _super);
|
|
57
|
+
function AccountsApi() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
_this.apiBasePath = 'api/v1/accounts';
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
AccountsApi.prototype.getAccounts = function (params) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
+
return __generator(this, function (_a) {
|
|
65
|
+
switch (_a.label) {
|
|
66
|
+
case 0: return [4, this.apiCall({
|
|
67
|
+
method: 'GET',
|
|
68
|
+
route: "".concat(this.apiBasePath),
|
|
69
|
+
params: params,
|
|
70
|
+
})];
|
|
71
|
+
case 1: return [2, _a.sent()];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
return AccountsApi;
|
|
77
|
+
}(baseApi_1.BaseApi));
|
|
78
|
+
exports.default = AccountsApi;
|
|
79
|
+
//# sourceMappingURL=accountsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountsApi.js","sourceRoot":"","sources":["../../../src/api/accountsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAAyC,+BAAO;IAAhD;;QACmB,iBAAW,GAAG,iBAAiB,CAAC;;IAkBnD,CAAC;IAPc,iCAAW,GAAxB,UAAyB,MAA4B;;;;4BAC5C,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,QAAA;yBACP,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IACH,kBAAC;AAAD,CAAC,AAnBD,CAAyC,iBAAO,GAmB/C"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var baseApi_1 = require("./baseApi");
|
|
55
|
+
var CategoriesApi = (function (_super) {
|
|
56
|
+
__extends(CategoriesApi, _super);
|
|
57
|
+
function CategoriesApi() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
_this.apiBasePath = 'api/v1/categories';
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
CategoriesApi.prototype.getCategories = function () {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
+
return __generator(this, function (_a) {
|
|
65
|
+
switch (_a.label) {
|
|
66
|
+
case 0: return [4, this.apiCall({
|
|
67
|
+
method: 'GET',
|
|
68
|
+
route: "".concat(this.apiBasePath),
|
|
69
|
+
})];
|
|
70
|
+
case 1: return [2, _a.sent()];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
return CategoriesApi;
|
|
76
|
+
}(baseApi_1.BaseApi));
|
|
77
|
+
exports.default = CategoriesApi;
|
|
78
|
+
//# sourceMappingURL=categoriesApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categoriesApi.js","sourceRoot":"","sources":["../../../src/api/categoriesApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAA2C,iCAAO;IAAlD;;QACmB,iBAAW,GAAG,mBAAmB,CAAC;;IAWrD,CAAC;IANc,qCAAa,GAA1B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;yBAC7B,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IACH,oBAAC;AAAD,CAAC,AAZD,CAA2C,iBAAO,GAYjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customersApi.js","sourceRoot":"","sources":["../../../src/api/customersApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAA0C,gCAAO;IAAjD;;QACmB,iBAAW,GAAG,kBAAkB,CAAC;;IAqBpD,CAAC;IAhBc,sCAAe,GAA5B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"customersApi.js","sourceRoot":"","sources":["../../../src/api/customersApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAA0C,gCAAO;IAAjD;;QACmB,iBAAW,GAAG,kBAAkB,CAAC;;IAqBpD,CAAC;IAhBc,sCAAe,GAA5B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;yBAC7B,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IAKY,sCAAe,GAA5B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,UAAO;yBAClC,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IACH,mBAAC;AAAD,CAAC,AAtBD,CAA0C,iBAAO,GAsBhD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var baseApi_1 = require("./baseApi");
|
|
55
|
+
var EnvironmentsApi = (function (_super) {
|
|
56
|
+
__extends(EnvironmentsApi, _super);
|
|
57
|
+
function EnvironmentsApi() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
_this.apiBasePath = 'api/v1/environments';
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
EnvironmentsApi.prototype.getEnvironments = function (params) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
+
return __generator(this, function (_a) {
|
|
65
|
+
switch (_a.label) {
|
|
66
|
+
case 0: return [4, this.apiCall({
|
|
67
|
+
method: 'GET',
|
|
68
|
+
route: "".concat(this.apiBasePath),
|
|
69
|
+
params: params,
|
|
70
|
+
})];
|
|
71
|
+
case 1: return [2, _a.sent()];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
return EnvironmentsApi;
|
|
77
|
+
}(baseApi_1.BaseApi));
|
|
78
|
+
exports.default = EnvironmentsApi;
|
|
79
|
+
//# sourceMappingURL=environmentsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environmentsApi.js","sourceRoot":"","sources":["../../../src/api/environmentsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAA6C,mCAAO;IAApD;;QACmB,iBAAW,GAAG,qBAAqB,CAAC;;IAgBvD,CAAC;IAPc,yCAAe,GAA5B,UAA6B,MAAgC;;;;4BACpD,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,QAAA;yBACP,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IACH,sBAAC;AAAD,CAAC,AAjBD,CAA6C,iBAAO,GAiBnD"}
|
package/dist/cjs/api/index.js
CHANGED
|
@@ -3,7 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CustomersApi = void 0;
|
|
6
|
+
exports.ReportingApi = exports.MappingApi = exports.CategoriesApi = exports.AccountsApi = exports.EnvironmentsApi = exports.CustomersApi = void 0;
|
|
7
7
|
var customersApi_1 = require("./customersApi");
|
|
8
8
|
Object.defineProperty(exports, "CustomersApi", { enumerable: true, get: function () { return __importDefault(customersApi_1).default; } });
|
|
9
|
+
var environmentsApi_1 = require("./environmentsApi");
|
|
10
|
+
Object.defineProperty(exports, "EnvironmentsApi", { enumerable: true, get: function () { return __importDefault(environmentsApi_1).default; } });
|
|
11
|
+
var accountsApi_1 = require("./accountsApi");
|
|
12
|
+
Object.defineProperty(exports, "AccountsApi", { enumerable: true, get: function () { return __importDefault(accountsApi_1).default; } });
|
|
13
|
+
var categoriesApi_1 = require("./categoriesApi");
|
|
14
|
+
Object.defineProperty(exports, "CategoriesApi", { enumerable: true, get: function () { return __importDefault(categoriesApi_1).default; } });
|
|
15
|
+
var mappingApi_1 = require("./mappingApi");
|
|
16
|
+
Object.defineProperty(exports, "MappingApi", { enumerable: true, get: function () { return __importDefault(mappingApi_1).default; } });
|
|
17
|
+
var reportingApi_1 = require("./reportingApi");
|
|
18
|
+
Object.defineProperty(exports, "ReportingApi", { enumerable: true, get: function () { return __importDefault(reportingApi_1).default; } });
|
|
9
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,6CAAuD;AAA9C,2HAAA,OAAO,OAAe;AAC/B,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,2CAAqD;AAA5C,yHAAA,OAAO,OAAc;AAC9B,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var baseApi_1 = require("./baseApi");
|
|
55
|
+
var MappingApi = (function (_super) {
|
|
56
|
+
__extends(MappingApi, _super);
|
|
57
|
+
function MappingApi() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
_this.apiBasePath = 'api/v1/mapping';
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
MappingApi.prototype.getMapping = function () {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
+
return __generator(this, function (_a) {
|
|
65
|
+
switch (_a.label) {
|
|
66
|
+
case 0: return [4, this.apiCall({
|
|
67
|
+
method: 'GET',
|
|
68
|
+
route: "".concat(this.apiBasePath),
|
|
69
|
+
})];
|
|
70
|
+
case 1: return [2, _a.sent()];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
return MappingApi;
|
|
76
|
+
}(baseApi_1.BaseApi));
|
|
77
|
+
exports.default = MappingApi;
|
|
78
|
+
//# sourceMappingURL=mappingApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappingApi.js","sourceRoot":"","sources":["../../../src/api/mappingApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAAwC,8BAAO;IAA/C;;QACmB,iBAAW,GAAG,gBAAgB,CAAC;;IAWlD,CAAC;IANc,+BAAU,GAAvB;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;yBAC7B,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IACH,iBAAC;AAAD,CAAC,AAZD,CAAwC,iBAAO,GAY9C"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var baseApi_1 = require("./baseApi");
|
|
55
|
+
var utils_1 = require("../utils");
|
|
56
|
+
var ReportingApi = (function (_super) {
|
|
57
|
+
__extends(ReportingApi, _super);
|
|
58
|
+
function ReportingApi() {
|
|
59
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
60
|
+
_this.apiBasePath = 'api/v1';
|
|
61
|
+
return _this;
|
|
62
|
+
}
|
|
63
|
+
ReportingApi.prototype.getUsage = function (params) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
+
return __generator(this, function (_a) {
|
|
66
|
+
switch (_a.label) {
|
|
67
|
+
case 0: return [4, this.apiCall({
|
|
68
|
+
method: 'GET',
|
|
69
|
+
route: "".concat(this.apiBasePath, "/usage"),
|
|
70
|
+
params: (0, utils_1.adaptParams)(params),
|
|
71
|
+
})];
|
|
72
|
+
case 1: return [2, _a.sent()];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
ReportingApi.prototype.getUsageTotal = function (params) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
79
|
+
return __generator(this, function (_a) {
|
|
80
|
+
switch (_a.label) {
|
|
81
|
+
case 0: return [4, this.apiCall({
|
|
82
|
+
method: 'GET',
|
|
83
|
+
route: "".concat(this.apiBasePath, "/usage/total"),
|
|
84
|
+
params: (0, utils_1.adaptParams)(params),
|
|
85
|
+
})];
|
|
86
|
+
case 1: return [2, _a.sent()];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
return ReportingApi;
|
|
92
|
+
}(baseApi_1.BaseApi));
|
|
93
|
+
exports.default = ReportingApi;
|
|
94
|
+
//# sourceMappingURL=reportingApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reportingApi.js","sourceRoot":"","sources":["../../../src/api/reportingApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,kCAAuC;AAEvC;IAA0C,gCAAO;IAAjD;;QACmB,iBAAW,GAAG,QAAQ,CAAC;;IAqC1C,CAAC;IAzBc,+BAAQ,GAArB,UAAsB,MAA0B;;;;4BACvC,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,WAAQ;4BAClC,MAAM,EAAE,IAAA,mBAAW,EAAqB,MAAM,CAAC;yBAChD,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IAYY,oCAAa,GAA1B,UAA2B,MAA0B;;;;4BAC5C,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,iBAAc;4BACxC,MAAM,EAAE,IAAA,mBAAW,EAAqB,MAAM,CAAC;yBAChD,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IACH,mBAAC;AAAD,CAAC,AAtCD,CAA0C,iBAAO,GAsChD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adaptParams = void 0;
|
|
4
|
+
function adaptParams(params) {
|
|
5
|
+
var p = {};
|
|
6
|
+
Object.entries(params).forEach(function (_a) {
|
|
7
|
+
var k = _a[0], v = _a[1];
|
|
8
|
+
if (Array.isArray(v))
|
|
9
|
+
p[k] = v.join();
|
|
10
|
+
else
|
|
11
|
+
p[k] = v;
|
|
12
|
+
});
|
|
13
|
+
return p;
|
|
14
|
+
}
|
|
15
|
+
exports.adaptParams = adaptParams;
|
|
16
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAoC,MAAS;IACtE,IAAM,CAAC,GAAG,EAAiC,CAAC;IAE3C,MAAM,CAAC,OAAO,CAAC,MAAM,CAA+B,CAAC,OAAO,CAAC,UAAC,EAAM;YAAL,CAAC,QAAA,EAAE,CAAC,QAAA;QAClE,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;;YACjC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,CAAC;AACX,CAAC;AARD,kCAQC"}
|
package/dist/esm/Ccp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Base } from '@or-sdk/base';
|
|
2
|
-
import { CustomersApi } from './api';
|
|
2
|
+
import { CustomersApi, EnvironmentsApi, AccountsApi, CategoriesApi, MappingApi, ReportingApi } from './api';
|
|
3
3
|
import { ApiError } from './apiError';
|
|
4
4
|
import { SERVICE_KEY } from './constants';
|
|
5
5
|
export class Ccp extends Base {
|
|
@@ -14,6 +14,11 @@ export class Ccp extends Base {
|
|
|
14
14
|
const apiCall = this.callApi.bind(this);
|
|
15
15
|
this.withApiErrorLog = Boolean(params.withApiErrorLog);
|
|
16
16
|
this.customersApi = new CustomersApi(apiCall);
|
|
17
|
+
this.environmentsApi = new EnvironmentsApi(apiCall);
|
|
18
|
+
this.accountsApi = new AccountsApi(apiCall);
|
|
19
|
+
this.categoriesApi = new CategoriesApi(apiCall);
|
|
20
|
+
this.mappingApi = new MappingApi(apiCall);
|
|
21
|
+
this.reportingApi = new ReportingApi(apiCall);
|
|
17
22
|
}
|
|
18
23
|
callApi(params) {
|
|
19
24
|
return super.callApiV2(Object.assign({}, params));
|
package/dist/esm/Ccp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ccp.js","sourceRoot":"","sources":["../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,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;QAChE,OAAO,CAAC,KAAK,CAAC,mBAAmB,MAAA,CAAC,CAAC,MAAM,0CAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACtE,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { BaseApi } from './baseApi';
|
|
11
|
+
export default class AccountsApi extends BaseApi {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.apiBasePath = 'api/v1/accounts';
|
|
15
|
+
}
|
|
16
|
+
getAccounts(params) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return yield this.apiCall({
|
|
19
|
+
method: 'GET',
|
|
20
|
+
route: `${this.apiBasePath}`,
|
|
21
|
+
params,
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=accountsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountsApi.js","sourceRoot":"","sources":["../../../src/api/accountsApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAAhD;;QACmB,gBAAW,GAAG,iBAAiB,CAAC;IAkBnD,CAAC;IAPc,WAAW,CAAC,MAA4B;;YACnD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE;gBAC5B,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { BaseApi } from './baseApi';
|
|
11
|
+
export default class CategoriesApi extends BaseApi {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.apiBasePath = 'api/v1/categories';
|
|
15
|
+
}
|
|
16
|
+
getCategories() {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return yield this.apiCall({
|
|
19
|
+
method: 'GET',
|
|
20
|
+
route: `${this.apiBasePath}`,
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=categoriesApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categoriesApi.js","sourceRoot":"","sources":["../../../src/api/categoriesApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IAAlD;;QACmB,gBAAW,GAAG,mBAAmB,CAAC;IAWrD,CAAC;IANc,aAAa;;YACxB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE;aAC7B,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}
|