@abyss-project/tools 1.0.5 → 1.1.1
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/api/beam.api.d.ts +48 -0
- package/dist/api/beam.api.js +104 -0
- package/dist/api/beam.api.js.map +1 -0
- package/dist/api/extraction-plan-preset.api.d.ts +9 -0
- package/dist/api/extraction-plan-preset.api.js +23 -0
- package/dist/api/extraction-plan-preset.api.js.map +1 -0
- package/dist/api/extraction-plan-preset.api.test.d.ts +1 -0
- package/dist/api/extraction-plan-preset.api.test.js +41 -0
- package/dist/api/extraction-plan-preset.api.test.js.map +1 -0
- package/dist/api/extraction-settings.api.d.ts +4 -0
- package/dist/api/extraction-settings.api.js +22 -0
- package/dist/api/extraction-settings.api.js.map +1 -0
- package/dist/api/extraction.api.d.ts +74 -0
- package/dist/api/extraction.api.js +416 -0
- package/dist/api/extraction.api.js.map +1 -0
- package/dist/api/index.d.ts +4 -1
- package/dist/api/index.js +4 -1
- package/dist/api/index.js.map +1 -1
- package/dist/constants/beam.constants.d.ts +1 -0
- package/dist/constants/beam.constants.js +5 -0
- package/dist/constants/beam.constants.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/index.d.ts +107 -58
- package/dist/index.js +105 -58
- package/dist/index.js.map +1 -1
- package/dist/types/enum/beam.enum.d.ts +12 -0
- package/dist/types/enum/beam.enum.js +18 -0
- package/dist/types/enum/beam.enum.js.map +1 -0
- package/dist/types/enum/combine-strategy.enum.d.ts +5 -0
- package/dist/types/enum/combine-strategy.enum.js +10 -0
- package/dist/types/enum/combine-strategy.enum.js.map +1 -0
- package/dist/types/enum/content-share.enum.d.ts +3 -1
- package/dist/types/enum/content-share.enum.js +2 -0
- package/dist/types/enum/content-share.enum.js.map +1 -1
- package/dist/types/enum/document-type.enum.d.ts +9 -0
- package/dist/types/enum/document-type.enum.js +14 -0
- package/dist/types/enum/document-type.enum.js.map +1 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.d.ts +8 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.js +13 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.js.map +1 -0
- package/dist/types/enum/extraction-warning.enum.d.ts +7 -0
- package/dist/types/enum/extraction-warning.enum.js +12 -0
- package/dist/types/enum/extraction-warning.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +7 -0
- package/dist/types/enum/index.js +7 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/interpreter-kind.enum.d.ts +5 -0
- package/dist/types/enum/interpreter-kind.enum.js +10 -0
- package/dist/types/enum/interpreter-kind.enum.js.map +1 -0
- package/dist/types/enum/provider-kind.enum.d.ts +10 -0
- package/dist/types/enum/provider-kind.enum.js +16 -0
- package/dist/types/enum/provider-kind.enum.js.map +1 -0
- package/dist/types/interface/api/requests/beam.request.d.ts +122 -0
- package/dist/types/interface/api/{responses/pdf.response.js → requests/beam.request.js} +1 -1
- package/dist/types/interface/api/requests/beam.request.js.map +1 -0
- package/dist/types/interface/api/requests/{rcb.request.d.ts → extraction.request.d.ts} +81 -52
- package/dist/types/interface/api/requests/{pdf.public.request.js → extraction.request.js} +1 -1
- package/dist/types/interface/api/requests/extraction.request.js.map +1 -0
- package/dist/types/interface/api/requests/index.d.ts +2 -1
- package/dist/types/interface/api/requests/index.js +2 -1
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/responses/beam.response.d.ts +92 -0
- package/dist/types/interface/api/responses/{rcb.response.js → beam.response.js} +1 -1
- package/dist/types/interface/api/responses/beam.response.js.map +1 -0
- package/dist/types/interface/api/responses/extraction.response.d.ts +403 -0
- package/dist/types/interface/api/{requests/user-tag.request.js → responses/extraction.response.js} +1 -1
- package/dist/types/interface/api/responses/extraction.response.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +2 -1
- package/dist/types/interface/api/responses/index.js +2 -1
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/models/beam.dto.d.ts +58 -0
- package/dist/types/interface/{api/requests/pdf.request.js → models/beam.dto.js} +1 -1
- package/dist/types/interface/models/beam.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +159 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -0
- package/dist/types/interface/models/extraction-plan.dto.d.ts +163 -0
- package/dist/types/interface/models/extraction-plan.dto.js +11 -0
- package/dist/types/interface/models/extraction-plan.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-plan.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-plan.dto.test.js +35 -0
- package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.d.ts +37 -0
- package/dist/types/interface/{api/requests/rcb.request.js → models/extraction-spatial-template.dto.js} +1 -1
- package/dist/types/interface/models/extraction-spatial-template.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js +15 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -0
- package/dist/types/interface/models/{rcb.dto.d.ts → extraction.dto.d.ts} +64 -48
- package/dist/types/interface/models/extraction.dto.js +28 -0
- package/dist/types/interface/models/extraction.dto.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +4 -1
- package/dist/types/interface/models/index.js +4 -1
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/organization.dto.d.ts +2 -0
- package/dist/utils/{rcb-webhook.utils.d.ts → extraction-webhook.utils.d.ts} +2 -2
- package/dist/utils/{rcb-webhook.utils.js → extraction-webhook.utils.js} +4 -4
- package/dist/utils/extraction-webhook.utils.js.map +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/beam.api.ts +300 -0
- package/src/api/extraction-plan-preset.api.test.ts +24 -0
- package/src/api/extraction-plan-preset.api.ts +51 -0
- package/src/api/extraction-settings.api.ts +59 -0
- package/src/api/extraction.api.ts +899 -0
- package/src/api/index.ts +56 -51
- package/src/api/tests/beam.api.spec.ts +42 -0
- package/src/constants/beam.constants.ts +4 -0
- package/src/constants/index.ts +6 -5
- package/src/index.ts +840 -747
- package/src/types/enum/beam.enum.ts +24 -0
- package/src/types/enum/combine-strategy.enum.ts +7 -0
- package/src/types/enum/content-share.enum.ts +38 -36
- package/src/types/enum/document-type.enum.ts +10 -0
- package/src/types/enum/extraction-feedback-issue-type.enum.ts +10 -0
- package/src/types/enum/extraction-warning.enum.ts +21 -0
- package/src/types/enum/index.ts +13 -6
- package/src/types/enum/interpreter-kind.enum.ts +7 -0
- package/src/types/enum/provider-kind.enum.ts +13 -0
- package/src/types/interface/api/requests/beam.request.ts +152 -0
- package/src/types/interface/api/requests/extraction.request.ts +366 -0
- package/src/types/interface/api/requests/index.ts +29 -28
- package/src/types/interface/api/responses/beam.response.ts +122 -0
- package/src/types/interface/api/responses/extraction.response.ts +454 -0
- package/src/types/interface/api/responses/index.ts +33 -32
- package/src/types/interface/models/beam.dto.ts +67 -0
- package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +193 -0
- package/src/types/interface/models/extraction-plan.dto.test.ts +47 -0
- package/src/types/interface/models/extraction-plan.dto.ts +241 -0
- package/src/types/interface/models/extraction-spatial-template.dto.test.ts +27 -0
- package/src/types/interface/models/extraction-spatial-template.dto.ts +48 -0
- package/src/types/interface/models/{rcb.dto.ts → extraction.dto.ts} +317 -267
- package/src/types/interface/models/index.ts +34 -31
- package/src/types/interface/models/organization.dto.ts +21 -12
- package/src/types/tests/beam-management-types.spec.ts +38 -0
- package/src/types/tests/beam-share-enums.spec.ts +11 -0
- package/src/types/tests/beam.dto.spec.ts +61 -0
- package/src/types/tests/beam.request-response.spec.ts +43 -0
- package/src/utils/{rcb-webhook.utils.ts → extraction-webhook.utils.ts} +30 -30
- package/src/utils/index.ts +6 -6
- package/tsconfig.json +36 -35
- package/dist/api/atlas-page-content.api.d.ts +0 -0
- package/dist/api/atlas-page-content.api.js +0 -2
- package/dist/api/atlas-page-content.api.js.map +0 -1
- package/dist/api/pdf.api.d.ts +0 -15
- package/dist/api/pdf.api.js +0 -61
- package/dist/api/pdf.api.js.map +0 -1
- package/dist/api/pdf.public.api.d.ts +0 -8
- package/dist/api/pdf.public.api.js +0 -33
- package/dist/api/pdf.public.api.js.map +0 -1
- package/dist/api/rcb.api.d.ts +0 -72
- package/dist/api/rcb.api.js +0 -400
- package/dist/api/rcb.api.js.map +0 -1
- package/dist/api/user-tag.api.d.ts +0 -9
- package/dist/api/user-tag.api.js +0 -37
- package/dist/api/user-tag.api.js.map +0 -1
- package/dist/constants/user-tag.constants.d.ts +0 -3
- package/dist/constants/user-tag.constants.js +0 -7
- package/dist/constants/user-tag.constants.js.map +0 -1
- package/dist/types/enum/pdf-session.enum.d.ts +0 -10
- package/dist/types/enum/pdf-session.enum.js +0 -16
- package/dist/types/enum/pdf-session.enum.js.map +0 -1
- package/dist/types/interface/api/requests/pdf.public.request.d.ts +0 -19
- package/dist/types/interface/api/requests/pdf.public.request.js.map +0 -1
- package/dist/types/interface/api/requests/pdf.request.d.ts +0 -50
- package/dist/types/interface/api/requests/pdf.request.js.map +0 -1
- package/dist/types/interface/api/requests/rcb.request.js.map +0 -1
- package/dist/types/interface/api/requests/user-tag.request.d.ts +0 -44
- package/dist/types/interface/api/requests/user-tag.request.js.map +0 -1
- package/dist/types/interface/api/responses/pdf.public.response.d.ts +0 -33
- package/dist/types/interface/api/responses/pdf.public.response.js +0 -3
- package/dist/types/interface/api/responses/pdf.public.response.js.map +0 -1
- package/dist/types/interface/api/responses/pdf.response.d.ts +0 -35
- package/dist/types/interface/api/responses/pdf.response.js.map +0 -1
- package/dist/types/interface/api/responses/rcb.response.d.ts +0 -376
- package/dist/types/interface/api/responses/rcb.response.js.map +0 -1
- package/dist/types/interface/api/responses/user-tag.response.d.ts +0 -32
- package/dist/types/interface/api/responses/user-tag.response.js +0 -3
- package/dist/types/interface/api/responses/user-tag.response.js.map +0 -1
- package/dist/types/interface/models/pdf-session.dto.d.ts +0 -28
- package/dist/types/interface/models/pdf-session.dto.js +0 -3
- package/dist/types/interface/models/pdf-session.dto.js.map +0 -1
- package/dist/types/interface/models/rcb.dto.js +0 -26
- package/dist/types/interface/models/rcb.dto.js.map +0 -1
- package/dist/types/interface/models/user-tag.dto.d.ts +0 -22
- package/dist/types/interface/models/user-tag.dto.js +0 -3
- package/dist/types/interface/models/user-tag.dto.js.map +0 -1
- package/dist/utils/rcb-webhook.utils.js.map +0 -1
- package/src/api/rcb.api.ts +0 -829
- package/src/types/interface/api/requests/rcb.request.ts +0 -267
- package/src/types/interface/api/responses/rcb.response.ts +0 -399
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
// ──────────────────────────────────────────────
|
|
2
|
-
// RCB API requests.
|
|
3
|
-
// ──────────────────────────────────────────────
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
RcbExtractionMode,
|
|
7
|
-
RcbFeedbackIssueType,
|
|
8
|
-
RcbFeedbackStatus,
|
|
9
|
-
RcbProcessingMode,
|
|
10
|
-
IRcbBankHint,
|
|
11
|
-
} from '../../models/rcb.dto';
|
|
12
|
-
|
|
13
|
-
// ─── EXTRACT ─────────────────────────────────
|
|
14
|
-
|
|
15
|
-
export interface IExtractRcbBody {
|
|
16
|
-
/** Inline PDF buffer — multipart upload only. SDK helpers wrap this. */
|
|
17
|
-
pdf?: Buffer | Uint8Array;
|
|
18
|
-
storage_file_id?: string;
|
|
19
|
-
mode: RcbExtractionMode;
|
|
20
|
-
hint?: IRcbBankHint;
|
|
21
|
-
template_id?: string;
|
|
22
|
-
template?: Record<string, unknown>;
|
|
23
|
-
pdf_filename?: string;
|
|
24
|
-
user_external_id?: string;
|
|
25
|
-
user_metadata?: Record<string, unknown>;
|
|
26
|
-
archive?: boolean;
|
|
27
|
-
force?: boolean;
|
|
28
|
-
processing?: RcbProcessingMode;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface IExtractBulkRcbBody {
|
|
32
|
-
items: Array<{
|
|
33
|
-
storage_file_id?: string;
|
|
34
|
-
pdf_base64?: string;
|
|
35
|
-
mode: RcbExtractionMode;
|
|
36
|
-
hint?: IRcbBankHint;
|
|
37
|
-
template_id?: string;
|
|
38
|
-
template?: Record<string, unknown>;
|
|
39
|
-
pdf_filename?: string;
|
|
40
|
-
user_external_id?: string;
|
|
41
|
-
user_metadata?: Record<string, unknown>;
|
|
42
|
-
archive?: boolean;
|
|
43
|
-
force?: boolean;
|
|
44
|
-
}>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// ─── DETECT ──────────────────────────────────
|
|
48
|
-
|
|
49
|
-
export interface IDetectBulkRcbBody {
|
|
50
|
-
items: Array<{ pdf_base64: string; pdf_filename?: string }>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ─── FILES ───────────────────────────────────
|
|
54
|
-
|
|
55
|
-
export interface IListFilesRcbQuery {
|
|
56
|
-
hash?: string;
|
|
57
|
-
external_id?: string;
|
|
58
|
-
application_file_id?: string;
|
|
59
|
-
bank?: string;
|
|
60
|
-
from?: string;
|
|
61
|
-
to?: string;
|
|
62
|
-
limit?: number;
|
|
63
|
-
offset?: number;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface IGetFileRcbParams {
|
|
67
|
-
fileId: string;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface IPatchFileRcbBody {
|
|
71
|
-
user_external_id?: string | null;
|
|
72
|
-
user_metadata?: Record<string, unknown> | null;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// ─── EXTRACTIONS ─────────────────────────────
|
|
76
|
-
|
|
77
|
-
export interface IGetExtractionRcbParams {
|
|
78
|
-
extractionId: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface IPatchExtractionRcbBody {
|
|
82
|
-
tags?: string[] | null;
|
|
83
|
-
note?: string | null;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface ISearchExtractionRecordsRcbQuery {
|
|
87
|
-
q?: string;
|
|
88
|
-
amount_min?: number;
|
|
89
|
-
amount_max?: number;
|
|
90
|
-
sign?: 'debit' | 'credit';
|
|
91
|
-
date_from?: string;
|
|
92
|
-
date_to?: string;
|
|
93
|
-
sort?: 'date' | 'amount' | 'description';
|
|
94
|
-
sort_dir?: 'asc' | 'desc';
|
|
95
|
-
limit?: number;
|
|
96
|
-
offset?: number;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface IExportExtractionRcbQuery {
|
|
100
|
-
format: 'csv' | 'json';
|
|
101
|
-
delimiter?: ',' | ';' | '\t';
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface IAsyncExportExtractionRcbBody {
|
|
105
|
-
format: 'csv' | 'json';
|
|
106
|
-
delimiter?: ',' | ';' | '\t';
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// ─── TEMPLATES ───────────────────────────────
|
|
110
|
-
|
|
111
|
-
export interface ICreateTemplateRcbBody {
|
|
112
|
-
name: string;
|
|
113
|
-
description?: string;
|
|
114
|
-
template_json: Record<string, unknown>;
|
|
115
|
-
comment?: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface IUpdateTemplateRcbBody {
|
|
119
|
-
template_json: Record<string, unknown>;
|
|
120
|
-
comment?: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export interface IPatchTemplateMetaRcbBody {
|
|
124
|
-
name?: string;
|
|
125
|
-
description?: string | null;
|
|
126
|
-
is_active?: boolean;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// ─── FEEDBACK ────────────────────────────────
|
|
130
|
-
|
|
131
|
-
export interface ICreateFeedbackRcbBody {
|
|
132
|
-
extraction_id: string;
|
|
133
|
-
issue_type: RcbFeedbackIssueType;
|
|
134
|
-
description?: string;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface IPatchFeedbackRcbBody {
|
|
138
|
-
status: RcbFeedbackStatus;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export interface IListFeedbackRcbQuery {
|
|
142
|
-
extraction_id?: string;
|
|
143
|
-
status?: RcbFeedbackStatus;
|
|
144
|
-
issue_type?: RcbFeedbackIssueType;
|
|
145
|
-
limit?: number;
|
|
146
|
-
offset?: number;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// ─── USAGE ───────────────────────────────────
|
|
150
|
-
|
|
151
|
-
export interface IListUsageRcbQuery {
|
|
152
|
-
application_id?: string;
|
|
153
|
-
event_type?: string;
|
|
154
|
-
from?: string;
|
|
155
|
-
to?: string;
|
|
156
|
-
limit?: number;
|
|
157
|
-
offset?: number;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export interface ISummaryUsageRcbQuery {
|
|
161
|
-
from?: string;
|
|
162
|
-
to?: string;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// ─── WEBHOOK DELIVERIES ─────────────────────
|
|
166
|
-
|
|
167
|
-
export interface IListWebhookDeliveriesRcbQuery {
|
|
168
|
-
job_id?: string;
|
|
169
|
-
event?: string;
|
|
170
|
-
delivered?: boolean;
|
|
171
|
-
from?: string;
|
|
172
|
-
to?: string;
|
|
173
|
-
limit?: number;
|
|
174
|
-
offset?: number;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export interface IReplayWebhookDeliveryRcbBody {
|
|
178
|
-
url?: string;
|
|
179
|
-
secret?: string;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// ─── SHARE ───────────────────────────────────
|
|
183
|
-
|
|
184
|
-
export interface IMintShareExtractionRcbBody {
|
|
185
|
-
expires_in_days?: number;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// ─── ADMIN: CATALOGUE ────────────────────────
|
|
189
|
-
|
|
190
|
-
export interface IUpsertBankVersionAdminRcbBody {
|
|
191
|
-
bank: string;
|
|
192
|
-
version: string;
|
|
193
|
-
valid_from?: string | null;
|
|
194
|
-
valid_to?: string | null;
|
|
195
|
-
detector_json: Record<string, unknown>;
|
|
196
|
-
parser_kind: string;
|
|
197
|
-
config_json: Record<string, unknown>;
|
|
198
|
-
is_active?: boolean;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export interface IToggleBankVersionActiveAdminRcbBody {
|
|
202
|
-
is_active: boolean;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface IUpsertQuotaAdminRcbBody {
|
|
206
|
-
tier?: string;
|
|
207
|
-
monthly_extract_cap?: number | null;
|
|
208
|
-
monthly_extracted_cap?: number | null;
|
|
209
|
-
monthly_bytes_cap?: number | null;
|
|
210
|
-
queue_only_above_count?: number | null;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export interface IDetectorReplayAdminRcbBody {
|
|
214
|
-
detected_bank?: string;
|
|
215
|
-
from?: string;
|
|
216
|
-
to?: string;
|
|
217
|
-
limit?: number;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export interface IListRequestLogAdminRcbQuery {
|
|
221
|
-
since_ms?: number;
|
|
222
|
-
status_min?: number;
|
|
223
|
-
status_max?: number;
|
|
224
|
-
user_id?: string;
|
|
225
|
-
path_prefix?: string;
|
|
226
|
-
limit?: number;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// ─── WEBHOOK SUBSCRIPTIONS ──────────────────
|
|
230
|
-
|
|
231
|
-
import type { RcbWebhookEvent } from '../../models/rcb.dto';
|
|
232
|
-
|
|
233
|
-
export interface IRcbWebhookScopeQuery {
|
|
234
|
-
organization_id?: string;
|
|
235
|
-
project_id?: string;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export interface IPaginateRcbWebhookQuery extends IRcbWebhookScopeQuery {
|
|
239
|
-
name?: string;
|
|
240
|
-
event?: RcbWebhookEvent;
|
|
241
|
-
isEnabled?: boolean;
|
|
242
|
-
page?: number;
|
|
243
|
-
limit?: number;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export interface ICreateRcbWebhookBody {
|
|
247
|
-
webhookUrl: string;
|
|
248
|
-
name?: string;
|
|
249
|
-
description?: string;
|
|
250
|
-
isEnabled?: boolean;
|
|
251
|
-
scopes: RcbWebhookEvent[];
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
export interface IUpdateRcbWebhookBody {
|
|
255
|
-
webhookUrl?: string;
|
|
256
|
-
name?: string;
|
|
257
|
-
description?: string;
|
|
258
|
-
isEnabled?: boolean;
|
|
259
|
-
scopes?: RcbWebhookEvent[];
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// ─── SHARED FILES (content_share-backed) ────
|
|
263
|
-
|
|
264
|
-
export interface IListSharedFilesRcbQuery extends IRcbWebhookScopeQuery {
|
|
265
|
-
limit?: number;
|
|
266
|
-
offset?: number;
|
|
267
|
-
}
|
|
@@ -1,399 +0,0 @@
|
|
|
1
|
-
// ──────────────────────────────────────────────
|
|
2
|
-
// RCB API responses.
|
|
3
|
-
// ──────────────────────────────────────────────
|
|
4
|
-
|
|
5
|
-
import { IResponse } from '../type-message/response';
|
|
6
|
-
import {
|
|
7
|
-
IRcbBankVersion,
|
|
8
|
-
IRcbExtraction,
|
|
9
|
-
IRcbExtractionMetadata,
|
|
10
|
-
IRcbFeedback,
|
|
11
|
-
IRcbFile,
|
|
12
|
-
IRcbQuota,
|
|
13
|
-
IRcbTemplate,
|
|
14
|
-
IRcbTemplateVersion,
|
|
15
|
-
IRcbTransaction,
|
|
16
|
-
IRcbWebhookDelivery,
|
|
17
|
-
RcbExtractionMode,
|
|
18
|
-
} from '../../models/rcb.dto';
|
|
19
|
-
|
|
20
|
-
// ─── EXTRACT ─────────────────────────────────
|
|
21
|
-
|
|
22
|
-
export interface IExtractSyncRcbData {
|
|
23
|
-
extraction_id: string;
|
|
24
|
-
file_id: string;
|
|
25
|
-
application_file_id: string | null;
|
|
26
|
-
cached: boolean;
|
|
27
|
-
records: IRcbTransaction[];
|
|
28
|
-
metadata: IRcbExtractionMetadata;
|
|
29
|
-
extraction: {
|
|
30
|
-
mode: RcbExtractionMode;
|
|
31
|
-
strategy_used: string | null;
|
|
32
|
-
confidence: number | null;
|
|
33
|
-
detected_bank: string | null;
|
|
34
|
-
detected_version: string | null;
|
|
35
|
-
balance_validated: boolean | null;
|
|
36
|
-
duration_ms: number | null;
|
|
37
|
-
warnings: string[];
|
|
38
|
-
alternatives: unknown[];
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export type IExtractSyncRcbResponse = IResponse<IExtractSyncRcbData>;
|
|
42
|
-
|
|
43
|
-
export interface IExtractQueueRcbData {
|
|
44
|
-
job_id: string;
|
|
45
|
-
status: string;
|
|
46
|
-
queued_at: string;
|
|
47
|
-
poll_url: string;
|
|
48
|
-
}
|
|
49
|
-
export type IExtractQueueRcbResponse = IResponse<IExtractQueueRcbData>;
|
|
50
|
-
|
|
51
|
-
export interface IExtractBulkRcbData {
|
|
52
|
-
accepted: number;
|
|
53
|
-
rejected: number;
|
|
54
|
-
jobs: Array<{ index: number; job_id: string }>;
|
|
55
|
-
errors: Array<{ index: number; error: string }>;
|
|
56
|
-
}
|
|
57
|
-
export type IExtractBulkRcbResponse = IResponse<IExtractBulkRcbData>;
|
|
58
|
-
|
|
59
|
-
// ─── DETECT ──────────────────────────────────
|
|
60
|
-
|
|
61
|
-
export interface IDetectRcbData {
|
|
62
|
-
pdfHash: string;
|
|
63
|
-
pageCount: number;
|
|
64
|
-
metadata: {
|
|
65
|
-
ibans: Array<{ iban: string; bankCode: string; countryCode: string }>;
|
|
66
|
-
bics: Array<{ bic: string; bankCode: string }>;
|
|
67
|
-
};
|
|
68
|
-
candidates: Array<{
|
|
69
|
-
id: string;
|
|
70
|
-
bankName: string;
|
|
71
|
-
version: string;
|
|
72
|
-
score: number;
|
|
73
|
-
matchedSignals: string[];
|
|
74
|
-
}>;
|
|
75
|
-
durationMs: number;
|
|
76
|
-
}
|
|
77
|
-
export type IDetectRcbResponse = IResponse<IDetectRcbData>;
|
|
78
|
-
|
|
79
|
-
export interface IDetectBulkRcbData {
|
|
80
|
-
count: number;
|
|
81
|
-
results: Array<{ index: number; result?: IDetectRcbData; error?: string }>;
|
|
82
|
-
}
|
|
83
|
-
export type IDetectBulkRcbResponse = IResponse<IDetectBulkRcbData>;
|
|
84
|
-
|
|
85
|
-
// ─── FILES / EXTRACTIONS ─────────────────────
|
|
86
|
-
|
|
87
|
-
export interface IListFilesRcbData {
|
|
88
|
-
data: IRcbFile[];
|
|
89
|
-
total?: number;
|
|
90
|
-
}
|
|
91
|
-
export type IListFilesRcbResponse = IListFilesRcbData;
|
|
92
|
-
|
|
93
|
-
export type IGetFileRcbResponse = IResponse<IRcbFile>;
|
|
94
|
-
|
|
95
|
-
export interface IListFileExtractionsRcbData {
|
|
96
|
-
data: IRcbExtraction[];
|
|
97
|
-
total?: number;
|
|
98
|
-
}
|
|
99
|
-
export type IListFileExtractionsRcbResponse = IListFileExtractionsRcbData;
|
|
100
|
-
|
|
101
|
-
export type IGetExtractionRcbResponse = IResponse<IRcbExtraction>;
|
|
102
|
-
|
|
103
|
-
export interface ISearchExtractionRecordsRcbResponse {
|
|
104
|
-
data: IRcbTransaction[];
|
|
105
|
-
matched: number;
|
|
106
|
-
total: number;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface IDiffExtractionsRcbData {
|
|
110
|
-
left: { id: string; mode: RcbExtractionMode; recordsCount: number | null };
|
|
111
|
-
right: { id: string; mode: RcbExtractionMode; recordsCount: number | null };
|
|
112
|
-
same: number;
|
|
113
|
-
added: IRcbTransaction[];
|
|
114
|
-
removed: IRcbTransaction[];
|
|
115
|
-
changed: Array<{ before: IRcbTransaction; after: IRcbTransaction; fields: string[] }>;
|
|
116
|
-
summary: { leftCount: number; rightCount: number; sumDeltaCents: number };
|
|
117
|
-
}
|
|
118
|
-
export type IDiffExtractionsRcbResponse = IResponse<IDiffExtractionsRcbData>;
|
|
119
|
-
|
|
120
|
-
export interface IAsyncExportRcbData {
|
|
121
|
-
job_id: string;
|
|
122
|
-
status: string;
|
|
123
|
-
poll_url: string;
|
|
124
|
-
}
|
|
125
|
-
export type IAsyncExportRcbResponse = IResponse<IAsyncExportRcbData>;
|
|
126
|
-
|
|
127
|
-
export interface IGetExportJobRcbData {
|
|
128
|
-
id: string;
|
|
129
|
-
status: string;
|
|
130
|
-
progress: number | object | string | boolean;
|
|
131
|
-
result: {
|
|
132
|
-
applicationFileId: string;
|
|
133
|
-
filename: string;
|
|
134
|
-
contentType: string;
|
|
135
|
-
byteSize: number;
|
|
136
|
-
} | null;
|
|
137
|
-
error: string | null;
|
|
138
|
-
}
|
|
139
|
-
export type IGetExportJobRcbResponse = IResponse<IGetExportJobRcbData>;
|
|
140
|
-
|
|
141
|
-
// ─── TEMPLATES ───────────────────────────────
|
|
142
|
-
|
|
143
|
-
export interface ITemplateAndVersionRcbData {
|
|
144
|
-
template: IRcbTemplate;
|
|
145
|
-
version: IRcbTemplateVersion;
|
|
146
|
-
warnings?: string[];
|
|
147
|
-
}
|
|
148
|
-
export type ICreateTemplateRcbResponse = IResponse<ITemplateAndVersionRcbData>;
|
|
149
|
-
export type IUpdateTemplateRcbResponse = IResponse<ITemplateAndVersionRcbData>;
|
|
150
|
-
|
|
151
|
-
export type IListTemplatesRcbResponse = IResponse<IRcbTemplate[]>;
|
|
152
|
-
|
|
153
|
-
export interface IGetTemplateRcbData {
|
|
154
|
-
template: IRcbTemplate;
|
|
155
|
-
latest_version: IRcbTemplateVersion | null;
|
|
156
|
-
}
|
|
157
|
-
export type IGetTemplateRcbResponse = IResponse<IGetTemplateRcbData>;
|
|
158
|
-
|
|
159
|
-
export type IListTemplateVersionsRcbResponse = IResponse<IRcbTemplateVersion[]>;
|
|
160
|
-
|
|
161
|
-
export interface IRcbTemplateCollection {
|
|
162
|
-
$schema: 'abyss-rcb-template-collection/v1';
|
|
163
|
-
exported_at: string;
|
|
164
|
-
templates: Array<{
|
|
165
|
-
name: string;
|
|
166
|
-
description: string | null;
|
|
167
|
-
versions: Array<{
|
|
168
|
-
version: number;
|
|
169
|
-
comment: string | null;
|
|
170
|
-
template_json: Record<string, unknown>;
|
|
171
|
-
}>;
|
|
172
|
-
}>;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface IImportTemplateCollectionRcbData {
|
|
176
|
-
imported: Array<{
|
|
177
|
-
originalName: string;
|
|
178
|
-
createdName: string;
|
|
179
|
-
templateId: string;
|
|
180
|
-
versions: number;
|
|
181
|
-
}>;
|
|
182
|
-
errors: Array<{ originalName: string; error: string }>;
|
|
183
|
-
}
|
|
184
|
-
export type IImportTemplateCollectionRcbResponse = IResponse<IImportTemplateCollectionRcbData>;
|
|
185
|
-
|
|
186
|
-
// ─── JOBS ────────────────────────────────────
|
|
187
|
-
|
|
188
|
-
export interface IRcbJob {
|
|
189
|
-
id: string;
|
|
190
|
-
status:
|
|
191
|
-
| 'waiting'
|
|
192
|
-
| 'active'
|
|
193
|
-
| 'completed'
|
|
194
|
-
| 'failed'
|
|
195
|
-
| 'delayed'
|
|
196
|
-
| 'paused'
|
|
197
|
-
| 'pending'
|
|
198
|
-
| 'stuck';
|
|
199
|
-
progress: number | object | string | boolean;
|
|
200
|
-
result: {
|
|
201
|
-
extractionId: string;
|
|
202
|
-
fileId: string;
|
|
203
|
-
cached: boolean;
|
|
204
|
-
recordsCount: number;
|
|
205
|
-
strategyUsed: string | null;
|
|
206
|
-
} | null;
|
|
207
|
-
error: string | null;
|
|
208
|
-
createdAt: number;
|
|
209
|
-
processedOn: number | null;
|
|
210
|
-
finishedOn: number | null;
|
|
211
|
-
attemptsMade: number;
|
|
212
|
-
}
|
|
213
|
-
export type IGetJobRcbResponse = IResponse<IRcbJob>;
|
|
214
|
-
|
|
215
|
-
// ─── FEEDBACK ────────────────────────────────
|
|
216
|
-
|
|
217
|
-
export type ICreateFeedbackRcbResponse = IResponse<IRcbFeedback>;
|
|
218
|
-
export interface IListFeedbackRcbResponse {
|
|
219
|
-
data: IRcbFeedback[];
|
|
220
|
-
total?: number;
|
|
221
|
-
}
|
|
222
|
-
export type IGetFeedbackRcbResponse = IResponse<IRcbFeedback>;
|
|
223
|
-
|
|
224
|
-
// ─── HEALTH / STATS / QUOTA ─────────────────
|
|
225
|
-
|
|
226
|
-
export interface IRcbHealth {
|
|
227
|
-
status: 'ok' | 'degraded' | 'down';
|
|
228
|
-
redis: 'ok' | 'down';
|
|
229
|
-
queue: 'ok' | 'down';
|
|
230
|
-
worker: 'ok' | 'down';
|
|
231
|
-
isShuttingDown: boolean;
|
|
232
|
-
rssMb: number;
|
|
233
|
-
heapUsedMb: number;
|
|
234
|
-
uptimeSec: number;
|
|
235
|
-
}
|
|
236
|
-
export type IHealthRcbResponse = IResponse<IRcbHealth>;
|
|
237
|
-
|
|
238
|
-
export interface IRcbStats {
|
|
239
|
-
waiting: number;
|
|
240
|
-
active: number;
|
|
241
|
-
completed: number;
|
|
242
|
-
failed: number;
|
|
243
|
-
delayed: number;
|
|
244
|
-
workerConcurrency: number;
|
|
245
|
-
isPaused: boolean;
|
|
246
|
-
}
|
|
247
|
-
export type IStatsRcbResponse = IResponse<IRcbStats>;
|
|
248
|
-
|
|
249
|
-
export interface IRcbUsageSummary {
|
|
250
|
-
totalEvents: number;
|
|
251
|
-
successCount: number;
|
|
252
|
-
failedCount: number;
|
|
253
|
-
cachedCount: number;
|
|
254
|
-
totalDurationMs: number;
|
|
255
|
-
totalRecordsExtracted: number;
|
|
256
|
-
totalBytesProcessed: number;
|
|
257
|
-
byEventType: Record<string, number>;
|
|
258
|
-
byBank: Record<string, number>;
|
|
259
|
-
}
|
|
260
|
-
export type ISummaryUsageRcbResponse = IResponse<IRcbUsageSummary>;
|
|
261
|
-
|
|
262
|
-
export interface IRcbQuotaStatus {
|
|
263
|
-
tier: string;
|
|
264
|
-
used: { extractCalls: number; extractedRecords: number; bytesProcessed: number };
|
|
265
|
-
caps: {
|
|
266
|
-
monthlyExtractCap: number | null;
|
|
267
|
-
monthlyExtractedCap: number | null;
|
|
268
|
-
monthlyBytesCap: number | null;
|
|
269
|
-
queueOnlyAboveCount: number | null;
|
|
270
|
-
};
|
|
271
|
-
allowed: boolean;
|
|
272
|
-
force_queue: boolean;
|
|
273
|
-
reason: string | null;
|
|
274
|
-
}
|
|
275
|
-
export type IGetQuotaRcbResponse = IResponse<IRcbQuotaStatus>;
|
|
276
|
-
|
|
277
|
-
// ─── WEBHOOK DELIVERIES ─────────────────────
|
|
278
|
-
|
|
279
|
-
export interface IListWebhookDeliveriesRcbResponse {
|
|
280
|
-
data: IRcbWebhookDelivery[];
|
|
281
|
-
total?: number;
|
|
282
|
-
}
|
|
283
|
-
export type IGetWebhookDeliveryRcbResponse = IResponse<IRcbWebhookDelivery>;
|
|
284
|
-
|
|
285
|
-
// ─── SHARE (public) ──────────────────────────
|
|
286
|
-
|
|
287
|
-
export interface IGetSharedExtractionRcbData {
|
|
288
|
-
id: string;
|
|
289
|
-
mode: RcbExtractionMode;
|
|
290
|
-
strategy_used: string | null;
|
|
291
|
-
confidence: number | null;
|
|
292
|
-
records_count: number | null;
|
|
293
|
-
balance_validated: boolean | null;
|
|
294
|
-
records: IRcbTransaction[];
|
|
295
|
-
metadata: IRcbExtractionMetadata;
|
|
296
|
-
warnings: string[];
|
|
297
|
-
share_expires_at: string | null;
|
|
298
|
-
created_at: string;
|
|
299
|
-
}
|
|
300
|
-
export type IGetSharedExtractionRcbResponse = IResponse<IGetSharedExtractionRcbData>;
|
|
301
|
-
|
|
302
|
-
export interface IMintShareExtractionRcbData {
|
|
303
|
-
share_url: string;
|
|
304
|
-
share_token: string;
|
|
305
|
-
share_expires_at: string | null;
|
|
306
|
-
}
|
|
307
|
-
export type IMintShareExtractionRcbResponse = IResponse<IMintShareExtractionRcbData>;
|
|
308
|
-
|
|
309
|
-
// ─── CHANGELOG ──────────────────────────────
|
|
310
|
-
|
|
311
|
-
export interface IChangelogRcbData {
|
|
312
|
-
current_version: string;
|
|
313
|
-
entries: Array<{ version: string; date: string; highlights: string[] }>;
|
|
314
|
-
}
|
|
315
|
-
export type IChangelogRcbResponse = IResponse<IChangelogRcbData>;
|
|
316
|
-
|
|
317
|
-
// ─── ADMIN: CATALOGUE ────────────────────────
|
|
318
|
-
|
|
319
|
-
export interface IListBankVersionsAdminRcbResponse {
|
|
320
|
-
data: IRcbBankVersion[];
|
|
321
|
-
total?: number;
|
|
322
|
-
}
|
|
323
|
-
export type IGetBankVersionAdminRcbResponse = IResponse<IRcbBankVersion>;
|
|
324
|
-
export type IUpsertBankVersionAdminRcbResponse = IResponse<IRcbBankVersion>;
|
|
325
|
-
|
|
326
|
-
export interface IReloadBankVersionsAdminRcbData {
|
|
327
|
-
loaded: number;
|
|
328
|
-
skipped: number;
|
|
329
|
-
total: number;
|
|
330
|
-
}
|
|
331
|
-
export type IReloadBankVersionsAdminRcbResponse = IResponse<IReloadBankVersionsAdminRcbData>;
|
|
332
|
-
|
|
333
|
-
export type IGetQuotaAdminRcbResponse = IResponse<IRcbQuota | null>;
|
|
334
|
-
export type IUpsertQuotaAdminRcbResponse = IResponse<IRcbQuota>;
|
|
335
|
-
|
|
336
|
-
export interface IDetectorReplayAdminRcbData {
|
|
337
|
-
scanned: number;
|
|
338
|
-
kept: number;
|
|
339
|
-
flipped: number;
|
|
340
|
-
newDetections: number;
|
|
341
|
-
skipped: number;
|
|
342
|
-
details: unknown[];
|
|
343
|
-
durationMs: number;
|
|
344
|
-
}
|
|
345
|
-
export type IDetectorReplayAdminRcbResponse = IResponse<IDetectorReplayAdminRcbData>;
|
|
346
|
-
|
|
347
|
-
export interface IListRequestLogAdminRcbData {
|
|
348
|
-
data: Array<{
|
|
349
|
-
ts: number;
|
|
350
|
-
method: string;
|
|
351
|
-
path: string;
|
|
352
|
-
status: number;
|
|
353
|
-
durationMs: number;
|
|
354
|
-
userId: string | null;
|
|
355
|
-
requestId: string | null;
|
|
356
|
-
rateLimitBucket: string | null;
|
|
357
|
-
}>;
|
|
358
|
-
meta: { capacity: number; used: number; oldestTs: number | null; newestTs: number | null };
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
// ─── METRICS ────────────────────────────────
|
|
362
|
-
|
|
363
|
-
export interface IRcbPerBankMetric {
|
|
364
|
-
bank: string;
|
|
365
|
-
extractions: number;
|
|
366
|
-
avgConfidence: number;
|
|
367
|
-
avgRecords: number;
|
|
368
|
-
balanceValidatedRate: number;
|
|
369
|
-
avgDurationMs: number;
|
|
370
|
-
feedbackOpen: number;
|
|
371
|
-
}
|
|
372
|
-
export type IPerBankMetricsAdminRcbResponse = IResponse<IRcbPerBankMetric[]>;
|
|
373
|
-
|
|
374
|
-
export interface IRcbLatencyBucket {
|
|
375
|
-
bucket: string;
|
|
376
|
-
count: number;
|
|
377
|
-
}
|
|
378
|
-
export type ILatencyMetricsAdminRcbResponse = IResponse<IRcbLatencyBucket[]>;
|
|
379
|
-
|
|
380
|
-
export interface IRcbOverviewMetrics {
|
|
381
|
-
last24h: { extractions: number; failures: number; avgLatencyMs: number };
|
|
382
|
-
last30d: { extractions: number; uniqueUsers: number };
|
|
383
|
-
}
|
|
384
|
-
export type IOverviewMetricsAdminRcbResponse = IResponse<IRcbOverviewMetrics>;
|
|
385
|
-
|
|
386
|
-
// ─── WEBHOOK SUBSCRIPTIONS ──────────────────
|
|
387
|
-
|
|
388
|
-
import type { IRcbWebhook } from '../../models/rcb.dto';
|
|
389
|
-
|
|
390
|
-
export interface IPaginateRcbWebhookData {
|
|
391
|
-
rows: IRcbWebhook[];
|
|
392
|
-
total: number;
|
|
393
|
-
}
|
|
394
|
-
export type IPaginateRcbWebhookResponse = IResponse<IPaginateRcbWebhookData>;
|
|
395
|
-
export type IGetRcbWebhookResponse = IResponse<{ webhook: IRcbWebhook }>;
|
|
396
|
-
export type ICreateRcbWebhookResponse = IResponse<{ webhook: IRcbWebhook }>;
|
|
397
|
-
export type IUpdateRcbWebhookResponse = IResponse<{ webhook: IRcbWebhook }>;
|
|
398
|
-
export type IDeleteRcbWebhookResponse = IResponse<{ ok: true }>;
|
|
399
|
-
export type IResetSecretRcbWebhookResponse = IResponse<{ webhook: IRcbWebhook }>;
|