@sekyro/react-native 0.1.0-rc.24 → 0.1.0-rc.25

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @sekyro/react-native
2
2
 
3
+ ## 0.1.0-rc.25
4
+
5
+ ### Patch Changes
6
+
7
+ - 3601d49: Pins the native SDKs 0.1.0-rc.22: the Form step (planned: no flow can contain it yet), drawn by the native drop-in on Android and iOS, with each refused answer shown under its question. `SekyroStep` gains `form` (the event never carries the answers).
8
+
3
9
  ## 0.1.0-rc.24
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var p=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var C=(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))!h.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={};C(z,{SDK_VERSION:()=>w,SekyroError:()=>l,SekyroFlow:()=>N,nativeVersion:()=>R,startSekyro:()=>y});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 D=500,I=new Set(["ar","fr","en","es","pt","de"]),F=["brand","brandFg","bg","surface","fg","fgMuted","border"],V=["danger","success","warning"],g=!1,L=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),M=/^#[0-9a-fA-F]{6}$/,A=/^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))L.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__&&A.test(e.apiOrigin))||a("apiOrigin"),o.apiOrigin=e.apiOrigin),e.locale!==void 0&&(I.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"||!M.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>D&&a("strings (too many overrides)");for(let[n,f]of i)/^[a-zA-Z0-9_.]{1,96}$/.test(n)||a("strings key"),(typeof f!="string"||f.length>2e3)&&a(`strings.${n}`),r[n]=f;o.strings=r}return o}var $=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait","proof_of_address"]);function v(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!$.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]),K=new Set(["no_testers","tester_gate_not_used","tester_gate_missed"]);function u(e){return typeof e=="string"&&e!==""}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=e.sandbox?.reason;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}:{},...u(r)&&K.has(r)?{sandbox:{simulated:!0,reason: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 y(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;y({...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.24";0&&(module.exports={SDK_VERSION,SekyroError,SekyroFlow,nativeVersion,startSekyro});
1
+ "use strict";var p=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var C=(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))!h.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={};C(z,{SDK_VERSION:()=>w,SekyroError:()=>l,SekyroFlow:()=>N,nativeVersion:()=>R,startSekyro:()=>y});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 D=500,I=new Set(["ar","fr","en","es","pt","de"]),F=["brand","brandFg","bg","surface","fg","fgMuted","border"],V=["danger","success","warning"],g=!1,L=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),M=/^#[0-9a-fA-F]{6}$/,A=/^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))L.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__&&A.test(e.apiOrigin))||a("apiOrigin"),o.apiOrigin=e.apiOrigin),e.locale!==void 0&&(I.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"||!M.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>D&&a("strings (too many overrides)");for(let[n,f]of i)/^[a-zA-Z0-9_.]{1,96}$/.test(n)||a("strings key"),(typeof f!="string"||f.length>2e3)&&a(`strings.${n}`),r[n]=f;o.strings=r}return o}var $=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"||!$.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]),K=new Set(["no_testers","tester_gate_not_used","tester_gate_missed"]);function u(e){return typeof e=="string"&&e!==""}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=e.sandbox?.reason;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}:{},...u(r)&&K.has(r)?{sandbox:{simulated:!0,reason: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 y(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;y({...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.25";0&&(module.exports={SDK_VERSION,SekyroError,SekyroFlow,nativeVersion,startSekyro});
package/dist/index.d.cts CHANGED
@@ -31,10 +31,11 @@ interface SekyroTheme {
31
31
  * Screen of the native flow, as reported by step events (`eid`: the national eID sign-in, SDK spec §3.2).
32
32
  * Flow model 2026-10-23: `contact_choice` (phone or email), `identity_summary` (check the details read — the event never
33
33
  * carries them), `portrait` (the ICAO portrait on its own), `proof_of_address` (a recent document with the person's
34
- * address, or the bill holder's letter; spec 2026-11-10). `consent` is never emitted (consent is one line on the first
34
+ * address, or the bill holder's letter; spec 2026-11-10), `form` (the partner's questions and consents; spec 2026-11-14,
35
+ * the event never carries the answers). `consent` is never emitted (consent is one line on the first
35
36
  * screen); it stays in the union only because the public API may only grow. @public
36
37
  */
37
- type SekyroStep = 'consent' | 'method' | 'phone_otp' | 'email_otp' | 'registry' | 'document' | 'nfc' | 'liveness' | 'processing' | 'result' | 'update_required' | 'eid' | 'contact_choice' | 'identity_summary' | 'portrait' | 'proof_of_address';
38
+ type SekyroStep = 'consent' | 'method' | 'phone_otp' | 'email_otp' | 'registry' | 'document' | 'nfc' | 'liveness' | 'processing' | 'result' | 'update_required' | 'eid' | 'contact_choice' | 'identity_summary' | 'portrait' | 'proof_of_address' | 'form';
38
39
  /** Telemetry only; carries no personal data. @public */
39
40
  type SekyroEvent = {
40
41
  type: 'step';
@@ -134,7 +135,7 @@ type SekyroResult = {
134
135
  */
135
136
  declare function startSekyro(config: SekyroConfig): Promise<SekyroResult>;
136
137
  /**
137
- * Version of the bundled native core: `'android 0.1.0-rc.21'` / `'ios 0.1.0-rc.21'`.
138
+ * Version of the bundled native core: `'android 0.1.0-rc.22'` / `'ios 0.1.0-rc.22'`.
138
139
  * @public
139
140
  */
140
141
  declare function nativeVersion(): string;
package/dist/index.d.ts CHANGED
@@ -31,10 +31,11 @@ interface SekyroTheme {
31
31
  * Screen of the native flow, as reported by step events (`eid`: the national eID sign-in, SDK spec §3.2).
32
32
  * Flow model 2026-10-23: `contact_choice` (phone or email), `identity_summary` (check the details read — the event never
33
33
  * carries them), `portrait` (the ICAO portrait on its own), `proof_of_address` (a recent document with the person's
34
- * address, or the bill holder's letter; spec 2026-11-10). `consent` is never emitted (consent is one line on the first
34
+ * address, or the bill holder's letter; spec 2026-11-10), `form` (the partner's questions and consents; spec 2026-11-14,
35
+ * the event never carries the answers). `consent` is never emitted (consent is one line on the first
35
36
  * screen); it stays in the union only because the public API may only grow. @public
36
37
  */
37
- type SekyroStep = 'consent' | 'method' | 'phone_otp' | 'email_otp' | 'registry' | 'document' | 'nfc' | 'liveness' | 'processing' | 'result' | 'update_required' | 'eid' | 'contact_choice' | 'identity_summary' | 'portrait' | 'proof_of_address';
38
+ type SekyroStep = 'consent' | 'method' | 'phone_otp' | 'email_otp' | 'registry' | 'document' | 'nfc' | 'liveness' | 'processing' | 'result' | 'update_required' | 'eid' | 'contact_choice' | 'identity_summary' | 'portrait' | 'proof_of_address' | 'form';
38
39
  /** Telemetry only; carries no personal data. @public */
39
40
  type SekyroEvent = {
40
41
  type: 'step';
@@ -134,7 +135,7 @@ type SekyroResult = {
134
135
  */
135
136
  declare function startSekyro(config: SekyroConfig): Promise<SekyroResult>;
136
137
  /**
137
- * Version of the bundled native core: `'android 0.1.0-rc.21'` / `'ios 0.1.0-rc.21'`.
138
+ * Version of the bundled native core: `'android 0.1.0-rc.22'` / `'ios 0.1.0-rc.22'`.
138
139
  * @public
139
140
  */
140
141
  declare function nativeVersion(): string;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{TurboModuleRegistry as _}from"react-native";var y=_.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}$/,h=/^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__&&h.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 C=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait","proof_of_address"]);function k(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!C.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]),D=new Set(["no_testers","tester_gate_not_used","tester_gate_missed"]);function d(e){return typeof e=="string"&&e!==""}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=e.sandbox?.reason;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}:{},...d(s)&&D.has(s)?{sandbox:{simulated:!0,reason:s}}:{}}}return{status:"failed",code:"unknown_error"}}function m(){if(!y)throw new l("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return y}var f=!1,I=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function p(e){let o=S(e),t=m();if(f)throw new l("flow_in_progress");f=!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"&&I.has(r))throw new l(r);return{status:"failed",code:"unknown_error"}}finally{s?.remove(),f=!1}}function F(){return m().nativeVersion()}import{useEffect as V,useRef as v}from"react";function L(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 M="0.1.0-rc.24";export{M as SDK_VERSION,l as SekyroError,L as SekyroFlow,F as nativeVersion,p as startSekyro};
1
+ import{TurboModuleRegistry as _}from"react-native";var y=_.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}$/,h=/^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__&&h.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 C=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"||!C.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]),D=new Set(["no_testers","tester_gate_not_used","tester_gate_missed"]);function d(e){return typeof e=="string"&&e!==""}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=e.sandbox?.reason;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}:{},...d(s)&&D.has(s)?{sandbox:{simulated:!0,reason:s}}:{}}}return{status:"failed",code:"unknown_error"}}function m(){if(!y)throw new l("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return y}var f=!1,I=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function p(e){let o=S(e),t=m();if(f)throw new l("flow_in_progress");f=!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"&&I.has(r))throw new l(r);return{status:"failed",code:"unknown_error"}}finally{s?.remove(),f=!1}}function F(){return m().nativeVersion()}import{useEffect as V,useRef as v}from"react";function L(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 M="0.1.0-rc.25";export{M as SDK_VERSION,l as SekyroError,L as SekyroFlow,F as nativeVersion,p as startSekyro};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sekyro/react-native",
3
- "version": "0.1.0-rc.24",
3
+ "version": "0.1.0-rc.25",
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.21",
103
- "ios": "0.1.0-rc.21"
102
+ "android": "0.1.0-rc.22",
103
+ "ios": "0.1.0-rc.22"
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.24",
101
- "bom-ref": "@sekyro/react-native@0.1.0-rc.24",
100
+ "version": "0.1.0-rc.25",
101
+ "bom-ref": "@sekyro/react-native@0.1.0-rc.25",
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.24?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23sekyro-mobile%2Freact-native",
111
+ "purl": "pkg:npm/%40sekyro/react-native@0.1.0-rc.25?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.24"
150
+ "ref": "@sekyro/react-native@0.1.0-rc.25"
151
151
  }
152
152
  ]
153
153
  }