@abyss-project/tools 1.3.0 → 1.4.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/types/interface/api/requests/beam.request.d.ts +1 -0
- package/dist/types/interface/api/requests/extraction.request.d.ts +4 -0
- package/dist/types/interface/models/extraction.dto.d.ts +2 -0
- package/dist/types/interface/models/extraction.dto.js.map +1 -1
- package/package.json +1 -1
- package/src/types/interface/api/requests/beam.request.ts +4 -1
- package/src/types/interface/api/requests/extraction.request.ts +6 -0
- package/src/types/interface/models/extraction.dto.ts +7 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import { ExtractionMode, ExtractionFeedbackIssueType, ExtractionFeedbackStatus, ProcessingMode, IExtractionBankHint } from '../../models/extraction.dto';
|
|
4
|
+
import { DocumentType } from '../../../enum/document-type.enum';
|
|
4
5
|
import type { IExtractionPlan } from '../../models/extraction-plan.dto';
|
|
5
6
|
export interface IExtractionScopeQuery {
|
|
6
7
|
organization_id?: string;
|
|
@@ -93,10 +94,12 @@ export interface IAsyncExportExtractionBody {
|
|
|
93
94
|
export interface IListTemplatesQuery {
|
|
94
95
|
kind?: 'spatial' | 'dsl';
|
|
95
96
|
archived?: 'true' | 'false' | 'all';
|
|
97
|
+
document_type?: DocumentType;
|
|
96
98
|
}
|
|
97
99
|
export interface ICreateTemplateBody {
|
|
98
100
|
name: string;
|
|
99
101
|
description?: string;
|
|
102
|
+
document_type?: DocumentType | null;
|
|
100
103
|
template_json: Record<string, unknown>;
|
|
101
104
|
comment?: string;
|
|
102
105
|
witness_pdf_base64?: string;
|
|
@@ -111,6 +114,7 @@ export interface IUpdateTemplateBody {
|
|
|
111
114
|
export interface IPatchTemplateMetaBody {
|
|
112
115
|
name?: string;
|
|
113
116
|
description?: string | null;
|
|
117
|
+
document_type?: DocumentType | null;
|
|
114
118
|
is_active?: boolean;
|
|
115
119
|
}
|
|
116
120
|
export interface ISubmitFeedbackExtractionBody {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ExtractionWarningCode } from '../../../types/enum/extraction-warning.enum';
|
|
2
2
|
import { ExtractionFeedbackIssueType } from '../../../types/enum/extraction-feedback-issue-type.enum';
|
|
3
|
+
import { DocumentType } from '../../../types/enum/document-type.enum';
|
|
3
4
|
import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
|
|
4
5
|
export { ExtractionFeedbackIssueType };
|
|
5
6
|
export type ExtractionMode = 'auto' | 'hint' | 'template';
|
|
@@ -107,6 +108,7 @@ export interface IExtractionTemplate {
|
|
|
107
108
|
createdByUserId: string | null;
|
|
108
109
|
name: string;
|
|
109
110
|
description: string | null;
|
|
111
|
+
documentType: DocumentType | null;
|
|
110
112
|
isActive: boolean;
|
|
111
113
|
lastUsedAt: string | null;
|
|
112
114
|
createdAt: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;
|
|
1
|
+
{"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;AA4E3E,sGA5EA,+CAAqB,OA4EA;AA3E9B,iHAAsG;AAK7F,4GALA,iEAA2B,OAKA;AAoQpC,IAAY,sBAYX;AAZD,WAAY,sBAAsB;IAChC,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;IACrC,+EAAqD,CAAA;IACrD,uEAA6C,CAAA;IAC7C,6DAAmC,CAAA;IACnC,2DAAiC,CAAA;IACjC,6DAAmC,CAAA;IACnC,uEAA6C,CAAA;IAC7C,uDAA6B,CAAA;IAC7B,mEAAyC,CAAA;IACzC,6DAAmC,CAAA;AACrC,CAAC,EAZW,sBAAsB,sCAAtB,sBAAsB,QAYjC;AAEY,QAAA,yBAAyB,GACpC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAuCxC,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC"}
|
package/package.json
CHANGED
|
@@ -42,12 +42,15 @@ export type ICreateBeamBody = {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
// Anonymous draft creation (POST /beam/public). Same metadata as the owned
|
|
45
|
-
// create
|
|
45
|
+
// create. `expiresInDays` is an optional 1..7 lifetime (integer) the anonymous
|
|
46
|
+
// creator may pick; absent = the fixed 7-day anonymous TTL, and createDraft caps
|
|
47
|
+
// it at 7 days.
|
|
46
48
|
export type ICreateBeamPublicBody = {
|
|
47
49
|
title?: string;
|
|
48
50
|
message?: string;
|
|
49
51
|
visibility?: BeamVisibility;
|
|
50
52
|
password?: string;
|
|
53
|
+
expiresInDays?: number;
|
|
51
54
|
maxDownloads?: number;
|
|
52
55
|
recipients?: { email: string; locale?: string }[];
|
|
53
56
|
};
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ProcessingMode,
|
|
10
10
|
IExtractionBankHint,
|
|
11
11
|
} from '../../models/extraction.dto';
|
|
12
|
+
import { DocumentType } from '../../../enum/document-type.enum';
|
|
12
13
|
import type { IExtractionPlan } from '../../models/extraction-plan.dto';
|
|
13
14
|
|
|
14
15
|
// ─── SCOPE ───────────────────────────────────
|
|
@@ -158,11 +159,15 @@ export interface IAsyncExportExtractionBody {
|
|
|
158
159
|
export interface IListTemplatesQuery {
|
|
159
160
|
kind?: 'spatial' | 'dsl';
|
|
160
161
|
archived?: 'true' | 'false' | 'all';
|
|
162
|
+
/** Filter to templates targeting a given document type. */
|
|
163
|
+
document_type?: DocumentType;
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
export interface ICreateTemplateBody {
|
|
164
167
|
name: string;
|
|
165
168
|
description?: string;
|
|
169
|
+
/** Kind of document the template targets (DocumentType). */
|
|
170
|
+
document_type?: DocumentType | null;
|
|
166
171
|
template_json: Record<string, unknown>;
|
|
167
172
|
comment?: string;
|
|
168
173
|
/**
|
|
@@ -187,6 +192,7 @@ export interface IUpdateTemplateBody {
|
|
|
187
192
|
export interface IPatchTemplateMetaBody {
|
|
188
193
|
name?: string;
|
|
189
194
|
description?: string | null;
|
|
195
|
+
document_type?: DocumentType | null;
|
|
190
196
|
is_active?: boolean;
|
|
191
197
|
}
|
|
192
198
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { ExtractionWarningCode } from '../../../types/enum/extraction-warning.enum';
|
|
7
7
|
import { ExtractionFeedbackIssueType } from '../../../types/enum/extraction-feedback-issue-type.enum';
|
|
8
|
+
import { DocumentType } from '../../../types/enum/document-type.enum';
|
|
8
9
|
import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
|
|
9
10
|
|
|
10
11
|
// Re-export so consumers can import ExtractionFeedbackIssueType from the DTO barrel.
|
|
@@ -165,6 +166,12 @@ export interface IExtractionTemplate {
|
|
|
165
166
|
createdByUserId: string | null;
|
|
166
167
|
name: string;
|
|
167
168
|
description: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Kind of document the template targets (DocumentType). Null when the
|
|
171
|
+
* template declares no type. Authoritative — spatial templates also embed
|
|
172
|
+
* `templateJson.documentType`, but this column is the source of truth.
|
|
173
|
+
*/
|
|
174
|
+
documentType: DocumentType | null;
|
|
168
175
|
isActive: boolean;
|
|
169
176
|
/**
|
|
170
177
|
* Stamped (fire-and-forget) whenever an extraction run resolves the
|