@or-sdk/billing 10.21.1 → 10.21.2-beta.1888.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/api/customerUsageApi/index.js +53 -59
- package/dist/cjs/api/customerUsageApi/index.js.map +1 -1
- package/dist/cjs/api/customerUsageApi/types.js +19 -1
- package/dist/cjs/api/customerUsageApi/types.js.map +1 -1
- package/dist/cjs/types.js +7 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/api/customerUsageApi/index.js +23 -41
- package/dist/esm/api/customerUsageApi/index.js.map +1 -1
- package/dist/esm/api/customerUsageApi/types.js +18 -0
- package/dist/esm/api/customerUsageApi/types.js.map +1 -1
- package/dist/esm/types.js +6 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/types/api/customerUsageApi/index.d.ts +10 -21
- package/dist/types/api/customerUsageApi/index.d.ts.map +1 -1
- package/dist/types/api/customerUsageApi/types.d.ts +57 -21
- package/dist/types/api/customerUsageApi/types.d.ts.map +1 -1
- package/dist/types/api/dataReconciliationApi/types.d.ts +2 -2
- package/dist/types/api/dataReconciliationApi/types.d.ts.map +1 -1
- package/dist/types/types.d.ts +4 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/customerUsageApi/index.ts +456 -378
- package/src/api/customerUsageApi/types.ts +60 -23
- package/src/api/dataReconciliationApi/types.ts +3 -2
- package/src/types.ts +6 -0
|
@@ -63,23 +63,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
63
63
|
};
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
65
|
var baseApi_1 = require("../baseApi");
|
|
66
|
+
var types_1 = require("./types");
|
|
66
67
|
var CustomerUsageApi = (function (_super) {
|
|
67
68
|
__extends(CustomerUsageApi, _super);
|
|
68
69
|
function CustomerUsageApi() {
|
|
69
70
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
70
71
|
_this.apiBasePath = '/customer-usage';
|
|
71
72
|
_this.apiCursorPath = '/customer-usage/cursor';
|
|
72
|
-
_this.excludedNonUsageSkusPatterns = [
|
|
73
|
-
'^IDN-.*$',
|
|
74
|
-
'^USR-.*$',
|
|
75
|
-
'^PLT-.*$',
|
|
76
|
-
'^PRO-.*$',
|
|
77
|
-
'^CST.*$',
|
|
78
|
-
'^STR-DBS-.*$',
|
|
79
|
-
];
|
|
80
|
-
_this.includedStorageSkusPatterns = ['^STR-DBS-.*$'];
|
|
81
|
-
_this.includedIdentifiersSkusPatterns = ['^IDN-.*$'];
|
|
82
|
-
_this.includedUsersSkusPatterns = ['^USR-.*$'];
|
|
83
73
|
return _this;
|
|
84
74
|
}
|
|
85
75
|
CustomerUsageApi.prototype.getAllTraffic = function (filters_1) {
|
|
@@ -93,97 +83,101 @@ var CustomerUsageApi = (function (_super) {
|
|
|
93
83
|
});
|
|
94
84
|
});
|
|
95
85
|
};
|
|
86
|
+
CustomerUsageApi.prototype.getAllTrafficCursor = function (filters_1) {
|
|
87
|
+
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
88
|
+
if (apiParams === void 0) { apiParams = {}; }
|
|
89
|
+
return __generator(this, function (_a) {
|
|
90
|
+
switch (_a.label) {
|
|
91
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiCursorPath), params: filters }, apiParams))];
|
|
92
|
+
case 1: return [2, _a.sent()];
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
};
|
|
96
97
|
CustomerUsageApi.prototype.getUsageTraffic = function (filters_1) {
|
|
97
98
|
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
98
|
-
var _a;
|
|
99
99
|
if (apiParams === void 0) { apiParams = {}; }
|
|
100
|
-
return __generator(this, function (
|
|
101
|
-
switch (
|
|
102
|
-
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath
|
|
103
|
-
|
|
104
|
-
this.excludedNonUsageSkusPatterns }) }, apiParams))];
|
|
105
|
-
case 1: return [2, _b.sent()];
|
|
100
|
+
return __generator(this, function (_a) {
|
|
101
|
+
switch (_a.label) {
|
|
102
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath, "/").concat(types_1.LogicalCategoryEnum.USAGE), params: filters }, apiParams))];
|
|
103
|
+
case 1: return [2, _a.sent()];
|
|
106
104
|
}
|
|
107
105
|
});
|
|
108
106
|
});
|
|
109
107
|
};
|
|
110
|
-
CustomerUsageApi.prototype.
|
|
108
|
+
CustomerUsageApi.prototype.getUsageTrafficCursor = function (filters_1) {
|
|
111
109
|
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
112
|
-
var _a;
|
|
113
110
|
if (apiParams === void 0) { apiParams = {}; }
|
|
114
|
-
return __generator(this, function (
|
|
115
|
-
switch (
|
|
116
|
-
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.
|
|
117
|
-
|
|
118
|
-
: this.includedIdentifiersSkusPatterns }) }, apiParams))];
|
|
119
|
-
case 1: return [2, _b.sent()];
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
113
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiCursorPath, "/").concat(types_1.LogicalCategoryEnum.USAGE), params: filters }, apiParams))];
|
|
114
|
+
case 1: return [2, _a.sent()];
|
|
120
115
|
}
|
|
121
116
|
});
|
|
122
117
|
});
|
|
123
118
|
};
|
|
124
|
-
CustomerUsageApi.prototype.
|
|
119
|
+
CustomerUsageApi.prototype.getIdentifiersTraffic = function (filters_1) {
|
|
125
120
|
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
126
|
-
var _a;
|
|
127
121
|
if (apiParams === void 0) { apiParams = {}; }
|
|
128
|
-
return __generator(this, function (
|
|
129
|
-
switch (
|
|
130
|
-
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath
|
|
131
|
-
|
|
132
|
-
: this.includedUsersSkusPatterns }) }, apiParams))];
|
|
133
|
-
case 1: return [2, _b.sent()];
|
|
122
|
+
return __generator(this, function (_a) {
|
|
123
|
+
switch (_a.label) {
|
|
124
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath, "/").concat(types_1.LogicalCategoryEnum.IDENTIFIERS), params: filters }, apiParams))];
|
|
125
|
+
case 1: return [2, _a.sent()];
|
|
134
126
|
}
|
|
135
127
|
});
|
|
136
128
|
});
|
|
137
129
|
};
|
|
138
|
-
CustomerUsageApi.prototype.
|
|
130
|
+
CustomerUsageApi.prototype.getIdentifiersTrafficCursor = function (filters_1) {
|
|
139
131
|
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
140
|
-
var _a;
|
|
141
132
|
if (apiParams === void 0) { apiParams = {}; }
|
|
142
|
-
return __generator(this, function (
|
|
143
|
-
switch (
|
|
144
|
-
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiCursorPath
|
|
145
|
-
|
|
146
|
-
: this.includedUsersSkusPatterns }) }, apiParams))];
|
|
147
|
-
case 1: return [2, _b.sent()];
|
|
133
|
+
return __generator(this, function (_a) {
|
|
134
|
+
switch (_a.label) {
|
|
135
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiCursorPath, "/").concat(types_1.LogicalCategoryEnum.IDENTIFIERS), params: filters }, apiParams))];
|
|
136
|
+
case 1: return [2, _a.sent()];
|
|
148
137
|
}
|
|
149
138
|
});
|
|
150
139
|
});
|
|
151
140
|
};
|
|
152
|
-
CustomerUsageApi.prototype.
|
|
141
|
+
CustomerUsageApi.prototype.getUsersTraffic = function (filters_1) {
|
|
153
142
|
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
154
143
|
if (apiParams === void 0) { apiParams = {}; }
|
|
155
144
|
return __generator(this, function (_a) {
|
|
156
145
|
switch (_a.label) {
|
|
157
|
-
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.
|
|
146
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath, "/").concat(types_1.LogicalCategoryEnum.USERS), params: filters }, apiParams))];
|
|
158
147
|
case 1: return [2, _a.sent()];
|
|
159
148
|
}
|
|
160
149
|
});
|
|
161
150
|
});
|
|
162
151
|
};
|
|
163
|
-
CustomerUsageApi.prototype.
|
|
152
|
+
CustomerUsageApi.prototype.getUsersTrafficCursor = function (filters_1) {
|
|
164
153
|
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
165
|
-
var _a;
|
|
166
154
|
if (apiParams === void 0) { apiParams = {}; }
|
|
167
|
-
return __generator(this, function (
|
|
168
|
-
switch (
|
|
169
|
-
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiCursorPath
|
|
170
|
-
|
|
171
|
-
: this.excludedNonUsageSkusPatterns }) }, apiParams))];
|
|
172
|
-
case 1: return [2, _b.sent()];
|
|
155
|
+
return __generator(this, function (_a) {
|
|
156
|
+
switch (_a.label) {
|
|
157
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiCursorPath, "/").concat(types_1.LogicalCategoryEnum.USERS), params: filters }, apiParams))];
|
|
158
|
+
case 1: return [2, _a.sent()];
|
|
173
159
|
}
|
|
174
160
|
});
|
|
175
161
|
});
|
|
176
162
|
};
|
|
177
163
|
CustomerUsageApi.prototype.getStorageTraffic = function (filters_1) {
|
|
178
164
|
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
179
|
-
var _a;
|
|
180
165
|
if (apiParams === void 0) { apiParams = {}; }
|
|
181
|
-
return __generator(this, function (
|
|
182
|
-
switch (
|
|
183
|
-
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
166
|
+
return __generator(this, function (_a) {
|
|
167
|
+
switch (_a.label) {
|
|
168
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath, "/").concat(types_1.LogicalCategoryEnum.STORAGE), params: filters }, apiParams))];
|
|
169
|
+
case 1: return [2, _a.sent()];
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
CustomerUsageApi.prototype.getStorageTrafficCursor = function (filters_1) {
|
|
175
|
+
return __awaiter(this, arguments, void 0, function (filters, apiParams) {
|
|
176
|
+
if (apiParams === void 0) { apiParams = {}; }
|
|
177
|
+
return __generator(this, function (_a) {
|
|
178
|
+
switch (_a.label) {
|
|
179
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiCursorPath, "/").concat(types_1.LogicalCategoryEnum.STORAGE), params: filters }, apiParams))];
|
|
180
|
+
case 1: return [2, _a.sent()];
|
|
187
181
|
}
|
|
188
182
|
});
|
|
189
183
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAqC;AAErC,iCASiB;AAUjB;IAA8C,oCAAO;IAArD;;QACmB,iBAAW,GAAG,iBAAiB,CAAC;QAChC,mBAAa,GAAG,wBAAwB,CAAC;;IA2jB5D,CAAC;IA1gBc,wCAAa,GAA1B;4DACE,OAAiC,EACjC,SAAiC;YAAjC,0BAAA,EAAA,cAAiC;;;4BAE1B,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,UAAG,IA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C;YAAjC,0BAAA,EAAA,cAAiC;;;4BAE1B,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,UAAG,IAAI,CAAC,aAAa,cAAI,2BAAmB,CAAC,OAAO,CAAE,EAC7D,MAAM,EAAE,OAAO,IACZ,SAAS,EACZ,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAqCY,6CAAkB,GAA/B;4DACE,OAAmC,EACnC,SAAiC;YAAjC,0BAAA,EAAA,cAAiC;;;4BAE1B,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,OAAO,IACZ,SAAS,EACZ,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IA6BY,mDAAwB,GAArC;4DACE,OAAgF,EAChF,SAAiC;YAAjC,0BAAA,EAAA,cAAiC;;;4BAE1B,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,OAAO,IACZ,SAAS,EACZ,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IA6BY,wCAAa,GAA1B;4DACE,IAAsB,EACtB,SAAiC;YAAjC,0BAAA,EAAA,cAAiC;;;4BAE1B,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,sBAAsB,EAC7B,IAAI,MAAA,IACD,SAAS,EACZ,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IACH,uBAAC;AAAD,CAAC,AA7jBD,CAA8C,iBAAO,GA6jBpD"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CategoryNamespace = void 0;
|
|
3
|
+
exports.CategoryNamespace = exports.BusinessCategoryEnum = exports.LogicalCategoryEnum = void 0;
|
|
4
|
+
var LogicalCategoryEnum;
|
|
5
|
+
(function (LogicalCategoryEnum) {
|
|
6
|
+
LogicalCategoryEnum["USAGE"] = "usage";
|
|
7
|
+
LogicalCategoryEnum["USERS"] = "users";
|
|
8
|
+
LogicalCategoryEnum["IDENTIFIERS"] = "identifiers";
|
|
9
|
+
LogicalCategoryEnum["STORAGE"] = "storage";
|
|
10
|
+
})(LogicalCategoryEnum || (exports.LogicalCategoryEnum = LogicalCategoryEnum = {}));
|
|
11
|
+
var BusinessCategoryEnum;
|
|
12
|
+
(function (BusinessCategoryEnum) {
|
|
13
|
+
BusinessCategoryEnum["USERS"] = "Users";
|
|
14
|
+
BusinessCategoryEnum["IDENTIFIERS"] = "Identifiers";
|
|
15
|
+
BusinessCategoryEnum["PROCESSING"] = "Processing";
|
|
16
|
+
BusinessCategoryEnum["TELEPHONY"] = "Telephony";
|
|
17
|
+
BusinessCategoryEnum["MESSAGING"] = "Messaging";
|
|
18
|
+
BusinessCategoryEnum["EXECUTABLE"] = "Executable";
|
|
19
|
+
BusinessCategoryEnum["CARRIER_FEES"] = "Carrier Fees";
|
|
20
|
+
BusinessCategoryEnum["DATA_STORAGE"] = "Data Storage";
|
|
21
|
+
})(BusinessCategoryEnum || (exports.BusinessCategoryEnum = BusinessCategoryEnum = {}));
|
|
4
22
|
var CategoryNamespace;
|
|
5
23
|
(function (CategoryNamespace) {
|
|
6
24
|
CategoryNamespace["PROCESSING_FLOW"] = "processing-flow";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,0CAAmB,CAAA;AACrB,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,mDAA2B,CAAA;IAC3B,iDAAyB,CAAA;IACzB,+CAAuB,CAAA;IACvB,+CAAuB,CAAA;IACvB,iDAAyB,CAAA;IACzB,qDAA6B,CAAA;IAC7B,qDAA6B,CAAA;AAC/B,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AAED,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,0DAAqC,CAAA;IACrC,8DAAyC,CAAA;IACzC,sDAAiC,CAAA;IACjC,sCAAiB,CAAA;IACjB,wDAAmC,CAAA;IACnC,sDAAiC,CAAA;IACjC,2DAAsC,CAAA;IACtC,gDAA2B,CAAA;IAC3B,kCAAa,CAAA;IACb,8CAAyB,CAAA;IACzB,wDAAmC,CAAA;IACnC,0DAAqC,CAAA;AACvC,CAAC,EAdW,iBAAiB,iCAAjB,iBAAiB,QAc5B"}
|
package/dist/cjs/types.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.SortOrder = exports.Status = void 0;
|
|
17
|
+
exports.DataSourceProvider = exports.SortOrder = exports.Status = void 0;
|
|
18
18
|
__exportStar(require("./api/flowsApi/types"), exports);
|
|
19
19
|
__exportStar(require("./api/accountsApi/types"), exports);
|
|
20
20
|
__exportStar(require("./api/contractsApi/types"), exports);
|
|
@@ -51,4 +51,10 @@ var SortOrder;
|
|
|
51
51
|
SortOrder["ASC"] = "ASC";
|
|
52
52
|
SortOrder["DESC"] = "DESC";
|
|
53
53
|
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
54
|
+
var DataSourceProvider;
|
|
55
|
+
(function (DataSourceProvider) {
|
|
56
|
+
DataSourceProvider["AZURE"] = "azure";
|
|
57
|
+
DataSourceProvider["DRUID"] = "druid";
|
|
58
|
+
})(DataSourceProvider || (exports.DataSourceProvider = DataSourceProvider = {}));
|
|
59
|
+
;
|
|
54
60
|
//# sourceMappingURL=types.js.map
|
package/dist/cjs/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,uDAAqC;AACrC,0DAAwC;AACxC,2DAAyC;AACzC,2DAAyC;AACzC,2DAAyC;AACzC,8DAA4C;AAC5C,0DAAwC;AACxC,kEAAgD;AAChD,6DAA2C;AAC3C,oEAAkD;AAClD,sDAAoC;AACpC,4DAA0C;AAC1C,sDAAoC;AACpC,uDAAqC;AACrC,+DAA6C;AAC7C,+DAA6C;AAC7C,yDAAuC;AACvC,wDAAsC;AACtC,oEAAkD;AAClD,8DAA4C;AAC5C,4DAA0C;AAC1C,2DAAyC;AACzC,iEAA+C;AAC/C,mEAAiD;AACjD,oEAAkD;AAElD,8CAA4B;AAyB5B,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACjB,mCAAyB,CAAA;AAC3B,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,uDAAqC;AACrC,0DAAwC;AACxC,2DAAyC;AACzC,2DAAyC;AACzC,2DAAyC;AACzC,8DAA4C;AAC5C,0DAAwC;AACxC,kEAAgD;AAChD,6DAA2C;AAC3C,oEAAkD;AAClD,sDAAoC;AACpC,4DAA0C;AAC1C,sDAAoC;AACpC,uDAAqC;AACrC,+DAA6C;AAC7C,+DAA6C;AAC7C,yDAAuC;AACvC,wDAAsC;AACtC,oEAAkD;AAClD,8DAA4C;AAC5C,4DAA0C;AAC1C,2DAAyC;AACzC,iEAA+C;AAC/C,mEAAiD;AACjD,oEAAkD;AAElD,8CAA4B;AAyB5B,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACjB,mCAAyB,CAAA;AAC3B,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AA2BD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,qCAAe,CAAA;AACjB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAAA,CAAC"}
|
|
@@ -8,79 +8,61 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { BaseApi } from '../baseApi';
|
|
11
|
+
import { LogicalCategoryEnum, } from './types';
|
|
11
12
|
export default class CustomerUsageApi extends BaseApi {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.apiBasePath = '/customer-usage';
|
|
15
16
|
this.apiCursorPath = '/customer-usage/cursor';
|
|
16
|
-
this.excludedNonUsageSkusPatterns = [
|
|
17
|
-
'^IDN-.*$',
|
|
18
|
-
'^USR-.*$',
|
|
19
|
-
'^PLT-.*$',
|
|
20
|
-
'^PRO-.*$',
|
|
21
|
-
'^CST.*$',
|
|
22
|
-
'^STR-DBS-.*$',
|
|
23
|
-
];
|
|
24
|
-
this.includedStorageSkusPatterns = ['^STR-DBS-.*$'];
|
|
25
|
-
this.includedIdentifiersSkusPatterns = ['^IDN-.*$'];
|
|
26
|
-
this.includedUsersSkusPatterns = ['^USR-.*$'];
|
|
27
17
|
}
|
|
28
18
|
getAllTraffic(filters_1) {
|
|
29
19
|
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
30
20
|
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}`, params: filters }, apiParams));
|
|
31
21
|
});
|
|
32
22
|
}
|
|
23
|
+
getAllTrafficCursor(filters_1) {
|
|
24
|
+
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
25
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiCursorPath}`, params: filters }, apiParams));
|
|
26
|
+
});
|
|
27
|
+
}
|
|
33
28
|
getUsageTraffic(filters_1) {
|
|
34
29
|
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
35
|
-
|
|
36
|
-
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}`, params: Object.assign(Object.assign({}, filters), { excludeSkus: ((_a = filters.excludeSkus) === null || _a === void 0 ? void 0 : _a.length) ?
|
|
37
|
-
filters.excludeSkus.concat(this.excludedNonUsageSkusPatterns) :
|
|
38
|
-
this.excludedNonUsageSkusPatterns }) }, apiParams));
|
|
30
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}/${LogicalCategoryEnum.USAGE}`, params: filters }, apiParams));
|
|
39
31
|
});
|
|
40
32
|
}
|
|
41
|
-
|
|
33
|
+
getUsageTrafficCursor(filters_1) {
|
|
42
34
|
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
43
|
-
|
|
44
|
-
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}`, params: Object.assign(Object.assign({}, filters), { includeSkus: ((_a = filters.includeSkus) === null || _a === void 0 ? void 0 : _a.length) ?
|
|
45
|
-
filters.includeSkus.concat(this.includedIdentifiersSkusPatterns)
|
|
46
|
-
: this.includedIdentifiersSkusPatterns }) }, apiParams));
|
|
35
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiCursorPath}/${LogicalCategoryEnum.USAGE}`, params: filters }, apiParams));
|
|
47
36
|
});
|
|
48
37
|
}
|
|
49
|
-
|
|
38
|
+
getIdentifiersTraffic(filters_1) {
|
|
50
39
|
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
51
|
-
|
|
52
|
-
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}`, params: Object.assign(Object.assign({}, filters), { includeSkus: ((_a = filters.includeSkus) === null || _a === void 0 ? void 0 : _a.length) ?
|
|
53
|
-
filters.includeSkus.concat(this.includedUsersSkusPatterns)
|
|
54
|
-
: this.includedUsersSkusPatterns }) }, apiParams));
|
|
40
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}/${LogicalCategoryEnum.IDENTIFIERS}`, params: filters }, apiParams));
|
|
55
41
|
});
|
|
56
42
|
}
|
|
57
|
-
|
|
43
|
+
getIdentifiersTrafficCursor(filters_1) {
|
|
58
44
|
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
59
|
-
|
|
60
|
-
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiCursorPath}`, params: Object.assign(Object.assign({}, filters), { includeSkus: ((_a = filters.includeSkus) === null || _a === void 0 ? void 0 : _a.length)
|
|
61
|
-
? filters.includeSkus.concat(this.includedUsersSkusPatterns)
|
|
62
|
-
: this.includedUsersSkusPatterns }) }, apiParams));
|
|
45
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiCursorPath}/${LogicalCategoryEnum.IDENTIFIERS}`, params: filters }, apiParams));
|
|
63
46
|
});
|
|
64
47
|
}
|
|
65
|
-
|
|
48
|
+
getUsersTraffic(filters_1) {
|
|
66
49
|
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
67
|
-
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.
|
|
50
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}/${LogicalCategoryEnum.USERS}`, params: filters }, apiParams));
|
|
68
51
|
});
|
|
69
52
|
}
|
|
70
|
-
|
|
53
|
+
getUsersTrafficCursor(filters_1) {
|
|
71
54
|
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
72
|
-
|
|
73
|
-
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiCursorPath}`, params: Object.assign(Object.assign({}, filters), { excludeSkus: ((_a = filters.excludeSkus) === null || _a === void 0 ? void 0 : _a.length)
|
|
74
|
-
? filters.excludeSkus.concat(this.excludedNonUsageSkusPatterns)
|
|
75
|
-
: this.excludedNonUsageSkusPatterns }) }, apiParams));
|
|
55
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiCursorPath}/${LogicalCategoryEnum.USERS}`, params: filters }, apiParams));
|
|
76
56
|
});
|
|
77
57
|
}
|
|
78
58
|
getStorageTraffic(filters_1) {
|
|
79
59
|
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
60
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}/${LogicalCategoryEnum.STORAGE}`, params: filters }, apiParams));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
getStorageTrafficCursor(filters_1) {
|
|
64
|
+
return __awaiter(this, arguments, void 0, function* (filters, apiParams = {}) {
|
|
65
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiCursorPath}/${LogicalCategoryEnum.STORAGE}`, params: filters }, apiParams));
|
|
84
66
|
});
|
|
85
67
|
}
|
|
86
68
|
getSessionsTraffic(filters_1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/index.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
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AAE,EAC3D,MAAM,EAAE,OAAO,IACZ,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;IA+BY,uBAAuB;6DAClC,OAA0D,EAC1D,YAA+B,EAAE;YAEjC,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,GAAG,IAAI,CAAC,aAAa,IAAI,mBAAmB,CAAC,OAAO,EAAE,EAC7D,MAAM,EAAE,OAAO,IACZ,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;IAqCY,kBAAkB;6DAC7B,OAAmC,EACnC,YAA+B,EAAE;YAEjC,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,OAAO,IACZ,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;IA6BY,wBAAwB;6DACnC,OAAgF,EAChF,YAA+B,EAAE;YAEjC,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,OAAO,IACZ,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;IA6BY,aAAa;6DACxB,IAAsB,EACtB,YAA+B,EAAE;YAEjC,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,sBAAsB,EAC7B,IAAI,IACD,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;CACF"}
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
export var LogicalCategoryEnum;
|
|
2
|
+
(function (LogicalCategoryEnum) {
|
|
3
|
+
LogicalCategoryEnum["USAGE"] = "usage";
|
|
4
|
+
LogicalCategoryEnum["USERS"] = "users";
|
|
5
|
+
LogicalCategoryEnum["IDENTIFIERS"] = "identifiers";
|
|
6
|
+
LogicalCategoryEnum["STORAGE"] = "storage";
|
|
7
|
+
})(LogicalCategoryEnum || (LogicalCategoryEnum = {}));
|
|
8
|
+
export var BusinessCategoryEnum;
|
|
9
|
+
(function (BusinessCategoryEnum) {
|
|
10
|
+
BusinessCategoryEnum["USERS"] = "Users";
|
|
11
|
+
BusinessCategoryEnum["IDENTIFIERS"] = "Identifiers";
|
|
12
|
+
BusinessCategoryEnum["PROCESSING"] = "Processing";
|
|
13
|
+
BusinessCategoryEnum["TELEPHONY"] = "Telephony";
|
|
14
|
+
BusinessCategoryEnum["MESSAGING"] = "Messaging";
|
|
15
|
+
BusinessCategoryEnum["EXECUTABLE"] = "Executable";
|
|
16
|
+
BusinessCategoryEnum["CARRIER_FEES"] = "Carrier Fees";
|
|
17
|
+
BusinessCategoryEnum["DATA_STORAGE"] = "Data Storage";
|
|
18
|
+
})(BusinessCategoryEnum || (BusinessCategoryEnum = {}));
|
|
1
19
|
export var CategoryNamespace;
|
|
2
20
|
(function (CategoryNamespace) {
|
|
3
21
|
CategoryNamespace["PROCESSING_FLOW"] = "processing-flow";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,0CAAmB,CAAA;AACrB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED,MAAM,CAAN,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,mDAA2B,CAAA;IAC3B,iDAAyB,CAAA;IACzB,+CAAuB,CAAA;IACvB,+CAAuB,CAAA;IACvB,iDAAyB,CAAA;IACzB,qDAA6B,CAAA;IAC7B,qDAA6B,CAAA;AAC/B,CAAC,EATW,oBAAoB,KAApB,oBAAoB,QAS/B;AAED,MAAM,CAAN,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,0DAAqC,CAAA;IACrC,8DAAyC,CAAA;IACzC,sDAAiC,CAAA;IACjC,sCAAiB,CAAA;IACjB,wDAAmC,CAAA;IACnC,sDAAiC,CAAA;IACjC,2DAAsC,CAAA;IACtC,gDAA2B,CAAA;IAC3B,kCAAa,CAAA;IACb,8CAAyB,CAAA;IACzB,wDAAmC,CAAA;IACnC,0DAAqC,CAAA;AACvC,CAAC,EAdW,iBAAiB,KAAjB,iBAAiB,QAc5B"}
|
package/dist/esm/types.js
CHANGED
|
@@ -34,4 +34,10 @@ export var SortOrder;
|
|
|
34
34
|
SortOrder["ASC"] = "ASC";
|
|
35
35
|
SortOrder["DESC"] = "DESC";
|
|
36
36
|
})(SortOrder || (SortOrder = {}));
|
|
37
|
+
export var DataSourceProvider;
|
|
38
|
+
(function (DataSourceProvider) {
|
|
39
|
+
DataSourceProvider["AZURE"] = "azure";
|
|
40
|
+
DataSourceProvider["DRUID"] = "druid";
|
|
41
|
+
})(DataSourceProvider || (DataSourceProvider = {}));
|
|
42
|
+
;
|
|
37
43
|
//# sourceMappingURL=types.js.map
|
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AAC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AA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAElD,cAAc,aAAa,CAAC;AAyB5B,MAAM,CAAN,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACjB,mCAAyB,CAAA;AAC3B,CAAC,EAHW,MAAM,KAAN,MAAM,QAGjB;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA2BD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,qCAAe,CAAA;AACjB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAAA,CAAC"}
|
|
@@ -1,30 +1,19 @@
|
|
|
1
1
|
import { OptionalApiParams, ResponseDto, CursorResponseDto } from '../../types';
|
|
2
2
|
import { BaseApi } from '../baseApi';
|
|
3
|
-
import { CustomerUsageQueryParams, QueueBuilderResponse, SessionRecordDto, SessionsTrafficQueryParams, UsageQueueParams, UsageRecordDto } from './types';
|
|
3
|
+
import { CustomerUsageQueryParams, FindUsageByCursor, QueueBuilderResponse, SessionRecordDto, SessionsTrafficQueryParams, UsageQueueParams, UsageRecordDto } from './types';
|
|
4
4
|
export default class CustomerUsageApi extends BaseApi {
|
|
5
5
|
private readonly apiBasePath;
|
|
6
6
|
private readonly apiCursorPath;
|
|
7
|
-
private readonly excludedNonUsageSkusPatterns;
|
|
8
|
-
private readonly includedStorageSkusPatterns;
|
|
9
|
-
private readonly includedIdentifiersSkusPatterns;
|
|
10
|
-
private readonly includedUsersSkusPatterns;
|
|
11
7
|
getAllTraffic(filters: CustomerUsageQueryParams, apiParams?: OptionalApiParams): Promise<ResponseDto<UsageRecordDto>>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
limit?: number;
|
|
22
|
-
}, apiParams?: OptionalApiParams): Promise<CursorResponseDto<UsageRecordDto>>;
|
|
23
|
-
getUsageTrafficCursor(filters: Omit<CustomerUsageQueryParams, 'page' | 'limit' | 'sortBy' | 'sortOrder'> & {
|
|
24
|
-
cursor?: string | null;
|
|
25
|
-
limit?: number;
|
|
26
|
-
}, apiParams?: OptionalApiParams): Promise<CursorResponseDto<UsageRecordDto>>;
|
|
27
|
-
getStorageTraffic(filters: Omit<CustomerUsageQueryParams, 'dataSet'>, apiParams?: OptionalApiParams): Promise<ResponseDto<UsageRecordDto>>;
|
|
8
|
+
getAllTrafficCursor(filters: FindUsageByCursor, apiParams?: OptionalApiParams): Promise<CursorResponseDto<UsageRecordDto>>;
|
|
9
|
+
getUsageTraffic(filters: Omit<CustomerUsageQueryParams, 'logicalCategory'>, apiParams?: OptionalApiParams): Promise<ResponseDto<UsageRecordDto>>;
|
|
10
|
+
getUsageTrafficCursor(filters: Omit<FindUsageByCursor, 'logicalCategory'>, apiParams?: OptionalApiParams): Promise<CursorResponseDto<UsageRecordDto>>;
|
|
11
|
+
getIdentifiersTraffic(filters: Omit<CustomerUsageQueryParams, 'logicalCategory'>, apiParams?: OptionalApiParams): Promise<ResponseDto<UsageRecordDto>>;
|
|
12
|
+
getIdentifiersTrafficCursor(filters: Omit<FindUsageByCursor, 'logicalCategory'>, apiParams?: OptionalApiParams): Promise<CursorResponseDto<UsageRecordDto>>;
|
|
13
|
+
getUsersTraffic(filters: Omit<CustomerUsageQueryParams, 'logicalCategory'>, apiParams?: OptionalApiParams): Promise<ResponseDto<UsageRecordDto>>;
|
|
14
|
+
getUsersTrafficCursor(filters: Omit<FindUsageByCursor, 'logicalCategory'>, apiParams?: OptionalApiParams): Promise<CursorResponseDto<UsageRecordDto>>;
|
|
15
|
+
getStorageTraffic(filters: Omit<CustomerUsageQueryParams, 'logicalCategory'>, apiParams?: OptionalApiParams): Promise<ResponseDto<UsageRecordDto>>;
|
|
16
|
+
getStorageTrafficCursor(filters: Omit<CustomerUsageQueryParams, 'logicalCategory'>, apiParams?: OptionalApiParams): Promise<CursorResponseDto<UsageRecordDto>>;
|
|
28
17
|
getSessionsTraffic(filters: SessionsTrafficQueryParams, apiParams?: OptionalApiParams): Promise<ResponseDto<SessionRecordDto>>;
|
|
29
18
|
getSessionsTrafficCursor(filters: SessionsTrafficQueryParams & {
|
|
30
19
|
cursor?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,gBAAgB,EAChB,cAAc,EACf,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/customerUsageApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EAEjB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,gBAAgB,EAChB,cAAc,EACf,MAAM,SAAS,CAAC;AAUjB,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,OAAO;IACnD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4B;IAiD7C,aAAa,CACxB,OAAO,EAAE,wBAAwB,EACjC,SAAS,GAAE,iBAAs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IAsC1B,uBAAuB,CAClC,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,iBAAiB,CAAC,EAC1D,SAAS,GAAE,iBAAsB,GAChC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IA4ChC,kBAAkB,CAC7B,OAAO,EAAE,0BAA0B,EACnC,SAAS,GAAE,iBAAsB,GAChC,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAoC5B,wBAAwB,CACnC,OAAO,EAAE,0BAA0B,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAChF,SAAS,GAAE,iBAAsB,GAChC,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAoClC,aAAa,CACxB,IAAI,EAAE,gBAAgB,EACtB,SAAS,GAAE,iBAAsB,GAChC,OAAO,CAAC,oBAAoB,CAAC;CAQjC"}
|
|
@@ -1,4 +1,35 @@
|
|
|
1
|
-
import { RequestDto } from '../../types';
|
|
1
|
+
import { DataSourceProvider, RequestDto } from '../../types';
|
|
2
|
+
export declare enum LogicalCategoryEnum {
|
|
3
|
+
USAGE = "usage",
|
|
4
|
+
USERS = "users",
|
|
5
|
+
IDENTIFIERS = "identifiers",
|
|
6
|
+
STORAGE = "storage"
|
|
7
|
+
}
|
|
8
|
+
export declare enum BusinessCategoryEnum {
|
|
9
|
+
USERS = "Users",
|
|
10
|
+
IDENTIFIERS = "Identifiers",
|
|
11
|
+
PROCESSING = "Processing",
|
|
12
|
+
TELEPHONY = "Telephony",
|
|
13
|
+
MESSAGING = "Messaging",
|
|
14
|
+
EXECUTABLE = "Executable",
|
|
15
|
+
CARRIER_FEES = "Carrier Fees",
|
|
16
|
+
DATA_STORAGE = "Data Storage"
|
|
17
|
+
}
|
|
18
|
+
export declare enum CategoryNamespace {
|
|
19
|
+
PROCESSING_FLOW = "processing-flow",
|
|
20
|
+
PROCESSING_VOICE = "processing-voice",
|
|
21
|
+
EXECUTABLE_GENERAL = "executable-general",
|
|
22
|
+
EXECUTABLE_LLM = "executable-llm",
|
|
23
|
+
LOOKUP = "lookup",
|
|
24
|
+
TELEPHONY_VOICE = "telephony-voice",
|
|
25
|
+
MESSAGING_TEXT = "messaging-text",
|
|
26
|
+
CONVERSATIONS_WAP = "conversation-wap",
|
|
27
|
+
CARRIER_FEE = "carrier-fee",
|
|
28
|
+
USER = "user",
|
|
29
|
+
IDENTIFIER = "identifier",
|
|
30
|
+
STORAGE_GENERAL = "storage-general",
|
|
31
|
+
STORAGE_WEAVIATE = "storage-weaviate"
|
|
32
|
+
}
|
|
2
33
|
export type FlowEvents = {
|
|
3
34
|
flowId: string;
|
|
4
35
|
amount: number;
|
|
@@ -10,11 +41,12 @@ export type UsageRecordDto = {
|
|
|
10
41
|
environmentId?: string;
|
|
11
42
|
accountId?: string;
|
|
12
43
|
customerId?: string;
|
|
13
|
-
sourceProvider:
|
|
44
|
+
sourceProvider: DataSourceProvider;
|
|
14
45
|
sourceId: string;
|
|
15
46
|
dateFrom: Date;
|
|
16
47
|
dateTo: Date;
|
|
17
|
-
|
|
48
|
+
logicalCategory: LogicalCategoryEnum;
|
|
49
|
+
category: BusinessCategoryEnum;
|
|
18
50
|
sku: string;
|
|
19
51
|
amount: number;
|
|
20
52
|
rate: number;
|
|
@@ -25,6 +57,25 @@ export type UsageRecordDto = {
|
|
|
25
57
|
[key: string]: unknown;
|
|
26
58
|
};
|
|
27
59
|
};
|
|
60
|
+
export type FindUsageByCursor = {
|
|
61
|
+
id?: string;
|
|
62
|
+
customerId?: string;
|
|
63
|
+
environmentId?: string;
|
|
64
|
+
accountId?: string;
|
|
65
|
+
sourceProvider?: DataSourceProvider;
|
|
66
|
+
sourceId?: string;
|
|
67
|
+
dateFrom?: Date;
|
|
68
|
+
dateTo?: Date;
|
|
69
|
+
category?: BusinessCategoryEnum;
|
|
70
|
+
logicalCategory?: LogicalCategoryEnum;
|
|
71
|
+
includeSkus?: string[];
|
|
72
|
+
excludeSkus?: string[];
|
|
73
|
+
flowId?: string;
|
|
74
|
+
dataSet?: 'modern' | 'legacy' | 'complete';
|
|
75
|
+
completeDatasetGaps?: boolean;
|
|
76
|
+
limit?: number;
|
|
77
|
+
cursor?: string | null;
|
|
78
|
+
};
|
|
28
79
|
export type UsageDataSet = 'modern' | 'legacy' | 'complete';
|
|
29
80
|
export type CustomerUsageQueryParams = {
|
|
30
81
|
dateFrom: Date;
|
|
@@ -33,9 +84,10 @@ export type CustomerUsageQueryParams = {
|
|
|
33
84
|
environmentId?: string;
|
|
34
85
|
accountId?: string;
|
|
35
86
|
customerId?: string;
|
|
36
|
-
sourceProvider?:
|
|
87
|
+
sourceProvider?: DataSourceProvider;
|
|
37
88
|
sourceId?: string;
|
|
38
|
-
|
|
89
|
+
logicalCategory?: LogicalCategoryEnum;
|
|
90
|
+
category?: BusinessCategoryEnum;
|
|
39
91
|
dataSet?: UsageDataSet;
|
|
40
92
|
completeDatasetGaps?: boolean;
|
|
41
93
|
includeSkus?: string[];
|
|
@@ -67,22 +119,6 @@ export type SessionRecordDto = {
|
|
|
67
119
|
durationMs: number | null;
|
|
68
120
|
count: number;
|
|
69
121
|
};
|
|
70
|
-
export declare enum CategoryNamespace {
|
|
71
|
-
PROCESSING_FLOW = "processing-flow",
|
|
72
|
-
PROCESSING_VOICE = "processing-voice",
|
|
73
|
-
EXECUTABLE_GENERAL = "executable-general",
|
|
74
|
-
EXECUTABLE_LLM = "executable-llm",
|
|
75
|
-
LOOKUP = "lookup",
|
|
76
|
-
TELEPHONY_VOICE = "telephony-voice",
|
|
77
|
-
MESSAGING_TEXT = "messaging-text",
|
|
78
|
-
CONVERSATIONS_WAP = "conversation-wap",
|
|
79
|
-
CARRIER_FEE = "carrier-fee",
|
|
80
|
-
USER = "user",
|
|
81
|
-
IDENTIFIER = "identifier",
|
|
82
|
-
STORAGE_GENERAL = "storage-general",
|
|
83
|
-
STORAGE_WEAVIATE = "storage-weaviate"
|
|
84
|
-
}
|
|
85
|
-
export type DataSourceProvider = 'azure' | 'druid';
|
|
86
122
|
export type UsageQueueParams = {
|
|
87
123
|
dateFrom: Date | string;
|
|
88
124
|
dateTo: Date | string;
|