@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
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { ProviderKind, CostTier } from '../../enum/provider-kind.enum';
|
|
2
|
+
import { InterpreterKind } from '../../enum/interpreter-kind.enum';
|
|
3
|
+
import { CombineStrategy } from '../../enum/combine-strategy.enum';
|
|
4
|
+
export { ProviderKind, CostTier, InterpreterKind, CombineStrategy };
|
|
5
|
+
export interface IModeRef {
|
|
6
|
+
provider: ProviderKind;
|
|
7
|
+
interpreter: InterpreterKind;
|
|
8
|
+
providerId: string;
|
|
9
|
+
interpreterId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IFallbackGate {
|
|
12
|
+
minConfidence: number;
|
|
13
|
+
scope: 'global' | 'requiredFields';
|
|
14
|
+
}
|
|
15
|
+
export interface IPass {
|
|
16
|
+
providerId: string;
|
|
17
|
+
interpreterId: string;
|
|
18
|
+
documentType?: string;
|
|
19
|
+
templateId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IStage {
|
|
22
|
+
passes: IPass[];
|
|
23
|
+
runParallel: boolean;
|
|
24
|
+
fallback?: IFallbackGate;
|
|
25
|
+
}
|
|
26
|
+
export interface IExtractionPlan {
|
|
27
|
+
stages: IStage[];
|
|
28
|
+
combine: CombineStrategy;
|
|
29
|
+
}
|
|
30
|
+
export type ISignal = {
|
|
31
|
+
kind: 'format';
|
|
32
|
+
check: string;
|
|
33
|
+
passed: boolean;
|
|
34
|
+
weight: number;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'coherence';
|
|
37
|
+
check: string;
|
|
38
|
+
passed: boolean;
|
|
39
|
+
weight: number;
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'anchor';
|
|
42
|
+
detail: string;
|
|
43
|
+
weight: number;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'agreement';
|
|
46
|
+
agreed: boolean;
|
|
47
|
+
modes: number;
|
|
48
|
+
weight: number;
|
|
49
|
+
};
|
|
50
|
+
export interface IFieldSource {
|
|
51
|
+
mode: IModeRef;
|
|
52
|
+
value: unknown;
|
|
53
|
+
confidence: number;
|
|
54
|
+
signals: ISignal[];
|
|
55
|
+
}
|
|
56
|
+
export interface IFieldValue {
|
|
57
|
+
value: unknown;
|
|
58
|
+
confidence: number;
|
|
59
|
+
chosen: IModeRef;
|
|
60
|
+
sources: IFieldSource[];
|
|
61
|
+
agreement?: {
|
|
62
|
+
agreed: boolean;
|
|
63
|
+
distinctValues: number;
|
|
64
|
+
};
|
|
65
|
+
signals: ISignal[];
|
|
66
|
+
provenanceTruncated?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface IFieldImportance {
|
|
69
|
+
fieldKey: string;
|
|
70
|
+
weight: number;
|
|
71
|
+
required: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface IConfidenceStats {
|
|
74
|
+
overall: number;
|
|
75
|
+
mean: number;
|
|
76
|
+
highest: number;
|
|
77
|
+
lowest: number;
|
|
78
|
+
median: number;
|
|
79
|
+
belowThreshold: {
|
|
80
|
+
threshold: number;
|
|
81
|
+
count: number;
|
|
82
|
+
};
|
|
83
|
+
fieldCount: number;
|
|
84
|
+
}
|
|
85
|
+
export interface IPassContribution {
|
|
86
|
+
mode: IModeRef;
|
|
87
|
+
confidence: number;
|
|
88
|
+
fieldsContributed: number;
|
|
89
|
+
ocrPageCount: number;
|
|
90
|
+
}
|
|
91
|
+
export interface IGlobalConfidence {
|
|
92
|
+
stats: IConfidenceStats;
|
|
93
|
+
method: CombineStrategy;
|
|
94
|
+
aggregation: 'weighted-by-field-importance';
|
|
95
|
+
perPass: IPassContribution[];
|
|
96
|
+
lowestFields: {
|
|
97
|
+
fieldKey: string;
|
|
98
|
+
confidence: number;
|
|
99
|
+
}[];
|
|
100
|
+
}
|
|
101
|
+
export interface IManifestPass {
|
|
102
|
+
providerId: string;
|
|
103
|
+
providerVersion: string;
|
|
104
|
+
interpreterId: string;
|
|
105
|
+
interpreterVersion: string;
|
|
106
|
+
templateVersionId?: string;
|
|
107
|
+
ocrEngine?: string;
|
|
108
|
+
ocrEngineVersion?: string;
|
|
109
|
+
ocrLangpackVersion?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface IExecutionManifest {
|
|
112
|
+
resolvedPlan: IExtractionPlan;
|
|
113
|
+
combine: CombineStrategy;
|
|
114
|
+
passes: IManifestPass[];
|
|
115
|
+
createdAt: string;
|
|
116
|
+
}
|
|
117
|
+
export interface IExtractionPlanPreset {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
scope: {
|
|
121
|
+
kind: 'user';
|
|
122
|
+
userId: string;
|
|
123
|
+
} | {
|
|
124
|
+
kind: 'org';
|
|
125
|
+
organizationId: string;
|
|
126
|
+
};
|
|
127
|
+
plan: IExtractionPlan;
|
|
128
|
+
isDefault: boolean;
|
|
129
|
+
system: boolean;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
updatedAt: string;
|
|
132
|
+
}
|
|
133
|
+
export interface IProviderMode {
|
|
134
|
+
id: string;
|
|
135
|
+
kind: ProviderKind;
|
|
136
|
+
label: string;
|
|
137
|
+
cost: CostTier;
|
|
138
|
+
version: string;
|
|
139
|
+
}
|
|
140
|
+
export interface IInterpreterMode {
|
|
141
|
+
id: string;
|
|
142
|
+
kind: InterpreterKind;
|
|
143
|
+
label: string;
|
|
144
|
+
cost: CostTier;
|
|
145
|
+
version: string;
|
|
146
|
+
supports: string[];
|
|
147
|
+
accepts: ProviderKind[];
|
|
148
|
+
}
|
|
149
|
+
export interface IExtractModesData {
|
|
150
|
+
providers: IProviderMode[];
|
|
151
|
+
interpreters: IInterpreterMode[];
|
|
152
|
+
}
|
|
153
|
+
export interface IPositionedToken {
|
|
154
|
+
text: string;
|
|
155
|
+
page: number;
|
|
156
|
+
bbox: {
|
|
157
|
+
x: number;
|
|
158
|
+
y: number;
|
|
159
|
+
w: number;
|
|
160
|
+
h: number;
|
|
161
|
+
};
|
|
162
|
+
conf?: number;
|
|
163
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CombineStrategy = exports.InterpreterKind = exports.CostTier = exports.ProviderKind = void 0;
|
|
4
|
+
const provider_kind_enum_1 = require("../../enum/provider-kind.enum");
|
|
5
|
+
Object.defineProperty(exports, "ProviderKind", { enumerable: true, get: function () { return provider_kind_enum_1.ProviderKind; } });
|
|
6
|
+
Object.defineProperty(exports, "CostTier", { enumerable: true, get: function () { return provider_kind_enum_1.CostTier; } });
|
|
7
|
+
const interpreter_kind_enum_1 = require("../../enum/interpreter-kind.enum");
|
|
8
|
+
Object.defineProperty(exports, "InterpreterKind", { enumerable: true, get: function () { return interpreter_kind_enum_1.InterpreterKind; } });
|
|
9
|
+
const combine_strategy_enum_1 = require("../../enum/combine-strategy.enum");
|
|
10
|
+
Object.defineProperty(exports, "CombineStrategy", { enumerable: true, get: function () { return combine_strategy_enum_1.CombineStrategy; } });
|
|
11
|
+
//# sourceMappingURL=extraction-plan.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction-plan.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction-plan.dto.ts"],"names":[],"mappings":";;;AAOA,sEAAuE;AAK9D,6FALA,iCAAY,OAKA;AAAE,yFALA,6BAAQ,OAKA;AAJ/B,4EAAmE;AAIlC,gGAJxB,uCAAe,OAIwB;AAHhD,4EAAmE;AAGjB,gGAHzC,uCAAe,OAGyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const enum_1 = require("../../enum");
|
|
4
|
+
const _pk = enum_1.ProviderKind.TEXT;
|
|
5
|
+
const _ik = enum_1.InterpreterKind.TEMPLATE;
|
|
6
|
+
const _cs = enum_1.CombineStrategy.MAX_CONFIDENCE;
|
|
7
|
+
void _pk;
|
|
8
|
+
void _ik;
|
|
9
|
+
void _cs;
|
|
10
|
+
const fv = {
|
|
11
|
+
value: 1,
|
|
12
|
+
confidence: 0.9,
|
|
13
|
+
chosen: {
|
|
14
|
+
provider: enum_1.ProviderKind.TEXT,
|
|
15
|
+
interpreter: enum_1.InterpreterKind.ALGORITHMIC,
|
|
16
|
+
providerId: 'pdf-text',
|
|
17
|
+
interpreterId: 'algo-v1',
|
|
18
|
+
},
|
|
19
|
+
sources: [],
|
|
20
|
+
signals: [],
|
|
21
|
+
};
|
|
22
|
+
const _legacy = fv;
|
|
23
|
+
void _legacy;
|
|
24
|
+
const _modes = { providers: [], interpreters: [] };
|
|
25
|
+
void _modes;
|
|
26
|
+
const _plan = {
|
|
27
|
+
stages: [{ runParallel: false, passes: [{ providerId: 'pdf-text', interpreterId: 'algo-v1' }] }],
|
|
28
|
+
combine: enum_1.CombineStrategy.MAX_CONFIDENCE,
|
|
29
|
+
};
|
|
30
|
+
void _plan;
|
|
31
|
+
const _tok = { text: 'IBAN', page: 1, bbox: { x: 1, y: 2, w: 3, h: 4 }, conf: 95 };
|
|
32
|
+
const _tokNoConf = { text: 'x', page: 2, bbox: { x: 0, y: 0, w: 1, h: 1 } };
|
|
33
|
+
void _tok;
|
|
34
|
+
void _tokNoConf;
|
|
35
|
+
//# sourceMappingURL=extraction-plan.dto.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction-plan.dto.test.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction-plan.dto.test.ts"],"names":[],"mappings":";;AAIA,qCAA4E;AAI5E,MAAM,GAAG,GAAW,mBAAY,CAAC,IAAI,CAAC;AACtC,MAAM,GAAG,GAAW,sBAAe,CAAC,QAAQ,CAAC;AAC7C,MAAM,GAAG,GAAW,sBAAe,CAAC,cAAc,CAAC;AACnD,KAAK,GAAG,CAAC;AAAC,KAAK,GAAG,CAAC;AAAC,KAAK,GAAG,CAAC;AAG7B,MAAM,EAAE,GAAgB;IACtB,KAAK,EAAE,CAAC;IACR,UAAU,EAAE,GAAG;IACf,MAAM,EAAE;QACN,QAAQ,EAAE,mBAAY,CAAC,IAAI;QAC3B,WAAW,EAAE,sBAAe,CAAC,WAAW;QACxC,UAAU,EAAE,UAAU;QACtB,aAAa,EAAE,SAAS;KACzB;IACD,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,MAAM,OAAO,GAA2C,EAAE,CAAC;AAC3D,KAAK,OAAO,CAAC;AAGb,MAAM,MAAM,GAAsB,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;AACtE,KAAK,MAAM,CAAC;AAGZ,MAAM,KAAK,GAAoB;IAC7B,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAChG,OAAO,EAAE,sBAAe,CAAC,cAAc;CACxC,CAAC;AACF,KAAK,KAAK,CAAC;AAGX,MAAM,IAAI,GAAqB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AACrG,MAAM,UAAU,GAAqB,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;AAC9F,KAAK,IAAI,CAAC;AAAC,KAAK,UAAU,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DocumentType } from '../../enum/document-type.enum';
|
|
2
|
+
export type ISpatialZoneExtractor = 'raw' | 'regex' | 'date' | 'amount' | 'iban';
|
|
3
|
+
export interface ISpatialZone {
|
|
4
|
+
fieldKey: string;
|
|
5
|
+
page: number;
|
|
6
|
+
rect: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
w: number;
|
|
10
|
+
h: number;
|
|
11
|
+
};
|
|
12
|
+
extractor: ISpatialZoneExtractor;
|
|
13
|
+
regex?: string;
|
|
14
|
+
captureGroup?: number;
|
|
15
|
+
amountLocale?: 'fr' | 'en';
|
|
16
|
+
}
|
|
17
|
+
export interface ISpatialTemplateConfig {
|
|
18
|
+
kind: 'spatial';
|
|
19
|
+
documentType: DocumentType;
|
|
20
|
+
zones: ISpatialZone[];
|
|
21
|
+
}
|
|
22
|
+
export interface IExtractionTemplateVersionDto {
|
|
23
|
+
id: string;
|
|
24
|
+
templateId: string;
|
|
25
|
+
version: number;
|
|
26
|
+
templateJson: Record<string, unknown>;
|
|
27
|
+
comment: string | null;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ISpatialTemplateListItem {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
description: string | null;
|
|
34
|
+
isActive: boolean;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction-spatial-template.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction-spatial-template.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const document_type_enum_1 = require("../../enum/document-type.enum");
|
|
4
|
+
const zone = { fieldKey: 'totalTtc', page: 1, rect: { x: 0.6, y: 0.8, w: 0.3, h: 0.05 }, extractor: 'amount', amountLocale: 'fr' };
|
|
5
|
+
const config = { kind: 'spatial', documentType: document_type_enum_1.DocumentType.INVOICE, zones: [zone] };
|
|
6
|
+
const _fieldKey = config.zones[0].fieldKey;
|
|
7
|
+
const _kind = config.kind;
|
|
8
|
+
void _fieldKey;
|
|
9
|
+
void _kind;
|
|
10
|
+
const _extractors = ['raw', 'regex', 'date', 'amount', 'iban'];
|
|
11
|
+
void _extractors;
|
|
12
|
+
const v = { id: 'v1', templateId: 't1', version: 1, templateJson: { kind: 'spatial' }, comment: null, createdAt: '2026-06-28T00:00:00.000Z' };
|
|
13
|
+
const _version = v.version;
|
|
14
|
+
void _version;
|
|
15
|
+
//# sourceMappingURL=extraction-spatial-template.dto.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction-spatial-template.dto.test.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction-spatial-template.dto.test.ts"],"names":[],"mappings":";;AAOA,sEAA6D;AAG7D,MAAM,IAAI,GAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AACjJ,MAAM,MAAM,GAA2B,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,iCAAY,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;AAE9G,MAAM,SAAS,GAAW,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AACnD,MAAM,KAAK,GAAc,MAAM,CAAC,IAAI,CAAC;AACrC,KAAK,SAAS,CAAC;AAAC,KAAK,KAAK,CAAC;AAG3B,MAAM,WAAW,GAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AACxF,KAAK,WAAW,CAAC;AAGjB,MAAM,CAAC,GAAkC,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC;AAC7K,MAAM,QAAQ,GAAW,CAAC,CAAC,OAAO,CAAC;AACnC,KAAK,QAAQ,CAAC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export
|
|
1
|
+
import { ExtractionWarningCode } from '../../../types/enum/extraction-warning.enum';
|
|
2
|
+
import { ExtractionFeedbackIssueType } from '../../../types/enum/extraction-feedback-issue-type.enum';
|
|
3
|
+
import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
|
|
4
|
+
export { ExtractionFeedbackIssueType };
|
|
5
|
+
export type ExtractionMode = 'auto' | 'hint' | 'template';
|
|
6
|
+
export type ProcessingMode = 'sync' | 'queue';
|
|
7
|
+
export type ExtractionStatus = 'pending' | 'completed' | 'failed' | 'cached';
|
|
8
|
+
export type ExtractionFeedbackStatus = 'open' | 'triaged' | 'fixed' | 'closed';
|
|
9
|
+
export type ExtractionUsageEventType = 'extract.sync.success' | 'extract.sync.cached' | 'extract.sync.failed' | 'extract.queue.enqueued' | 'extract.queue.success' | 'extract.queue.cached' | 'extract.queue.failed' | 'template.run.success' | 'template.run.failed';
|
|
10
|
+
export interface IExtractionBankHint {
|
|
8
11
|
bank: string;
|
|
9
12
|
version?: string;
|
|
10
13
|
}
|
|
11
|
-
export interface
|
|
14
|
+
export interface IExtractionTransaction {
|
|
12
15
|
date?: string;
|
|
13
16
|
description?: string;
|
|
14
17
|
amount?: number;
|
|
@@ -18,7 +21,7 @@ export interface IRcbTransaction {
|
|
|
18
21
|
reference?: string;
|
|
19
22
|
[k: string]: unknown;
|
|
20
23
|
}
|
|
21
|
-
export interface
|
|
24
|
+
export interface IExtractionMetadata {
|
|
22
25
|
iban?: string;
|
|
23
26
|
bic?: string;
|
|
24
27
|
bank?: string;
|
|
@@ -30,7 +33,7 @@ export interface IRcbExtractionMetadata {
|
|
|
30
33
|
currency?: string;
|
|
31
34
|
[k: string]: unknown;
|
|
32
35
|
}
|
|
33
|
-
export interface
|
|
36
|
+
export interface IExtractionFile {
|
|
34
37
|
id: string;
|
|
35
38
|
userId: string;
|
|
36
39
|
applicationId: string | null;
|
|
@@ -50,45 +53,53 @@ export interface IRcbFile {
|
|
|
50
53
|
createdAt: string;
|
|
51
54
|
updatedAt: string;
|
|
52
55
|
}
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
NO_BALANCES = "no_balances",
|
|
57
|
-
BALANCE_MISMATCH = "balance_mismatch"
|
|
58
|
-
}
|
|
59
|
-
export interface IRcbWarning {
|
|
60
|
-
code: RcbWarningCode;
|
|
56
|
+
export { ExtractionWarningCode };
|
|
57
|
+
export interface IExtractionWarning {
|
|
58
|
+
code: ExtractionWarningCode;
|
|
61
59
|
data?: {
|
|
62
60
|
actualCents?: number;
|
|
63
61
|
expectedCents?: number;
|
|
64
62
|
currency?: string;
|
|
63
|
+
type?: string;
|
|
64
|
+
message?: string;
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
export interface
|
|
67
|
+
export interface IExtraction {
|
|
68
68
|
id: string;
|
|
69
69
|
fileId: string;
|
|
70
|
-
mode:
|
|
70
|
+
mode: ExtractionMode;
|
|
71
71
|
hintBank: string | null;
|
|
72
72
|
hintVersion: string | null;
|
|
73
73
|
templateId: string | null;
|
|
74
74
|
templateVersion: number | null;
|
|
75
|
-
status:
|
|
75
|
+
status: ExtractionStatus;
|
|
76
76
|
strategyUsed: string | null;
|
|
77
77
|
confidence: number | null;
|
|
78
78
|
recordsCount: number | null;
|
|
79
79
|
balanceValidated: boolean | null;
|
|
80
80
|
durationMs: number | null;
|
|
81
81
|
error: string | null;
|
|
82
|
-
recordsJson:
|
|
83
|
-
metadataJson:
|
|
84
|
-
warningsJson:
|
|
82
|
+
recordsJson: IExtractionTransaction[] | null;
|
|
83
|
+
metadataJson: IExtractionMetadata | null;
|
|
84
|
+
warningsJson: IExtractionWarning[] | null;
|
|
85
85
|
tags: string[] | null;
|
|
86
86
|
note: string | null;
|
|
87
87
|
shareToken: string | null;
|
|
88
88
|
shareExpiresAt: string | null;
|
|
89
|
+
documentType: string | null;
|
|
90
|
+
documentTypeConfidence: number | null;
|
|
91
|
+
fieldsJson: Record<string, IFieldValue> | null;
|
|
92
|
+
improvementConsent: boolean;
|
|
93
|
+
usableForTraining: boolean;
|
|
94
|
+
supportTicketId: string | null;
|
|
95
|
+
trainingFileId: string | null;
|
|
96
|
+
usedOcr: boolean;
|
|
97
|
+
ocrPageCount: number;
|
|
98
|
+
executionManifest?: IExecutionManifest | null;
|
|
99
|
+
globalConfidence?: IGlobalConfidence | null;
|
|
89
100
|
createdAt: string;
|
|
90
101
|
}
|
|
91
|
-
export interface
|
|
102
|
+
export interface IExtractionTemplate {
|
|
92
103
|
id: string;
|
|
93
104
|
userId: string;
|
|
94
105
|
name: string;
|
|
@@ -97,7 +108,7 @@ export interface IRcbTemplate {
|
|
|
97
108
|
createdAt: string;
|
|
98
109
|
updatedAt: string;
|
|
99
110
|
}
|
|
100
|
-
export interface
|
|
111
|
+
export interface IExtractionTemplateZone {
|
|
101
112
|
name: string;
|
|
102
113
|
page: number;
|
|
103
114
|
x: number;
|
|
@@ -105,7 +116,7 @@ export interface IRcbTemplateZone {
|
|
|
105
116
|
w: number;
|
|
106
117
|
h: number;
|
|
107
118
|
}
|
|
108
|
-
export interface
|
|
119
|
+
export interface IExtractionTemplateDsl {
|
|
109
120
|
regex_iban?: string;
|
|
110
121
|
regex_bic?: string;
|
|
111
122
|
period?: {
|
|
@@ -122,9 +133,9 @@ export interface IRcbTemplateDsl {
|
|
|
122
133
|
sign_rule?: 'explicit' | 'keyword';
|
|
123
134
|
};
|
|
124
135
|
skip_patterns?: string[];
|
|
125
|
-
zones?:
|
|
136
|
+
zones?: IExtractionTemplateZone[];
|
|
126
137
|
}
|
|
127
|
-
export interface
|
|
138
|
+
export interface IExtractionTemplateVersion {
|
|
128
139
|
id: string;
|
|
129
140
|
templateId: string;
|
|
130
141
|
version: number;
|
|
@@ -132,16 +143,19 @@ export interface IRcbTemplateVersion {
|
|
|
132
143
|
comment: string | null;
|
|
133
144
|
createdAt: string;
|
|
134
145
|
}
|
|
135
|
-
export interface
|
|
146
|
+
export interface IExtractionFeedback {
|
|
136
147
|
id: string;
|
|
137
148
|
extractionId: string;
|
|
138
149
|
userId: string;
|
|
139
|
-
issueType:
|
|
150
|
+
issueType: ExtractionFeedbackIssueType;
|
|
151
|
+
fieldKey: string | null;
|
|
152
|
+
expectedValue: string | null;
|
|
140
153
|
description: string | null;
|
|
141
|
-
|
|
154
|
+
supportTicketId: string | null;
|
|
155
|
+
status: ExtractionFeedbackStatus;
|
|
142
156
|
createdAt: string;
|
|
143
157
|
}
|
|
144
|
-
export interface
|
|
158
|
+
export interface IExtractionWebhookDelivery {
|
|
145
159
|
id: string;
|
|
146
160
|
userId: string | null;
|
|
147
161
|
organizationId: string | null;
|
|
@@ -159,7 +173,7 @@ export interface IRcbWebhookDelivery {
|
|
|
159
173
|
createdAt: string;
|
|
160
174
|
updatedAt: string;
|
|
161
175
|
}
|
|
162
|
-
export declare enum
|
|
176
|
+
export declare enum ExtractionWebhookEvent {
|
|
163
177
|
EXTRACT_COMPLETED = "rcb.extract.completed",
|
|
164
178
|
EXTRACT_FAILED = "rcb.extract.failed",
|
|
165
179
|
EXTRACT_LOW_CONFIDENCE = "rcb.extract.low-confidence",
|
|
@@ -172,8 +186,8 @@ export declare enum RcbWebhookEvent {
|
|
|
172
186
|
EXPORT_COMPLETED = "rcb.export.completed",
|
|
173
187
|
EXPORT_FAILED = "rcb.export.failed"
|
|
174
188
|
}
|
|
175
|
-
export declare const
|
|
176
|
-
export interface
|
|
189
|
+
export declare const EXTRACTION_WEBHOOK_EVENTS: ExtractionWebhookEvent[];
|
|
190
|
+
export interface IExtractionWebhook {
|
|
177
191
|
id: string;
|
|
178
192
|
userId: string | null;
|
|
179
193
|
organizationId: string | null;
|
|
@@ -184,22 +198,12 @@ export interface IRcbWebhook {
|
|
|
184
198
|
isEnabled: boolean;
|
|
185
199
|
name: string;
|
|
186
200
|
description: string;
|
|
187
|
-
scopes:
|
|
201
|
+
scopes: ExtractionWebhookEvent[];
|
|
188
202
|
consecutiveFailures: number;
|
|
189
203
|
createdAt: string;
|
|
190
204
|
updatedAt: string;
|
|
191
205
|
}
|
|
192
|
-
export interface
|
|
193
|
-
userId: string;
|
|
194
|
-
tier: string;
|
|
195
|
-
monthlyExtractCap: number | null;
|
|
196
|
-
monthlyExtractedCap: number | null;
|
|
197
|
-
monthlyBytesCap: number | null;
|
|
198
|
-
queueOnlyAboveCount: number | null;
|
|
199
|
-
createdAt: string;
|
|
200
|
-
updatedAt: string;
|
|
201
|
-
}
|
|
202
|
-
export interface IRcbBankVersion {
|
|
206
|
+
export interface IExtractionBankVersion {
|
|
203
207
|
id: string;
|
|
204
208
|
bank: string;
|
|
205
209
|
version: string;
|
|
@@ -212,3 +216,15 @@ export interface IRcbBankVersion {
|
|
|
212
216
|
createdAt: string;
|
|
213
217
|
updatedAt: string;
|
|
214
218
|
}
|
|
219
|
+
export declare enum ExtractionSettingsScopeKind {
|
|
220
|
+
USER = "user",
|
|
221
|
+
ORG = "org"
|
|
222
|
+
}
|
|
223
|
+
export interface IExtractionSettings {
|
|
224
|
+
id: string;
|
|
225
|
+
userId: string | null;
|
|
226
|
+
organizationId: string | null;
|
|
227
|
+
improvementDefault: boolean;
|
|
228
|
+
createdAt: string;
|
|
229
|
+
updatedAt: string;
|
|
230
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExtractionSettingsScopeKind = exports.EXTRACTION_WEBHOOK_EVENTS = exports.ExtractionWebhookEvent = exports.ExtractionWarningCode = exports.ExtractionFeedbackIssueType = void 0;
|
|
4
|
+
const extraction_warning_enum_1 = require("../../../types/enum/extraction-warning.enum");
|
|
5
|
+
Object.defineProperty(exports, "ExtractionWarningCode", { enumerable: true, get: function () { return extraction_warning_enum_1.ExtractionWarningCode; } });
|
|
6
|
+
const extraction_feedback_issue_type_enum_1 = require("../../../types/enum/extraction-feedback-issue-type.enum");
|
|
7
|
+
Object.defineProperty(exports, "ExtractionFeedbackIssueType", { enumerable: true, get: function () { return extraction_feedback_issue_type_enum_1.ExtractionFeedbackIssueType; } });
|
|
8
|
+
var ExtractionWebhookEvent;
|
|
9
|
+
(function (ExtractionWebhookEvent) {
|
|
10
|
+
ExtractionWebhookEvent["EXTRACT_COMPLETED"] = "rcb.extract.completed";
|
|
11
|
+
ExtractionWebhookEvent["EXTRACT_FAILED"] = "rcb.extract.failed";
|
|
12
|
+
ExtractionWebhookEvent["EXTRACT_LOW_CONFIDENCE"] = "rcb.extract.low-confidence";
|
|
13
|
+
ExtractionWebhookEvent["EXTRACT_BALANCE_KO"] = "rcb.extract.balance-ko";
|
|
14
|
+
ExtractionWebhookEvent["FILE_ARCHIVED"] = "rcb.file.archived";
|
|
15
|
+
ExtractionWebhookEvent["SHARE_MINTED"] = "rcb.share.minted";
|
|
16
|
+
ExtractionWebhookEvent["SHARE_REVOKED"] = "rcb.share.revoked";
|
|
17
|
+
ExtractionWebhookEvent["FEEDBACK_SUBMITTED"] = "rcb.feedback.submitted";
|
|
18
|
+
ExtractionWebhookEvent["JOB_FAILED"] = "rcb.job.failed";
|
|
19
|
+
ExtractionWebhookEvent["EXPORT_COMPLETED"] = "rcb.export.completed";
|
|
20
|
+
ExtractionWebhookEvent["EXPORT_FAILED"] = "rcb.export.failed";
|
|
21
|
+
})(ExtractionWebhookEvent || (exports.ExtractionWebhookEvent = ExtractionWebhookEvent = {}));
|
|
22
|
+
exports.EXTRACTION_WEBHOOK_EVENTS = Object.values(ExtractionWebhookEvent);
|
|
23
|
+
var ExtractionSettingsScopeKind;
|
|
24
|
+
(function (ExtractionSettingsScopeKind) {
|
|
25
|
+
ExtractionSettingsScopeKind["USER"] = "user";
|
|
26
|
+
ExtractionSettingsScopeKind["ORG"] = "org";
|
|
27
|
+
})(ExtractionSettingsScopeKind || (exports.ExtractionSettingsScopeKind = ExtractionSettingsScopeKind = {}));
|
|
28
|
+
//# sourceMappingURL=extraction.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;AA+E3E,sGA/EA,+CAAqB,OA+EA;AA9E9B,iHAAsG;AAQ7F,4GARA,iEAA2B,OAQA;AAwOpC,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"}
|
|
@@ -14,6 +14,7 @@ export * from './retrospective-card.dto';
|
|
|
14
14
|
export * from './retrospective-member.dto';
|
|
15
15
|
export * from './short-link.dto';
|
|
16
16
|
export * from './short-link-click.dto';
|
|
17
|
+
export * from './beam.dto';
|
|
17
18
|
export * from './board.dto';
|
|
18
19
|
export * from './board-activity.dto';
|
|
19
20
|
export * from './board-card.dto';
|
|
@@ -28,4 +29,6 @@ export * from './board-label.dto';
|
|
|
28
29
|
export * from './team.dto';
|
|
29
30
|
export * from './tag.dto';
|
|
30
31
|
export * from './content-share.dto';
|
|
31
|
-
export * from './
|
|
32
|
+
export * from './extraction.dto';
|
|
33
|
+
export * from './extraction-plan.dto';
|
|
34
|
+
export * from './extraction-spatial-template.dto';
|
|
@@ -30,6 +30,7 @@ __exportStar(require("./retrospective-card.dto"), exports);
|
|
|
30
30
|
__exportStar(require("./retrospective-member.dto"), exports);
|
|
31
31
|
__exportStar(require("./short-link.dto"), exports);
|
|
32
32
|
__exportStar(require("./short-link-click.dto"), exports);
|
|
33
|
+
__exportStar(require("./beam.dto"), exports);
|
|
33
34
|
__exportStar(require("./board.dto"), exports);
|
|
34
35
|
__exportStar(require("./board-activity.dto"), exports);
|
|
35
36
|
__exportStar(require("./board-card.dto"), exports);
|
|
@@ -44,5 +45,7 @@ __exportStar(require("./board-label.dto"), exports);
|
|
|
44
45
|
__exportStar(require("./team.dto"), exports);
|
|
45
46
|
__exportStar(require("./tag.dto"), exports);
|
|
46
47
|
__exportStar(require("./content-share.dto"), exports);
|
|
47
|
-
__exportStar(require("./
|
|
48
|
+
__exportStar(require("./extraction.dto"), exports);
|
|
49
|
+
__exportStar(require("./extraction-plan.dto"), exports);
|
|
50
|
+
__exportStar(require("./extraction-spatial-template.dto"), exports);
|
|
48
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,2DAAyC;AACzC,6CAA2B;AAC3B,6CAA2B;AAC3B,sDAAoC;AACpC,8DAA4C;AAC5C,2DAAyC;AACzC,6DAA2C;AAC3C,mDAAiC;AACjC,yDAAuC;AACvC,8CAA4B;AAC5B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C;AAC3C,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC;AACxC,qDAAmC;AACnC,oDAAkC;AAClC,6CAA2B;AAC3B,4CAA0B;AAC1B,sDAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,2DAAyC;AACzC,6CAA2B;AAC3B,6CAA2B;AAC3B,sDAAoC;AACpC,8DAA4C;AAC5C,2DAAyC;AACzC,6DAA2C;AAC3C,mDAAiC;AACjC,yDAAuC;AACvC,6CAA2B;AAC3B,8CAA4B;AAC5B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C;AAC3C,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC;AACxC,qDAAmC;AACnC,oDAAkC;AAClC,6CAA2B;AAC3B,4CAA0B;AAC1B,sDAAoC;AACpC,mDAAiC;AACjC,wDAAsC;AACtC,oEAAkD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
export interface
|
|
3
|
+
export interface VerifyExtractionWebhookInput {
|
|
4
4
|
rawBody: string | Buffer;
|
|
5
5
|
signatureHeader: string | undefined;
|
|
6
6
|
secret: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function verifyExtractionWebhook(input: VerifyExtractionWebhookInput): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.verifyExtractionWebhook = void 0;
|
|
4
|
+
function verifyExtractionWebhook(input) {
|
|
5
5
|
if (!input.signatureHeader || !input.secret)
|
|
6
6
|
return false;
|
|
7
7
|
const crypto = require('crypto');
|
|
@@ -14,5 +14,5 @@ function verifyRcbWebhook(input) {
|
|
|
14
14
|
return false;
|
|
15
15
|
return crypto.timingSafeEqual(Buffer.from(provided, 'hex'), Buffer.from(computed, 'hex'));
|
|
16
16
|
}
|
|
17
|
-
exports.
|
|
18
|
-
//# sourceMappingURL=
|
|
17
|
+
exports.verifyExtractionWebhook = verifyExtractionWebhook;
|
|
18
|
+
//# sourceMappingURL=extraction-webhook.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction-webhook.utils.js","sourceRoot":"","sources":["../../src/utils/extraction-webhook.utils.ts"],"names":[],"mappings":";;;AAkBA,SAAgB,uBAAuB,CAAC,KAAmC;IACzE,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAE1D,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAW,MAAM;SAC5B,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC;SAClC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;SACrB,MAAM,CAAC,KAAK,CAAC,CAAC;IACjB,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5F,CAAC;AAXD,0DAWC"}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -19,5 +19,5 @@ __exportStar(require("./board.utils"), exports);
|
|
|
19
19
|
__exportStar(require("./shape.utils"), exports);
|
|
20
20
|
__exportStar(require("./icons.utils"), exports);
|
|
21
21
|
__exportStar(require("./enum.utils"), exports);
|
|
22
|
-
__exportStar(require("./
|
|
22
|
+
__exportStar(require("./extraction-webhook.utils"), exports);
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,6DAA2C"}
|