@abyss-project/tools 2.10.0 → 2.12.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.
Files changed (119) hide show
  1. package/.eslintrc.js +33 -33
  2. package/.prettierrc +5 -5
  3. package/dist/api/atlas-group.api.js.map +1 -1
  4. package/dist/api/atlas-page.api.js.map +1 -1
  5. package/dist/api/atlas.api.js +3 -3
  6. package/dist/api/atlas.api.js.map +1 -1
  7. package/dist/api/atlas.public.api.js.map +1 -1
  8. package/dist/api/board-card.api.js.map +1 -1
  9. package/dist/api/board-column.api.js.map +1 -1
  10. package/dist/api/board-label.api.js +1 -2
  11. package/dist/api/board-label.api.js.map +1 -1
  12. package/dist/api/board.api.js +7 -5
  13. package/dist/api/board.api.js.map +1 -1
  14. package/dist/api/draw.api.js +1 -2
  15. package/dist/api/draw.api.js.map +1 -1
  16. package/dist/api/draw.public.api.js.map +1 -1
  17. package/dist/api/extraction-plan-preset.api.js +19 -6
  18. package/dist/api/extraction-plan-preset.api.js.map +1 -1
  19. package/dist/api/extraction-settings.api.js.map +1 -1
  20. package/dist/api/extraction.api.d.ts +0 -4
  21. package/dist/api/extraction.api.js +57 -46
  22. package/dist/api/extraction.api.js.map +1 -1
  23. package/dist/api/index.d.ts +0 -1
  24. package/dist/api/index.js +0 -1
  25. package/dist/api/index.js.map +1 -1
  26. package/dist/api/probe-scan.api.d.ts +2 -9
  27. package/dist/api/probe-scan.api.js +16 -26
  28. package/dist/api/probe-scan.api.js.map +1 -1
  29. package/dist/api/probe-scan.api.test.js +10 -0
  30. package/dist/api/probe-scan.api.test.js.map +1 -1
  31. package/dist/api/probe-scan.application.api.js +2 -2
  32. package/dist/api/probe-scan.application.api.js.map +1 -1
  33. package/dist/api/probe-scan.application.api.test.js +4 -0
  34. package/dist/api/probe-scan.application.api.test.js.map +1 -1
  35. package/dist/api/retrospective.api.js +2 -1
  36. package/dist/api/retrospective.api.js.map +1 -1
  37. package/dist/api/short-link.admin.api.js.map +1 -1
  38. package/dist/api/short-link.api.js.map +1 -1
  39. package/dist/api/short-link.public.api.js.map +1 -1
  40. package/dist/api/tag.api.js.map +1 -1
  41. package/dist/index.d.ts +0 -4
  42. package/dist/index.js +0 -4
  43. package/dist/index.js.map +1 -1
  44. package/dist/server-sent-events/server-sent-events.manager.d.ts +1 -2
  45. package/dist/server-sent-events/server-sent-events.manager.js +1 -2
  46. package/dist/server-sent-events/server-sent-events.manager.js.map +1 -1
  47. package/dist/types/enum/document-type.enum.d.ts +0 -1
  48. package/dist/types/enum/document-type.enum.js +0 -1
  49. package/dist/types/enum/document-type.enum.js.map +1 -1
  50. package/dist/types/enum/extraction-warning.enum.d.ts +2 -1
  51. package/dist/types/enum/extraction-warning.enum.js +1 -0
  52. package/dist/types/enum/extraction-warning.enum.js.map +1 -1
  53. package/dist/types/enum/rcb-bank.enum.js +252 -36
  54. package/dist/types/enum/rcb-bank.enum.js.map +1 -1
  55. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +8 -2
  56. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -1
  57. package/dist/types/interface/models/extraction-plan.dto.test.js +6 -1
  58. package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -1
  59. package/dist/types/interface/models/extraction-spatial-template.dto.test.js +20 -3
  60. package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -1
  61. package/dist/types/interface/models/extraction.dto.d.ts +0 -10
  62. package/dist/types/interface/models/extraction.dto.js.map +1 -1
  63. package/package.json +4 -1
  64. package/src/api/atlas-group.api.ts +4 -1
  65. package/src/api/atlas-page.api.ts +12 -6
  66. package/src/api/atlas.api.ts +12 -7
  67. package/src/api/atlas.public.api.ts +3 -1
  68. package/src/api/board-card.api.ts +6 -3
  69. package/src/api/board-column.api.ts +4 -1
  70. package/src/api/board-label.api.ts +7 -3
  71. package/src/api/board.api.ts +19 -10
  72. package/src/api/draw.api.ts +16 -12
  73. package/src/api/draw.public.api.ts +3 -1
  74. package/src/api/extraction-plan-preset.api.ts +64 -18
  75. package/src/api/extraction-settings.api.ts +2 -8
  76. package/src/api/extraction.api.ts +45 -52
  77. package/src/api/index.ts +0 -1
  78. package/src/api/probe-scan.api.test.ts +26 -0
  79. package/src/api/probe-scan.api.ts +66 -54
  80. package/src/api/probe-scan.application.api.test.ts +14 -0
  81. package/src/api/probe-scan.application.api.ts +5 -5
  82. package/src/api/retrospective.api.ts +8 -5
  83. package/src/api/short-link.admin.api.ts +14 -4
  84. package/src/api/short-link.api.ts +39 -17
  85. package/src/api/short-link.public.api.ts +25 -11
  86. package/src/api/tag.api.ts +3 -1
  87. package/src/index.ts +0 -17
  88. package/src/server-sent-events/server-sent-events.manager.ts +5 -3
  89. package/src/types/enum/document-type.enum.ts +0 -1
  90. package/src/types/enum/extraction-warning.enum.ts +16 -0
  91. package/src/types/enum/rcb-bank.enum.ts +255 -41
  92. package/src/types/interface/api/requests/probe-scan.request.ts +5 -1
  93. package/src/types/interface/api/responses/retrospective.response.ts +2 -1
  94. package/src/types/interface/models/content-share.dto.ts +5 -1
  95. package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +20 -9
  96. package/src/types/interface/models/extraction-plan.dto.test.ts +17 -4
  97. package/src/types/interface/models/extraction-spatial-template.dto.test.ts +26 -5
  98. package/src/types/interface/models/extraction.dto.ts +0 -17
  99. package/src/types/interface/models/probe-webhook.dto.ts +3 -4
  100. package/tsconfig.check.json +15 -0
  101. package/dist/api/extraction.application.api.d.ts +0 -4
  102. package/dist/api/extraction.application.api.js +0 -30
  103. package/dist/api/extraction.application.api.js.map +0 -1
  104. package/dist/api/memo.api.d.ts +0 -15
  105. package/dist/api/memo.api.js +0 -49
  106. package/dist/api/memo.api.js.map +0 -1
  107. package/dist/constants/memo.constants.d.ts +0 -3
  108. package/dist/constants/memo.constants.js +0 -7
  109. package/dist/constants/memo.constants.js.map +0 -1
  110. package/dist/types/interface/api/requests/memo.request.d.ts +0 -41
  111. package/dist/types/interface/api/requests/memo.request.js +0 -3
  112. package/dist/types/interface/api/requests/memo.request.js.map +0 -1
  113. package/dist/types/interface/api/responses/memo.response.d.ts +0 -27
  114. package/dist/types/interface/api/responses/memo.response.js +0 -3
  115. package/dist/types/interface/api/responses/memo.response.js.map +0 -1
  116. package/dist/types/interface/models/memo.dto.d.ts +0 -20
  117. package/dist/types/interface/models/memo.dto.js +0 -3
  118. package/dist/types/interface/models/memo.dto.js.map +0 -1
  119. package/src/api/extraction.application.api.ts +0 -74
