@abyss-project/tools 3.0.0 → 3.2.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/.eslintrc.js +1 -2
- package/README.md +1 -1
- package/dist/api/atlas-document.api.d.ts +2 -1
- package/dist/api/atlas-document.api.js +5 -1
- package/dist/api/atlas-document.api.js.map +1 -1
- package/dist/api/atlas-group.api.js.map +1 -1
- package/dist/api/atlas-page.api.js.map +1 -1
- package/dist/api/atlas.api.js +3 -3
- package/dist/api/atlas.api.js.map +1 -1
- package/dist/api/atlas.public.api.js.map +1 -1
- package/dist/api/board-card.api.js.map +1 -1
- package/dist/api/board-column.api.js.map +1 -1
- package/dist/api/board-label.api.js +1 -2
- package/dist/api/board-label.api.js.map +1 -1
- package/dist/api/board.api.js +7 -5
- package/dist/api/board.api.js.map +1 -1
- package/dist/api/draw.api.js +1 -2
- package/dist/api/draw.api.js.map +1 -1
- package/dist/api/draw.public.api.js.map +1 -1
- package/dist/api/extraction-plan-preset.api.js +19 -6
- package/dist/api/extraction-plan-preset.api.js.map +1 -1
- package/dist/api/extraction-plan-preset.api.test.js +17 -7
- package/dist/api/extraction-plan-preset.api.test.js.map +1 -1
- package/dist/api/extraction-settings.api.js.map +1 -1
- package/dist/api/extraction.api.d.ts +3 -4
- package/dist/api/extraction.api.js +41 -80
- package/dist/api/extraction.api.js.map +1 -1
- package/dist/api/extraction.application.api.d.ts +4 -0
- package/dist/api/extraction.application.api.js +23 -0
- package/dist/api/extraction.application.api.js.map +1 -0
- package/dist/api/extraction.application.api.test.d.ts +1 -0
- package/dist/api/extraction.application.api.test.js +69 -0
- package/dist/api/extraction.application.api.test.js.map +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/probe-scan.api.d.ts +4 -11
- package/dist/api/probe-scan.api.js +18 -28
- package/dist/api/probe-scan.api.js.map +1 -1
- package/dist/api/probe-scan.api.test.js +27 -7
- package/dist/api/probe-scan.api.test.js.map +1 -1
- package/dist/api/probe-scan.application.api.d.ts +4 -4
- package/dist/api/probe-scan.application.api.js +2 -2
- package/dist/api/probe-scan.application.api.js.map +1 -1
- package/dist/api/probe-scan.application.api.test.js +21 -7
- package/dist/api/probe-scan.application.api.test.js.map +1 -1
- package/dist/api/probe-webhook.api.test.js +17 -7
- package/dist/api/probe-webhook.api.test.js.map +1 -1
- package/dist/api/probe-webhook.application.api.d.ts +1 -1
- package/dist/api/probe-webhook.application.api.test.js +17 -7
- package/dist/api/probe-webhook.application.api.test.js.map +1 -1
- package/dist/api/retrospective.api.js +2 -1
- package/dist/api/retrospective.api.js.map +1 -1
- package/dist/api/short-link.admin.api.js.map +1 -1
- package/dist/api/short-link.api.js.map +1 -1
- package/dist/api/short-link.public.api.js.map +1 -1
- package/dist/api/tag.api.js.map +1 -1
- package/dist/constants/atlas.constants.js +1 -1
- package/dist/constants/atlas.constants.js.map +1 -1
- package/dist/constants/extract.constants.d.ts +4 -0
- package/dist/constants/extract.constants.js +91 -0
- package/dist/constants/extract.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 +5 -0
- package/dist/index.js +22 -7
- package/dist/index.js.map +1 -1
- package/dist/server-sent-events/server-sent-events.manager.d.ts +1 -2
- package/dist/server-sent-events/server-sent-events.manager.js +1 -2
- package/dist/server-sent-events/server-sent-events.manager.js.map +1 -1
- package/dist/types/enum/document-type.enum.d.ts +1 -0
- package/dist/types/enum/document-type.enum.js +1 -0
- package/dist/types/enum/document-type.enum.js.map +1 -1
- package/dist/types/enum/extract-field-format.enum.d.ts +7 -0
- package/dist/types/enum/extract-field-format.enum.js +12 -0
- package/dist/types/enum/extract-field-format.enum.js.map +1 -0
- package/dist/types/enum/extract-field-key.enum.d.ts +59 -0
- package/dist/types/enum/extract-field-key.enum.js +64 -0
- package/dist/types/enum/extract-field-key.enum.js.map +1 -0
- package/dist/types/enum/extraction-warning.enum.d.ts +4 -1
- package/dist/types/enum/extraction-warning.enum.js +3 -0
- package/dist/types/enum/extraction-warning.enum.js.map +1 -1
- package/dist/types/enum/index.d.ts +2 -0
- package/dist/types/enum/index.js +2 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/rcb-bank.enum.js +255 -39
- package/dist/types/enum/rcb-bank.enum.js.map +1 -1
- package/dist/types/interface/api/requests/abyss.admin.request.d.ts +1 -1
- package/dist/types/interface/api/requests/atlas-document.request.d.ts +6 -0
- package/dist/types/interface/api/requests/board-card-document.request.d.ts +1 -0
- package/dist/types/interface/api/requests/extraction.request.d.ts +12 -2
- package/dist/types/interface/api/responses/atlas-document.response.d.ts +6 -4
- package/dist/types/interface/api/responses/board-card-document.response.d.ts +2 -4
- package/dist/types/interface/api/responses/draw.public.response.d.ts +2 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +8 -2
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction-plan.dto.test.js +6 -1
- package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js +20 -3
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction.dto.d.ts +13 -0
- package/dist/types/interface/models/extraction.dto.js.map +1 -1
- package/dist/types/interface/models/index.d.ts +1 -0
- package/dist/types/interface/models/index.js +1 -0
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/project.dto.d.ts +1 -1
- package/dist/types/interface/models/short-link.dto.d.ts +8 -0
- package/dist/types/interface/models/upload-session.dto.d.ts +8 -0
- package/dist/types/interface/models/upload-session.dto.js +3 -0
- package/dist/types/interface/models/upload-session.dto.js.map +1 -0
- package/dist/types/interface/models/user.dto.d.ts +1 -0
- package/dist/utils/extraction-webhook.utils.d.ts +0 -2
- package/dist/utils/extraction-webhook.utils.js +1 -2
- package/dist/utils/extraction-webhook.utils.js.map +1 -1
- package/dist/utils/probe-scan-cost.utils.d.ts +1 -1
- package/dist/utils/probe-webhook-signature.utils.d.ts +0 -2
- package/dist/utils/probe-webhook-signature.utils.js +1 -2
- package/dist/utils/probe-webhook-signature.utils.js.map +1 -1
- package/package.json +16 -18
- package/src/api/atlas-document.api.ts +20 -3
- package/src/api/atlas-group.api.ts +4 -1
- package/src/api/atlas-page.api.ts +12 -6
- package/src/api/atlas.api.ts +12 -7
- package/src/api/atlas.public.api.ts +3 -1
- package/src/api/board-card.api.ts +6 -3
- package/src/api/board-column.api.ts +4 -1
- package/src/api/board-label.api.ts +7 -3
- package/src/api/board.api.ts +19 -10
- package/src/api/draw.api.ts +16 -12
- package/src/api/draw.public.api.ts +3 -1
- package/src/api/extraction-plan-preset.api.ts +64 -18
- package/src/api/extraction-settings.api.ts +2 -8
- package/src/api/extraction.api.ts +82 -84
- package/src/api/extraction.application.api.test.ts +55 -0
- package/src/api/extraction.application.api.ts +73 -0
- package/src/api/index.ts +1 -0
- package/src/api/probe-scan.api.test.ts +26 -0
- package/src/api/probe-scan.api.ts +66 -54
- package/src/api/probe-scan.application.api.test.ts +14 -0
- package/src/api/probe-scan.application.api.ts +5 -5
- package/src/api/retrospective.api.ts +8 -5
- package/src/api/short-link.admin.api.ts +14 -4
- package/src/api/short-link.api.ts +39 -17
- package/src/api/short-link.public.api.ts +25 -11
- package/src/api/tag.api.ts +3 -1
- package/src/constants/atlas.constants.ts +1 -1
- package/src/constants/extract.constants.ts +109 -0
- package/src/constants/index.ts +1 -0
- package/src/index.ts +19 -0
- package/src/server-sent-events/server-sent-events.manager.ts +5 -3
- package/src/types/enum/document-type.enum.ts +1 -0
- package/src/types/enum/extract-field-format.enum.ts +16 -0
- package/src/types/enum/extract-field-key.enum.ts +77 -0
- package/src/types/enum/extraction-warning.enum.ts +57 -0
- package/src/types/enum/index.ts +2 -0
- package/src/types/enum/rcb-bank.enum.ts +255 -41
- package/src/types/interface/api/requests/abyss.admin.request.ts +2 -1
- package/src/types/interface/api/requests/atlas-document.request.ts +14 -0
- package/src/types/interface/api/requests/board-card-document.request.ts +5 -0
- package/src/types/interface/api/requests/extraction.request.ts +23 -0
- package/src/types/interface/api/requests/probe-scan.request.ts +5 -1
- package/src/types/interface/api/responses/atlas-document.response.ts +12 -4
- package/src/types/interface/api/responses/atlas-group.response.ts +1 -0
- package/src/types/interface/api/responses/atlas-page.response.ts +1 -0
- package/src/types/interface/api/responses/atlas.response.ts +1 -0
- package/src/types/interface/api/responses/beam.response.ts +2 -0
- package/src/types/interface/api/responses/board-card-checklist.response.ts +3 -0
- package/src/types/interface/api/responses/board-card-comment.response.ts +1 -0
- package/src/types/interface/api/responses/board-card-document.response.ts +6 -4
- package/src/types/interface/api/responses/board-card.response.ts +3 -0
- package/src/types/interface/api/responses/board-column.response.ts +1 -0
- package/src/types/interface/api/responses/board-label.response.ts +3 -0
- package/src/types/interface/api/responses/board.response.ts +1 -0
- package/src/types/interface/api/responses/draw.public.response.ts +3 -0
- package/src/types/interface/api/responses/draw.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective-card.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective-section.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective.response.ts +3 -1
- package/src/types/interface/api/responses/short-link.admin.response.ts +1 -0
- package/src/types/interface/api/responses/short-link.response.ts +1 -0
- package/src/types/interface/api/responses/tag.response.ts +2 -0
- package/src/types/interface/models/content-share.dto.ts +5 -1
- package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +20 -9
- package/src/types/interface/models/extraction-plan.dto.test.ts +17 -4
- package/src/types/interface/models/extraction-spatial-template.dto.test.ts +26 -5
- package/src/types/interface/models/extraction.dto.ts +35 -0
- package/src/types/interface/models/index.ts +1 -0
- package/src/types/interface/models/probe-webhook.dto.ts +3 -4
- package/src/types/interface/models/project.dto.ts +2 -1
- package/src/types/interface/models/short-link.dto.ts +2 -0
- package/src/types/interface/models/upload-session.dto.ts +24 -0
- package/src/types/interface/models/user.dto.ts +3 -0
- package/src/utils/extraction-webhook.utils.ts +1 -1
- package/src/utils/probe-webhook-signature.utils.ts +1 -1
- package/tsconfig.check.json +15 -0
|
@@ -15,12 +15,17 @@ export const shortLinkAdminApi = {
|
|
|
15
15
|
paginate: async (
|
|
16
16
|
query: IPaginateShortLinkAdminQuery,
|
|
17
17
|
): Promise<IPaginateShortLinkAdminResponse> => {
|
|
18
|
-
const response = await AbyssToolsCore.axios.get<IPaginateShortLinkAdminResponse>(
|
|
18
|
+
const response = await AbyssToolsCore.axios.get<IPaginateShortLinkAdminResponse>(
|
|
19
|
+
'/admin/short-link/paginate',
|
|
20
|
+
{ params: query },
|
|
21
|
+
);
|
|
19
22
|
return response.data;
|
|
20
23
|
},
|
|
21
24
|
|
|
22
25
|
get: async (params: IGetShortLinkAdminParams): Promise<IGetShortLinkAdminResponse> => {
|
|
23
|
-
const response = await AbyssToolsCore.axios.get<IGetShortLinkAdminResponse>(
|
|
26
|
+
const response = await AbyssToolsCore.axios.get<IGetShortLinkAdminResponse>(
|
|
27
|
+
`/admin/short-link/${params.shortLinkId}`,
|
|
28
|
+
);
|
|
24
29
|
return response.data;
|
|
25
30
|
},
|
|
26
31
|
|
|
@@ -28,12 +33,17 @@ export const shortLinkAdminApi = {
|
|
|
28
33
|
params: IUpdateShortLinkAdminParams,
|
|
29
34
|
body: IUpdateShortLinkAdminBody,
|
|
30
35
|
): Promise<IUpdateShortLinkAdminResponse> => {
|
|
31
|
-
const response = await AbyssToolsCore.axios.put<IUpdateShortLinkAdminResponse>(
|
|
36
|
+
const response = await AbyssToolsCore.axios.put<IUpdateShortLinkAdminResponse>(
|
|
37
|
+
`/admin/short-link/${params.shortLinkId}`,
|
|
38
|
+
body,
|
|
39
|
+
);
|
|
32
40
|
return response.data;
|
|
33
41
|
},
|
|
34
42
|
|
|
35
43
|
delete: async (params: IDeleteShortLinkAdminParams): Promise<IDeleteShortLinkAdminResponse> => {
|
|
36
|
-
const response = await AbyssToolsCore.axios.delete<IDeleteShortLinkAdminResponse>(
|
|
44
|
+
const response = await AbyssToolsCore.axios.delete<IDeleteShortLinkAdminResponse>(
|
|
45
|
+
`/admin/short-link/${params.shortLinkId}`,
|
|
46
|
+
);
|
|
37
47
|
return response.data;
|
|
38
48
|
},
|
|
39
49
|
};
|
|
@@ -27,12 +27,17 @@ import type {
|
|
|
27
27
|
|
|
28
28
|
export const shortLinkApi = {
|
|
29
29
|
get: async (params: IGetShortLinkParams): Promise<IGetShortLinkResponse> => {
|
|
30
|
-
const response = await AbyssToolsCore.axios.get<IGetShortLinkResponse>(
|
|
30
|
+
const response = await AbyssToolsCore.axios.get<IGetShortLinkResponse>(
|
|
31
|
+
`/short-link/${params.shortLinkId}`,
|
|
32
|
+
);
|
|
31
33
|
return response.data;
|
|
32
34
|
},
|
|
33
35
|
|
|
34
36
|
paginate: async (query: IPaginateShortLinkQuery): Promise<IPaginateShortLinkResponse> => {
|
|
35
|
-
const response = await AbyssToolsCore.axios.get<IPaginateShortLinkResponse>(
|
|
37
|
+
const response = await AbyssToolsCore.axios.get<IPaginateShortLinkResponse>(
|
|
38
|
+
'/short-link/paginate',
|
|
39
|
+
{ params: query },
|
|
40
|
+
);
|
|
36
41
|
return response.data;
|
|
37
42
|
},
|
|
38
43
|
|
|
@@ -40,9 +45,12 @@ export const shortLinkApi = {
|
|
|
40
45
|
params: IPaginateProjectShortLinkParams,
|
|
41
46
|
query: IPaginateShortLinkQuery,
|
|
42
47
|
): Promise<IPaginateShortLinkResponse> => {
|
|
43
|
-
const response = await AbyssToolsCore.axios.get<IPaginateShortLinkResponse>(
|
|
44
|
-
params
|
|
45
|
-
|
|
48
|
+
const response = await AbyssToolsCore.axios.get<IPaginateShortLinkResponse>(
|
|
49
|
+
`/short-link/project/${params.projectId}/paginate`,
|
|
50
|
+
{
|
|
51
|
+
params: query,
|
|
52
|
+
},
|
|
53
|
+
);
|
|
46
54
|
return response.data;
|
|
47
55
|
},
|
|
48
56
|
|
|
@@ -55,7 +63,10 @@ export const shortLinkApi = {
|
|
|
55
63
|
params: ICreateForOrganizationShortLinkParams,
|
|
56
64
|
body: ICreateShortLinkBody,
|
|
57
65
|
): Promise<ICreateShortLinkResponse> => {
|
|
58
|
-
const response = await AbyssToolsCore.axios.post<ICreateShortLinkResponse>(
|
|
66
|
+
const response = await AbyssToolsCore.axios.post<ICreateShortLinkResponse>(
|
|
67
|
+
`/short-link/organization/${params.organizationId}`,
|
|
68
|
+
body,
|
|
69
|
+
);
|
|
59
70
|
return response.data;
|
|
60
71
|
},
|
|
61
72
|
|
|
@@ -63,12 +74,17 @@ export const shortLinkApi = {
|
|
|
63
74
|
params: IUpdateShortLinkParams,
|
|
64
75
|
body: IUpdateShortLinkBody,
|
|
65
76
|
): Promise<IUpdateShortLinkResponse> => {
|
|
66
|
-
const response = await AbyssToolsCore.axios.put<IUpdateShortLinkResponse>(
|
|
77
|
+
const response = await AbyssToolsCore.axios.put<IUpdateShortLinkResponse>(
|
|
78
|
+
`/short-link/${params.shortLinkId}`,
|
|
79
|
+
body,
|
|
80
|
+
);
|
|
67
81
|
return response.data;
|
|
68
82
|
},
|
|
69
83
|
|
|
70
84
|
delete: async (params: IDeleteShortLinkParams): Promise<IDeleteShortLinkResponse> => {
|
|
71
|
-
const response = await AbyssToolsCore.axios.delete<IDeleteShortLinkResponse>(
|
|
85
|
+
const response = await AbyssToolsCore.axios.delete<IDeleteShortLinkResponse>(
|
|
86
|
+
`/short-link/${params.shortLinkId}`,
|
|
87
|
+
);
|
|
72
88
|
return response.data;
|
|
73
89
|
},
|
|
74
90
|
|
|
@@ -76,9 +92,12 @@ export const shortLinkApi = {
|
|
|
76
92
|
params: IGetStatsShortLinkParams,
|
|
77
93
|
query?: IGetStatsShortLinkQuery,
|
|
78
94
|
): Promise<IGetStatsShortLinkResponse> => {
|
|
79
|
-
const response = await AbyssToolsCore.axios.get<IGetStatsShortLinkResponse>(
|
|
80
|
-
params
|
|
81
|
-
|
|
95
|
+
const response = await AbyssToolsCore.axios.get<IGetStatsShortLinkResponse>(
|
|
96
|
+
`/short-link/${params.shortLinkId}/stats`,
|
|
97
|
+
{
|
|
98
|
+
params: query,
|
|
99
|
+
},
|
|
100
|
+
);
|
|
82
101
|
return response.data;
|
|
83
102
|
},
|
|
84
103
|
|
|
@@ -86,9 +105,12 @@ export const shortLinkApi = {
|
|
|
86
105
|
params: IGetClicksShortLinkParams,
|
|
87
106
|
query?: IGetClicksShortLinkQuery,
|
|
88
107
|
): Promise<IGetClicksShortLinkResponse> => {
|
|
89
|
-
const response = await AbyssToolsCore.axios.get<IGetClicksShortLinkResponse>(
|
|
90
|
-
params
|
|
91
|
-
|
|
108
|
+
const response = await AbyssToolsCore.axios.get<IGetClicksShortLinkResponse>(
|
|
109
|
+
`/short-link/${params.shortLinkId}/clicks`,
|
|
110
|
+
{
|
|
111
|
+
params: query,
|
|
112
|
+
},
|
|
113
|
+
);
|
|
92
114
|
return response.data;
|
|
93
115
|
},
|
|
94
116
|
|
|
@@ -114,9 +136,9 @@ export const shortLinkApi = {
|
|
|
114
136
|
return response.data;
|
|
115
137
|
},
|
|
116
138
|
|
|
117
|
-
countOrganization: async (
|
|
118
|
-
|
|
119
|
-
): Promise<ICountOrganizationResponse> => {
|
|
139
|
+
countOrganization: async (params: {
|
|
140
|
+
organizationId: string;
|
|
141
|
+
}): Promise<ICountOrganizationResponse> => {
|
|
120
142
|
const response = await AbyssToolsCore.axios.get<ICountOrganizationResponse>(
|
|
121
143
|
`/short-link/organization/${params.organizationId}/count`,
|
|
122
144
|
);
|
|
@@ -19,7 +19,10 @@ export const shortLinkPublicApi = {
|
|
|
19
19
|
createAnonymous: async (
|
|
20
20
|
body: ICreateAnonymousShortLinkPublicBody,
|
|
21
21
|
): Promise<ICreateShortLinkPublicResponse> => {
|
|
22
|
-
const response = await AbyssToolsCore.axios.post<ICreateShortLinkPublicResponse>(
|
|
22
|
+
const response = await AbyssToolsCore.axios.post<ICreateShortLinkPublicResponse>(
|
|
23
|
+
'/short-link/public',
|
|
24
|
+
body,
|
|
25
|
+
);
|
|
23
26
|
return response.data;
|
|
24
27
|
},
|
|
25
28
|
|
|
@@ -27,9 +30,12 @@ export const shortLinkPublicApi = {
|
|
|
27
30
|
params: IRedirectShortLinkPublicParams,
|
|
28
31
|
query?: IRedirectShortLinkPublicQuery,
|
|
29
32
|
): Promise<IRedirectShortLinkPublicResponse> => {
|
|
30
|
-
const response = await AbyssToolsCore.axios.get<IRedirectShortLinkPublicResponse>(
|
|
31
|
-
params
|
|
32
|
-
|
|
33
|
+
const response = await AbyssToolsCore.axios.get<IRedirectShortLinkPublicResponse>(
|
|
34
|
+
`/short-link/public/redirect/${params.slug}`,
|
|
35
|
+
{
|
|
36
|
+
params: query,
|
|
37
|
+
},
|
|
38
|
+
);
|
|
33
39
|
return response.data;
|
|
34
40
|
},
|
|
35
41
|
|
|
@@ -37,9 +43,12 @@ export const shortLinkPublicApi = {
|
|
|
37
43
|
params: IGetStatsShortLinkPublicParams,
|
|
38
44
|
query?: IGetStatsShortLinkPublicQuery,
|
|
39
45
|
): Promise<IGetStatsShortLinkPublicResponse> => {
|
|
40
|
-
const response = await AbyssToolsCore.axios.get<IGetStatsShortLinkPublicResponse>(
|
|
41
|
-
params
|
|
42
|
-
|
|
46
|
+
const response = await AbyssToolsCore.axios.get<IGetStatsShortLinkPublicResponse>(
|
|
47
|
+
`/short-link/public/${params.shortLinkId}/stats`,
|
|
48
|
+
{
|
|
49
|
+
params: query,
|
|
50
|
+
},
|
|
51
|
+
);
|
|
43
52
|
return response.data;
|
|
44
53
|
},
|
|
45
54
|
|
|
@@ -47,14 +56,19 @@ export const shortLinkPublicApi = {
|
|
|
47
56
|
params: IGetClicksShortLinkPublicParams,
|
|
48
57
|
query?: IGetClicksShortLinkPublicQuery,
|
|
49
58
|
): Promise<IGetClicksShortLinkPublicResponse> => {
|
|
50
|
-
const response = await AbyssToolsCore.axios.get<IGetClicksShortLinkPublicResponse>(
|
|
51
|
-
params
|
|
52
|
-
|
|
59
|
+
const response = await AbyssToolsCore.axios.get<IGetClicksShortLinkPublicResponse>(
|
|
60
|
+
`/short-link/public/${params.shortLinkId}/clicks`,
|
|
61
|
+
{
|
|
62
|
+
params: query,
|
|
63
|
+
},
|
|
64
|
+
);
|
|
53
65
|
return response.data;
|
|
54
66
|
},
|
|
55
67
|
|
|
56
68
|
renew: async (params: IRenewShortLinkPublicParams): Promise<IRenewShortLinkPublicResponse> => {
|
|
57
|
-
const response = await AbyssToolsCore.axios.post<IRenewShortLinkPublicResponse>(
|
|
69
|
+
const response = await AbyssToolsCore.axios.post<IRenewShortLinkPublicResponse>(
|
|
70
|
+
`/short-link/public/${params.shortLinkId}/renew`,
|
|
71
|
+
);
|
|
58
72
|
return response.data;
|
|
59
73
|
},
|
|
60
74
|
};
|
package/src/api/tag.api.ts
CHANGED
|
@@ -63,7 +63,9 @@ export const getTagStats = async (query?: ITagStatsQuery): Promise<ITagStatsResp
|
|
|
63
63
|
return (await AbyssToolsCore.axios.get<ITagStatsResponse>('tag/stats', { params: query })).data;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
export const getEntityTags = async (
|
|
66
|
+
export const getEntityTags = async (
|
|
67
|
+
params: IGetEntityTagsParams,
|
|
68
|
+
): Promise<IGetEntityTagsResponse> => {
|
|
67
69
|
return (
|
|
68
70
|
await AbyssToolsCore.axios.get<IGetEntityTagsResponse>(
|
|
69
71
|
`${params.entityType}/${params.entityId}/tags`,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const MAX_DOCUMENTS_PER_ATLAS_PAGE = 20;
|
|
2
|
-
export const MAX_ATLAS_DOCUMENT_SIZE_OCTET =
|
|
2
|
+
export const MAX_ATLAS_DOCUMENT_SIZE_OCTET = 100 * 1024 * 1024; // 100 MB
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { DocumentType } from '../types/enum/document-type.enum';
|
|
2
|
+
import { ExtractFieldFormat } from '../types/enum/extract-field-format.enum';
|
|
3
|
+
import { ExtractFieldKey } from '../types/enum/extract-field-key.enum';
|
|
4
|
+
|
|
5
|
+
const { AMOUNT, DATE, PERCENT, BOOLEAN, TEXT } = ExtractFieldFormat;
|
|
6
|
+
|
|
7
|
+
// ──────────────────────────────────────────────
|
|
8
|
+
// EXTRACT_PUBLISHABLE_FIELDS — the fields the built-in algorithmic
|
|
9
|
+
// interpreter of AbyssExtract can publish, per document type, with the format
|
|
10
|
+
// of their value. A field listed here may be absent from a given result (not
|
|
11
|
+
// found, or below its publish floor); a field not listed here is never
|
|
12
|
+
// published for that type by that interpreter. A learned template
|
|
13
|
+
// (spatial-template interpreter) publishes the keys its client defined, on any
|
|
14
|
+
// type.
|
|
15
|
+
//
|
|
16
|
+
// One exception: a valid machine-readable zone publishes its fields and
|
|
17
|
+
// `mrzValid` whatever the document type (listed here under `id_card` only).
|
|
18
|
+
//
|
|
19
|
+
// `generic` is absent: its fields are defined by the client. The extraction API
|
|
20
|
+
// tests that this list equals what its engine serves, type by type.
|
|
21
|
+
// ──────────────────────────────────────────────
|
|
22
|
+
export const EXTRACT_PUBLISHABLE_FIELDS: Readonly<
|
|
23
|
+
Record<
|
|
24
|
+
Exclude<DocumentType, DocumentType.GENERIC>,
|
|
25
|
+
Readonly<Partial<Record<ExtractFieldKey, ExtractFieldFormat>>>
|
|
26
|
+
>
|
|
27
|
+
> = Object.freeze({
|
|
28
|
+
[DocumentType.BANK_STATEMENT]: Object.freeze({
|
|
29
|
+
[ExtractFieldKey.IBAN]: TEXT,
|
|
30
|
+
[ExtractFieldKey.BIC]: TEXT,
|
|
31
|
+
[ExtractFieldKey.BANK_NAME]: TEXT,
|
|
32
|
+
[ExtractFieldKey.OPENING_BALANCE]: AMOUNT,
|
|
33
|
+
[ExtractFieldKey.CLOSING_BALANCE]: AMOUNT,
|
|
34
|
+
[ExtractFieldKey.PERIOD_START]: DATE,
|
|
35
|
+
[ExtractFieldKey.PERIOD_END]: DATE,
|
|
36
|
+
[ExtractFieldKey.CURRENCY]: TEXT,
|
|
37
|
+
}),
|
|
38
|
+
[DocumentType.INVOICE]: Object.freeze({
|
|
39
|
+
[ExtractFieldKey.TOTAL_TTC]: AMOUNT,
|
|
40
|
+
[ExtractFieldKey.TOTAL_HT]: AMOUNT,
|
|
41
|
+
[ExtractFieldKey.TOTAL_VAT]: AMOUNT,
|
|
42
|
+
[ExtractFieldKey.INVOICE_DATE]: DATE,
|
|
43
|
+
[ExtractFieldKey.DUE_DATE]: DATE,
|
|
44
|
+
[ExtractFieldKey.INVOICE_NUMBER]: TEXT,
|
|
45
|
+
[ExtractFieldKey.SUPPLIER]: TEXT,
|
|
46
|
+
[ExtractFieldKey.SUPPLIER_LEGAL_NAME]: TEXT,
|
|
47
|
+
[ExtractFieldKey.MARKETPLACE]: TEXT,
|
|
48
|
+
[ExtractFieldKey.SIRET]: TEXT,
|
|
49
|
+
[ExtractFieldKey.SIREN]: TEXT,
|
|
50
|
+
[ExtractFieldKey.VAT_NUMBER]: TEXT,
|
|
51
|
+
[ExtractFieldKey.IBAN]: TEXT,
|
|
52
|
+
[ExtractFieldKey.BIC]: TEXT,
|
|
53
|
+
[ExtractFieldKey.CURRENCY]: TEXT,
|
|
54
|
+
}),
|
|
55
|
+
[DocumentType.RECEIPT]: Object.freeze({
|
|
56
|
+
[ExtractFieldKey.TOTAL]: AMOUNT,
|
|
57
|
+
[ExtractFieldKey.VAT]: AMOUNT,
|
|
58
|
+
[ExtractFieldKey.DATE]: DATE,
|
|
59
|
+
[ExtractFieldKey.MERCHANT]: TEXT,
|
|
60
|
+
[ExtractFieldKey.CURRENCY]: TEXT,
|
|
61
|
+
}),
|
|
62
|
+
[DocumentType.ID_CARD]: Object.freeze({
|
|
63
|
+
[ExtractFieldKey.LAST_NAME]: TEXT,
|
|
64
|
+
[ExtractFieldKey.FIRST_NAMES]: TEXT,
|
|
65
|
+
[ExtractFieldKey.BIRTH_DATE]: DATE,
|
|
66
|
+
[ExtractFieldKey.EXPIRY_DATE]: DATE,
|
|
67
|
+
[ExtractFieldKey.ISSUE_DATE]: DATE,
|
|
68
|
+
[ExtractFieldKey.DOCUMENT_NUMBER]: TEXT,
|
|
69
|
+
[ExtractFieldKey.SEX]: TEXT,
|
|
70
|
+
[ExtractFieldKey.NATIONALITY]: TEXT,
|
|
71
|
+
[ExtractFieldKey.ISSUING_COUNTRY]: TEXT,
|
|
72
|
+
[ExtractFieldKey.DOCUMENT_KIND]: TEXT,
|
|
73
|
+
[ExtractFieldKey.MRZ_VALID]: BOOLEAN,
|
|
74
|
+
}),
|
|
75
|
+
[DocumentType.RIB]: Object.freeze({
|
|
76
|
+
[ExtractFieldKey.IBAN]: TEXT,
|
|
77
|
+
[ExtractFieldKey.BIC]: TEXT,
|
|
78
|
+
[ExtractFieldKey.HOLDER_NAME]: TEXT,
|
|
79
|
+
[ExtractFieldKey.BANK_NAME]: TEXT,
|
|
80
|
+
}),
|
|
81
|
+
[DocumentType.FINANCIAL_STATEMENT]: Object.freeze({
|
|
82
|
+
[ExtractFieldKey.COMPANY]: TEXT,
|
|
83
|
+
[ExtractFieldKey.SIREN]: TEXT,
|
|
84
|
+
[ExtractFieldKey.REGISTRATION_NUMBER]: TEXT,
|
|
85
|
+
[ExtractFieldKey.FISCAL_YEAR_END]: DATE,
|
|
86
|
+
[ExtractFieldKey.TOTAL_ACTIF]: AMOUNT,
|
|
87
|
+
[ExtractFieldKey.TOTAL_PASSIF]: AMOUNT,
|
|
88
|
+
[ExtractFieldKey.FIXED_ASSETS]: AMOUNT,
|
|
89
|
+
[ExtractFieldKey.CURRENT_ASSETS]: AMOUNT,
|
|
90
|
+
[ExtractFieldKey.CREDITORS_WITHIN_ONE_YEAR]: AMOUNT,
|
|
91
|
+
[ExtractFieldKey.NET_CURRENT_LIABILITIES]: AMOUNT,
|
|
92
|
+
[ExtractFieldKey.TOTAL_ASSETS_LESS_CURRENT_LIABILITIES]: AMOUNT,
|
|
93
|
+
[ExtractFieldKey.NET_ASSETS]: AMOUNT,
|
|
94
|
+
[ExtractFieldKey.CALLED_UP_SHARE_CAPITAL]: AMOUNT,
|
|
95
|
+
[ExtractFieldKey.PROFIT_AND_LOSS_ACCOUNT]: AMOUNT,
|
|
96
|
+
[ExtractFieldKey.TOTAL_SHAREHOLDERS_FUNDS]: AMOUNT,
|
|
97
|
+
[ExtractFieldKey.CURRENCY]: TEXT,
|
|
98
|
+
}),
|
|
99
|
+
[DocumentType.PAYSLIP]: Object.freeze({
|
|
100
|
+
[ExtractFieldKey.EMPLOYER]: TEXT,
|
|
101
|
+
[ExtractFieldKey.PERIOD]: TEXT,
|
|
102
|
+
[ExtractFieldKey.GROSS_CENTS]: AMOUNT,
|
|
103
|
+
[ExtractFieldKey.NET_CENTS]: AMOUNT,
|
|
104
|
+
[ExtractFieldKey.NET_TAXABLE_CENTS]: AMOUNT,
|
|
105
|
+
[ExtractFieldKey.PAS_AMOUNT_CENTS]: AMOUNT,
|
|
106
|
+
[ExtractFieldKey.PAS_RATE_PCT]: PERCENT,
|
|
107
|
+
[ExtractFieldKey.CURRENCY]: TEXT,
|
|
108
|
+
}),
|
|
109
|
+
});
|
package/src/constants/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ import * as metricsApi from './api/metrics.api';
|
|
|
28
28
|
import * as organizationApi from './api/organization.api';
|
|
29
29
|
import * as tagApi from './api/tag.api';
|
|
30
30
|
import * as extractionApi from './api/extraction.api';
|
|
31
|
+
import * as extractionApplicationApi from './api/extraction.application.api';
|
|
31
32
|
import * as extractionSettingsApi from './api/extraction-settings.api';
|
|
32
33
|
import * as extractionPlanPresetApi from './api/extraction-plan-preset.api';
|
|
33
34
|
import * as monitorApi from './api/monitor.api';
|
|
@@ -254,6 +255,7 @@ type AbyssToolsCoreSDK = {
|
|
|
254
255
|
getUploadPreSignedUrl: typeof atlasDocumentApi.getUploadPreSignedUrlAtlasDocument;
|
|
255
256
|
paginate: typeof atlasDocumentApi.paginateAtlasDocument;
|
|
256
257
|
list: typeof atlasDocumentApi.listAtlasDocument;
|
|
258
|
+
getPublicAccessId: typeof atlasDocumentApi.getPublicAccessIdAtlasDocument;
|
|
257
259
|
};
|
|
258
260
|
shortLink: {
|
|
259
261
|
get: typeof shortLinkApiModule.shortLinkApi.get;
|
|
@@ -405,6 +407,19 @@ type AbyssToolsCoreSDK = {
|
|
|
405
407
|
run: typeof extractionApi.extractSync;
|
|
406
408
|
runQueue: typeof extractionApi.extractQueue;
|
|
407
409
|
runBulk: typeof extractionApi.extractBulk;
|
|
410
|
+
/**
|
|
411
|
+
* Application/API-key-auth counterpart — for a backend satellite (e.g.
|
|
412
|
+
* AbyssBanking) triggering a SYNCHRONOUS extraction server-side with its
|
|
413
|
+
* APPLICATION api key: the run is OWNED by the application and BILLED to
|
|
414
|
+
* its resolved owning organization (never an end user). Hits
|
|
415
|
+
* `/extract/application/:applicationId/extract`, authenticated with the
|
|
416
|
+
* `abyss-api-key-application` header ({@link API_KEY_APPLICATION_HEADER})
|
|
417
|
+
* instead of the personal `abyss-api-key`. Does NOT change the personal `run`.
|
|
418
|
+
*/
|
|
419
|
+
application: {
|
|
420
|
+
/** `POST /extract/application/:applicationId/extract` — synchronous; owned + billed to the app's org. */
|
|
421
|
+
run: typeof extractionApplicationApi.runExtractionApplication;
|
|
422
|
+
};
|
|
408
423
|
files: {
|
|
409
424
|
list: typeof extractionApi.listFiles;
|
|
410
425
|
listShared: typeof extractionApi.listSharedFiles;
|
|
@@ -696,6 +711,7 @@ export class AbyssToolsCore {
|
|
|
696
711
|
getUploadPreSignedUrl: atlasDocumentApi.getUploadPreSignedUrlAtlasDocument,
|
|
697
712
|
paginate: atlasDocumentApi.paginateAtlasDocument,
|
|
698
713
|
list: atlasDocumentApi.listAtlasDocument,
|
|
714
|
+
getPublicAccessId: atlasDocumentApi.getPublicAccessIdAtlasDocument,
|
|
699
715
|
},
|
|
700
716
|
shortLink: {
|
|
701
717
|
get: shortLinkApiModule.shortLinkApi.get,
|
|
@@ -823,6 +839,9 @@ export class AbyssToolsCore {
|
|
|
823
839
|
run: extractionApi.extractSync,
|
|
824
840
|
runQueue: extractionApi.extractQueue,
|
|
825
841
|
runBulk: extractionApi.extractBulk,
|
|
842
|
+
application: {
|
|
843
|
+
run: extractionApplicationApi.runExtractionApplication,
|
|
844
|
+
},
|
|
826
845
|
files: {
|
|
827
846
|
list: extractionApi.listFiles,
|
|
828
847
|
listShared: extractionApi.listSharedFiles,
|
|
@@ -19,11 +19,13 @@ export class ServerSentEventsManager<
|
|
|
19
19
|
T extends ServerSentEventBaseContext,
|
|
20
20
|
P extends { type: string; payload: unknown },
|
|
21
21
|
> {
|
|
22
|
-
private channel: string;
|
|
23
22
|
private contexts: Map<string, Set<T>>;
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
// Le nom du canal est accepte pour ne rien casser chez les appelants, mais il
|
|
25
|
+
// n'est pas conserve : l'aiguillage se fait par la CLE de la table des
|
|
26
|
+
// gestionnaires (`AppConfig.sse[SSEChannels.X]`), jamais par un champ porte par
|
|
27
|
+
// le gestionnaire lui-meme. Le champ qui le stockait n'etait lu nulle part.
|
|
28
|
+
constructor(_channelName: string) {
|
|
27
29
|
this.contexts = new Map();
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// ──────────────────────────────────────────────
|
|
2
|
+
// ExtractFieldFormat — the shape of a published field value, so a client can
|
|
3
|
+
// display it without knowing each key.
|
|
4
|
+
// ──────────────────────────────────────────────
|
|
5
|
+
|
|
6
|
+
export enum ExtractFieldFormat {
|
|
7
|
+
/** Integer amount in cents; the currency is the `currency` field. */
|
|
8
|
+
AMOUNT = 'amount',
|
|
9
|
+
/** ISO 8601 date (`YYYY-MM-DD`). */
|
|
10
|
+
DATE = 'date',
|
|
11
|
+
/** The percent itself: `9` for 9 %. */
|
|
12
|
+
PERCENT = 'percent',
|
|
13
|
+
BOOLEAN = 'boolean',
|
|
14
|
+
/** Free text or identifier (IBAN, SIRET, VAT number…), to display as is. */
|
|
15
|
+
TEXT = 'text',
|
|
16
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// ──────────────────────────────────────────────
|
|
2
|
+
// ExtractFieldKey — every field key AbyssExtract can publish for a known
|
|
3
|
+
// document type (`generic` excluded: its fields are defined by the client).
|
|
4
|
+
// The value is the key found in `fields` of an extraction result. Which type
|
|
5
|
+
// publishes which key, and in which format: `EXTRACT_PUBLISHABLE_FIELDS`.
|
|
6
|
+
// A valid machine-readable zone publishes its fields and `mrzValid` whatever
|
|
7
|
+
// the document type.
|
|
8
|
+
// ──────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
export enum ExtractFieldKey {
|
|
11
|
+
// Amounts
|
|
12
|
+
TOTAL_TTC = 'totalTtc',
|
|
13
|
+
TOTAL_HT = 'totalHt',
|
|
14
|
+
TOTAL_VAT = 'totalVat',
|
|
15
|
+
TOTAL = 'total',
|
|
16
|
+
VAT = 'vat',
|
|
17
|
+
OPENING_BALANCE = 'openingBalance',
|
|
18
|
+
CLOSING_BALANCE = 'closingBalance',
|
|
19
|
+
TOTAL_ACTIF = 'totalActif',
|
|
20
|
+
TOTAL_PASSIF = 'totalPassif',
|
|
21
|
+
FIXED_ASSETS = 'fixedAssets',
|
|
22
|
+
CURRENT_ASSETS = 'currentAssets',
|
|
23
|
+
CREDITORS_WITHIN_ONE_YEAR = 'creditorsWithinOneYear',
|
|
24
|
+
NET_CURRENT_LIABILITIES = 'netCurrentLiabilities',
|
|
25
|
+
TOTAL_ASSETS_LESS_CURRENT_LIABILITIES = 'totalAssetsLessCurrentLiabilities',
|
|
26
|
+
NET_ASSETS = 'netAssets',
|
|
27
|
+
CALLED_UP_SHARE_CAPITAL = 'calledUpShareCapital',
|
|
28
|
+
PROFIT_AND_LOSS_ACCOUNT = 'profitAndLossAccount',
|
|
29
|
+
TOTAL_SHAREHOLDERS_FUNDS = 'totalShareholdersFunds',
|
|
30
|
+
NET_CENTS = 'netCents',
|
|
31
|
+
GROSS_CENTS = 'grossCents',
|
|
32
|
+
NET_TAXABLE_CENTS = 'netTaxableCents',
|
|
33
|
+
PAS_AMOUNT_CENTS = 'pasAmountCents',
|
|
34
|
+
// Dates
|
|
35
|
+
INVOICE_DATE = 'invoiceDate',
|
|
36
|
+
DUE_DATE = 'dueDate',
|
|
37
|
+
DATE = 'date',
|
|
38
|
+
PERIOD_START = 'periodStart',
|
|
39
|
+
PERIOD_END = 'periodEnd',
|
|
40
|
+
FISCAL_YEAR_END = 'fiscalYearEnd',
|
|
41
|
+
BIRTH_DATE = 'birthDate',
|
|
42
|
+
EXPIRY_DATE = 'expiryDate',
|
|
43
|
+
ISSUE_DATE = 'issueDate',
|
|
44
|
+
// Percentages
|
|
45
|
+
PAS_RATE_PCT = 'pasRatePct',
|
|
46
|
+
// Identifiers
|
|
47
|
+
IBAN = 'iban',
|
|
48
|
+
BIC = 'bic',
|
|
49
|
+
SIRET = 'siret',
|
|
50
|
+
SIREN = 'siren',
|
|
51
|
+
VAT_NUMBER = 'vatNumber',
|
|
52
|
+
INVOICE_NUMBER = 'invoiceNumber',
|
|
53
|
+
DOCUMENT_NUMBER = 'documentNumber',
|
|
54
|
+
REGISTRATION_NUMBER = 'registrationNumber',
|
|
55
|
+
// Names and labels
|
|
56
|
+
SUPPLIER = 'supplier',
|
|
57
|
+
SUPPLIER_LEGAL_NAME = 'supplierLegalName',
|
|
58
|
+
MARKETPLACE = 'marketplace',
|
|
59
|
+
MERCHANT = 'merchant',
|
|
60
|
+
HOLDER_NAME = 'holderName',
|
|
61
|
+
BANK_NAME = 'bankName',
|
|
62
|
+
COMPANY = 'company',
|
|
63
|
+
EMPLOYER = 'employer',
|
|
64
|
+
LAST_NAME = 'lastName',
|
|
65
|
+
FIRST_NAMES = 'firstNames',
|
|
66
|
+
NATIONALITY = 'nationality',
|
|
67
|
+
/** ISO 4217 code of the published amounts. */
|
|
68
|
+
CURRENCY = 'currency',
|
|
69
|
+
/** Payslip period label: an ISO month (`2026-06`) or a day range (`2026-06-01..2026-06-30`). */
|
|
70
|
+
PERIOD = 'period',
|
|
71
|
+
// Machine-readable zone of an identity document
|
|
72
|
+
SEX = 'sex',
|
|
73
|
+
ISSUING_COUNTRY = 'issuingCountry',
|
|
74
|
+
DOCUMENT_KIND = 'documentKind',
|
|
75
|
+
/** Whether the check digits of the machine-readable zone are correct. */
|
|
76
|
+
MRZ_VALID = 'mrzValid',
|
|
77
|
+
}
|
|
@@ -18,4 +18,61 @@ export enum ExtractionWarningCode {
|
|
|
18
18
|
* enum for each domain-specific rule.
|
|
19
19
|
*/
|
|
20
20
|
ADAPTER_VALIDATION_ERROR = 'adapter_validation_error',
|
|
21
|
+
/**
|
|
22
|
+
* A field was extracted but NOT published, because its calibrated confidence
|
|
23
|
+
* fell below the publish floor for its (documentType, fieldKey).
|
|
24
|
+
*
|
|
25
|
+
* This is deliberately its own code rather than an `ADAPTER_VALIDATION_ERROR`
|
|
26
|
+
* carrying a `data.type`. Suppression is a first-class product behaviour a
|
|
27
|
+
* client must be able to detect reliably — «did the engine find nothing, or
|
|
28
|
+
* did it find something it judged not worth sending?» are two different
|
|
29
|
+
* questions, and a client should not have to parse a free-text field to tell
|
|
30
|
+
* them apart.
|
|
31
|
+
*
|
|
32
|
+
* `data.fieldKey` names the field, `data.confidence` its calibrated value and
|
|
33
|
+
* `data.floor` the threshold it missed. The value itself is never in the
|
|
34
|
+
* warning: it stays in `provenance`, flagged `suppressed`.
|
|
35
|
+
*/
|
|
36
|
+
FIELD_BELOW_PUBLISH_FLOOR = 'field_below_publish_floor',
|
|
37
|
+
/**
|
|
38
|
+
* A date field was extracted but NOT published, because nothing besides its
|
|
39
|
+
* format supported it: no label next to it, and it did not sit in the page
|
|
40
|
+
* band the document type expects for that field (#575).
|
|
41
|
+
*
|
|
42
|
+
* This is deliberately its own code rather than folded into
|
|
43
|
+
* `FIELD_BELOW_PUBLISH_FLOOR`: the confidence can sit ABOVE the field's
|
|
44
|
+
* publish floor (corroboration alone can carry a format-only date from 0.42
|
|
45
|
+
* to 0.565) and still not be published — a client checking only the floor
|
|
46
|
+
* would see no reason for the field's absence. Suppression is a first-class
|
|
47
|
+
* product behaviour a client must be able to detect reliably, here as much
|
|
48
|
+
* as for a below-floor drop.
|
|
49
|
+
*
|
|
50
|
+
* `data.fieldKey` names the field, `data.confidence` its calibrated value.
|
|
51
|
+
* The value itself is never in the warning: it stays in internal
|
|
52
|
+
* traceability only (`suppressedFields`, reason `format_only_date`), which
|
|
53
|
+
* is neither persisted nor returned to the client — only this warning is.
|
|
54
|
+
*/
|
|
55
|
+
FIELD_FORMAT_ONLY_DATE = 'field_format_only_date',
|
|
56
|
+
/**
|
|
57
|
+
* A field of an identity document's machine-readable zone was read but NOT
|
|
58
|
+
* published, because its value lies outside the domain the zone allows
|
|
59
|
+
* (#614): a sex other than `M`, `F` or `X`, or a nationality or issuing
|
|
60
|
+
* state that is neither an ISO 3166-1 alpha-3 code nor one of the special
|
|
61
|
+
* codes of ICAO Doc 9303 part 3 (`D`, `UNO`, `XXA`, `RKS`…).
|
|
62
|
+
*
|
|
63
|
+
* These three fields are covered by no check digit, not even the composite
|
|
64
|
+
* one: a misread letter there leaves every key closing. The domain is the
|
|
65
|
+
* only check the zone itself offers for them, and a value that fails it is
|
|
66
|
+
* withheld rather than published at full confidence.
|
|
67
|
+
*
|
|
68
|
+
* This is deliberately its own code: the zone is valid and its other fields
|
|
69
|
+
* are published, so neither `FIELD_BELOW_PUBLISH_FLOOR` nor an
|
|
70
|
+
* `ADAPTER_VALIDATION_ERROR` of type `MRZ_INVALID` would tell the client why
|
|
71
|
+
* this one field is missing.
|
|
72
|
+
*
|
|
73
|
+
* `data.fieldKey` names the field. The value itself is never in the warning:
|
|
74
|
+
* it stays in internal traceability only (`suppressedFields`, reason
|
|
75
|
+
* `mrz_out_of_domain`), which is neither persisted nor returned to the client.
|
|
76
|
+
*/
|
|
77
|
+
FIELD_MRZ_OUT_OF_DOMAIN = 'field_mrz_out_of_domain',
|
|
21
78
|
}
|
package/src/types/enum/index.ts
CHANGED
|
@@ -7,6 +7,8 @@ export * from './document-type.enum';
|
|
|
7
7
|
export * from './pdf-operation.enum';
|
|
8
8
|
export * from './rcb-bank.enum';
|
|
9
9
|
export * from './extraction-warning.enum';
|
|
10
|
+
export * from './extract-field-key.enum';
|
|
11
|
+
export * from './extract-field-format.enum';
|
|
10
12
|
export * from './extraction-feedback-issue-type.enum';
|
|
11
13
|
export * from './provider-kind.enum';
|
|
12
14
|
export * from './interpreter-kind.enum';
|