@dakkitor/api-contracts 1.1.154 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/dist/abilities/abilities.contract.d.ts +53 -1
  2. package/dist/abilities/abilities.contract.d.ts.map +1 -1
  3. package/dist/abilities/abilities.contract.js +92 -1
  4. package/dist/abilities/abilities.contract.spec.d.ts +2 -0
  5. package/dist/abilities/abilities.contract.spec.d.ts.map +1 -0
  6. package/dist/abilities/abilities.contract.spec.js +145 -0
  7. package/dist/abilities/admin-dashboard.abilities.test.d.ts +2 -0
  8. package/dist/abilities/admin-dashboard.abilities.test.d.ts.map +1 -0
  9. package/dist/abilities/admin-dashboard.abilities.test.js +33 -0
  10. package/dist/abilities/admin.abilities.json +19 -0
  11. package/dist/abilities/bot.abilities.json +13 -4
  12. package/dist/abilities/first-agent.abilities.json +317 -70
  13. package/dist/abilities/interconnection.abilities.json +75 -0
  14. package/dist/abilities/kpi.abilities.json +68 -0
  15. package/dist/abilities/office-manager.abilities.json +111 -0
  16. package/dist/abilities/second-agent.abilities.json +417 -43
  17. package/dist/abilities/team-leads.json +71 -6
  18. package/dist/abilities/worker-curator.abilities.json +233 -0
  19. package/dist/actives/actives.contract.d.ts +19379 -23651
  20. package/dist/actives/actives.contract.d.ts.map +1 -1
  21. package/dist/actives/actives.contract.js +517 -114
  22. package/dist/agent-client-links/agent-client-links.contract.d.ts +1431 -291
  23. package/dist/agent-client-links/agent-client-links.contract.d.ts.map +1 -1
  24. package/dist/auth/auth.contract.d.ts +1050 -81
  25. package/dist/auth/auth.contract.d.ts.map +1 -1
  26. package/dist/auth/auth.contract.js +115 -3
  27. package/dist/bookings/booking-worker-summary.spec.d.ts +2 -0
  28. package/dist/bookings/booking-worker-summary.spec.d.ts.map +1 -0
  29. package/dist/bookings/booking-worker-summary.spec.js +25 -0
  30. package/dist/bookings/bookings.contract.d.ts +20643 -26117
  31. package/dist/bookings/bookings.contract.d.ts.map +1 -1
  32. package/dist/bookings/bookings.contract.js +383 -91
  33. package/dist/bookings/bookings.contract.spec.d.ts +2 -0
  34. package/dist/bookings/bookings.contract.spec.d.ts.map +1 -0
  35. package/dist/bookings/bookings.contract.spec.js +11 -0
  36. package/dist/bookings/job-lock.spec.d.ts +2 -0
  37. package/dist/bookings/job-lock.spec.d.ts.map +1 -0
  38. package/dist/bookings/job-lock.spec.js +56 -0
  39. package/dist/bot-parse-cache/bot-parse-cache.contract.d.ts +232 -0
  40. package/dist/bot-parse-cache/bot-parse-cache.contract.d.ts.map +1 -0
  41. package/dist/bot-parse-cache/bot-parse-cache.contract.js +64 -0
  42. package/dist/call-history/call-history.contract.d.ts +1336 -767
  43. package/dist/call-history/call-history.contract.d.ts.map +1 -1
  44. package/dist/call-history/call-history.contract.js +86 -10
  45. package/dist/calls-feed/calls-feed.contract.d.ts +417 -0
  46. package/dist/calls-feed/calls-feed.contract.d.ts.map +1 -0
  47. package/dist/calls-feed/calls-feed.contract.js +32 -0
  48. package/dist/client-contacts/client-contacts.contract.d.ts +410 -226
  49. package/dist/client-contacts/client-contacts.contract.d.ts.map +1 -1
  50. package/dist/client-contacts/client-contacts.contract.js +35 -4
  51. package/dist/clients/clients.contract.d.ts +227 -73
  52. package/dist/clients/clients.contract.d.ts.map +1 -1
  53. package/dist/clients/clients.contract.js +45 -21
  54. package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +2908 -1834
  55. package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts.map +1 -1
  56. package/dist/collaboration-checkings/collaboration-checkings.contract.js +14 -9
  57. package/dist/collaborations/collaborations.contract.d.ts +2676 -1409
  58. package/dist/collaborations/collaborations.contract.d.ts.map +1 -1
  59. package/dist/collaborations/collaborations.contract.js +33 -9
  60. package/dist/common/call-rating.schema.d.ts.map +1 -1
  61. package/dist/common/call-rating.schema.js +4 -2
  62. package/dist/common/common-schemas.d.ts +59 -11
  63. package/dist/common/common-schemas.d.ts.map +1 -1
  64. package/dist/common/common-schemas.js +55 -29
  65. package/dist/common/error-schemas.d.ts +2 -2
  66. package/dist/common/pagination-query.schema.d.ts +13 -2
  67. package/dist/common/pagination-query.schema.d.ts.map +1 -1
  68. package/dist/common/pagination-query.schema.js +21 -2
  69. package/dist/common/pagination-query.schema.spec.d.ts +2 -0
  70. package/dist/common/pagination-query.schema.spec.d.ts.map +1 -0
  71. package/dist/common/pagination-query.schema.spec.js +53 -0
  72. package/dist/companies/companies.contract.d.ts +53 -28
  73. package/dist/companies/companies.contract.d.ts.map +1 -1
  74. package/dist/companies/companies.contract.js +11 -10
  75. package/dist/crews/crews.contract.d.ts +1010 -196
  76. package/dist/crews/crews.contract.d.ts.map +1 -1
  77. package/dist/crews/crews.contract.js +98 -17
  78. package/dist/crews/crews.contract.spec.d.ts +2 -0
  79. package/dist/crews/crews.contract.spec.d.ts.map +1 -0
  80. package/dist/crews/crews.contract.spec.js +67 -0
  81. package/dist/cron-executions/cron-executions.contract.d.ts +988 -59
  82. package/dist/cron-executions/cron-executions.contract.d.ts.map +1 -1
  83. package/dist/cron-executions/cron-executions.contract.js +127 -7
  84. package/dist/curated-worker-leads/__tests__/disposition-reason.spec.d.ts +2 -0
  85. package/dist/curated-worker-leads/__tests__/disposition-reason.spec.d.ts.map +1 -0
  86. package/dist/curated-worker-leads/__tests__/disposition-reason.spec.js +40 -0
  87. package/dist/curated-worker-leads/candidate-coordination-snapshot.spec.d.ts +2 -0
  88. package/dist/curated-worker-leads/candidate-coordination-snapshot.spec.d.ts.map +1 -0
  89. package/dist/curated-worker-leads/candidate-coordination-snapshot.spec.js +16 -0
  90. package/dist/curated-worker-leads/candidate-coordination.contract.d.ts +21650 -0
  91. package/dist/curated-worker-leads/candidate-coordination.contract.d.ts.map +1 -0
  92. package/dist/curated-worker-leads/candidate-coordination.contract.js +921 -0
  93. package/dist/curated-worker-leads/candidate-coordination.contract.spec.d.ts +2 -0
  94. package/dist/curated-worker-leads/candidate-coordination.contract.spec.d.ts.map +1 -0
  95. package/dist/curated-worker-leads/candidate-coordination.contract.spec.js +51 -0
  96. package/dist/curated-worker-leads/candidate-edit-session.contract.d.ts +2364 -0
  97. package/dist/curated-worker-leads/candidate-edit-session.contract.d.ts.map +1 -0
  98. package/dist/curated-worker-leads/candidate-edit-session.contract.js +173 -0
  99. package/dist/curated-worker-leads/consent-queue.contract.d.ts +4497 -0
  100. package/dist/curated-worker-leads/consent-queue.contract.d.ts.map +1 -0
  101. package/dist/curated-worker-leads/consent-queue.contract.js +201 -0
  102. package/dist/curated-worker-leads/contact-history.spec.d.ts +2 -0
  103. package/dist/curated-worker-leads/contact-history.spec.d.ts.map +1 -0
  104. package/dist/curated-worker-leads/contact-history.spec.js +88 -0
  105. package/dist/curated-worker-leads/contact-session.contract.spec.d.ts +2 -0
  106. package/dist/curated-worker-leads/contact-session.contract.spec.d.ts.map +1 -0
  107. package/dist/curated-worker-leads/contact-session.contract.spec.js +315 -0
  108. package/dist/curated-worker-leads/curated-worker-lead-config.contract.d.ts +489 -0
  109. package/dist/curated-worker-leads/curated-worker-lead-config.contract.d.ts.map +1 -0
  110. package/dist/curated-worker-leads/curated-worker-lead-config.contract.js +88 -0
  111. package/dist/curated-worker-leads/curated-worker-leads.contract.d.ts +135 -0
  112. package/dist/curated-worker-leads/curated-worker-leads.contract.d.ts.map +1 -0
  113. package/dist/curated-worker-leads/curated-worker-leads.contract.js +32 -0
  114. package/dist/curated-worker-leads/job-candidate-cards.spec.d.ts +2 -0
  115. package/dist/curated-worker-leads/job-candidate-cards.spec.d.ts.map +1 -0
  116. package/dist/curated-worker-leads/job-candidate-cards.spec.js +157 -0
  117. package/dist/curated-worker-leads/job-candidates.spec.d.ts +2 -0
  118. package/dist/curated-worker-leads/job-candidates.spec.d.ts.map +1 -0
  119. package/dist/curated-worker-leads/job-candidates.spec.js +140 -0
  120. package/dist/curated-worker-leads/job-feed-match-counts.contract.spec.d.ts +2 -0
  121. package/dist/curated-worker-leads/job-feed-match-counts.contract.spec.d.ts.map +1 -0
  122. package/dist/curated-worker-leads/job-feed-match-counts.contract.spec.js +19 -0
  123. package/dist/curated-worker-leads/jobs-tab.contract.d.ts +18365 -0
  124. package/dist/curated-worker-leads/jobs-tab.contract.d.ts.map +1 -0
  125. package/dist/curated-worker-leads/jobs-tab.contract.js +642 -0
  126. package/dist/curated-worker-leads/lead-agent-area.contract.d.ts +348 -0
  127. package/dist/curated-worker-leads/lead-agent-area.contract.d.ts.map +1 -0
  128. package/dist/curated-worker-leads/lead-agent-area.contract.js +51 -0
  129. package/dist/curated-worker-leads/owned-jobs-tab.contract.d.ts +1116 -0
  130. package/dist/curated-worker-leads/owned-jobs-tab.contract.d.ts.map +1 -0
  131. package/dist/curated-worker-leads/owned-jobs-tab.contract.js +93 -0
  132. package/dist/curated-workers/curated-filter-additions.spec.d.ts +2 -0
  133. package/dist/curated-workers/curated-filter-additions.spec.d.ts.map +1 -0
  134. package/dist/curated-workers/curated-filter-additions.spec.js +17 -0
  135. package/dist/curated-workers/curated-job-seeking.spec.d.ts +2 -0
  136. package/dist/curated-workers/curated-job-seeking.spec.d.ts.map +1 -0
  137. package/dist/curated-workers/curated-job-seeking.spec.js +53 -0
  138. package/dist/curated-workers/curated-workers-id-documents.spec.d.ts +2 -0
  139. package/dist/curated-workers/curated-workers-id-documents.spec.d.ts.map +1 -0
  140. package/dist/curated-workers/curated-workers-id-documents.spec.js +38 -0
  141. package/dist/curated-workers/curated-workers.contract.d.ts +6160 -1906
  142. package/dist/curated-workers/curated-workers.contract.d.ts.map +1 -1
  143. package/dist/curated-workers/curated-workers.contract.js +333 -51
  144. package/dist/dashboards/agent-daily-metrics.contract.d.ts +10 -10
  145. package/dist/dashboards/agent-daily-metrics.contract.js +1 -1
  146. package/dist/dashboards/dashboard-widgets.contract.d.ts +3800 -496
  147. package/dist/dashboards/dashboard-widgets.contract.d.ts.map +1 -1
  148. package/dist/dashboards/dashboard-widgets.contract.js +527 -29
  149. package/dist/dashboards/dashboard.contract.d.ts +8 -8
  150. package/dist/document-intake/document-intake.contract.d.ts +3132 -0
  151. package/dist/document-intake/document-intake.contract.d.ts.map +1 -0
  152. package/dist/document-intake/document-intake.contract.js +418 -0
  153. package/dist/export-jobs/export-jobs.contract.d.ts +3918 -0
  154. package/dist/export-jobs/export-jobs.contract.d.ts.map +1 -0
  155. package/dist/export-jobs/export-jobs.contract.js +240 -0
  156. package/dist/exports-events/exports-events.schemas.d.ts +90 -0
  157. package/dist/exports-events/exports-events.schemas.d.ts.map +1 -0
  158. package/dist/exports-events/exports-events.schemas.js +56 -0
  159. package/dist/files/files.contract.d.ts +133 -126
  160. package/dist/files/files.contract.d.ts.map +1 -1
  161. package/dist/files/files.contract.js +8 -0
  162. package/dist/health/health.contract.d.ts +4 -4
  163. package/dist/index.d.ts +82 -0
  164. package/dist/index.d.ts.map +1 -1
  165. package/dist/index.js +87 -1
  166. package/dist/interactions/interactions.contract.d.ts +162 -0
  167. package/dist/interactions/interactions.contract.d.ts.map +1 -0
  168. package/dist/interactions/interactions.contract.js +42 -0
  169. package/dist/job-clusters/job-clusters.contract.d.ts +1584 -0
  170. package/dist/job-clusters/job-clusters.contract.d.ts.map +1 -0
  171. package/dist/job-clusters/job-clusters.contract.js +133 -0
  172. package/dist/jobs/jobs.contract.d.ts +16517 -8495
  173. package/dist/jobs/jobs.contract.d.ts.map +1 -1
  174. package/dist/jobs/jobs.contract.js +394 -190
  175. package/dist/jobs/jobs.contract.spec.d.ts +2 -0
  176. package/dist/jobs/jobs.contract.spec.d.ts.map +1 -0
  177. package/dist/jobs/jobs.contract.spec.js +70 -0
  178. package/dist/kpi-impersonation/kpi-impersonation.contract.d.ts +75 -75
  179. package/dist/lead-assignments/lead-assignments.contract.d.ts +2933 -1122
  180. package/dist/lead-assignments/lead-assignments.contract.d.ts.map +1 -1
  181. package/dist/lead-assignments/lead-assignments.contract.js +29 -7
  182. package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +328 -64
  183. package/dist/lead-distribution/agent-lead-distribution.contract.d.ts.map +1 -1
  184. package/dist/lead-distribution/agent-lead-distribution.contract.js +1 -1
  185. package/dist/lead-distribution/lead-distribution-config.contract.d.ts +31 -31
  186. package/dist/leads/leads.contract.d.ts +830 -368
  187. package/dist/leads/leads.contract.d.ts.map +1 -1
  188. package/dist/leads/leads.contract.js +106 -26
  189. package/dist/locations/locations.contract.d.ts +36 -36
  190. package/dist/notifications/notifications.contract.d.ts +1039 -0
  191. package/dist/notifications/notifications.contract.d.ts.map +1 -0
  192. package/dist/notifications/notifications.contract.js +110 -0
  193. package/dist/offices/offices.contract.d.ts +210 -60
  194. package/dist/offices/offices.contract.d.ts.map +1 -1
  195. package/dist/offices/offices.contract.js +18 -4
  196. package/dist/outreach/__tests__/outreach-claim.test.d.ts +2 -0
  197. package/dist/outreach/__tests__/outreach-claim.test.d.ts.map +1 -0
  198. package/dist/outreach/__tests__/outreach-claim.test.js +97 -0
  199. package/dist/outreach/__tests__/outreach-confirm-release.test.d.ts +2 -0
  200. package/dist/outreach/__tests__/outreach-confirm-release.test.d.ts.map +1 -0
  201. package/dist/outreach/__tests__/outreach-confirm-release.test.js +98 -0
  202. package/dist/outreach/__tests__/outreach-routes.test.d.ts +2 -0
  203. package/dist/outreach/__tests__/outreach-routes.test.d.ts.map +1 -0
  204. package/dist/outreach/__tests__/outreach-routes.test.js +57 -0
  205. package/dist/outreach/__tests__/outreach.schemas.test.d.ts +2 -0
  206. package/dist/outreach/__tests__/outreach.schemas.test.d.ts.map +1 -0
  207. package/dist/outreach/__tests__/outreach.schemas.test.js +140 -0
  208. package/dist/outreach/outreach.contract.d.ts +809 -0
  209. package/dist/outreach/outreach.contract.d.ts.map +1 -0
  210. package/dist/outreach/outreach.contract.js +195 -0
  211. package/dist/outreach/outreach.schemas.d.ts +113 -0
  212. package/dist/outreach/outreach.schemas.d.ts.map +1 -0
  213. package/dist/outreach/outreach.schemas.js +132 -0
  214. package/dist/own-research/own-research.contract.d.ts +1356 -552
  215. package/dist/own-research/own-research.contract.d.ts.map +1 -1
  216. package/dist/own-research/own-research.contract.js +14 -3
  217. package/dist/postcodes/postcodes.contract.d.ts +16 -16
  218. package/dist/proofs/proof-category.enum.d.ts +4 -0
  219. package/dist/proofs/proof-category.enum.d.ts.map +1 -0
  220. package/dist/proofs/proof-category.enum.js +5 -0
  221. package/dist/proofs/proof-entity-type.enum.d.ts +4 -0
  222. package/dist/proofs/proof-entity-type.enum.d.ts.map +1 -0
  223. package/dist/proofs/proof-entity-type.enum.js +5 -0
  224. package/dist/proofs/proof-type.enum.d.ts +28 -0
  225. package/dist/proofs/proof-type.enum.d.ts.map +1 -0
  226. package/dist/proofs/proof-type.enum.js +14 -0
  227. package/dist/proofs/proofs.contract.d.ts +3009 -0
  228. package/dist/proofs/proofs.contract.d.ts.map +1 -0
  229. package/dist/proofs/proofs.contract.js +92 -0
  230. package/dist/proofs/proofs.dtos.d.ts +1319 -0
  231. package/dist/proofs/proofs.dtos.d.ts.map +1 -0
  232. package/dist/proofs/proofs.dtos.js +178 -0
  233. package/dist/qualifications/qualifications.contract.d.ts +94 -94
  234. package/dist/realtime/data-changed.d.ts +21 -0
  235. package/dist/realtime/data-changed.d.ts.map +1 -0
  236. package/dist/realtime/data-changed.js +37 -0
  237. package/dist/shared/booking-history.schema.d.ts +27 -0
  238. package/dist/shared/booking-history.schema.d.ts.map +1 -0
  239. package/dist/shared/booking-history.schema.js +22 -0
  240. package/dist/shared/booking-history.spec.d.ts +2 -0
  241. package/dist/shared/booking-history.spec.d.ts.map +1 -0
  242. package/dist/shared/booking-history.spec.js +44 -0
  243. package/dist/shared/contact-suppressions.contract.d.ts +22 -0
  244. package/dist/shared/contact-suppressions.contract.d.ts.map +1 -0
  245. package/dist/shared/contact-suppressions.contract.js +13 -0
  246. package/dist/shared/live-booking.schema.d.ts +57 -0
  247. package/dist/shared/live-booking.schema.d.ts.map +1 -0
  248. package/dist/shared/live-booking.schema.js +34 -0
  249. package/dist/shared/summary-schemas.d.ts +218 -0
  250. package/dist/shared/summary-schemas.d.ts.map +1 -0
  251. package/dist/shared/summary-schemas.js +56 -0
  252. package/dist/sheets-sync/__tests__/sheets-sync-events.schemas.test.d.ts +2 -0
  253. package/dist/sheets-sync/__tests__/sheets-sync-events.schemas.test.d.ts.map +1 -0
  254. package/dist/sheets-sync/__tests__/sheets-sync-events.schemas.test.js +20 -0
  255. package/dist/sheets-sync/__tests__/tab-sync-config.schema.test.d.ts +2 -0
  256. package/dist/sheets-sync/__tests__/tab-sync-config.schema.test.d.ts.map +1 -0
  257. package/dist/sheets-sync/__tests__/tab-sync-config.schema.test.js +41 -0
  258. package/dist/sheets-sync/sheets-sync-events.schemas.d.ts +43 -0
  259. package/dist/sheets-sync/sheets-sync-events.schemas.d.ts.map +1 -0
  260. package/dist/sheets-sync/sheets-sync-events.schemas.js +29 -0
  261. package/dist/sheets-sync/sheets-sync.contract.d.ts +7258 -0
  262. package/dist/sheets-sync/sheets-sync.contract.d.ts.map +1 -0
  263. package/dist/sheets-sync/sheets-sync.contract.js +323 -0
  264. package/dist/telegram/telegram.contract.d.ts +727 -0
  265. package/dist/telegram/telegram.contract.d.ts.map +1 -0
  266. package/dist/telegram/telegram.contract.js +75 -0
  267. package/dist/trades/trade-rate-assessment.d.ts +18 -0
  268. package/dist/trades/trade-rate-assessment.d.ts.map +1 -0
  269. package/dist/trades/trade-rate-assessment.js +46 -0
  270. package/dist/trades/trade-rate-assessment.spec.d.ts +2 -0
  271. package/dist/trades/trade-rate-assessment.spec.d.ts.map +1 -0
  272. package/dist/trades/trade-rate-assessment.spec.js +223 -0
  273. package/dist/trades/trades.contract.d.ts +111 -0
  274. package/dist/trades/trades.contract.d.ts.map +1 -1
  275. package/dist/trades/trades.contract.js +49 -1
  276. package/dist/trades/trades.contract.spec.d.ts +2 -0
  277. package/dist/trades/trades.contract.spec.d.ts.map +1 -0
  278. package/dist/trades/trades.contract.spec.js +173 -0
  279. package/dist/user-access-grants/build-user-access-grant-rules.d.ts +10 -0
  280. package/dist/user-access-grants/build-user-access-grant-rules.d.ts.map +1 -0
  281. package/dist/user-access-grants/build-user-access-grant-rules.js +69 -0
  282. package/dist/user-access-grants/build-user-access-grant-rules.spec.d.ts +2 -0
  283. package/dist/user-access-grants/build-user-access-grant-rules.spec.d.ts.map +1 -0
  284. package/dist/user-access-grants/build-user-access-grant-rules.spec.js +77 -0
  285. package/dist/user-access-grants/user-access-grant-templates.json +454 -0
  286. package/dist/user-access-grants/user-access-grants.contract.d.ts +3886 -0
  287. package/dist/user-access-grants/user-access-grants.contract.d.ts.map +1 -0
  288. package/dist/user-access-grants/user-access-grants.contract.js +189 -0
  289. package/dist/user-access-grants/user-access-grants.contract.spec.d.ts +2 -0
  290. package/dist/user-access-grants/user-access-grants.contract.spec.d.ts.map +1 -0
  291. package/dist/user-access-grants/user-access-grants.contract.spec.js +149 -0
  292. package/dist/users/users.contract.d.ts +1959 -349
  293. package/dist/users/users.contract.d.ts.map +1 -1
  294. package/dist/users/users.contract.js +222 -37
  295. package/dist/users/users.contract.spec.d.ts +2 -0
  296. package/dist/users/users.contract.spec.d.ts.map +1 -0
  297. package/dist/users/users.contract.spec.js +103 -0
  298. package/dist/worker-identity-cases/worker-identity-cases.contract.d.ts +4609 -0
  299. package/dist/worker-identity-cases/worker-identity-cases.contract.d.ts.map +1 -0
  300. package/dist/worker-identity-cases/worker-identity-cases.contract.js +409 -0
  301. package/dist/worker-merge-proposals/worker-merge-proposals.contract.d.ts +1511 -0
  302. package/dist/worker-merge-proposals/worker-merge-proposals.contract.d.ts.map +1 -0
  303. package/dist/worker-merge-proposals/worker-merge-proposals.contract.js +150 -0
  304. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.contract.d.ts +1106 -0
  305. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.contract.d.ts.map +1 -0
  306. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.contract.js +85 -0
  307. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.contract.spec.d.ts +2 -0
  308. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.contract.spec.d.ts.map +1 -0
  309. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.contract.spec.js +216 -0
  310. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.schemas.d.ts +453 -0
  311. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.schemas.d.ts.map +1 -0
  312. package/dist/worker-source-identity-conflicts/worker-source-identity-conflicts.schemas.js +109 -0
  313. package/dist/workers/do-not-contact.contract.d.ts +46 -0
  314. package/dist/workers/do-not-contact.contract.d.ts.map +1 -0
  315. package/dist/workers/do-not-contact.contract.js +41 -0
  316. package/dist/workers/do-not-contact.contract.spec.d.ts +2 -0
  317. package/dist/workers/do-not-contact.contract.spec.d.ts.map +1 -0
  318. package/dist/workers/do-not-contact.contract.spec.js +47 -0
  319. package/dist/workers/duplicate-group-worker.spec.d.ts +2 -0
  320. package/dist/workers/duplicate-group-worker.spec.d.ts.map +1 -0
  321. package/dist/workers/duplicate-group-worker.spec.js +34 -0
  322. package/dist/workers/filter-exact-flags.spec.d.ts +2 -0
  323. package/dist/workers/filter-exact-flags.spec.d.ts.map +1 -0
  324. package/dist/workers/filter-exact-flags.spec.js +37 -0
  325. package/dist/workers/worker-source-attribution.contract.spec.d.ts +2 -0
  326. package/dist/workers/worker-source-attribution.contract.spec.d.ts.map +1 -0
  327. package/dist/workers/worker-source-attribution.contract.spec.js +442 -0
  328. package/dist/workers/worker-source.spec.d.ts +2 -0
  329. package/dist/workers/worker-source.spec.d.ts.map +1 -0
  330. package/dist/workers/worker-source.spec.js +13 -0
  331. package/dist/workers/worker-status-facets.spec.d.ts +2 -0
  332. package/dist/workers/worker-status-facets.spec.d.ts.map +1 -0
  333. package/dist/workers/worker-status-facets.spec.js +34 -0
  334. package/dist/workers/workers.contract.d.ts +19534 -5969
  335. package/dist/workers/workers.contract.d.ts.map +1 -1
  336. package/dist/workers/workers.contract.js +1096 -113
  337. package/dist/workers/workers.contract.spec.d.ts +2 -0
  338. package/dist/workers/workers.contract.spec.d.ts.map +1 -0
  339. package/dist/workers/workers.contract.spec.js +31 -0
  340. package/package.json +5 -4
