@frankieone/one-sdk 1.7.14-rc.4 → 1.7.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.
Files changed (148) hide show
  1. package/README.md +3 -2
  2. package/dist/commit.txt +1 -1
  3. package/dist/esm/modules/biometrics/vendors/Onfido/index.d.ts +6 -3
  4. package/dist/esm/modules/biometrics/vendors/Onfido/index.d.ts.map +1 -1
  5. package/dist/esm/modules/biometrics/vendors/Onfido/index.js +102 -8
  6. package/dist/esm/modules/biometrics/vendors/Onfido/index.js.map +1 -1
  7. package/dist/esm/modules/common/shared/models/F2/Date.d.ts.map +1 -1
  8. package/dist/esm/modules/common/shared/models/F2/Date.js.map +1 -1
  9. package/dist/esm/modules/common/vendors/onfido/index.d.ts +2 -8
  10. package/dist/esm/modules/common/vendors/onfido/index.d.ts.map +1 -1
  11. package/dist/esm/modules/common/vendors/onfido/index.js +17 -68
  12. package/dist/esm/modules/common/vendors/onfido/index.js.map +1 -1
  13. package/dist/esm/modules/common/vendors/onfido/onfido.types.d.ts +2 -19
  14. package/dist/esm/modules/common/vendors/onfido/onfido.types.d.ts.map +1 -1
  15. package/dist/esm/modules/common/vendors/onfido/onfido.types.js.map +1 -1
  16. package/dist/esm/modules/features.config.d.ts +0 -1
  17. package/dist/esm/modules/features.config.d.ts.map +1 -1
  18. package/dist/esm/modules/features.config.js +0 -1
  19. package/dist/esm/modules/features.config.js.map +1 -1
  20. package/dist/esm/modules/form/vendors/react/features/PersonalDetails/personalDetails.config.d.ts +24 -24
  21. package/dist/esm/modules/form/vendors/react/features/Result/CreditHeaderFailureNote.d.ts +3 -0
  22. package/dist/esm/modules/form/vendors/react/features/Result/CreditHeaderFailureNote.d.ts.map +1 -0
  23. package/dist/esm/modules/form/vendors/react/features/Result/{CreditHeaderIssueNote.js → CreditHeaderFailureNote.js} +6 -7
  24. package/dist/esm/modules/form/vendors/react/features/Result/CreditHeaderFailureNote.js.map +1 -0
  25. package/dist/esm/modules/form/vendors/react/features/Result/Result.d.ts.map +1 -1
  26. package/dist/esm/modules/form/vendors/react/features/Result/Result.js +2 -2
  27. package/dist/esm/modules/form/vendors/react/features/Result/Result.js.map +1 -1
  28. package/dist/esm/modules/form/vendors/react/features/Review/fields/drivers-licence.config.d.ts.map +1 -1
  29. package/dist/esm/modules/form/vendors/react/features/Review/fields/drivers-licence.config.js +1 -5
  30. package/dist/esm/modules/form/vendors/react/features/Review/fields/drivers-licence.config.js.map +1 -1
  31. package/dist/esm/modules/form/vendors/react/features/Review/review.const.d.ts.map +1 -1
  32. package/dist/esm/modules/form/vendors/react/features/Review/review.const.js +0 -3
  33. package/dist/esm/modules/form/vendors/react/features/Review/review.const.js.map +1 -1
  34. package/dist/esm/modules/form/vendors/react/features/ReviewDocument/ReviewDocument.d.ts.map +1 -1
  35. package/dist/esm/modules/form/vendors/react/features/ReviewDocument/ReviewDocument.js +1 -2
  36. package/dist/esm/modules/form/vendors/react/features/ReviewDocument/ReviewDocument.js.map +1 -1
  37. package/dist/esm/modules/idv/definition.types.d.ts +2 -3
  38. package/dist/esm/modules/idv/definition.types.d.ts.map +1 -1
  39. package/dist/esm/modules/idv/index.d.ts.map +1 -1
  40. package/dist/esm/modules/idv/index.js +0 -2
  41. package/dist/esm/modules/idv/index.js.map +1 -1
  42. package/dist/esm/modules/idv/vendors/Incode/index.d.ts +1 -1
  43. package/dist/esm/modules/idv/vendors/Mastercard/index.d.ts +1 -1
  44. package/dist/esm/modules/idv/vendors/OcrLabs/index.d.ts +1 -1
  45. package/dist/esm/modules/idv/vendors/Onfido/index.d.ts +1 -1
  46. package/dist/esm/modules/idv/vendors/Onfido/index.d.ts.map +1 -1
  47. package/dist/esm/modules/idv/vendors/Onfido/index.js +1 -6
  48. package/dist/esm/modules/idv/vendors/Onfido/index.js.map +1 -1
  49. package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.d.ts +1 -1
  50. package/dist/esm/modules/index.d.ts.map +1 -1
  51. package/dist/esm/modules/index.js.map +1 -1
  52. package/dist/esm/modules/individual/F2/index.d.ts.map +1 -1
  53. package/dist/esm/modules/individual/F2/index.js +4 -32
  54. package/dist/esm/modules/individual/F2/index.js.map +1 -1
  55. package/dist/esm/modules/individual/actions/documents.d.ts +0 -5
  56. package/dist/esm/modules/individual/actions/documents.d.ts.map +1 -1
  57. package/dist/esm/modules/individual/actions/documents.js +0 -15
  58. package/dist/esm/modules/individual/actions/documents.js.map +1 -1
  59. package/dist/esm/modules/individual/definition.d.ts +0 -2
  60. package/dist/esm/modules/individual/definition.d.ts.map +1 -1
  61. package/dist/esm/modules/individual/index.d.ts.map +1 -1
  62. package/dist/esm/modules/individual/index.js +6 -11
  63. package/dist/esm/modules/individual/index.js.map +1 -1
  64. package/dist/esm/modules/meta.json +1 -1
  65. package/dist/esm/modules/ocr/definition.d.ts +1 -1
  66. package/dist/esm/modules/ocr/definition.d.ts.map +1 -1
  67. package/dist/esm/modules/ocr/vendors/Onfido/index.d.ts +4 -2
  68. package/dist/esm/modules/ocr/vendors/Onfido/index.d.ts.map +1 -1
  69. package/dist/esm/modules/ocr/vendors/Onfido/index.js +145 -9
  70. package/dist/esm/modules/ocr/vendors/Onfido/index.js.map +1 -1
  71. package/dist/esm/modules/ocr/vendors/dummy-ocr/index.d.ts.map +1 -1
  72. package/dist/esm/modules/ocr/vendors/dummy-ocr/index.js +4 -16
  73. package/dist/esm/modules/ocr/vendors/dummy-ocr/index.js.map +1 -1
  74. package/package.json +4 -10
  75. package/dist/cli/cli.js +0 -130
  76. package/dist/cli/darwin-amd64/onesdk-cli +0 -0
  77. package/dist/cli/darwin-arm64/onesdk-cli +0 -0
  78. package/dist/cli/linux-amd64/onesdk-cli +0 -0
  79. package/dist/cli/linux-arm64/onesdk-cli +0 -0
  80. package/dist/cli/templateGenerator.js +0 -43
  81. package/dist/cli/windows-amd64/onesdk-cli.exe +0 -0
  82. package/dist/esm/modules/biometrics/vendors/Onfido/onfido.init.d.ts +0 -4
  83. package/dist/esm/modules/biometrics/vendors/Onfido/onfido.init.d.ts.map +0 -1
  84. package/dist/esm/modules/biometrics/vendors/Onfido/onfido.init.js +0 -73
  85. package/dist/esm/modules/biometrics/vendors/Onfido/onfido.init.js.map +0 -1
  86. package/dist/esm/modules/biometrics/vendors/Onfido/onfidoLegacy.init.d.ts +0 -5
  87. package/dist/esm/modules/biometrics/vendors/Onfido/onfidoLegacy.init.d.ts.map +0 -1
  88. package/dist/esm/modules/biometrics/vendors/Onfido/onfidoLegacy.init.js +0 -106
  89. package/dist/esm/modules/biometrics/vendors/Onfido/onfidoLegacy.init.js.map +0 -1
  90. package/dist/esm/modules/biometrics/vendors/Onfido/shared.d.ts +0 -22
  91. package/dist/esm/modules/biometrics/vendors/Onfido/shared.d.ts.map +0 -1
  92. package/dist/esm/modules/biometrics/vendors/Onfido/shared.js +0 -45
  93. package/dist/esm/modules/biometrics/vendors/Onfido/shared.js.map +0 -1
  94. package/dist/esm/modules/cli/index.d.ts +0 -8
  95. package/dist/esm/modules/cli/index.d.ts.map +0 -1
  96. package/dist/esm/modules/cli/index.js +0 -6
  97. package/dist/esm/modules/cli/index.js.map +0 -1
  98. package/dist/esm/modules/cli/template/index.d.ts +0 -7
  99. package/dist/esm/modules/cli/template/index.d.ts.map +0 -1
  100. package/dist/esm/modules/cli/template/index.js +0 -68
  101. package/dist/esm/modules/cli/template/index.js.map +0 -1
  102. package/dist/esm/modules/cli/template/templateIdv.d.ts +0 -2
  103. package/dist/esm/modules/cli/template/templateIdv.d.ts.map +0 -1
  104. package/dist/esm/modules/cli/template/templateIdv.js +0 -89
  105. package/dist/esm/modules/cli/template/templateIdv.js.map +0 -1
  106. package/dist/esm/modules/cli/template/templateIdvReview.d.ts +0 -2
  107. package/dist/esm/modules/cli/template/templateIdvReview.d.ts.map +0 -1
  108. package/dist/esm/modules/cli/template/templateIdvReview.js +0 -128
  109. package/dist/esm/modules/cli/template/templateIdvReview.js.map +0 -1
  110. package/dist/esm/modules/cli/template/templateManualKyc.d.ts +0 -2
  111. package/dist/esm/modules/cli/template/templateManualKyc.d.ts.map +0 -1
  112. package/dist/esm/modules/cli/template/templateManualKyc.js +0 -217
  113. package/dist/esm/modules/cli/template/templateManualKyc.js.map +0 -1
  114. package/dist/esm/modules/common/vendors/sumsub/index.d.ts +0 -5
  115. package/dist/esm/modules/common/vendors/sumsub/index.d.ts.map +0 -1
  116. package/dist/esm/modules/common/vendors/sumsub/index.js +0 -16
  117. package/dist/esm/modules/common/vendors/sumsub/index.js.map +0 -1
  118. package/dist/esm/modules/common/vendors/sumsub/sumsub.types.d.ts +0 -29
  119. package/dist/esm/modules/common/vendors/sumsub/sumsub.types.d.ts.map +0 -1
  120. package/dist/esm/modules/common/vendors/sumsub/sumsub.types.js +0 -3
  121. package/dist/esm/modules/common/vendors/sumsub/sumsub.types.js.map +0 -1
  122. package/dist/esm/modules/form/vendors/react/features/Result/CreditHeaderIssueNote.d.ts +0 -5
  123. package/dist/esm/modules/form/vendors/react/features/Result/CreditHeaderIssueNote.d.ts.map +0 -1
  124. package/dist/esm/modules/form/vendors/react/features/Result/CreditHeaderIssueNote.js.map +0 -1
  125. package/dist/esm/modules/frankie-client/clients/DocumentClient.d.ts +0 -5
  126. package/dist/esm/modules/frankie-client/clients/DocumentClient.d.ts.map +0 -1
  127. package/dist/esm/modules/frankie-client/clients/DocumentClient.js +0 -18
  128. package/dist/esm/modules/frankie-client/clients/DocumentClient.js.map +0 -1
  129. package/dist/esm/modules/frankie-client/clients/F2/DocumentClientF2.d.ts +0 -5
  130. package/dist/esm/modules/frankie-client/clients/F2/DocumentClientF2.d.ts.map +0 -1
  131. package/dist/esm/modules/frankie-client/clients/F2/DocumentClientF2.js +0 -18
  132. package/dist/esm/modules/frankie-client/clients/F2/DocumentClientF2.js.map +0 -1
  133. package/dist/esm/modules/idv/vendors/Sumsub/index.d.ts +0 -23
  134. package/dist/esm/modules/idv/vendors/Sumsub/index.d.ts.map +0 -1
  135. package/dist/esm/modules/idv/vendors/Sumsub/index.js +0 -125
  136. package/dist/esm/modules/idv/vendors/Sumsub/index.js.map +0 -1
  137. package/dist/esm/modules/ocr/vendors/Onfido/onfido.init.d.ts +0 -6
  138. package/dist/esm/modules/ocr/vendors/Onfido/onfido.init.d.ts.map +0 -1
  139. package/dist/esm/modules/ocr/vendors/Onfido/onfido.init.js +0 -73
  140. package/dist/esm/modules/ocr/vendors/Onfido/onfido.init.js.map +0 -1
  141. package/dist/esm/modules/ocr/vendors/Onfido/onfidoLegacy.init.d.ts +0 -7
  142. package/dist/esm/modules/ocr/vendors/Onfido/onfidoLegacy.init.d.ts.map +0 -1
  143. package/dist/esm/modules/ocr/vendors/Onfido/onfidoLegacy.init.js +0 -112
  144. package/dist/esm/modules/ocr/vendors/Onfido/onfidoLegacy.init.js.map +0 -1
  145. package/dist/esm/modules/ocr/vendors/Onfido/shared.d.ts +0 -10
  146. package/dist/esm/modules/ocr/vendors/Onfido/shared.d.ts.map +0 -1
  147. package/dist/esm/modules/ocr/vendors/Onfido/shared.js +0 -81
  148. package/dist/esm/modules/ocr/vendors/Onfido/shared.js.map +0 -1
