@vouchsafe/node 0.1.38 → 0.1.40

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 (226) hide show
  1. package/README.md +84 -0
  2. package/dist/VouchsafeClient.d.ts +52 -1
  3. package/dist/VouchsafeClient.d.ts.map +1 -1
  4. package/dist/VouchsafeClient.js +58 -0
  5. package/dist/VouchsafeClient.js.map +1 -1
  6. package/dist/openapi/apis/EVisaVerificationApi.d.ts +2 -2
  7. package/dist/openapi/apis/EVisaVerificationApi.js +2 -2
  8. package/dist/openapi/models/ApiVerificationCheck.d.ts +23 -0
  9. package/dist/openapi/models/ApiVerificationCheck.d.ts.map +1 -0
  10. package/dist/openapi/models/ApiVerificationCheck.js +91 -0
  11. package/dist/openapi/models/ApiVerificationCheck.js.map +1 -0
  12. package/dist/openapi/models/ApiVerificationCheck0.d.ts +82 -0
  13. package/dist/openapi/models/ApiVerificationCheck0.d.ts.map +1 -0
  14. package/dist/openapi/models/ApiVerificationCheck0.js +85 -0
  15. package/dist/openapi/models/ApiVerificationCheck0.js.map +1 -0
  16. package/dist/openapi/models/ApiVerificationCheck0ArtefactsInner.d.ts +48 -0
  17. package/dist/openapi/models/ApiVerificationCheck0ArtefactsInner.d.ts.map +1 -0
  18. package/dist/openapi/models/ApiVerificationCheck0ArtefactsInner.js +64 -0
  19. package/dist/openapi/models/ApiVerificationCheck0ArtefactsInner.js.map +1 -0
  20. package/dist/openapi/models/ApiVerificationCheck0Validations.d.ts +40 -0
  21. package/dist/openapi/models/ApiVerificationCheck0Validations.d.ts.map +1 -0
  22. package/dist/openapi/models/ApiVerificationCheck0Validations.js +52 -0
  23. package/dist/openapi/models/ApiVerificationCheck0Validations.js.map +1 -0
  24. package/dist/openapi/models/ApiVerificationCheck0ValidationsRefereeDissimilarityCheck.d.ts +49 -0
  25. package/dist/openapi/models/ApiVerificationCheck0ValidationsRefereeDissimilarityCheck.d.ts.map +1 -0
  26. package/dist/openapi/models/ApiVerificationCheck0ValidationsRefereeDissimilarityCheck.js +66 -0
  27. package/dist/openapi/models/ApiVerificationCheck0ValidationsRefereeDissimilarityCheck.js.map +1 -0
  28. package/dist/openapi/models/ApiVerificationCheck1.d.ts +75 -0
  29. package/dist/openapi/models/ApiVerificationCheck1.d.ts.map +1 -0
  30. package/dist/openapi/models/ApiVerificationCheck1.js +80 -0
  31. package/dist/openapi/models/ApiVerificationCheck1.js.map +1 -0
  32. package/dist/openapi/models/ApiVerificationCheck1Validations.d.ts +34 -0
  33. package/dist/openapi/models/ApiVerificationCheck1Validations.d.ts.map +1 -0
  34. package/dist/openapi/models/ApiVerificationCheck1Validations.js +50 -0
  35. package/dist/openapi/models/ApiVerificationCheck1Validations.js.map +1 -0
  36. package/dist/openapi/models/ApiVerificationCheck1ValidationsEmailVerified.d.ts +49 -0
  37. package/dist/openapi/models/ApiVerificationCheck1ValidationsEmailVerified.d.ts.map +1 -0
  38. package/dist/openapi/models/ApiVerificationCheck1ValidationsEmailVerified.js +66 -0
  39. package/dist/openapi/models/ApiVerificationCheck1ValidationsEmailVerified.js.map +1 -0
  40. package/dist/openapi/models/ApiVerificationCheck2.d.ts +75 -0
  41. package/dist/openapi/models/ApiVerificationCheck2.d.ts.map +1 -0
  42. package/dist/openapi/models/ApiVerificationCheck2.js +80 -0
  43. package/dist/openapi/models/ApiVerificationCheck2.js.map +1 -0
  44. package/dist/openapi/models/ApiVerificationCheck2Validations.d.ts +34 -0
  45. package/dist/openapi/models/ApiVerificationCheck2Validations.d.ts.map +1 -0
  46. package/dist/openapi/models/ApiVerificationCheck2Validations.js +50 -0
  47. package/dist/openapi/models/ApiVerificationCheck2Validations.js.map +1 -0
  48. package/dist/openapi/models/ApiVerificationCheck3.d.ts +75 -0
  49. package/dist/openapi/models/ApiVerificationCheck3.d.ts.map +1 -0
  50. package/dist/openapi/models/ApiVerificationCheck3.js +80 -0
  51. package/dist/openapi/models/ApiVerificationCheck3.js.map +1 -0
  52. package/dist/openapi/models/ApiVerificationCheck3Validations.d.ts +46 -0
  53. package/dist/openapi/models/ApiVerificationCheck3Validations.d.ts.map +1 -0
  54. package/dist/openapi/models/ApiVerificationCheck3Validations.js +54 -0
  55. package/dist/openapi/models/ApiVerificationCheck3Validations.js.map +1 -0
  56. package/dist/openapi/models/ApiVerificationCheck3ValidationsRefereeConfirmedDateOfBirth.d.ts +43 -0
  57. package/dist/openapi/models/ApiVerificationCheck3ValidationsRefereeConfirmedDateOfBirth.d.ts.map +1 -0
  58. package/dist/openapi/models/ApiVerificationCheck3ValidationsRefereeConfirmedDateOfBirth.js +62 -0
  59. package/dist/openapi/models/ApiVerificationCheck3ValidationsRefereeConfirmedDateOfBirth.js.map +1 -0
  60. package/dist/openapi/models/ApiVerificationCheck4.d.ts +108 -0
  61. package/dist/openapi/models/ApiVerificationCheck4.d.ts.map +1 -0
  62. package/dist/openapi/models/ApiVerificationCheck4.js +106 -0
  63. package/dist/openapi/models/ApiVerificationCheck4.js.map +1 -0
  64. package/dist/openapi/models/ApiVerificationCheck4ExtractedDetails.d.ts +99 -0
  65. package/dist/openapi/models/ApiVerificationCheck4ExtractedDetails.d.ts.map +1 -0
  66. package/dist/openapi/models/ApiVerificationCheck4ExtractedDetails.js +77 -0
  67. package/dist/openapi/models/ApiVerificationCheck4ExtractedDetails.js.map +1 -0
  68. package/dist/openapi/models/ApiVerificationCheck4Validations.d.ts +119 -0
  69. package/dist/openapi/models/ApiVerificationCheck4Validations.d.ts.map +1 -0
  70. package/dist/openapi/models/ApiVerificationCheck4Validations.js +83 -0
  71. package/dist/openapi/models/ApiVerificationCheck4Validations.js.map +1 -0
  72. package/dist/openapi/models/ApiVerificationCheck5.d.ts +118 -0
  73. package/dist/openapi/models/ApiVerificationCheck5.d.ts.map +1 -0
  74. package/dist/openapi/models/ApiVerificationCheck5.js +116 -0
  75. package/dist/openapi/models/ApiVerificationCheck5.js.map +1 -0
  76. package/dist/openapi/models/ApiVerificationCheck5ExtractedDetails.d.ts +98 -0
  77. package/dist/openapi/models/ApiVerificationCheck5ExtractedDetails.d.ts.map +1 -0
  78. package/dist/openapi/models/ApiVerificationCheck5ExtractedDetails.js +96 -0
  79. package/dist/openapi/models/ApiVerificationCheck5ExtractedDetails.js.map +1 -0
  80. package/dist/openapi/models/ApiVerificationCheck5Validations.d.ts +94 -0
  81. package/dist/openapi/models/ApiVerificationCheck5Validations.d.ts.map +1 -0
  82. package/dist/openapi/models/ApiVerificationCheck5Validations.js +72 -0
  83. package/dist/openapi/models/ApiVerificationCheck5Validations.js.map +1 -0
  84. package/dist/openapi/models/ApiVerificationCheck6.d.ts +102 -0
  85. package/dist/openapi/models/ApiVerificationCheck6.d.ts.map +1 -0
  86. package/dist/openapi/models/ApiVerificationCheck6.js +100 -0
  87. package/dist/openapi/models/ApiVerificationCheck6.js.map +1 -0
  88. package/dist/openapi/models/ApiVerificationCheck6ExtractedDetails.d.ts +83 -0
  89. package/dist/openapi/models/ApiVerificationCheck6ExtractedDetails.d.ts.map +1 -0
  90. package/dist/openapi/models/ApiVerificationCheck6ExtractedDetails.js +81 -0
  91. package/dist/openapi/models/ApiVerificationCheck6ExtractedDetails.js.map +1 -0
  92. package/dist/openapi/models/ApiVerificationCheck6Validations.d.ts +58 -0
  93. package/dist/openapi/models/ApiVerificationCheck6Validations.d.ts.map +1 -0
  94. package/dist/openapi/models/ApiVerificationCheck6Validations.js +64 -0
  95. package/dist/openapi/models/ApiVerificationCheck6Validations.js.map +1 -0
  96. package/dist/openapi/models/ApiVerificationCheck7.d.ts +105 -0
  97. package/dist/openapi/models/ApiVerificationCheck7.d.ts.map +1 -0
  98. package/dist/openapi/models/ApiVerificationCheck7.js +103 -0
  99. package/dist/openapi/models/ApiVerificationCheck7.js.map +1 -0
  100. package/dist/openapi/models/ApiVerificationCheck7ExtractedDetails.d.ts +93 -0
  101. package/dist/openapi/models/ApiVerificationCheck7ExtractedDetails.d.ts.map +1 -0
  102. package/dist/openapi/models/ApiVerificationCheck7ExtractedDetails.js +79 -0
  103. package/dist/openapi/models/ApiVerificationCheck7ExtractedDetails.js.map +1 -0
  104. package/dist/openapi/models/ApiVerificationCheck7Validations.d.ts +59 -0
  105. package/dist/openapi/models/ApiVerificationCheck7Validations.d.ts.map +1 -0
  106. package/dist/openapi/models/ApiVerificationCheck7Validations.js +67 -0
  107. package/dist/openapi/models/ApiVerificationCheck7Validations.js.map +1 -0
  108. package/dist/openapi/models/ApiVerificationCheck8.d.ts +103 -0
  109. package/dist/openapi/models/ApiVerificationCheck8.d.ts.map +1 -0
  110. package/dist/openapi/models/ApiVerificationCheck8.js +101 -0
  111. package/dist/openapi/models/ApiVerificationCheck8.js.map +1 -0
  112. package/dist/openapi/models/ApiVerificationCheck8ExtractedDetails.d.ts +46 -0
  113. package/dist/openapi/models/ApiVerificationCheck8ExtractedDetails.d.ts.map +1 -0
  114. package/dist/openapi/models/ApiVerificationCheck8ExtractedDetails.js +56 -0
  115. package/dist/openapi/models/ApiVerificationCheck8ExtractedDetails.js.map +1 -0
  116. package/dist/openapi/models/ApiVerificationCheck8Validations.d.ts +40 -0
  117. package/dist/openapi/models/ApiVerificationCheck8Validations.d.ts.map +1 -0
  118. package/dist/openapi/models/ApiVerificationCheck8Validations.js +54 -0
  119. package/dist/openapi/models/ApiVerificationCheck8Validations.js.map +1 -0
  120. package/dist/openapi/models/ApiVerificationEnrichment.d.ts +17 -0
  121. package/dist/openapi/models/ApiVerificationEnrichment.d.ts.map +1 -0
  122. package/dist/openapi/models/ApiVerificationEnrichment.js +61 -0
  123. package/dist/openapi/models/ApiVerificationEnrichment.js.map +1 -0
  124. package/dist/openapi/models/ApiVerificationEnrichment0.d.ts +62 -0
  125. package/dist/openapi/models/ApiVerificationEnrichment0.d.ts.map +1 -0
  126. package/dist/openapi/models/ApiVerificationEnrichment0.js +75 -0
  127. package/dist/openapi/models/ApiVerificationEnrichment0.js.map +1 -0
  128. package/dist/openapi/models/ApiVerificationEnrichment0Details.d.ts +34 -0
  129. package/dist/openapi/models/ApiVerificationEnrichment0Details.d.ts.map +1 -0
  130. package/dist/openapi/models/ApiVerificationEnrichment0Details.js +52 -0
  131. package/dist/openapi/models/ApiVerificationEnrichment0Details.js.map +1 -0
  132. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInner.d.ts +64 -0
  133. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInner.d.ts.map +1 -0
  134. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInner.js +68 -0
  135. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInner.js.map +1 -0
  136. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInnerProperties.d.ts +64 -0
  137. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInnerProperties.d.ts.map +1 -0
  138. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInnerProperties.js +72 -0
  139. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInnerProperties.js.map +1 -0
  140. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInnerPropertiesBirthCountry.d.ts +27 -0
  141. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInnerPropertiesBirthCountry.d.ts.map +1 -0
  142. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInnerPropertiesBirthCountry.js +39 -0
  143. package/dist/openapi/models/ApiVerificationEnrichment0DetailsMatchesInnerPropertiesBirthCountry.js.map +1 -0
  144. package/dist/openapi/models/ApiVerificationEnrichment1.d.ts +63 -0
  145. package/dist/openapi/models/ApiVerificationEnrichment1.d.ts.map +1 -0
  146. package/dist/openapi/models/ApiVerificationEnrichment1.js +76 -0
  147. package/dist/openapi/models/ApiVerificationEnrichment1.js.map +1 -0
  148. package/dist/openapi/models/ApiVerificationEnrichment1Details.d.ts +40 -0
  149. package/dist/openapi/models/ApiVerificationEnrichment1Details.d.ts.map +1 -0
  150. package/dist/openapi/models/ApiVerificationEnrichment1Details.js +56 -0
  151. package/dist/openapi/models/ApiVerificationEnrichment1Details.js.map +1 -0
  152. package/dist/openapi/models/ApiVerificationEnrichment1DetailsSignals.d.ts +39 -0
  153. package/dist/openapi/models/ApiVerificationEnrichment1DetailsSignals.d.ts.map +1 -0
  154. package/dist/openapi/models/ApiVerificationEnrichment1DetailsSignals.js +55 -0
  155. package/dist/openapi/models/ApiVerificationEnrichment1DetailsSignals.js.map +1 -0
  156. package/dist/openapi/models/ApiVerificationEnrichment2.d.ts +62 -0
  157. package/dist/openapi/models/ApiVerificationEnrichment2.d.ts.map +1 -0
  158. package/dist/openapi/models/ApiVerificationEnrichment2.js +75 -0
  159. package/dist/openapi/models/ApiVerificationEnrichment2.js.map +1 -0
  160. package/dist/openapi/models/ApiVerificationEnrichment2Details.d.ts +34 -0
  161. package/dist/openapi/models/ApiVerificationEnrichment2Details.d.ts.map +1 -0
  162. package/dist/openapi/models/ApiVerificationEnrichment2Details.js +52 -0
  163. package/dist/openapi/models/ApiVerificationEnrichment2Details.js.map +1 -0
  164. package/dist/openapi/models/ApiVerificationEnrichment2DetailsValidations.d.ts +47 -0
  165. package/dist/openapi/models/ApiVerificationEnrichment2DetailsValidations.d.ts.map +1 -0
  166. package/dist/openapi/models/ApiVerificationEnrichment2DetailsValidations.js +59 -0
  167. package/dist/openapi/models/ApiVerificationEnrichment2DetailsValidations.js.map +1 -0
  168. package/dist/openapi/models/ApiVerificationEnrichment2DetailsValidationsNoKnownFraudsterMatch.d.ts +70 -0
  169. package/dist/openapi/models/ApiVerificationEnrichment2DetailsValidationsNoKnownFraudsterMatch.d.ts.map +1 -0
  170. package/dist/openapi/models/ApiVerificationEnrichment2DetailsValidationsNoKnownFraudsterMatch.js +81 -0
  171. package/dist/openapi/models/ApiVerificationEnrichment2DetailsValidationsNoKnownFraudsterMatch.js.map +1 -0
  172. package/dist/openapi/models/EvisaArtefact.d.ts +5 -4
  173. package/dist/openapi/models/EvisaArtefact.d.ts.map +1 -1
  174. package/dist/openapi/models/EvisaArtefact.js.map +1 -1
  175. package/dist/openapi/models/EvisaBaseExtractedDetails.d.ts +4 -8
  176. package/dist/openapi/models/EvisaBaseExtractedDetails.d.ts.map +1 -1
  177. package/dist/openapi/models/EvisaBaseExtractedDetails.js +0 -2
  178. package/dist/openapi/models/EvisaBaseExtractedDetails.js.map +1 -1
  179. package/dist/openapi/models/EvisaVerificationInput.d.ts +9 -39
  180. package/dist/openapi/models/EvisaVerificationInput.d.ts.map +1 -1
  181. package/dist/openapi/models/EvisaVerificationInput.js +37 -39
  182. package/dist/openapi/models/EvisaVerificationInput.js.map +1 -1
  183. package/dist/openapi/models/EvisaVerificationResponse.d.ts +7 -79
  184. package/dist/openapi/models/EvisaVerificationResponse.d.ts.map +1 -1
  185. package/dist/openapi/models/EvisaVerificationResponse.js +27 -68
  186. package/dist/openapi/models/EvisaVerificationResponse.js.map +1 -1
  187. package/dist/openapi/models/GetVerificationResponse.d.ts +6 -6
  188. package/dist/openapi/models/GetVerificationResponse.d.ts.map +1 -1
  189. package/dist/openapi/models/GetVerificationResponse.js +6 -6
  190. package/dist/openapi/models/GetVerificationResponse.js.map +1 -1
  191. package/dist/openapi/models/ImmigrationStatusExtractedDetails.d.ts +9 -8
  192. package/dist/openapi/models/ImmigrationStatusExtractedDetails.d.ts.map +1 -1
  193. package/dist/openapi/models/ImmigrationStatusExtractedDetails.js +2 -2
  194. package/dist/openapi/models/ImmigrationStatusExtractedDetails.js.map +1 -1
  195. package/dist/openapi/models/ImmigrationStatusVerificationResponse.d.ts +11 -11
  196. package/dist/openapi/models/ImmigrationStatusVerificationResponse.d.ts.map +1 -1
  197. package/dist/openapi/models/ImmigrationStatusVerificationResponse.js +11 -11
  198. package/dist/openapi/models/ImmigrationStatusVerificationResponse.js.map +1 -1
  199. package/dist/openapi/models/ImmigrationStatusVerificationResponseExtractedDetails.d.ts +8 -7
  200. package/dist/openapi/models/ImmigrationStatusVerificationResponseExtractedDetails.d.ts.map +1 -1
  201. package/dist/openapi/models/ImmigrationStatusVerificationResponseExtractedDetails.js +2 -2
  202. package/dist/openapi/models/ImmigrationStatusVerificationResponseExtractedDetails.js.map +1 -1
  203. package/dist/openapi/models/RightToRentExtractedDetails.d.ts +70 -0
  204. package/dist/openapi/models/RightToRentExtractedDetails.d.ts.map +1 -0
  205. package/dist/openapi/models/RightToRentExtractedDetails.js +61 -0
  206. package/dist/openapi/models/RightToRentExtractedDetails.js.map +1 -0
  207. package/dist/openapi/models/RightToRentVerificationResponse.d.ts +11 -11
  208. package/dist/openapi/models/RightToRentVerificationResponse.d.ts.map +1 -1
  209. package/dist/openapi/models/RightToRentVerificationResponse.js +11 -11
  210. package/dist/openapi/models/RightToRentVerificationResponse.js.map +1 -1
  211. package/dist/openapi/models/RightToRentVerificationResponseExtractedDetails.d.ts +3 -2
  212. package/dist/openapi/models/RightToRentVerificationResponseExtractedDetails.d.ts.map +1 -1
  213. package/dist/openapi/models/RightToRentVerificationResponseExtractedDetails.js.map +1 -1
  214. package/dist/openapi/models/RightToWorkVerificationResponse.d.ts +11 -11
  215. package/dist/openapi/models/RightToWorkVerificationResponse.d.ts.map +1 -1
  216. package/dist/openapi/models/RightToWorkVerificationResponse.js +11 -11
  217. package/dist/openapi/models/RightToWorkVerificationResponse.js.map +1 -1
  218. package/dist/openapi/models/RightToWorkVerificationResponseExtractedDetails.d.ts +1 -7
  219. package/dist/openapi/models/RightToWorkVerificationResponseExtractedDetails.d.ts.map +1 -1
  220. package/dist/openapi/models/RightToWorkVerificationResponseExtractedDetails.js +0 -2
  221. package/dist/openapi/models/RightToWorkVerificationResponseExtractedDetails.js.map +1 -1
  222. package/dist/openapi/models/index.d.ts +42 -0
  223. package/dist/openapi/models/index.d.ts.map +1 -1
  224. package/dist/openapi/models/index.js +42 -0
  225. package/dist/openapi/models/index.js.map +1 -1
  226. package/package.json +2 -2
