@vove-id/web-sdk 0.4.1 → 0.5.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/.qodo/history.sqlite +0 -0
- package/README.md +7 -4
- package/build/css/index.css +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/package.json +1 -1
|
Binary file
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ To begin the ID verification process, utilize the `processIDMatching` function.
|
|
|
32
32
|
#### Function Signature
|
|
33
33
|
|
|
34
34
|
```javascript
|
|
35
|
-
|
|
35
|
+
start({
|
|
36
36
|
sessionToken: string,
|
|
37
37
|
environment: VoveEnvironment,
|
|
38
38
|
onVerificationComplete?: (status: VoveStatus) => void
|
|
@@ -46,9 +46,11 @@ processIDMatching({
|
|
|
46
46
|
#### Example Usage
|
|
47
47
|
|
|
48
48
|
```javascript
|
|
49
|
-
import
|
|
49
|
+
import Vove, {VoveEnvironment} from '@vove-id/web-sdk';
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
const vove = new Vove();
|
|
52
|
+
|
|
53
|
+
vove.start({
|
|
52
54
|
environment: VoveEnvironment.Production,
|
|
53
55
|
sessionToken: 'your_session_token_here',
|
|
54
56
|
onVerificationComplete: (status) => {
|
|
@@ -65,7 +67,7 @@ The verification result is communicated through the `onVerificationComplete` cal
|
|
|
65
67
|
- There is no need to handle a Promise's resolve or reject states since the process completion is managed through the callback function.
|
|
66
68
|
|
|
67
69
|
```javascript
|
|
68
|
-
|
|
70
|
+
vove.start({
|
|
69
71
|
environment: VoveEnvironment.Production,
|
|
70
72
|
sessionToken: 'your_session_token_here',
|
|
71
73
|
onVerificationComplete: (status) => {
|
|
@@ -99,6 +101,7 @@ Parameters:
|
|
|
99
101
|
- `sessionToken`: `string`: The session token for the verification process.
|
|
100
102
|
- `environment`: `VoveEnvironment`: The SDK's operational environment.
|
|
101
103
|
- `onVerificationComplete`: An optional callback that is invoked with the verification status.
|
|
104
|
+
- `showIU`: `boolean`: to show or hide welcome and summary, the default is true
|
|
102
105
|
|
|
103
106
|
|
|
104
107
|
### `VoveEnvironment`
|
package/build/css/index.css
CHANGED
package/build/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @vove-id/web-sdk v0.
|
|
3
|
+
* @vove-id/web-sdk v0.5.0
|
|
4
4
|
* git+https://github.com/vove-id/web-sdk.git
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) TARIK AIT MBAREK (https://github.com/vove-id/) and project contributors.
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
!function(e,
|
|
12
|
+
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.VoveJS=o():e.VoveJS=o()}(self,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,o){for(var t=0;t<o.length;t++){var n=o[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function r(e,o,t){return o&&n(e.prototype,o),t&&n(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var o=function(e,o){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,o||"default");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(e)}(e,"string");return"symbol"==t(o)?o:o+""}e.r(o),e.d(o,{VoveEnvironment:()=>a,VoveLocal:()=>c,default:()=>u});var a=function(e){return e.PRODUCTION="production",e.SANDBOX="sandbox",e}({}),c=function(e){return e.EN="en",e.FR="fr",e.AR="ar",e.AR_MA="ar-ma",e}({});const u=r((function e(){var o,t,n;!function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,e),o=this,n=function(e){var o=e.sessionToken,t=e.environment,n=e.publicKey,r=e.showUI,i=void 0===r||r;window.addEventListener("message",(function(o){"verification_completed"===o.data.eventName&&e.onVerificationComplete&&e.onVerificationComplete(o.data.status)})),window.open("".concat("https://web.voveid.com","/?authToken=").concat(o,"&publicKey=").concat(n,"&environment=").concat(t,"&lg=").concat(e.local,"&enableVocalGuidance=").concat(e.enableVocalGuidance||!1,"&showUI=").concat(i),"popup","width=800,height=800")},(t=i(t="start"))in o?Object.defineProperty(o,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[t]=n,console.log("Vove constructor loaded!")}));return o})()));
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","mappings":";;;;;;;;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,IACT,M,aCTA,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAe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fC,EAAS,SAATA,GAAS,OAATA,EAAS,QAATA,EAAS,QAATA,EAAS,QAATA,EAAS,cAATA,CAAS,MAkCrB,QAnBUC,GACN,SAAAC,I,uGAAcC,CAAA,KAAAD,G,EAAA,K,EAIN,SAACE,GACL,IAAOC,EAAuDD,EAAvDC,aAAcC,EAAyCF,EAAzCE,YAAaC,EAA4BH,EAA5BG,UAASC,EAAmBJ,EAAjBK,OAAAA,OAAM,IAAAD,GAAOA,EAE1DE,OAAOC,iBAAiB,WAAW,SAACC,GACH,2BAAzBA,EAAMC,KAAKC,WACXV,EAAWW,wBAA0BX,EAAWW,uBAAuBH,EAAMC,KAAKG,OAE1F,IAGAN,OAAOO,KAAK,GAADC,OAFwE,yBAE7D,gBAAAA,OAAeb,EAAY,eAAAa,OAAcX,EAAS,iBAAAW,OAAgBZ,EAAW,QAAAY,OAAOd,EAAWe,MAAK,yBAAAD,OAAwBd,EAAWgB,sBAAuB,EAAK,YAAAF,OAAWT,GAAU,QAAS,uBAC3N,G,MAfc,Y,wFACVY,QAAQC,IAAI,2BAChB,I,ULfJ","sources":["webpack://VoveJS/webpack/universalModuleDefinition","webpack://VoveJS/webpack/bootstrap","webpack://VoveJS/webpack/runtime/define property getters","webpack://VoveJS/webpack/runtime/hasOwnProperty shorthand","webpack://VoveJS/webpack/runtime/make namespace object","webpack://VoveJS/./src/lib/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VoveJS\"] = factory();\n\telse\n\t\troot[\"VoveJS\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import \"./index.css\";\n\ntype VoveStatus = \"success\" | \"failure\" | \"pending\" | \"canceled\";\nexport enum VoveEnvironment {\n PRODUCTION = \"production\",\n SANDBOX = \"sandbox\",\n}\nexport enum VoveLocal {\n EN = \"en\",\n FR = \"fr\",\n AR = \"ar\",\n AR_MA = \"ar-ma\",\n}\ntype VoveConfig = {\n sessionToken: string,\n local?: VoveLocal,\n environment: VoveEnvironment,\n onVerificationComplete?: (status: VoveStatus) => void,\n enableVocalGuidance?: boolean,\n publicKey: string,\n showUI?: boolean,\n}\nclass Vove {\n constructor() {\n console.log(\"Vove constructor loaded!\");\n }\n\n start = (voveConfig: VoveConfig) => {\n const {sessionToken, environment, publicKey, showUI = true} = voveConfig;\n\n window.addEventListener(\"message\", (event) => {\n if (event.data.eventName === \"verification_completed\") {\n voveConfig.onVerificationComplete && voveConfig.onVerificationComplete(event.data.status);\n }\n });\n const baseURL = process.env.NODE_ENV === \"development\" ? \"http://localhost:5173\" : \"https://web.voveid.com\";\n\n window.open(`${baseURL}/?authToken=${sessionToken}&publicKey=${publicKey}&environment=${environment}&lg=${voveConfig.local}&enableVocalGuidance=${voveConfig.enableVocalGuidance || false}&showUI=${showUI}`, \"popup\", \"width=800,height=800\");\n };\n}\n\nexport default Vove;\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","VoveEnvironment","VoveLocal","_createClass","Vove","_classCallCheck","voveConfig","sessionToken","environment","publicKey","_voveConfig$showUI","showUI","window","addEventListener","event","data","eventName","onVerificationComplete","status","open","concat","local","enableVocalGuidance","console","log"],"sourceRoot":""}
|
package/build/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vove-id/web-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "VOVE ID - Instant, seamless identity verification. Designed for trust, user-centric, fully compliant with AML/KYC. Optimized for the MEA region.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/types/index.d.ts",
|