@or-sdk/ccp 2.2.2-beta.3548.0 → 2.2.2-beta.3550.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/dist/cjs/Ccp.js +4 -0
- package/dist/cjs/Ccp.js.map +1 -1
- package/dist/cjs/api/contracts-api/contractsApi.js +136 -0
- package/dist/cjs/api/contracts-api/contractsApi.js.map +1 -0
- package/dist/cjs/api/contracts-api/types.js.map +1 -0
- package/dist/cjs/api/custom-skus-api/customSkusApi.js +92 -0
- package/dist/cjs/api/custom-skus-api/customSkusApi.js.map +1 -0
- package/dist/cjs/api/custom-skus-api/types.js +3 -0
- package/dist/cjs/api/custom-skus-api/types.js.map +1 -0
- package/dist/cjs/api/index.js +10 -2
- package/dist/cjs/api/index.js.map +1 -1
- package/dist/cjs/api/patterns-api/constants.js +9 -0
- package/dist/cjs/api/patterns-api/constants.js.map +1 -0
- package/dist/cjs/api/patterns-api/patternsApi.js +107 -0
- package/dist/cjs/api/patterns-api/patternsApi.js.map +1 -0
- package/dist/cjs/api/patterns-api/types.js +3 -0
- package/dist/cjs/api/patterns-api/types.js.map +1 -0
- package/dist/cjs/api/{reporting-api/reportingApi.js → reportingApi.js} +3 -64
- package/dist/cjs/api/reportingApi.js.map +1 -0
- package/dist/cjs/api/tiers-api/tiersApi.js +78 -0
- package/dist/cjs/api/tiers-api/tiersApi.js.map +1 -0
- package/dist/cjs/api/tiers-api/types.js +3 -0
- package/dist/cjs/api/tiers-api/types.js.map +1 -0
- package/dist/cjs/constants.js +16 -0
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types.js +4 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/{api/reporting-api/utils/adaptParams.js → utils.js} +1 -1
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/Ccp.js +5 -1
- package/dist/esm/Ccp.js.map +1 -1
- package/dist/esm/api/contracts-api/contractsApi.js +62 -0
- package/dist/esm/api/contracts-api/contractsApi.js.map +1 -0
- package/dist/esm/api/contracts-api/types.js.map +1 -0
- package/dist/esm/api/custom-skus-api/customSkusApi.js +34 -0
- package/dist/esm/api/custom-skus-api/customSkusApi.js.map +1 -0
- package/dist/esm/api/custom-skus-api/types.js +2 -0
- package/dist/esm/api/custom-skus-api/types.js.map +1 -0
- package/dist/esm/api/index.js +5 -1
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/api/patterns-api/constants.js +6 -0
- package/dist/esm/api/patterns-api/constants.js.map +1 -0
- package/dist/esm/api/patterns-api/patternsApi.js +44 -0
- package/dist/esm/api/patterns-api/patternsApi.js.map +1 -0
- package/dist/esm/api/patterns-api/types.js +2 -0
- package/dist/esm/api/patterns-api/types.js.map +1 -0
- package/dist/esm/api/reportingApi.js +28 -0
- package/dist/esm/api/reportingApi.js.map +1 -0
- package/dist/esm/api/tiers-api/tiersApi.js +25 -0
- package/dist/esm/api/tiers-api/tiersApi.js.map +1 -0
- package/dist/esm/api/tiers-api/types.js +2 -0
- package/dist/esm/api/tiers-api/types.js.map +1 -0
- package/dist/esm/constants.js +2 -0
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types.js +4 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/{api/reporting-api/utils/adaptParams.js → utils.js} +1 -1
- package/dist/esm/utils.js.map +1 -0
- package/dist/types/Ccp.d.ts +5 -1
- package/dist/types/Ccp.d.ts.map +1 -1
- package/dist/types/api/contracts-api/contractsApi.d.ts +12 -0
- package/dist/types/api/contracts-api/contractsApi.d.ts.map +1 -0
- package/dist/types/api/contracts-api/types.d.ts +108 -0
- package/dist/types/api/contracts-api/types.d.ts.map +1 -0
- package/dist/types/api/custom-skus-api/customSkusApi.d.ts +8 -0
- package/dist/types/api/custom-skus-api/customSkusApi.d.ts.map +1 -0
- package/dist/types/api/custom-skus-api/types.d.ts +14 -0
- package/dist/types/api/custom-skus-api/types.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +5 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/patterns-api/constants.d.ts +5 -0
- package/dist/types/api/patterns-api/constants.d.ts.map +1 -0
- package/dist/types/api/patterns-api/patternsApi.d.ts +9 -0
- package/dist/types/api/patterns-api/patternsApi.d.ts.map +1 -0
- package/dist/types/api/patterns-api/types.d.ts +26 -0
- package/dist/types/api/patterns-api/types.d.ts.map +1 -0
- package/dist/types/api/reportingApi.d.ts +7 -0
- package/dist/types/api/reportingApi.d.ts.map +1 -0
- package/dist/types/api/tiers-api/tiersApi.d.ts +7 -0
- package/dist/types/api/tiers-api/tiersApi.d.ts.map +1 -0
- package/dist/types/api/tiers-api/types.d.ts +13 -0
- package/dist/types/api/tiers-api/types.d.ts.map +1 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +23 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/{api/reporting-api/utils/adaptParams.d.ts → utils.d.ts} +1 -1
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/Ccp.ts +12 -0
- package/src/api/contracts-api/contractsApi.ts +67 -0
- package/src/api/contracts-api/types.ts +117 -0
- package/src/api/custom-skus-api/customSkusApi.ts +29 -0
- package/src/api/custom-skus-api/types.ts +15 -0
- package/src/api/index.ts +5 -1
- package/src/api/patterns-api/constants.ts +4 -0
- package/src/api/patterns-api/patternsApi.ts +44 -0
- package/src/api/patterns-api/types.ts +30 -0
- package/src/api/reportingApi.ts +27 -0
- package/src/api/tiers-api/tiersApi.ts +17 -0
- package/src/api/tiers-api/types.ts +12 -0
- package/src/constants.ts +3 -0
- package/src/index.ts +1 -0
- package/src/types.ts +26 -1
- package/dist/cjs/api/reporting-api/reportingApi.js.map +0 -1
- package/dist/cjs/api/reporting-api/types.js.map +0 -1
- package/dist/cjs/api/reporting-api/utils/adaptParams.js.map +0 -1
- package/dist/esm/api/reporting-api/reportingApi.js +0 -60
- package/dist/esm/api/reporting-api/reportingApi.js.map +0 -1
- package/dist/esm/api/reporting-api/types.js.map +0 -1
- package/dist/esm/api/reporting-api/utils/adaptParams.js.map +0 -1
- package/dist/types/api/reporting-api/reportingApi.d.ts +0 -10
- package/dist/types/api/reporting-api/reportingApi.d.ts.map +0 -1
- package/dist/types/api/reporting-api/types.d.ts +0 -46
- package/dist/types/api/reporting-api/types.d.ts.map +0 -1
- package/dist/types/api/reporting-api/utils/adaptParams.d.ts.map +0 -1
- package/src/api/reporting-api/reportingApi.ts +0 -108
- package/src/api/reporting-api/types.ts +0 -49
- /package/dist/cjs/api/{reporting-api → contracts-api}/types.js +0 -0
- /package/dist/esm/api/{reporting-api → contracts-api}/types.js +0 -0
- /package/src/{api/reporting-api/utils/adaptParams.ts → utils.ts} +0 -0
package/dist/cjs/Ccp.js
CHANGED
|
@@ -45,6 +45,10 @@ var Ccp = (function (_super) {
|
|
|
45
45
|
_this.skusApi = new api_1.SkusApi(apiCall);
|
|
46
46
|
_this.employeesApi = new api_1.EmployeesApi(apiCall);
|
|
47
47
|
_this.sageApi = new api_1.SageApi(apiCall);
|
|
48
|
+
_this.contractsApi = new api_1.ContractsApi(apiCall);
|
|
49
|
+
_this.tiersApi = new api_1.TiersApi(apiCall);
|
|
50
|
+
_this.customSkusApi = new api_1.CustomSkusApi(apiCall);
|
|
51
|
+
_this.patternsApi = new api_1.PatternsApi(apiCall);
|
|
48
52
|
return _this;
|
|
49
53
|
}
|
|
50
54
|
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;AAE9D,
|
|
1
|
+
{"version":3,"file":"Ccp.js","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,136 @@
|
|
|
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["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 ContractsApi = (function (_super) {
|
|
56
|
+
__extends(ContractsApi, _super);
|
|
57
|
+
function ContractsApi() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
_this.apiBasePath = 'api/v1/contracts';
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
ContractsApi.prototype.getContracts = function () {
|
|
63
|
+
return __awaiter(this, arguments, void 0, function (params) {
|
|
64
|
+
if (params === void 0) { params = {}; }
|
|
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),
|
|
70
|
+
params: params,
|
|
71
|
+
})];
|
|
72
|
+
case 1: return [2, _a.sent()];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
ContractsApi.prototype.updateContract = function (id, data) {
|
|
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: 'PUT',
|
|
83
|
+
route: "".concat(this.apiBasePath),
|
|
84
|
+
params: { id: id },
|
|
85
|
+
data: data,
|
|
86
|
+
})];
|
|
87
|
+
case 1: return [2, _a.sent()];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
ContractsApi.prototype.createContract = function (data) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
94
|
+
return __generator(this, function (_a) {
|
|
95
|
+
switch (_a.label) {
|
|
96
|
+
case 0: return [4, this.apiCall({
|
|
97
|
+
method: 'POST',
|
|
98
|
+
route: "".concat(this.apiBasePath),
|
|
99
|
+
data: data,
|
|
100
|
+
})];
|
|
101
|
+
case 1: return [2, _a.sent()];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
ContractsApi.prototype.deleteContract = function (id) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
switch (_a.label) {
|
|
110
|
+
case 0: return [4, this.apiCall({
|
|
111
|
+
method: 'DELETE',
|
|
112
|
+
route: "".concat(this.apiBasePath),
|
|
113
|
+
params: { id: id },
|
|
114
|
+
})];
|
|
115
|
+
case 1: return [2, _a.sent()];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
ContractsApi.prototype.listOfAllContracts = function () {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
+
return __generator(this, function (_a) {
|
|
123
|
+
switch (_a.label) {
|
|
124
|
+
case 0: return [4, this.apiCall({
|
|
125
|
+
method: 'GET',
|
|
126
|
+
route: "".concat(this.apiBasePath, "/list"),
|
|
127
|
+
})];
|
|
128
|
+
case 1: return [2, _a.sent()];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
return ContractsApi;
|
|
134
|
+
}(baseApi_1.BaseApi));
|
|
135
|
+
exports.default = ContractsApi;
|
|
136
|
+
//# sourceMappingURL=contractsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractsApi.js","sourceRoot":"","sources":["../../../../src/api/contracts-api/contractsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAqC;AAIrC;IAA0C,gCAAO;IAAjD;;QACmB,iBAAW,GAAG,kBAAkB,CAAC;;IA4DpD,CAAC;IAvDc,mCAAY,GAAzB;4DAA0B,MAAiC;YAAjC,uBAAA,EAAA,WAAiC;;;4BAClD,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;IAOK,qCAAc,GAApB,UAAqB,EAAU,EAAE,IAAuB;;;;4BAC/C,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE;4BACd,IAAI,MAAA;yBACL,CAAC,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAMK,qCAAc,GAApB,UAAqB,IAAuB;;;;4BACnC,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,IAAI,MAAA;yBACL,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IAMK,qCAAc,GAApB,UAAqB,EAAU;;;;4BACtB,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,QAAQ;4BAChB,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE;yBACf,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IAKY,yCAAkB,GAA/B;;;;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,AA7DD,CAA0C,iBAAO,GA6DhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/contracts-api/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["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 CustomSkusApi = (function (_super) {
|
|
56
|
+
__extends(CustomSkusApi, _super);
|
|
57
|
+
function CustomSkusApi() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
_this.apiBasePath = 'api/v1/custom-skus';
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
CustomSkusApi.prototype.listOfCustomSkus = 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, "/list"),
|
|
69
|
+
})];
|
|
70
|
+
case 1: return [2, _a.sent()];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
CustomSkusApi.prototype.updateCustomSkus = function (data) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0: return [4, this.apiCall({
|
|
80
|
+
method: 'POST',
|
|
81
|
+
route: "".concat(this.apiBasePath),
|
|
82
|
+
data: data,
|
|
83
|
+
})];
|
|
84
|
+
case 1: return [2, _a.sent()];
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
return CustomSkusApi;
|
|
90
|
+
}(baseApi_1.BaseApi));
|
|
91
|
+
exports.default = CustomSkusApi;
|
|
92
|
+
//# sourceMappingURL=customSkusApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customSkusApi.js","sourceRoot":"","sources":["../../../../src/api/custom-skus-api/customSkusApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AAIrC;IAA2C,iCAAO;IAAlD;;QACmB,iBAAW,GAAG,oBAAoB,CAAC;;IAuBtD,CAAC;IAlBc,wCAAgB,GAA7B;;;;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;IAMK,wCAAgB,GAAtB,UAAuB,IAAyB;;;;4BACvC,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,IAAI,MAAA;yBACL,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IACH,oBAAC;AAAD,CAAC,AAxBD,CAA2C,iBAAO,GAwBjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/custom-skus-api/types.ts"],"names":[],"mappings":""}
|
package/dist/cjs/api/index.js
CHANGED
|
@@ -3,7 +3,7 @@ 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.SageApi = exports.EmployeesApi = exports.SkusApi = exports.VendorsApi = exports.PaymentProvidersApi = exports.ReportingApi = exports.FlowsApi = exports.MappingApi = exports.CategoriesApi = exports.AccountsApi = exports.EnvironmentsApi = exports.CustomersApi = void 0;
|
|
6
|
+
exports.PatternsApi = exports.CustomSkusApi = exports.TiersApi = exports.ContractsApi = exports.SageApi = exports.EmployeesApi = exports.SkusApi = exports.VendorsApi = exports.PaymentProvidersApi = exports.ReportingApi = exports.FlowsApi = exports.MappingApi = exports.CategoriesApi = exports.AccountsApi = exports.EnvironmentsApi = exports.CustomersApi = void 0;
|
|
7
7
|
var customersApi_1 = require("./customers-api/customersApi");
|
|
8
8
|
Object.defineProperty(exports, "CustomersApi", { enumerable: true, get: function () { return __importDefault(customersApi_1).default; } });
|
|
9
9
|
var environmentsApi_1 = require("./environmentsApi");
|
|
@@ -16,7 +16,7 @@ var mappingApi_1 = require("./mappingApi");
|
|
|
16
16
|
Object.defineProperty(exports, "MappingApi", { enumerable: true, get: function () { return __importDefault(mappingApi_1).default; } });
|
|
17
17
|
var flowsApi_1 = require("./flowsApi");
|
|
18
18
|
Object.defineProperty(exports, "FlowsApi", { enumerable: true, get: function () { return __importDefault(flowsApi_1).default; } });
|
|
19
|
-
var reportingApi_1 = require("./
|
|
19
|
+
var reportingApi_1 = require("./reportingApi");
|
|
20
20
|
Object.defineProperty(exports, "ReportingApi", { enumerable: true, get: function () { return __importDefault(reportingApi_1).default; } });
|
|
21
21
|
var paymentProvidersApi_1 = require("./paymentProvidersApi");
|
|
22
22
|
Object.defineProperty(exports, "PaymentProvidersApi", { enumerable: true, get: function () { return __importDefault(paymentProvidersApi_1).default; } });
|
|
@@ -28,4 +28,12 @@ var employeesApi_1 = require("./employeesApi");
|
|
|
28
28
|
Object.defineProperty(exports, "EmployeesApi", { enumerable: true, get: function () { return __importDefault(employeesApi_1).default; } });
|
|
29
29
|
var sageApi_1 = require("./sageApi");
|
|
30
30
|
Object.defineProperty(exports, "SageApi", { enumerable: true, get: function () { return __importDefault(sageApi_1).default; } });
|
|
31
|
+
var contractsApi_1 = require("./contracts-api/contractsApi");
|
|
32
|
+
Object.defineProperty(exports, "ContractsApi", { enumerable: true, get: function () { return __importDefault(contractsApi_1).default; } });
|
|
33
|
+
var tiersApi_1 = require("./tiers-api/tiersApi");
|
|
34
|
+
Object.defineProperty(exports, "TiersApi", { enumerable: true, get: function () { return __importDefault(tiersApi_1).default; } });
|
|
35
|
+
var customSkusApi_1 = require("./custom-skus-api/customSkusApi");
|
|
36
|
+
Object.defineProperty(exports, "CustomSkusApi", { enumerable: true, get: function () { return __importDefault(customSkusApi_1).default; } });
|
|
37
|
+
var patternsApi_1 = require("./patterns-api/patternsApi");
|
|
38
|
+
Object.defineProperty(exports, "PatternsApi", { enumerable: true, get: function () { return __importDefault(patternsApi_1).default; } });
|
|
31
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;;;;AAAA,6DAAuE;AAA9D,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,uCAAiD;AAAxC,qHAAA,OAAO,OAAY;AAC5B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;;;;AAAA,6DAAuE;AAA9D,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,uCAAiD;AAAxC,qHAAA,OAAO,OAAY;AAC5B,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,6DAAuE;AAA9D,2IAAA,OAAO,OAAuB;AACvC,yCAAoD;AAA3C,wHAAA,OAAO,OAAc;AAC9B,qCAA+C;AAAtC,mHAAA,OAAO,OAAW;AAC3B,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qCAA+C;AAAtC,mHAAA,OAAO,OAAW;AAC3B,6DAAuE;AAA9D,6HAAA,OAAO,OAAgB;AAChC,iDAA2D;AAAlD,qHAAA,OAAO,OAAY;AAC5B,iEAA2E;AAAlE,+HAAA,OAAO,OAAiB;AACjC,0DAAoE;AAA3D,2HAAA,OAAO,OAAe"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PatternStatuses = void 0;
|
|
4
|
+
var PatternStatuses;
|
|
5
|
+
(function (PatternStatuses) {
|
|
6
|
+
PatternStatuses["active"] = "ACTIVE";
|
|
7
|
+
PatternStatuses["deleted"] = "DELETED";
|
|
8
|
+
})(PatternStatuses || (exports.PatternStatuses = PatternStatuses = {}));
|
|
9
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/api/patterns-api/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;AACrB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
|
|
@@ -0,0 +1,107 @@
|
|
|
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["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 PatternsApi = (function (_super) {
|
|
56
|
+
__extends(PatternsApi, _super);
|
|
57
|
+
function PatternsApi() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
_this.apiBasePath = 'api/v1/patterns';
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
PatternsApi.prototype.getAllPatterns = 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
|
+
PatternsApi.prototype.updatePattern = function (contractId, data) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0: return [4, this.apiCall({
|
|
80
|
+
method: 'PUT',
|
|
81
|
+
route: "".concat(this.apiBasePath),
|
|
82
|
+
params: { contractId: contractId },
|
|
83
|
+
data: data,
|
|
84
|
+
})];
|
|
85
|
+
case 1: return [2, _a.sent()];
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
PatternsApi.prototype.createPattern = function (data) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
92
|
+
return __generator(this, function (_a) {
|
|
93
|
+
switch (_a.label) {
|
|
94
|
+
case 0: return [4, this.apiCall({
|
|
95
|
+
method: 'POST',
|
|
96
|
+
route: "".concat(this.apiBasePath),
|
|
97
|
+
data: data,
|
|
98
|
+
})];
|
|
99
|
+
case 1: return [2, _a.sent()];
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
return PatternsApi;
|
|
105
|
+
}(baseApi_1.BaseApi));
|
|
106
|
+
exports.default = PatternsApi;
|
|
107
|
+
//# sourceMappingURL=patternsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patternsApi.js","sourceRoot":"","sources":["../../../../src/api/patterns-api/patternsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AAKrC;IAAyC,+BAAO;IAAhD;;QACmB,iBAAW,GAAG,iBAAiB,CAAC;;IAqCnD,CAAC;IAhCc,oCAAc,GAA3B;;;;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;IAOK,mCAAa,GAAnB,UAAoB,UAAkB,EAAE,IAAsB;;;;4BACrD,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,EAAE,EAAE,UAAU,YAAA,EAAE;4BACtB,IAAI,MAAA;yBACL,CAAC,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAMK,mCAAa,GAAnB,UAAoB,IAAsB;;;;4BACjC,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,IAAI,MAAA;yBACL,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IACH,kBAAC;AAAD,CAAC,AAtCD,CAAyC,iBAAO,GAsC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/patterns-api/types.ts"],"names":[],"mappings":""}
|
|
@@ -14,17 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
17
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
18
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
19
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -62,8 +51,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
62
51
|
}
|
|
63
52
|
};
|
|
64
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
var
|
|
66
|
-
var
|
|
54
|
+
var utils_1 = require("../utils");
|
|
55
|
+
var baseApi_1 = require("./baseApi");
|
|
67
56
|
var ReportingApi = (function (_super) {
|
|
68
57
|
__extends(ReportingApi, _super);
|
|
69
58
|
function ReportingApi() {
|
|
@@ -79,7 +68,7 @@ var ReportingApi = (function (_super) {
|
|
|
79
68
|
case 0: return [4, this.apiCall({
|
|
80
69
|
method: 'GET',
|
|
81
70
|
route: "".concat(this.apiBasePath, "/usage"),
|
|
82
|
-
params: (0,
|
|
71
|
+
params: (0, utils_1.adaptParams)(params),
|
|
83
72
|
signal: signal,
|
|
84
73
|
})];
|
|
85
74
|
case 1: return [2, _c.sent()];
|
|
@@ -87,56 +76,6 @@ var ReportingApi = (function (_super) {
|
|
|
87
76
|
});
|
|
88
77
|
});
|
|
89
78
|
};
|
|
90
|
-
ReportingApi.prototype.retrivePaginatedUsageTraffic = function (filters_1) {
|
|
91
|
-
return __awaiter(this, arguments, void 0, function (filters, options) {
|
|
92
|
-
if (options === void 0) { options = {}; }
|
|
93
|
-
return __generator(this, function (_a) {
|
|
94
|
-
switch (_a.label) {
|
|
95
|
-
case 0: return [4, this.apiCall({
|
|
96
|
-
method: 'GET',
|
|
97
|
-
route: "".concat(this.apiBasePath, "/usage-traffic"),
|
|
98
|
-
params: filters,
|
|
99
|
-
signal: options.signal,
|
|
100
|
-
})];
|
|
101
|
-
case 1: return [2, _a.sent()];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
ReportingApi.prototype.retriveAllUsageTraffic = function (filters_1) {
|
|
107
|
-
return __awaiter(this, arguments, void 0, function (filters, options) {
|
|
108
|
-
var page, totalRecords, results, response, error_1;
|
|
109
|
-
var _a;
|
|
110
|
-
if (options === void 0) { options = {}; }
|
|
111
|
-
return __generator(this, function (_b) {
|
|
112
|
-
switch (_b.label) {
|
|
113
|
-
case 0:
|
|
114
|
-
page = 1;
|
|
115
|
-
totalRecords = 0;
|
|
116
|
-
results = [];
|
|
117
|
-
_b.label = 1;
|
|
118
|
-
case 1:
|
|
119
|
-
_b.trys.push([1, 3, , 4]);
|
|
120
|
-
return [4, this.retrivePaginatedUsageTraffic(__assign(__assign(__assign({}, filters), (!filters.limit && { limit: 1000 })), { page: page }), options)];
|
|
121
|
-
case 2:
|
|
122
|
-
response = _b.sent();
|
|
123
|
-
if (!((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.length))
|
|
124
|
-
return [3, 5];
|
|
125
|
-
results = results.concat(response.data);
|
|
126
|
-
totalRecords = response.total;
|
|
127
|
-
page++;
|
|
128
|
-
return [3, 4];
|
|
129
|
-
case 3:
|
|
130
|
-
error_1 = _b.sent();
|
|
131
|
-
throw new Error("Error fetching page ".concat(page, ": ").concat(error_1));
|
|
132
|
-
case 4:
|
|
133
|
-
if (results.length <= totalRecords) return [3, 1];
|
|
134
|
-
_b.label = 5;
|
|
135
|
-
case 5: return [2, results];
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
79
|
return ReportingApi;
|
|
141
80
|
}(baseApi_1.BaseApi));
|
|
142
81
|
exports.default = ReportingApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reportingApi.js","sourceRoot":"","sources":["../../../src/api/reportingApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kCAAuC;AAEvC,qCAAoC;AAEpC;IAA0C,gCAAO;IAAjD;;QACmB,iBAAW,GAAG,QAAQ,CAAC;;IAoB1C,CAAC;IARc,+BAAQ,GAArB;4DAAsB,MAA0B,EAAE,EAA+B;gBAA/B,qBAA6B,EAAE,KAAA,EAA7B,MAAM,YAAA;;;4BACjD,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;4BAC/C,MAAM,QAAA;yBACP,CAAC,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IACH,mBAAC;AAAD,CAAC,AArBD,CAA0C,iBAAO,GAqBhD"}
|
|
@@ -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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["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 TiersApi = (function (_super) {
|
|
56
|
+
__extends(TiersApi, _super);
|
|
57
|
+
function TiersApi() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
_this.apiBasePath = 'api/v1/tiers';
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
TiersApi.prototype.listOfTiers = 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, "/list"),
|
|
69
|
+
})];
|
|
70
|
+
case 1: return [2, _a.sent()];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
return TiersApi;
|
|
76
|
+
}(baseApi_1.BaseApi));
|
|
77
|
+
exports.default = TiersApi;
|
|
78
|
+
//# sourceMappingURL=tiersApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiersApi.js","sourceRoot":"","sources":["../../../../src/api/tiers-api/tiersApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AAIrC;IAAsC,4BAAO;IAA7C;;QACmB,iBAAW,GAAG,cAAc,CAAC;;IAWhD,CAAC;IANc,8BAAW,GAAxB;;;;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,eAAC;AAAD,CAAC,AAZD,CAAsC,iBAAO,GAY5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/tiers-api/types.ts"],"names":[],"mappings":""}
|