@@ -0,0 +1,3132 @@
1
+ import { z } from 'zod';
2
+ export declare const IntakeClassificationSchema: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
3
+ export declare const IntakeDestinationSchema: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>;
4
+ export declare const IntakeStatusSchema: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
5
+ export declare const ExtractedDocumentFieldsSchema: z.ZodObject<{
6
+ documentType: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
7
+ firstName: z.ZodNullable<z.ZodString>;
8
+ lastName: z.ZodNullable<z.ZodString>;
9
+ dateOfBirth: z.ZodNullable<z.ZodString>;
10
+ expiryDate: z.ZodNullable<z.ZodString>;
11
+ issueDate: z.ZodNullable<z.ZodString>;
12
+ referenceNumber: z.ZodNullable<z.ZodString>;
13
+ shareCode: z.ZodNullable<z.ZodString>;
14
+ nationality: z.ZodNullable<z.ZodString>;
15
+ qualificationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ qualificationTypeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ qualificationIssuerText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ qualificationCardColour: z.ZodOptional<z.ZodNullable<z.ZodEnum<["green", "blue", "gold", "black", "white", "red"]>>>;
21
+ qualificationRoleText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ qualificationMatchMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["catalogue_exact", "scheme_rule", "none"]>>>;
23
+ confidence: z.ZodNumber;
24
+ }, "strip", z.ZodTypeAny, {
25
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
26
+ firstName: string | null;
27
+ lastName: string | null;
28
+ dateOfBirth: string | null;
29
+ expiryDate: string | null;
30
+ issueDate: string | null;
31
+ referenceNumber: string | null;
32
+ shareCode: string | null;
33
+ nationality: string | null;
34
+ confidence: number;
35
+ qualificationName?: string | null | undefined;
36
+ qualificationTypeName?: string | null | undefined;
37
+ qualificationId?: string | null | undefined;
38
+ qualificationTypeId?: string | null | undefined;
39
+ qualificationIssuerText?: string | null | undefined;
40
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
41
+ qualificationRoleText?: string | null | undefined;
42
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
43
+ }, {
44
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
45
+ firstName: string | null;
46
+ lastName: string | null;
47
+ dateOfBirth: string | null;
48
+ expiryDate: string | null;
49
+ issueDate: string | null;
50
+ referenceNumber: string | null;
51
+ shareCode: string | null;
52
+ nationality: string | null;
53
+ confidence: number;
54
+ qualificationName?: string | null | undefined;
55
+ qualificationTypeName?: string | null | undefined;
56
+ qualificationId?: string | null | undefined;
57
+ qualificationTypeId?: string | null | undefined;
58
+ qualificationIssuerText?: string | null | undefined;
59
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
60
+ qualificationRoleText?: string | null | undefined;
61
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
62
+ }>;
63
+ export declare const IntakeRecordResponseSchema: z.ZodObject<{
64
+ id: z.ZodString;
65
+ fileId: z.ZodString;
66
+ workerId: z.ZodNullable<z.ZodString>;
67
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
68
+ destinationSuggested: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>;
69
+ destinationFinal: z.ZodNullable<z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>>;
70
+ extracted: z.ZodNullable<z.ZodObject<{
71
+ documentType: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
72
+ firstName: z.ZodNullable<z.ZodString>;
73
+ lastName: z.ZodNullable<z.ZodString>;
74
+ dateOfBirth: z.ZodNullable<z.ZodString>;
75
+ expiryDate: z.ZodNullable<z.ZodString>;
76
+ issueDate: z.ZodNullable<z.ZodString>;
77
+ referenceNumber: z.ZodNullable<z.ZodString>;
78
+ shareCode: z.ZodNullable<z.ZodString>;
79
+ nationality: z.ZodNullable<z.ZodString>;
80
+ qualificationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
+ qualificationTypeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
+ qualificationIssuerText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
85
+ qualificationCardColour: z.ZodOptional<z.ZodNullable<z.ZodEnum<["green", "blue", "gold", "black", "white", "red"]>>>;
86
+ qualificationRoleText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ qualificationMatchMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["catalogue_exact", "scheme_rule", "none"]>>>;
88
+ confidence: z.ZodNumber;
89
+ }, "strip", z.ZodTypeAny, {
90
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
91
+ firstName: string | null;
92
+ lastName: string | null;
93
+ dateOfBirth: string | null;
94
+ expiryDate: string | null;
95
+ issueDate: string | null;
96
+ referenceNumber: string | null;
97
+ shareCode: string | null;
98
+ nationality: string | null;
99
+ confidence: number;
100
+ qualificationName?: string | null | undefined;
101
+ qualificationTypeName?: string | null | undefined;
102
+ qualificationId?: string | null | undefined;
103
+ qualificationTypeId?: string | null | undefined;
104
+ qualificationIssuerText?: string | null | undefined;
105
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
106
+ qualificationRoleText?: string | null | undefined;
107
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
108
+ }, {
109
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
110
+ firstName: string | null;
111
+ lastName: string | null;
112
+ dateOfBirth: string | null;
113
+ expiryDate: string | null;
114
+ issueDate: string | null;
115
+ referenceNumber: string | null;
116
+ shareCode: string | null;
117
+ nationality: string | null;
118
+ confidence: number;
119
+ qualificationName?: string | null | undefined;
120
+ qualificationTypeName?: string | null | undefined;
121
+ qualificationId?: string | null | undefined;
122
+ qualificationTypeId?: string | null | undefined;
123
+ qualificationIssuerText?: string | null | undefined;
124
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
125
+ qualificationRoleText?: string | null | undefined;
126
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
127
+ }>>;
128
+ confidence: z.ZodNullable<z.ZodNumber>;
129
+ overridden: z.ZodBoolean;
130
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ confidence: number | null;
133
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
134
+ id: string;
135
+ fileId: string;
136
+ workerId: string | null;
137
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
138
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
139
+ destinationFinal: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | null;
140
+ extracted: {
141
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
142
+ firstName: string | null;
143
+ lastName: string | null;
144
+ dateOfBirth: string | null;
145
+ expiryDate: string | null;
146
+ issueDate: string | null;
147
+ referenceNumber: string | null;
148
+ shareCode: string | null;
149
+ nationality: string | null;
150
+ confidence: number;
151
+ qualificationName?: string | null | undefined;
152
+ qualificationTypeName?: string | null | undefined;
153
+ qualificationId?: string | null | undefined;
154
+ qualificationTypeId?: string | null | undefined;
155
+ qualificationIssuerText?: string | null | undefined;
156
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
157
+ qualificationRoleText?: string | null | undefined;
158
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
159
+ } | null;
160
+ overridden: boolean;
161
+ }, {
162
+ confidence: number | null;
163
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
164
+ id: string;
165
+ fileId: string;
166
+ workerId: string | null;
167
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
168
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
169
+ destinationFinal: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | null;
170
+ extracted: {
171
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
172
+ firstName: string | null;
173
+ lastName: string | null;
174
+ dateOfBirth: string | null;
175
+ expiryDate: string | null;
176
+ issueDate: string | null;
177
+ referenceNumber: string | null;
178
+ shareCode: string | null;
179
+ nationality: string | null;
180
+ confidence: number;
181
+ qualificationName?: string | null | undefined;
182
+ qualificationTypeName?: string | null | undefined;
183
+ qualificationId?: string | null | undefined;
184
+ qualificationTypeId?: string | null | undefined;
185
+ qualificationIssuerText?: string | null | undefined;
186
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
187
+ qualificationRoleText?: string | null | undefined;
188
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
189
+ } | null;
190
+ overridden: boolean;
191
+ }>;
192
+ export declare const DecideIntakeSchema: z.ZodObject<{
193
+ status: z.ZodEnum<["APPLIED", "DISCARDED"]>;
194
+ destinationFinal: z.ZodOptional<z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>>;
195
+ changedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
196
+ from: z.ZodUnknown;
197
+ to: z.ZodUnknown;
198
+ }, "strip", z.ZodTypeAny, {
199
+ from?: unknown;
200
+ to?: unknown;
201
+ }, {
202
+ from?: unknown;
203
+ to?: unknown;
204
+ }>>>;
205
+ workerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
+ }, "strip", z.ZodTypeAny, {
207
+ status: "APPLIED" | "DISCARDED";
208
+ workerId?: string | null | undefined;
209
+ destinationFinal?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | undefined;
210
+ changedFields?: Record<string, {
211
+ from?: unknown;
212
+ to?: unknown;
213
+ }> | undefined;
214
+ }, {
215
+ status: "APPLIED" | "DISCARDED";
216
+ workerId?: string | null | undefined;
217
+ destinationFinal?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | undefined;
218
+ changedFields?: Record<string, {
219
+ from?: unknown;
220
+ to?: unknown;
221
+ }> | undefined;
222
+ }>;
223
+ export declare const IntakeSourceTypeSchema: z.ZodEnum<["DROPZONE", "WORKER_ID_DOCUMENT", "CURATED_ID_DOCUMENT", "QUALIFICATION_PROOF"]>;
224
+ export declare const BackfillSubjectTypeSchema: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
225
+ export declare const BackfillPendingKindSchema: z.ZodEnum<["NAME", "FILL", "REROUTE"]>;
226
+ export declare const BackfillSubjectSummarySchema: z.ZodObject<{
227
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
228
+ subjectId: z.ZodString;
229
+ subjectName: z.ZodString;
230
+ documentCount: z.ZodNumber;
231
+ pendingKinds: z.ZodArray<z.ZodEnum<["NAME", "FILL", "REROUTE"]>, "many">;
232
+ oldestDocumentAt: z.ZodString;
233
+ }, "strip", z.ZodTypeAny, {
234
+ subjectType: "WORKER" | "CURATED_WORKER";
235
+ subjectId: string;
236
+ subjectName: string;
237
+ documentCount: number;
238
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
239
+ oldestDocumentAt: string;
240
+ }, {
241
+ subjectType: "WORKER" | "CURATED_WORKER";
242
+ subjectId: string;
243
+ subjectName: string;
244
+ documentCount: number;
245
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
246
+ oldestDocumentAt: string;
247
+ }>;
248
+ export declare const BackfillSubjectListSchema: z.ZodObject<{
249
+ items: z.ZodArray<z.ZodObject<{
250
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
251
+ subjectId: z.ZodString;
252
+ subjectName: z.ZodString;
253
+ documentCount: z.ZodNumber;
254
+ pendingKinds: z.ZodArray<z.ZodEnum<["NAME", "FILL", "REROUTE"]>, "many">;
255
+ oldestDocumentAt: z.ZodString;
256
+ }, "strip", z.ZodTypeAny, {
257
+ subjectType: "WORKER" | "CURATED_WORKER";
258
+ subjectId: string;
259
+ subjectName: string;
260
+ documentCount: number;
261
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
262
+ oldestDocumentAt: string;
263
+ }, {
264
+ subjectType: "WORKER" | "CURATED_WORKER";
265
+ subjectId: string;
266
+ subjectName: string;
267
+ documentCount: number;
268
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
269
+ oldestDocumentAt: string;
270
+ }>, "many">;
271
+ totalCount: z.ZodNumber;
272
+ totalPages: z.ZodNumber;
273
+ page: z.ZodNumber;
274
+ limit: z.ZodNumber;
275
+ }, "strip", z.ZodTypeAny, {
276
+ items: {
277
+ subjectType: "WORKER" | "CURATED_WORKER";
278
+ subjectId: string;
279
+ subjectName: string;
280
+ documentCount: number;
281
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
282
+ oldestDocumentAt: string;
283
+ }[];
284
+ totalCount: number;
285
+ totalPages: number;
286
+ page: number;
287
+ limit: number;
288
+ }, {
289
+ items: {
290
+ subjectType: "WORKER" | "CURATED_WORKER";
291
+ subjectId: string;
292
+ subjectName: string;
293
+ documentCount: number;
294
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
295
+ oldestDocumentAt: string;
296
+ }[];
297
+ totalCount: number;
298
+ totalPages: number;
299
+ page: number;
300
+ limit: number;
301
+ }>;
302
+ export declare const BackfillSubjectQuerySchema: z.ZodObject<{
303
+ page: z.ZodDefault<z.ZodNumber>;
304
+ limit: z.ZodDefault<z.ZodNumber>;
305
+ search: z.ZodOptional<z.ZodString>;
306
+ subjectType: z.ZodOptional<z.ZodEnum<["WORKER", "CURATED_WORKER"]>>;
307
+ pendingKinds: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["NAME", "FILL", "REROUTE"]>, z.ZodArray<z.ZodEnum<["NAME", "FILL", "REROUTE"]>, "many">]>>, ("NAME" | "FILL" | "REROUTE")[] | undefined, "NAME" | "FILL" | "REROUTE" | ("NAME" | "FILL" | "REROUTE")[] | undefined>;
308
+ subjectIds: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>, string[] | undefined, string | string[] | undefined>;
309
+ }, "strip", z.ZodTypeAny, {
310
+ page: number;
311
+ limit: number;
312
+ subjectType?: "WORKER" | "CURATED_WORKER" | undefined;
313
+ pendingKinds?: ("NAME" | "FILL" | "REROUTE")[] | undefined;
314
+ search?: string | undefined;
315
+ subjectIds?: string[] | undefined;
316
+ }, {
317
+ subjectType?: "WORKER" | "CURATED_WORKER" | undefined;
318
+ pendingKinds?: "NAME" | "FILL" | "REROUTE" | ("NAME" | "FILL" | "REROUTE")[] | undefined;
319
+ page?: number | undefined;
320
+ limit?: number | undefined;
321
+ search?: string | undefined;
322
+ subjectIds?: string | string[] | undefined;
323
+ }>;
324
+ export declare const BackfillCandidateSchema: z.ZodObject<{
325
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
326
+ subjectId: z.ZodString;
327
+ name: z.ZodString;
328
+ email: z.ZodNullable<z.ZodString>;
329
+ unprocessedCount: z.ZodNumber;
330
+ }, "strip", z.ZodTypeAny, {
331
+ subjectType: "WORKER" | "CURATED_WORKER";
332
+ subjectId: string;
333
+ name: string;
334
+ email: string | null;
335
+ unprocessedCount: number;
336
+ }, {
337
+ subjectType: "WORKER" | "CURATED_WORKER";
338
+ subjectId: string;
339
+ name: string;
340
+ email: string | null;
341
+ unprocessedCount: number;
342
+ }>;
343
+ export declare const BackfillCandidateListSchema: z.ZodObject<{
344
+ items: z.ZodArray<z.ZodObject<{
345
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
346
+ subjectId: z.ZodString;
347
+ name: z.ZodString;
348
+ email: z.ZodNullable<z.ZodString>;
349
+ unprocessedCount: z.ZodNumber;
350
+ }, "strip", z.ZodTypeAny, {
351
+ subjectType: "WORKER" | "CURATED_WORKER";
352
+ subjectId: string;
353
+ name: string;
354
+ email: string | null;
355
+ unprocessedCount: number;
356
+ }, {
357
+ subjectType: "WORKER" | "CURATED_WORKER";
358
+ subjectId: string;
359
+ name: string;
360
+ email: string | null;
361
+ unprocessedCount: number;
362
+ }>, "many">;
363
+ }, "strip", z.ZodTypeAny, {
364
+ items: {
365
+ subjectType: "WORKER" | "CURATED_WORKER";
366
+ subjectId: string;
367
+ name: string;
368
+ email: string | null;
369
+ unprocessedCount: number;
370
+ }[];
371
+ }, {
372
+ items: {
373
+ subjectType: "WORKER" | "CURATED_WORKER";
374
+ subjectId: string;
375
+ name: string;
376
+ email: string | null;
377
+ unprocessedCount: number;
378
+ }[];
379
+ }>;
380
+ export declare const BackfillCandidateQuerySchema: z.ZodObject<{
381
+ name: z.ZodOptional<z.ZodString>;
382
+ subjectTypes: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["WORKER", "CURATED_WORKER"]>, z.ZodArray<z.ZodEnum<["WORKER", "CURATED_WORKER"]>, "many">]>>, ("WORKER" | "CURATED_WORKER")[] | undefined, "WORKER" | "CURATED_WORKER" | ("WORKER" | "CURATED_WORKER")[] | undefined>;
383
+ }, "strip", z.ZodTypeAny, {
384
+ name?: string | undefined;
385
+ subjectTypes?: ("WORKER" | "CURATED_WORKER")[] | undefined;
386
+ }, {
387
+ name?: string | undefined;
388
+ subjectTypes?: "WORKER" | "CURATED_WORKER" | ("WORKER" | "CURATED_WORKER")[] | undefined;
389
+ }>;
390
+ export declare const DocumentBackfillJobItemStatusSchema: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
391
+ export declare const DocumentBackfillJobItemSchema: z.ZodObject<{
392
+ workerId: z.ZodString;
393
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
394
+ scanned: z.ZodNumber;
395
+ queuedForReview: z.ZodNumber;
396
+ failed: z.ZodNumber;
397
+ error: z.ZodNullable<z.ZodString>;
398
+ }, "strip", z.ZodTypeAny, {
399
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
400
+ workerId: string;
401
+ scanned: number;
402
+ queuedForReview: number;
403
+ failed: number;
404
+ error: string | null;
405
+ }, {
406
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
407
+ workerId: string;
408
+ scanned: number;
409
+ queuedForReview: number;
410
+ failed: number;
411
+ error: string | null;
412
+ }>;
413
+ export declare const CuratedDocumentBackfillJobItemSchema: z.ZodObject<{
414
+ curatedWorkerId: z.ZodString;
415
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
416
+ scanned: z.ZodNumber;
417
+ queuedForReview: z.ZodNumber;
418
+ failed: z.ZodNumber;
419
+ error: z.ZodNullable<z.ZodString>;
420
+ }, "strip", z.ZodTypeAny, {
421
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
422
+ scanned: number;
423
+ queuedForReview: number;
424
+ failed: number;
425
+ error: string | null;
426
+ curatedWorkerId: string;
427
+ }, {
428
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
429
+ scanned: number;
430
+ queuedForReview: number;
431
+ failed: number;
432
+ error: string | null;
433
+ curatedWorkerId: string;
434
+ }>;
435
+ export declare const DocumentBackfillJobSchema: z.ZodObject<{
436
+ id: z.ZodString;
437
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
438
+ createdAt: z.ZodString;
439
+ startedAt: z.ZodNullable<z.ZodString>;
440
+ finishedAt: z.ZodNullable<z.ZodString>;
441
+ workers: z.ZodArray<z.ZodObject<{
442
+ workerId: z.ZodString;
443
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
444
+ scanned: z.ZodNumber;
445
+ queuedForReview: z.ZodNumber;
446
+ failed: z.ZodNumber;
447
+ error: z.ZodNullable<z.ZodString>;
448
+ }, "strip", z.ZodTypeAny, {
449
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
450
+ workerId: string;
451
+ scanned: number;
452
+ queuedForReview: number;
453
+ failed: number;
454
+ error: string | null;
455
+ }, {
456
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
457
+ workerId: string;
458
+ scanned: number;
459
+ queuedForReview: number;
460
+ failed: number;
461
+ error: string | null;
462
+ }>, "many">;
463
+ curatedWorkers: z.ZodDefault<z.ZodArray<z.ZodObject<{
464
+ curatedWorkerId: z.ZodString;
465
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
466
+ scanned: z.ZodNumber;
467
+ queuedForReview: z.ZodNumber;
468
+ failed: z.ZodNumber;
469
+ error: z.ZodNullable<z.ZodString>;
470
+ }, "strip", z.ZodTypeAny, {
471
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
472
+ scanned: number;
473
+ queuedForReview: number;
474
+ failed: number;
475
+ error: string | null;
476
+ curatedWorkerId: string;
477
+ }, {
478
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
479
+ scanned: number;
480
+ queuedForReview: number;
481
+ failed: number;
482
+ error: string | null;
483
+ curatedWorkerId: string;
484
+ }>, "many">>;
485
+ }, "strip", z.ZodTypeAny, {
486
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
487
+ id: string;
488
+ createdAt: string;
489
+ startedAt: string | null;
490
+ finishedAt: string | null;
491
+ workers: {
492
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
493
+ workerId: string;
494
+ scanned: number;
495
+ queuedForReview: number;
496
+ failed: number;
497
+ error: string | null;
498
+ }[];
499
+ curatedWorkers: {
500
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
501
+ scanned: number;
502
+ queuedForReview: number;
503
+ failed: number;
504
+ error: string | null;
505
+ curatedWorkerId: string;
506
+ }[];
507
+ }, {
508
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
509
+ id: string;
510
+ createdAt: string;
511
+ startedAt: string | null;
512
+ finishedAt: string | null;
513
+ workers: {
514
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
515
+ workerId: string;
516
+ scanned: number;
517
+ queuedForReview: number;
518
+ failed: number;
519
+ error: string | null;
520
+ }[];
521
+ curatedWorkers?: {
522
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
523
+ scanned: number;
524
+ queuedForReview: number;
525
+ failed: number;
526
+ error: string | null;
527
+ curatedWorkerId: string;
528
+ }[] | undefined;
529
+ }>;
530
+ export declare const StartDocumentBackfillJobSchema: z.ZodEffects<z.ZodObject<{
531
+ workerIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
532
+ curatedWorkerIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
533
+ }, "strip", z.ZodTypeAny, {
534
+ workerIds?: string[] | undefined;
535
+ curatedWorkerIds?: string[] | undefined;
536
+ }, {
537
+ workerIds?: string[] | undefined;
538
+ curatedWorkerIds?: string[] | undefined;
539
+ }>, {
540
+ workerIds?: string[] | undefined;
541
+ curatedWorkerIds?: string[] | undefined;
542
+ }, {
543
+ workerIds?: string[] | undefined;
544
+ curatedWorkerIds?: string[] | undefined;
545
+ }>;
546
+ export declare const BackfillSubjectDocumentSchema: z.ZodObject<{
547
+ recordId: z.ZodString;
548
+ fileId: z.ZodString;
549
+ originalName: z.ZodNullable<z.ZodString>;
550
+ mimeType: z.ZodNullable<z.ZodString>;
551
+ sourceType: z.ZodEnum<["DROPZONE", "WORKER_ID_DOCUMENT", "CURATED_ID_DOCUMENT", "QUALIFICATION_PROOF"]>;
552
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
553
+ reviewable: z.ZodBoolean;
554
+ evaluatedAt: z.ZodNullable<z.ZodString>;
555
+ currentlyFiledAs: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION"]>;
556
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
557
+ destinationSuggested: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>;
558
+ confidence: z.ZodNullable<z.ZodNumber>;
559
+ extracted: z.ZodNullable<z.ZodObject<{
560
+ documentType: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
561
+ firstName: z.ZodNullable<z.ZodString>;
562
+ lastName: z.ZodNullable<z.ZodString>;
563
+ dateOfBirth: z.ZodNullable<z.ZodString>;
564
+ expiryDate: z.ZodNullable<z.ZodString>;
565
+ issueDate: z.ZodNullable<z.ZodString>;
566
+ referenceNumber: z.ZodNullable<z.ZodString>;
567
+ shareCode: z.ZodNullable<z.ZodString>;
568
+ nationality: z.ZodNullable<z.ZodString>;
569
+ qualificationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
570
+ qualificationTypeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
571
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
572
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
573
+ qualificationIssuerText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
574
+ qualificationCardColour: z.ZodOptional<z.ZodNullable<z.ZodEnum<["green", "blue", "gold", "black", "white", "red"]>>>;
575
+ qualificationRoleText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
576
+ qualificationMatchMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["catalogue_exact", "scheme_rule", "none"]>>>;
577
+ confidence: z.ZodNumber;
578
+ }, "strip", z.ZodTypeAny, {
579
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
580
+ firstName: string | null;
581
+ lastName: string | null;
582
+ dateOfBirth: string | null;
583
+ expiryDate: string | null;
584
+ issueDate: string | null;
585
+ referenceNumber: string | null;
586
+ shareCode: string | null;
587
+ nationality: string | null;
588
+ confidence: number;
589
+ qualificationName?: string | null | undefined;
590
+ qualificationTypeName?: string | null | undefined;
591
+ qualificationId?: string | null | undefined;
592
+ qualificationTypeId?: string | null | undefined;
593
+ qualificationIssuerText?: string | null | undefined;
594
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
595
+ qualificationRoleText?: string | null | undefined;
596
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
597
+ }, {
598
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
599
+ firstName: string | null;
600
+ lastName: string | null;
601
+ dateOfBirth: string | null;
602
+ expiryDate: string | null;
603
+ issueDate: string | null;
604
+ referenceNumber: string | null;
605
+ shareCode: string | null;
606
+ nationality: string | null;
607
+ confidence: number;
608
+ qualificationName?: string | null | undefined;
609
+ qualificationTypeName?: string | null | undefined;
610
+ qualificationId?: string | null | undefined;
611
+ qualificationTypeId?: string | null | undefined;
612
+ qualificationIssuerText?: string | null | undefined;
613
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
614
+ qualificationRoleText?: string | null | undefined;
615
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
616
+ }>>;
617
+ currentQualificationId: z.ZodNullable<z.ZodString>;
618
+ currentQualificationName: z.ZodNullable<z.ZodString>;
619
+ sourceRow: z.ZodNullable<z.ZodObject<{
620
+ documentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
621
+ documentNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
622
+ expiryDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
623
+ issueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
624
+ referenceNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
625
+ }, "strip", z.ZodTypeAny, {
626
+ documentType?: string | null | undefined;
627
+ expiryDate?: string | null | undefined;
628
+ issueDate?: string | null | undefined;
629
+ referenceNumber?: string | null | undefined;
630
+ documentNumber?: string | null | undefined;
631
+ }, {
632
+ documentType?: string | null | undefined;
633
+ expiryDate?: string | null | undefined;
634
+ issueDate?: string | null | undefined;
635
+ referenceNumber?: string | null | undefined;
636
+ documentNumber?: string | null | undefined;
637
+ }>>;
638
+ createdAt: z.ZodString;
639
+ }, "strip", z.ZodTypeAny, {
640
+ confidence: number | null;
641
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
642
+ fileId: string;
643
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
644
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
645
+ extracted: {
646
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
647
+ firstName: string | null;
648
+ lastName: string | null;
649
+ dateOfBirth: string | null;
650
+ expiryDate: string | null;
651
+ issueDate: string | null;
652
+ referenceNumber: string | null;
653
+ shareCode: string | null;
654
+ nationality: string | null;
655
+ confidence: number;
656
+ qualificationName?: string | null | undefined;
657
+ qualificationTypeName?: string | null | undefined;
658
+ qualificationId?: string | null | undefined;
659
+ qualificationTypeId?: string | null | undefined;
660
+ qualificationIssuerText?: string | null | undefined;
661
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
662
+ qualificationRoleText?: string | null | undefined;
663
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
664
+ } | null;
665
+ createdAt: string;
666
+ recordId: string;
667
+ originalName: string | null;
668
+ mimeType: string | null;
669
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
670
+ reviewable: boolean;
671
+ evaluatedAt: string | null;
672
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
673
+ currentQualificationId: string | null;
674
+ currentQualificationName: string | null;
675
+ sourceRow: {
676
+ documentType?: string | null | undefined;
677
+ expiryDate?: string | null | undefined;
678
+ issueDate?: string | null | undefined;
679
+ referenceNumber?: string | null | undefined;
680
+ documentNumber?: string | null | undefined;
681
+ } | null;
682
+ }, {
683
+ confidence: number | null;
684
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
685
+ fileId: string;
686
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
687
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
688
+ extracted: {
689
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
690
+ firstName: string | null;
691
+ lastName: string | null;
692
+ dateOfBirth: string | null;
693
+ expiryDate: string | null;
694
+ issueDate: string | null;
695
+ referenceNumber: string | null;
696
+ shareCode: string | null;
697
+ nationality: string | null;
698
+ confidence: number;
699
+ qualificationName?: string | null | undefined;
700
+ qualificationTypeName?: string | null | undefined;
701
+ qualificationId?: string | null | undefined;
702
+ qualificationTypeId?: string | null | undefined;
703
+ qualificationIssuerText?: string | null | undefined;
704
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
705
+ qualificationRoleText?: string | null | undefined;
706
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
707
+ } | null;
708
+ createdAt: string;
709
+ recordId: string;
710
+ originalName: string | null;
711
+ mimeType: string | null;
712
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
713
+ reviewable: boolean;
714
+ evaluatedAt: string | null;
715
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
716
+ currentQualificationId: string | null;
717
+ currentQualificationName: string | null;
718
+ sourceRow: {
719
+ documentType?: string | null | undefined;
720
+ expiryDate?: string | null | undefined;
721
+ issueDate?: string | null | undefined;
722
+ referenceNumber?: string | null | undefined;
723
+ documentNumber?: string | null | undefined;
724
+ } | null;
725
+ }>;
726
+ export declare const BackfillSubjectDetailSchema: z.ZodObject<{
727
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
728
+ subjectId: z.ZodString;
729
+ subjectName: z.ZodString;
730
+ current: z.ZodObject<{
731
+ firstName: z.ZodNullable<z.ZodString>;
732
+ lastName: z.ZodNullable<z.ZodString>;
733
+ dateOfBirth: z.ZodNullable<z.ZodString>;
734
+ nationality: z.ZodNullable<z.ZodString>;
735
+ shareCode: z.ZodNullable<z.ZodObject<{
736
+ code: z.ZodNullable<z.ZodString>;
737
+ expiryDate: z.ZodNullable<z.ZodString>;
738
+ }, "strip", z.ZodTypeAny, {
739
+ expiryDate: string | null;
740
+ code: string | null;
741
+ }, {
742
+ expiryDate: string | null;
743
+ code: string | null;
744
+ }>>;
745
+ }, "strip", z.ZodTypeAny, {
746
+ firstName: string | null;
747
+ lastName: string | null;
748
+ dateOfBirth: string | null;
749
+ shareCode: {
750
+ expiryDate: string | null;
751
+ code: string | null;
752
+ } | null;
753
+ nationality: string | null;
754
+ }, {
755
+ firstName: string | null;
756
+ lastName: string | null;
757
+ dateOfBirth: string | null;
758
+ shareCode: {
759
+ expiryDate: string | null;
760
+ code: string | null;
761
+ } | null;
762
+ nationality: string | null;
763
+ }>;
764
+ documents: z.ZodArray<z.ZodObject<{
765
+ recordId: z.ZodString;
766
+ fileId: z.ZodString;
767
+ originalName: z.ZodNullable<z.ZodString>;
768
+ mimeType: z.ZodNullable<z.ZodString>;
769
+ sourceType: z.ZodEnum<["DROPZONE", "WORKER_ID_DOCUMENT", "CURATED_ID_DOCUMENT", "QUALIFICATION_PROOF"]>;
770
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
771
+ reviewable: z.ZodBoolean;
772
+ evaluatedAt: z.ZodNullable<z.ZodString>;
773
+ currentlyFiledAs: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION"]>;
774
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
775
+ destinationSuggested: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>;
776
+ confidence: z.ZodNullable<z.ZodNumber>;
777
+ extracted: z.ZodNullable<z.ZodObject<{
778
+ documentType: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
779
+ firstName: z.ZodNullable<z.ZodString>;
780
+ lastName: z.ZodNullable<z.ZodString>;
781
+ dateOfBirth: z.ZodNullable<z.ZodString>;
782
+ expiryDate: z.ZodNullable<z.ZodString>;
783
+ issueDate: z.ZodNullable<z.ZodString>;
784
+ referenceNumber: z.ZodNullable<z.ZodString>;
785
+ shareCode: z.ZodNullable<z.ZodString>;
786
+ nationality: z.ZodNullable<z.ZodString>;
787
+ qualificationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
788
+ qualificationTypeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
789
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
790
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
791
+ qualificationIssuerText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
792
+ qualificationCardColour: z.ZodOptional<z.ZodNullable<z.ZodEnum<["green", "blue", "gold", "black", "white", "red"]>>>;
793
+ qualificationRoleText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
794
+ qualificationMatchMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["catalogue_exact", "scheme_rule", "none"]>>>;
795
+ confidence: z.ZodNumber;
796
+ }, "strip", z.ZodTypeAny, {
797
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
798
+ firstName: string | null;
799
+ lastName: string | null;
800
+ dateOfBirth: string | null;
801
+ expiryDate: string | null;
802
+ issueDate: string | null;
803
+ referenceNumber: string | null;
804
+ shareCode: string | null;
805
+ nationality: string | null;
806
+ confidence: number;
807
+ qualificationName?: string | null | undefined;
808
+ qualificationTypeName?: string | null | undefined;
809
+ qualificationId?: string | null | undefined;
810
+ qualificationTypeId?: string | null | undefined;
811
+ qualificationIssuerText?: string | null | undefined;
812
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
813
+ qualificationRoleText?: string | null | undefined;
814
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
815
+ }, {
816
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
817
+ firstName: string | null;
818
+ lastName: string | null;
819
+ dateOfBirth: string | null;
820
+ expiryDate: string | null;
821
+ issueDate: string | null;
822
+ referenceNumber: string | null;
823
+ shareCode: string | null;
824
+ nationality: string | null;
825
+ confidence: number;
826
+ qualificationName?: string | null | undefined;
827
+ qualificationTypeName?: string | null | undefined;
828
+ qualificationId?: string | null | undefined;
829
+ qualificationTypeId?: string | null | undefined;
830
+ qualificationIssuerText?: string | null | undefined;
831
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
832
+ qualificationRoleText?: string | null | undefined;
833
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
834
+ }>>;
835
+ currentQualificationId: z.ZodNullable<z.ZodString>;
836
+ currentQualificationName: z.ZodNullable<z.ZodString>;
837
+ sourceRow: z.ZodNullable<z.ZodObject<{
838
+ documentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
839
+ documentNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
840
+ expiryDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
841
+ issueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
842
+ referenceNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
843
+ }, "strip", z.ZodTypeAny, {
844
+ documentType?: string | null | undefined;
845
+ expiryDate?: string | null | undefined;
846
+ issueDate?: string | null | undefined;
847
+ referenceNumber?: string | null | undefined;
848
+ documentNumber?: string | null | undefined;
849
+ }, {
850
+ documentType?: string | null | undefined;
851
+ expiryDate?: string | null | undefined;
852
+ issueDate?: string | null | undefined;
853
+ referenceNumber?: string | null | undefined;
854
+ documentNumber?: string | null | undefined;
855
+ }>>;
856
+ createdAt: z.ZodString;
857
+ }, "strip", z.ZodTypeAny, {
858
+ confidence: number | null;
859
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
860
+ fileId: string;
861
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
862
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
863
+ extracted: {
864
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
865
+ firstName: string | null;
866
+ lastName: string | null;
867
+ dateOfBirth: string | null;
868
+ expiryDate: string | null;
869
+ issueDate: string | null;
870
+ referenceNumber: string | null;
871
+ shareCode: string | null;
872
+ nationality: string | null;
873
+ confidence: number;
874
+ qualificationName?: string | null | undefined;
875
+ qualificationTypeName?: string | null | undefined;
876
+ qualificationId?: string | null | undefined;
877
+ qualificationTypeId?: string | null | undefined;
878
+ qualificationIssuerText?: string | null | undefined;
879
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
880
+ qualificationRoleText?: string | null | undefined;
881
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
882
+ } | null;
883
+ createdAt: string;
884
+ recordId: string;
885
+ originalName: string | null;
886
+ mimeType: string | null;
887
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
888
+ reviewable: boolean;
889
+ evaluatedAt: string | null;
890
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
891
+ currentQualificationId: string | null;
892
+ currentQualificationName: string | null;
893
+ sourceRow: {
894
+ documentType?: string | null | undefined;
895
+ expiryDate?: string | null | undefined;
896
+ issueDate?: string | null | undefined;
897
+ referenceNumber?: string | null | undefined;
898
+ documentNumber?: string | null | undefined;
899
+ } | null;
900
+ }, {
901
+ confidence: number | null;
902
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
903
+ fileId: string;
904
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
905
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
906
+ extracted: {
907
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
908
+ firstName: string | null;
909
+ lastName: string | null;
910
+ dateOfBirth: string | null;
911
+ expiryDate: string | null;
912
+ issueDate: string | null;
913
+ referenceNumber: string | null;
914
+ shareCode: string | null;
915
+ nationality: string | null;
916
+ confidence: number;
917
+ qualificationName?: string | null | undefined;
918
+ qualificationTypeName?: string | null | undefined;
919
+ qualificationId?: string | null | undefined;
920
+ qualificationTypeId?: string | null | undefined;
921
+ qualificationIssuerText?: string | null | undefined;
922
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
923
+ qualificationRoleText?: string | null | undefined;
924
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
925
+ } | null;
926
+ createdAt: string;
927
+ recordId: string;
928
+ originalName: string | null;
929
+ mimeType: string | null;
930
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
931
+ reviewable: boolean;
932
+ evaluatedAt: string | null;
933
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
934
+ currentQualificationId: string | null;
935
+ currentQualificationName: string | null;
936
+ sourceRow: {
937
+ documentType?: string | null | undefined;
938
+ expiryDate?: string | null | undefined;
939
+ issueDate?: string | null | undefined;
940
+ referenceNumber?: string | null | undefined;
941
+ documentNumber?: string | null | undefined;
942
+ } | null;
943
+ }>, "many">;
944
+ }, "strip", z.ZodTypeAny, {
945
+ subjectType: "WORKER" | "CURATED_WORKER";
946
+ subjectId: string;
947
+ subjectName: string;
948
+ current: {
949
+ firstName: string | null;
950
+ lastName: string | null;
951
+ dateOfBirth: string | null;
952
+ shareCode: {
953
+ expiryDate: string | null;
954
+ code: string | null;
955
+ } | null;
956
+ nationality: string | null;
957
+ };
958
+ documents: {
959
+ confidence: number | null;
960
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
961
+ fileId: string;
962
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
963
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
964
+ extracted: {
965
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
966
+ firstName: string | null;
967
+ lastName: string | null;
968
+ dateOfBirth: string | null;
969
+ expiryDate: string | null;
970
+ issueDate: string | null;
971
+ referenceNumber: string | null;
972
+ shareCode: string | null;
973
+ nationality: string | null;
974
+ confidence: number;
975
+ qualificationName?: string | null | undefined;
976
+ qualificationTypeName?: string | null | undefined;
977
+ qualificationId?: string | null | undefined;
978
+ qualificationTypeId?: string | null | undefined;
979
+ qualificationIssuerText?: string | null | undefined;
980
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
981
+ qualificationRoleText?: string | null | undefined;
982
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
983
+ } | null;
984
+ createdAt: string;
985
+ recordId: string;
986
+ originalName: string | null;
987
+ mimeType: string | null;
988
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
989
+ reviewable: boolean;
990
+ evaluatedAt: string | null;
991
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
992
+ currentQualificationId: string | null;
993
+ currentQualificationName: string | null;
994
+ sourceRow: {
995
+ documentType?: string | null | undefined;
996
+ expiryDate?: string | null | undefined;
997
+ issueDate?: string | null | undefined;
998
+ referenceNumber?: string | null | undefined;
999
+ documentNumber?: string | null | undefined;
1000
+ } | null;
1001
+ }[];
1002
+ }, {
1003
+ subjectType: "WORKER" | "CURATED_WORKER";
1004
+ subjectId: string;
1005
+ subjectName: string;
1006
+ current: {
1007
+ firstName: string | null;
1008
+ lastName: string | null;
1009
+ dateOfBirth: string | null;
1010
+ shareCode: {
1011
+ expiryDate: string | null;
1012
+ code: string | null;
1013
+ } | null;
1014
+ nationality: string | null;
1015
+ };
1016
+ documents: {
1017
+ confidence: number | null;
1018
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1019
+ fileId: string;
1020
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1021
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
1022
+ extracted: {
1023
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1024
+ firstName: string | null;
1025
+ lastName: string | null;
1026
+ dateOfBirth: string | null;
1027
+ expiryDate: string | null;
1028
+ issueDate: string | null;
1029
+ referenceNumber: string | null;
1030
+ shareCode: string | null;
1031
+ nationality: string | null;
1032
+ confidence: number;
1033
+ qualificationName?: string | null | undefined;
1034
+ qualificationTypeName?: string | null | undefined;
1035
+ qualificationId?: string | null | undefined;
1036
+ qualificationTypeId?: string | null | undefined;
1037
+ qualificationIssuerText?: string | null | undefined;
1038
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1039
+ qualificationRoleText?: string | null | undefined;
1040
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1041
+ } | null;
1042
+ createdAt: string;
1043
+ recordId: string;
1044
+ originalName: string | null;
1045
+ mimeType: string | null;
1046
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
1047
+ reviewable: boolean;
1048
+ evaluatedAt: string | null;
1049
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
1050
+ currentQualificationId: string | null;
1051
+ currentQualificationName: string | null;
1052
+ sourceRow: {
1053
+ documentType?: string | null | undefined;
1054
+ expiryDate?: string | null | undefined;
1055
+ issueDate?: string | null | undefined;
1056
+ referenceNumber?: string | null | undefined;
1057
+ documentNumber?: string | null | undefined;
1058
+ } | null;
1059
+ }[];
1060
+ }>;
1061
+ export declare const ApplyBackfillSubjectSchema: z.ZodEffects<z.ZodObject<{
1062
+ fields: z.ZodObject<{
1063
+ firstName: z.ZodOptional<z.ZodString>;
1064
+ lastName: z.ZodOptional<z.ZodString>;
1065
+ dateOfBirth: z.ZodOptional<z.ZodString>;
1066
+ nationality: z.ZodOptional<z.ZodEnum<["AFGHAN", "ALBANIAN", "ALGERIAN", "AMERICAN", "ANDORRAN", "ANGOLAN", "ANTIGUANS", "ARGENTINEAN", "ARMENIAN", "AUSTRALIAN", "AUSTRIAN", "AZERBAIJANI", "BAHAMIAN", "BAHRAINI", "BANGLADESHI", "BARBADIAN", "BARBUDANS", "BELARUSIAN", "BELGIAN", "BELIZEAN", "BENINESE", "BHUTANESE", "BOLIVIAN", "BOSNIAN", "BRAZILIAN", "BRITISH", "BRUNEIAN", "BULGARIAN", "BURKINABE", "BURMESE", "BURUNDIAN", "CAMBODIAN", "CAMEROONIAN", "CANADIAN", "CAPE_VERDEAN", "CENTRAL_AFRICAN", "CHADIAN", "CHILEAN", "CHINESE", "COLOMBIAN", "COMORAN", "CONGOLESE", "COSTA_RICAN", "CROATIAN", "CUBAN", "CYPRIOT", "CZECH", "DANISH", "DJIBOUTI", "DOMINICAN", "DUTCH", "EAST_TIMORESE", "ECUADOREAN", "EGYPTIAN", "EMIRIAN", "EQUATORIAL_GUINEAN", "ERITREAN", "ESTONIAN", "ETHIOPIAN", "FIJIAN", "FILIPINO", "FINNISH", "FRENCH", "GABONESE", "GAMBIAN", "GEORGIAN", "GERMAN", "GHANAIAN", "GREEK", "GRENADIAN", "GUATEMALAN", "GUINEA_BISSAUAN", "GUINEAN", "GUYANESE", "HAITIAN", "HERZEGOVINIAN", "HONDURAN", "HUNGARIAN", "ICELANDER", "INDIAN", "INDONESIAN", "IRANIAN", "IRAQI", "IRISH", "ISRAELI", "ITALIAN", "IVORIAN", "JAMAICAN", "JAPANESE", "JORDANIAN", "KAZAKHSTANI", "KENYAN", "KITTIAN_AND_NEVISIAN", "KUWAITI", "KYRGYZ", "LAOTIAN", "LATVIAN", "LEBANESE", "LIBERIAN", "LIBYAN", "LIECHTENSTEINER", "LITHUANIAN", "LUXEMBOURGER", "MACEDONIAN", "MALAGASY", "MALAWIAN", "MALAYSIAN", "MALDIVAN", "MALIAN", "MALTESE", "MARSHALLESE", "MAURITANIAN", "MAURITIAN", "MEXICAN", "MICRONESIAN", "MOLDOVAN", "MONACAN", "MONGOLIAN", "MOROCCAN", "MOSOTHO", "MOTSWANA", "MOZAMBICAN", "NAMIBIAN", "NAURUAN", "NEPALESE", "NEW_ZEALANDER", "NI_VANUATU", "NICARAGUAN", "NIGERIEN", "NIGERIAN", "NORTH_KOREAN", "NORTHERN_IRISH", "NORWEGIAN", "OMANI", "PAKISTANI", "PALAUAN", "PANAMANIAN", "PAPUA_NEW_GUINEAN", "PARAGUAYAN", "PERUVIAN", "POLISH", "PORTUGUESE", "QATARI", "ROMANIAN", "RUSSIAN", "RWANDAN", "SAINT_LUCIAN", "SALVADORAN", "SAMOAN", "SAN_MARINESE", "SAO_TOMEAN", "SAUDI", "SCOTTISH", "SENEGALESE", "SERBIAN", "SEYCHELLOIS", "SIERRA_LEONEAN", "SINGAPOREAN", "SLOVAKIAN", "SLOVENIAN", "SOLOMON_ISLANDER", "SOMALI", "SOUTH_AFRICAN", "SOUTH_KOREAN", "SOUTH_SUDANESE", "SPANISH", "SRI_LANKAN", "SUDANESE", "SURINAMER", "SWAZI", "SWEDISH", "SWISS", "SYRIAN", "TAIWANESE", "TAJIK", "TANZANIAN", "THAI", "TOGOLESE", "TONGAN", "TRINIDADIAN_OR_TOBAGONIAN", "TUNISIAN", "TURKISH", "TUVALUAN", "UGANDAN", "UKRAINIAN", "URUGUAYAN", "UZBEKISTANI", "VENEZUELAN", "VIETNAMESE", "WELSH", "YEMENITE", "ZAMBIAN", "ZIMBABWEAN"]>>;
1067
+ }, "strip", z.ZodTypeAny, {
1068
+ firstName?: string | undefined;
1069
+ lastName?: string | undefined;
1070
+ dateOfBirth?: string | undefined;
1071
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
1072
+ }, {
1073
+ firstName?: string | undefined;
1074
+ lastName?: string | undefined;
1075
+ dateOfBirth?: string | undefined;
1076
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
1077
+ }>;
1078
+ fieldSources: z.ZodObject<{
1079
+ firstName: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1080
+ lastName: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1081
+ dateOfBirth: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1082
+ nationality: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1083
+ }, "strip", z.ZodTypeAny, {
1084
+ firstName?: string[] | undefined;
1085
+ lastName?: string[] | undefined;
1086
+ dateOfBirth?: string[] | undefined;
1087
+ nationality?: string[] | undefined;
1088
+ }, {
1089
+ firstName?: string[] | undefined;
1090
+ lastName?: string[] | undefined;
1091
+ dateOfBirth?: string[] | undefined;
1092
+ nationality?: string[] | undefined;
1093
+ }>;
1094
+ documents: z.ZodArray<z.ZodObject<{
1095
+ recordId: z.ZodString;
1096
+ action: z.ZodEnum<["KEEP", "REROUTE", "DISMISS"]>;
1097
+ destination: z.ZodOptional<z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE"]>>;
1098
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1099
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1100
+ }, "strip", z.ZodTypeAny, {
1101
+ recordId: string;
1102
+ action: "REROUTE" | "KEEP" | "DISMISS";
1103
+ qualificationId?: string | null | undefined;
1104
+ qualificationTypeId?: string | null | undefined;
1105
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
1106
+ }, {
1107
+ recordId: string;
1108
+ action: "REROUTE" | "KEEP" | "DISMISS";
1109
+ qualificationId?: string | null | undefined;
1110
+ qualificationTypeId?: string | null | undefined;
1111
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
1112
+ }>, "many">;
1113
+ }, "strip", z.ZodTypeAny, {
1114
+ documents: {
1115
+ recordId: string;
1116
+ action: "REROUTE" | "KEEP" | "DISMISS";
1117
+ qualificationId?: string | null | undefined;
1118
+ qualificationTypeId?: string | null | undefined;
1119
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
1120
+ }[];
1121
+ fields: {
1122
+ firstName?: string | undefined;
1123
+ lastName?: string | undefined;
1124
+ dateOfBirth?: string | undefined;
1125
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
1126
+ };
1127
+ fieldSources: {
1128
+ firstName?: string[] | undefined;
1129
+ lastName?: string[] | undefined;
1130
+ dateOfBirth?: string[] | undefined;
1131
+ nationality?: string[] | undefined;
1132
+ };
1133
+ }, {
1134
+ documents: {
1135
+ recordId: string;
1136
+ action: "REROUTE" | "KEEP" | "DISMISS";
1137
+ qualificationId?: string | null | undefined;
1138
+ qualificationTypeId?: string | null | undefined;
1139
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
1140
+ }[];
1141
+ fields: {
1142
+ firstName?: string | undefined;
1143
+ lastName?: string | undefined;
1144
+ dateOfBirth?: string | undefined;
1145
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
1146
+ };
1147
+ fieldSources: {
1148
+ firstName?: string[] | undefined;
1149
+ lastName?: string[] | undefined;
1150
+ dateOfBirth?: string[] | undefined;
1151
+ nationality?: string[] | undefined;
1152
+ };
1153
+ }>, {
1154
+ documents: {
1155
+ recordId: string;
1156
+ action: "REROUTE" | "KEEP" | "DISMISS";
1157
+ qualificationId?: string | null | undefined;
1158
+ qualificationTypeId?: string | null | undefined;
1159
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
1160
+ }[];
1161
+ fields: {
1162
+ firstName?: string | undefined;
1163
+ lastName?: string | undefined;
1164
+ dateOfBirth?: string | undefined;
1165
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
1166
+ };
1167
+ fieldSources: {
1168
+ firstName?: string[] | undefined;
1169
+ lastName?: string[] | undefined;
1170
+ dateOfBirth?: string[] | undefined;
1171
+ nationality?: string[] | undefined;
1172
+ };
1173
+ }, {
1174
+ documents: {
1175
+ recordId: string;
1176
+ action: "REROUTE" | "KEEP" | "DISMISS";
1177
+ qualificationId?: string | null | undefined;
1178
+ qualificationTypeId?: string | null | undefined;
1179
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
1180
+ }[];
1181
+ fields: {
1182
+ firstName?: string | undefined;
1183
+ lastName?: string | undefined;
1184
+ dateOfBirth?: string | undefined;
1185
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
1186
+ };
1187
+ fieldSources: {
1188
+ firstName?: string[] | undefined;
1189
+ lastName?: string[] | undefined;
1190
+ dateOfBirth?: string[] | undefined;
1191
+ nationality?: string[] | undefined;
1192
+ };
1193
+ }>;
1194
+ export declare const BackfillAuditRecordSchema: z.ZodObject<{
1195
+ recordId: z.ZodString;
1196
+ fileId: z.ZodString;
1197
+ workerId: z.ZodNullable<z.ZodString>;
1198
+ curatedWorkerId: z.ZodNullable<z.ZodString>;
1199
+ subjectName: z.ZodString;
1200
+ originalName: z.ZodNullable<z.ZodString>;
1201
+ sourceType: z.ZodEnum<["DROPZONE", "WORKER_ID_DOCUMENT", "CURATED_ID_DOCUMENT", "QUALIFICATION_PROOF"]>;
1202
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
1203
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
1204
+ confidence: z.ZodNullable<z.ZodNumber>;
1205
+ failureKind: z.ZodNullable<z.ZodString>;
1206
+ evaluatedAt: z.ZodNullable<z.ZodString>;
1207
+ createdAt: z.ZodString;
1208
+ supersedesRecordId: z.ZodNullable<z.ZodString>;
1209
+ supersededByRecordId: z.ZodNullable<z.ZodString>;
1210
+ isCurrent: z.ZodBoolean;
1211
+ extractorFingerprint: z.ZodNullable<z.ZodString>;
1212
+ evaluationFingerprint: z.ZodNullable<z.ZodString>;
1213
+ }, "strip", z.ZodTypeAny, {
1214
+ confidence: number | null;
1215
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1216
+ fileId: string;
1217
+ workerId: string | null;
1218
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1219
+ subjectName: string;
1220
+ curatedWorkerId: string | null;
1221
+ createdAt: string;
1222
+ recordId: string;
1223
+ originalName: string | null;
1224
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
1225
+ evaluatedAt: string | null;
1226
+ failureKind: string | null;
1227
+ supersedesRecordId: string | null;
1228
+ supersededByRecordId: string | null;
1229
+ isCurrent: boolean;
1230
+ extractorFingerprint: string | null;
1231
+ evaluationFingerprint: string | null;
1232
+ }, {
1233
+ confidence: number | null;
1234
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1235
+ fileId: string;
1236
+ workerId: string | null;
1237
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1238
+ subjectName: string;
1239
+ curatedWorkerId: string | null;
1240
+ createdAt: string;
1241
+ recordId: string;
1242
+ originalName: string | null;
1243
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
1244
+ evaluatedAt: string | null;
1245
+ failureKind: string | null;
1246
+ supersedesRecordId: string | null;
1247
+ supersededByRecordId: string | null;
1248
+ isCurrent: boolean;
1249
+ extractorFingerprint: string | null;
1250
+ evaluationFingerprint: string | null;
1251
+ }>;
1252
+ export declare const BackfillAuditQuerySchema: z.ZodObject<{
1253
+ page: z.ZodDefault<z.ZodNumber>;
1254
+ limit: z.ZodDefault<z.ZodNumber>;
1255
+ statuses: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>, z.ZodArray<z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>, "many">]>>, ("PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED")[] | undefined, "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED" | ("PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED")[] | undefined>;
1256
+ supersededOnly: z.ZodOptional<z.ZodBoolean>;
1257
+ }, "strip", z.ZodTypeAny, {
1258
+ page: number;
1259
+ limit: number;
1260
+ statuses?: ("PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED")[] | undefined;
1261
+ supersededOnly?: boolean | undefined;
1262
+ }, {
1263
+ page?: number | undefined;
1264
+ limit?: number | undefined;
1265
+ statuses?: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED" | ("PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED")[] | undefined;
1266
+ supersededOnly?: boolean | undefined;
1267
+ }>;
1268
+ export declare const BackfillAuditListSchema: z.ZodObject<{
1269
+ items: z.ZodArray<z.ZodObject<{
1270
+ recordId: z.ZodString;
1271
+ fileId: z.ZodString;
1272
+ workerId: z.ZodNullable<z.ZodString>;
1273
+ curatedWorkerId: z.ZodNullable<z.ZodString>;
1274
+ subjectName: z.ZodString;
1275
+ originalName: z.ZodNullable<z.ZodString>;
1276
+ sourceType: z.ZodEnum<["DROPZONE", "WORKER_ID_DOCUMENT", "CURATED_ID_DOCUMENT", "QUALIFICATION_PROOF"]>;
1277
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
1278
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
1279
+ confidence: z.ZodNullable<z.ZodNumber>;
1280
+ failureKind: z.ZodNullable<z.ZodString>;
1281
+ evaluatedAt: z.ZodNullable<z.ZodString>;
1282
+ createdAt: z.ZodString;
1283
+ supersedesRecordId: z.ZodNullable<z.ZodString>;
1284
+ supersededByRecordId: z.ZodNullable<z.ZodString>;
1285
+ isCurrent: z.ZodBoolean;
1286
+ extractorFingerprint: z.ZodNullable<z.ZodString>;
1287
+ evaluationFingerprint: z.ZodNullable<z.ZodString>;
1288
+ }, "strip", z.ZodTypeAny, {
1289
+ confidence: number | null;
1290
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1291
+ fileId: string;
1292
+ workerId: string | null;
1293
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1294
+ subjectName: string;
1295
+ curatedWorkerId: string | null;
1296
+ createdAt: string;
1297
+ recordId: string;
1298
+ originalName: string | null;
1299
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
1300
+ evaluatedAt: string | null;
1301
+ failureKind: string | null;
1302
+ supersedesRecordId: string | null;
1303
+ supersededByRecordId: string | null;
1304
+ isCurrent: boolean;
1305
+ extractorFingerprint: string | null;
1306
+ evaluationFingerprint: string | null;
1307
+ }, {
1308
+ confidence: number | null;
1309
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1310
+ fileId: string;
1311
+ workerId: string | null;
1312
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1313
+ subjectName: string;
1314
+ curatedWorkerId: string | null;
1315
+ createdAt: string;
1316
+ recordId: string;
1317
+ originalName: string | null;
1318
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
1319
+ evaluatedAt: string | null;
1320
+ failureKind: string | null;
1321
+ supersedesRecordId: string | null;
1322
+ supersededByRecordId: string | null;
1323
+ isCurrent: boolean;
1324
+ extractorFingerprint: string | null;
1325
+ evaluationFingerprint: string | null;
1326
+ }>, "many">;
1327
+ totalCount: z.ZodNumber;
1328
+ totalPages: z.ZodNumber;
1329
+ page: z.ZodNumber;
1330
+ limit: z.ZodNumber;
1331
+ }, "strip", z.ZodTypeAny, {
1332
+ items: {
1333
+ confidence: number | null;
1334
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1335
+ fileId: string;
1336
+ workerId: string | null;
1337
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1338
+ subjectName: string;
1339
+ curatedWorkerId: string | null;
1340
+ createdAt: string;
1341
+ recordId: string;
1342
+ originalName: string | null;
1343
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
1344
+ evaluatedAt: string | null;
1345
+ failureKind: string | null;
1346
+ supersedesRecordId: string | null;
1347
+ supersededByRecordId: string | null;
1348
+ isCurrent: boolean;
1349
+ extractorFingerprint: string | null;
1350
+ evaluationFingerprint: string | null;
1351
+ }[];
1352
+ totalCount: number;
1353
+ totalPages: number;
1354
+ page: number;
1355
+ limit: number;
1356
+ }, {
1357
+ items: {
1358
+ confidence: number | null;
1359
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1360
+ fileId: string;
1361
+ workerId: string | null;
1362
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1363
+ subjectName: string;
1364
+ curatedWorkerId: string | null;
1365
+ createdAt: string;
1366
+ recordId: string;
1367
+ originalName: string | null;
1368
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
1369
+ evaluatedAt: string | null;
1370
+ failureKind: string | null;
1371
+ supersedesRecordId: string | null;
1372
+ supersededByRecordId: string | null;
1373
+ isCurrent: boolean;
1374
+ extractorFingerprint: string | null;
1375
+ evaluationFingerprint: string | null;
1376
+ }[];
1377
+ totalCount: number;
1378
+ totalPages: number;
1379
+ page: number;
1380
+ limit: number;
1381
+ }>;
1382
+ export declare const documentIntakeContract: {
1383
+ extract: {
1384
+ metadata: {
1385
+ tags: string[];
1386
+ };
1387
+ summary: "AI-classify and extract an uploaded document; records an intake row.";
1388
+ method: "POST";
1389
+ body: z.ZodObject<{
1390
+ fileId: z.ZodString;
1391
+ }, "strip", z.ZodTypeAny, {
1392
+ fileId: string;
1393
+ }, {
1394
+ fileId: string;
1395
+ }>;
1396
+ path: "/v2/document-intake/extract";
1397
+ responses: {
1398
+ 500: z.ZodObject<{
1399
+ statusCode: z.ZodNumber;
1400
+ message: z.ZodString;
1401
+ code: z.ZodString;
1402
+ details: z.ZodOptional<z.ZodUnknown>;
1403
+ timestamp: z.ZodString;
1404
+ path: z.ZodString;
1405
+ correlationId: z.ZodOptional<z.ZodString>;
1406
+ }, "strip", z.ZodTypeAny, {
1407
+ code: string;
1408
+ path: string;
1409
+ message: string;
1410
+ statusCode: number;
1411
+ timestamp: string;
1412
+ details?: unknown;
1413
+ correlationId?: string | undefined;
1414
+ }, {
1415
+ code: string;
1416
+ path: string;
1417
+ message: string;
1418
+ statusCode: number;
1419
+ timestamp: string;
1420
+ details?: unknown;
1421
+ correlationId?: string | undefined;
1422
+ }>;
1423
+ 200: z.ZodObject<{
1424
+ id: z.ZodString;
1425
+ fileId: z.ZodString;
1426
+ workerId: z.ZodNullable<z.ZodString>;
1427
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
1428
+ destinationSuggested: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>;
1429
+ destinationFinal: z.ZodNullable<z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>>;
1430
+ extracted: z.ZodNullable<z.ZodObject<{
1431
+ documentType: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
1432
+ firstName: z.ZodNullable<z.ZodString>;
1433
+ lastName: z.ZodNullable<z.ZodString>;
1434
+ dateOfBirth: z.ZodNullable<z.ZodString>;
1435
+ expiryDate: z.ZodNullable<z.ZodString>;
1436
+ issueDate: z.ZodNullable<z.ZodString>;
1437
+ referenceNumber: z.ZodNullable<z.ZodString>;
1438
+ shareCode: z.ZodNullable<z.ZodString>;
1439
+ nationality: z.ZodNullable<z.ZodString>;
1440
+ qualificationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1441
+ qualificationTypeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1442
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1443
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1444
+ qualificationIssuerText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1445
+ qualificationCardColour: z.ZodOptional<z.ZodNullable<z.ZodEnum<["green", "blue", "gold", "black", "white", "red"]>>>;
1446
+ qualificationRoleText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1447
+ qualificationMatchMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["catalogue_exact", "scheme_rule", "none"]>>>;
1448
+ confidence: z.ZodNumber;
1449
+ }, "strip", z.ZodTypeAny, {
1450
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1451
+ firstName: string | null;
1452
+ lastName: string | null;
1453
+ dateOfBirth: string | null;
1454
+ expiryDate: string | null;
1455
+ issueDate: string | null;
1456
+ referenceNumber: string | null;
1457
+ shareCode: string | null;
1458
+ nationality: string | null;
1459
+ confidence: number;
1460
+ qualificationName?: string | null | undefined;
1461
+ qualificationTypeName?: string | null | undefined;
1462
+ qualificationId?: string | null | undefined;
1463
+ qualificationTypeId?: string | null | undefined;
1464
+ qualificationIssuerText?: string | null | undefined;
1465
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1466
+ qualificationRoleText?: string | null | undefined;
1467
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1468
+ }, {
1469
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1470
+ firstName: string | null;
1471
+ lastName: string | null;
1472
+ dateOfBirth: string | null;
1473
+ expiryDate: string | null;
1474
+ issueDate: string | null;
1475
+ referenceNumber: string | null;
1476
+ shareCode: string | null;
1477
+ nationality: string | null;
1478
+ confidence: number;
1479
+ qualificationName?: string | null | undefined;
1480
+ qualificationTypeName?: string | null | undefined;
1481
+ qualificationId?: string | null | undefined;
1482
+ qualificationTypeId?: string | null | undefined;
1483
+ qualificationIssuerText?: string | null | undefined;
1484
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1485
+ qualificationRoleText?: string | null | undefined;
1486
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1487
+ }>>;
1488
+ confidence: z.ZodNullable<z.ZodNumber>;
1489
+ overridden: z.ZodBoolean;
1490
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
1491
+ }, "strip", z.ZodTypeAny, {
1492
+ confidence: number | null;
1493
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1494
+ id: string;
1495
+ fileId: string;
1496
+ workerId: string | null;
1497
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1498
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
1499
+ destinationFinal: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | null;
1500
+ extracted: {
1501
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1502
+ firstName: string | null;
1503
+ lastName: string | null;
1504
+ dateOfBirth: string | null;
1505
+ expiryDate: string | null;
1506
+ issueDate: string | null;
1507
+ referenceNumber: string | null;
1508
+ shareCode: string | null;
1509
+ nationality: string | null;
1510
+ confidence: number;
1511
+ qualificationName?: string | null | undefined;
1512
+ qualificationTypeName?: string | null | undefined;
1513
+ qualificationId?: string | null | undefined;
1514
+ qualificationTypeId?: string | null | undefined;
1515
+ qualificationIssuerText?: string | null | undefined;
1516
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1517
+ qualificationRoleText?: string | null | undefined;
1518
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1519
+ } | null;
1520
+ overridden: boolean;
1521
+ }, {
1522
+ confidence: number | null;
1523
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1524
+ id: string;
1525
+ fileId: string;
1526
+ workerId: string | null;
1527
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1528
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
1529
+ destinationFinal: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | null;
1530
+ extracted: {
1531
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1532
+ firstName: string | null;
1533
+ lastName: string | null;
1534
+ dateOfBirth: string | null;
1535
+ expiryDate: string | null;
1536
+ issueDate: string | null;
1537
+ referenceNumber: string | null;
1538
+ shareCode: string | null;
1539
+ nationality: string | null;
1540
+ confidence: number;
1541
+ qualificationName?: string | null | undefined;
1542
+ qualificationTypeName?: string | null | undefined;
1543
+ qualificationId?: string | null | undefined;
1544
+ qualificationTypeId?: string | null | undefined;
1545
+ qualificationIssuerText?: string | null | undefined;
1546
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1547
+ qualificationRoleText?: string | null | undefined;
1548
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1549
+ } | null;
1550
+ overridden: boolean;
1551
+ }>;
1552
+ 404: z.ZodObject<{
1553
+ statusCode: z.ZodNumber;
1554
+ message: z.ZodString;
1555
+ code: z.ZodString;
1556
+ details: z.ZodOptional<z.ZodUnknown>;
1557
+ timestamp: z.ZodString;
1558
+ path: z.ZodString;
1559
+ correlationId: z.ZodOptional<z.ZodString>;
1560
+ }, "strip", z.ZodTypeAny, {
1561
+ code: string;
1562
+ path: string;
1563
+ message: string;
1564
+ statusCode: number;
1565
+ timestamp: string;
1566
+ details?: unknown;
1567
+ correlationId?: string | undefined;
1568
+ }, {
1569
+ code: string;
1570
+ path: string;
1571
+ message: string;
1572
+ statusCode: number;
1573
+ timestamp: string;
1574
+ details?: unknown;
1575
+ correlationId?: string | undefined;
1576
+ }>;
1577
+ };
1578
+ };
1579
+ decide: {
1580
+ metadata: {
1581
+ tags: string[];
1582
+ };
1583
+ pathParams: z.ZodObject<{
1584
+ id: z.ZodString;
1585
+ }, "strip", z.ZodTypeAny, {
1586
+ id: string;
1587
+ }, {
1588
+ id: string;
1589
+ }>;
1590
+ summary: "Record the user decision (accept/override/discard) for an intake record.";
1591
+ method: "PATCH";
1592
+ body: z.ZodObject<{
1593
+ status: z.ZodEnum<["APPLIED", "DISCARDED"]>;
1594
+ destinationFinal: z.ZodOptional<z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>>;
1595
+ changedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1596
+ from: z.ZodUnknown;
1597
+ to: z.ZodUnknown;
1598
+ }, "strip", z.ZodTypeAny, {
1599
+ from?: unknown;
1600
+ to?: unknown;
1601
+ }, {
1602
+ from?: unknown;
1603
+ to?: unknown;
1604
+ }>>>;
1605
+ workerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1606
+ }, "strip", z.ZodTypeAny, {
1607
+ status: "APPLIED" | "DISCARDED";
1608
+ workerId?: string | null | undefined;
1609
+ destinationFinal?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | undefined;
1610
+ changedFields?: Record<string, {
1611
+ from?: unknown;
1612
+ to?: unknown;
1613
+ }> | undefined;
1614
+ }, {
1615
+ status: "APPLIED" | "DISCARDED";
1616
+ workerId?: string | null | undefined;
1617
+ destinationFinal?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | undefined;
1618
+ changedFields?: Record<string, {
1619
+ from?: unknown;
1620
+ to?: unknown;
1621
+ }> | undefined;
1622
+ }>;
1623
+ path: "/v2/document-intake/:id";
1624
+ responses: {
1625
+ 500: z.ZodObject<{
1626
+ statusCode: z.ZodNumber;
1627
+ message: z.ZodString;
1628
+ code: z.ZodString;
1629
+ details: z.ZodOptional<z.ZodUnknown>;
1630
+ timestamp: z.ZodString;
1631
+ path: z.ZodString;
1632
+ correlationId: z.ZodOptional<z.ZodString>;
1633
+ }, "strip", z.ZodTypeAny, {
1634
+ code: string;
1635
+ path: string;
1636
+ message: string;
1637
+ statusCode: number;
1638
+ timestamp: string;
1639
+ details?: unknown;
1640
+ correlationId?: string | undefined;
1641
+ }, {
1642
+ code: string;
1643
+ path: string;
1644
+ message: string;
1645
+ statusCode: number;
1646
+ timestamp: string;
1647
+ details?: unknown;
1648
+ correlationId?: string | undefined;
1649
+ }>;
1650
+ 200: z.ZodObject<{
1651
+ id: z.ZodString;
1652
+ fileId: z.ZodString;
1653
+ workerId: z.ZodNullable<z.ZodString>;
1654
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
1655
+ destinationSuggested: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>;
1656
+ destinationFinal: z.ZodNullable<z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>>;
1657
+ extracted: z.ZodNullable<z.ZodObject<{
1658
+ documentType: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
1659
+ firstName: z.ZodNullable<z.ZodString>;
1660
+ lastName: z.ZodNullable<z.ZodString>;
1661
+ dateOfBirth: z.ZodNullable<z.ZodString>;
1662
+ expiryDate: z.ZodNullable<z.ZodString>;
1663
+ issueDate: z.ZodNullable<z.ZodString>;
1664
+ referenceNumber: z.ZodNullable<z.ZodString>;
1665
+ shareCode: z.ZodNullable<z.ZodString>;
1666
+ nationality: z.ZodNullable<z.ZodString>;
1667
+ qualificationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1668
+ qualificationTypeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1669
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1670
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1671
+ qualificationIssuerText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1672
+ qualificationCardColour: z.ZodOptional<z.ZodNullable<z.ZodEnum<["green", "blue", "gold", "black", "white", "red"]>>>;
1673
+ qualificationRoleText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1674
+ qualificationMatchMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["catalogue_exact", "scheme_rule", "none"]>>>;
1675
+ confidence: z.ZodNumber;
1676
+ }, "strip", z.ZodTypeAny, {
1677
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1678
+ firstName: string | null;
1679
+ lastName: string | null;
1680
+ dateOfBirth: string | null;
1681
+ expiryDate: string | null;
1682
+ issueDate: string | null;
1683
+ referenceNumber: string | null;
1684
+ shareCode: string | null;
1685
+ nationality: string | null;
1686
+ confidence: number;
1687
+ qualificationName?: string | null | undefined;
1688
+ qualificationTypeName?: string | null | undefined;
1689
+ qualificationId?: string | null | undefined;
1690
+ qualificationTypeId?: string | null | undefined;
1691
+ qualificationIssuerText?: string | null | undefined;
1692
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1693
+ qualificationRoleText?: string | null | undefined;
1694
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1695
+ }, {
1696
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1697
+ firstName: string | null;
1698
+ lastName: string | null;
1699
+ dateOfBirth: string | null;
1700
+ expiryDate: string | null;
1701
+ issueDate: string | null;
1702
+ referenceNumber: string | null;
1703
+ shareCode: string | null;
1704
+ nationality: string | null;
1705
+ confidence: number;
1706
+ qualificationName?: string | null | undefined;
1707
+ qualificationTypeName?: string | null | undefined;
1708
+ qualificationId?: string | null | undefined;
1709
+ qualificationTypeId?: string | null | undefined;
1710
+ qualificationIssuerText?: string | null | undefined;
1711
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1712
+ qualificationRoleText?: string | null | undefined;
1713
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1714
+ }>>;
1715
+ confidence: z.ZodNullable<z.ZodNumber>;
1716
+ overridden: z.ZodBoolean;
1717
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
1718
+ }, "strip", z.ZodTypeAny, {
1719
+ confidence: number | null;
1720
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1721
+ id: string;
1722
+ fileId: string;
1723
+ workerId: string | null;
1724
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1725
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
1726
+ destinationFinal: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | null;
1727
+ extracted: {
1728
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1729
+ firstName: string | null;
1730
+ lastName: string | null;
1731
+ dateOfBirth: string | null;
1732
+ expiryDate: string | null;
1733
+ issueDate: string | null;
1734
+ referenceNumber: string | null;
1735
+ shareCode: string | null;
1736
+ nationality: string | null;
1737
+ confidence: number;
1738
+ qualificationName?: string | null | undefined;
1739
+ qualificationTypeName?: string | null | undefined;
1740
+ qualificationId?: string | null | undefined;
1741
+ qualificationTypeId?: string | null | undefined;
1742
+ qualificationIssuerText?: string | null | undefined;
1743
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1744
+ qualificationRoleText?: string | null | undefined;
1745
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1746
+ } | null;
1747
+ overridden: boolean;
1748
+ }, {
1749
+ confidence: number | null;
1750
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
1751
+ id: string;
1752
+ fileId: string;
1753
+ workerId: string | null;
1754
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1755
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
1756
+ destinationFinal: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN" | null;
1757
+ extracted: {
1758
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
1759
+ firstName: string | null;
1760
+ lastName: string | null;
1761
+ dateOfBirth: string | null;
1762
+ expiryDate: string | null;
1763
+ issueDate: string | null;
1764
+ referenceNumber: string | null;
1765
+ shareCode: string | null;
1766
+ nationality: string | null;
1767
+ confidence: number;
1768
+ qualificationName?: string | null | undefined;
1769
+ qualificationTypeName?: string | null | undefined;
1770
+ qualificationId?: string | null | undefined;
1771
+ qualificationTypeId?: string | null | undefined;
1772
+ qualificationIssuerText?: string | null | undefined;
1773
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
1774
+ qualificationRoleText?: string | null | undefined;
1775
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
1776
+ } | null;
1777
+ overridden: boolean;
1778
+ }>;
1779
+ 404: z.ZodObject<{
1780
+ statusCode: z.ZodNumber;
1781
+ message: z.ZodString;
1782
+ code: z.ZodString;
1783
+ details: z.ZodOptional<z.ZodUnknown>;
1784
+ timestamp: z.ZodString;
1785
+ path: z.ZodString;
1786
+ correlationId: z.ZodOptional<z.ZodString>;
1787
+ }, "strip", z.ZodTypeAny, {
1788
+ code: string;
1789
+ path: string;
1790
+ message: string;
1791
+ statusCode: number;
1792
+ timestamp: string;
1793
+ details?: unknown;
1794
+ correlationId?: string | undefined;
1795
+ }, {
1796
+ code: string;
1797
+ path: string;
1798
+ message: string;
1799
+ statusCode: number;
1800
+ timestamp: string;
1801
+ details?: unknown;
1802
+ correlationId?: string | undefined;
1803
+ }>;
1804
+ };
1805
+ };
1806
+ backfillSubjects: {
1807
+ metadata: {
1808
+ tags: string[];
1809
+ };
1810
+ query: z.ZodObject<{
1811
+ page: z.ZodDefault<z.ZodNumber>;
1812
+ limit: z.ZodDefault<z.ZodNumber>;
1813
+ search: z.ZodOptional<z.ZodString>;
1814
+ subjectType: z.ZodOptional<z.ZodEnum<["WORKER", "CURATED_WORKER"]>>;
1815
+ pendingKinds: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["NAME", "FILL", "REROUTE"]>, z.ZodArray<z.ZodEnum<["NAME", "FILL", "REROUTE"]>, "many">]>>, ("NAME" | "FILL" | "REROUTE")[] | undefined, "NAME" | "FILL" | "REROUTE" | ("NAME" | "FILL" | "REROUTE")[] | undefined>;
1816
+ subjectIds: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>, string[] | undefined, string | string[] | undefined>;
1817
+ }, "strip", z.ZodTypeAny, {
1818
+ page: number;
1819
+ limit: number;
1820
+ subjectType?: "WORKER" | "CURATED_WORKER" | undefined;
1821
+ pendingKinds?: ("NAME" | "FILL" | "REROUTE")[] | undefined;
1822
+ search?: string | undefined;
1823
+ subjectIds?: string[] | undefined;
1824
+ }, {
1825
+ subjectType?: "WORKER" | "CURATED_WORKER" | undefined;
1826
+ pendingKinds?: "NAME" | "FILL" | "REROUTE" | ("NAME" | "FILL" | "REROUTE")[] | undefined;
1827
+ page?: number | undefined;
1828
+ limit?: number | undefined;
1829
+ search?: string | undefined;
1830
+ subjectIds?: string | string[] | undefined;
1831
+ }>;
1832
+ summary: "List worker/curated-worker subjects with pending backfill documents awaiting review (paginated).";
1833
+ method: "GET";
1834
+ path: "/v2/document-intake/backfill/subjects";
1835
+ responses: {
1836
+ 500: z.ZodObject<{
1837
+ statusCode: z.ZodNumber;
1838
+ message: z.ZodString;
1839
+ code: z.ZodString;
1840
+ details: z.ZodOptional<z.ZodUnknown>;
1841
+ timestamp: z.ZodString;
1842
+ path: z.ZodString;
1843
+ correlationId: z.ZodOptional<z.ZodString>;
1844
+ }, "strip", z.ZodTypeAny, {
1845
+ code: string;
1846
+ path: string;
1847
+ message: string;
1848
+ statusCode: number;
1849
+ timestamp: string;
1850
+ details?: unknown;
1851
+ correlationId?: string | undefined;
1852
+ }, {
1853
+ code: string;
1854
+ path: string;
1855
+ message: string;
1856
+ statusCode: number;
1857
+ timestamp: string;
1858
+ details?: unknown;
1859
+ correlationId?: string | undefined;
1860
+ }>;
1861
+ 200: z.ZodObject<{
1862
+ items: z.ZodArray<z.ZodObject<{
1863
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
1864
+ subjectId: z.ZodString;
1865
+ subjectName: z.ZodString;
1866
+ documentCount: z.ZodNumber;
1867
+ pendingKinds: z.ZodArray<z.ZodEnum<["NAME", "FILL", "REROUTE"]>, "many">;
1868
+ oldestDocumentAt: z.ZodString;
1869
+ }, "strip", z.ZodTypeAny, {
1870
+ subjectType: "WORKER" | "CURATED_WORKER";
1871
+ subjectId: string;
1872
+ subjectName: string;
1873
+ documentCount: number;
1874
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
1875
+ oldestDocumentAt: string;
1876
+ }, {
1877
+ subjectType: "WORKER" | "CURATED_WORKER";
1878
+ subjectId: string;
1879
+ subjectName: string;
1880
+ documentCount: number;
1881
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
1882
+ oldestDocumentAt: string;
1883
+ }>, "many">;
1884
+ totalCount: z.ZodNumber;
1885
+ totalPages: z.ZodNumber;
1886
+ page: z.ZodNumber;
1887
+ limit: z.ZodNumber;
1888
+ }, "strip", z.ZodTypeAny, {
1889
+ items: {
1890
+ subjectType: "WORKER" | "CURATED_WORKER";
1891
+ subjectId: string;
1892
+ subjectName: string;
1893
+ documentCount: number;
1894
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
1895
+ oldestDocumentAt: string;
1896
+ }[];
1897
+ totalCount: number;
1898
+ totalPages: number;
1899
+ page: number;
1900
+ limit: number;
1901
+ }, {
1902
+ items: {
1903
+ subjectType: "WORKER" | "CURATED_WORKER";
1904
+ subjectId: string;
1905
+ subjectName: string;
1906
+ documentCount: number;
1907
+ pendingKinds: ("NAME" | "FILL" | "REROUTE")[];
1908
+ oldestDocumentAt: string;
1909
+ }[];
1910
+ totalCount: number;
1911
+ totalPages: number;
1912
+ page: number;
1913
+ limit: number;
1914
+ }>;
1915
+ };
1916
+ };
1917
+ backfillCandidates: {
1918
+ metadata: {
1919
+ tags: string[];
1920
+ };
1921
+ query: z.ZodObject<{
1922
+ name: z.ZodOptional<z.ZodString>;
1923
+ subjectTypes: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["WORKER", "CURATED_WORKER"]>, z.ZodArray<z.ZodEnum<["WORKER", "CURATED_WORKER"]>, "many">]>>, ("WORKER" | "CURATED_WORKER")[] | undefined, "WORKER" | "CURATED_WORKER" | ("WORKER" | "CURATED_WORKER")[] | undefined>;
1924
+ }, "strip", z.ZodTypeAny, {
1925
+ name?: string | undefined;
1926
+ subjectTypes?: ("WORKER" | "CURATED_WORKER")[] | undefined;
1927
+ }, {
1928
+ name?: string | undefined;
1929
+ subjectTypes?: "WORKER" | "CURATED_WORKER" | ("WORKER" | "CURATED_WORKER")[] | undefined;
1930
+ }>;
1931
+ summary: "List worker/curated-worker records with at least one unprocessed document (never extracted, failed, or changed since processing). Capped at 50.";
1932
+ method: "GET";
1933
+ path: "/v2/document-intake/backfill/candidates";
1934
+ responses: {
1935
+ 500: z.ZodObject<{
1936
+ statusCode: z.ZodNumber;
1937
+ message: z.ZodString;
1938
+ code: z.ZodString;
1939
+ details: z.ZodOptional<z.ZodUnknown>;
1940
+ timestamp: z.ZodString;
1941
+ path: z.ZodString;
1942
+ correlationId: z.ZodOptional<z.ZodString>;
1943
+ }, "strip", z.ZodTypeAny, {
1944
+ code: string;
1945
+ path: string;
1946
+ message: string;
1947
+ statusCode: number;
1948
+ timestamp: string;
1949
+ details?: unknown;
1950
+ correlationId?: string | undefined;
1951
+ }, {
1952
+ code: string;
1953
+ path: string;
1954
+ message: string;
1955
+ statusCode: number;
1956
+ timestamp: string;
1957
+ details?: unknown;
1958
+ correlationId?: string | undefined;
1959
+ }>;
1960
+ 200: z.ZodObject<{
1961
+ items: z.ZodArray<z.ZodObject<{
1962
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
1963
+ subjectId: z.ZodString;
1964
+ name: z.ZodString;
1965
+ email: z.ZodNullable<z.ZodString>;
1966
+ unprocessedCount: z.ZodNumber;
1967
+ }, "strip", z.ZodTypeAny, {
1968
+ subjectType: "WORKER" | "CURATED_WORKER";
1969
+ subjectId: string;
1970
+ name: string;
1971
+ email: string | null;
1972
+ unprocessedCount: number;
1973
+ }, {
1974
+ subjectType: "WORKER" | "CURATED_WORKER";
1975
+ subjectId: string;
1976
+ name: string;
1977
+ email: string | null;
1978
+ unprocessedCount: number;
1979
+ }>, "many">;
1980
+ }, "strip", z.ZodTypeAny, {
1981
+ items: {
1982
+ subjectType: "WORKER" | "CURATED_WORKER";
1983
+ subjectId: string;
1984
+ name: string;
1985
+ email: string | null;
1986
+ unprocessedCount: number;
1987
+ }[];
1988
+ }, {
1989
+ items: {
1990
+ subjectType: "WORKER" | "CURATED_WORKER";
1991
+ subjectId: string;
1992
+ name: string;
1993
+ email: string | null;
1994
+ unprocessedCount: number;
1995
+ }[];
1996
+ }>;
1997
+ };
1998
+ };
1999
+ startBackfillJob: {
2000
+ metadata: {
2001
+ tags: string[];
2002
+ };
2003
+ summary: "Queue immediate document extraction/evaluation for selected workers and curated workers.";
2004
+ method: "POST";
2005
+ body: z.ZodEffects<z.ZodObject<{
2006
+ workerIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2007
+ curatedWorkerIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2008
+ }, "strip", z.ZodTypeAny, {
2009
+ workerIds?: string[] | undefined;
2010
+ curatedWorkerIds?: string[] | undefined;
2011
+ }, {
2012
+ workerIds?: string[] | undefined;
2013
+ curatedWorkerIds?: string[] | undefined;
2014
+ }>, {
2015
+ workerIds?: string[] | undefined;
2016
+ curatedWorkerIds?: string[] | undefined;
2017
+ }, {
2018
+ workerIds?: string[] | undefined;
2019
+ curatedWorkerIds?: string[] | undefined;
2020
+ }>;
2021
+ path: "/v2/document-intake/backfill/jobs";
2022
+ responses: {
2023
+ 500: z.ZodObject<{
2024
+ statusCode: z.ZodNumber;
2025
+ message: z.ZodString;
2026
+ code: z.ZodString;
2027
+ details: z.ZodOptional<z.ZodUnknown>;
2028
+ timestamp: z.ZodString;
2029
+ path: z.ZodString;
2030
+ correlationId: z.ZodOptional<z.ZodString>;
2031
+ }, "strip", z.ZodTypeAny, {
2032
+ code: string;
2033
+ path: string;
2034
+ message: string;
2035
+ statusCode: number;
2036
+ timestamp: string;
2037
+ details?: unknown;
2038
+ correlationId?: string | undefined;
2039
+ }, {
2040
+ code: string;
2041
+ path: string;
2042
+ message: string;
2043
+ statusCode: number;
2044
+ timestamp: string;
2045
+ details?: unknown;
2046
+ correlationId?: string | undefined;
2047
+ }>;
2048
+ 202: z.ZodObject<{
2049
+ id: z.ZodString;
2050
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
2051
+ createdAt: z.ZodString;
2052
+ startedAt: z.ZodNullable<z.ZodString>;
2053
+ finishedAt: z.ZodNullable<z.ZodString>;
2054
+ workers: z.ZodArray<z.ZodObject<{
2055
+ workerId: z.ZodString;
2056
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
2057
+ scanned: z.ZodNumber;
2058
+ queuedForReview: z.ZodNumber;
2059
+ failed: z.ZodNumber;
2060
+ error: z.ZodNullable<z.ZodString>;
2061
+ }, "strip", z.ZodTypeAny, {
2062
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2063
+ workerId: string;
2064
+ scanned: number;
2065
+ queuedForReview: number;
2066
+ failed: number;
2067
+ error: string | null;
2068
+ }, {
2069
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2070
+ workerId: string;
2071
+ scanned: number;
2072
+ queuedForReview: number;
2073
+ failed: number;
2074
+ error: string | null;
2075
+ }>, "many">;
2076
+ curatedWorkers: z.ZodDefault<z.ZodArray<z.ZodObject<{
2077
+ curatedWorkerId: z.ZodString;
2078
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
2079
+ scanned: z.ZodNumber;
2080
+ queuedForReview: z.ZodNumber;
2081
+ failed: z.ZodNumber;
2082
+ error: z.ZodNullable<z.ZodString>;
2083
+ }, "strip", z.ZodTypeAny, {
2084
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2085
+ scanned: number;
2086
+ queuedForReview: number;
2087
+ failed: number;
2088
+ error: string | null;
2089
+ curatedWorkerId: string;
2090
+ }, {
2091
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2092
+ scanned: number;
2093
+ queuedForReview: number;
2094
+ failed: number;
2095
+ error: string | null;
2096
+ curatedWorkerId: string;
2097
+ }>, "many">>;
2098
+ }, "strip", z.ZodTypeAny, {
2099
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2100
+ id: string;
2101
+ createdAt: string;
2102
+ startedAt: string | null;
2103
+ finishedAt: string | null;
2104
+ workers: {
2105
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2106
+ workerId: string;
2107
+ scanned: number;
2108
+ queuedForReview: number;
2109
+ failed: number;
2110
+ error: string | null;
2111
+ }[];
2112
+ curatedWorkers: {
2113
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2114
+ scanned: number;
2115
+ queuedForReview: number;
2116
+ failed: number;
2117
+ error: string | null;
2118
+ curatedWorkerId: string;
2119
+ }[];
2120
+ }, {
2121
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2122
+ id: string;
2123
+ createdAt: string;
2124
+ startedAt: string | null;
2125
+ finishedAt: string | null;
2126
+ workers: {
2127
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2128
+ workerId: string;
2129
+ scanned: number;
2130
+ queuedForReview: number;
2131
+ failed: number;
2132
+ error: string | null;
2133
+ }[];
2134
+ curatedWorkers?: {
2135
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2136
+ scanned: number;
2137
+ queuedForReview: number;
2138
+ failed: number;
2139
+ error: string | null;
2140
+ curatedWorkerId: string;
2141
+ }[] | undefined;
2142
+ }>;
2143
+ };
2144
+ };
2145
+ getBackfillJob: {
2146
+ metadata: {
2147
+ tags: string[];
2148
+ };
2149
+ pathParams: z.ZodObject<{
2150
+ jobId: z.ZodString;
2151
+ }, "strip", z.ZodTypeAny, {
2152
+ jobId: string;
2153
+ }, {
2154
+ jobId: string;
2155
+ }>;
2156
+ summary: "Get per-record progress for a targeted document backfill job.";
2157
+ method: "GET";
2158
+ path: "/v2/document-intake/backfill/jobs/:jobId";
2159
+ responses: {
2160
+ 500: z.ZodObject<{
2161
+ statusCode: z.ZodNumber;
2162
+ message: z.ZodString;
2163
+ code: z.ZodString;
2164
+ details: z.ZodOptional<z.ZodUnknown>;
2165
+ timestamp: z.ZodString;
2166
+ path: z.ZodString;
2167
+ correlationId: z.ZodOptional<z.ZodString>;
2168
+ }, "strip", z.ZodTypeAny, {
2169
+ code: string;
2170
+ path: string;
2171
+ message: string;
2172
+ statusCode: number;
2173
+ timestamp: string;
2174
+ details?: unknown;
2175
+ correlationId?: string | undefined;
2176
+ }, {
2177
+ code: string;
2178
+ path: string;
2179
+ message: string;
2180
+ statusCode: number;
2181
+ timestamp: string;
2182
+ details?: unknown;
2183
+ correlationId?: string | undefined;
2184
+ }>;
2185
+ 200: z.ZodObject<{
2186
+ id: z.ZodString;
2187
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
2188
+ createdAt: z.ZodString;
2189
+ startedAt: z.ZodNullable<z.ZodString>;
2190
+ finishedAt: z.ZodNullable<z.ZodString>;
2191
+ workers: z.ZodArray<z.ZodObject<{
2192
+ workerId: z.ZodString;
2193
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
2194
+ scanned: z.ZodNumber;
2195
+ queuedForReview: z.ZodNumber;
2196
+ failed: z.ZodNumber;
2197
+ error: z.ZodNullable<z.ZodString>;
2198
+ }, "strip", z.ZodTypeAny, {
2199
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2200
+ workerId: string;
2201
+ scanned: number;
2202
+ queuedForReview: number;
2203
+ failed: number;
2204
+ error: string | null;
2205
+ }, {
2206
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2207
+ workerId: string;
2208
+ scanned: number;
2209
+ queuedForReview: number;
2210
+ failed: number;
2211
+ error: string | null;
2212
+ }>, "many">;
2213
+ curatedWorkers: z.ZodDefault<z.ZodArray<z.ZodObject<{
2214
+ curatedWorkerId: z.ZodString;
2215
+ status: z.ZodEnum<["QUEUED", "PROCESSING", "COMPLETED", "FAILED"]>;
2216
+ scanned: z.ZodNumber;
2217
+ queuedForReview: z.ZodNumber;
2218
+ failed: z.ZodNumber;
2219
+ error: z.ZodNullable<z.ZodString>;
2220
+ }, "strip", z.ZodTypeAny, {
2221
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2222
+ scanned: number;
2223
+ queuedForReview: number;
2224
+ failed: number;
2225
+ error: string | null;
2226
+ curatedWorkerId: string;
2227
+ }, {
2228
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2229
+ scanned: number;
2230
+ queuedForReview: number;
2231
+ failed: number;
2232
+ error: string | null;
2233
+ curatedWorkerId: string;
2234
+ }>, "many">>;
2235
+ }, "strip", z.ZodTypeAny, {
2236
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2237
+ id: string;
2238
+ createdAt: string;
2239
+ startedAt: string | null;
2240
+ finishedAt: string | null;
2241
+ workers: {
2242
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2243
+ workerId: string;
2244
+ scanned: number;
2245
+ queuedForReview: number;
2246
+ failed: number;
2247
+ error: string | null;
2248
+ }[];
2249
+ curatedWorkers: {
2250
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2251
+ scanned: number;
2252
+ queuedForReview: number;
2253
+ failed: number;
2254
+ error: string | null;
2255
+ curatedWorkerId: string;
2256
+ }[];
2257
+ }, {
2258
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2259
+ id: string;
2260
+ createdAt: string;
2261
+ startedAt: string | null;
2262
+ finishedAt: string | null;
2263
+ workers: {
2264
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2265
+ workerId: string;
2266
+ scanned: number;
2267
+ queuedForReview: number;
2268
+ failed: number;
2269
+ error: string | null;
2270
+ }[];
2271
+ curatedWorkers?: {
2272
+ status: "FAILED" | "QUEUED" | "PROCESSING" | "COMPLETED";
2273
+ scanned: number;
2274
+ queuedForReview: number;
2275
+ failed: number;
2276
+ error: string | null;
2277
+ curatedWorkerId: string;
2278
+ }[] | undefined;
2279
+ }>;
2280
+ 404: z.ZodObject<{
2281
+ statusCode: z.ZodNumber;
2282
+ message: z.ZodString;
2283
+ code: z.ZodString;
2284
+ details: z.ZodOptional<z.ZodUnknown>;
2285
+ timestamp: z.ZodString;
2286
+ path: z.ZodString;
2287
+ correlationId: z.ZodOptional<z.ZodString>;
2288
+ }, "strip", z.ZodTypeAny, {
2289
+ code: string;
2290
+ path: string;
2291
+ message: string;
2292
+ statusCode: number;
2293
+ timestamp: string;
2294
+ details?: unknown;
2295
+ correlationId?: string | undefined;
2296
+ }, {
2297
+ code: string;
2298
+ path: string;
2299
+ message: string;
2300
+ statusCode: number;
2301
+ timestamp: string;
2302
+ details?: unknown;
2303
+ correlationId?: string | undefined;
2304
+ }>;
2305
+ };
2306
+ };
2307
+ backfillSubject: {
2308
+ metadata: {
2309
+ tags: string[];
2310
+ };
2311
+ pathParams: z.ZodObject<{
2312
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
2313
+ subjectId: z.ZodString;
2314
+ }, "strip", z.ZodTypeAny, {
2315
+ subjectType: "WORKER" | "CURATED_WORKER";
2316
+ subjectId: string;
2317
+ }, {
2318
+ subjectType: "WORKER" | "CURATED_WORKER";
2319
+ subjectId: string;
2320
+ }>;
2321
+ summary: "Fetch a subject plus all of its pending backfill documents for consolidated review.";
2322
+ method: "GET";
2323
+ path: "/v2/document-intake/backfill/subjects/:subjectType/:subjectId";
2324
+ responses: {
2325
+ 500: z.ZodObject<{
2326
+ statusCode: z.ZodNumber;
2327
+ message: z.ZodString;
2328
+ code: z.ZodString;
2329
+ details: z.ZodOptional<z.ZodUnknown>;
2330
+ timestamp: z.ZodString;
2331
+ path: z.ZodString;
2332
+ correlationId: z.ZodOptional<z.ZodString>;
2333
+ }, "strip", z.ZodTypeAny, {
2334
+ code: string;
2335
+ path: string;
2336
+ message: string;
2337
+ statusCode: number;
2338
+ timestamp: string;
2339
+ details?: unknown;
2340
+ correlationId?: string | undefined;
2341
+ }, {
2342
+ code: string;
2343
+ path: string;
2344
+ message: string;
2345
+ statusCode: number;
2346
+ timestamp: string;
2347
+ details?: unknown;
2348
+ correlationId?: string | undefined;
2349
+ }>;
2350
+ 200: z.ZodObject<{
2351
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
2352
+ subjectId: z.ZodString;
2353
+ subjectName: z.ZodString;
2354
+ current: z.ZodObject<{
2355
+ firstName: z.ZodNullable<z.ZodString>;
2356
+ lastName: z.ZodNullable<z.ZodString>;
2357
+ dateOfBirth: z.ZodNullable<z.ZodString>;
2358
+ nationality: z.ZodNullable<z.ZodString>;
2359
+ shareCode: z.ZodNullable<z.ZodObject<{
2360
+ code: z.ZodNullable<z.ZodString>;
2361
+ expiryDate: z.ZodNullable<z.ZodString>;
2362
+ }, "strip", z.ZodTypeAny, {
2363
+ expiryDate: string | null;
2364
+ code: string | null;
2365
+ }, {
2366
+ expiryDate: string | null;
2367
+ code: string | null;
2368
+ }>>;
2369
+ }, "strip", z.ZodTypeAny, {
2370
+ firstName: string | null;
2371
+ lastName: string | null;
2372
+ dateOfBirth: string | null;
2373
+ shareCode: {
2374
+ expiryDate: string | null;
2375
+ code: string | null;
2376
+ } | null;
2377
+ nationality: string | null;
2378
+ }, {
2379
+ firstName: string | null;
2380
+ lastName: string | null;
2381
+ dateOfBirth: string | null;
2382
+ shareCode: {
2383
+ expiryDate: string | null;
2384
+ code: string | null;
2385
+ } | null;
2386
+ nationality: string | null;
2387
+ }>;
2388
+ documents: z.ZodArray<z.ZodObject<{
2389
+ recordId: z.ZodString;
2390
+ fileId: z.ZodString;
2391
+ originalName: z.ZodNullable<z.ZodString>;
2392
+ mimeType: z.ZodNullable<z.ZodString>;
2393
+ sourceType: z.ZodEnum<["DROPZONE", "WORKER_ID_DOCUMENT", "CURATED_ID_DOCUMENT", "QUALIFICATION_PROOF"]>;
2394
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
2395
+ reviewable: z.ZodBoolean;
2396
+ evaluatedAt: z.ZodNullable<z.ZodString>;
2397
+ currentlyFiledAs: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION"]>;
2398
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
2399
+ destinationSuggested: z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE", "UNKNOWN"]>;
2400
+ confidence: z.ZodNullable<z.ZodNumber>;
2401
+ extracted: z.ZodNullable<z.ZodObject<{
2402
+ documentType: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
2403
+ firstName: z.ZodNullable<z.ZodString>;
2404
+ lastName: z.ZodNullable<z.ZodString>;
2405
+ dateOfBirth: z.ZodNullable<z.ZodString>;
2406
+ expiryDate: z.ZodNullable<z.ZodString>;
2407
+ issueDate: z.ZodNullable<z.ZodString>;
2408
+ referenceNumber: z.ZodNullable<z.ZodString>;
2409
+ shareCode: z.ZodNullable<z.ZodString>;
2410
+ nationality: z.ZodNullable<z.ZodString>;
2411
+ qualificationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2412
+ qualificationTypeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2413
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2414
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2415
+ qualificationIssuerText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2416
+ qualificationCardColour: z.ZodOptional<z.ZodNullable<z.ZodEnum<["green", "blue", "gold", "black", "white", "red"]>>>;
2417
+ qualificationRoleText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2418
+ qualificationMatchMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["catalogue_exact", "scheme_rule", "none"]>>>;
2419
+ confidence: z.ZodNumber;
2420
+ }, "strip", z.ZodTypeAny, {
2421
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2422
+ firstName: string | null;
2423
+ lastName: string | null;
2424
+ dateOfBirth: string | null;
2425
+ expiryDate: string | null;
2426
+ issueDate: string | null;
2427
+ referenceNumber: string | null;
2428
+ shareCode: string | null;
2429
+ nationality: string | null;
2430
+ confidence: number;
2431
+ qualificationName?: string | null | undefined;
2432
+ qualificationTypeName?: string | null | undefined;
2433
+ qualificationId?: string | null | undefined;
2434
+ qualificationTypeId?: string | null | undefined;
2435
+ qualificationIssuerText?: string | null | undefined;
2436
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
2437
+ qualificationRoleText?: string | null | undefined;
2438
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
2439
+ }, {
2440
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2441
+ firstName: string | null;
2442
+ lastName: string | null;
2443
+ dateOfBirth: string | null;
2444
+ expiryDate: string | null;
2445
+ issueDate: string | null;
2446
+ referenceNumber: string | null;
2447
+ shareCode: string | null;
2448
+ nationality: string | null;
2449
+ confidence: number;
2450
+ qualificationName?: string | null | undefined;
2451
+ qualificationTypeName?: string | null | undefined;
2452
+ qualificationId?: string | null | undefined;
2453
+ qualificationTypeId?: string | null | undefined;
2454
+ qualificationIssuerText?: string | null | undefined;
2455
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
2456
+ qualificationRoleText?: string | null | undefined;
2457
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
2458
+ }>>;
2459
+ currentQualificationId: z.ZodNullable<z.ZodString>;
2460
+ currentQualificationName: z.ZodNullable<z.ZodString>;
2461
+ sourceRow: z.ZodNullable<z.ZodObject<{
2462
+ documentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2463
+ documentNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2464
+ expiryDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2465
+ issueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2466
+ referenceNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2467
+ }, "strip", z.ZodTypeAny, {
2468
+ documentType?: string | null | undefined;
2469
+ expiryDate?: string | null | undefined;
2470
+ issueDate?: string | null | undefined;
2471
+ referenceNumber?: string | null | undefined;
2472
+ documentNumber?: string | null | undefined;
2473
+ }, {
2474
+ documentType?: string | null | undefined;
2475
+ expiryDate?: string | null | undefined;
2476
+ issueDate?: string | null | undefined;
2477
+ referenceNumber?: string | null | undefined;
2478
+ documentNumber?: string | null | undefined;
2479
+ }>>;
2480
+ createdAt: z.ZodString;
2481
+ }, "strip", z.ZodTypeAny, {
2482
+ confidence: number | null;
2483
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
2484
+ fileId: string;
2485
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2486
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
2487
+ extracted: {
2488
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2489
+ firstName: string | null;
2490
+ lastName: string | null;
2491
+ dateOfBirth: string | null;
2492
+ expiryDate: string | null;
2493
+ issueDate: string | null;
2494
+ referenceNumber: string | null;
2495
+ shareCode: string | null;
2496
+ nationality: string | null;
2497
+ confidence: number;
2498
+ qualificationName?: string | null | undefined;
2499
+ qualificationTypeName?: string | null | undefined;
2500
+ qualificationId?: string | null | undefined;
2501
+ qualificationTypeId?: string | null | undefined;
2502
+ qualificationIssuerText?: string | null | undefined;
2503
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
2504
+ qualificationRoleText?: string | null | undefined;
2505
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
2506
+ } | null;
2507
+ createdAt: string;
2508
+ recordId: string;
2509
+ originalName: string | null;
2510
+ mimeType: string | null;
2511
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
2512
+ reviewable: boolean;
2513
+ evaluatedAt: string | null;
2514
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
2515
+ currentQualificationId: string | null;
2516
+ currentQualificationName: string | null;
2517
+ sourceRow: {
2518
+ documentType?: string | null | undefined;
2519
+ expiryDate?: string | null | undefined;
2520
+ issueDate?: string | null | undefined;
2521
+ referenceNumber?: string | null | undefined;
2522
+ documentNumber?: string | null | undefined;
2523
+ } | null;
2524
+ }, {
2525
+ confidence: number | null;
2526
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
2527
+ fileId: string;
2528
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2529
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
2530
+ extracted: {
2531
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2532
+ firstName: string | null;
2533
+ lastName: string | null;
2534
+ dateOfBirth: string | null;
2535
+ expiryDate: string | null;
2536
+ issueDate: string | null;
2537
+ referenceNumber: string | null;
2538
+ shareCode: string | null;
2539
+ nationality: string | null;
2540
+ confidence: number;
2541
+ qualificationName?: string | null | undefined;
2542
+ qualificationTypeName?: string | null | undefined;
2543
+ qualificationId?: string | null | undefined;
2544
+ qualificationTypeId?: string | null | undefined;
2545
+ qualificationIssuerText?: string | null | undefined;
2546
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
2547
+ qualificationRoleText?: string | null | undefined;
2548
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
2549
+ } | null;
2550
+ createdAt: string;
2551
+ recordId: string;
2552
+ originalName: string | null;
2553
+ mimeType: string | null;
2554
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
2555
+ reviewable: boolean;
2556
+ evaluatedAt: string | null;
2557
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
2558
+ currentQualificationId: string | null;
2559
+ currentQualificationName: string | null;
2560
+ sourceRow: {
2561
+ documentType?: string | null | undefined;
2562
+ expiryDate?: string | null | undefined;
2563
+ issueDate?: string | null | undefined;
2564
+ referenceNumber?: string | null | undefined;
2565
+ documentNumber?: string | null | undefined;
2566
+ } | null;
2567
+ }>, "many">;
2568
+ }, "strip", z.ZodTypeAny, {
2569
+ subjectType: "WORKER" | "CURATED_WORKER";
2570
+ subjectId: string;
2571
+ subjectName: string;
2572
+ current: {
2573
+ firstName: string | null;
2574
+ lastName: string | null;
2575
+ dateOfBirth: string | null;
2576
+ shareCode: {
2577
+ expiryDate: string | null;
2578
+ code: string | null;
2579
+ } | null;
2580
+ nationality: string | null;
2581
+ };
2582
+ documents: {
2583
+ confidence: number | null;
2584
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
2585
+ fileId: string;
2586
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2587
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
2588
+ extracted: {
2589
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2590
+ firstName: string | null;
2591
+ lastName: string | null;
2592
+ dateOfBirth: string | null;
2593
+ expiryDate: string | null;
2594
+ issueDate: string | null;
2595
+ referenceNumber: string | null;
2596
+ shareCode: string | null;
2597
+ nationality: string | null;
2598
+ confidence: number;
2599
+ qualificationName?: string | null | undefined;
2600
+ qualificationTypeName?: string | null | undefined;
2601
+ qualificationId?: string | null | undefined;
2602
+ qualificationTypeId?: string | null | undefined;
2603
+ qualificationIssuerText?: string | null | undefined;
2604
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
2605
+ qualificationRoleText?: string | null | undefined;
2606
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
2607
+ } | null;
2608
+ createdAt: string;
2609
+ recordId: string;
2610
+ originalName: string | null;
2611
+ mimeType: string | null;
2612
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
2613
+ reviewable: boolean;
2614
+ evaluatedAt: string | null;
2615
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
2616
+ currentQualificationId: string | null;
2617
+ currentQualificationName: string | null;
2618
+ sourceRow: {
2619
+ documentType?: string | null | undefined;
2620
+ expiryDate?: string | null | undefined;
2621
+ issueDate?: string | null | undefined;
2622
+ referenceNumber?: string | null | undefined;
2623
+ documentNumber?: string | null | undefined;
2624
+ } | null;
2625
+ }[];
2626
+ }, {
2627
+ subjectType: "WORKER" | "CURATED_WORKER";
2628
+ subjectId: string;
2629
+ subjectName: string;
2630
+ current: {
2631
+ firstName: string | null;
2632
+ lastName: string | null;
2633
+ dateOfBirth: string | null;
2634
+ shareCode: {
2635
+ expiryDate: string | null;
2636
+ code: string | null;
2637
+ } | null;
2638
+ nationality: string | null;
2639
+ };
2640
+ documents: {
2641
+ confidence: number | null;
2642
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
2643
+ fileId: string;
2644
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2645
+ destinationSuggested: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | "UNKNOWN";
2646
+ extracted: {
2647
+ documentType: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
2648
+ firstName: string | null;
2649
+ lastName: string | null;
2650
+ dateOfBirth: string | null;
2651
+ expiryDate: string | null;
2652
+ issueDate: string | null;
2653
+ referenceNumber: string | null;
2654
+ shareCode: string | null;
2655
+ nationality: string | null;
2656
+ confidence: number;
2657
+ qualificationName?: string | null | undefined;
2658
+ qualificationTypeName?: string | null | undefined;
2659
+ qualificationId?: string | null | undefined;
2660
+ qualificationTypeId?: string | null | undefined;
2661
+ qualificationIssuerText?: string | null | undefined;
2662
+ qualificationCardColour?: "green" | "blue" | "gold" | "black" | "white" | "red" | null | undefined;
2663
+ qualificationRoleText?: string | null | undefined;
2664
+ qualificationMatchMethod?: "catalogue_exact" | "scheme_rule" | "none" | null | undefined;
2665
+ } | null;
2666
+ createdAt: string;
2667
+ recordId: string;
2668
+ originalName: string | null;
2669
+ mimeType: string | null;
2670
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
2671
+ reviewable: boolean;
2672
+ evaluatedAt: string | null;
2673
+ currentlyFiledAs: "ID_DOCUMENT" | "QUALIFICATION";
2674
+ currentQualificationId: string | null;
2675
+ currentQualificationName: string | null;
2676
+ sourceRow: {
2677
+ documentType?: string | null | undefined;
2678
+ expiryDate?: string | null | undefined;
2679
+ issueDate?: string | null | undefined;
2680
+ referenceNumber?: string | null | undefined;
2681
+ documentNumber?: string | null | undefined;
2682
+ } | null;
2683
+ }[];
2684
+ }>;
2685
+ 404: z.ZodObject<{
2686
+ statusCode: z.ZodNumber;
2687
+ message: z.ZodString;
2688
+ code: z.ZodString;
2689
+ details: z.ZodOptional<z.ZodUnknown>;
2690
+ timestamp: z.ZodString;
2691
+ path: z.ZodString;
2692
+ correlationId: z.ZodOptional<z.ZodString>;
2693
+ }, "strip", z.ZodTypeAny, {
2694
+ code: string;
2695
+ path: string;
2696
+ message: string;
2697
+ statusCode: number;
2698
+ timestamp: string;
2699
+ details?: unknown;
2700
+ correlationId?: string | undefined;
2701
+ }, {
2702
+ code: string;
2703
+ path: string;
2704
+ message: string;
2705
+ statusCode: number;
2706
+ timestamp: string;
2707
+ details?: unknown;
2708
+ correlationId?: string | undefined;
2709
+ }>;
2710
+ };
2711
+ };
2712
+ backfillApply: {
2713
+ metadata: {
2714
+ tags: string[];
2715
+ };
2716
+ pathParams: z.ZodObject<{
2717
+ subjectType: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
2718
+ subjectId: z.ZodString;
2719
+ }, "strip", z.ZodTypeAny, {
2720
+ subjectType: "WORKER" | "CURATED_WORKER";
2721
+ subjectId: string;
2722
+ }, {
2723
+ subjectType: "WORKER" | "CURATED_WORKER";
2724
+ subjectId: string;
2725
+ }>;
2726
+ summary: "Consolidated per-subject apply: one transaction over every pending document plus the subject scalar fields.";
2727
+ method: "POST";
2728
+ body: z.ZodEffects<z.ZodObject<{
2729
+ fields: z.ZodObject<{
2730
+ firstName: z.ZodOptional<z.ZodString>;
2731
+ lastName: z.ZodOptional<z.ZodString>;
2732
+ dateOfBirth: z.ZodOptional<z.ZodString>;
2733
+ nationality: z.ZodOptional<z.ZodEnum<["AFGHAN", "ALBANIAN", "ALGERIAN", "AMERICAN", "ANDORRAN", "ANGOLAN", "ANTIGUANS", "ARGENTINEAN", "ARMENIAN", "AUSTRALIAN", "AUSTRIAN", "AZERBAIJANI", "BAHAMIAN", "BAHRAINI", "BANGLADESHI", "BARBADIAN", "BARBUDANS", "BELARUSIAN", "BELGIAN", "BELIZEAN", "BENINESE", "BHUTANESE", "BOLIVIAN", "BOSNIAN", "BRAZILIAN", "BRITISH", "BRUNEIAN", "BULGARIAN", "BURKINABE", "BURMESE", "BURUNDIAN", "CAMBODIAN", "CAMEROONIAN", "CANADIAN", "CAPE_VERDEAN", "CENTRAL_AFRICAN", "CHADIAN", "CHILEAN", "CHINESE", "COLOMBIAN", "COMORAN", "CONGOLESE", "COSTA_RICAN", "CROATIAN", "CUBAN", "CYPRIOT", "CZECH", "DANISH", "DJIBOUTI", "DOMINICAN", "DUTCH", "EAST_TIMORESE", "ECUADOREAN", "EGYPTIAN", "EMIRIAN", "EQUATORIAL_GUINEAN", "ERITREAN", "ESTONIAN", "ETHIOPIAN", "FIJIAN", "FILIPINO", "FINNISH", "FRENCH", "GABONESE", "GAMBIAN", "GEORGIAN", "GERMAN", "GHANAIAN", "GREEK", "GRENADIAN", "GUATEMALAN", "GUINEA_BISSAUAN", "GUINEAN", "GUYANESE", "HAITIAN", "HERZEGOVINIAN", "HONDURAN", "HUNGARIAN", "ICELANDER", "INDIAN", "INDONESIAN", "IRANIAN", "IRAQI", "IRISH", "ISRAELI", "ITALIAN", "IVORIAN", "JAMAICAN", "JAPANESE", "JORDANIAN", "KAZAKHSTANI", "KENYAN", "KITTIAN_AND_NEVISIAN", "KUWAITI", "KYRGYZ", "LAOTIAN", "LATVIAN", "LEBANESE", "LIBERIAN", "LIBYAN", "LIECHTENSTEINER", "LITHUANIAN", "LUXEMBOURGER", "MACEDONIAN", "MALAGASY", "MALAWIAN", "MALAYSIAN", "MALDIVAN", "MALIAN", "MALTESE", "MARSHALLESE", "MAURITANIAN", "MAURITIAN", "MEXICAN", "MICRONESIAN", "MOLDOVAN", "MONACAN", "MONGOLIAN", "MOROCCAN", "MOSOTHO", "MOTSWANA", "MOZAMBICAN", "NAMIBIAN", "NAURUAN", "NEPALESE", "NEW_ZEALANDER", "NI_VANUATU", "NICARAGUAN", "NIGERIEN", "NIGERIAN", "NORTH_KOREAN", "NORTHERN_IRISH", "NORWEGIAN", "OMANI", "PAKISTANI", "PALAUAN", "PANAMANIAN", "PAPUA_NEW_GUINEAN", "PARAGUAYAN", "PERUVIAN", "POLISH", "PORTUGUESE", "QATARI", "ROMANIAN", "RUSSIAN", "RWANDAN", "SAINT_LUCIAN", "SALVADORAN", "SAMOAN", "SAN_MARINESE", "SAO_TOMEAN", "SAUDI", "SCOTTISH", "SENEGALESE", "SERBIAN", "SEYCHELLOIS", "SIERRA_LEONEAN", "SINGAPOREAN", "SLOVAKIAN", "SLOVENIAN", "SOLOMON_ISLANDER", "SOMALI", "SOUTH_AFRICAN", "SOUTH_KOREAN", "SOUTH_SUDANESE", "SPANISH", "SRI_LANKAN", "SUDANESE", "SURINAMER", "SWAZI", "SWEDISH", "SWISS", "SYRIAN", "TAIWANESE", "TAJIK", "TANZANIAN", "THAI", "TOGOLESE", "TONGAN", "TRINIDADIAN_OR_TOBAGONIAN", "TUNISIAN", "TURKISH", "TUVALUAN", "UGANDAN", "UKRAINIAN", "URUGUAYAN", "UZBEKISTANI", "VENEZUELAN", "VIETNAMESE", "WELSH", "YEMENITE", "ZAMBIAN", "ZIMBABWEAN"]>>;
2734
+ }, "strip", z.ZodTypeAny, {
2735
+ firstName?: string | undefined;
2736
+ lastName?: string | undefined;
2737
+ dateOfBirth?: string | undefined;
2738
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
2739
+ }, {
2740
+ firstName?: string | undefined;
2741
+ lastName?: string | undefined;
2742
+ dateOfBirth?: string | undefined;
2743
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
2744
+ }>;
2745
+ fieldSources: z.ZodObject<{
2746
+ firstName: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2747
+ lastName: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2748
+ dateOfBirth: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2749
+ nationality: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2750
+ }, "strip", z.ZodTypeAny, {
2751
+ firstName?: string[] | undefined;
2752
+ lastName?: string[] | undefined;
2753
+ dateOfBirth?: string[] | undefined;
2754
+ nationality?: string[] | undefined;
2755
+ }, {
2756
+ firstName?: string[] | undefined;
2757
+ lastName?: string[] | undefined;
2758
+ dateOfBirth?: string[] | undefined;
2759
+ nationality?: string[] | undefined;
2760
+ }>;
2761
+ documents: z.ZodArray<z.ZodObject<{
2762
+ recordId: z.ZodString;
2763
+ action: z.ZodEnum<["KEEP", "REROUTE", "DISMISS"]>;
2764
+ destination: z.ZodOptional<z.ZodEnum<["ID_DOCUMENT", "QUALIFICATION", "SHARE_CODE"]>>;
2765
+ qualificationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2766
+ qualificationTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2767
+ }, "strip", z.ZodTypeAny, {
2768
+ recordId: string;
2769
+ action: "REROUTE" | "KEEP" | "DISMISS";
2770
+ qualificationId?: string | null | undefined;
2771
+ qualificationTypeId?: string | null | undefined;
2772
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
2773
+ }, {
2774
+ recordId: string;
2775
+ action: "REROUTE" | "KEEP" | "DISMISS";
2776
+ qualificationId?: string | null | undefined;
2777
+ qualificationTypeId?: string | null | undefined;
2778
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
2779
+ }>, "many">;
2780
+ }, "strip", z.ZodTypeAny, {
2781
+ documents: {
2782
+ recordId: string;
2783
+ action: "REROUTE" | "KEEP" | "DISMISS";
2784
+ qualificationId?: string | null | undefined;
2785
+ qualificationTypeId?: string | null | undefined;
2786
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
2787
+ }[];
2788
+ fields: {
2789
+ firstName?: string | undefined;
2790
+ lastName?: string | undefined;
2791
+ dateOfBirth?: string | undefined;
2792
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
2793
+ };
2794
+ fieldSources: {
2795
+ firstName?: string[] | undefined;
2796
+ lastName?: string[] | undefined;
2797
+ dateOfBirth?: string[] | undefined;
2798
+ nationality?: string[] | undefined;
2799
+ };
2800
+ }, {
2801
+ documents: {
2802
+ recordId: string;
2803
+ action: "REROUTE" | "KEEP" | "DISMISS";
2804
+ qualificationId?: string | null | undefined;
2805
+ qualificationTypeId?: string | null | undefined;
2806
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
2807
+ }[];
2808
+ fields: {
2809
+ firstName?: string | undefined;
2810
+ lastName?: string | undefined;
2811
+ dateOfBirth?: string | undefined;
2812
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
2813
+ };
2814
+ fieldSources: {
2815
+ firstName?: string[] | undefined;
2816
+ lastName?: string[] | undefined;
2817
+ dateOfBirth?: string[] | undefined;
2818
+ nationality?: string[] | undefined;
2819
+ };
2820
+ }>, {
2821
+ documents: {
2822
+ recordId: string;
2823
+ action: "REROUTE" | "KEEP" | "DISMISS";
2824
+ qualificationId?: string | null | undefined;
2825
+ qualificationTypeId?: string | null | undefined;
2826
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
2827
+ }[];
2828
+ fields: {
2829
+ firstName?: string | undefined;
2830
+ lastName?: string | undefined;
2831
+ dateOfBirth?: string | undefined;
2832
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
2833
+ };
2834
+ fieldSources: {
2835
+ firstName?: string[] | undefined;
2836
+ lastName?: string[] | undefined;
2837
+ dateOfBirth?: string[] | undefined;
2838
+ nationality?: string[] | undefined;
2839
+ };
2840
+ }, {
2841
+ documents: {
2842
+ recordId: string;
2843
+ action: "REROUTE" | "KEEP" | "DISMISS";
2844
+ qualificationId?: string | null | undefined;
2845
+ qualificationTypeId?: string | null | undefined;
2846
+ destination?: "ID_DOCUMENT" | "QUALIFICATION" | "SHARE_CODE" | undefined;
2847
+ }[];
2848
+ fields: {
2849
+ firstName?: string | undefined;
2850
+ lastName?: string | undefined;
2851
+ dateOfBirth?: string | undefined;
2852
+ nationality?: "AFGHAN" | "ALBANIAN" | "ALGERIAN" | "AMERICAN" | "ANDORRAN" | "ANGOLAN" | "ANTIGUANS" | "ARGENTINEAN" | "ARMENIAN" | "AUSTRALIAN" | "AUSTRIAN" | "AZERBAIJANI" | "BAHAMIAN" | "BAHRAINI" | "BANGLADESHI" | "BARBADIAN" | "BARBUDANS" | "BELARUSIAN" | "BELGIAN" | "BELIZEAN" | "BENINESE" | "BHUTANESE" | "BOLIVIAN" | "BOSNIAN" | "BRAZILIAN" | "BRITISH" | "BRUNEIAN" | "BULGARIAN" | "BURKINABE" | "BURMESE" | "BURUNDIAN" | "CAMBODIAN" | "CAMEROONIAN" | "CANADIAN" | "CAPE_VERDEAN" | "CENTRAL_AFRICAN" | "CHADIAN" | "CHILEAN" | "CHINESE" | "COLOMBIAN" | "COMORAN" | "CONGOLESE" | "COSTA_RICAN" | "CROATIAN" | "CUBAN" | "CYPRIOT" | "CZECH" | "DANISH" | "DJIBOUTI" | "DOMINICAN" | "DUTCH" | "EAST_TIMORESE" | "ECUADOREAN" | "EGYPTIAN" | "EMIRIAN" | "EQUATORIAL_GUINEAN" | "ERITREAN" | "ESTONIAN" | "ETHIOPIAN" | "FIJIAN" | "FILIPINO" | "FINNISH" | "FRENCH" | "GABONESE" | "GAMBIAN" | "GEORGIAN" | "GERMAN" | "GHANAIAN" | "GREEK" | "GRENADIAN" | "GUATEMALAN" | "GUINEA_BISSAUAN" | "GUINEAN" | "GUYANESE" | "HAITIAN" | "HERZEGOVINIAN" | "HONDURAN" | "HUNGARIAN" | "ICELANDER" | "INDIAN" | "INDONESIAN" | "IRANIAN" | "IRAQI" | "IRISH" | "ISRAELI" | "ITALIAN" | "IVORIAN" | "JAMAICAN" | "JAPANESE" | "JORDANIAN" | "KAZAKHSTANI" | "KENYAN" | "KITTIAN_AND_NEVISIAN" | "KUWAITI" | "KYRGYZ" | "LAOTIAN" | "LATVIAN" | "LEBANESE" | "LIBERIAN" | "LIBYAN" | "LIECHTENSTEINER" | "LITHUANIAN" | "LUXEMBOURGER" | "MACEDONIAN" | "MALAGASY" | "MALAWIAN" | "MALAYSIAN" | "MALDIVAN" | "MALIAN" | "MALTESE" | "MARSHALLESE" | "MAURITANIAN" | "MAURITIAN" | "MEXICAN" | "MICRONESIAN" | "MOLDOVAN" | "MONACAN" | "MONGOLIAN" | "MOROCCAN" | "MOSOTHO" | "MOTSWANA" | "MOZAMBICAN" | "NAMIBIAN" | "NAURUAN" | "NEPALESE" | "NEW_ZEALANDER" | "NI_VANUATU" | "NICARAGUAN" | "NIGERIEN" | "NIGERIAN" | "NORTH_KOREAN" | "NORTHERN_IRISH" | "NORWEGIAN" | "OMANI" | "PAKISTANI" | "PALAUAN" | "PANAMANIAN" | "PAPUA_NEW_GUINEAN" | "PARAGUAYAN" | "PERUVIAN" | "POLISH" | "PORTUGUESE" | "QATARI" | "ROMANIAN" | "RUSSIAN" | "RWANDAN" | "SAINT_LUCIAN" | "SALVADORAN" | "SAMOAN" | "SAN_MARINESE" | "SAO_TOMEAN" | "SAUDI" | "SCOTTISH" | "SENEGALESE" | "SERBIAN" | "SEYCHELLOIS" | "SIERRA_LEONEAN" | "SINGAPOREAN" | "SLOVAKIAN" | "SLOVENIAN" | "SOLOMON_ISLANDER" | "SOMALI" | "SOUTH_AFRICAN" | "SOUTH_KOREAN" | "SOUTH_SUDANESE" | "SPANISH" | "SRI_LANKAN" | "SUDANESE" | "SURINAMER" | "SWAZI" | "SWEDISH" | "SWISS" | "SYRIAN" | "TAIWANESE" | "TAJIK" | "TANZANIAN" | "THAI" | "TOGOLESE" | "TONGAN" | "TRINIDADIAN_OR_TOBAGONIAN" | "TUNISIAN" | "TURKISH" | "TUVALUAN" | "UGANDAN" | "UKRAINIAN" | "URUGUAYAN" | "UZBEKISTANI" | "VENEZUELAN" | "VIETNAMESE" | "WELSH" | "YEMENITE" | "ZAMBIAN" | "ZIMBABWEAN" | undefined;
2853
+ };
2854
+ fieldSources: {
2855
+ firstName?: string[] | undefined;
2856
+ lastName?: string[] | undefined;
2857
+ dateOfBirth?: string[] | undefined;
2858
+ nationality?: string[] | undefined;
2859
+ };
2860
+ }>;
2861
+ path: "/v2/document-intake/backfill/subjects/:subjectType/:subjectId/apply";
2862
+ responses: {
2863
+ 500: z.ZodObject<{
2864
+ statusCode: z.ZodNumber;
2865
+ message: z.ZodString;
2866
+ code: z.ZodString;
2867
+ details: z.ZodOptional<z.ZodUnknown>;
2868
+ timestamp: z.ZodString;
2869
+ path: z.ZodString;
2870
+ correlationId: z.ZodOptional<z.ZodString>;
2871
+ }, "strip", z.ZodTypeAny, {
2872
+ code: string;
2873
+ path: string;
2874
+ message: string;
2875
+ statusCode: number;
2876
+ timestamp: string;
2877
+ details?: unknown;
2878
+ correlationId?: string | undefined;
2879
+ }, {
2880
+ code: string;
2881
+ path: string;
2882
+ message: string;
2883
+ statusCode: number;
2884
+ timestamp: string;
2885
+ details?: unknown;
2886
+ correlationId?: string | undefined;
2887
+ }>;
2888
+ 200: z.ZodObject<{
2889
+ ok: z.ZodLiteral<true>;
2890
+ }, "strip", z.ZodTypeAny, {
2891
+ ok: true;
2892
+ }, {
2893
+ ok: true;
2894
+ }>;
2895
+ 404: z.ZodObject<{
2896
+ statusCode: z.ZodNumber;
2897
+ message: z.ZodString;
2898
+ code: z.ZodString;
2899
+ details: z.ZodOptional<z.ZodUnknown>;
2900
+ timestamp: z.ZodString;
2901
+ path: z.ZodString;
2902
+ correlationId: z.ZodOptional<z.ZodString>;
2903
+ }, "strip", z.ZodTypeAny, {
2904
+ code: string;
2905
+ path: string;
2906
+ message: string;
2907
+ statusCode: number;
2908
+ timestamp: string;
2909
+ details?: unknown;
2910
+ correlationId?: string | undefined;
2911
+ }, {
2912
+ code: string;
2913
+ path: string;
2914
+ message: string;
2915
+ statusCode: number;
2916
+ timestamp: string;
2917
+ details?: unknown;
2918
+ correlationId?: string | undefined;
2919
+ }>;
2920
+ 409: z.ZodObject<{
2921
+ statusCode: z.ZodNumber;
2922
+ message: z.ZodString;
2923
+ code: z.ZodString;
2924
+ details: z.ZodOptional<z.ZodUnknown>;
2925
+ timestamp: z.ZodString;
2926
+ path: z.ZodString;
2927
+ correlationId: z.ZodOptional<z.ZodString>;
2928
+ }, "strip", z.ZodTypeAny, {
2929
+ code: string;
2930
+ path: string;
2931
+ message: string;
2932
+ statusCode: number;
2933
+ timestamp: string;
2934
+ details?: unknown;
2935
+ correlationId?: string | undefined;
2936
+ }, {
2937
+ code: string;
2938
+ path: string;
2939
+ message: string;
2940
+ statusCode: number;
2941
+ timestamp: string;
2942
+ details?: unknown;
2943
+ correlationId?: string | undefined;
2944
+ }>;
2945
+ };
2946
+ };
2947
+ backfillHistory: {
2948
+ metadata: {
2949
+ tags: string[];
2950
+ };
2951
+ query: z.ZodObject<{
2952
+ page: z.ZodDefault<z.ZodNumber>;
2953
+ limit: z.ZodDefault<z.ZodNumber>;
2954
+ statuses: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>, z.ZodArray<z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>, "many">]>>, ("PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED")[] | undefined, "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED" | ("PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED")[] | undefined>;
2955
+ supersededOnly: z.ZodOptional<z.ZodBoolean>;
2956
+ }, "strip", z.ZodTypeAny, {
2957
+ page: number;
2958
+ limit: number;
2959
+ statuses?: ("PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED")[] | undefined;
2960
+ supersededOnly?: boolean | undefined;
2961
+ }, {
2962
+ page?: number | undefined;
2963
+ limit?: number | undefined;
2964
+ statuses?: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED" | ("PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED")[] | undefined;
2965
+ supersededOnly?: boolean | undefined;
2966
+ }>;
2967
+ summary: "List current and superseded document backfill audit cycles.";
2968
+ method: "GET";
2969
+ path: "/v2/document-intake/backfill/history";
2970
+ responses: {
2971
+ 500: z.ZodObject<{
2972
+ statusCode: z.ZodNumber;
2973
+ message: z.ZodString;
2974
+ code: z.ZodString;
2975
+ details: z.ZodOptional<z.ZodUnknown>;
2976
+ timestamp: z.ZodString;
2977
+ path: z.ZodString;
2978
+ correlationId: z.ZodOptional<z.ZodString>;
2979
+ }, "strip", z.ZodTypeAny, {
2980
+ code: string;
2981
+ path: string;
2982
+ message: string;
2983
+ statusCode: number;
2984
+ timestamp: string;
2985
+ details?: unknown;
2986
+ correlationId?: string | undefined;
2987
+ }, {
2988
+ code: string;
2989
+ path: string;
2990
+ message: string;
2991
+ statusCode: number;
2992
+ timestamp: string;
2993
+ details?: unknown;
2994
+ correlationId?: string | undefined;
2995
+ }>;
2996
+ 200: z.ZodObject<{
2997
+ items: z.ZodArray<z.ZodObject<{
2998
+ recordId: z.ZodString;
2999
+ fileId: z.ZodString;
3000
+ workerId: z.ZodNullable<z.ZodString>;
3001
+ curatedWorkerId: z.ZodNullable<z.ZodString>;
3002
+ subjectName: z.ZodString;
3003
+ originalName: z.ZodNullable<z.ZodString>;
3004
+ sourceType: z.ZodEnum<["DROPZONE", "WORKER_ID_DOCUMENT", "CURATED_ID_DOCUMENT", "QUALIFICATION_PROOF"]>;
3005
+ status: z.ZodEnum<["PENDING_CONFIRM", "VERIFIED_NO_CHANGE", "APPLIED", "DISCARDED", "FAILED"]>;
3006
+ classification: z.ZodEnum<["passport", "id_card", "cscs_card", "driving_license", "qualification_certificate", "unknown"]>;
3007
+ confidence: z.ZodNullable<z.ZodNumber>;
3008
+ failureKind: z.ZodNullable<z.ZodString>;
3009
+ evaluatedAt: z.ZodNullable<z.ZodString>;
3010
+ createdAt: z.ZodString;
3011
+ supersedesRecordId: z.ZodNullable<z.ZodString>;
3012
+ supersededByRecordId: z.ZodNullable<z.ZodString>;
3013
+ isCurrent: z.ZodBoolean;
3014
+ extractorFingerprint: z.ZodNullable<z.ZodString>;
3015
+ evaluationFingerprint: z.ZodNullable<z.ZodString>;
3016
+ }, "strip", z.ZodTypeAny, {
3017
+ confidence: number | null;
3018
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
3019
+ fileId: string;
3020
+ workerId: string | null;
3021
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
3022
+ subjectName: string;
3023
+ curatedWorkerId: string | null;
3024
+ createdAt: string;
3025
+ recordId: string;
3026
+ originalName: string | null;
3027
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
3028
+ evaluatedAt: string | null;
3029
+ failureKind: string | null;
3030
+ supersedesRecordId: string | null;
3031
+ supersededByRecordId: string | null;
3032
+ isCurrent: boolean;
3033
+ extractorFingerprint: string | null;
3034
+ evaluationFingerprint: string | null;
3035
+ }, {
3036
+ confidence: number | null;
3037
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
3038
+ fileId: string;
3039
+ workerId: string | null;
3040
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
3041
+ subjectName: string;
3042
+ curatedWorkerId: string | null;
3043
+ createdAt: string;
3044
+ recordId: string;
3045
+ originalName: string | null;
3046
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
3047
+ evaluatedAt: string | null;
3048
+ failureKind: string | null;
3049
+ supersedesRecordId: string | null;
3050
+ supersededByRecordId: string | null;
3051
+ isCurrent: boolean;
3052
+ extractorFingerprint: string | null;
3053
+ evaluationFingerprint: string | null;
3054
+ }>, "many">;
3055
+ totalCount: z.ZodNumber;
3056
+ totalPages: z.ZodNumber;
3057
+ page: z.ZodNumber;
3058
+ limit: z.ZodNumber;
3059
+ }, "strip", z.ZodTypeAny, {
3060
+ items: {
3061
+ confidence: number | null;
3062
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
3063
+ fileId: string;
3064
+ workerId: string | null;
3065
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
3066
+ subjectName: string;
3067
+ curatedWorkerId: string | null;
3068
+ createdAt: string;
3069
+ recordId: string;
3070
+ originalName: string | null;
3071
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
3072
+ evaluatedAt: string | null;
3073
+ failureKind: string | null;
3074
+ supersedesRecordId: string | null;
3075
+ supersededByRecordId: string | null;
3076
+ isCurrent: boolean;
3077
+ extractorFingerprint: string | null;
3078
+ evaluationFingerprint: string | null;
3079
+ }[];
3080
+ totalCount: number;
3081
+ totalPages: number;
3082
+ page: number;
3083
+ limit: number;
3084
+ }, {
3085
+ items: {
3086
+ confidence: number | null;
3087
+ status: "PENDING_CONFIRM" | "VERIFIED_NO_CHANGE" | "APPLIED" | "DISCARDED" | "FAILED";
3088
+ fileId: string;
3089
+ workerId: string | null;
3090
+ classification: "passport" | "id_card" | "cscs_card" | "driving_license" | "qualification_certificate" | "unknown";
3091
+ subjectName: string;
3092
+ curatedWorkerId: string | null;
3093
+ createdAt: string;
3094
+ recordId: string;
3095
+ originalName: string | null;
3096
+ sourceType: "DROPZONE" | "WORKER_ID_DOCUMENT" | "CURATED_ID_DOCUMENT" | "QUALIFICATION_PROOF";
3097
+ evaluatedAt: string | null;
3098
+ failureKind: string | null;
3099
+ supersedesRecordId: string | null;
3100
+ supersededByRecordId: string | null;
3101
+ isCurrent: boolean;
3102
+ extractorFingerprint: string | null;
3103
+ evaluationFingerprint: string | null;
3104
+ }[];
3105
+ totalCount: number;
3106
+ totalPages: number;
3107
+ page: number;
3108
+ limit: number;
3109
+ }>;
3110
+ };
3111
+ };
3112
+ };
3113
+ export type IntakeRecordResponse = z.infer<typeof IntakeRecordResponseSchema>;
3114
+ export type DecideIntake = z.infer<typeof DecideIntakeSchema>;
3115
+ export type ExtractedDocumentFields = z.infer<typeof ExtractedDocumentFieldsSchema>;
3116
+ export type IntakeDestination = z.infer<typeof IntakeDestinationSchema>;
3117
+ export type IntakeSourceType = z.infer<typeof IntakeSourceTypeSchema>;
3118
+ export type BackfillSubjectType = z.infer<typeof BackfillSubjectTypeSchema>;
3119
+ export type BackfillPendingKind = z.infer<typeof BackfillPendingKindSchema>;
3120
+ export type BackfillSubjectSummary = z.infer<typeof BackfillSubjectSummarySchema>;
3121
+ export type BackfillSubjectList = z.infer<typeof BackfillSubjectListSchema>;
3122
+ export type BackfillSubjectQuery = z.infer<typeof BackfillSubjectQuerySchema>;
3123
+ export type BackfillCandidate = z.infer<typeof BackfillCandidateSchema>;
3124
+ export type BackfillCandidateList = z.infer<typeof BackfillCandidateListSchema>;
3125
+ export type BackfillCandidateQuery = z.infer<typeof BackfillCandidateQuerySchema>;
3126
+ export type DocumentBackfillJob = z.infer<typeof DocumentBackfillJobSchema>;
3127
+ export type BackfillSubjectDocument = z.infer<typeof BackfillSubjectDocumentSchema>;
3128
+ export type BackfillSubjectDetail = z.infer<typeof BackfillSubjectDetailSchema>;
3129
+ export type ApplyBackfillSubjectBody = z.infer<typeof ApplyBackfillSubjectSchema>;
3130
+ export type BackfillAuditQuery = z.infer<typeof BackfillAuditQuerySchema>;
3131
+ export type BackfillAuditList = z.infer<typeof BackfillAuditListSchema>;
3132
+ //# sourceMappingURL=document-intake.contract.d.ts.map