@sekyro/react-native 0.1.0-rc.41 → 0.1.0-rc.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +4 -5
- package/android/src/main/java/ai/sekyro/reactnative/ConfigMapper.kt +10 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +15 -16
- package/dist/index.d.ts +15 -16
- package/dist/index.js +1 -1
- package/ios/SekyroRNBridge.swift +1 -1
- package/package.json +3 -3
- package/sbom.cdx.json +4 -4
- package/src/specs/NativeSekyroReactNative.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @sekyro/react-native
|
|
2
2
|
|
|
3
|
+
## 0.1.0-rc.43
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b2d700a: In the native string catalog, a tester session that cannot run a step has a line per missing item: the national ID number, or a national eID step that runs on test data only.
|
|
8
|
+
- 1a5c5d1: In the native string catalog, the Sandbox tester face check says before filming what is compared, what is kept and who sees it, and the screens after a miss no longer say that nothing was kept.
|
|
9
|
+
- f49bd0b: The native error catalog drops the copy of `nni_locked`, `document_nni_mismatch` and `identity_confirm_required`, codes the API no longer sends. `id_number_locked` and `document_id_number_mismatch` keep their copy.
|
|
10
|
+
- 47514ae: Sandbox modes: `KNOWN_CODES` gains `no_testers` (409, tester mode while your organization has no active tester), `sandbox_mode_set` (409, the session's Sandbox mode is already set), `sandbox_only` (403, a Sandbox-only call on a Live session) and `tester_not_bound` (409, a step submitted before the tester face check recognised a tester). Each has error copy in the six languages, and the native string catalog carries it. `chooseSandboxMode` still surfaces `no_testers` to the mode screen and re-reads the session on `sandbox_mode_set`.
|
|
11
|
+
|
|
12
|
+
**Migration (TypeScript):** `KnownCode` gained four members; code that switches over it exhaustively must handle them.
|
|
13
|
+
- 0311ef4: The README says what sets a Sandbox session's mode: the person, the app's Sandbox mode or the link. In the native string catalog, the Spanish and Portuguese tester screens use one word for enrollment, and the error of a skipped capture names a session with test data.
|
|
14
|
+
|
|
15
|
+
## 0.1.0-rc.42
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 682deae: Sandbox sessions open with a choice between test data and real checks as an enrolled tester, and real checks start with the tester face check. The result's `sandbox` is now `{ mode, testerName? }` (`mode`: `simulated` or `tester`), replacing `{ simulated, reason }`; the types `SekyroSandboxMode` and `SekyroSandboxRun` replace `SekyroSandboxSimulatedReason` and `SekyroSandboxSimulation`.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 41c2701: Pins the native SDKs 0.1.0-rc.35: the capture trace names the upload id of each document photo so staff see every phone photo beside the server's attempt on it, and the blur gate measures the photo taken right after a blur refusal too, so a second refusal in a row offers the shutter and holds the automatic photo until the card leaves the frame and the gate never loops. No API change in this package.
|
|
24
|
+
|
|
3
25
|
## 0.1.0-rc.41
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -66,11 +66,10 @@ const result = await startSekyro({
|
|
|
66
66
|
`superseded`) and `reasonCode` gives the code behind it when there is one. Read the decision itself server-side
|
|
67
67
|
(webhooks or `sessions.get`).
|
|
68
68
|
|
|
69
|
-
`sandbox` is present
|
|
70
|
-
|
|
71
|
-
`
|
|
72
|
-
|
|
73
|
-
screen shows the same notice.
|
|
69
|
+
`sandbox` is present on a Sandbox session once its mode is set: `{ mode, testerName? }`. `mode` is `simulated` (test
|
|
70
|
+
data: no real check ran, so the outcome says nothing about a person) or `tester` (real checks against one enrolled
|
|
71
|
+
Sandbox tester, named by `testerName` when the server gives it). The person picks the mode on the first screen unless
|
|
72
|
+
the app's Sandbox mode (dashboard, app page) or the link sets it. It is absent in Live. The result screen shows the same mode.
|
|
74
73
|
|
|
75
74
|
Or declaratively: `<SekyroFlow clientToken={token} onResult={setResult} />` (renders nothing).
|
|
76
75
|
|
|
@@ -74,16 +74,16 @@ internal object ConfigMapper {
|
|
|
74
74
|
// Everything else from the native SDK's own wire form (SekyroWire.result), so the JS side reads the same
|
|
75
75
|
// strings as Flutter: displayStatus verified | review_pending | not_verified, reason and reasonCode on
|
|
76
76
|
// not_verified, level (1 Contact, 2 Human, 3 Identity, 0 nothing proven) and assurance once decided. Each
|
|
77
|
-
// key only when known: JS reads absent as "none". `sandbox` ({
|
|
78
|
-
//
|
|
77
|
+
// key only when known: JS reads absent as "none". `sandbox` ({ mode, testerName? }) is there once a Sandbox
|
|
78
|
+
// session's mode is set; a native SDK that does not report it sends no such key.
|
|
79
79
|
val wire = SekyroWire.result(r)
|
|
80
80
|
(wire["displayStatus"] as? String)?.let { putString("displayStatus", it) }
|
|
81
81
|
(wire["level"] as? Int)?.takeIf { it in 0..3 }?.let { putInt("level", it) }
|
|
82
82
|
for (key in listOf("assurance", "reason", "reasonCode")) {
|
|
83
83
|
(wire[key] as? String)?.takeIf { it.isNotEmpty() }?.let { putString(key, it) }
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
putMap("sandbox", newMap().apply {
|
|
85
|
+
sandboxOf(wire)?.let { (mode, testerName) ->
|
|
86
|
+
putMap("sandbox", newMap().apply { putString("mode", mode); testerName?.let { putString("testerName", it) } })
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
SekyroResult.Cancelled -> putString("status", "cancelled")
|
|
@@ -91,7 +91,10 @@ internal object ConfigMapper {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
/** The
|
|
95
|
-
internal fun
|
|
96
|
-
|
|
94
|
+
/** The mode and tester name of the native wire's `sandbox` entry, or null when the entry is absent or names no mode. */
|
|
95
|
+
internal fun sandboxOf(wire: Map<String, Any?>): Pair<String, String?>? {
|
|
96
|
+
val entry = wire["sandbox"] as? Map<*, *> ?: return null
|
|
97
|
+
val mode = (entry["mode"] as? String)?.takeIf { it.isNotEmpty() } ?: return null
|
|
98
|
+
return mode to (entry["testerName"] as? String)?.takeIf { it.isNotEmpty() }
|
|
99
|
+
}
|
|
97
100
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var h=(e,o)=>{for(var t in o)p(e,t,{get:o[t],enumerable:!0})},O=(e,o,t,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of x(o))!C.call(e,r)&&r!==t&&p(e,r,{get:()=>o[r],enumerable:!(s=b(o,r))||s.enumerable});return e};var T=e=>O(p({},"__esModule",{value:!0}),e);var z={};h(z,{SDK_VERSION:()=>w,SekyroError:()=>l,SekyroFlow:()=>N,nativeVersion:()=>R,startSekyro:()=>f});module.exports=T(z);var k=require("react-native"),c=k.TurboModuleRegistry.get("SekyroReactNative");var l=class extends Error{code;constructor(o,t=o){super(t),this.name="SekyroError",this.code=o}};var I=500,D=new Set(["ar","fr","en","es","pt","de"]),F=["brand","brandFg","bg","surface","fg","fgMuted","border"],V=["danger","success","warning"],g=!1,M=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),L=/^#[0-9a-fA-F]{6}$/,$=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,a=e=>{throw new l("invalid_config",`invalid config: ${e}`)};function m(e){(typeof e!="object"||e===null)&&a("config");for(let s of Object.keys(e))M.has(s)||a(`unknown key "${s.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&a("clientToken");let o={clientToken:e.clientToken};e.apiOrigin!==void 0&&(typeof e.apiOrigin=="string"&&(/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e.apiOrigin)||__DEV__&&$.test(e.apiOrigin))||a("apiOrigin"),o.apiOrigin=e.apiOrigin),e.locale!==void 0&&(D.has(e.locale)||a("locale"),o.locale=e.locale);let t=e.theme;if(t){if(t.colors){let s={};for(let[r,i]of Object.entries(t.colors))if(i!==void 0){if(V.includes(r)){__DEV__&&!g&&(g=!0,console.warn("[sekyro] theme.colors.danger/success/warning are ignored: status colours are standard (removed in 1.0)"));continue}(!F.includes(r)||typeof i!="string"||!L.test(i))&&a(`theme.colors.${r.slice(0,32)}`),s[r]=i}o.colors=s}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&a("theme.radius"),o.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&a("theme.fontFamily"),o.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||a("theme.darkMode"),o.darkMode=t.darkMode)}if(e.strings){e.locale||a("strings need locale");let s=e.strings[e.locale]??{},r={},i=Object.entries(s).filter(([,n])=>n!==void 0);i.length>I&&a("strings (too many overrides)");for(let[n,y]of i)/^[a-zA-Z0-9_.]{1,96}$/.test(n)||a("strings key"),(typeof y!="string"||y.length>2e3)&&a(`strings.${n}`),r[n]=y;o.strings=r}return o}var A=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait","proof_of_address","form"]);function v(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!A.has(e.step))return null;let o=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:o,retryReason:t}:{type:"step",step:o}}var P=new Set(["verified","review_pending","not_verified"]),j=new Set([0,1,2,3]);function u(e){return typeof e=="string"&&e!==""}function K(e){if(typeof e!="object"||e===null)return;let{mode:o,testerName:t}=e;if(o==="simulated")return{mode:o};if(o==="tester")return u(t)&&t.trim()!==""?{mode:o,testerName:t.trim()}:{mode:o}}function _(e){if(e.status==="cancelled")return{status:"cancelled"};if(e.status==="failed")return{status:"failed",code:e.code||"unknown_error"};if(e.status==="finished"&&e.sessionId){let o=P.has(e.displayStatus),t=o?e.displayStatus:"not_verified",s=t==="not_verified",r=K(e.sandbox);return{status:"finished",sessionId:e.sessionId,displayStatus:t,...typeof e.level=="number"&&j.has(e.level)?{level:e.level}:{},...u(e.assurance)?{assurance:e.assurance}:{},...s&&o&&u(e.reason)?{reason:e.reason}:{},...s&&o&&u(e.reasonCode)?{reasonCode:e.reasonCode}:{},...r!==void 0?{sandbox:r}:{}}}return{status:"failed",code:"unknown_error"}}function E(){if(!c)throw new l("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return c}var S=!1,Y=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function f(e){let o=m(e),t=E();if(S)throw new l("flow_in_progress");S=!0;let s=e.onEvent,r=s?t.onEvent(i=>{let n=v(i);n&&s(n)}):void 0;try{return _(await t.start(o))}catch(i){let n=i?.code;if(typeof n=="string"&&Y.has(n))throw new l(n);return{status:"failed",code:"unknown_error"}}finally{r?.remove(),S=!1}}function R(){return E().nativeVersion()}var d=require("react");function N(e){let o=(0,d.useRef)(null),t=(0,d.useRef)(e);return t.current=e,(0,d.useEffect)(()=>{if(o.current===e.clientToken)return;o.current=e.clientToken;let{onResult:s,onEvent:r,...i}=t.current;f({...i,onEvent:n=>t.current.onEvent?.(n)}).then(n=>t.current.onResult(n),n=>t.current.onResult({status:"failed",code:n instanceof l?n.code:"unknown_error"}))},[e.clientToken]),null}var w="0.1.0-rc.43";0&&(module.exports={SDK_VERSION,SekyroError,SekyroFlow,nativeVersion,startSekyro});
|
package/dist/index.d.cts
CHANGED
|
@@ -74,20 +74,19 @@ type SekyroDisplayStatus = 'verified' | 'review_pending' | 'not_verified';
|
|
|
74
74
|
*/
|
|
75
75
|
type SekyroSessionReason = 'rejected' | 'inconclusive' | 'unavailable' | 'abandoned' | 'not_opened' | 'policy' | 'cancelled' | 'superseded';
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* check ran and recognized nobody). @public
|
|
77
|
+
* The mode a Sandbox session runs in: `simulated` (test data, no real check runs) or `tester` (real checks against one
|
|
78
|
+
* enrolled Sandbox tester). @public
|
|
80
79
|
*/
|
|
81
|
-
type
|
|
80
|
+
type SekyroSandboxMode = 'simulated' | 'tester';
|
|
82
81
|
/**
|
|
83
|
-
* Set on the finished result of a Sandbox session
|
|
84
|
-
*
|
|
82
|
+
* Set on the finished result of a Sandbox session once its mode is set (the same mode as `sandbox.mode` on
|
|
83
|
+
* `sessions.get` and the session webhooks). @public
|
|
85
84
|
*/
|
|
86
|
-
interface
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
|
|
85
|
+
interface SekyroSandboxRun {
|
|
86
|
+
/** `simulated`: test data, so the outcome says nothing about a person. `tester`: real checks against an enrolled tester. */
|
|
87
|
+
mode: SekyroSandboxMode;
|
|
88
|
+
/** `tester` mode only: the recognized tester's given names, when the server gives them. */
|
|
89
|
+
testerName?: string;
|
|
91
90
|
}
|
|
92
91
|
/** The level a finished session proved: 1 Contact, 2 Human, 3 Identity; 0 when nothing was proven. @public */
|
|
93
92
|
type SekyroLevel = 0 | 1 | 2 | 3;
|
|
@@ -121,10 +120,10 @@ type SekyroResult = {
|
|
|
121
120
|
*/
|
|
122
121
|
reasonCode?: string;
|
|
123
122
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
123
|
+
* The mode a Sandbox session ran in. Absent in Live, when the session ended before a mode was set, and when the
|
|
124
|
+
* native SDK does not report it.
|
|
126
125
|
*/
|
|
127
|
-
sandbox?:
|
|
126
|
+
sandbox?: SekyroSandboxRun;
|
|
128
127
|
} | {
|
|
129
128
|
status: 'cancelled';
|
|
130
129
|
} | {
|
|
@@ -139,7 +138,7 @@ type SekyroResult = {
|
|
|
139
138
|
*/
|
|
140
139
|
declare function startSekyro(config: SekyroConfig): Promise<SekyroResult>;
|
|
141
140
|
/**
|
|
142
|
-
* Version of the bundled native core: `'android 0.1.0-rc.
|
|
141
|
+
* Version of the bundled native core: `'android 0.1.0-rc.35'` / `'ios 0.1.0-rc.35'`.
|
|
143
142
|
* @public
|
|
144
143
|
*/
|
|
145
144
|
declare function nativeVersion(): string;
|
|
@@ -171,4 +170,4 @@ declare class SekyroError extends Error {
|
|
|
171
170
|
*/
|
|
172
171
|
declare const SDK_VERSION: string;
|
|
173
172
|
|
|
174
|
-
export { SDK_VERSION, type SekyroColorRole, type SekyroConfig, type SekyroDisplayStatus, SekyroError, type SekyroErrorCode, type SekyroEvent, SekyroFlow, type SekyroFlowProps, type SekyroLevel, type SekyroLocale, type SekyroResult, type
|
|
173
|
+
export { SDK_VERSION, type SekyroColorRole, type SekyroConfig, type SekyroDisplayStatus, SekyroError, type SekyroErrorCode, type SekyroEvent, SekyroFlow, type SekyroFlowProps, type SekyroLevel, type SekyroLocale, type SekyroResult, type SekyroSandboxMode, type SekyroSandboxRun, type SekyroSessionReason, type SekyroStep, type SekyroTheme, nativeVersion, startSekyro };
|
package/dist/index.d.ts
CHANGED
|
@@ -74,20 +74,19 @@ type SekyroDisplayStatus = 'verified' | 'review_pending' | 'not_verified';
|
|
|
74
74
|
*/
|
|
75
75
|
type SekyroSessionReason = 'rejected' | 'inconclusive' | 'unavailable' | 'abandoned' | 'not_opened' | 'policy' | 'cancelled' | 'superseded';
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* check ran and recognized nobody). @public
|
|
77
|
+
* The mode a Sandbox session runs in: `simulated` (test data, no real check runs) or `tester` (real checks against one
|
|
78
|
+
* enrolled Sandbox tester). @public
|
|
80
79
|
*/
|
|
81
|
-
type
|
|
80
|
+
type SekyroSandboxMode = 'simulated' | 'tester';
|
|
82
81
|
/**
|
|
83
|
-
* Set on the finished result of a Sandbox session
|
|
84
|
-
*
|
|
82
|
+
* Set on the finished result of a Sandbox session once its mode is set (the same mode as `sandbox.mode` on
|
|
83
|
+
* `sessions.get` and the session webhooks). @public
|
|
85
84
|
*/
|
|
86
|
-
interface
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
|
|
85
|
+
interface SekyroSandboxRun {
|
|
86
|
+
/** `simulated`: test data, so the outcome says nothing about a person. `tester`: real checks against an enrolled tester. */
|
|
87
|
+
mode: SekyroSandboxMode;
|
|
88
|
+
/** `tester` mode only: the recognized tester's given names, when the server gives them. */
|
|
89
|
+
testerName?: string;
|
|
91
90
|
}
|
|
92
91
|
/** The level a finished session proved: 1 Contact, 2 Human, 3 Identity; 0 when nothing was proven. @public */
|
|
93
92
|
type SekyroLevel = 0 | 1 | 2 | 3;
|
|
@@ -121,10 +120,10 @@ type SekyroResult = {
|
|
|
121
120
|
*/
|
|
122
121
|
reasonCode?: string;
|
|
123
122
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
123
|
+
* The mode a Sandbox session ran in. Absent in Live, when the session ended before a mode was set, and when the
|
|
124
|
+
* native SDK does not report it.
|
|
126
125
|
*/
|
|
127
|
-
sandbox?:
|
|
126
|
+
sandbox?: SekyroSandboxRun;
|
|
128
127
|
} | {
|
|
129
128
|
status: 'cancelled';
|
|
130
129
|
} | {
|
|
@@ -139,7 +138,7 @@ type SekyroResult = {
|
|
|
139
138
|
*/
|
|
140
139
|
declare function startSekyro(config: SekyroConfig): Promise<SekyroResult>;
|
|
141
140
|
/**
|
|
142
|
-
* Version of the bundled native core: `'android 0.1.0-rc.
|
|
141
|
+
* Version of the bundled native core: `'android 0.1.0-rc.35'` / `'ios 0.1.0-rc.35'`.
|
|
143
142
|
* @public
|
|
144
143
|
*/
|
|
145
144
|
declare function nativeVersion(): string;
|
|
@@ -171,4 +170,4 @@ declare class SekyroError extends Error {
|
|
|
171
170
|
*/
|
|
172
171
|
declare const SDK_VERSION: string;
|
|
173
172
|
|
|
174
|
-
export { SDK_VERSION, type SekyroColorRole, type SekyroConfig, type SekyroDisplayStatus, SekyroError, type SekyroErrorCode, type SekyroEvent, SekyroFlow, type SekyroFlowProps, type SekyroLevel, type SekyroLocale, type SekyroResult, type
|
|
173
|
+
export { SDK_VERSION, type SekyroColorRole, type SekyroConfig, type SekyroDisplayStatus, SekyroError, type SekyroErrorCode, type SekyroEvent, SekyroFlow, type SekyroFlowProps, type SekyroLevel, type SekyroLocale, type SekyroResult, type SekyroSandboxMode, type SekyroSandboxRun, type SekyroSessionReason, type SekyroStep, type SekyroTheme, nativeVersion, startSekyro };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TurboModuleRegistry as _}from"react-native";var
|
|
1
|
+
import{TurboModuleRegistry as _}from"react-native";var f=_.get("SekyroReactNative");var l=class extends Error{code;constructor(o,t=o){super(t),this.name="SekyroError",this.code=o}};var E=500,R=new Set(["ar","fr","en","es","pt","de"]),N=["brand","brandFg","bg","surface","fg","fgMuted","border"],w=["danger","success","warning"],c=!1,b=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),x=/^#[0-9a-fA-F]{6}$/,C=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,a=e=>{throw new l("invalid_config",`invalid config: ${e}`)};function S(e){(typeof e!="object"||e===null)&&a("config");for(let n of Object.keys(e))b.has(n)||a(`unknown key "${n.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&a("clientToken");let o={clientToken:e.clientToken};e.apiOrigin!==void 0&&(typeof e.apiOrigin=="string"&&(/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e.apiOrigin)||__DEV__&&C.test(e.apiOrigin))||a("apiOrigin"),o.apiOrigin=e.apiOrigin),e.locale!==void 0&&(R.has(e.locale)||a("locale"),o.locale=e.locale);let t=e.theme;if(t){if(t.colors){let n={};for(let[s,i]of Object.entries(t.colors))if(i!==void 0){if(w.includes(s)){__DEV__&&!c&&(c=!0,console.warn("[sekyro] theme.colors.danger/success/warning are ignored: status colours are standard (removed in 1.0)"));continue}(!N.includes(s)||typeof i!="string"||!x.test(i))&&a(`theme.colors.${s.slice(0,32)}`),n[s]=i}o.colors=n}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&a("theme.radius"),o.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&a("theme.fontFamily"),o.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||a("theme.darkMode"),o.darkMode=t.darkMode)}if(e.strings){e.locale||a("strings need locale");let n=e.strings[e.locale]??{},s={},i=Object.entries(n).filter(([,r])=>r!==void 0);i.length>E&&a("strings (too many overrides)");for(let[r,u]of i)/^[a-zA-Z0-9_.]{1,96}$/.test(r)||a("strings key"),(typeof u!="string"||u.length>2e3)&&a(`strings.${r}`),s[r]=u;o.strings=s}return o}var h=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait","proof_of_address","form"]);function k(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!h.has(e.step))return null;let o=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:o,retryReason:t}:{type:"step",step:o}}var O=new Set(["verified","review_pending","not_verified"]),T=new Set([0,1,2,3]);function d(e){return typeof e=="string"&&e!==""}function I(e){if(typeof e!="object"||e===null)return;let{mode:o,testerName:t}=e;if(o==="simulated")return{mode:o};if(o==="tester")return d(t)&&t.trim()!==""?{mode:o,testerName:t.trim()}:{mode:o}}function g(e){if(e.status==="cancelled")return{status:"cancelled"};if(e.status==="failed")return{status:"failed",code:e.code||"unknown_error"};if(e.status==="finished"&&e.sessionId){let o=O.has(e.displayStatus),t=o?e.displayStatus:"not_verified",n=t==="not_verified",s=I(e.sandbox);return{status:"finished",sessionId:e.sessionId,displayStatus:t,...typeof e.level=="number"&&T.has(e.level)?{level:e.level}:{},...d(e.assurance)?{assurance:e.assurance}:{},...n&&o&&d(e.reason)?{reason:e.reason}:{},...n&&o&&d(e.reasonCode)?{reasonCode:e.reasonCode}:{},...s!==void 0?{sandbox:s}:{}}}return{status:"failed",code:"unknown_error"}}function m(){if(!f)throw new l("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return f}var y=!1,D=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function p(e){let o=S(e),t=m();if(y)throw new l("flow_in_progress");y=!0;let n=e.onEvent,s=n?t.onEvent(i=>{let r=k(i);r&&n(r)}):void 0;try{return g(await t.start(o))}catch(i){let r=i?.code;if(typeof r=="string"&&D.has(r))throw new l(r);return{status:"failed",code:"unknown_error"}}finally{s?.remove(),y=!1}}function F(){return m().nativeVersion()}import{useEffect as V,useRef as v}from"react";function M(e){let o=v(null),t=v(e);return t.current=e,V(()=>{if(o.current===e.clientToken)return;o.current=e.clientToken;let{onResult:n,onEvent:s,...i}=t.current;p({...i,onEvent:r=>t.current.onEvent?.(r)}).then(r=>t.current.onResult(r),r=>t.current.onResult({status:"failed",code:r instanceof l?r.code:"unknown_error"}))},[e.clientToken]),null}var L="0.1.0-rc.43";export{L as SDK_VERSION,l as SekyroError,M as SekyroFlow,F as nativeVersion,p as startSekyro};
|
package/ios/SekyroRNBridge.swift
CHANGED
|
@@ -54,7 +54,7 @@ public final class SekyroRNBridge: NSObject {
|
|
|
54
54
|
|
|
55
55
|
/// The native SDK's own wire form (`SekyroWire.dictionary`): status, session id, display status (`verified`,
|
|
56
56
|
/// `review_pending`, `not_verified`), `reason` and `reasonCode` on `not_verified`, `level` and `assurance` when known,
|
|
57
|
-
/// `sandbox` (`{
|
|
57
|
+
/// `sandbox` (`{ mode, testerName? }`) once a Sandbox session's mode is set,
|
|
58
58
|
/// and the failure code, without matching the result's associated values here.
|
|
59
59
|
static func wire(_ result: SekyroResult) -> NSDictionary {
|
|
60
60
|
SekyroWire.dictionary(result) as NSDictionary
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/react-native",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.43",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Sekyro AI eKYC for React Native — glue over the binary Android and iOS SDKs (New Architecture)",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
"sekyro": {
|
|
102
|
-
"android": "0.1.0-rc.
|
|
103
|
-
"ios": "0.1.0-rc.
|
|
102
|
+
"android": "0.1.0-rc.35",
|
|
103
|
+
"ios": "0.1.0-rc.35"
|
|
104
104
|
}
|
|
105
105
|
}
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "react-native",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/react-native@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.43",
|
|
101
|
+
"bom-ref": "@sekyro/react-native@0.1.0-rc.43",
|
|
102
102
|
"description": "Sekyro AI eKYC for React Native — glue over the binary Android and iOS SDKs (New Architecture)",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/react-native@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/react-native@0.1.0-rc.43?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23sekyro-mobile%2Freact-native",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"components": [],
|
|
148
148
|
"dependencies": [
|
|
149
149
|
{
|
|
150
|
-
"ref": "@sekyro/react-native@0.1.0-rc.
|
|
150
|
+
"ref": "@sekyro/react-native@0.1.0-rc.43"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
|
@@ -31,7 +31,7 @@ export type NativeConfig = {
|
|
|
31
31
|
strings?: UnsafeObject;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export type NativeSandbox = {
|
|
34
|
+
export type NativeSandbox = { mode?: string; testerName?: string };
|
|
35
35
|
|
|
36
36
|
export type NativeResult = {
|
|
37
37
|
status: string;
|