@or-sdk/billing 24.2.1-beta.7603.0 → 24.2.1-beta.7605.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/dataReconciliationApi/index.js.map +1 -1
- package/dist/esm/api/dataReconciliationApi/index.js.map +1 -1
- package/dist/types/api/dataReconciliationApi/index.d.ts.map +1 -1
- package/dist/types/api/dataReconciliationApi/types.d.ts +22 -12
- package/dist/types/api/dataReconciliationApi/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api/dataReconciliationApi/index.ts +20 -13
- package/src/api/dataReconciliationApi/types.ts +23 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/dataReconciliationApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,sCAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/dataReconciliationApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,sCAAqC;AAgBrC;IAAmD,yCAAO;IAA1D;;QACmB,iBAAW,GAAG,qBAAqB,CAAC;;IAqKvD,CAAC;IApIc,6DAA6B,GAA1C;4DAA2C,WAA0C,EAAE,SAAiC;YAAjC,0BAAA,EAAA,cAAiC;;;4BAC/G,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE,EAC5B,IAAI,EAAE,WAAW,IACd,SAAS,EACZ,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAyCY,mDAAmB,GAAhC;4DAAiC,aAA2C,EAAE,SAAiC;YAAjC,0BAAA,EAAA,cAAiC;;;4BACtG,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE,EAC5B,MAAM,EAAE,aAAa,IAClB,SAAS,EACZ,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAoCY,qDAAqB,GAAlC;4DAAmC,EAAU,EAAE,SAAiC;YAAjC,0BAAA,EAAA,cAAiC;;;4BACvE,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,cAAI,EAAE,CAAE,IAC/B,SAAS,EACZ,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IA2BY,oDAAoB,GAAjC;4DAAkC,EAAU,EAAE,SAAiC;YAAjC,0BAAA,EAAA,cAAiC;;;4BACtE,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE,EAC5B,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE,IACX,SAAS,EACZ,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IACH,4BAAC;AAAD,CAAC,AAtKD,CAAmD,iBAAO,GAsKzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/dataReconciliationApi/index.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/dataReconciliationApi/index.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAgBrC,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,OAAO;IAA1D;;QACmB,gBAAW,GAAG,qBAAqB,CAAC;IAqKvD,CAAC;IApIc,6BAA6B;6DAAC,WAA0C,EAAE,YAA+B,EAAE;YACtH,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,EAC5B,IAAI,EAAE,WAAW,IACd,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;IAyCY,mBAAmB;6DAAC,aAA2C,EAAE,YAA+B,EAAE;YAC7G,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,EAC5B,MAAM,EAAE,aAAa,IAClB,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;IAoCY,qBAAqB;6DAAC,EAAU,EAAE,YAA+B,EAAE;YAC9E,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,EAAE,IAC/B,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;IA2BY,oBAAoB;6DAAC,EAAU,EAAE,YAA+B,EAAE;YAC7E,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,EAC5B,MAAM,EAAE,EAAE,EAAE,EAAE,IACX,SAAS,EACZ,CAAC;QACL,CAAC;KAAA;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/dataReconciliationApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/dataReconciliationApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AASjB,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,OAAO;IACxD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAyB;IAiCxC,6BAA6B,CAAC,WAAW,EAAE,6BAA6B,EAAE,SAAS,GAAE,iBAAsB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAgDhJ,mBAAmB,CAAC,aAAa,EAAE,4BAA4B,EAAE,SAAS,GAAE,iBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IA2C/I,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,GAAE,iBAAsB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAiCnG,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;CAQhG"}
|
|
@@ -4,18 +4,22 @@ export type InitiateReconciliationRequest = {
|
|
|
4
4
|
dateFrom: string;
|
|
5
5
|
dateTo: string;
|
|
6
6
|
sourceProvider: DataSourceProvider;
|
|
7
|
-
|
|
7
|
+
sourceIds: string[];
|
|
8
|
+
environmentsIds?: string[];
|
|
9
|
+
customerId?: string;
|
|
8
10
|
eventTypes?: CategoryNamespace[];
|
|
9
11
|
};
|
|
10
12
|
export type ReconciliationJobResponse = {
|
|
11
13
|
count: number;
|
|
12
|
-
|
|
14
|
+
jobIds: string[];
|
|
13
15
|
message: string;
|
|
14
16
|
};
|
|
15
17
|
export type ReconciliationSearchCriteria = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
eventTypes?: CategoryNamespace[];
|
|
19
|
+
sourceIds?: string[];
|
|
20
|
+
environmentsIds?: string[];
|
|
21
|
+
sourceProvider?: DataSourceProvider;
|
|
22
|
+
customerId?: string;
|
|
19
23
|
status?: ProcessingStatus;
|
|
20
24
|
jobId?: string;
|
|
21
25
|
dateFrom?: string;
|
|
@@ -23,24 +27,30 @@ export type ReconciliationSearchCriteria = {
|
|
|
23
27
|
} & RequestDto;
|
|
24
28
|
export type ReconciliationRecord = {
|
|
25
29
|
id: string;
|
|
26
|
-
eventType: CategoryNamespace;
|
|
27
|
-
sourceId: string;
|
|
28
30
|
sourceProvider: DataSourceProvider;
|
|
31
|
+
sourceIds: string[];
|
|
32
|
+
environmentsIds?: string[];
|
|
33
|
+
eventTypes: CategoryNamespace[];
|
|
34
|
+
customerId?: string;
|
|
35
|
+
accountIds: string[];
|
|
29
36
|
dateFrom: string;
|
|
30
37
|
dateTo: string;
|
|
31
38
|
rawTotalSum?: number;
|
|
32
39
|
calcTotalSum?: number;
|
|
33
40
|
calcTotalSumLegacy?: number;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
rawDetails: Record<string, number>;
|
|
41
|
+
calcDetails?: Record<string, number>;
|
|
42
|
+
calcDetailsLegacy?: Record<string, number>;
|
|
43
|
+
rawDetails?: Record<string, number>;
|
|
44
|
+
rawDataFileUrl?: string;
|
|
39
45
|
status: ProcessingStatus;
|
|
40
46
|
errorMessage?: string;
|
|
41
47
|
startTime?: string;
|
|
42
48
|
endTime?: string;
|
|
43
49
|
jobId: string;
|
|
44
50
|
createdAt: string;
|
|
51
|
+
updatedAt: string;
|
|
52
|
+
durationMs: number | null;
|
|
53
|
+
isCompleted: boolean;
|
|
54
|
+
isRunning: boolean;
|
|
45
55
|
};
|
|
46
56
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/dataReconciliationApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,MAAM,MAAM,6BAA6B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,kBAAkB,CAAC;IACnC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/dataReconciliationApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,MAAM,MAAM,6BAA6B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,kBAAkB,CAAC;IACnC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,UAAU,CAAC;AAEf,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,kBAAkB,CAAC;IACnC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/billing",
|
|
3
|
-
"version": "24.2.1-beta.
|
|
3
|
+
"version": "24.2.1-beta.7605.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": "^24.2.1-beta.
|
|
19
|
-
"@onereach/billing-shared": "^24.2.1-beta.
|
|
18
|
+
"@onereach/billing-dto": "^24.2.1-beta.7605.0",
|
|
19
|
+
"@onereach/billing-shared": "^24.2.1-beta.7605.0",
|
|
20
20
|
"@or-sdk/base": "^0.42.4",
|
|
21
21
|
"@or-sdk/discovery": "1.10.6",
|
|
22
22
|
"@types/qs": "6.14.0",
|
|
@@ -3,7 +3,12 @@ import { ResponseDto } from '@onereach/billing-shared';
|
|
|
3
3
|
import { OptionalApiParams } from '../../types';
|
|
4
4
|
import { BaseApi } from '../baseApi';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
InitiateReconciliationRequest,
|
|
8
|
+
ReconciliationJobResponse,
|
|
9
|
+
ReconciliationRecord,
|
|
10
|
+
ReconciliationSearchCriteria,
|
|
11
|
+
} from './types';
|
|
7
12
|
|
|
8
13
|
/**
|
|
9
14
|
* API client for data reconciliation operations.
|
|
@@ -22,7 +27,7 @@ export default class DataReconciliationApi extends BaseApi {
|
|
|
22
27
|
* @param {string} queueParams.dateFrom - Start date for reconciliation period (ISO string format)
|
|
23
28
|
* @param {string} queueParams.dateTo - End date for reconciliation period (ISO string format)
|
|
24
29
|
* @param {'azure' | 'druid'} queueParams.sourceProvider - Data source provider ('azure' | 'druid')
|
|
25
|
-
* @param {string} queueParams.
|
|
30
|
+
* @param {Array<string>} queueParams.sourceIds - Required reporting database identifiers included in the run
|
|
26
31
|
* @param {Array<CategoryNamespace>} [queueParams.eventTypes] - Optional array of query types to reconcile. Options:
|
|
27
32
|
* 'processing-flow', 'processing-voice', 'executable-general', 'executable-llm',
|
|
28
33
|
* 'lookup', 'telephony-voice', 'messaging-text', 'conversation-wap', 'carrier-fee', 'user'
|
|
@@ -31,7 +36,7 @@ export default class DataReconciliationApi extends BaseApi {
|
|
|
31
36
|
* @param {number} [apiParams.retries] - Number of retry attempts
|
|
32
37
|
* @returns {Promise<ReconciliationJobResponse>} Promise resolving to the reconciliation job response
|
|
33
38
|
* @returns {number} returns.count - Number of reconciliation tasks queued
|
|
34
|
-
* @returns {string} returns.
|
|
39
|
+
* @returns {Array<string>} returns.jobIds - Unique identifiers for the queued reconciliation jobs
|
|
35
40
|
* @returns {string} returns.message - Status message about the job initiation
|
|
36
41
|
*
|
|
37
42
|
* @example
|
|
@@ -40,10 +45,10 @@ export default class DataReconciliationApi extends BaseApi {
|
|
|
40
45
|
* dateFrom: '2023-01-01T00:00:00.000Z',
|
|
41
46
|
* dateTo: '2023-01-31T23:59:59.999Z',
|
|
42
47
|
* sourceProvider: 'azure',
|
|
43
|
-
*
|
|
48
|
+
* sourceIds: ['azure-source-123'],
|
|
44
49
|
* eventTypes: ['processing-flow', 'executable-general']
|
|
45
50
|
* });
|
|
46
|
-
* console.log(`
|
|
51
|
+
* console.log(`Queued ${response.count} reconciliation tasks`, response.jobIds);
|
|
47
52
|
* ```
|
|
48
53
|
*/
|
|
49
54
|
public async initiateReconciliationProcess(queueParams: InitiateReconciliationRequest, apiParams: OptionalApiParams = {}): Promise<ReconciliationJobResponse> {
|
|
@@ -59,9 +64,10 @@ export default class DataReconciliationApi extends BaseApi {
|
|
|
59
64
|
* Retrieves a paginated list of reconciliation records.
|
|
60
65
|
*
|
|
61
66
|
* @param {ReconciliationSearchCriteria} filterOptions - Search and filter criteria for reconciliation records
|
|
62
|
-
* @param {
|
|
63
|
-
* @param {string} [filterOptions.
|
|
67
|
+
* @param {Array<CategoryNamespace>} [filterOptions.eventTypes] - Filter by event types (optional)
|
|
68
|
+
* @param {Array<string>} [filterOptions.sourceIds] - Filter by source identifiers (optional)
|
|
64
69
|
* @param {'azure' | 'druid'} [filterOptions.sourceProvider] - Filter by source provider (optional)
|
|
70
|
+
* @param {string} [filterOptions.customerId] - Filter by customer identifier (optional)
|
|
65
71
|
* @param {ProcessingStatus} [filterOptions.status] - Filter by processing status ('success', 'error', 'pending', 'in_progress', 'canceled')
|
|
66
72
|
* @param {string} [filterOptions.jobId] - Filter by job identifier (optional)
|
|
67
73
|
* @param {string} [filterOptions.dateFrom] - Filter by start date (ISO string format, optional)
|
|
@@ -109,20 +115,23 @@ export default class DataReconciliationApi extends BaseApi {
|
|
|
109
115
|
* @param {OptionalApiParams} [apiParams={}] - Optional API configuration parameters
|
|
110
116
|
* @returns {Promise<ReconciliationRecord>} Promise resolving to the reconciliation record details
|
|
111
117
|
* @returns {string} returns.id - Unique identifier of the reconciliation record
|
|
112
|
-
* @returns {CategoryNamespace} returns.eventType - The event type that was reconciled
|
|
113
|
-
* @returns {string} returns.sourceId - Source identifier
|
|
114
118
|
* @returns {'azure' | 'druid'} returns.sourceProvider - Data source provider ('azure' | 'druid')
|
|
119
|
+
* @returns {Array<string>} returns.sourceIds - Source identifiers included in the run
|
|
120
|
+
* @returns {Array<CategoryNamespace>} returns.eventTypes - Event types reconciled in the run
|
|
115
121
|
* @returns {string} returns.dateFrom - Start date of reconciliation period (ISO string)
|
|
116
122
|
* @returns {string} returns.dateTo - End date of reconciliation period (ISO string)
|
|
117
123
|
* @returns {number} [returns.rawTotalSum] - Raw total sum from source data (optional)
|
|
118
124
|
* @returns {number} [returns.calcTotalSum] - Calculated total sum (optional)
|
|
119
|
-
* @returns {number} [returns.deltaSum] - Difference between raw and calculated sums (optional)
|
|
120
125
|
* @returns {'success' | 'error' | 'pending' | 'in_progress' | 'canceled'} returns.status - Processing status ('success', 'error', 'pending', 'in_progress', 'canceled')
|
|
121
126
|
* @returns {string} [returns.errorMessage] - Error details if status is 'error' (optional)
|
|
122
127
|
* @returns {string} [returns.startTime] - Reconciliation start time (ISO string, optional)
|
|
123
128
|
* @returns {string} [returns.endTime] - Reconciliation end time (ISO string, optional)
|
|
124
129
|
* @returns {string} returns.jobId - Associated job identifier
|
|
125
130
|
* @returns {string} returns.createdAt - Record creation timestamp (ISO string)
|
|
131
|
+
* @returns {string} returns.updatedAt - Record update timestamp (ISO string)
|
|
132
|
+
* @returns {number | null} returns.durationMs - Processing duration in milliseconds
|
|
133
|
+
* @returns {boolean} returns.isCompleted - Whether processing has finished
|
|
134
|
+
* @returns {boolean} returns.isRunning - Whether processing is currently running
|
|
126
135
|
*
|
|
127
136
|
* @throws {NotFoundError} When the reconciliation record with the given ID doesn't exist
|
|
128
137
|
*
|
|
@@ -130,9 +139,7 @@ export default class DataReconciliationApi extends BaseApi {
|
|
|
130
139
|
* ```typescript
|
|
131
140
|
* const reconciliation = await api.getReconciliationById('uuid-123');
|
|
132
141
|
* console.log(`Status: ${reconciliation.status}`);
|
|
133
|
-
*
|
|
134
|
-
* console.log(`Delta: ${reconciliation.deltaSum}`);
|
|
135
|
-
* }
|
|
142
|
+
* console.log(`Event types: ${reconciliation.eventTypes.join(', ')}`);
|
|
136
143
|
* ```
|
|
137
144
|
*/
|
|
138
145
|
public async getReconciliationById(id: string, apiParams: OptionalApiParams = {}): Promise<ReconciliationRecord> {
|
|
@@ -5,20 +5,24 @@ export type InitiateReconciliationRequest = {
|
|
|
5
5
|
dateFrom: string;
|
|
6
6
|
dateTo: string;
|
|
7
7
|
sourceProvider: DataSourceProvider;
|
|
8
|
-
|
|
8
|
+
sourceIds: string[];
|
|
9
|
+
environmentsIds?: string[];
|
|
10
|
+
customerId?: string;
|
|
9
11
|
eventTypes?: CategoryNamespace[];
|
|
10
12
|
};
|
|
11
13
|
|
|
12
14
|
export type ReconciliationJobResponse = {
|
|
13
15
|
count: number;
|
|
14
|
-
|
|
16
|
+
jobIds: string[];
|
|
15
17
|
message: string;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
export type ReconciliationSearchCriteria = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
eventTypes?: CategoryNamespace[];
|
|
22
|
+
sourceIds?: string[];
|
|
23
|
+
environmentsIds?: string[];
|
|
24
|
+
sourceProvider?: DataSourceProvider;
|
|
25
|
+
customerId?: string;
|
|
22
26
|
status?: ProcessingStatus;
|
|
23
27
|
jobId?: string;
|
|
24
28
|
dateFrom?: string;
|
|
@@ -27,23 +31,29 @@ export type ReconciliationSearchCriteria = {
|
|
|
27
31
|
|
|
28
32
|
export type ReconciliationRecord = {
|
|
29
33
|
id: string;
|
|
30
|
-
eventType: CategoryNamespace;
|
|
31
|
-
sourceId: string;
|
|
32
34
|
sourceProvider: DataSourceProvider;
|
|
35
|
+
sourceIds: string[];
|
|
36
|
+
environmentsIds?: string[];
|
|
37
|
+
eventTypes: CategoryNamespace[];
|
|
38
|
+
customerId?: string;
|
|
39
|
+
accountIds: string[];
|
|
33
40
|
dateFrom: string;
|
|
34
41
|
dateTo: string;
|
|
35
42
|
rawTotalSum?: number;
|
|
36
43
|
calcTotalSum?: number;
|
|
37
44
|
calcTotalSumLegacy?: number;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
rawDetails: Record<string, number>;
|
|
45
|
+
calcDetails?: Record<string, number>;
|
|
46
|
+
calcDetailsLegacy?: Record<string, number>;
|
|
47
|
+
rawDetails?: Record<string, number>;
|
|
48
|
+
rawDataFileUrl?: string;
|
|
43
49
|
status: ProcessingStatus;
|
|
44
50
|
errorMessage?: string;
|
|
45
51
|
startTime?: string;
|
|
46
52
|
endTime?: string;
|
|
47
53
|
jobId: string;
|
|
48
54
|
createdAt: string;
|
|
49
|
-
|
|
55
|
+
updatedAt: string;
|
|
56
|
+
durationMs: number | null;
|
|
57
|
+
isCompleted: boolean;
|
|
58
|
+
isRunning: boolean;
|
|
59
|
+
};
|