@sekyro/react-native 0.1.0-rc.36 → 0.1.0-rc.37
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 +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/sbom.cdx.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @sekyro/react-native
|
|
2
2
|
|
|
3
|
+
## 0.1.0-rc.37
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9b3c45c: Back (KI-535, with the next native SDKs): the header's Back is always in place, goes to the previous screen of the person's own path (the step's own sub-screen, else the still-open method choice, shown as a page) and is disabled where there is nowhere to go back to. Android's system back follows the same rule.
|
|
8
|
+
- 72254fd: Method choice (KI-522, with the next native SDKs): the document type list shows documents only, and the identity screens offer one « Change method » link that re-opens the whole method choice. Options are named from the server's data (« National Number (NNI) », « Houwiyeti », in Arabic « تطبيق هويتي »), else « National number » or « National eID ». The Arabic chip option reads « قراءة شريحة وثيقتي » and the Arabic lead « اختر طريقة للمتابعة ».
|
|
9
|
+
|
|
3
10
|
## 0.1.0-rc.36
|
|
4
11
|
|
|
5
12
|
### 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","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.
|
|
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.37";0&&(module.exports={SDK_VERSION,SekyroError,SekyroFlow,nativeVersion,startSekyro});
|
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","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.
|
|
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.37";export{M as SDK_VERSION,l as SekyroError,L as SekyroFlow,F as nativeVersion,p as startSekyro};
|
package/package.json
CHANGED
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.37",
|
|
101
|
+
"bom-ref": "@sekyro/react-native@0.1.0-rc.37",
|
|
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.37?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.37"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|