@sekyro/react-native 0.1.0-rc.14 → 0.1.0-rc.15
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 +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/sbom.cdx.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sekyro/react-native
|
|
2
2
|
|
|
3
|
+
## 0.1.0-rc.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 06a272a: Pins the native SDKs 0.1.0-rc.14: in a Sandbox simulation the code screens show the code to enter and the capture screens offer "Skip with test data"; the document country list starts with the person's own country; back from the portrait camera returns to its instructions; the ID photo check accepts one eye that is always less open and a relaxed narrow mouth.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-rc.14
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var O=(e,r)=>{for(var t in r)f(e,t,{get:r[t],enumerable:!0})},b=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of h(r))!C.call(e,n)&&n!==t&&f(e,n,{get:()=>r[n],enumerable:!(s=w(r,n))||s.enumerable});return e};var x=e=>b(f({},"__esModule",{value:!0}),e);var Y={};O(Y,{SDK_VERSION:()=>N,SekyroError:()=>l,SekyroFlow:()=>R,nativeVersion:()=>_,startSekyro:()=>y});module.exports=x(Y);var S=require("react-native"),c=S.TurboModuleRegistry.get("SekyroReactNative");var l=class extends Error{code;constructor(r,t=r){super(t),this.name="SekyroError",this.code=r}};var T=500,I=new Set(["ar","fr","en","es","pt","de"]),D=["brand","brandFg","bg","surface","fg","fgMuted","border"],F=["danger","success","warning"],k=!1,V=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),L=/^#[0-9a-fA-F]{6}$/,M=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,a=e=>{throw new l("invalid_config",`invalid config: ${e}`)};function g(e){(typeof e!="object"||e===null)&&a("config");for(let s of Object.keys(e))V.has(s)||a(`unknown key "${s.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&a("clientToken");let r={clientToken:e.clientToken};e.apiOrigin!==void 0&&(typeof e.apiOrigin=="string"&&(/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e.apiOrigin)||__DEV__&&M.test(e.apiOrigin))||a("apiOrigin"),r.apiOrigin=e.apiOrigin),e.locale!==void 0&&(I.has(e.locale)||a("locale"),r.locale=e.locale);let t=e.theme;if(t){if(t.colors){let s={};for(let[n,i]of Object.entries(t.colors))if(i!==void 0){if(F.includes(n)){__DEV__&&!k&&(k=!0,console.warn("[sekyro] theme.colors.danger/success/warning are ignored: status colours are standard (removed in 1.0)"));continue}(!D.includes(n)||typeof i!="string"||!L.test(i))&&a(`theme.colors.${n.slice(0,32)}`),s[n]=i}r.colors=s}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&a("theme.radius"),r.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&a("theme.fontFamily"),r.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||a("theme.darkMode"),r.darkMode=t.darkMode)}if(e.strings){e.locale||a("strings need locale");let s=e.strings[e.locale]??{},n={},i=Object.entries(s).filter(([,o])=>o!==void 0);i.length>T&&a("strings (too many overrides)");for(let[o,p]of i)/^[a-zA-Z0-9_.]{1,96}$/.test(o)||a("strings key"),(typeof p!="string"||p.length>2e3)&&a(`strings.${o}`),n[o]=p;r.strings=n}return r}var $=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait"]);function v(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!$.has(e.step))return null;let r=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:r,retryReason:t}:{type:"step",step:r}}var A=new Set(["approved","review_pending","rejected","expired"]),P=new Set([0,1,2,3]);function j(e){return typeof e=="string"&&e!==""}function m(e){return e.status==="cancelled"?{status:"cancelled"}:e.status==="failed"?{status:"failed",code:e.code||"unknown_error"}:e.status==="finished"&&e.sessionId&&A.has(e.displayStatus)?{status:"finished",sessionId:e.sessionId,displayStatus:e.displayStatus,...typeof e.level=="number"&&P.has(e.level)?{level:e.level}:{},...j(e.assurance)?{assurance:e.assurance}:{}}:{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 d=!1,K=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function y(e){let r=g(e),t=E();if(d)throw new l("flow_in_progress");d=!0;let s=e.onEvent,n=s?t.onEvent(i=>{let o=v(i);o&&s(o)}):void 0;try{return m(await t.start(r))}catch(i){let o=i?.code;if(typeof o=="string"&&K.has(o))throw new l(o);return{status:"failed",code:"unknown_error"}}finally{n?.remove(),d=!1}}function _(){return E().nativeVersion()}var u=require("react");function R(e){let r=(0,u.useRef)(null),t=(0,u.useRef)(e);return t.current=e,(0,u.useEffect)(()=>{if(r.current===e.clientToken)return;r.current=e.clientToken;let{onResult:s,onEvent:n,...i}=t.current;y({...i,onEvent:o=>t.current.onEvent?.(o)}).then(o=>t.current.onResult(o),o=>t.current.onResult({status:"failed",code:o instanceof l?o.code:"unknown_error"}))},[e.clientToken]),null}var N="0.1.0-rc.
|
|
1
|
+
"use strict";var f=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var O=(e,r)=>{for(var t in r)f(e,t,{get:r[t],enumerable:!0})},b=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of h(r))!C.call(e,n)&&n!==t&&f(e,n,{get:()=>r[n],enumerable:!(s=w(r,n))||s.enumerable});return e};var x=e=>b(f({},"__esModule",{value:!0}),e);var Y={};O(Y,{SDK_VERSION:()=>N,SekyroError:()=>l,SekyroFlow:()=>R,nativeVersion:()=>_,startSekyro:()=>y});module.exports=x(Y);var S=require("react-native"),c=S.TurboModuleRegistry.get("SekyroReactNative");var l=class extends Error{code;constructor(r,t=r){super(t),this.name="SekyroError",this.code=r}};var T=500,I=new Set(["ar","fr","en","es","pt","de"]),D=["brand","brandFg","bg","surface","fg","fgMuted","border"],F=["danger","success","warning"],k=!1,V=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),L=/^#[0-9a-fA-F]{6}$/,M=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,a=e=>{throw new l("invalid_config",`invalid config: ${e}`)};function g(e){(typeof e!="object"||e===null)&&a("config");for(let s of Object.keys(e))V.has(s)||a(`unknown key "${s.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&a("clientToken");let r={clientToken:e.clientToken};e.apiOrigin!==void 0&&(typeof e.apiOrigin=="string"&&(/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e.apiOrigin)||__DEV__&&M.test(e.apiOrigin))||a("apiOrigin"),r.apiOrigin=e.apiOrigin),e.locale!==void 0&&(I.has(e.locale)||a("locale"),r.locale=e.locale);let t=e.theme;if(t){if(t.colors){let s={};for(let[n,i]of Object.entries(t.colors))if(i!==void 0){if(F.includes(n)){__DEV__&&!k&&(k=!0,console.warn("[sekyro] theme.colors.danger/success/warning are ignored: status colours are standard (removed in 1.0)"));continue}(!D.includes(n)||typeof i!="string"||!L.test(i))&&a(`theme.colors.${n.slice(0,32)}`),s[n]=i}r.colors=s}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&a("theme.radius"),r.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&a("theme.fontFamily"),r.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||a("theme.darkMode"),r.darkMode=t.darkMode)}if(e.strings){e.locale||a("strings need locale");let s=e.strings[e.locale]??{},n={},i=Object.entries(s).filter(([,o])=>o!==void 0);i.length>T&&a("strings (too many overrides)");for(let[o,p]of i)/^[a-zA-Z0-9_.]{1,96}$/.test(o)||a("strings key"),(typeof p!="string"||p.length>2e3)&&a(`strings.${o}`),n[o]=p;r.strings=n}return r}var $=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait"]);function v(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!$.has(e.step))return null;let r=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:r,retryReason:t}:{type:"step",step:r}}var A=new Set(["approved","review_pending","rejected","expired"]),P=new Set([0,1,2,3]);function j(e){return typeof e=="string"&&e!==""}function m(e){return e.status==="cancelled"?{status:"cancelled"}:e.status==="failed"?{status:"failed",code:e.code||"unknown_error"}:e.status==="finished"&&e.sessionId&&A.has(e.displayStatus)?{status:"finished",sessionId:e.sessionId,displayStatus:e.displayStatus,...typeof e.level=="number"&&P.has(e.level)?{level:e.level}:{},...j(e.assurance)?{assurance:e.assurance}:{}}:{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 d=!1,K=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function y(e){let r=g(e),t=E();if(d)throw new l("flow_in_progress");d=!0;let s=e.onEvent,n=s?t.onEvent(i=>{let o=v(i);o&&s(o)}):void 0;try{return m(await t.start(r))}catch(i){let o=i?.code;if(typeof o=="string"&&K.has(o))throw new l(o);return{status:"failed",code:"unknown_error"}}finally{n?.remove(),d=!1}}function _(){return E().nativeVersion()}var u=require("react");function R(e){let r=(0,u.useRef)(null),t=(0,u.useRef)(e);return t.current=e,(0,u.useEffect)(()=>{if(r.current===e.clientToken)return;r.current=e.clientToken;let{onResult:s,onEvent:n,...i}=t.current;y({...i,onEvent:o=>t.current.onEvent?.(o)}).then(o=>t.current.onResult(o),o=>t.current.onResult({status:"failed",code:o instanceof l?o.code:"unknown_error"}))},[e.clientToken]),null}var N="0.1.0-rc.15";0&&(module.exports={SDK_VERSION,SekyroError,SekyroFlow,nativeVersion,startSekyro});
|
package/dist/index.d.cts
CHANGED
|
@@ -46,7 +46,7 @@ type SekyroEvent = {
|
|
|
46
46
|
interface SekyroConfig {
|
|
47
47
|
/** One-time session token from your backend (`sessions.create`). Never logged. */
|
|
48
48
|
clientToken: string;
|
|
49
|
-
/**
|
|
49
|
+
/** Leave unset: the default, `https://api.sekyro.ai`, serves Sandbox and Live sessions. */
|
|
50
50
|
apiOrigin?: string;
|
|
51
51
|
/**
|
|
52
52
|
* UI language of the flow; required when `strings` is set. Without it, the device language when it is one of the
|
|
@@ -96,7 +96,7 @@ type SekyroResult = {
|
|
|
96
96
|
*/
|
|
97
97
|
declare function startSekyro(config: SekyroConfig): Promise<SekyroResult>;
|
|
98
98
|
/**
|
|
99
|
-
* Version of the bundled native core: `'android 0.1.0-rc.
|
|
99
|
+
* Version of the bundled native core: `'android 0.1.0-rc.14'` / `'ios 0.1.0-rc.14'`.
|
|
100
100
|
* @public
|
|
101
101
|
*/
|
|
102
102
|
declare function nativeVersion(): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ type SekyroEvent = {
|
|
|
46
46
|
interface SekyroConfig {
|
|
47
47
|
/** One-time session token from your backend (`sessions.create`). Never logged. */
|
|
48
48
|
clientToken: string;
|
|
49
|
-
/**
|
|
49
|
+
/** Leave unset: the default, `https://api.sekyro.ai`, serves Sandbox and Live sessions. */
|
|
50
50
|
apiOrigin?: string;
|
|
51
51
|
/**
|
|
52
52
|
* UI language of the flow; required when `strings` is set. Without it, the device language when it is one of the
|
|
@@ -96,7 +96,7 @@ type SekyroResult = {
|
|
|
96
96
|
*/
|
|
97
97
|
declare function startSekyro(config: SekyroConfig): Promise<SekyroResult>;
|
|
98
98
|
/**
|
|
99
|
-
* Version of the bundled native core: `'android 0.1.0-rc.
|
|
99
|
+
* Version of the bundled native core: `'android 0.1.0-rc.14'` / `'ios 0.1.0-rc.14'`.
|
|
100
100
|
* @public
|
|
101
101
|
*/
|
|
102
102
|
declare function nativeVersion(): string;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TurboModuleRegistry as m}from"react-native";var y=m.get("SekyroReactNative");var a=class extends Error{code;constructor(r,t=r){super(t),this.name="SekyroError",this.code=r}};var E=500,_=new Set(["ar","fr","en","es","pt","de"]),R=["brand","brandFg","bg","surface","fg","fgMuted","border"],N=["danger","success","warning"],c=!1,w=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),h=/^#[0-9a-fA-F]{6}$/,C=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,s=e=>{throw new a("invalid_config",`invalid config: ${e}`)};function d(e){(typeof e!="object"||e===null)&&s("config");for(let i of Object.keys(e))w.has(i)||s(`unknown key "${i.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&s("clientToken");let r={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))||s("apiOrigin"),r.apiOrigin=e.apiOrigin),e.locale!==void 0&&(_.has(e.locale)||s("locale"),r.locale=e.locale);let t=e.theme;if(t){if(t.colors){let i={};for(let[l,n]of Object.entries(t.colors))if(n!==void 0){if(N.includes(l)){__DEV__&&!c&&(c=!0,console.warn("[sekyro] theme.colors.danger/success/warning are ignored: status colours are standard (removed in 1.0)"));continue}(!R.includes(l)||typeof n!="string"||!h.test(n))&&s(`theme.colors.${l.slice(0,32)}`),i[l]=n}r.colors=i}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&s("theme.radius"),r.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&s("theme.fontFamily"),r.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||s("theme.darkMode"),r.darkMode=t.darkMode)}if(e.strings){e.locale||s("strings need locale");let i=e.strings[e.locale]??{},l={},n=Object.entries(i).filter(([,o])=>o!==void 0);n.length>E&&s("strings (too many overrides)");for(let[o,u]of n)/^[a-zA-Z0-9_.]{1,96}$/.test(o)||s("strings key"),(typeof u!="string"||u.length>2e3)&&s(`strings.${o}`),l[o]=u;r.strings=l}return r}var O=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait"]);function S(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!O.has(e.step))return null;let r=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:r,retryReason:t}:{type:"step",step:r}}var b=new Set(["approved","review_pending","rejected","expired"]),x=new Set([0,1,2,3]);function T(e){return typeof e=="string"&&e!==""}function k(e){return e.status==="cancelled"?{status:"cancelled"}:e.status==="failed"?{status:"failed",code:e.code||"unknown_error"}:e.status==="finished"&&e.sessionId&&b.has(e.displayStatus)?{status:"finished",sessionId:e.sessionId,displayStatus:e.displayStatus,...typeof e.level=="number"&&x.has(e.level)?{level:e.level}:{},...T(e.assurance)?{assurance:e.assurance}:{}}:{status:"failed",code:"unknown_error"}}function g(){if(!y)throw new a("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return y}var p=!1,I=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function f(e){let r=d(e),t=g();if(p)throw new a("flow_in_progress");p=!0;let i=e.onEvent,l=i?t.onEvent(n=>{let o=S(n);o&&i(o)}):void 0;try{return k(await t.start(r))}catch(n){let o=n?.code;if(typeof o=="string"&&I.has(o))throw new a(o);return{status:"failed",code:"unknown_error"}}finally{l?.remove(),p=!1}}function D(){return g().nativeVersion()}import{useEffect as F,useRef as v}from"react";function V(e){let r=v(null),t=v(e);return t.current=e,F(()=>{if(r.current===e.clientToken)return;r.current=e.clientToken;let{onResult:i,onEvent:l,...n}=t.current;f({...n,onEvent:o=>t.current.onEvent?.(o)}).then(o=>t.current.onResult(o),o=>t.current.onResult({status:"failed",code:o instanceof a?o.code:"unknown_error"}))},[e.clientToken]),null}var L="0.1.0-rc.
|
|
1
|
+
import{TurboModuleRegistry as m}from"react-native";var y=m.get("SekyroReactNative");var a=class extends Error{code;constructor(r,t=r){super(t),this.name="SekyroError",this.code=r}};var E=500,_=new Set(["ar","fr","en","es","pt","de"]),R=["brand","brandFg","bg","surface","fg","fgMuted","border"],N=["danger","success","warning"],c=!1,w=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),h=/^#[0-9a-fA-F]{6}$/,C=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,s=e=>{throw new a("invalid_config",`invalid config: ${e}`)};function d(e){(typeof e!="object"||e===null)&&s("config");for(let i of Object.keys(e))w.has(i)||s(`unknown key "${i.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&s("clientToken");let r={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))||s("apiOrigin"),r.apiOrigin=e.apiOrigin),e.locale!==void 0&&(_.has(e.locale)||s("locale"),r.locale=e.locale);let t=e.theme;if(t){if(t.colors){let i={};for(let[l,n]of Object.entries(t.colors))if(n!==void 0){if(N.includes(l)){__DEV__&&!c&&(c=!0,console.warn("[sekyro] theme.colors.danger/success/warning are ignored: status colours are standard (removed in 1.0)"));continue}(!R.includes(l)||typeof n!="string"||!h.test(n))&&s(`theme.colors.${l.slice(0,32)}`),i[l]=n}r.colors=i}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&s("theme.radius"),r.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&s("theme.fontFamily"),r.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||s("theme.darkMode"),r.darkMode=t.darkMode)}if(e.strings){e.locale||s("strings need locale");let i=e.strings[e.locale]??{},l={},n=Object.entries(i).filter(([,o])=>o!==void 0);n.length>E&&s("strings (too many overrides)");for(let[o,u]of n)/^[a-zA-Z0-9_.]{1,96}$/.test(o)||s("strings key"),(typeof u!="string"||u.length>2e3)&&s(`strings.${o}`),l[o]=u;r.strings=l}return r}var O=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait"]);function S(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!O.has(e.step))return null;let r=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:r,retryReason:t}:{type:"step",step:r}}var b=new Set(["approved","review_pending","rejected","expired"]),x=new Set([0,1,2,3]);function T(e){return typeof e=="string"&&e!==""}function k(e){return e.status==="cancelled"?{status:"cancelled"}:e.status==="failed"?{status:"failed",code:e.code||"unknown_error"}:e.status==="finished"&&e.sessionId&&b.has(e.displayStatus)?{status:"finished",sessionId:e.sessionId,displayStatus:e.displayStatus,...typeof e.level=="number"&&x.has(e.level)?{level:e.level}:{},...T(e.assurance)?{assurance:e.assurance}:{}}:{status:"failed",code:"unknown_error"}}function g(){if(!y)throw new a("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return y}var p=!1,I=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function f(e){let r=d(e),t=g();if(p)throw new a("flow_in_progress");p=!0;let i=e.onEvent,l=i?t.onEvent(n=>{let o=S(n);o&&i(o)}):void 0;try{return k(await t.start(r))}catch(n){let o=n?.code;if(typeof o=="string"&&I.has(o))throw new a(o);return{status:"failed",code:"unknown_error"}}finally{l?.remove(),p=!1}}function D(){return g().nativeVersion()}import{useEffect as F,useRef as v}from"react";function V(e){let r=v(null),t=v(e);return t.current=e,F(()=>{if(r.current===e.clientToken)return;r.current=e.clientToken;let{onResult:i,onEvent:l,...n}=t.current;f({...n,onEvent:o=>t.current.onEvent?.(o)}).then(o=>t.current.onResult(o),o=>t.current.onResult({status:"failed",code:o instanceof a?o.code:"unknown_error"}))},[e.clientToken]),null}var L="0.1.0-rc.15";export{L as SDK_VERSION,a as SekyroError,V as SekyroFlow,D as nativeVersion,f as startSekyro};
|
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.15",
|
|
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.14",
|
|
103
|
+
"ios": "0.1.0-rc.14"
|
|
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.15",
|
|
101
|
+
"bom-ref": "@sekyro/react-native@0.1.0-rc.15",
|
|
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.15?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.15"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|