@@ -23,7 +23,9 @@ export const getRetrospective = async (
23
23
  params: IGetRetrospectiveParams,
24
24
  ): Promise<IGetRetrospectiveResponse> => {
25
25
  return (
26
- await AbyssToolsCore.axios.get<IGetRetrospectiveResponse>(`retrospective/${params.retrospectiveId}`)
26
+ await AbyssToolsCore.axios.get<IGetRetrospectiveResponse>(
27
+ `retrospective/${params.retrospectiveId}`,
28
+ )
27
29
  ).data;
28
30
  };
29
31
 
@@ -52,7 +54,8 @@ export const paginateRetrospective = async (
52
54
  export const createRetrospective = async (
53
55
  body: ICreateRetrospectiveBody,
54
56
  ): Promise<ICreateRetrospectiveResponse> => {
55
- return (await AbyssToolsCore.axios.post<ICreateRetrospectiveResponse>(`retrospective`, body)).data;
57
+ return (await AbyssToolsCore.axios.post<ICreateRetrospectiveResponse>(`retrospective`, body))
58
+ .data;
56
59
  };
57
60
 
58
61
  export const createForOrganizationRetrospective = async (
@@ -113,9 +116,9 @@ export const transferRetrospective = async (
113
116
  ).data;
114
117
  };
115
118
 
116
- export const countOrganizationRetrospective = async (
117
- params: { organizationId: string },
118
- ): Promise<ICountOrganizationResponse> => {
119
+ export const countOrganizationRetrospective = async (params: {
120
+ organizationId: string;
121
+ }): Promise<ICountOrganizationResponse> => {
119
122
  return (
120
123
  await AbyssToolsCore.axios.get<ICountOrganizationResponse>(
121
124
  `retrospective/organization/${params.organizationId}/count`,
@@ -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>('/admin/short-link/paginate', { params: query });
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>(`/admin/short-link/${params.shortLinkId}`);
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>(`/admin/short-link/${params.shortLinkId}`, body);
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>(`/admin/short-link/${params.shortLinkId}`);
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>(`/short-link/${params.shortLinkId}`);
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>('/short-link/paginate', { params: query });
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>(`/short-link/project/${params.projectId}/paginate`, {
44
- params: query,
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>(`/short-link/organization/${params.organizationId}`, body);
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>(`/short-link/${params.shortLinkId}`, body);
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>(`/short-link/${params.shortLinkId}`);
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>(`/short-link/${params.shortLinkId}/stats`, {
80
- params: query,
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>(`/short-link/${params.shortLinkId}/clicks`, {
90
- params: query,
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
- params: { organizationId: string },
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>('/short-link/public', body);
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>(`/short-link/public/redirect/${params.slug}`, {
31
- params: query,
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>(`/short-link/public/${params.shortLinkId}/stats`, {
41
- params: query,
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>(`/short-link/public/${params.shortLinkId}/clicks`, {
51
- params: query,
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>(`/short-link/public/${params.shortLinkId}/renew`);
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
  };
@@ -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 (params: IGetEntityTagsParams): Promise<IGetEntityTagsResponse> => {
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`,
package/src/index.ts CHANGED
@@ -28,7 +28,6 @@ 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';
32
31
  import * as extractionSettingsApi from './api/extraction-settings.api';
33
32
  import * as extractionPlanPresetApi from './api/extraction-plan-preset.api';
34
33
  import * as monitorApi from './api/monitor.api';
@@ -407,19 +406,6 @@ type AbyssToolsCoreSDK = {
407
406
  run: typeof extractionApi.extractSync;
408
407
  runQueue: typeof extractionApi.extractQueue;
409
408
  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
- };
423
409
  files: {
424
410
  list: typeof extractionApi.listFiles;
425
411
  listShared: typeof extractionApi.listSharedFiles;
@@ -839,9 +825,6 @@ export class AbyssToolsCore {
839
825
  run: extractionApi.extractSync,
840
826
  runQueue: extractionApi.extractQueue,
841
827
  runBulk: extractionApi.extractBulk,
842
- application: {
843
- run: extractionApplicationApi.runExtractionApplication,
844
- },
845
828
  files: {
846
829
  list: extractionApi.listFiles,
847
830
  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
- constructor(channelName: string) {
26
- this.channel = channelName;
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
 
@@ -6,6 +6,5 @@ export enum DocumentType {
6
6
  ID_CARD = 'id_card',
7
7
  RIB = 'rib',
8
8
  FINANCIAL_STATEMENT = 'financial_statement',
9
- PAYSLIP = 'payslip',
10
9
  GENERIC = 'generic',
11
10
  }
@@ -18,4 +18,20 @@ 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',
21
37
  }
@@ -68,57 +68,271 @@ export interface RcbBankCatalogueEntry {
68
68
 
69
69
  export const RCB_BANK_CATALOGUE: ReadonlyArray<RcbBankCatalogueEntry> = [
70
70
  // ─── French retail / business ─────────────
71
- { id: RcbBankVersionId.BNP_CONNEXIS_DEFAULT, bank: 'BNP Connexis', version: 'default', country: 'FR', type: 'business' },
72
- { id: RcbBankVersionId.BNP_PARIBAS_DEFAULT, bank: 'BNP Paribas', version: 'default', country: 'FR', type: 'retail' },
73
- { id: RcbBankVersionId.SOCIETE_GENERALE_DEFAULT, bank: 'Société Générale', version: 'default', country: 'FR', type: 'retail' },
74
- { id: RcbBankVersionId.CREDIT_AGRICOLE_DEFAULT, bank: 'Crédit Agricole', version: 'default', country: 'FR', type: 'retail' },
75
- { id: RcbBankVersionId.LCL_DEFAULT, bank: 'LCL', version: 'default', country: 'FR', type: 'retail' },
76
- { id: RcbBankVersionId.BOURSORAMA_DEFAULT, bank: 'Boursorama', version: 'default', country: 'FR', type: 'retail' },
77
- { id: RcbBankVersionId.LA_BANQUE_POSTALE_DEFAULT, bank: 'La Banque Postale', version: 'default', country: 'FR', type: 'retail' },
78
- { id: RcbBankVersionId.CAISSE_EPARGNE_DEFAULT, bank: "Caisse d'Épargne", version: 'default', country: 'FR', type: 'retail' },
79
- { id: RcbBankVersionId.CIC_EBICS_DEFAULT, bank: 'CIC', version: 'ebics', country: 'FR', type: 'business' },
80
- { id: RcbBankVersionId.CIC_DEFAULT, bank: 'CIC', version: 'default', country: 'FR', type: 'retail' },
81
- { id: RcbBankVersionId.CREDIT_MUTUEL_DEFAULT, bank: 'Crédit Mutuel', version: 'default', country: 'FR', type: 'retail' },
82
- { id: RcbBankVersionId.BRED_DEFAULT, bank: 'BRED', version: 'default', country: 'FR', type: 'retail' },
83
- { id: RcbBankVersionId.CREDIT_DU_NORD_DEFAULT, bank: 'Crédit du Nord', version: 'default', country: 'FR', type: 'retail' },
84
- { id: RcbBankVersionId.CDE_NET_DEFAULT, bank: 'CDE Net', version: 'default', country: 'FR', type: 'business' },
85
- { id: RcbBankVersionId.DELUBAC_DEFAULT, bank: 'Delubac', version: 'default', country: 'FR', type: 'business' },
86
- { id: RcbBankVersionId.PALATINE_DEFAULT, bank: 'Palatine', version: 'default', country: 'FR', type: 'business' },
87
- { id: RcbBankVersionId.NATIXIS_DEFAULT, bank: 'Natixis', version: 'default', country: 'FR', type: 'corporate' },
88
- { id: RcbBankVersionId.THEMIS_DEFAULT, bank: 'Themis Banque', version: 'default', country: 'FR', type: 'business' },
89
- { id: RcbBankVersionId.ROTHSCHILD_DEFAULT, bank: 'Rothschild Martin Maurel', version: 'default', country: 'FR', type: 'corporate' },
90
- { id: RcbBankVersionId.LA_NEF_V1, bank: 'La Nef', version: 'v1', country: 'FR', type: 'retail' },
91
- { id: RcbBankVersionId.LA_NEF_V2, bank: 'La Nef', version: 'v2', country: 'FR', type: 'retail' },
71
+ {
72
+ id: RcbBankVersionId.BNP_CONNEXIS_DEFAULT,
73
+ bank: 'BNP Connexis',
74
+ version: 'default',
75
+ country: 'FR',
76
+ type: 'business',
77
+ },
78
+ {
79
+ id: RcbBankVersionId.BNP_PARIBAS_DEFAULT,
80
+ bank: 'BNP Paribas',
81
+ version: 'default',
82
+ country: 'FR',
83
+ type: 'retail',
84
+ },
85
+ {
86
+ id: RcbBankVersionId.SOCIETE_GENERALE_DEFAULT,
87
+ bank: 'Société Générale',
88
+ version: 'default',
89
+ country: 'FR',
90
+ type: 'retail',
91
+ },
92
+ {
93
+ id: RcbBankVersionId.CREDIT_AGRICOLE_DEFAULT,
94
+ bank: 'Crédit Agricole',
95
+ version: 'default',
96
+ country: 'FR',
97
+ type: 'retail',
98
+ },
99
+ {
100
+ id: RcbBankVersionId.LCL_DEFAULT,
101
+ bank: 'LCL',
102
+ version: 'default',
103
+ country: 'FR',
104
+ type: 'retail',
105
+ },
106
+ {
107
+ id: RcbBankVersionId.BOURSORAMA_DEFAULT,
108
+ bank: 'Boursorama',
109
+ version: 'default',
110
+ country: 'FR',
111
+ type: 'retail',
112
+ },
113
+ {
114
+ id: RcbBankVersionId.LA_BANQUE_POSTALE_DEFAULT,
115
+ bank: 'La Banque Postale',
116
+ version: 'default',
117
+ country: 'FR',
118
+ type: 'retail',
119
+ },
120
+ {
121
+ id: RcbBankVersionId.CAISSE_EPARGNE_DEFAULT,
122
+ bank: "Caisse d'Épargne",
123
+ version: 'default',
124
+ country: 'FR',
125
+ type: 'retail',
126
+ },
127
+ {
128
+ id: RcbBankVersionId.CIC_EBICS_DEFAULT,
129
+ bank: 'CIC',
130
+ version: 'ebics',
131
+ country: 'FR',
132
+ type: 'business',
133
+ },
134
+ {
135
+ id: RcbBankVersionId.CIC_DEFAULT,
136
+ bank: 'CIC',
137
+ version: 'default',
138
+ country: 'FR',
139
+ type: 'retail',
140
+ },
141
+ {
142
+ id: RcbBankVersionId.CREDIT_MUTUEL_DEFAULT,
143
+ bank: 'Crédit Mutuel',
144
+ version: 'default',
145
+ country: 'FR',
146
+ type: 'retail',
147
+ },
148
+ {
149
+ id: RcbBankVersionId.BRED_DEFAULT,
150
+ bank: 'BRED',
151
+ version: 'default',
152
+ country: 'FR',
153
+ type: 'retail',
154
+ },
155
+ {
156
+ id: RcbBankVersionId.CREDIT_DU_NORD_DEFAULT,
157
+ bank: 'Crédit du Nord',
158
+ version: 'default',
159
+ country: 'FR',
160
+ type: 'retail',
161
+ },
162
+ {
163
+ id: RcbBankVersionId.CDE_NET_DEFAULT,
164
+ bank: 'CDE Net',
165
+ version: 'default',
166
+ country: 'FR',
167
+ type: 'business',
168
+ },
169
+ {
170
+ id: RcbBankVersionId.DELUBAC_DEFAULT,
171
+ bank: 'Delubac',
172
+ version: 'default',
173
+ country: 'FR',
174
+ type: 'business',
175
+ },
176
+ {
177
+ id: RcbBankVersionId.PALATINE_DEFAULT,
178
+ bank: 'Palatine',
179
+ version: 'default',
180
+ country: 'FR',
181
+ type: 'business',
182
+ },
183
+ {
184
+ id: RcbBankVersionId.NATIXIS_DEFAULT,
185
+ bank: 'Natixis',
186
+ version: 'default',
187
+ country: 'FR',
188
+ type: 'corporate',
189
+ },
190
+ {
191
+ id: RcbBankVersionId.THEMIS_DEFAULT,
192
+ bank: 'Themis Banque',
193
+ version: 'default',
194
+ country: 'FR',
195
+ type: 'business',
196
+ },
197
+ {
198
+ id: RcbBankVersionId.ROTHSCHILD_DEFAULT,
199
+ bank: 'Rothschild Martin Maurel',
200
+ version: 'default',
201
+ country: 'FR',
202
+ type: 'corporate',
203
+ },
204
+ { id: RcbBankVersionId.LA_NEF_V1, bank: 'La Nef', version: 'v1', country: 'FR', type: 'retail' },
205
+ { id: RcbBankVersionId.LA_NEF_V2, bank: 'La Nef', version: 'v2', country: 'FR', type: 'retail' },
92
206
 
93
207
  // ─── Neobanks / fintech ───────────────────
94
- { id: RcbBankVersionId.QONTO_DEFAULT, bank: 'Qonto', version: 'default', country: 'FR', type: 'neobank' },
95
- { id: RcbBankVersionId.SHINE_DEFAULT, bank: 'Shine', version: 'default', country: 'FR', type: 'neobank' },
96
- { id: RcbBankVersionId.FINOM_DEFAULT, bank: 'Finom', version: 'default', country: 'EU', type: 'neobank' },
97
- { id: RcbBankVersionId.TIIME_DEFAULT, bank: 'Tiime', version: 'default', country: 'FR', type: 'neobank' },
98
- { id: RcbBankVersionId.SPENDESK_DEFAULT, bank: 'Spendesk', version: 'default', country: 'FR', type: 'fintech' },
99
- { id: RcbBankVersionId.SWAN_DEFAULT, bank: 'Swan', version: 'default', country: 'FR', type: 'fintech' },
100
- { id: RcbBankVersionId.N26_DEFAULT, bank: 'N26', version: 'default', country: 'EU', type: 'neobank' },
101
- { id: RcbBankVersionId.REVOLUT_DEFAULT, bank: 'Revolut', version: 'default', country: 'EU', type: 'neobank' },
102
- { id: RcbBankVersionId.WISE_DEFAULT, bank: 'Wise', version: 'default', country: 'INTL', type: 'fintech' },
103
- { id: RcbBankVersionId.PAYPAL_DEFAULT, bank: 'PayPal', version: 'default', country: 'INTL', type: 'fintech' },
104
- { id: RcbBankVersionId.AIRWALLEX_DEFAULT, bank: 'Airwallex', version: 'default', country: 'INTL', type: 'fintech' },
105
- { id: RcbBankVersionId.VIVA_WALLET_DEFAULT, bank: 'Viva Wallet', version: 'default', country: 'EU', type: 'fintech' },
208
+ {
209
+ id: RcbBankVersionId.QONTO_DEFAULT,
210
+ bank: 'Qonto',
211
+ version: 'default',
212
+ country: 'FR',
213
+ type: 'neobank',
214
+ },
215
+ {
216
+ id: RcbBankVersionId.SHINE_DEFAULT,
217
+ bank: 'Shine',
218
+ version: 'default',
219
+ country: 'FR',
220
+ type: 'neobank',
221
+ },
222
+ {
223
+ id: RcbBankVersionId.FINOM_DEFAULT,
224
+ bank: 'Finom',
225
+ version: 'default',
226
+ country: 'EU',
227
+ type: 'neobank',
228
+ },
229
+ {
230
+ id: RcbBankVersionId.TIIME_DEFAULT,
231
+ bank: 'Tiime',
232
+ version: 'default',
233
+ country: 'FR',
234
+ type: 'neobank',
235
+ },
236
+ {
237
+ id: RcbBankVersionId.SPENDESK_DEFAULT,
238
+ bank: 'Spendesk',
239
+ version: 'default',
240
+ country: 'FR',
241
+ type: 'fintech',
242
+ },
243
+ {
244
+ id: RcbBankVersionId.SWAN_DEFAULT,
245
+ bank: 'Swan',
246
+ version: 'default',
247
+ country: 'FR',
248
+ type: 'fintech',
249
+ },
250
+ {
251
+ id: RcbBankVersionId.N26_DEFAULT,
252
+ bank: 'N26',
253
+ version: 'default',
254
+ country: 'EU',
255
+ type: 'neobank',
256
+ },
257
+ {
258
+ id: RcbBankVersionId.REVOLUT_DEFAULT,
259
+ bank: 'Revolut',
260
+ version: 'default',
261
+ country: 'EU',
262
+ type: 'neobank',
263
+ },
264
+ {
265
+ id: RcbBankVersionId.WISE_DEFAULT,
266
+ bank: 'Wise',
267
+ version: 'default',
268
+ country: 'INTL',
269
+ type: 'fintech',
270
+ },
271
+ {
272
+ id: RcbBankVersionId.PAYPAL_DEFAULT,
273
+ bank: 'PayPal',
274
+ version: 'default',
275
+ country: 'INTL',
276
+ type: 'fintech',
277
+ },
278
+ {
279
+ id: RcbBankVersionId.AIRWALLEX_DEFAULT,
280
+ bank: 'Airwallex',
281
+ version: 'default',
282
+ country: 'INTL',
283
+ type: 'fintech',
284
+ },
285
+ {
286
+ id: RcbBankVersionId.VIVA_WALLET_DEFAULT,
287
+ bank: 'Viva Wallet',
288
+ version: 'default',
289
+ country: 'EU',
290
+ type: 'fintech',
291
+ },
106
292
 
107
293
  // ─── International retail / corporate ─────
108
- { id: RcbBankVersionId.HSBC_DEFAULT, bank: 'HSBC', version: 'default', country: 'FR', type: 'retail' },
109
- { id: RcbBankVersionId.HSBC_UK_DEFAULT, bank: 'HSBC UK', version: 'default', country: 'UK', type: 'retail' },
110
- { id: RcbBankVersionId.UBS_DEFAULT, bank: 'UBS', version: 'default', country: 'CH', type: 'corporate' },
111
- { id: RcbBankVersionId.CAIXA_DEFAULT, bank: 'Caixa', version: 'default', country: 'PT', type: 'retail' },
112
- { id: RcbBankVersionId.JPMORGAN_DEFAULT, bank: 'JPMorgan', version: 'default', country: 'US', type: 'corporate' },
294
+ {
295
+ id: RcbBankVersionId.HSBC_DEFAULT,
296
+ bank: 'HSBC',
297
+ version: 'default',
298
+ country: 'FR',
299
+ type: 'retail',
300
+ },
301
+ {
302
+ id: RcbBankVersionId.HSBC_UK_DEFAULT,
303
+ bank: 'HSBC UK',
304
+ version: 'default',
305
+ country: 'UK',
306
+ type: 'retail',
307
+ },
308
+ {
309
+ id: RcbBankVersionId.UBS_DEFAULT,
310
+ bank: 'UBS',
311
+ version: 'default',
312
+ country: 'CH',
313
+ type: 'corporate',
314
+ },
315
+ {
316
+ id: RcbBankVersionId.CAIXA_DEFAULT,
317
+ bank: 'Caixa',
318
+ version: 'default',
319
+ country: 'PT',
320
+ type: 'retail',
321
+ },
322
+ {
323
+ id: RcbBankVersionId.JPMORGAN_DEFAULT,
324
+ bank: 'JPMorgan',
325
+ version: 'default',
326
+ country: 'US',
327
+ type: 'corporate',
328
+ },
113
329
  ];
114
330
 
115
331
  /**
116
332
  * Lookup by id (typed). Returns undefined for unknown ids — callers should
117
333
  * treat that as "use auto mode" rather than crash.
118
334
  */
119
- export function getRcbBankCatalogueEntry(
120
- id: string,
121
- ): RcbBankCatalogueEntry | undefined {
335
+ export function getRcbBankCatalogueEntry(id: string): RcbBankCatalogueEntry | undefined {
122
336
  return RCB_BANK_CATALOGUE.find((e) => e.id === id);
123
337
  }
124
338