@myazahq/kyc-sdk-react-native 2.5.0 → 3.0.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 (219) hide show
  1. package/README.md +277 -7
  2. package/android/build.gradle +30 -16
  3. package/android/consumer-rules.pro +22 -0
  4. package/android/src/main/AndroidManifest.xml +17 -6
  5. package/android/src/main/java/com/margelo/nitro/myazakyc/HybridMyazaFaceDetector.kt +27 -70
  6. package/android/src/main/java/com/margelo/nitro/myazakyc/HybridMyazaTextRecognizer.kt +14 -0
  7. package/android/src/main/java/com/margelo/nitro/myazakyc/MlKitModelReadiness.kt +154 -0
  8. package/app.plugin.js +146 -10
  9. package/ios/HybridMyazaFaceDetector.swift +8 -3
  10. package/ios/HybridMyazaTextRecognizer.swift +8 -0
  11. package/nitrogen/generated/android/c++/JHybridMyazaTextRecognizerSpec.cpp +21 -0
  12. package/nitrogen/generated/android/c++/JHybridMyazaTextRecognizerSpec.hpp +2 -0
  13. package/nitrogen/generated/android/kotlin/com/margelo/nitro/myazakyc/HybridMyazaTextRecognizerSpec.kt +8 -0
  14. package/nitrogen/generated/ios/c++/HybridMyazaTextRecognizerSpecSwift.hpp +16 -0
  15. package/nitrogen/generated/ios/swift/HybridMyazaTextRecognizerSpec.swift +2 -0
  16. package/nitrogen/generated/ios/swift/HybridMyazaTextRecognizerSpec_cxx.swift +31 -0
  17. package/nitrogen/generated/shared/c++/HybridMyazaTextRecognizerSpec.cpp +2 -0
  18. package/nitrogen/generated/shared/c++/HybridMyazaTextRecognizerSpec.hpp +2 -0
  19. package/package.json +30 -9
  20. package/src/MyazaKYC.tsx +4 -11
  21. package/src/assets/fonts/Karla_400Regular.ttf +0 -0
  22. package/src/assets/fonts/Karla_500Medium.ttf +0 -0
  23. package/src/assets/fonts/Karla_600SemiBold.ttf +0 -0
  24. package/src/assets/fonts/Karla_700Bold.ttf +0 -0
  25. package/src/assets/fonts/OFL-Karla.txt +93 -0
  26. package/src/assets/fonts/OFL-SpaceGrotesk.txt +93 -0
  27. package/src/assets/fonts/README.md +12 -0
  28. package/src/assets/fonts/SpaceGrotesk_500Medium.ttf +0 -0
  29. package/src/assets/fonts/SpaceGrotesk_600SemiBold.ttf +0 -0
  30. package/src/assets/fonts/SpaceGrotesk_700Bold.ttf +0 -0
  31. package/src/capture/useAutoCapture.ts +8 -1
  32. package/src/components/CountryField.tsx +8 -0
  33. package/src/components/CountryRegionPicker.tsx +184 -0
  34. package/src/components/DialCodePicker.tsx +47 -68
  35. package/src/components/DialCodeRow.tsx +102 -0
  36. package/src/components/DocumentCropper.tsx +30 -24
  37. package/src/components/DocumentReview.tsx +11 -1
  38. package/src/components/DocumentReviewSide.tsx +6 -2
  39. package/src/components/DocumentReviewZoom.tsx +5 -1
  40. package/src/components/FramedMapPicker.tsx +122 -0
  41. package/src/components/GeoBadge.tsx +34 -0
  42. package/src/components/Icon.tsx +10 -192
  43. package/src/components/KycFlow.tsx +69 -34
  44. package/src/components/LineSkeleton.tsx +100 -0
  45. package/src/components/MapChrome.tsx +67 -0
  46. package/src/components/MapPinMarker.tsx +54 -0
  47. package/src/components/MapPinPicker.tsx +179 -0
  48. package/src/components/MilestoneTrack.tsx +155 -0
  49. package/src/components/MyazaButton.tsx +9 -0
  50. package/src/components/MyazaInput.tsx +17 -1
  51. package/src/components/OptionRow.tsx +22 -3
  52. package/src/components/PhoneNumberInput.tsx +8 -0
  53. package/src/components/PoweredBy.tsx +5 -5
  54. package/src/components/PresenceBlocks.tsx +153 -0
  55. package/src/components/RequiredDocumentPill.tsx +114 -0
  56. package/src/components/StepHeader.tsx +23 -3
  57. package/src/components/StepView.tsx +17 -0
  58. package/src/components/StickyActions.tsx +56 -0
  59. package/src/components/dialCodeRows.ts +64 -0
  60. package/src/components/documentReviewCopy.ts +39 -0
  61. package/src/components/fonts.ts +14 -17
  62. package/src/components/icon-map.ts +176 -0
  63. package/src/components/stepHeaderMeta.tsx +48 -5
  64. package/src/config/addressCollection.ts +125 -0
  65. package/src/config/biometricOptions.ts +100 -0
  66. package/src/config/business.ts +20 -1
  67. package/src/config/businessSteps.ts +8 -2
  68. package/src/config/consentStep.ts +19 -0
  69. package/src/config/documentCaptureMethods.ts +31 -0
  70. package/src/config/proofOfAddress.ts +54 -11
  71. package/src/config/regions.ts +24 -0
  72. package/src/config/stepOrder.ts +79 -5
  73. package/src/config/uploadLimits.ts +35 -0
  74. package/src/config/workflowMerge.ts +13 -5
  75. package/src/index.ts +49 -1
  76. package/src/lib/address-current-location.ts +171 -0
  77. package/src/lib/address-field-modes.ts +119 -0
  78. package/src/lib/address-flow.ts +172 -0
  79. package/src/lib/address-helpers.ts +48 -0
  80. package/src/lib/address-line.ts +76 -0
  81. package/src/lib/address-pin-move.ts +97 -0
  82. package/src/lib/address-step-recovery.ts +63 -0
  83. package/src/lib/authed-image.ts +78 -0
  84. package/src/lib/biometric-copy.ts +51 -0
  85. package/src/lib/captureRing.ts +83 -0
  86. package/src/lib/country-adoption.ts +89 -0
  87. package/src/lib/documentCaptureCheck.ts +136 -0
  88. package/src/lib/inferred-country.ts +65 -0
  89. package/src/lib/livenessLayout.ts +49 -0
  90. package/src/lib/map-frame.ts +159 -0
  91. package/src/lib/map-tiles.ts +143 -0
  92. package/src/lib/model-ready.ts +82 -0
  93. package/src/lib/poa-country-gate.ts +27 -0
  94. package/src/lib/prime-models.ts +50 -0
  95. package/src/lib/resubmit.ts +36 -7
  96. package/src/lib/result-copy.ts +116 -0
  97. package/src/lib/result-wait.ts +53 -0
  98. package/src/lib/review-map-surface.ts +26 -0
  99. package/src/lib/scope.ts +31 -0
  100. package/src/lib/selfie-sharpness.ts +211 -0
  101. package/src/lib/selfie-upload-wait.ts +79 -0
  102. package/src/lib/street-view-fov.ts +42 -0
  103. package/src/lib/webview-available.ts +47 -0
  104. package/src/liveness/avatarSource.ts +59 -0
  105. package/src/liveness/useLiveness.ts +6 -1
  106. package/src/liveness/useModelReady.ts +9 -55
  107. package/src/mrz/extract.ts +71 -4
  108. package/src/mrz/textRecognizer.ts +36 -0
  109. package/src/mrz/useTextModelReady.ts +21 -0
  110. package/src/presence/background-math.ts +100 -0
  111. package/src/presence/background-store.ts +82 -0
  112. package/src/presence/background.ts +165 -0
  113. package/src/presence/foreground-service.ts +193 -0
  114. package/src/presence/fs.ts +51 -0
  115. package/src/presence/geofence.ts +41 -0
  116. package/src/presence/math.ts +44 -0
  117. package/src/presence/post.ts +40 -0
  118. package/src/presence/report.ts +87 -0
  119. package/src/presence/sampler.ts +110 -0
  120. package/src/presence/status.ts +92 -0
  121. package/src/presence/store.ts +94 -0
  122. package/src/presence/tier.ts +36 -0
  123. package/src/presence/watch-wait.ts +81 -0
  124. package/src/screens/AddressCountryControl.tsx +115 -0
  125. package/src/screens/BusinessDetailsFields.tsx +3 -0
  126. package/src/screens/BusinessDetailsStep.tsx +2 -0
  127. package/src/screens/BusinessDocumentSlot.tsx +3 -2
  128. package/src/screens/BusinessDocumentsStep.tsx +4 -55
  129. package/src/screens/CompanyInfoFields.tsx +6 -1
  130. package/src/screens/ConsentStep.tsx +6 -17
  131. package/src/screens/ContactActions.tsx +54 -0
  132. package/src/screens/ContactDestinationField.tsx +4 -0
  133. package/src/screens/ContactEntryPanel.tsx +75 -0
  134. package/src/screens/ContactVerificationStep.tsx +26 -56
  135. package/src/screens/CountrySelectStep.tsx +13 -147
  136. package/src/screens/DocumentCaptureStep.tsx +177 -93
  137. package/src/screens/LivenessAvatar.tsx +33 -16
  138. package/src/screens/LivenessStep.tsx +188 -49
  139. package/src/screens/MrzScanView.tsx +33 -0
  140. package/src/screens/PoaDocumentTypeList.tsx +66 -0
  141. package/src/screens/ProofOfAddressParts.tsx +151 -0
  142. package/src/screens/ProofOfAddressStep.tsx +58 -99
  143. package/src/screens/SubmittedBadge.tsx +25 -0
  144. package/src/screens/SubmittedError.tsx +64 -0
  145. package/src/screens/SubmittedResult.tsx +117 -0
  146. package/src/screens/SubmittedStep.tsx +71 -164
  147. package/src/screens/SubmittedSuccess.tsx +127 -0
  148. package/src/screens/SubmittedWaiting.tsx +45 -0
  149. package/src/screens/address/AddressEntranceStep.tsx +161 -0
  150. package/src/screens/address/AddressIntroGate.tsx +148 -0
  151. package/src/screens/address/AddressMapStub.tsx +50 -0
  152. package/src/screens/address/AddressPinStep.tsx +178 -0
  153. package/src/screens/address/AddressReviewStep.tsx +162 -0
  154. package/src/screens/address/AddressSandboxTabs.tsx +158 -0
  155. package/src/screens/address/AddressSearchField.tsx +115 -0
  156. package/src/screens/address/AddressSearchStep.tsx +94 -0
  157. package/src/screens/address/CurrentLocationRow.tsx +135 -0
  158. package/src/screens/address/DetailsSheet.tsx +175 -0
  159. package/src/screens/address/DetailsSheetFields.tsx +184 -0
  160. package/src/screens/address/EntranceDropzone.tsx +178 -0
  161. package/src/screens/address/EntranceFraming.tsx +66 -0
  162. package/src/screens/address/EntrancePills.tsx +60 -0
  163. package/src/screens/address/FramedStreetView.tsx +155 -0
  164. package/src/screens/address/IntroDisclosures.tsx +210 -0
  165. package/src/screens/address/LabelDecisionRow.tsx +113 -0
  166. package/src/screens/address/PinSummaryRow.tsx +105 -0
  167. package/src/screens/address/ReviewAddressBand.tsx +111 -0
  168. package/src/screens/address/ReviewEntranceThumbs.tsx +64 -0
  169. package/src/screens/address/ReviewMapPicture.tsx +106 -0
  170. package/src/screens/address/SearchResults.tsx +105 -0
  171. package/src/screens/address/SearchScreen.tsx +176 -0
  172. package/src/screens/address/SkipForNow.tsx +43 -0
  173. package/src/screens/address/StreetViewChrome.tsx +81 -0
  174. package/src/screens/address/detail-values.ts +22 -0
  175. package/src/screens/address/fix-source.ts +27 -0
  176. package/src/screens/address/index.ts +8 -0
  177. package/src/screens/address/meta.ts +44 -0
  178. package/src/screens/address/use-address-flow.ts +200 -0
  179. package/src/screens/address/use-label-pin.ts +80 -0
  180. package/src/screens/address/use-pin-actions.ts +192 -0
  181. package/src/screens/consent/model.ts +79 -10
  182. package/src/screens/document/CaptureCheckNotice.tsx +77 -0
  183. package/src/screens/document/UploadPhase.tsx +177 -0
  184. package/src/screens/document/useDocumentCamera.ts +109 -0
  185. package/src/screens/liveness/CaptureRing.tsx +91 -0
  186. package/src/screens/liveness/LivenessCamera.tsx +63 -0
  187. package/src/screens/liveness/LivenessHandover.tsx +43 -0
  188. package/src/screens/liveness/LivenessOutcome.tsx +8 -4
  189. package/src/screens/liveness/SelfiePreview.tsx +31 -7
  190. package/src/screens/liveness/ShutterFlash.tsx +25 -0
  191. package/src/screens/liveness/index.ts +4 -0
  192. package/src/screens/liveness/useSelfieUpload.ts +23 -3
  193. package/src/screens/nfc/NfcScanIllustration.tsx +7 -18
  194. package/src/screens/useAddressPhotoAttach.ts +77 -0
  195. package/src/screens/useBusinessDocumentAttach.ts +93 -0
  196. package/src/screens/usePoaAttach.ts +12 -15
  197. package/src/services/api-types.ts +119 -1
  198. package/src/services/api-verify-types.ts +37 -0
  199. package/src/services/api.ts +149 -3
  200. package/src/services/deviceMetadata.ts +1 -1
  201. package/src/services/location.ts +234 -0
  202. package/src/services/mediaCompress.ts +23 -5
  203. package/src/services/uploadErrors.ts +30 -0
  204. package/src/services/workflowGate.ts +7 -0
  205. package/src/specs/MyazaTextRecognizer.nitro.ts +29 -0
  206. package/src/store/address.ts +97 -0
  207. package/src/store/derive.ts +29 -4
  208. package/src/store/kycStore.ts +120 -5
  209. package/src/store/serverConfig.ts +18 -0
  210. package/src/store/session.ts +23 -4
  211. package/src/store/state.ts +134 -0
  212. package/src/store/submit.ts +18 -1
  213. package/src/types/config.ts +63 -1
  214. package/src/types/verification.ts +12 -0
  215. package/src/types/workflow.ts +97 -1
  216. package/src/assets/liveness/Blink.gif +0 -0
  217. package/src/assets/liveness/Nod.gif +0 -0
  218. package/src/assets/liveness/Smile.gif +0 -0
  219. package/src/assets/liveness/Turn.gif +0 -0
