onfido-sdk-ui 14.28.0 → 14.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Onfido.iife.js CHANGED
@@ -1 +1 @@
1
- var v=Object.defineProperty;var L=(i,r,o)=>r in i?v(i,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[r]=o;var d=(i,r,o)=>(L(i,typeof r!="symbol"?r+"":r,o),o);(function(i){"use strict";class r{constructor(){this.eventListener={}}addEventListener(n,e){return this.eventListener[n]=this.eventListener[n]||[],this.eventListener[n].push(e),this}removeEventListener(n,e){const t=this.eventListener[n];if(t){let h;for(;(h=t.indexOf(e))!==-1;)t.splice(h,1)}}trigger(n,e){e.type=n,(this.eventListener[n]||[]).forEach(t=>{t(e)})}}const o="v14";class c extends r{constructor(){super(...arguments);d(this,"_handle");d(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,h])=>{e.addEventListener(t,h)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=s=>`v${(s||o).replace(/^v/,"")}`,a={init(s){const n=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ s.sdkUrl||`https://sdk.onfido.com/${l(s.version)}/Onfido.js`).then(t=>{const{Onfido:h}=t;n._setHandle(h.init(s))}).catch(t=>{var h;n.trigger("error",{error:t}),(h=s.onError)==null||h.call(s,t)}),n}};i.Onfido=a,i.prefixVersion=l,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
1
+ var f=Object.defineProperty;var L=(s,r,d)=>r in s?f(s,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):s[r]=d;var h=(s,r,d)=>(L(s,typeof r!="symbol"?r+"":r,d),d);(function(s){"use strict";class r{constructor(){this.eventListener={}}addEventListener(t,e){return this.eventListener[t]=this.eventListener[t]||[],this.eventListener[t].push(e),this}removeEventListener(t,e){const n=this.eventListener[t];if(n){let o;for(;(o=n.indexOf(e))!==-1;)n.splice(o,1)}}trigger(t,e){e.type=t,(this.eventListener[t]||[]).forEach(n=>{n(e)})}}const d="v14";class v extends r{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(n=>n(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([n,o])=>{e.addEventListener(n,o)}),this.eventListener={}}addEventListener(e,n){return this._handle?(this._handle.addEventListener(e,n),this):super.addEventListener(e,n)}removeEventListener(e,n){if(this._handle)return this._handle.removeEventListener(e,n),this;super.removeEventListener(e,n)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=i=>`v${(i||d).replace(/^v/,"")}`,c={init(i){const t=new v;return import(/* webpackIgnore: true */ /* @vite-ignore */ i.sdkUrl||`https://sdk.onfido.com/${l(i.version)}/Onfido.js`).then(n=>{const{Onfido:o}=n;t._setHandle(o.init(i))}).catch(n=>{var o;t.trigger("error",{error:n}),(o=i.onError)==null||o.call(i,n)}),t}};Object.defineProperty(c,"environment",{get:()=>window==null?void 0:window.Onfido.environment,set:i=>{window.Onfido=window.Onfido||{},window.Onfido.environment=i}});const a=c;s.Onfido=a,s.prefixVersion=l,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
package/Onfido.js CHANGED
@@ -1,46 +1,46 @@
1
- var h = Object.defineProperty;
2
- var d = (s, t, e) => t in s ? h(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var r = (s, t, e) => (d(s, typeof t != "symbol" ? t + "" : t, e), e);
4
- class o {
1
+ var d = Object.defineProperty;
2
+ var h = (i, n, e) => n in i ? d(i, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[n] = e;
3
+ var r = (i, n, e) => (h(i, typeof n != "symbol" ? n + "" : n, e), e);
4
+ class l {
5
5
  constructor() {
6
6
  this.eventListener = {};
7
7
  }
8
- addEventListener(t, e) {
9
- return this.eventListener[t] = this.eventListener[t] || [], this.eventListener[t].push(e), this;
8
+ addEventListener(n, e) {
9
+ return this.eventListener[n] = this.eventListener[n] || [], this.eventListener[n].push(e), this;
10
10
  }
11
- removeEventListener(t, e) {
12
- const n = this.eventListener[t];
13
- if (n) {
14
- let i;
15
- for (; (i = n.indexOf(e)) !== -1; )
16
- n.splice(i, 1);
11
+ removeEventListener(n, e) {
12
+ const t = this.eventListener[n];
13
+ if (t) {
14
+ let s;
15
+ for (; (s = t.indexOf(e)) !== -1; )
16
+ t.splice(s, 1);
17
17
  }
18
18
  }
19
- trigger(t, e) {
20
- e.type = t, (this.eventListener[t] || []).forEach((n) => {
21
- n(e);
19
+ trigger(n, e) {
20
+ e.type = n, (this.eventListener[n] || []).forEach((t) => {
21
+ t(e);
22
22
  });
23
23
  }
24
24
  }
25
- const l = "v14";
26
- class c extends o {
25
+ const c = "v14";
26
+ class v extends l {
27
27
  constructor() {
28
28
  super(...arguments);
29
29
  r(this, "_handle");
30
30
  r(this, "_handleSetCallbacks", []);
31
31
  }
32
32
  _setHandle(e) {
33
- this._handle = e, this._handleSetCallbacks.forEach((n) => n(e)), this._handleSetCallbacks = [], Object.entries(this.eventListener).forEach(([n, i]) => {
34
- e.addEventListener(n, i);
33
+ this._handle = e, this._handleSetCallbacks.forEach((t) => t(e)), this._handleSetCallbacks = [], Object.entries(this.eventListener).forEach(([t, s]) => {
34
+ e.addEventListener(t, s);
35
35
  }), this.eventListener = {};
36
36
  }
37
- addEventListener(e, n) {
38
- return this._handle ? (this._handle.addEventListener(e, n), this) : super.addEventListener(e, n);
37
+ addEventListener(e, t) {
38
+ return this._handle ? (this._handle.addEventListener(e, t), this) : super.addEventListener(e, t);
39
39
  }
40
- removeEventListener(e, n) {
40
+ removeEventListener(e, t) {
41
41
  if (this._handle)
42
- return this._handle.removeEventListener(e, n), this;
43
- super.removeEventListener(e, n);
42
+ return this._handle.removeEventListener(e, t), this;
43
+ super.removeEventListener(e, t);
44
44
  }
45
45
  async tearDown() {
46
46
  var e;
@@ -56,18 +56,25 @@ class c extends o {
56
56
  return (e = this._handle) == null ? void 0 : e.version;
57
57
  }
58
58
  }
59
- const a = (s) => `v${(s || l).replace(/^v/, "")}`, L = {
60
- init(s) {
61
- const t = new c();
62
- return import(/* webpackIgnore: true */ /* @vite-ignore */ s.sdkUrl || `https://sdk.onfido.com/${a(s.version)}/Onfido.js`).then((n) => {
63
- const { Onfido: i } = n;
64
- t._setHandle(i.init(s));
65
- }).catch((n) => {
66
- var i;
67
- t.trigger("error", { error: n }), (i = s.onError) == null || i.call(s, n);
68
- }), t;
59
+ const a = (i) => `v${(i || c).replace(/^v/, "")}`, o = {
60
+ init(i) {
61
+ const n = new v();
62
+ return import(/* webpackIgnore: true */ /* @vite-ignore */ i.sdkUrl || `https://sdk.onfido.com/${a(i.version)}/Onfido.js`).then((t) => {
63
+ const { Onfido: s } = t;
64
+ n._setHandle(s.init(i));
65
+ }).catch((t) => {
66
+ var s;
67
+ n.trigger("error", { error: t }), (s = i.onError) == null || s.call(i, t);
68
+ }), n;
69
69
  }
70
70
  };
71
+ Object.defineProperty(o, "environment", {
72
+ get: () => window == null ? void 0 : window.Onfido.environment,
73
+ set: (i) => {
74
+ window.Onfido = window.Onfido || {}, window.Onfido.environment = i;
75
+ }
76
+ });
77
+ const L = o;
71
78
  export {
72
79
  L as Onfido,
73
80
  a as prefixVersion
package/Onfido.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.window=n.window||{}))})(this,function(n){"use strict";var v=Object.defineProperty;var a=(n,i,o)=>i in n?v(n,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[i]=o;var h=(n,i,o)=>(a(n,typeof i!="symbol"?i+"":i,o),o);class i{constructor(){this.eventListener={}}addEventListener(s,e){return this.eventListener[s]=this.eventListener[s]||[],this.eventListener[s].push(e),this}removeEventListener(s,e){const t=this.eventListener[s];if(t){let d;for(;(d=t.indexOf(e))!==-1;)t.splice(d,1)}}trigger(s,e){e.type=s,(this.eventListener[s]||[]).forEach(t=>{t(e)})}}const o="v14";class c extends i{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,d])=>{e.addEventListener(t,d)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=r=>`v${(r||o).replace(/^v/,"")}`,f={init(r){const s=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ r.sdkUrl||`https://sdk.onfido.com/${l(r.version)}/Onfido.js`).then(t=>{const{Onfido:d}=t;s._setHandle(d.init(r))}).catch(t=>{var d;s.trigger("error",{error:t}),(d=r.onError)==null||d.call(r,t)}),s}};n.Onfido=f,n.prefixVersion=l,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
1
+ (function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.window=t.window||{}))})(this,function(t){"use strict";var a=Object.defineProperty;var u=(t,i,r)=>i in t?a(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r;var h=(t,i,r)=>(u(t,typeof i!="symbol"?i+"":i,r),r);class i{constructor(){this.eventListener={}}addEventListener(s,e){return this.eventListener[s]=this.eventListener[s]||[],this.eventListener[s].push(e),this}removeEventListener(s,e){const n=this.eventListener[s];if(n){let d;for(;(d=n.indexOf(e))!==-1;)n.splice(d,1)}}trigger(s,e){e.type=s,(this.eventListener[s]||[]).forEach(n=>{n(e)})}}const r="v14";class c extends i{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(n=>n(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([n,d])=>{e.addEventListener(n,d)}),this.eventListener={}}addEventListener(e,n){return this._handle?(this._handle.addEventListener(e,n),this):super.addEventListener(e,n)}removeEventListener(e,n){if(this._handle)return this._handle.removeEventListener(e,n),this;super.removeEventListener(e,n)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=o=>`v${(o||r).replace(/^v/,"")}`,f={init(o){const s=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ o.sdkUrl||`https://sdk.onfido.com/${l(o.version)}/Onfido.js`).then(n=>{const{Onfido:d}=n;s._setHandle(d.init(o))}).catch(n=>{var d;s.trigger("error",{error:n}),(d=o.onError)==null||d.call(o,n)}),s}};Object.defineProperty(f,"environment",{get:()=>window==null?void 0:window.Onfido.environment,set:o=>{window.Onfido=window.Onfido||{},window.Onfido.environment=o}});const v=f;t.Onfido=v,t.prefixVersion=l,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onfido-sdk-ui",
3
- "version": "14.28.0",
3
+ "version": "14.30.0",
4
4
  "description": "JavaScript SDK view layer for Onfido identity verification",
5
5
  "author": "Web SDK Customer Support <web-sdk@onfido.com> (https://github.com/onfido)",
6
6
  "repository": {
package/types/Events.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { CaptureModule } from './shared/Types';
2
- import type { SdkError } from './shared/Error';
3
- import type { Event } from './shared/EventEmitter';
4
- import type { CompleteData } from './shared/SdkParameters';
1
+ import type { CaptureModule } from '@onfido/capture-shared/Types';
2
+ import type { SdkError } from '@onfido/capture-shared/Error';
3
+ import type { Event } from '@onfido/capture-shared/EventEmitter';
4
+ import type { CompleteData } from '@onfido/capture-shared/SdkParameters';
5
5
  export type ModuleEvent<T extends string> = {
6
6
  module: CaptureModule;
7
7
  id: string;
package/types/Onfido.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { Listener } from './shared/EventEmitter';
2
- import type { SdkParameters } from './shared/SdkParameters';
1
+ import type { Listener } from '@onfido/capture-shared/EventEmitter';
2
+ import type { SdkParameters } from '@onfido/capture-shared/SdkParameters';
3
3
  import type { CaptureRunEvents } from './Events';
4
4
  export type Handle = {
5
5
  addEventListener: <EventName extends keyof CaptureRunEvents>(eventName: EventName, listener: Listener<CaptureRunEvents[EventName]>) => void;
package/types/loader.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import type { SdkParameters } from './shared/SdkParameters';
2
- import type { Handle } from './Onfido';
1
+ import type { OnfidoApi } from './Onfido';
3
2
  export type LoaderParameter = {
4
3
  /**
5
4
  * The version of the sdk to be loaded, by default v14 is used, which
@@ -9,6 +8,6 @@ export type LoaderParameter = {
9
8
  version?: string;
10
9
  };
11
10
  export declare const prefixVersion: (version?: string) => string;
12
- export declare const Onfido: {
13
- init(parameter: SdkParameters & LoaderParameter): Handle;
11
+ export declare const Onfido: OnfidoApi & {
12
+ environment?: 'INSECURE';
14
13
  };
@@ -1,5 +1,5 @@
1
- import type { DocumentFeatureFlags } from './DocumentModule.types';
2
- import type { FaceFeatureFlags } from './FaceModule.types';
1
+ import type { DocumentFeatureFlags } from '@onfido/capture-contract/module/DocumentModule';
2
+ import type { FaceFeatureFlags } from '@onfido/capture-contract/module/FaceModule';
3
3
  export type LogLevels = 'debug' | 'info' | 'warning' | 'error' | 'fatal';
4
4
  export type SdkFeatures = {
5
5
  enable_require_applicant_consents?: boolean;
package/license DELETED
@@ -1,272 +0,0 @@
1
- Please see the terms of your Onfido Services Agreement which you are bound by with respect to your use of the Onfido
2
- SDK. To the extent the Onfido SDK includes copies or substantial portions of software licenced under third party terms
3
- and conditions this will be set out at https://sdk.onfido.com/capture/core/14.28.0/license.
4
-
5
- In the event of any inconsistency between the Onfido Services Agreement and any third party terms and conditions, the
6
- third party terms and conditions shall take precedence over the rights and
7
- restrictions granted in the Onfido Services Agreement solely in respect of such third party dependencies set out
8
- at https://sdk.onfido.com/capture/core/14.28.0/license.
9
-
10
- 3rd party licenses
11
- ------------------
12
-
13
- Name: @onfido/capture-shared
14
- Version: 1.34.0
15
- License: null
16
- Private: false
17
- Description: A shared library to use in various capture packages
18
-
19
- ---
20
-
21
- Name: @sentry/utils
22
- Version: 7.64.0
23
- License: MIT
24
- Private: false
25
- Description: Utilities for all Sentry JavaScript SDKs
26
- Repository: undefined
27
- Homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/utils
28
- Author: Sentry
29
- License Copyright:
30
- ===
31
-
32
- Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved.
33
-
34
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
35
- documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
36
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
37
- persons to whom the Software is furnished to do so, subject to the following conditions:
38
-
39
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
40
- Software.
41
-
42
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
43
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
44
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
45
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46
-
47
-
48
- ---
49
-
50
- Name: uuid-random
51
- Version: 1.3.2
52
- License: MIT
53
- Private: false
54
- Description: Fastest UUIDv4 with good RNG
55
- Repository: git+https://github.com/jchook/uuid-random.git
56
- Homepage: https://github.com/jchook/uuid-random#readme
57
- Author: Wes Roberts
58
- License Copyright:
59
- ===
60
-
61
- Copyright (c) 2016-2019 Wes Roberts
62
-
63
- Permission is hereby granted, free of charge, to any person obtaining a copy of
64
- this software and associated documentation files (the "Software"), to deal in
65
- the Software without restriction, including without limitation the rights to
66
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
67
- the Software, and to permit persons to whom the Software is furnished to do so,
68
- subject to the following conditions:
69
-
70
- The above copyright notice and this permission notice shall be included in all
71
- copies or substantial portions of the Software.
72
-
73
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
75
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
76
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
77
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
78
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79
-
80
-
81
- ---
82
-
83
- Name: ua-parser-js
84
- Version: 1.0.36
85
- License: MIT
86
- Private: false
87
- Description: Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment
88
- Repository: https://github.com/faisalman/ua-parser-js.git
89
- Homepage: https://github.com/faisalman/ua-parser-js
90
- Author: Faisal Salman <f@faisalman.com> (http://faisalman.com)
91
- Contributors:
92
- Aamir Poonawalla <aamir@urx.com>
93
- Admas <mollases@users.noreply.github.com>
94
- algenon <m@antonz.ru>
95
- Alvin Portillo <alvin@8thwall.com>
96
- Amumu <yoyo837@hotmail.com>
97
- Andrea Vaghi <andrea.vaghi@jobrapido.com>
98
- Anton Zhiyanov <m@antonz.ru>
99
- Arturo Mejia <amejia@blim.com>
100
- Arun Rama Reddy <arunramareddy@gmail.com>
101
- Austin Pray <austin@austinpray.com>
102
- Bendeguz <symunona@gmail.com>
103
- Benjamin Bertrand <bertrand.design@gmail.com>
104
- Benjamin Urban <benjamin.urban@sueddeutsche.de>
105
- boneyao <admin@boneyao.com>
106
- Carl C Von Lewin <carlchristianlewin@gmail.com>
107
- CESAR RAMOS <c@imagenproactiva.com>
108
- Chad Killingsworth <ckillingsworth@jackhenry.com>
109
- Christopher De Cairos <chris.decairos@gmail.com>
110
- Cyrille David <cyrille@qonto.eu>
111
- Dario Vladovic <d.vladimyr@gmail.com>
112
- David Annez <david.annez@gmail.com>
113
- Davit Barbakadze <jayarjo@gmail.com>
114
- ddivernois <david-emmanuel.divernois@amadeus.com>
115
- Deliaz <D3liaz@gmail.com>
116
- Demis Palma <demis.palma@gmail.com>
117
- dhoko <aurelien@protonmail.com>
118
- dianhe <dianhe@webank.com>
119
- dineshks1 <dineshks1@d.kumar44@outlook.com>
120
- Dmitry Tyschenko <dtyschenko@gmail.com>
121
- Douglas Li <doug@knotch.it>
122
- Dumitru Uzun <contact@duzun.me>
123
- Dustin <duburns@fanatics.com>
124
- Elchin Valiyev <elchin.valiyev@autodesk.com>
125
- Emil Hesslow <hesslow@gmail.com>
126
- Eric Redon <eric.redon@coox.org>
127
- Eric Schrenker <eric.schrenker@gmail.com>
128
- Erik Hesselink <hesselink@gmail.com>
129
- Fabian Becker <halfdan@xnorfz.de>
130
- Faisal Salman <f@faisalman.com>
131
- Frédéric Camblor <fcamblor@gmail.com>
132
- Frederik Ring <frederik.ring@gmail.com>
133
- Gerald Host <me@jacobford.co.uk>
134
- Germán M. Bravo <german.mb@gmail.com>
135
- Grigory Dmitrenko <grigory@snsk.ru>
136
- gulpin <gulping.gulpin@gmail.com>
137
- Hendrik Helwich <h.helwich@iplabs.de>
138
- Hermann Ebert <ebbmo@HE.local>
139
- hr6r <hedian@gmail.com>
140
- Igor Topal <i.topal@smartweb.com.ua>
141
- Ildar Kamalov <i.kamalov@adguard.com>
142
- insanehong <insane.hong@navercorp.com>
143
- jackpoll <jackpoll123456@gmail.com>
144
- Jake Mc <startswithaj@users.noreply.github.com>
145
- JBYoshi <12983479+JBYoshi@users.noreply.github.com>
146
- Joey Parrish <joeyparrish@google.com>
147
- John Tantalo <john.tantalo@gmail.com>
148
- John Yanarella <jmy@codecatalyst.com>
149
- Jon Buckley <jon@jbuckley.ca>
150
- Josh Goldberg <joshuakgoldberg@outlook.com>
151
- Junki-Ishida <junki_ishida@dwango.co.jp>
152
- Kendall Buchanan <kendall@kendagriff.com>
153
- Lee Treveil <leetreveil@gmail.com>
154
- leonardo <leofiore@libero.it>
155
- Levente Balogh <balogh.levente.hu@gmail.com>
156
- Liam Quinn <lquinn@blackberry.com>
157
- Lithin <lithin@webklipper.com>
158
- ll-syber <670159357@qq.com>
159
- Loris Guignard <loris.guignard@gmail.com>
160
- Lukas Drgon <lukas.drgon@gmail.com>
161
- Lukas Eipert <leipert@users.noreply.github.com>
162
- Malash <i@malash.me>
163
- Martynas <martynas@firmfirm.co>
164
- Masahiko Sato <masasato@yahoo-corp.jp>
165
- Matt Brophy <matt@brophy.org>
166
- Matthew Origer <karatecowboy@gmail.com>
167
- Maximilian Haupt <mail@maximilianhaupt.com>
168
- Max Maurer <maxemanuel.maurer@gmail.com>
169
- Max Nordlund <max.nordlund@gmail.com>
170
- Michael Hess <mhess@connectify.me>
171
- MimyyK <michele.marais@hakisa.com>
172
- naoh <naoh.cs03g@nctu.edu.tw>
173
- Nicholas Ionata <nionata@ufl.edu>
174
- Nikhil Motiani <nikhil.motiani@outlook.com>
175
- Nik Rolls <nik@rolls.cc>
176
- nionata <n.ionata129@gmail.com>
177
- niris <nirisix@gmail.com>
178
- Nobuo Okada <nookada@yahoo-corp.jp>
179
- o.drapeza <o.drapeza@tinkoff.ru>
180
- otakuSiD <otakusid@gmail.com>
181
- patrick-nurt <github@pereira.dk>
182
- Pavel Studeny <studeny@avast.com>
183
- Peter Dave Hello <PeterDaveHello@users.noreply.github.com>
184
- philippsimon <github@philippsimon.de>
185
- Pieter Hendrickx <pieter.hendrickx@belfius.be>
186
- Piper Chester <piperchester@gmail.com>
187
- Queen Vinyl Darkscratch <vinyldarkscratch@gmail.com>
188
- Raine Makelainen <raine.makelainen@jolla.com>
189
- Raman Savaryn <homeneartheocean@gmail.com>
190
- Robert Tod <robert@qubit.com>
191
- roman.savarin <roman.savarin@skywindgroup.com>
192
- Ron Korland <ron@testim.io>
193
- Ross Noble <rosshnoble@gmail.com>
194
- ruicong <466403866@qq.com>
195
- Sandro Sonntag <sandro.sonntag@adorsys.de>
196
- sgautrea <shanegautreau@gmail.com>
197
- Shane Gautreau <sgautrea@opentext.com>
198
- Shane Thacker <shane@steadymade.com>
199
- Shreedhar <shreedhar@uber.com>
200
- Simon Eisenmann <simon@longsleep.org>
201
- Simon Lang <me@simonlang.org>
202
- Stiekel <histkc@gmail.com>
203
- sUP <dani3l@gmail.com>
204
- Sylvain Gizard <sylvain.gizard@gmail.com>
205
- szchenghuang <szchenghuang@gmail.com>
206
- Tanguy Krotoff <tkrotoff@gmail.com>
207
- Tony Tomarchio <tony@tomarchio.cc>
208
- Ulrich Schmidt <u.schmidt@velian.de>
209
- Vadim Kurachevsky <vadim@hmvs.org>
210
- Yılmaz <yilmazdemir36@gmail.com>
211
- yuanyang <work_yuanyang@163.com>
212
- Yun Young-jin <yupmin@yupmin-office-macmini.local>
213
- Zach Bjornson <zbbjornson@gmail.com>
214
- License Copyright:
215
- ===
216
-
217
- MIT License
218
-
219
- Copyright (c) 2012-2023 Faisal Salman <<f@faisalman.com>>
220
-
221
- Permission is hereby granted, free of charge, to any person obtaining a copy
222
- of this software and associated documentation files (the "Software"), to deal
223
- in the Software without restriction, including without limitation the rights
224
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
225
- copies of the Software, and to permit persons to whom the Software is
226
- furnished to do so, subject to the following conditions:
227
-
228
- The above copyright notice and this permission notice shall be included in all
229
- copies or substantial portions of the Software.
230
-
231
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
232
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
233
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
234
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
235
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
236
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
237
- SOFTWARE.
238
-
239
-
240
- ---
241
-
242
- Name: js-cookie
243
- Version: 3.0.5
244
- License: MIT
245
- Private: false
246
- Description: A simple, lightweight JavaScript API for handling cookies
247
- Repository: git://github.com/js-cookie/js-cookie.git
248
- Author: Klaus Hartl
249
- License Copyright:
250
- ===
251
-
252
- MIT License
253
-
254
- Copyright (c) 2018 Copyright 2018 Klaus Hartl, Fagner Brack, GitHub Contributors
255
-
256
- Permission is hereby granted, free of charge, to any person obtaining a copy
257
- of this software and associated documentation files (the "Software"), to deal
258
- in the Software without restriction, including without limitation the rights
259
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
260
- copies of the Software, and to permit persons to whom the Software is
261
- furnished to do so, subject to the following conditions:
262
-
263
- The above copyright notice and this permission notice shall be included in all
264
- copies or substantial portions of the Software.
265
-
266
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
267
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
268
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
269
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
270
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
271
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
272
- SOFTWARE.
@@ -1,9 +0,0 @@
1
- export type CrossDeviceMethod = 'copy_link' | 'qr_code' | 'sms';
2
- export type CrossDeviceConnectModuleConfiguration = {
3
- smsNumberCountryCode?: string;
4
- smsNumber?: string;
5
- methods?: CrossDeviceMethod[];
6
- };
7
- export type CrossDeviceConnectModuleInput = {
8
- allowBack?: boolean;
9
- };
@@ -1,59 +0,0 @@
1
- export type DocumentType = 'driving_licence' | 'national_identity_card' | 'residence_permit' | 'passport';
2
- export type DocumentTypeGeneric = 'generic_document';
3
- type DocumentCountrySelection = {
4
- documentType: DocumentType;
5
- issuingCountry: string;
6
- };
7
- type DocumentAllSelection = {
8
- documentType: DocumentType;
9
- allCountries: true;
10
- };
11
- type DocumentGenericSelection = {
12
- documentType: DocumentTypeGeneric;
13
- id: string;
14
- };
15
- export declare const isDocumentCountrySelection: (selection: DocumentSelection) => selection is DocumentCountrySelection;
16
- export declare const isDocumentAllSelection: (selection: DocumentSelection) => selection is DocumentAllSelection;
17
- export declare const isDocumentGenericSelection: (selection: DocumentSelection) => selection is DocumentGenericSelection;
18
- export type DocumentSelection = DocumentCountrySelection | DocumentAllSelection | DocumentGenericSelection;
19
- export type DocumentSelectionFilter = {
20
- include?: DocumentSelection[];
21
- exclude?: DocumentSelection[];
22
- };
23
- export type GenericDocumentType = {
24
- id: string;
25
- title: string;
26
- subTitle: string;
27
- country: string;
28
- pages: number;
29
- };
30
- export type DocumentModuleConfiguration = {
31
- filter?: DocumentSelectionFilter;
32
- extend?: GenericDocumentType[];
33
- hideCountrySelection?: boolean;
34
- uploadFallback?: boolean;
35
- };
36
- export type DocumentModuleInput = Record<string, unknown>;
37
- export type DocumentSideOutput = {
38
- id: string;
39
- type?: string;
40
- };
41
- export type Side = 'front' | 'back';
42
- export type DocumentIds = Partial<Record<`${Side}` | `${Side}_video`, DocumentSideOutput>>;
43
- export type DocumentModuleOutput = {
44
- type: string;
45
- sides: DocumentIds;
46
- };
47
- export type EnabledDocumentType = {
48
- country: string;
49
- document_type: string;
50
- };
51
- export type DocumentFeatureFlags = {
52
- auto_capture_enabled_documents: EnabledDocumentType[];
53
- auto_capture_timeout_ms?: number;
54
- enable_auto_capture_doc_capture?: boolean;
55
- enable_js_camera_doc_capture?: boolean;
56
- max_total_retries?: number;
57
- enable_native_camera_fallback?: boolean;
58
- };
59
- export {};
@@ -1,121 +0,0 @@
1
- export declare type EnterpriseCallbackResponse<T> = {
2
- continueWithOnfidoSubmission?: boolean;
3
- onfidoSuccessResponse?: T;
4
- };
5
- export type Common = {
6
- sdk_metadata: string;
7
- sdk_source: string;
8
- sdk_version: string;
9
- };
10
- export type SubmitDocument = {
11
- file: Blob;
12
- side: DocumentSides;
13
- type: string;
14
- sdk_validations: string;
15
- } & Common;
16
- export type SubmitSelfie = {
17
- file: Blob;
18
- snapshot: {
19
- blob: Blob;
20
- filename: string;
21
- };
22
- };
23
- export type SubmitVideo = {
24
- file: Blob;
25
- challenge: string;
26
- challenge_id: string;
27
- challenge_switch_at: number | undefined;
28
- languages: string;
29
- };
30
- export declare type ImageQualityValidationTypes = 'detect_barcode' | 'detect_document' | 'detect_cutoff' | 'detect_glare' | 'detect_blur';
31
- export declare type ImageQualityWarnings = Partial<Record<ImageQualityValidationTypes, {
32
- valid: boolean;
33
- }>>;
34
- export declare type UploadFileResponse = {
35
- id: string;
36
- created_at: string;
37
- file_name: string;
38
- file_type: string;
39
- file_size: number;
40
- href: string;
41
- download_href: string;
42
- };
43
- type Score = {
44
- min: number;
45
- max: number;
46
- threshold: number;
47
- };
48
- export declare type DocumentSides = 'front' | 'back';
49
- export declare type DocumentType = 'driving_licence' | 'national_identity_card' | 'residence_permit' | 'passport';
50
- export declare type DocumentImageResponse = {
51
- applicant_id: string;
52
- type: DocumentType;
53
- side: DocumentSides;
54
- issuing_country: string;
55
- sdk_warnings: ImageQualityWarnings & {
56
- image_quality: {
57
- quality: string;
58
- breakdown: {
59
- document: {
60
- has_document: boolean;
61
- detection_score: number;
62
- } & Score;
63
- has_document: boolean;
64
- cutoff: {
65
- has_cutoff: boolean;
66
- score: number;
67
- } & Score;
68
- blur: {
69
- has_blur: boolean;
70
- score: number;
71
- blur_model: string;
72
- } & Score;
73
- glare: {
74
- score: number;
75
- bbox: [number, number, number, number];
76
- has_glare: boolean;
77
- threshold: number;
78
- glare_model: string;
79
- };
80
- barcode: {
81
- result: string;
82
- properties: Record<string, string>;
83
- };
84
- };
85
- image_quality_uuid: string;
86
- };
87
- };
88
- classification: {
89
- issuing_country: null;
90
- document_version: null;
91
- side?: DocumentSides;
92
- document_type?: DocumentType;
93
- };
94
- document_features: {
95
- has_nfc: boolean;
96
- };
97
- } & UploadFileResponse;
98
- export declare type VideoChallengeLanguage = {
99
- source: string;
100
- language_code: string;
101
- };
102
- export declare type ChallengePayload = {
103
- type: 'recite';
104
- query: number[];
105
- } | {
106
- type: 'movement';
107
- query: string;
108
- };
109
- export declare type FaceVideoResponse = {
110
- challenge: ChallengePayload[];
111
- languages: VideoChallengeLanguage[];
112
- } & UploadFileResponse;
113
- export type CustomCallbackFormatterType = 'raw' | 'formData';
114
- export type EnterpriseFeatureCallback = {
115
- useCustomizedApiRequests?: boolean;
116
- formatter?: CustomCallbackFormatterType;
117
- onSubmitDocument?: (data: FormData | SubmitDocument) => Promise<EnterpriseCallbackResponse<DocumentImageResponse>>;
118
- onSubmitSelfie?: (data: FormData | SubmitSelfie) => Promise<EnterpriseCallbackResponse<UploadFileResponse>>;
119
- onSubmitVideo?: (data: FormData | SubmitVideo) => Promise<EnterpriseCallbackResponse<FaceVideoResponse>>;
120
- };
121
- export {};
@@ -1,80 +0,0 @@
1
- import type { Configuration } from './Types';
2
- export declare enum SdkErrorLevel {
3
- EXTERNAL = "external",
4
- INTERNAL = "internal"
5
- }
6
- export type SdkErrorTypes = 'invalid_token' | 'expired_token' | 'expired_trial' | 'geoblocked_request' | 'permissions_unavailable' | 'exception' | 'unsupported' | 'unsupported_feature' | 'invalid_sdk_parameter' | 'restart' | 'desktop' | 'unsupported_sdk_version' | 'no_camera' | 'user_consent_denied' | 'uncaught_fetch_error' | 'api_error' | 'cross_device_verification_invalid' | 'cross_device_verification_abort' | 'workflow_abandoned' | 'workflow_error';
7
- export declare const isSdkError: (error: unknown) => boolean;
8
- export type SdkErrors = {
9
- type: SdkErrorTypes;
10
- message: string;
11
- level: SdkErrorLevel;
12
- };
13
- export declare const CrossDeviceRestartError: SdkErrors;
14
- export declare const CrossDeviceDesktopError: SdkErrors;
15
- export declare const CrossDeviceVerificationInvalidError: SdkErrors;
16
- export declare const CrossDeviceVerificationAbortError: SdkErrors;
17
- export declare const InvalidTokenError: SdkErrors;
18
- export declare const WorkflowAbondonedError: SdkErrors;
19
- export declare const WorkflowError: SdkErrors;
20
- export declare const ExpiredTokenError: SdkErrors;
21
- export declare const ExpiredTrialError: SdkErrors;
22
- export declare const GeoblockedRequestError: SdkErrors;
23
- export declare const PermissionsUnavailableError: SdkErrors;
24
- export declare const ExceptionError: SdkErrors;
25
- export declare const UnsupportedError: SdkErrors;
26
- export declare const UnsupportedFeatureError: SdkErrors;
27
- export declare const InvalidSdkParameter: SdkErrors;
28
- export declare const UnsupportedSdkVersionError: SdkErrors;
29
- export declare const NoCameraError: SdkErrors;
30
- export declare const UserConsentDeniedError: SdkErrors;
31
- export declare const ApiError: SdkErrors;
32
- export declare const UncaughtFetchError: SdkErrors;
33
- export type ErrorModuleConfiguration = Configuration & {
34
- type: SdkErrorTypes;
35
- };
36
- export declare const SdkWarningType = "SdkWarning";
37
- export declare class SdkError extends Error {
38
- readonly name = "SdkError";
39
- type: SdkErrorTypes;
40
- exception?: Error | unknown;
41
- level: SdkErrorLevel;
42
- body?: unknown;
43
- httpCode?: number;
44
- stack?: string;
45
- constructor({ type, message, level, exception, stack, body, httpCode, }: {
46
- type: SdkErrorTypes;
47
- message: string;
48
- level: SdkErrorLevel;
49
- exception?: Error | unknown;
50
- stack?: string;
51
- body?: unknown;
52
- httpCode?: number;
53
- });
54
- encode(): {
55
- name: string;
56
- type: SdkErrorTypes;
57
- message: string;
58
- level: SdkErrorLevel;
59
- stack: string | undefined;
60
- exception: unknown;
61
- body: unknown;
62
- httpCode: number | undefined;
63
- };
64
- static decode(error: SdkError): SdkError;
65
- }
66
- export type ErrorCallback = (error: {
67
- type: SdkErrorTypes;
68
- message: string;
69
- exception?: Error | unknown;
70
- }) => void;
71
- export declare const formatError: (error: SdkError | Error | unknown) => {
72
- name: string;
73
- type: SdkErrorTypes;
74
- message: string;
75
- level: SdkErrorLevel;
76
- stack: string | undefined;
77
- exception: unknown;
78
- body: unknown;
79
- httpCode: number | undefined;
80
- };
@@ -1,16 +0,0 @@
1
- export type EventMap = {
2
- [eventName: string]: Event<string>;
3
- };
4
- export type Event<T extends string> = {
5
- type: T;
6
- };
7
- export type Listener<E extends Event<any>> = (e: E) => void;
8
- export declare class EventEmitter<Events extends EventMap> {
9
- private readonly eventListener;
10
- constructor();
11
- addEventListener<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): this;
12
- removeEventListener<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): void;
13
- trigger<EventName extends keyof Events>(eventName: EventName, e: Omit<Events[EventName], 'type'> & {
14
- type?: EventName;
15
- }): void;
16
- }
@@ -1,12 +0,0 @@
1
- export type FaceModuleConfiguration = {
2
- showIntro?: boolean;
3
- useMultipleSelfieCapture?: boolean;
4
- };
5
- export type FaceModuleOutput = {
6
- id: string;
7
- variant: 'standard';
8
- };
9
- export type FaceFeatureFlags = {
10
- sign_upload?: boolean;
11
- enable_native_camera_fallback?: boolean;
12
- };
@@ -1,55 +0,0 @@
1
- import type { LegacyStepDefinition, LegacyStepType, CrossDevicePolicy, EnterpriseFeatures, LocaleDirection, Theme, ThemeConfig, Translations, UserDetails } from './Types';
2
- import type { ErrorCallback } from './Error';
3
- import type { CrossDeviceMethod } from './CrossDeviceConnect.types';
4
- import type { EnterpriseFeatureCallback } from './Enterprise';
5
- export declare const legacySteps: LegacyStepType[];
6
- export declare const isLegacyStepType: (step: LegacyStepDefinition) => step is LegacyStepType;
7
- export type CompleteData = Record<string, unknown>;
8
- export type EnterpriseFeatureParameter = EnterpriseFeatures & EnterpriseFeatureCallback;
9
- export type CommonSdkParameters = {
10
- containerEl?: HTMLElement;
11
- containerId?: string;
12
- onError?: ErrorCallback;
13
- onComplete?: (data: CompleteData) => void;
14
- enterpriseFeatures?: EnterpriseFeatureParameter;
15
- theme?: Theme;
16
- customUI?: ThemeConfig;
17
- language?: string | LegacyLanguageParameter;
18
- translations?: Translations;
19
- };
20
- export type LegacyLanguageParameter = {
21
- locale?: string;
22
- phrases?: Record<string, string>;
23
- mobilePhrases?: Record<string, string>;
24
- direction?: LocaleDirection;
25
- };
26
- export type TokenParameters = {
27
- token: string;
28
- language?: string | LegacyLanguageParameter;
29
- translations?: Translations;
30
- theme?: Theme;
31
- /***
32
- * You can change the default country for the SMS number input by passing the
33
- * smsNumberCountryCode option when the SDK is initialized. The value should
34
- * be a string containing a 2-character ISO Country code. If empty, the SMS
35
- * number country code will default to GB.
36
- */
37
- smsNumberCountryCode?: string;
38
- userDetails?: UserDetails;
39
- _crossDeviceLinkMethods?: CrossDeviceMethod[];
40
- crossDeviceClientIntroProductLogoSrc?: string;
41
- crossDevicePolicy?: CrossDevicePolicy;
42
- disableAnalytics?: boolean;
43
- disableAnalyticsCookies?: boolean;
44
- } & CommonSdkParameters;
45
- export type StudioSdkParameters = {
46
- workflowRunId: string;
47
- disableWelcomeScreen?: boolean;
48
- } & TokenParameters;
49
- export type ClassicSdkParameters = {
50
- steps: LegacyStepDefinition[];
51
- } & TokenParameters;
52
- export type CrossDeviceSdkParameters = CommonSdkParameters & {
53
- roomId?: string;
54
- };
55
- export type SdkParameters = StudioSdkParameters | ClassicSdkParameters | CrossDeviceSdkParameters;
@@ -1,231 +0,0 @@
1
- import type { FeatureFlags } from './FeatureFlags';
2
- export type ModuleError = {
3
- type: 'no_camera';
4
- message?: string;
5
- };
6
- export type ModuleFinish = {
7
- type: 'finish';
8
- output: Output;
9
- };
10
- export type ModuleUnsupported = {
11
- type: 'unsupported';
12
- data?: unknown;
13
- };
14
- export type Outputs = ModuleFinish | ModuleUnsupported;
15
- export type Output = unknown | ModuleError;
16
- export type ExecutorMethod = 'bootstrap' | 'ping' | 'start';
17
- export type CrossDeviceExecutorMethod = 'crossDevice.update';
18
- export type RunnerMethod = 'captureModule.finish' | 'captureModule.error' | 'captureModule.unsupported' | 'crossDevice.start' | 'crossDevice.preload' | 'crossDevice.verify' | 'crossDevice.abort' | 'analytics.send' | 'analytics.userAnalytics' | 'navigation.back' | 'navigation.externalLink' | 'customCallback.invoke' | 'passkey.create' | 'passkey.get';
19
- export type Configuration<T = unknown> = {
20
- translations: T;
21
- theme?: Theme;
22
- language?: string;
23
- workflowRunId?: string;
24
- };
25
- export type Input = Record<string, unknown>;
26
- export type LocaleDirection = 'ltr' | 'rtl';
27
- export type TranslationData<T> = T & {
28
- meta?: {
29
- legacy: Record<string, unknown>;
30
- fallback?: Record<string, unknown>;
31
- direction?: LocaleDirection;
32
- convertLegacyTranslations?: boolean;
33
- };
34
- };
35
- export type TranslationItem<T> = T | (() => Promise<T>);
36
- export type Translations<T = unknown> = Record<string, TranslationItem<T>>;
37
- export type ThemeConfig = Record<string, any>;
38
- export type Theme = {
39
- name: 'light' | 'dark';
40
- config?: ThemeConfig;
41
- };
42
- export type Optional<T> = undefined | T;
43
- export declare enum Platform {
44
- WEB = "web",
45
- IOS = "ios",
46
- ANDROID = "android"
47
- }
48
- type ExecutionContextConfiguration = {
49
- crossDevicePolicy?: CrossDevicePolicy;
50
- supportsCrossDevice?: boolean;
51
- supportsBack?: boolean;
52
- supportsExternalLink?: boolean;
53
- };
54
- export type CustomCallbacks = {
55
- names: string[];
56
- active: boolean;
57
- };
58
- export type ExecutionContext = {
59
- platform: Platform;
60
- version: string;
61
- module?: CaptureModule;
62
- configuration?: ExecutionContextConfiguration;
63
- customCallbacks?: CustomCallbacks;
64
- currentScriptHostname?: string;
65
- };
66
- export type UserDetails = {
67
- smsNumber?: string;
68
- };
69
- export type ClientConfiguration = {
70
- token: string;
71
- sdkToken: SdkToken;
72
- featureFlags: FeatureFlags;
73
- theme?: Theme;
74
- language?: string;
75
- translations?: Translations;
76
- analytics: {
77
- enabled: boolean;
78
- anonymousUuid: string;
79
- sessionUuid: string;
80
- workflowRunId: string | undefined;
81
- steps: LegacyStepDefinition[];
82
- source: {
83
- platform: string;
84
- version: string;
85
- sdk_environment: string;
86
- distribution_source: string;
87
- pinned_version?: string;
88
- };
89
- };
90
- logger: {
91
- enabled: boolean;
92
- levels: string[];
93
- };
94
- crossDevice: {
95
- verification?: boolean;
96
- };
97
- enterpriseFeatures?: EnterpriseFeatures;
98
- crossDeviceClientIntroProductName?: string;
99
- crossDeviceClientIntroProductLogoSrc?: string;
100
- smsNumberCountryCode?: string;
101
- userDetails?: UserDetails;
102
- };
103
- export type SdkToken = {
104
- exp: number;
105
- payload: Payload;
106
- enterpriseFeatures?: TokenEnterpriseFeatures;
107
- urls: {
108
- detectDocumentUrl: URL;
109
- /**
110
- * @deprecated
111
- */
112
- syncUrl: URL;
113
- hostedSdkUrl: URL;
114
- authUrl: URL;
115
- onfidoApiUrl: URL;
116
- telephonyUrl: URL;
117
- };
118
- };
119
- export type UUID = string;
120
- export type URL = string;
121
- export type Payload = {
122
- applicantUuid: UUID;
123
- applicationId?: string;
124
- clientUuid: UUID;
125
- isSandbox: boolean;
126
- isTrial: boolean;
127
- };
128
- export type EnterpriseFeatures = {
129
- hideOnfidoLogo?: boolean;
130
- cobrand?: {
131
- text?: string;
132
- };
133
- logoCobrand?: {
134
- lightLogoSrc?: string;
135
- darkLogoSrc?: string;
136
- };
137
- };
138
- type TokenEnterpriseFeatures = {
139
- cobrand: boolean;
140
- logoCobrand: boolean;
141
- hideOnfidoLogo: boolean;
142
- useCustomizedApiRequests: boolean;
143
- };
144
- export type JWT = {
145
- exp: number;
146
- payload: {
147
- app: UUID;
148
- application_id?: string;
149
- client_uuid: UUID;
150
- is_sandbox: boolean;
151
- is_trial: boolean;
152
- ref: string;
153
- sardine_session: UUID;
154
- };
155
- enterprise_features: TokenEnterpriseFeatures;
156
- urls: {
157
- detect_document_url: URL;
158
- sync_url: URL;
159
- hosted_sdk_url: URL;
160
- auth_url: URL;
161
- onfido_api_url: URL;
162
- telephony_url: URL;
163
- };
164
- };
165
- export type TrackedEventTypes = 'screen' | 'action' | 'flow' | 'view';
166
- export type AnalyticsEvent = {
167
- eventName: string;
168
- eventType: TrackedEventTypes;
169
- };
170
- export type UserAnalyticsEvent<N extends string = string, P extends Record<string, unknown> = Record<string, unknown>> = {
171
- eventName: N;
172
- properties: P;
173
- };
174
- export type DeviceTypes = 'desktop' | 'mobile';
175
- export type TrackedEnvironmentData = {
176
- device?: DeviceTypes;
177
- os?: string;
178
- os_version?: string;
179
- browser?: string;
180
- browser_version?: string;
181
- brand?: string;
182
- model?: string;
183
- };
184
- export declare enum CrossDeviceVerificationStatus {
185
- VALID = "VALID",
186
- INVALID = "INVALID",
187
- PENDING = "PENDING",
188
- ABORT = "ABORT"
189
- }
190
- export type CrossDeviceInitialState = unknown;
191
- export type ConnectResult = {
192
- roomId: string;
193
- };
194
- export type CrossDeviceDetails = ConnectResult & {
195
- connected: boolean;
196
- link: string;
197
- code?: string;
198
- verificationStatus?: CrossDeviceVerificationStatus;
199
- };
200
- export type CrossDeviceInput = {
201
- backActionType?: 'module' | 'cross-module';
202
- details: CrossDeviceDetails;
203
- };
204
- export declare enum CaptureModuleType {
205
- HOSTED = "hosted",
206
- EXTERNAL = "external"
207
- }
208
- export type ModuleType<T extends CaptureModuleType> = {
209
- type: T;
210
- };
211
- export type HostedModule = {
212
- version?: string;
213
- module: string;
214
- } & ModuleType<CaptureModuleType.HOSTED>;
215
- export type ExternalModule = {
216
- url: string;
217
- } & ModuleType<CaptureModuleType.EXTERNAL>;
218
- export type CaptureModule = HostedModule | ExternalModule;
219
- export type CrossDevicePolicy = 'enable' | 'force' | 'disable';
220
- export type LegacyStepType = 'welcome' | 'complete' | 'face' | 'consent' | 'document' | 'poa';
221
- export type LegacyStepDefinition = LegacyStepType | StepDefinition;
222
- export type StepDefinition = {
223
- type: LegacyStepType | string;
224
- options?: Record<string, unknown>;
225
- module?: CaptureModule;
226
- /**
227
- * the key used to serialize the output for onComplete
228
- */
229
- key?: string;
230
- };
231
- export {};