@or-sdk/billing 10.30.2-beta.2085.0 → 10.30.2-beta.2088.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/processingStatusesApi/index.js +61 -0
- package/dist/cjs/api/processingStatusesApi/index.js.map +1 -1
- package/dist/cjs/api/processingStatusesApi/types.js.map +1 -1
- package/dist/esm/api/processingStatusesApi/index.js +30 -2
- package/dist/esm/api/processingStatusesApi/index.js.map +1 -1
- package/dist/esm/api/processingStatusesApi/types.js.map +1 -1
- package/dist/types/api/processingStatusesApi/index.d.ts +9 -2
- package/dist/types/api/processingStatusesApi/index.d.ts.map +1 -1
- package/dist/types/api/processingStatusesApi/types.d.ts +41 -1
- package/dist/types/api/processingStatusesApi/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api/processingStatusesApi/index.ts +79 -3
- package/src/api/processingStatusesApi/types.ts +46 -1
|
@@ -14,6 +14,17 @@ 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
|
+
};
|
|
17
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -131,6 +142,56 @@ var ProcessingStatusesApi = (function (_super) {
|
|
|
131
142
|
});
|
|
132
143
|
});
|
|
133
144
|
};
|
|
145
|
+
ProcessingStatusesApi.prototype.getJobs = function (params_1) {
|
|
146
|
+
return __awaiter(this, arguments, void 0, function (params, options) {
|
|
147
|
+
if (options === void 0) { options = {}; }
|
|
148
|
+
return __generator(this, function (_a) {
|
|
149
|
+
switch (_a.label) {
|
|
150
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath, "/jobs"), params: params }, options))];
|
|
151
|
+
case 1: return [2, _a.sent()];
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
ProcessingStatusesApi.prototype.getJobMetrics = function (jobId_1) {
|
|
157
|
+
return __awaiter(this, arguments, void 0, function (jobId, options) {
|
|
158
|
+
if (options === void 0) { options = {}; }
|
|
159
|
+
return __generator(this, function (_a) {
|
|
160
|
+
switch (_a.label) {
|
|
161
|
+
case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath, "/jobs/").concat(jobId) }, options))];
|
|
162
|
+
case 1: return [2, _a.sent()];
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
ProcessingStatusesApi.prototype.createJob = function (data) {
|
|
168
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
169
|
+
return __generator(this, function (_a) {
|
|
170
|
+
switch (_a.label) {
|
|
171
|
+
case 0: return [4, this.apiCall({
|
|
172
|
+
method: 'POST',
|
|
173
|
+
route: "".concat(this.apiBasePath, "/jobs"),
|
|
174
|
+
data: data,
|
|
175
|
+
})];
|
|
176
|
+
case 1: return [2, _a.sent()];
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
;
|
|
182
|
+
ProcessingStatusesApi.prototype.removeJob = function (jobId) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
184
|
+
return __generator(this, function (_a) {
|
|
185
|
+
switch (_a.label) {
|
|
186
|
+
case 0: return [4, this.apiCall({
|
|
187
|
+
method: 'DELETE',
|
|
188
|
+
route: "".concat(this.apiBasePath, "/jobs/").concat(jobId),
|
|
189
|
+
})];
|
|
190
|
+
case 1: return [2, _a.sent()];
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
};
|
|
134
195
|
return ProcessingStatusesApi;
|
|
135
196
|
}(baseApi_1.BaseApi));
|
|
136
197
|
exports.default = ProcessingStatusesApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAqC;AAcrC;IAAmD,yCAAO;IAA1D;;QACmB,iBAAW,GAAG,mBAAmB,CAAC;;IAuLrD,CAAC;IArKc,qDAAqB,GAAlC;4DAAmC,MAAoC;YAApC,uBAAA,EAAA,WAAoC;;;4BAC9D,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;IAiBY,8CAAc,GAA3B,UAA4B,KAAa;;;;4BAChC,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,gBAAa;4BACvC,MAAM,EAAE,EAAE,KAAK,OAAA,EAAE;yBAClB,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IAiBY,sDAAsB,GAAnC,UAAoC,IAA+B;;;;4BAC1D,WAAM,I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A4B;;;;4BAC1C,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,UAAO;4BACjC,IAAI,MAAA;yBACL,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IAAA,CAAC;IASW,yCAAS,GAAtB,UAAuB,KAAa;;;;4BAC3B,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,QAAQ;4BAChB,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,mBAAS,KAAK,CAAE;yBAC3C,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IACH,4BAAC;AAAD,CAAC,AAxLD,CAAmD,iBAAO,GAwLzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/types.ts"],"names":[],"mappings":";;;AAIA,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,4CAA6B,CAAA;AAC/B,CAAC,EAFW,WAAW,2BAAX,WAAW,QAEtB;AAED,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,+CAA2B,CAAA;IAC3B,yCAAqB,CAAA;AACvB,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B"}
|
|
@@ -18,7 +18,7 @@ export default class ProcessingStatusesApi extends BaseApi {
|
|
|
18
18
|
return yield this.apiCall({
|
|
19
19
|
method: 'GET',
|
|
20
20
|
route: `${this.apiBasePath}`,
|
|
21
|
-
params
|
|
21
|
+
params,
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -55,7 +55,35 @@ export default class ProcessingStatusesApi extends BaseApi {
|
|
|
55
55
|
return yield this.apiCall({
|
|
56
56
|
method: 'DELETE',
|
|
57
57
|
route: `${this.apiBasePath}`,
|
|
58
|
-
params: { id
|
|
58
|
+
params: { id },
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
getJobs(params_1) {
|
|
63
|
+
return __awaiter(this, arguments, void 0, function* (params, options = {}) {
|
|
64
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}/jobs`, params }, options));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
getJobMetrics(jobId_1) {
|
|
68
|
+
return __awaiter(this, arguments, void 0, function* (jobId, options = {}) {
|
|
69
|
+
return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}/jobs/${jobId}` }, options));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
createJob(data) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
return yield this.apiCall({
|
|
75
|
+
method: 'POST',
|
|
76
|
+
route: `${this.apiBasePath}/jobs`,
|
|
77
|
+
data,
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
;
|
|
82
|
+
removeJob(jobId) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
return yield this.apiCall({
|
|
85
|
+
method: 'DELETE',
|
|
86
|
+
route: `${this.apiBasePath}/jobs/${jobId}`,
|
|
59
87
|
});
|
|
60
88
|
});
|
|
61
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/index.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/index.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAA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A4B,EAAE,UAA6B,EAAE;YAChF,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,OAAO,EACjC,MAAM,IACH,OAAO,EACV,CAAC;QACL,CAAC;KAAA;IAQY,aAAa;6DAAC,KAAa,EAAE,UAA6B,EAAE;YACvE,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,SAAS,KAAK,EAAE,IACvC,OAAO,EACV,CAAC;QACL,CAAC;KAAA;IAeY,SAAS,CAAC,IAA4B;;YACjD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,OAAO;gBACjC,IAAI;aACL,CAAC,CAAC;QACL,CAAC;KAAA;IAAA,CAAC;IASW,SAAS,CAAC,KAAa;;YAClC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,SAAS,KAAK,EAAE;aAC3C,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,4CAA6B,CAAA;AAC/B,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB;AAED,MAAM,CAAN,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,+CAA2B,CAAA;IAC3B,yCAAqB,CAAA;AACvB,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ResponseDto } from '../../types';
|
|
1
|
+
import { OptionalApiParams, ResponseDto } from '../../types';
|
|
2
2
|
import { BaseApi } from '../baseApi';
|
|
3
|
-
import { CreateProcessingStatusDto, FindProcessingStatusDto, ProcessingStatusDto, UpdateProcessingStatusDto } from './types';
|
|
3
|
+
import { CreateProcessingJobDto, CreateProcessingStatusDto, FindProcessingJobDto, FindProcessingStatusDto, ProcessingJobDto, ProcessingJobMetricsDto, ProcessingStatusDto, UpdateProcessingStatusDto } from './types';
|
|
4
4
|
export default class ProcessingStatusesApi extends BaseApi {
|
|
5
5
|
private readonly apiBasePath;
|
|
6
6
|
getProcessingStatuses(params?: FindProcessingStatusDto): Promise<ResponseDto<ProcessingStatusDto>>;
|
|
@@ -11,5 +11,12 @@ export default class ProcessingStatusesApi extends BaseApi {
|
|
|
11
11
|
raw: any;
|
|
12
12
|
affected?: number | null;
|
|
13
13
|
}>;
|
|
14
|
+
getJobs(params: FindProcessingJobDto, options?: OptionalApiParams): Promise<ResponseDto<ProcessingJobDto>>;
|
|
15
|
+
getJobMetrics(jobId: string, options?: OptionalApiParams): Promise<ProcessingJobMetricsDto>;
|
|
16
|
+
createJob(data: CreateProcessingJobDto): Promise<ProcessingJobDto>;
|
|
17
|
+
removeJob(jobId: string): Promise<{
|
|
18
|
+
raw: any;
|
|
19
|
+
affected?: number | null;
|
|
20
|
+
}>;
|
|
14
21
|
}
|
|
15
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources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K,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,GAAG,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAAE,CAAC;CAMxF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataSourceProvider } from '@onereach/billing-shared';
|
|
2
|
+
import { CategoryNamespace, RequestDto } from '../../types';
|
|
2
3
|
export declare enum ProcessType {
|
|
3
4
|
DATA_COLLECT = "data_collect"
|
|
4
5
|
}
|
|
@@ -37,4 +38,43 @@ export type UpdateProcessingStatusDto = Partial<CreateProcessingStatusDto>;
|
|
|
37
38
|
export type ProcessingStatusDto = {
|
|
38
39
|
id: string;
|
|
39
40
|
} & CreateProcessingStatusDto;
|
|
41
|
+
export type CreateProcessingJobDto = {
|
|
42
|
+
jobId: string;
|
|
43
|
+
dateFrom: Date;
|
|
44
|
+
dateTo: Date;
|
|
45
|
+
sourceProvider?: DataSourceProvider;
|
|
46
|
+
sourceId?: string;
|
|
47
|
+
eventType?: CategoryNamespace;
|
|
48
|
+
itemsCount: number;
|
|
49
|
+
};
|
|
50
|
+
export type ProcessingJobDto = CreateProcessingJobDto & {
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
updatedAt: Date;
|
|
53
|
+
};
|
|
54
|
+
export type FindProcessingJobDto = {
|
|
55
|
+
jobId?: string;
|
|
56
|
+
dateFrom?: Date;
|
|
57
|
+
dateTo?: Date;
|
|
58
|
+
sourceProvider?: DataSourceProvider;
|
|
59
|
+
sourceId?: string;
|
|
60
|
+
eventType?: CategoryNamespace;
|
|
61
|
+
minItemsCount?: number;
|
|
62
|
+
maxItemsCount?: number;
|
|
63
|
+
} & RequestDto;
|
|
64
|
+
export type ProcessingJobMetricsDto = {
|
|
65
|
+
jobId: string;
|
|
66
|
+
dateFrom: Date;
|
|
67
|
+
dateTo: Date;
|
|
68
|
+
sourceProvider?: DataSourceProvider;
|
|
69
|
+
sourceId?: string;
|
|
70
|
+
eventType?: CategoryNamespace;
|
|
71
|
+
totalEvents: number;
|
|
72
|
+
queuedCount: number;
|
|
73
|
+
progressCount: number;
|
|
74
|
+
successCount: number;
|
|
75
|
+
failedCount: number;
|
|
76
|
+
skippedCount: number;
|
|
77
|
+
createdAt: Date;
|
|
78
|
+
updatedAt?: Date;
|
|
79
|
+
};
|
|
40
80
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/processingStatusesApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5D,oBAAY,WAAW;IACrB,YAAY,iBAAiB;CAC9B;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,UAAU,CAAC;AA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xB,GAAG,UAAU,CAAC;AAEf,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,IAAI,CAAC;IACb,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/billing",
|
|
3
|
-
"version": "10.30.2-beta.
|
|
3
|
+
"version": "10.30.2-beta.2088.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"dev": "pnpm build:watch:esm"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@onereach/billing-dto": "^10.30.2-beta.
|
|
19
|
-
"@onereach/billing-shared": "^10.30.2-beta.
|
|
18
|
+
"@onereach/billing-dto": "^10.30.2-beta.2088.0",
|
|
19
|
+
"@onereach/billing-shared": "^10.30.2-beta.2088.0",
|
|
20
20
|
"@or-sdk/base": "^0.42.3",
|
|
21
21
|
"@or-sdk/discovery": "1.9.2",
|
|
22
22
|
"@types/qs": "6.14.0",
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { ResponseDto } from '../../types';
|
|
1
|
+
import { OptionalApiParams, ResponseDto } from '../../types';
|
|
2
2
|
import { BaseApi } from '../baseApi';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
+
CreateProcessingJobDto,
|
|
5
6
|
CreateProcessingStatusDto,
|
|
7
|
+
FindProcessingJobDto,
|
|
6
8
|
FindProcessingStatusDto,
|
|
9
|
+
ProcessingJobDto,
|
|
10
|
+
ProcessingJobMetricsDto,
|
|
7
11
|
ProcessingStatusDto,
|
|
8
12
|
UpdateProcessingStatusDto,
|
|
9
13
|
} from './types';
|
|
@@ -32,7 +36,7 @@ export default class ProcessingStatusesApi extends BaseApi {
|
|
|
32
36
|
return await this.apiCall({
|
|
33
37
|
method: 'GET',
|
|
34
38
|
route: `${this.apiBasePath}`,
|
|
35
|
-
params
|
|
39
|
+
params,
|
|
36
40
|
});
|
|
37
41
|
}
|
|
38
42
|
|
|
@@ -118,7 +122,79 @@ export default class ProcessingStatusesApi extends BaseApi {
|
|
|
118
122
|
return await this.apiCall({
|
|
119
123
|
method: 'DELETE',
|
|
120
124
|
route: `${this.apiBasePath}`,
|
|
121
|
-
params: { id
|
|
125
|
+
params: { id },
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Retrieves a list of processing jobs from the API, filtered by optional parameters.
|
|
131
|
+
*
|
|
132
|
+
* @param {FindProcessingJobDto} params - Filter parameters for querying jobs.
|
|
133
|
+
* @param {string} [params.jobId] - Filter by the unique job ID.
|
|
134
|
+
* @param {Date} [params.dateFrom] - Filter for jobs with dateFrom after this date.
|
|
135
|
+
* @param {Date} [params.dateTo] - Filter for jobs with dateTo before this date.
|
|
136
|
+
* @param {DataSourceProvider} [params.sourceProvider] - Filter by data source provider.
|
|
137
|
+
* @param {string} [params.sourceId] - Filter by source ID.
|
|
138
|
+
* @param {CategoryNamespace} [params.eventType] - Filter by event type.
|
|
139
|
+
* @param {number} [params.minItemsCount] - Filter by minimum items count.
|
|
140
|
+
* @param {number} [params.maxItemsCount] - Filter by maximum items count.
|
|
141
|
+
* @returns {Promise<ProcessingJobDto>} A promise resolving to processing job data.
|
|
142
|
+
*/
|
|
143
|
+
public async getJobs(params: FindProcessingJobDto, options: OptionalApiParams = {}): Promise<ResponseDto<ProcessingJobDto>> {
|
|
144
|
+
return await this.apiCall({
|
|
145
|
+
method: 'GET',
|
|
146
|
+
route: `${this.apiBasePath}/jobs`,
|
|
147
|
+
params,
|
|
148
|
+
...options,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Retrieves metrics and statistics for a specific processing job.
|
|
154
|
+
*
|
|
155
|
+
* @param {string} jobId - The unique identifier of the job for which to fetch metrics.
|
|
156
|
+
* @returns {Promise<ProcessingJobMetricsDto>} A promise that resolves to job metrics including jobId, dateFrom, dateTo, sourceProvider, sourceId, eventType, totalEvents, queuedCount, progressCount, successCount, failedCount, skippedCount, createdAt, and updatedAt.
|
|
157
|
+
*/
|
|
158
|
+
public async getJobMetrics(jobId: string, options: OptionalApiParams = {}): Promise<ProcessingJobMetricsDto> {
|
|
159
|
+
return await this.apiCall({
|
|
160
|
+
method: 'GET',
|
|
161
|
+
route: `${this.apiBasePath}/jobs/${jobId}`,
|
|
162
|
+
...options,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Creates a new processing job entry.
|
|
168
|
+
*
|
|
169
|
+
* @param {CreateProcessingJobDto} data - The data for the new processing job.
|
|
170
|
+
* @param {string} data.jobId - The unique job identifier.
|
|
171
|
+
* @param {Date} data.dateFrom - The start date for the job.
|
|
172
|
+
* @param {Date} data.dateTo - The end date for the job.
|
|
173
|
+
* @param {DataSourceProvider} [data.sourceProvider] - The data source provider.
|
|
174
|
+
* @param {string} [data.sourceId] - The source ID.
|
|
175
|
+
* @param {CategoryNamespace} [data.eventType] - The event type.
|
|
176
|
+
* @param {number} data.itemsCount - The total number of items to process.
|
|
177
|
+
* @returns {Promise<ProcessingJobDto>} A promise that resolves to the newly created processing job.
|
|
178
|
+
*/
|
|
179
|
+
public async createJob(data: CreateProcessingJobDto): Promise<ProcessingJobDto> {
|
|
180
|
+
return await this.apiCall({
|
|
181
|
+
method: 'POST',
|
|
182
|
+
route: `${this.apiBasePath}/jobs`,
|
|
183
|
+
data,
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Deletes a processing job by its ID.
|
|
189
|
+
*
|
|
190
|
+
* @param {string} jobId - The unique identifier of the job to delete.
|
|
191
|
+
* @returns {Promise<{ raw: any; affected?: number | null }>} A promise that resolves to an object containing deletion details.
|
|
192
|
+
*/
|
|
193
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
194
|
+
public async removeJob(jobId: string): Promise<{ raw: any; affected?: number | null; }> {
|
|
195
|
+
return await this.apiCall({
|
|
196
|
+
method: 'DELETE',
|
|
197
|
+
route: `${this.apiBasePath}/jobs/${jobId}`,
|
|
122
198
|
});
|
|
123
199
|
}
|
|
124
200
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataSourceProvider } from '@onereach/billing-shared';
|
|
2
|
+
|
|
3
|
+
import { CategoryNamespace, RequestDto } from '../../types';
|
|
2
4
|
|
|
3
5
|
export enum ProcessType {
|
|
4
6
|
DATA_COLLECT = 'data_collect',
|
|
@@ -41,3 +43,46 @@ export type CreateProcessingStatusDto = {
|
|
|
41
43
|
export type UpdateProcessingStatusDto = Partial<CreateProcessingStatusDto>;
|
|
42
44
|
|
|
43
45
|
export type ProcessingStatusDto = { id: string; } & CreateProcessingStatusDto;
|
|
46
|
+
|
|
47
|
+
export type CreateProcessingJobDto = {
|
|
48
|
+
jobId: string;
|
|
49
|
+
dateFrom: Date;
|
|
50
|
+
dateTo: Date;
|
|
51
|
+
sourceProvider?: DataSourceProvider;
|
|
52
|
+
sourceId?: string;
|
|
53
|
+
eventType?: CategoryNamespace;
|
|
54
|
+
itemsCount: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type ProcessingJobDto = CreateProcessingJobDto & {
|
|
58
|
+
createdAt: Date;
|
|
59
|
+
updatedAt: Date;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type FindProcessingJobDto = {
|
|
63
|
+
jobId?: string;
|
|
64
|
+
dateFrom?: Date;
|
|
65
|
+
dateTo?: Date;
|
|
66
|
+
sourceProvider?: DataSourceProvider;
|
|
67
|
+
sourceId?: string;
|
|
68
|
+
eventType?: CategoryNamespace;
|
|
69
|
+
minItemsCount?: number;
|
|
70
|
+
maxItemsCount?: number;
|
|
71
|
+
} & RequestDto;
|
|
72
|
+
|
|
73
|
+
export type ProcessingJobMetricsDto = {
|
|
74
|
+
jobId: string;
|
|
75
|
+
dateFrom: Date;
|
|
76
|
+
dateTo: Date;
|
|
77
|
+
sourceProvider?: DataSourceProvider;
|
|
78
|
+
sourceId?: string;
|
|
79
|
+
eventType?: CategoryNamespace;
|
|
80
|
+
totalEvents: number;
|
|
81
|
+
queuedCount: number;
|
|
82
|
+
progressCount: number;
|
|
83
|
+
successCount: number;
|
|
84
|
+
failedCount: number;
|
|
85
|
+
skippedCount: number;
|
|
86
|
+
createdAt: Date;
|
|
87
|
+
updatedAt?: Date;
|
|
88
|
+
};
|