@@ -7,7 +7,7 @@ import type { ResubmitConfig } from '../lib/resubmit';
7
7
  // `types/config` remains the single import for consumers.
8
8
  // ---------------------------------------------------------------------------
9
9
 
10
- import type { KYCSubmission, KYCError } from './verification';
10
+ import type { KYCSubmission, KYCError, KYCResult } from './verification';
11
11
  import type { IdType, IdTypeForCountry, SupportedCountry } from './id-types';
12
12
  import type {
13
13
  KYCAppearance,
@@ -25,6 +25,7 @@ import type {
25
25
  QuestionnaireConfig,
26
26
  WorkflowCountry,
27
27
  MultiIdConfig,
28
+ AddressCollectionConfig,
28
29
  } from './workflow';
29
30
 
30
31
  export type * from './workflow';
@@ -56,6 +57,13 @@ export type KYCStep =
56
57
  | 'applicant-role'
57
58
  | 'liveness'
58
59
  | 'proof-of-address'
60
+ // The address flow, in order: find it (search) → confirm it (the PIN step,
61
+ // which keeps the original 'address-collection' wire name so older session
62
+ // progress restores cleanly) → show it (entrance photo) → commit it.
63
+ | 'address-search'
64
+ | 'address-collection'
65
+ | 'address-entrance'
66
+ | 'address-review'
59
67
  | 'questionnaire'
60
68
  | 'submitted';
61
69
 
@@ -134,6 +142,12 @@ export interface MyazaKYCConfig<C extends SupportedCountry = SupportedCountry> {
134
142
  * mirroring the web SDK.
135
143
  */
136
144
  businessName?: string;
145
+ /**
146
+ * The applicant's email, when you already hold it. Not asked for in the flow:
147
+ * it is submitted so your organisation can have the applicant emailed about a
148
+ * decision, for example once their verification is approved.
149
+ */
150
+ email?: string;
137
151
  };
138
152
 
139
153
  /** Enable the live-selfie capture step. */
@@ -149,6 +163,15 @@ export interface MyazaKYCConfig<C extends SupportedCountry = SupportedCountry> {
149
163
  */
150
164
  allowDocumentUpload?: boolean;
151
165
 
166
+ /**
167
+ * Allow photographing the document with the live camera. Default `true`.
168
+ * When `false`, the document step never asks for camera access: the
169
+ * applicant chooses a photo of each side from the device instead. At least
170
+ * one of this and `allowDocumentUpload` stays on, so a config that switches
171
+ * both off keeps the camera.
172
+ */
173
+ allowDocumentScan?: boolean;
174
+
152
175
  /** Enable liveness detection during selfie capture. Default `true`. */
153
176
  enableLiveness?: boolean;
154
177
 
@@ -164,15 +187,42 @@ export interface MyazaKYCConfig<C extends SupportedCountry = SupportedCountry> {
164
187
  */
165
188
  keyPeopleLinkRecovery?: boolean;
166
189
 
190
+ /**
191
+ * Show the consent (welcome) screen as the flow's first step. Default true.
192
+ * `false` is for a host app that has already collected the person's
193
+ * consent: the flow then opens straight on its first real step (the contact
194
+ * codes, the country picker, the ID list, the business form, or a scoped
195
+ * flow's own check). Normally set by a workflow. It does not change what
196
+ * the organisation attests to the verification provider.
197
+ */
198
+ consentStep?: boolean;
199
+
167
200
  /** Colours in the flash sequence (2–5, default 4). Flash modes only. */
168
201
  flashSequenceLength?: number;
169
202
 
203
+ /**
204
+ * The biometric scopes' flow options (workflow-driven, or passed here on a
205
+ * prop-configured mount): `selfieReview` shows the captured selfie with
206
+ * Retake and Continue before submitting (off by default on both biometric
207
+ * scopes); `resultDelivery` says where a re-authentication's verdict lands,
208
+ * 'both' (the default: the SDK holds the person on one loading screen until
209
+ * the check settles, and the org's webhook receives it too), 'app' (the
210
+ * same wait, but the server sends no webhook for the check) or 'webhook'
211
+ * (fire-and-forget); `doneButton` (default true) hides the final screen's Done
212
+ * when the host app closes the flow itself from `onResult`. A flow key wins
213
+ * per field. See config/biometricOptions.
214
+ */
215
+ biometric?: import('../config/biometricOptions').BiometricFlowConfig;
216
+
170
217
  // ── Workflow-driven blocks ────────────────────────────────────────────────
171
218
  // Authored in the dashboard's workflow builder, not usually in consumer code.
172
219
  // A resolved flow always wins over a prop of the same name.
173
220
 
174
221
  /** What this flow verifies. Absent = 'individual' (classic KYC). */
175
222
  subjectType?: SubjectType;
223
+ /** Workflow scope — what this flow verifies (absent = full verification).
224
+ * Only ever set by a resolved workflow config / hosted session snapshot. */
225
+ scope?: import('../lib/scope').WorkflowScope;
176
226
 
177
227
  /** KYB registry configuration. Required when `subjectType` is 'business'. */
178
228
  business?: WorkflowBusinessConfig;
@@ -196,6 +246,10 @@ export interface MyazaKYCConfig<C extends SupportedCountry = SupportedCountry> {
196
246
  /** Proof-of-address document check, after capture. */
197
247
  proofOfAddress?: ProofOfAddressConfig;
198
248
 
249
+ /** Address Intelligence: a map-pin smart address (+ optional door photo and
250
+ * directions), corroborated server-side. KYC AND KYB (premises pin). */
251
+ addressCollection?: AddressCollectionConfig;
252
+
199
253
  /** Compliance declarations asked just before submission. */
200
254
  questionnaire?: QuestionnaireConfig;
201
255
 
@@ -279,6 +333,14 @@ export interface MyazaKYCConfig<C extends SupportedCountry = SupportedCountry> {
279
333
  * status: 'processing' — results arrive async via webhook.
280
334
  */
281
335
  onSubmit?: (submission: KYCSubmission) => void;
336
+ /**
337
+ * Fires once with the verdict when the flow WAITS for it in-app (a
338
+ * biometric re-authentication on `resultDelivery: 'both'`, the default, or 'app').
339
+ * Never fires on a fire-and-forget flow, and never on a wait that timed out:
340
+ * the webhook stays the record either way. Carries state and reason only,
341
+ * never result data.
342
+ */
343
+ onResult?: (result: KYCResult) => void;
282
344
  onClose?: () => void;
283
345
  /**
284
346
  * Fires for technical errors only. Receives a {@link KYCError} carrying a
@@ -2,6 +2,18 @@
2
2
  // Submission callback payload (returned to onSubmit)
3
3
  // ---------------------------------------------------------------------------
4
4
 
5
+ /**
6
+ * The verdict a flow that waited for it hands to `onResult`: the same state
7
+ * vocabulary `GET /api/kyc/status/:id` serves, plus the reason pair. No result
8
+ * data (scores, biodata) ever rides here; that stays behind the secret key.
9
+ */
10
+ export interface KYCResult {
11
+ verificationId: string;
12
+ status: import('../services/api-types').SessionStatus;
13
+ reason: string | null;
14
+ reasonCode: string | null;
15
+ }
16
+
5
17
  export interface KYCSubmission {
6
18
  verificationId: string;
7
19
  status: 'processing';
@@ -13,7 +13,16 @@
13
13
 
14
14
  // ── Proof of Address ────────────────────────────────────────────────────────
15
15
 
16
- export type PoaDocumentType = 'utility_bill' | 'bank_statement' | 'tenancy_agreement' | 'other';
16
+ export type PoaDocumentType =
17
+ | 'utility_bill'
18
+ | 'bank_statement'
19
+ | 'tenancy_agreement'
20
+ | 'government_document'
21
+ | 'other';
22
+
23
+ /** Whether the applicant's name must appear on the document — judged by the
24
+ * server; read here only to word the step. */
25
+ export type PoaNameRule = 'required' | 'optional' | 'off';
17
26
 
18
27
  export interface ProofOfAddressConfig {
19
28
  /** Adds the Proof of Address step (after capture, before the questionnaire). */
@@ -24,6 +33,93 @@ export interface ProofOfAddressConfig {
24
33
  otherLabel?: string;
25
34
  /** Recency window the server checks the document date against (default 90). */
26
35
  maxAgeDays?: number;
36
+ /**
37
+ * The org's accepted countries (absent/empty = all). On the ADDRESS SCOPE
38
+ * this is exactly what the declared-country picker offers; on a full flow it
39
+ * gates the step client-side (the server stays soft).
40
+ */
41
+ countries?: string[];
42
+ /**
43
+ * Per-country document-kind overrides (ISO-2 → kinds). A present entry
44
+ * REPLACES `documentTypes` for that country.
45
+ */
46
+ countryDocuments?: Record<string, PoaDocumentType[]>;
47
+ /** The default name rule for every country and kind (absent = required). */
48
+ nameMatch?: PoaNameRule;
49
+ /** Per-country, per-kind exceptions to `nameMatch` (ISO-2 → kind → rule). */
50
+ countryNameMatch?: Record<string, Partial<Record<PoaDocumentType, PoaNameRule>>>;
51
+ }
52
+
53
+ // ── Address Intelligence (smart-address capture) ────────────────────────────
54
+
55
+ export interface AddressCollectionConfig {
56
+ /** Adds the address-collection step (after Proof of Address; on KYB flows it
57
+ * collects the business premises pin). */
58
+ enabled?: boolean;
59
+ /** Block Continue without a confirmed pin (the server 422s without one too). */
60
+ requirePin?: boolean;
61
+ /** Whether the door-photo input is offered/required (default optional). */
62
+ photo?: 'off' | 'optional' | 'required';
63
+ /** Whether the directions field is offered/required (default optional). */
64
+ directions?: 'off' | 'optional' | 'required';
65
+ /**
66
+ * The GROUP default for the typed details-sheet fields: `'off'` hides them
67
+ * all, `'optional'` (the default) offers them, `'required'` requires the
68
+ * house or flat NUMBER (the building name stays optional). Resolved per
69
+ * field by lib/address-field-modes.ts, the mirror of the server's rule; the
70
+ * pin step holds Continue and the review holds Confirm until every required
71
+ * field shows a value, because the server 422s a submission that arrives
72
+ * without one.
73
+ */
74
+ propertyFields?: 'off' | 'optional' | 'required';
75
+ /**
76
+ * Per-field overrides on the group default, keyed by the typed field
77
+ * (`propertyName`, `propertyNumber`, `street`, `unit`, `neighbourhood`,
78
+ * `city`, `state`, `postcode`). A `'required'` field the applicant leaves on
79
+ * its map prefill is submitted as displayed: they saw it and confirmed by
80
+ * continuing.
81
+ */
82
+ fields?: Partial<
83
+ Record<
84
+ 'propertyName' | 'propertyNumber' | 'street' | 'unit' | 'neighbourhood' | 'city' | 'state' | 'postcode',
85
+ 'off' | 'optional' | 'required'
86
+ >
87
+ >;
88
+ /**
89
+ * Street View entrance framing. Default 'optional' (on wherever coverage
90
+ * exists, with the photo as the fallback); 'required' is a client-UX gate
91
+ * that removes the Skip affordance while coverage exists — no-coverage
92
+ * still falls back to the photo, and the server never refuses over it.
93
+ *
94
+ * Offered on mobile through the hosted /embed/street-view page in a
95
+ * WebView on the app grant, the way the framed map is (needs the server's
96
+ * maps frame URL and the optional `react-native-webview` peer); without
97
+ * either the entrance step is photo-only. See addressFlowOptions.
98
+ */
99
+ streetView?: 'off' | 'optional' | 'required';
100
+ /**
101
+ * Take a one-shot device GPS fix when the pin is confirmed, so the server
102
+ * can judge "captured at the claimed address" (the `attested` tier). The fix
103
+ * is a CLAIM the server evaluates, never a verdict.
104
+ */
105
+ attestPresence?: boolean;
106
+ /**
107
+ * Phase 2: multi-day presence verification. When enabled, the SDK stores the
108
+ * confirmed pin ON-DEVICE so later `reportAddressPresence()` calls can
109
+ * evaluate the fence locally — coordinates never leave the phone after
110
+ * capture. `background` is reserved for the org-opt-in OS-geofence tier.
111
+ */
112
+ presence?: {
113
+ enabled?: boolean;
114
+ windowDays?: number;
115
+ minNights?: number;
116
+ minDays?: number;
117
+ dwellFloorMinutes?: number;
118
+ background?: boolean;
119
+ /** OkHi-style always-on monitoring: the server renews each
120
+ * resolved cycle, and the on-device pin never self-expires. */
121
+ alwaysOn?: boolean;
122
+ };
27
123
  }
28
124
 
29
125
  // ── NFC chip read (eMRTD) ───────────────────────────────────────────────────
Binary file
Binary file
Binary file
Binary file