@@ -1,68 +0,0 @@
1
- import { templateIdv } from './templateIdv.js';
2
- import { templateIdvReview } from './templateIdvReview.js';
3
- import { templateManualKyc } from './templateManualKyc.js';
4
- const backendURL = {
5
- dev: "https://backend.latest.frankiefinancial.io",
6
- qa: "https://backend.qa.frankiefinancial.io",
7
- uat: "https://backend.kycaml.uat.frankiefinancial.io",
8
- prod: "https://backend.kycaml.frankiefinancial.io",
9
- };
10
- const js = String.raw;
11
- const createRequestTokenFunction = ({ env, cid, ccid, apiKey }) => js `
12
- // Function to get an authentication token from the FrankieOne API
13
- // This token is required to initialize OneSDK
14
- async function getToken() {
15
- // WARNING: This is for testing purposes only
16
- // In production, token generation should happen server-side for security
17
-
18
- // Replace these placeholder values with your actual credentials
19
- const customerId = '${cid}';
20
- // Optional: leave empty if not applicable (for multi-tenant setups)
21
- const customerChildId = '${ccid}';
22
- const apiKey = '${apiKey}';
23
-
24
- // Create authentication key by base64 encoding the credentials
25
- const authKey = btoa(
26
- [customerId, customerChildId, apiKey].filter(Boolean).join(':'),
27
- );
28
-
29
- // Replace this with your own logic to generate a unique customer reference
30
- const customerReference = Math.random().toString(36).substring(2);
31
-
32
- // Request a machine session token from FrankieOne
33
- const tokenResponse = await fetch(
34
- '${backendURL[env]}/auth/v2/machine-session',
35
- {
36
- method: 'POST',
37
- headers: {
38
- authorization: 'machine ' + authKey,
39
- 'Content-Type': 'application/json',
40
- },
41
- body: JSON.stringify({
42
- permissions: {
43
- preset: 'one-sdk',
44
- reference: customerReference,
45
- },
46
- }),
47
- },
48
- );
49
-
50
- return await tokenResponse.json();
51
- }`;
52
- export default function createHTML(flowId) {
53
- return function ({ env, cid, ccid, apiKey }) {
54
- const getTokenImpl = createRequestTokenFunction({ env, cid, ccid, apiKey });
55
- switch (flowId) {
56
- case 'idv':
57
- return templateIdv(getTokenImpl);
58
- case 'idv_review':
59
- return templateIdvReview(getTokenImpl);
60
- case 'manual_kyc':
61
- return templateManualKyc(getTokenImpl);
62
- default:
63
- return 'Unknown flow ID';
64
- }
65
- };
66
- }
67
- ;
68
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../modules/cli/template/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,UAAU,GAAG;IACjB,GAAG,EAAE,4CAA4C;IACjD,EAAE,EAAE,wCAAwC;IAC5C,GAAG,EAAE,gDAAgD;IACrD,IAAI,EAAE,4CAA4C;CACnD,CAAC;AAEF,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC;AAEtB,MAAM,0BAA0B,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,CAAA;;;;;;;;4BAQzC,GAAG;;iCAEE,IAAI;wBACb,MAAM;;;;;;;;;;;;WAYnB,UAAU,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;MAiBpB,CAAC;AAEP,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM;IACvC,OAAO,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE;QACzC,MAAM,YAAY,GAAG,0BAA0B,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAE5E,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,KAAK;gBACR,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC;YAEnC,KAAK,YAAY;gBACf,OAAO,iBAAiB,CAAC,YAAY,CAAC,CAAC;YAEzC,KAAK,YAAY;gBACf,OAAO,iBAAiB,CAAC,YAAY,CAAC,CAAC;YAEzC;gBACE,OAAO,iBAAiB,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAAA,CAAC"}
@@ -1,2 +0,0 @@
1
- export function templateIdv(getTokenImpl: any): string;
2
- //# sourceMappingURL=templateIdv.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templateIdv.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdv.js"],"names":[],"mappings":"AAEO,uDAsFC"}
@@ -1,89 +0,0 @@
1
- const html = String.raw;
2
- export const templateIdv = (getTokenImpl) => html `<!-- Generated by OneSDK CLI -->
3
- <!-- More information: https://docs.frankieone.com/v1.14.1/docs/about-onesdk -->
4
-
5
- <!DOCTYPE html>
6
- <html lang="en">
7
- <head>
8
- <!-- UTF-8 encoding ensures proper display of special characters in the UI -->
9
- <meta charset="utf-8" />
10
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
- <title>OneSDK - IDV</title>
12
-
13
- <!-- Load the OneSDK library from FrankieOne CDN -->
14
- <!-- You can change the version number in the URL to use a different version -->
15
- <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
16
-
17
- <script>
18
- ${getTokenImpl}
19
-
20
- // Main function to initialize and start OneSDK
21
- async function startOneSdk() {
22
- const sessionToken = await getToken();
23
-
24
- // Initialize OneSDK with configuration
25
- const oneSdk = await OneSdk({
26
- session: {
27
- token: sessionToken,
28
- },
29
- mode: 'production',
30
- recipe: {
31
- form: {
32
- provider: {
33
- name: 'react',
34
- // UNCOMMENT AND ADD YOUR KEY to use Google Places address autocomplete
35
- // googleApiKey: "<GOOGLE_API_KEY>",
36
- },
37
- },
38
- },
39
- });
40
-
41
- // Create an IDV (Identity Verification) flow instance
42
- const idv = oneSdk.flow('idv');
43
-
44
- // Mount the IDV flow to the container element
45
- idv.mount('#idv-el');
46
-
47
- // Handle loading states during verification
48
- idv.on('loading', () => {
49
- console.log('loading');
50
- });
51
-
52
- // Handle verification results
53
- idv.on('results', async ({ checkStatus, document, entityId }) => {
54
- if (checkStatus) {
55
- console.log('results succesful');
56
- } else {
57
- console.log('no data returned');
58
- }
59
- });
60
-
61
- // Handle errors during verification
62
- idv.on('error', ({ message, payload }) => {
63
- console.log('received error');
64
- console.log(message, payload);
65
- });
66
-
67
- // Handle completion of document detection/capture
68
- idv.on('detection_complete', (message) => {
69
- console.log('capture finished');
70
- console.log(message);
71
- });
72
-
73
- // Log all OneSDK events to console for debugging
74
- idv.on('*', (message) => {
75
- console.log(message);
76
- });
77
- }
78
- </script>
79
- </head>
80
-
81
- <body style="background-color: white" onload="startOneSdk()">
82
- <!-- Container element where OneSDK will mount its UI components -->
83
- <div
84
- id="idv-el"
85
- style="top: 0; left: 0; width: 100%; height: 100%; display: block"
86
- ></div>
87
- </body>
88
- </html>`;
89
- //# sourceMappingURL=templateIdv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templateIdv.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdv.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;MAgB3C,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsEV,CAAC"}
@@ -1,2 +0,0 @@
1
- export function templateIdvReview(getTokenImpl: any): string;
2
- //# sourceMappingURL=templateIdvReview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templateIdvReview.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdvReview.js"],"names":[],"mappings":"AAEO,6DA6HC"}
@@ -1,128 +0,0 @@
1
- const html = String.raw;
2
- export const templateIdvReview = (getTokenImpl) => html `<!-- Generated by OneSDK CLI -->
3
- <!-- More information: https://docs.frankieone.com/v1.14.1/docs/about-onesdk -->
4
-
5
- <!DOCTYPE html>
6
- <html lang="en">
7
- <head>
8
- <!-- UTF-8 encoding ensures proper display of special characters in the UI -->
9
- <meta charset="utf-8" />
10
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
- <title>OneSDK - IDV+Review</title>
12
-
13
- <!-- Load the OneSDK library from FrankieOne CDN -->
14
- <!-- You can change the version number in the URL to use a different version -->
15
- <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
16
-
17
- <script>
18
- ${getTokenImpl}
19
-
20
- // Main function to initialize and start OneSDK
21
- async function startOneSdk() {
22
- const sessionToken = await getToken();
23
-
24
- // Initialize OneSDK with configuration
25
- const oneSdk = await OneSdk({
26
- session: {
27
- token: sessionToken,
28
- },
29
- mode: 'production',
30
- recipe: {
31
- form: {
32
- provider: {
33
- name: 'react',
34
- // UNCOMMENT AND ADD YOUR KEY to use Google Places address autocomplete
35
- // googleApiKey: "<GOOGLE_API_KEY>",
36
- },
37
- },
38
- },
39
- });
40
-
41
- // Create an IDV flow instance for identity verification
42
- const idv = oneSdk.flow('idv');
43
-
44
- // Create loading screens to show during different stages
45
- const loading1 = oneSdk.component('form', {
46
- name: 'LOADING',
47
- title: { label: 'Loading...' },
48
- descriptions: [{ label: '' }],
49
- });
50
-
51
- const loading2 = oneSdk.component('form', {
52
- name: 'LOADING',
53
- title: { label: 'Processing results...' },
54
- descriptions: [
55
- {
56
- label:
57
- "Hold tight, this can take up to 30 seconds. Please do not refresh this page or click the 'back' button on your browser.",
58
- },
59
- ],
60
- });
61
-
62
- // Create review component for OCR (Optical Character Recognition) review
63
- const review = oneSdk.component('form', {
64
- name: 'REVIEW',
65
- type: 'ocr',
66
- });
67
-
68
- // Mount the IDV flow to the container element
69
- idv.mount('#idv-el');
70
-
71
- // Handle loading states
72
- let before = true;
73
- idv.on('loading', (display) => {
74
- if (display) {
75
- if (before) {
76
- loading1.mount('#loading1');
77
- }
78
- } else {
79
- if (before) {
80
- loading1.unmount();
81
- }
82
- before = false;
83
- }
84
- console.log(before);
85
- console.log(display);
86
- });
87
-
88
- // Handle verification results
89
- idv.on('results', async ({ checkStatus, document, entityId }) => {
90
- if (checkStatus) {
91
- console.log('results succesful');
92
- loading2.unmount();
93
- review.mount('#idv-el');
94
- } else {
95
- console.log('no data returned');
96
- }
97
- });
98
-
99
- // Handle errors during verification
100
- idv.on('error', ({ message, payload }) => {
101
- console.log('received error');
102
- console.log(message, payload);
103
- });
104
-
105
- // Handle completion of document detection/capture
106
- idv.on('detection_complete', (message) => {
107
- console.log('capture finished');
108
- console.log(message);
109
- loading2.mount('#loading2');
110
- });
111
-
112
- // Log all events for debugging
113
- idv.on('*', (message) => {
114
- console.log(message);
115
- });
116
- }
117
- </script>
118
- </head>
119
-
120
- <body style="background-color: white" onload="startOneSdk()">
121
- <!-- Container element where OneSDK will mount its UI components -->
122
- <div
123
- id="idv-el"
124
- style="top: 0; left: 0; width: 100%; height: 100%; display: block"
125
- ></div>
126
- </body>
127
- </html>`;
128
- //# sourceMappingURL=templateIdvReview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templateIdvReview.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdvReview.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;MAgBjD,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6GV,CAAC"}
@@ -1,2 +0,0 @@
1
- export function templateManualKyc(getTokenImpl: any): string;
2
- //# sourceMappingURL=templateManualKyc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templateManualKyc.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateManualKyc.js"],"names":[],"mappings":"AAEO,6DAsNC"}
@@ -1,217 +0,0 @@
1
- const html = String.raw;
2
- export const templateManualKyc = (getTokenImpl) => html `<!-- Generated by OneSDK CLI
3
- This is a sample HTML template for integrating FrankieOne's OneSDK * It
4
- implements a complete KYC (Know Your Customer) flow with multiple steps: *
5
- Welcome -> Consent -> Personal Details -> Document Upload -> Review -> Result
6
- -->
7
-
8
- <!DOCTYPE html>
9
- <html lang="en">
10
- <head>
11
- <!-- UTF-8 encoding ensures proper display of international characters -->
12
- <meta charset="utf-8" />
13
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
14
- <title>OneSDK - Manual KYC</title>
15
-
16
- <!-- Load the OneSDK library from FrankieOne CDN -->
17
- <!-- You can change the version number in the URL to use a different version -->
18
- <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
19
-
20
- <script>
21
- ${getTokenImpl}
22
-
23
- /**
24
- * Main function to initialize and configure OneSDK
25
- * Sets up the complete KYC flow with all necessary screens and event handlers
26
- */
27
- async function startOneSdk() {
28
- const sessionToken = await getToken();
29
-
30
- // Initialize OneSDK with basic configuration
31
- const oneSdk = await OneSdk({
32
- session: {
33
- token: sessionToken,
34
- },
35
- mode: 'production',
36
- recipe: {
37
- form: {
38
- provider: {
39
- name: 'react',
40
- // UNCOMMENT AND ADD YOUR KEY to use Google Places address autocomplete
41
- // googleApiKey: "<GOOGLE_API_KEY>",
42
- },
43
- },
44
- },
45
- });
46
-
47
- // Enable debug logging of all OneSDK events
48
- oneSdkInstance.on('*', console.log);
49
-
50
- // Get the container where OneSDK UI will be mounted
51
- const appContainer = document.querySelector('#idv-el');
52
-
53
- // Create components for each step of the KYC flow
54
- // Each component is configured with specific options for its purpose
55
-
56
- // Welcome screen - Initial landing page
57
- const welcome = oneSdkInstance.component('form', {
58
- name: 'WELCOME',
59
- mode: 'individual',
60
- type: 'manual',
61
- });
62
-
63
- // Consent screen - Get user permission
64
- const consent = oneSdkInstance.component('form', {
65
- name: 'CONSENT',
66
- mode: 'individual',
67
- type: 'manual',
68
- });
69
-
70
- // Personal details form
71
- const personal = oneSdkInstance.component('form', {
72
- name: 'PERSONAL',
73
- mode: 'individual',
74
- type: 'manual',
75
- });
76
-
77
- // Document upload screen
78
- const documents = oneSdkInstance.component('form', {
79
- name: 'DOCUMENT',
80
- mode: 'individual',
81
- type: 'manual',
82
- });
83
-
84
- // Review screen - Final verification step
85
- const review = oneSdkInstance.component('form', {
86
- name: 'REVIEW',
87
- mode: 'individual',
88
- type: 'manual',
89
- verify: true,
90
- customResult: true,
91
- });
92
-
93
- // Various result screens based on verification outcome
94
- const success = oneSdkInstance.component('form', {
95
- name: 'RESULT',
96
- mode: 'individual',
97
- state: 'SUCCESS',
98
- type: 'manual',
99
- cta: {
100
- label: 'Continue',
101
- },
102
- });
103
-
104
- const failed = oneSdkInstance.component('form', {
105
- name: 'RESULT',
106
- mode: 'individual',
107
- state: 'FAIL',
108
- type: 'manual',
109
- cta: {
110
- label: 'Continue',
111
- },
112
- });
113
-
114
- const partial = oneSdkInstance.component('form', {
115
- name: 'RESULT',
116
- mode: 'individual',
117
- state: 'PARTIAL',
118
- type: 'manual',
119
- });
120
-
121
- const pending = oneSdkInstance.component('form', {
122
- name: 'RESULT',
123
- mode: 'individual',
124
- state: 'PENDING',
125
- type: 'manual',
126
- cta: {
127
- label: 'Continue',
128
- },
129
- });
130
-
131
- const retry = oneSdkInstance.component('form', {
132
- name: 'RETRY',
133
- mode: 'individual',
134
- type: 'manual',
135
- });
136
-
137
- // Set up the flow between screens using event handlers
138
- // Each handler listens for completion of current screen and shows the next
139
-
140
- welcome.on('form:welcome:ready', () => {
141
- consent.mount(appContainer);
142
- });
143
-
144
- // When consent is given, show personal details form
145
- consent.on('form:consent:ready', async () => {
146
- personal.mount(appContainer);
147
- });
148
-
149
- personal.on('form:personal:ready', async () => {
150
- documents.mount(appContainer);
151
- });
152
-
153
- // Allow navigation back to personal details
154
- documents.on('form:document:back', async () => {
155
- personal.mount(appContainer);
156
- });
157
-
158
- documents.on('form:document:ready', async () => {
159
- review.mount(appContainer);
160
- });
161
-
162
- // Handle different verification outcomes
163
- review.on('form:review:success', async () => {
164
- success.mount(appContainer);
165
- });
166
-
167
- review.on('form:review:failed', async () => {
168
- failed.mount(appContainer);
169
- });
170
-
171
- review.on('form:review:pending', () => {
172
- pending.mount(appContainer);
173
- });
174
-
175
- // Handle partial success with retry logic
176
- let retryCount = 0;
177
- review.on('form:review:partial', async () => {
178
- if (retryCount < 2) {
179
- retryCount += 1;
180
- partial.mount(appContainer);
181
- } else {
182
- failed.mount(appContainer);
183
- }
184
- });
185
-
186
- // Log final verification outcomes
187
- pending.on('form:result:pending', async () => {
188
- console.log('form result pending');
189
- });
190
-
191
- success.on('form:result:success', async () => {
192
- console.log('form result success');
193
- });
194
-
195
- failed.on('form:result:failed', async () => {
196
- console.log('form result failed');
197
- });
198
-
199
- partial.on('form:result:partial', async () => {
200
- retry.mount(appContainer);
201
- });
202
-
203
- // Start the flow by mounting the welcome screen
204
- welcome.mount(appContainer);
205
- }
206
- </script>
207
- </head>
208
-
209
- <body style="background-color: white" onload="startOneSdk()">
210
- <!-- Container where OneSDK will render its UI -->
211
- <div
212
- id="idv-el"
213
- style="top: 0; left: 0; width: 100%; height: 100%; display: block"
214
- ></div>
215
- </body>
216
- </html>`;
217
- //# sourceMappingURL=templateManualKyc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templateManualKyc.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateManualKyc.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;MAmBjD,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAmMV,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { SumsubSDKInstance } from './sumsub.types';
2
- export declare const install: () => Promise<{
3
- snsWebSdk: SumsubSDKInstance;
4
- }>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../modules/common/vendors/sumsub/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,eAAO,MAAM,OAAO,QAAa,OAAO,CAAC;IAAE,SAAS,EAAE,iBAAiB,CAAA;CAAE,CAQxE,CAAC"}
@@ -1,16 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { loadAsyncAsset } from '../../modules/loadAsyncAsset.js';
11
- export const install = () => __awaiter(void 0, void 0, void 0, function* () {
12
- yield loadAsyncAsset('https://static.sumsub.com/idensic/static/sns-websdk-builder.js');
13
- const snsWebSdk = window.snsWebSdk;
14
- return { snsWebSdk };
15
- });
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../modules/common/vendors/sumsub/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAIvE,MAAM,CAAC,MAAM,OAAO,GAAG,GAAoD,EAAE;IAC3E,MAAM,cAAc,CAClB,gEAAgE,CACjE,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAEnC,OAAO,EAAE,SAAS,EAAE,CAAC;AACvB,CAAC,CAAA,CAAC"}
@@ -1,29 +0,0 @@
1
- declare global {
2
- interface Window {
3
- snsWebSdk: SumsubSDKInstance;
4
- }
5
- }
6
- export type SumsubEventType = 'idCheck.onStepCompleted' | 'idCheck.onError';
7
- export type SumsubMessageType = 'idCheck.onReady' | 'idCheck.onInitialized' | 'idCheck.onApplicantStatusChanged';
8
- export type SumsubSDKInstance = {
9
- init: (accessToken: string, refetchTokenCallback: () => Promise<string>) => SumsubSDKInstance;
10
- withConf: (opt: SumsubInterface['withConf']) => SumsubSDKInstance;
11
- withOptions: (opt: SumsubInterface['withOptions']) => SumsubSDKInstance;
12
- on: (eventType: SumsubEventType, callback: (payload?: unknown) => void) => SumsubSDKInstance;
13
- onMessage: (callback: (type: SumsubMessageType, payload: Record<string, unknown>) => void) => SumsubSDKInstance;
14
- build: () => SumsubSDKInstance;
15
- launch: (element: HTMLElement) => void;
16
- };
17
- export type SumsubInterface = {
18
- withConf: {
19
- theme: 'dark' | 'light';
20
- lang?: string;
21
- email?: string;
22
- phone?: string;
23
- };
24
- withOptions: {
25
- addViewportTag: boolean;
26
- adaptIframeHeight: boolean;
27
- };
28
- };
29
- //# sourceMappingURL=sumsub.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sumsub.types.d.ts","sourceRoot":"","sources":["../../../../../../modules/common/vendors/sumsub/sumsub.types.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,EAAE,iBAAiB,CAAC;KAC9B;CACF;AAED,MAAM,MAAM,eAAe,GAAG,yBAAyB,GAAG,iBAAiB,CAAC;AAE5E,MAAM,MAAM,iBAAiB,GACzB,iBAAiB,GACjB,uBAAuB,GACvB,kCAAkC,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,CACJ,WAAW,EAAE,MAAM,EACnB,oBAAoB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,KACxC,iBAAiB,CAAC;IACvB,QAAQ,EAAE,CAAC,GAAG,EAAE,eAAe,CAAC,UAAU,CAAC,KAAK,iBAAiB,CAAC;IAClE,WAAW,EAAE,CAAC,GAAG,EAAE,eAAe,CAAC,aAAa,CAAC,KAAK,iBAAiB,CAAC;IACxE,EAAE,EAAE,CACF,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,KAClC,iBAAiB,CAAC;IACvB,SAAS,EAAE,CACT,QAAQ,EAAE,CACR,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,IAAI,KACN,iBAAiB,CAAC;IACvB,KAAK,EAAE,MAAM,iBAAiB,CAAC;IAC/B,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,EAAE;QACX,cAAc,EAAE,OAAO,CAAC;QACxB,iBAAiB,EAAE,OAAO,CAAC;KAC5B,CAAC;CACH,CAAC"}
@@ -1,3 +0,0 @@
1
- // https://docs.sumsub.com/docs/get-started-with-web-sdk
2
- export {};
3
- //# sourceMappingURL=sumsub.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sumsub.types.js","sourceRoot":"","sources":["../../../../../../modules/common/vendors/sumsub/sumsub.types.ts"],"names":[],"mappings":"AAAA,wDAAwD"}
@@ -1,5 +0,0 @@
1
- declare const CreditHeaderIssueNote: ({ isOverallCheckFailed, }: {
2
- isOverallCheckFailed: boolean;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export default CreditHeaderIssueNote;
5
- //# sourceMappingURL=CreditHeaderIssueNote.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreditHeaderIssueNote.d.ts","sourceRoot":"","sources":["../../../../../../../../modules/form/vendors/react/features/Result/CreditHeaderIssueNote.tsx"],"names":[],"mappings":"AAWA,QAAA,MAAM,qBAAqB,8BAExB;IACD,oBAAoB,EAAE,OAAO,CAAC;CAC/B,4CAqBA,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreditHeaderIssueNote.js","sourceRoot":"","sources":["../../../../../../../../modules/form/vendors/react/features/Result/CreditHeaderIssueNote.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,4BAA4B;AAC5B,MAAM,0BAA0B,GAAG,CAAC,oBAA6B,EAAE,EAAE,CAAC;IACpE,6JAA6J;IAC7J,sEAAsE,oBAAoB,CAAC,CAAC,CAAC,uEAAuE,CAAC,CAAC,CAAC,EAAE,EAAE;IAC3K,0IAA0I;IAC1I,kDAAkD;CACnD,CAAC;AACF,2BAA2B;AAE3B,MAAM,qBAAqB,GAAG,CAAC,EAC7B,oBAAoB,GAGrB,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAC,6DAA6D,aAC1E,cAAK,SAAS,EAAC,uCAAuC,4BAAkB,EACxE,cAAK,SAAS,EAAC,8BAA8B,YAC1C,0BAA0B,CAAC,oBAAoB,CAAC,CAAC,GAAG,CACnD,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,CACtB,MAAC,KAAK,CAAC,QAAQ,eACZ,KAAK,GAAG,CAAC,IAAI,CACZ,8BACE,cAAM,EACN,cAAM,IACL,CACJ,EACA,WAAW,KAPO,WAAW,CAQf,CAClB,CACF,GACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { BaseClient } from './BaseClient';
2
- export declare class DocumentClient extends BaseClient {
3
- deleteDocument(id: string): Promise<import("axios").AxiosResponse<unknown, any>>;
4
- }
5
- //# sourceMappingURL=DocumentClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocumentClient.d.ts","sourceRoot":"","sources":["../../../../../modules/frankie-client/clients/DocumentClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,qBAAa,cAAe,SAAQ,UAAU;IACtC,cAAc,CAAC,EAAE,EAAE,MAAM;CAKhC"}
@@ -1,18 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { BaseClient } from './BaseClient.js';
11
- export class DocumentClient extends BaseClient {
12
- deleteDocument(id) {
13
- return __awaiter(this, void 0, void 0, function* () {
14
- return this.frankie.delete(`/data/v1/applicants/${this.entityId}/documents/${id}`);
15
- });
16
- }
17
- }
18
- //# sourceMappingURL=DocumentClient.js.map