idmission-web-sdk 0.0.73 → 0.0.75
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/README.md +14 -0
- package/dist/contexts/SubmissionContext.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/sdk2.cjs.development.js +4 -1
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +4 -1
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +4 -1
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +0 -8
- package/dist/version.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -575,6 +575,20 @@ IDmissionSDK.renderCustomerIdentification('#target-element', { submissionToken:
|
|
|
575
575
|
|
|
576
576
|
## Other Functionality
|
|
577
577
|
|
|
578
|
+
### Detecting the current version of the IDmission Web SDK
|
|
579
|
+
|
|
580
|
+
If you're ever wondering which version you have loaded, you can access it as a property of the global WebSDK bundle via `window.IDmissionSDK.version`.
|
|
581
|
+
|
|
582
|
+
You can also capture this information from the event fired at load time via `e.detail.webSdkVersion` like so:
|
|
583
|
+
|
|
584
|
+
```html
|
|
585
|
+
<script type="module">
|
|
586
|
+
document.addEventListener('idmission-web-sdk.ready', (e) => {
|
|
587
|
+
console.log('web sdk version:', e.detail.webSdkVersion)
|
|
588
|
+
})
|
|
589
|
+
</script>
|
|
590
|
+
```
|
|
591
|
+
|
|
578
592
|
### Intercepting (and modifying) API calls to IDmission's backend with `onBeforeSubmit`
|
|
579
593
|
|
|
580
594
|
Each customer flow documented above includes an optional `onBeforeSubmit` prop, which bears the type signature `(request: SubmissionRequest) => Promise<SubmissionRequest>`. This can be useful if you would like to include some custom functionality that interrupts the WebSDK's outgoing request to IDmission's servers, allowing you a chance to modify the request before it is dispatched.
|
|
@@ -98,7 +98,7 @@ export type SubmissionMetadata = {
|
|
|
98
98
|
selfie: CaptureAttemptMetadata[];
|
|
99
99
|
back: CaptureAttemptMetadata[];
|
|
100
100
|
front: CaptureAttemptMetadata[];
|
|
101
|
-
sdkVersion:
|
|
101
|
+
sdkVersion: string;
|
|
102
102
|
isRealIDCheckRequired: 'true' | 'false';
|
|
103
103
|
os?: string;
|
|
104
104
|
osVersion?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -387,6 +387,8 @@ var SubmissionError = function (_super) {
|
|
|
387
387
|
return SubmissionError;
|
|
388
388
|
}(Error);
|
|
389
389
|
|
|
390
|
+
var webSdkVersion = '0.0.75';
|
|
391
|
+
|
|
390
392
|
var SubmissionProvider = function SubmissionProvider(_a) {
|
|
391
393
|
var action = _a.action,
|
|
392
394
|
children = _a.children,
|
|
@@ -594,7 +596,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
594
596
|
front: idFrontCaptureAttempts,
|
|
595
597
|
back: idBackCaptureAttempts,
|
|
596
598
|
isRealIDCheckRequired: 'false',
|
|
597
|
-
sdkVersion:
|
|
599
|
+
sdkVersion: "WebSDK_".concat(webSdkVersion),
|
|
598
600
|
Resolution: "".concat(window.innerWidth, " x ").concat(window.innerHeight)
|
|
599
601
|
};
|
|
600
602
|
platform = getPlatform();
|
|
@@ -13946,6 +13948,7 @@ globalThis.IDmissionSDK = {
|
|
|
13946
13948
|
renderCustomerIdentification: renderCustomerIdentification,
|
|
13947
13949
|
renderSignatureKYC: renderSignatureKYC,
|
|
13948
13950
|
preloadModels: preloadModels,
|
|
13951
|
+
version: webSdkVersion,
|
|
13949
13952
|
ready: true
|
|
13950
13953
|
};
|
|
13951
13954
|
|