package/README.md CHANGED
@@ -49,8 +49,92 @@ const res = await client.listVerifications({
49
49
  const res = await client.getVerification({
50
50
  id: "ID",
51
51
  })
52
+
53
+ console.log(res.checks) // Array of verification checks performed
54
+ console.log(res.enrichments) // Array of background checks
55
+ ```
56
+
57
+ ### Download artefacts (documents, photos)
58
+
59
+ Verification responses may include artefact keys. Use these to get pre-signed download URLs:
60
+
61
+ ```ts
62
+ const verification = await client.getVerification({ id: "ID" })
63
+
64
+ // Get artefact keys from checks
65
+ const photoIdCheck = verification.checks.find((c) => c.step === "photo_id")
66
+ if (photoIdCheck?.artefacts?.[0]) {
67
+ const artefact = await client.getArtefact({
68
+ artefact_key: photoIdCheck.artefacts[0].key,
69
+ })
70
+
71
+ console.log(artefact.download_url) // Pre-signed URL (time-limited)
72
+ console.log(artefact.expires_at) // When the URL expires
73
+ }
74
+ ```
75
+
76
+ ### Verify UK immigration status (eVisa)
77
+
78
+ Verify a person's immigration status, right to work, or right to rent using their Home Office share code:
79
+
80
+ ```ts
81
+ const result = await client.verifyEvisa({
82
+ sub_type: "ImmigrationStatus", // or 'RightToRent', 'ImmigrationStatus'
83
+ payload: {
84
+ reason: "Education or training",
85
+ job_title: "Software Engineer",
86
+ company_name: "Sandbox Company",
87
+ date_of_birth: "1996-06-07",
88
+ share_code: "PASS12345",
89
+ },
90
+ })
91
+
92
+ console.log(result.outcome) // 'pass', 'fail', or 'error'
93
+
94
+ // Access type-specific fields based on sub_type
95
+ if (result.sub_type === 'ImmigrationStatus') {
96
+ console.log(result.extracted_details.immigration_status) // e.g., 'Settled'
97
+ }
98
+
99
+ console.log(result.validations.evisa_exists.status) // 'pass' or 'fail'
52
100
  ```
53
101
 
102
+ **Sandbox testing**: Use these share codes in sandbox mode:
103
+
104
+ - `PASS12345` - Returns successful verification
105
+ - `FAIL12345` - Returns failed verification (expired status)
106
+ - `ERROR1234` - Returns error response
107
+
108
+ ### Verify supporting documents
109
+
110
+ Extract and validate supporting documents like bank statements, utility bills, payslips:
111
+
112
+ ```ts
113
+ import fs from "fs"
114
+
115
+ const fileBuffer = fs.readFileSync("./bank-statement.pdf")
116
+ const file = new File([fileBuffer], "bank-statement.pdf", {
117
+ type: "application/pdf",
118
+ })
119
+
120
+ const result = await client.verifySupportingDocument({
121
+ document: file,
122
+ sub_type: "BankStatement",
123
+ minimum_document_length: 3, // Optional: minimum age in months
124
+ })
125
+
126
+ console.log(result.outcome) // 'pass', 'fail', or 'error'
127
+ console.log(result.extracted_details.first_name)
128
+ console.log(result.extracted_details.postcode)
129
+ console.log(result.validations.document_age_valid?.status)
130
+ ```
131
+
132
+ **Supported document types**:
133
+
134
+ - Financial: `BankStatement`, `CreditCardStatement`, `MortgageStatement`, `Payslip`, `PensionAnnualStatement`
135
+ - Utilities: `UtilityBill`, `MobilePhoneBill`
136
+ - Government: `BenefitsLetter`, `HMPPSLetter`, `NHSLetter`
137
+
54
138
  ### List verification flows
55
139
 
56
140
  ```ts
@@ -1,4 +1,4 @@
1
- import { RequestVerificationInput, SmartLookupInput, Status } from "./openapi/models";
1
+ import { RequestVerificationInput, SmartLookupInput, Status, EvisaVerificationInput, SupportingDocumentVerificationResponse } from "./openapi/models";
2
2
  interface VouchsafeClientOptions {
3
3
  client_id: string;
4
4
  client_secret: string;
@@ -17,6 +17,9 @@ export declare class VouchsafeClient {
17
17
  private verificationsApi;
18
18
  private smartLookupsApi;
19
19
  private flowsApi;
20
+ private artefactsApi;
21
+ private eVisaVerificationApi;
22
+ private supportingDocumentVerificationApi;
20
23
  constructor(options: VouchsafeClientOptions);
21
24
  /**
22
25
  * PRIVATE METHODS
@@ -45,6 +48,54 @@ export declare class VouchsafeClient {
45
48
  getFlow({ id }: {
46
49
  id: string;
47
50
  }): Promise<import("./openapi").Flow>;
51
+ /**
52
+ * Get a pre-signed download URL for an artefact.
53
+ *
54
+ * Exchange an artefact key (returned from other endpoints) for a time-limited
55
+ * pre-signed URL that can be used to download the file.
56
+ *
57
+ * @param artefact_key - The artefact key from verification response
58
+ * @returns Object with download_url, artefact_key, and expires_at
59
+ */
60
+ getArtefact({ artefact_key }: {
61
+ artefact_key: string;
62
+ }): Promise<import("./openapi").GetArtefactsResponse>;
63
+ /**
64
+ * Verify a person's UK immigration status using their Home Office share code.
65
+ *
66
+ * Supported verification types:
67
+ * - ImmigrationStatus - Check immigration status (e.g., Settled, Skilled Worker)
68
+ * - RightToWork - Verify right to work in the UK
69
+ * - RightToRent - Verify right to rent property in the UK
70
+ *
71
+ * Sandbox testing: Use these share codes in sandbox mode:
72
+ * - PASS12345 - Returns successful verification with "Pass" outcome
73
+ * - FAIL12345 - Returns failed verification (e.g. expired status)
74
+ * - ERROR1234 - Returns error response
75
+ *
76
+ * @param input - eVisa verification input with share_code, date_of_birth, and check_type
77
+ */
78
+ verifyEvisa(input: EvisaVerificationInput): Promise<import("./openapi").RightToRentVerificationResponse>;
79
+ /**
80
+ * Extract and validate a supporting document.
81
+ *
82
+ * Accepts a document file (PDF, JPG, or PNG) and extracts personal identity
83
+ * information and address details.
84
+ *
85
+ * Supported document types (sub_type):
86
+ * - Payslip, PensionAnnualStatement, BenefitsLetter
87
+ * - HMPPSLetter, NHSLetter
88
+ * - BankStatement, CreditCardStatement, MortgageStatement
89
+ * - UtilityBill, MobilePhoneBill
90
+ *
91
+ * @param params - Document file, sub_type, and optional minimum_document_length
92
+ * @returns Verification response with extracted details and validations
93
+ */
94
+ verifySupportingDocument(params: {
95
+ document: Blob | File;
96
+ sub_type: string;
97
+ minimum_document_length?: number;
98
+ }): Promise<SupportingDocumentVerificationResponse>;
48
99
  }
49
100
  export {};
50
101
  //# sourceMappingURL=VouchsafeClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VouchsafeClient.d.ts","sourceRoot":"","sources":["../src/VouchsafeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,EACP,MAAM,kBAAkB,CAAA;AAGzB,UAAU,sBAAsB;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,qBAAa,iBAAkB,SAAQ,KAAK;IAEjC,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE,OAAO;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AE,sBAAsB;IAM/C;;;;;;;;;;;;;;OAcG;IACG,wBAAwB,CAAC,MAAM,EAAE;QACrC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAA;QACrB,QAAQ,EAAE,MAAM,CAAA;QAChB,uBAAuB,CAAC,EAAE,MAAM,CAAA;KACjC,GAAG,OAAO,CAAC,sCAAsC,CAAC;CASpD"}
@@ -6,6 +6,9 @@ const AuthenticationApi_1 = require("./openapi/apis/AuthenticationApi");
6
6
  const VerificationsApi_1 = require("./openapi/apis/VerificationsApi");
7
7
  const SmartLookupsApi_1 = require("./openapi/apis/SmartLookupsApi");
8
8
  const FlowsApi_1 = require("./openapi/apis/FlowsApi");
9
+ const ArtefactsApi_1 = require("./openapi/apis/ArtefactsApi");
10
+ const EVisaVerificationApi_1 = require("./openapi/apis/EVisaVerificationApi");
11
+ const SupportingDocumentVerificationApi_1 = require("./openapi/apis/SupportingDocumentVerificationApi");
9
12
  class VouchsafeApiError extends Error {
10
13
  constructor(statusCode, responseBody, message) {
11
14
  super(message);
@@ -73,6 +76,9 @@ class VouchsafeClient {
73
76
  this.verificationsApi = new VerificationsApi_1.VerificationsApi(this.config);
74
77
  this.smartLookupsApi = new SmartLookupsApi_1.SmartLookupsApi(this.config);
75
78
  this.flowsApi = new FlowsApi_1.FlowsApi(this.config);
79
+ this.artefactsApi = new ArtefactsApi_1.ArtefactsApi(this.config);
80
+ this.eVisaVerificationApi = new EVisaVerificationApi_1.EVisaVerificationApi(this.config);
81
+ this.supportingDocumentVerificationApi = new SupportingDocumentVerificationApi_1.SupportingDocumentVerificationApi(this.config);
76
82
  }
77
83
  /**
78
84
  * PUBLIC METHODS
@@ -104,6 +110,58 @@ class VouchsafeClient {
104
110
  async getFlow({ id }) {
105
111
  return this.withErrorHandling(() => this.withErrorHandling(() => this.flowsApi.getFlow({ id })));
106
112
  }
113
+ /**
114
+ * Get a pre-signed download URL for an artefact.
115
+ *
116
+ * Exchange an artefact key (returned from other endpoints) for a time-limited
117
+ * pre-signed URL that can be used to download the file.
118
+ *
119
+ * @param artefact_key - The artefact key from verification response
120
+ * @returns Object with download_url, artefact_key, and expires_at
121
+ */
122
+ async getArtefact({ artefact_key }) {
123
+ return this.withErrorHandling(() => this.artefactsApi.getArtefacts({ artefactKey: artefact_key }));
124
+ }
125
+ /**
126
+ * Verify a person's UK immigration status using their Home Office share code.
127
+ *
128
+ * Supported verification types:
129
+ * - ImmigrationStatus - Check immigration status (e.g., Settled, Skilled Worker)
130
+ * - RightToWork - Verify right to work in the UK
131
+ * - RightToRent - Verify right to rent property in the UK
132
+ *
133
+ * Sandbox testing: Use these share codes in sandbox mode:
134
+ * - PASS12345 - Returns successful verification with "Pass" outcome
135
+ * - FAIL12345 - Returns failed verification (e.g. expired status)
136
+ * - ERROR1234 - Returns error response
137
+ *
138
+ * @param input - eVisa verification input with share_code, date_of_birth, and check_type
139
+ */
140
+ async verifyEvisa(input) {
141
+ return this.withErrorHandling(() => this.eVisaVerificationApi.verifyEvisa({ evisaVerificationInput: input }));
142
+ }
143
+ /**
144
+ * Extract and validate a supporting document.
145
+ *
146
+ * Accepts a document file (PDF, JPG, or PNG) and extracts personal identity
147
+ * information and address details.
148
+ *
149
+ * Supported document types (sub_type):
150
+ * - Payslip, PensionAnnualStatement, BenefitsLetter
151
+ * - HMPPSLetter, NHSLetter
152
+ * - BankStatement, CreditCardStatement, MortgageStatement
153
+ * - UtilityBill, MobilePhoneBill
154
+ *
155
+ * @param params - Document file, sub_type, and optional minimum_document_length
156
+ * @returns Verification response with extracted details and validations
157
+ */
158
+ async verifySupportingDocument(params) {
159
+ return this.withErrorHandling(() => this.supportingDocumentVerificationApi.verifySupportingDocument({
160
+ document: params.document,
161
+ subType: params.sub_type,
162
+ minimumDocumentLength: params.minimum_document_length?.toString()
163
+ }));
164
+ }
107
165
  }
108
166
  exports.VouchsafeClient = VouchsafeClient;
109
167
  //# sourceMappingURL=VouchsafeClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VouchsafeCl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AE,YAAY,EAA4B;QAC1D,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CACjC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAC9D,CAAA;IACH,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,WAAW,CAAC,KAA6B;QAC7C,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CACjC,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE,sBAAsB,EAAE,KAAK,EAAE,CAAC,CACzE,CAAA;IACH,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,wBAAwB,CAAC,MAI9B;QACC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CACjC,IAAI,CAAC,iCAAiC,CAAC,wBAAwB,CAAC;YAC9D,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,QAAQ;YACxB,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,EAAE,QAAQ,EAAE;SAClE,CAAC,CACH,CAAA;IACH,CAAC;CACF;AA5MD,0CA4MC"}
@@ -19,11 +19,11 @@ export interface VerifyEvisaRequest {
19
19
  */
20
20
  export declare class EVisaVerificationApi extends runtime.BaseAPI {
21
21
  /**
22
- * <div style=\"background-color: #ffebee; border-left: 4px solid #c62828; padding: 12px 16px; margin: 10px 0;\"> <strong style=\"color: #c62828;\">Experimental (beta):</strong> This feature is new and currently in beta. </div> Verify a person\'s UK immigration status using their Home Office share code. This endpoint allows you to verify `immigration status`, `right to work`, or `right to rent` by providing the person\'s share code and date of birth. The share code is obtained by the individual from the UK Home Office online service. **Supported verification types:** - `ImmigrationStatus` - Check a person\'s immigration status (e.g., Settled, Skilled Worker, Youth Mobility Scheme) - `RightToWork` - Verify a person\'s right to work in the UK - `RightToRent` - Verify a person\'s right to rent property in the UK **Sandbox testing:** Use these share codes in sandbox mode to test different outcomes: - `PASS12345` - Returns a successful verification with \"Pass\" outcome - `FAIL12345` - Returns a failed verification (e.g. expired status) - `ERROR1234` - Returns an error response **Date format:** The `expiration_date` and `valid_from` fields are returned as date strings in `yyyy-MM-dd` format (e.g. `\"2027-06-15\"`), or `null` for indefinite statuses such as Settled / ILR. > **Request behaviour:** This is a synchronous endpoint. It can take up to 20 seconds. > This endpoint supports sandbox mode. [See how sandbox mode works](https://help.vouchsafe.id/en/articles/11979598-how-does-sandbox-mode-work).
22
+ * <div style=\"background-color: #ffebee; border-left: 4px solid #c62828; padding: 12px 16px; margin: 10px 0;\"> <strong style=\"color: #c62828;\">Experimental (beta):</strong> This feature is new and currently in beta. </div> Verify a person\'s UK eVisa using their Home Office share code. This endpoint allows you to verify a person\'s `immigration status`, `right to work`, or `right to rent` eVisa by providing their share code and date of birth. The share code is obtained by the individual from the UK Home Office online service. **Supported verification types:** - `ImmigrationStatus` - Check a person\'s immigration status (e.g., Settled, Skilled Worker, Youth Mobility Scheme) - `RightToWork` - Check a person\'s right to work in the UK - `RightToRent` - Check a person\'s right to rent property in the UK **Response fields by sub-type:** The response fields directly reflect the information available on a particular eVisa sub-type. On a `pass` outcome, all fields for the sub-type will be populated. On a `fail` outcome, `extracted_details` may be partially populated or empty depending on which validation step failed. **Billing:** Every successful API call (`HTTP 200`) is a billable event, regardless of whether the verification outcome is `pass` or `fail`. Error responses (`HTTP 422`, `HTTP 503`) are not billable and return a different response body. Note that the `billable` field in the response is deprecated and will always be `true` on a `HTTP 200` response. **Artefacts:** On a successful response, artefacts are returned inline with pre-signed download URLs. You have **30 minutes** to download them before the URLs expire. > **Request behaviour:** This is a synchronous endpoint. It can take up to 20 seconds. **Retry guidance:** It is safe to retry requests as the endpoint is stateless and does not create persistent records. We recommend an exponential backoff strategy (e.g. 2s, 4s, 8s) with a maximum of 2–3 retries for transient failures (`HTTP 503`). Do **not** retry `HTTP 422` responses as these indicate the share code has been locked out by GOV.UK and the user needs to generate a new one. **Sandbox testing:** Use these share codes in sandbox mode to test different outcomes: - `PASS12345` - Returns a successful verification with \"Pass\" outcome - `FAIL12345` - Returns a failed verification (e.g. expired status) - `ERROR1234` - Returns an error response > This endpoint supports sandbox mode. [See how sandbox mode works](https://help.vouchsafe.id/en/articles/11979598-how-does-sandbox-mode-work).
23
23
  */
24
24
  verifyEvisaRaw(requestParameters: VerifyEvisaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EvisaVerificationResponse>>;
25
25
  /**
26
- * <div style=\"background-color: #ffebee; border-left: 4px solid #c62828; padding: 12px 16px; margin: 10px 0;\"> <strong style=\"color: #c62828;\">Experimental (beta):</strong> This feature is new and currently in beta. </div> Verify a person\'s UK immigration status using their Home Office share code. This endpoint allows you to verify `immigration status`, `right to work`, or `right to rent` by providing the person\'s share code and date of birth. The share code is obtained by the individual from the UK Home Office online service. **Supported verification types:** - `ImmigrationStatus` - Check a person\'s immigration status (e.g., Settled, Skilled Worker, Youth Mobility Scheme) - `RightToWork` - Verify a person\'s right to work in the UK - `RightToRent` - Verify a person\'s right to rent property in the UK **Sandbox testing:** Use these share codes in sandbox mode to test different outcomes: - `PASS12345` - Returns a successful verification with \"Pass\" outcome - `FAIL12345` - Returns a failed verification (e.g. expired status) - `ERROR1234` - Returns an error response **Date format:** The `expiration_date` and `valid_from` fields are returned as date strings in `yyyy-MM-dd` format (e.g. `\"2027-06-15\"`), or `null` for indefinite statuses such as Settled / ILR. > **Request behaviour:** This is a synchronous endpoint. It can take up to 20 seconds. > This endpoint supports sandbox mode. [See how sandbox mode works](https://help.vouchsafe.id/en/articles/11979598-how-does-sandbox-mode-work).
26
+ * <div style=\"background-color: #ffebee; border-left: 4px solid #c62828; padding: 12px 16px; margin: 10px 0;\"> <strong style=\"color: #c62828;\">Experimental (beta):</strong> This feature is new and currently in beta. </div> Verify a person\'s UK eVisa using their Home Office share code. This endpoint allows you to verify a person\'s `immigration status`, `right to work`, or `right to rent` eVisa by providing their share code and date of birth. The share code is obtained by the individual from the UK Home Office online service. **Supported verification types:** - `ImmigrationStatus` - Check a person\'s immigration status (e.g., Settled, Skilled Worker, Youth Mobility Scheme) - `RightToWork` - Check a person\'s right to work in the UK - `RightToRent` - Check a person\'s right to rent property in the UK **Response fields by sub-type:** The response fields directly reflect the information available on a particular eVisa sub-type. On a `pass` outcome, all fields for the sub-type will be populated. On a `fail` outcome, `extracted_details` may be partially populated or empty depending on which validation step failed. **Billing:** Every successful API call (`HTTP 200`) is a billable event, regardless of whether the verification outcome is `pass` or `fail`. Error responses (`HTTP 422`, `HTTP 503`) are not billable and return a different response body. Note that the `billable` field in the response is deprecated and will always be `true` on a `HTTP 200` response. **Artefacts:** On a successful response, artefacts are returned inline with pre-signed download URLs. You have **30 minutes** to download them before the URLs expire. > **Request behaviour:** This is a synchronous endpoint. It can take up to 20 seconds. **Retry guidance:** It is safe to retry requests as the endpoint is stateless and does not create persistent records. We recommend an exponential backoff strategy (e.g. 2s, 4s, 8s) with a maximum of 2–3 retries for transient failures (`HTTP 503`). Do **not** retry `HTTP 422` responses as these indicate the share code has been locked out by GOV.UK and the user needs to generate a new one. **Sandbox testing:** Use these share codes in sandbox mode to test different outcomes: - `PASS12345` - Returns a successful verification with \"Pass\" outcome - `FAIL12345` - Returns a failed verification (e.g. expired status) - `ERROR1234` - Returns an error response > This endpoint supports sandbox mode. [See how sandbox mode works](https://help.vouchsafe.id/en/articles/11979598-how-does-sandbox-mode-work).
27
27
  */
28
28
  verifyEvisa(requestParameters: VerifyEvisaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EvisaVerificationResponse>;
29
29
  }
@@ -54,7 +54,7 @@ const index_1 = require("../models/index");
54
54
  */
55
55
  class EVisaVerificationApi extends runtime.BaseAPI {
56
56
  /**
57
- * <div style=\"background-color: #ffebee; border-left: 4px solid #c62828; padding: 12px 16px; margin: 10px 0;\"> <strong style=\"color: #c62828;\">Experimental (beta):</strong> This feature is new and currently in beta. </div> Verify a person\'s UK immigration status using their Home Office share code. This endpoint allows you to verify `immigration status`, `right to work`, or `right to rent` by providing the person\'s share code and date of birth. The share code is obtained by the individual from the UK Home Office online service. **Supported verification types:** - `ImmigrationStatus` - Check a person\'s immigration status (e.g., Settled, Skilled Worker, Youth Mobility Scheme) - `RightToWork` - Verify a person\'s right to work in the UK - `RightToRent` - Verify a person\'s right to rent property in the UK **Sandbox testing:** Use these share codes in sandbox mode to test different outcomes: - `PASS12345` - Returns a successful verification with \"Pass\" outcome - `FAIL12345` - Returns a failed verification (e.g. expired status) - `ERROR1234` - Returns an error response **Date format:** The `expiration_date` and `valid_from` fields are returned as date strings in `yyyy-MM-dd` format (e.g. `\"2027-06-15\"`), or `null` for indefinite statuses such as Settled / ILR. > **Request behaviour:** This is a synchronous endpoint. It can take up to 20 seconds. > This endpoint supports sandbox mode. [See how sandbox mode works](https://help.vouchsafe.id/en/articles/11979598-how-does-sandbox-mode-work).
57
+ * <div style=\"background-color: #ffebee; border-left: 4px solid #c62828; padding: 12px 16px; margin: 10px 0;\"> <strong style=\"color: #c62828;\">Experimental (beta):</strong> This feature is new and currently in beta. </div> Verify a person\'s UK eVisa using their Home Office share code. This endpoint allows you to verify a person\'s `immigration status`, `right to work`, or `right to rent` eVisa by providing their share code and date of birth. The share code is obtained by the individual from the UK Home Office online service. **Supported verification types:** - `ImmigrationStatus` - Check a person\'s immigration status (e.g., Settled, Skilled Worker, Youth Mobility Scheme) - `RightToWork` - Check a person\'s right to work in the UK - `RightToRent` - Check a person\'s right to rent property in the UK **Response fields by sub-type:** The response fields directly reflect the information available on a particular eVisa sub-type. On a `pass` outcome, all fields for the sub-type will be populated. On a `fail` outcome, `extracted_details` may be partially populated or empty depending on which validation step failed. **Billing:** Every successful API call (`HTTP 200`) is a billable event, regardless of whether the verification outcome is `pass` or `fail`. Error responses (`HTTP 422`, `HTTP 503`) are not billable and return a different response body. Note that the `billable` field in the response is deprecated and will always be `true` on a `HTTP 200` response. **Artefacts:** On a successful response, artefacts are returned inline with pre-signed download URLs. You have **30 minutes** to download them before the URLs expire. > **Request behaviour:** This is a synchronous endpoint. It can take up to 20 seconds. **Retry guidance:** It is safe to retry requests as the endpoint is stateless and does not create persistent records. We recommend an exponential backoff strategy (e.g. 2s, 4s, 8s) with a maximum of 2–3 retries for transient failures (`HTTP 503`). Do **not** retry `HTTP 422` responses as these indicate the share code has been locked out by GOV.UK and the user needs to generate a new one. **Sandbox testing:** Use these share codes in sandbox mode to test different outcomes: - `PASS12345` - Returns a successful verification with \"Pass\" outcome - `FAIL12345` - Returns a failed verification (e.g. expired status) - `ERROR1234` - Returns an error response > This endpoint supports sandbox mode. [See how sandbox mode works](https://help.vouchsafe.id/en/articles/11979598-how-does-sandbox-mode-work).
58
58
  */
59
59
  async verifyEvisaRaw(requestParameters, initOverrides) {
60
60
  if (requestParameters['evisaVerificationInput'] == null) {
@@ -81,7 +81,7 @@ class EVisaVerificationApi extends runtime.BaseAPI {
81
81
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EvisaVerificationResponseFromJSON)(jsonValue));
82
82
  }
83
83
  /**
84
- * <div style=\"background-color: #ffebee; border-left: 4px solid #c62828; padding: 12px 16px; margin: 10px 0;\"> <strong style=\"color: #c62828;\">Experimental (beta):</strong> This feature is new and currently in beta. </div> Verify a person\'s UK immigration status using their Home Office share code. This endpoint allows you to verify `immigration status`, `right to work`, or `right to rent` by providing the person\'s share code and date of birth. The share code is obtained by the individual from the UK Home Office online service. **Supported verification types:** - `ImmigrationStatus` - Check a person\'s immigration status (e.g., Settled, Skilled Worker, Youth Mobility Scheme) - `RightToWork` - Verify a person\'s right to work in the UK - `RightToRent` - Verify a person\'s right to rent property in the UK **Sandbox testing:** Use these share codes in sandbox mode to test different outcomes: - `PASS12345` - Returns a successful verification with \"Pass\" outcome - `FAIL12345` - Returns a failed verification (e.g. expired status) - `ERROR1234` - Returns an error response **Date format:** The `expiration_date` and `valid_from` fields are returned as date strings in `yyyy-MM-dd` format (e.g. `\"2027-06-15\"`), or `null` for indefinite statuses such as Settled / ILR. > **Request behaviour:** This is a synchronous endpoint. It can take up to 20 seconds. > This endpoint supports sandbox mode. [See how sandbox mode works](https://help.vouchsafe.id/en/articles/11979598-how-does-sandbox-mode-work).
84
+ * <div style=\"background-color: #ffebee; border-left: 4px solid #c62828; padding: 12px 16px; margin: 10px 0;\"> <strong style=\"color: #c62828;\">Experimental (beta):</strong> This feature is new and currently in beta. </div> Verify a person\'s UK eVisa using their Home Office share code. This endpoint allows you to verify a person\'s `immigration status`, `right to work`, or `right to rent` eVisa by providing their share code and date of birth. The share code is obtained by the individual from the UK Home Office online service. **Supported verification types:** - `ImmigrationStatus` - Check a person\'s immigration status (e.g., Settled, Skilled Worker, Youth Mobility Scheme) - `RightToWork` - Check a person\'s right to work in the UK - `RightToRent` - Check a person\'s right to rent property in the UK **Response fields by sub-type:** The response fields directly reflect the information available on a particular eVisa sub-type. On a `pass` outcome, all fields for the sub-type will be populated. On a `fail` outcome, `extracted_details` may be partially populated or empty depending on which validation step failed. **Billing:** Every successful API call (`HTTP 200`) is a billable event, regardless of whether the verification outcome is `pass` or `fail`. Error responses (`HTTP 422`, `HTTP 503`) are not billable and return a different response body. Note that the `billable` field in the response is deprecated and will always be `true` on a `HTTP 200` response. **Artefacts:** On a successful response, artefacts are returned inline with pre-signed download URLs. You have **30 minutes** to download them before the URLs expire. > **Request behaviour:** This is a synchronous endpoint. It can take up to 20 seconds. **Retry guidance:** It is safe to retry requests as the endpoint is stateless and does not create persistent records. We recommend an exponential backoff strategy (e.g. 2s, 4s, 8s) with a maximum of 2–3 retries for transient failures (`HTTP 503`). Do **not** retry `HTTP 422` responses as these indicate the share code has been locked out by GOV.UK and the user needs to generate a new one. **Sandbox testing:** Use these share codes in sandbox mode to test different outcomes: - `PASS12345` - Returns a successful verification with \"Pass\" outcome - `FAIL12345` - Returns a failed verification (e.g. expired status) - `ERROR1234` - Returns an error response > This endpoint supports sandbox mode. [See how sandbox mode works](https://help.vouchsafe.id/en/articles/11979598-how-does-sandbox-mode-work).
85
85
  */
86
86
  async verifyEvisa(requestParameters, initOverrides) {
87
87
  const response = await this.verifyEvisaRaw(requestParameters, initOverrides);
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Proper discriminated union for Api_VerificationCheck_.
3
+ * This file is auto-generated by post-processing script.
4
+ */
5
+ import type { ApiVerificationCheck0 } from './ApiVerificationCheck0';
6
+ import type { ApiVerificationCheck1 } from './ApiVerificationCheck1';
7
+ import type { ApiVerificationCheck2 } from './ApiVerificationCheck2';
8
+ import type { ApiVerificationCheck3 } from './ApiVerificationCheck3';
9
+ import type { ApiVerificationCheck4 } from './ApiVerificationCheck4';
10
+ import type { ApiVerificationCheck5 } from './ApiVerificationCheck5';
11
+ import type { ApiVerificationCheck6 } from './ApiVerificationCheck6';
12
+ import type { ApiVerificationCheck7 } from './ApiVerificationCheck7';
13
+ import type { ApiVerificationCheck8 } from './ApiVerificationCheck8';
14
+ /**
15
+ * Discriminated union of all Api_VerificationCheck_ types
16
+ * @export
17
+ */
18
+ export type ApiVerificationCheck = ApiVerificationCheck0 | ApiVerificationCheck1 | ApiVerificationCheck2 | ApiVerificationCheck3 | ApiVerificationCheck4 | ApiVerificationCheck5 | ApiVerificationCheck6 | ApiVerificationCheck7 | ApiVerificationCheck8;
19
+ export declare function ApiVerificationCheckFromJSON(json: any): ApiVerificationCheck;
20
+ export declare function ApiVerificationCheckFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiVerificationCheck;
21
+ export declare function ApiVerificationCheckToJSON(value: ApiVerificationCheck): any;
22
+ export declare function ApiVerificationCheckToJSONTyped(value: ApiVerificationCheck | undefined, ignoreDiscriminator: boolean): any;
23
+ //# sourceMappingURL=ApiVerificationCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiVerificationCheck.d.ts","sourceRoot":"","sources":["../../../src/openapi/models/ApiVerificationCheck.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAYrE;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,CAAC;AAE1B,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAE5E;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,oBAAoB,CAiC/G;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,CAE3E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,EAAE,mBAAmB,EAAE,OAAO,GAAG,GAAG,CAgC1H"}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Proper discriminated union for Api_VerificationCheck_.
6
+ * This file is auto-generated by post-processing script.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ApiVerificationCheckFromJSON = ApiVerificationCheckFromJSON;
10
+ exports.ApiVerificationCheckFromJSONTyped = ApiVerificationCheckFromJSONTyped;
11
+ exports.ApiVerificationCheckToJSON = ApiVerificationCheckToJSON;
12
+ exports.ApiVerificationCheckToJSONTyped = ApiVerificationCheckToJSONTyped;
13
+ const ApiVerificationCheck0_1 = require("./ApiVerificationCheck0");
14
+ const ApiVerificationCheck1_1 = require("./ApiVerificationCheck1");
15
+ const ApiVerificationCheck2_1 = require("./ApiVerificationCheck2");
16
+ const ApiVerificationCheck3_1 = require("./ApiVerificationCheck3");
17
+ const ApiVerificationCheck4_1 = require("./ApiVerificationCheck4");
18
+ const ApiVerificationCheck5_1 = require("./ApiVerificationCheck5");
19
+ const ApiVerificationCheck6_1 = require("./ApiVerificationCheck6");
20
+ const ApiVerificationCheck7_1 = require("./ApiVerificationCheck7");
21
+ const ApiVerificationCheck8_1 = require("./ApiVerificationCheck8");
22
+ function ApiVerificationCheckFromJSON(json) {
23
+ return ApiVerificationCheckFromJSONTyped(json, false);
24
+ }
25
+ function ApiVerificationCheckFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ if (ignoreDiscriminator) {
30
+ // If ignoring discriminator, try to parse as first variant
31
+ return (0, ApiVerificationCheck0_1.ApiVerificationCheck0FromJSON)(json);
32
+ }
33
+ // Use discriminator to determine which type to parse
34
+ switch (json['step']) {
35
+ case 'video_selfie':
36
+ return (0, ApiVerificationCheck0_1.ApiVerificationCheck0FromJSON)(json);
37
+ case 'verify_email':
38
+ return (0, ApiVerificationCheck1_1.ApiVerificationCheck1FromJSON)(json);
39
+ case 'verify_phone_number':
40
+ return (0, ApiVerificationCheck2_1.ApiVerificationCheck2FromJSON)(json);
41
+ case 'verify_user_details':
42
+ return (0, ApiVerificationCheck3_1.ApiVerificationCheck3FromJSON)(json);
43
+ case 'photo_id':
44
+ return (0, ApiVerificationCheck4_1.ApiVerificationCheck4FromJSON)(json);
45
+ case 'supporting_document':
46
+ return (0, ApiVerificationCheck5_1.ApiVerificationCheck5FromJSON)(json);
47
+ case 'bank_account':
48
+ return (0, ApiVerificationCheck6_1.ApiVerificationCheck6FromJSON)(json);
49
+ case 'evisa':
50
+ return (0, ApiVerificationCheck7_1.ApiVerificationCheck7FromJSON)(json);
51
+ case 'vouch':
52
+ return (0, ApiVerificationCheck8_1.ApiVerificationCheck8FromJSON)(json);
53
+ default:
54
+ throw new Error(`Unknown step value: ${json['step']}`);
55
+ }
56
+ }
57
+ function ApiVerificationCheckToJSON(value) {
58
+ return ApiVerificationCheckToJSONTyped(value, false);
59
+ }
60
+ function ApiVerificationCheckToJSONTyped(value, ignoreDiscriminator) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ if (ignoreDiscriminator) {
65
+ // If ignoring discriminator, serialize normally
66
+ }
67
+ // Use discriminator to determine which serializer to use
68
+ switch (value.step) {
69
+ case 'video_selfie':
70
+ return (0, ApiVerificationCheck0_1.ApiVerificationCheck0ToJSON)(value);
71
+ case 'verify_email':
72
+ return (0, ApiVerificationCheck1_1.ApiVerificationCheck1ToJSON)(value);
73
+ case 'verify_phone_number':
74
+ return (0, ApiVerificationCheck2_1.ApiVerificationCheck2ToJSON)(value);
75
+ case 'verify_user_details':
76
+ return (0, ApiVerificationCheck3_1.ApiVerificationCheck3ToJSON)(value);
77
+ case 'photo_id':
78
+ return (0, ApiVerificationCheck4_1.ApiVerificationCheck4ToJSON)(value);
79
+ case 'supporting_document':
80
+ return (0, ApiVerificationCheck5_1.ApiVerificationCheck5ToJSON)(value);
81
+ case 'bank_account':
82
+ return (0, ApiVerificationCheck6_1.ApiVerificationCheck6ToJSON)(value);
83
+ case 'evisa':
84
+ return (0, ApiVerificationCheck7_1.ApiVerificationCheck7ToJSON)(value);
85
+ case 'vouch':
86
+ return (0, ApiVerificationCheck8_1.ApiVerificationCheck8ToJSON)(value);
87
+ default:
88
+ throw new Error(`Unknown step value: ${value.step}`);
89
+ }
90
+ }
91
+ //# sourceMappingURL=ApiVerificationCheck.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiVerificationCheck.js","sourceRoot":"","sources":["../../../src/openapi/models/ApiVerificationCheck.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;GAGG;;AAqCH,oEAEC;AAED,8EAiCC;AAED,gEAEC;AAED,0EAgCC;AApGD,mEAAqG;AACrG,mEAAqG;AACrG,mEAAqG;AACrG,mEAAqG;AACrG,mEAAqG;AACrG,mEAAqG;AACrG,mEAAqG;AACrG,mEAAqG;AACrG,mEAAqG;AAiBrG,SAAgB,4BAA4B,CAAC,IAAS;IACpD,OAAO,iCAAiC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACxD,CAAC;AAED,SAAgB,iCAAiC,CAAC,IAAS,EAAE,mBAA4B;IACvF,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,mBAAmB,EAAE,CAAC;QACxB,2DAA2D;QAC3D,OAAO,IAAA,qDAA6B,EAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,qDAAqD;IACrD,QAAQ,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,KAAK,cAAc;YACjB,OAAO,IAAA,qDAA6B,EAAC,IAAI,CAAC,CAAC;QAC7C,KAAK,cAAc;YACjB,OAAO,IAAA,qDAA6B,EAAC,IAAI,CAAC,CAAC;QAC7C,KAAK,qBAAqB;YACxB,OAAO,IAAA,qDAA6B,EAAC,IAAI,CAAC,CAAC;QAC7C,KAAK,qBAAqB;YACxB,OAAO,IAAA,qDAA6B,EAAC,IAAI,CAAC,CAAC;QAC7C,KAAK,UAAU;YACb,OAAO,IAAA,qDAA6B,EAAC,IAAI,CAAC,CAAC;QAC7C,KAAK,qBAAqB;YACxB,OAAO,IAAA,qDAA6B,EAAC,IAAI,CAAC,CAAC;QAC7C,KAAK,cAAc;YACjB,OAAO,IAAA,qDAA6B,EAAC,IAAI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C;QACrE;YACE,MAAM,IAAI,KAAK,CAAC,uBAAwB,KAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Vouchsafe API docs
3
+ * Vouchsafe offers a REST API to conduct operations programmatically. You can request and manage verifications, as well as perform smart lookups. To use the API, you need a client ID and secret from the Vouchsafe dashboard. [Sign up here](https://app.vouchsafe.id/) if you haven\'t already. We also have a [video guide](https://www.youtube.com/playlist?list=PLx6V6SSTMuF_ZNWBPnysvwmdIwboLViE8) showing the basics, as well as [SDKs and libraries](https://help.vouchsafe.id/en/articles/12026847-vouchsafe-sdks-and-libraries) for popular languages.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ * Contact: help@vouchsafe.id
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ApiVerificationCheck0Validations } from './ApiVerificationCheck0Validations';
13
+ import type { ApiVerificationCheck0ArtefactsInner } from './ApiVerificationCheck0ArtefactsInner';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface ApiVerificationCheck0
18
+ */
19
+ export interface ApiVerificationCheck0 {
20
+ /**
21
+ *
22
+ * @type {Array<ApiVerificationCheck0ArtefactsInner>}
23
+ * @memberof ApiVerificationCheck0
24
+ */
25
+ artefacts: Array<ApiVerificationCheck0ArtefactsInner>;
26
+ /**
27
+ *
28
+ * @type {ApiVerificationCheck0Validations}
29
+ * @memberof ApiVerificationCheck0
30
+ */
31
+ validations: ApiVerificationCheck0Validations;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof ApiVerificationCheck0
36
+ */
37
+ created_at?: string;
38
+ /**
39
+ *
40
+ * @type {number}
41
+ * @memberof ApiVerificationCheck0
42
+ */
43
+ total_attempts?: number;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof ApiVerificationCheck0
48
+ */
49
+ outcome: ApiVerificationCheck0OutcomeEnum;
50
+ /**
51
+ *
52
+ * @type {string}
53
+ * @memberof ApiVerificationCheck0
54
+ */
55
+ step: ApiVerificationCheck0StepEnum;
56
+ }
57
+ /**
58
+ * @export
59
+ */
60
+ export declare const ApiVerificationCheck0OutcomeEnum: {
61
+ readonly Pass: "pass";
62
+ readonly Fail: "fail";
63
+ readonly InProgress: "in_progress";
64
+ readonly Error: "error";
65
+ };
66
+ export type ApiVerificationCheck0OutcomeEnum = typeof ApiVerificationCheck0OutcomeEnum[keyof typeof ApiVerificationCheck0OutcomeEnum];
67
+ /**
68
+ * @export
69
+ */
70
+ export declare const ApiVerificationCheck0StepEnum: {
71
+ readonly VideoSelfie: "video_selfie";
72
+ };
73
+ export type ApiVerificationCheck0StepEnum = typeof ApiVerificationCheck0StepEnum[keyof typeof ApiVerificationCheck0StepEnum];
74
+ /**
75
+ * Check if a given object implements the ApiVerificationCheck0 interface.
76
+ */
77
+ export declare function instanceOfApiVerificationCheck0(value: object): value is ApiVerificationCheck0;
78
+ export declare function ApiVerificationCheck0FromJSON(json: any): ApiVerificationCheck0;
79
+ export declare function ApiVerificationCheck0FromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiVerificationCheck0;
80
+ export declare function ApiVerificationCheck0ToJSON(json: any): ApiVerificationCheck0;
81
+ export declare function ApiVerificationCheck0ToJSONTyped(value?: ApiVerificationCheck0 | null, ignoreDiscriminator?: boolean): any;
82
+ //# sourceMappingURL=ApiVerificationCheck0.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiVerificationCheck0.d.ts","sourceRoot":"","sources":["../../../src/openapi/models/ApiVerificationCheck0.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAO3F,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAQjG;;;;GAIG;AACH,MAAM,WAAW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