@frankieone/one-sdk 1.7.14-rc.2 → 1.7.14-rc.4

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 (32) hide show
  1. package/dist/cli/darwin-amd64/onesdk-cli +0 -0
  2. package/dist/cli/darwin-arm64/onesdk-cli +0 -0
  3. package/dist/cli/linux-amd64/onesdk-cli +0 -0
  4. package/dist/cli/linux-arm64/onesdk-cli +0 -0
  5. package/dist/cli/templateGenerator.js +20 -2
  6. package/dist/cli/windows-amd64/onesdk-cli.exe +0 -0
  7. package/dist/commit.txt +1 -1
  8. package/dist/esm/modules/cli/index.d.ts +7 -1
  9. package/dist/esm/modules/cli/index.d.ts.map +1 -1
  10. package/dist/esm/modules/cli/index.js +3 -3
  11. package/dist/esm/modules/cli/index.js.map +1 -1
  12. package/dist/esm/modules/cli/template/index.d.ts +6 -9
  13. package/dist/esm/modules/cli/template/index.d.ts.map +1 -1
  14. package/dist/esm/modules/cli/template/index.js +63 -5
  15. package/dist/esm/modules/cli/template/index.js.map +1 -1
  16. package/dist/esm/modules/cli/template/templateIdv.d.ts +1 -1
  17. package/dist/esm/modules/cli/template/templateIdv.d.ts.map +1 -1
  18. package/dist/esm/modules/cli/template/templateIdv.js +63 -39
  19. package/dist/esm/modules/cli/template/templateIdv.js.map +1 -1
  20. package/dist/esm/modules/cli/template/templateIdvReview.d.ts +1 -1
  21. package/dist/esm/modules/cli/template/templateIdvReview.d.ts.map +1 -1
  22. package/dist/esm/modules/cli/template/templateIdvReview.js +106 -77
  23. package/dist/esm/modules/cli/template/templateIdvReview.js.map +1 -1
  24. package/dist/esm/modules/cli/template/templateManualKyc.d.ts +1 -1
  25. package/dist/esm/modules/cli/template/templateManualKyc.d.ts.map +1 -1
  26. package/dist/esm/modules/cli/template/templateManualKyc.js +192 -149
  27. package/dist/esm/modules/cli/template/templateManualKyc.js.map +1 -1
  28. package/dist/esm/modules/idv/vendors/Sumsub/index.d.ts.map +1 -1
  29. package/dist/esm/modules/idv/vendors/Sumsub/index.js +24 -11
  30. package/dist/esm/modules/idv/vendors/Sumsub/index.js.map +1 -1
  31. package/dist/esm/modules/meta.json +1 -1
  32. package/package.json +2 -2
Binary file
Binary file
Binary file
Binary file
@@ -2,6 +2,15 @@
2
2
 
3
3
  /* eslint-disable no-undef */
4
4
  /* eslint-disable no-console */
5
+ function parseArgs(args) {
6
+ return {
7
+ flowId: args[2],
8
+ env: args[3],
9
+ cid: args[4],
10
+ ccid: args[5],
11
+ apiKey: args[6],
12
+ };
13
+ }
5
14
 
6
15
  (async () => {
7
16
  try {
@@ -17,8 +26,17 @@
17
26
  throw new Error('generateOneSdkFlow is not a function');
18
27
  }
19
28
 
20
- const flowId = process.argv[2];
21
- process.stdout.write(generateOneSdkFlow(flowId));
29
+ const { flowId, env, cid, ccid, apiKey } = parseArgs(process.argv);
30
+
31
+ process.stdout.write(
32
+ generateOneSdkFlow({
33
+ flowId,
34
+ env,
35
+ cid,
36
+ ccid,
37
+ apiKey,
38
+ }),
39
+ );
22
40
  } catch (error) {
23
41
  console.error('Error loading module:', error);
24
42
  }
package/dist/commit.txt CHANGED
@@ -1 +1 @@
1
- 96e648d8d8f331e266c0e49dcb9a8ef27a72f2ea
1
+ ff831968ea9638416b9aa21f65ac4f7bc695ccdc
@@ -1,2 +1,8 @@
1
- export default function generateOneSdkFlow(flowId: any): any;
1
+ export default function generateOneSdkFlow({ flowId, env, cid, ccid, apiKey }: {
2
+ flowId: any;
3
+ env: any;
4
+ cid: any;
5
+ ccid: any;
6
+ apiKey: any;
7
+ }): string;
2
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/cli/index.js"],"names":[],"mappings":"AAGA,6DAEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/cli/index.js"],"names":[],"mappings":"AAGA;;;;;;WAEC"}
@@ -1,6 +1,6 @@
1
- import templateObjectMap from './template/index.js';
1
+ import createHTML from './template/index.js';
2
2
  // @param {string} flowId - the id of the flow to generate, idv / idv_review / manual_kyc
3
- export default function generateOneSdkFlow(flowId) {
4
- return templateObjectMap[flowId];
3
+ export default function generateOneSdkFlow({ flowId, env, cid, ccid, apiKey }) {
4
+ return createHTML(flowId)({ env, cid, ccid, apiKey });
5
5
  }
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/cli/index.js"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,yFAAyF;AACzF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,MAAM;IAC/C,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/cli/index.js"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAE7C,yFAAyF;AACzF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE;IAC3E,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AACxD,CAAC"}
@@ -1,10 +1,7 @@
1
- export default templateObjectMap;
2
- declare namespace templateObjectMap {
3
- export { templateIdv as idv };
4
- export { templateIdvReview as idv_review };
5
- export { templateManualKyc as manual_kyc };
6
- }
7
- import { templateIdv } from './templateIdv.js';
8
- import { templateIdvReview } from './templateIdvReview.js';
9
- import { templateManualKyc } from './templateManualKyc.js';
1
+ export default function createHTML(flowId: any): ({ env, cid, ccid, apiKey }: {
2
+ env: any;
3
+ cid: any;
4
+ ccid: any;
5
+ apiKey: any;
6
+ }) => string;
10
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/index.js"],"names":[],"mappings":";;;;;;4BAA4B,kBAAkB;kCACZ,wBAAwB;kCACxB,wBAAwB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/index.js"],"names":[],"mappings":"AAuDA;;;;;aAkBC"}
@@ -1,10 +1,68 @@
1
1
  import { templateIdv } from './templateIdv.js';
2
2
  import { templateIdvReview } from './templateIdvReview.js';
3
3
  import { templateManualKyc } from './templateManualKyc.js';
4
- const templateObjectMap = {
5
- idv: templateIdv,
6
- idv_review: templateIdvReview,
7
- manual_kyc: templateManualKyc,
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",
8
9
  };
9
- export default templateObjectMap;
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
+ ;
10
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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,iBAAiB,GAAG;IACxB,GAAG,EAAE,WAAW;IAChB,UAAU,EAAE,iBAAiB;IAC7B,UAAU,EAAE,iBAAiB;CAC9B,CAAC;AACF,eAAe,iBAAiB,CAAC"}
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 +1,2 @@
1
- export const templateIdv: string;
1
+ export function templateIdv(getTokenImpl: any): string;
2
2
  //# sourceMappingURL=templateIdv.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateIdv.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdv.js"],"names":[],"mappings":"AAEA,iCA8DS"}
1
+ {"version":3,"file":"templateIdv.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdv.js"],"names":[],"mappings":"AAEO,uDAsFC"}
@@ -1,61 +1,85 @@
1
1
  const html = String.raw;
2
- export const templateIdv = html `<html lang="en">
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">
3
7
  <head>
4
- <!-- UTF-8 encoding you page is important as some text in the smart UI might not come out as you expect -->
8
+ <!-- UTF-8 encoding ensures proper display of special characters in the UI -->
5
9
  <meta charset="utf-8" />
6
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>oneSdk onboarding</title>
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 -->
8
15
  <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
9
16
 
10
17
  <script>
11
- async function startOneSdk() {
12
- const oneSdk = await OneSdk({
13
- session: {
14
- token: GENERATED_TOKEN,
15
- },
16
- mode: 'production',
17
- recipe: {
18
- form: {
19
- provider: {
20
- name: 'react',
21
- },
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>",
22
36
  },
23
37
  },
24
- });
38
+ },
39
+ });
40
+
41
+ // Create an IDV (Identity Verification) flow instance
42
+ const idv = oneSdk.flow('idv');
25
43
 
26
- const idv = oneSdk.flow('idv');
44
+ // Mount the IDV flow to the container element
45
+ idv.mount('#idv-el');
27
46
 
28
- idv.mount('#idv-el');
29
- idv.on('loading', () => {
30
- console.log('loading');
31
- });
47
+ // Handle loading states during verification
48
+ idv.on('loading', () => {
49
+ console.log('loading');
50
+ });
32
51
 
33
- idv.on('results', async ({ checkStatus, document, entityId }) => {
34
- if (checkStatus) {
35
- console.log('results succesful');
36
- } else {
37
- console.log('no data returned');
38
- }
39
- });
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
+ });
40
60
 
41
- idv.on('error', ({ message, payload }) => {
42
- console.log('received error');
43
- console.log(message, payload);
44
- });
61
+ // Handle errors during verification
62
+ idv.on('error', ({ message, payload }) => {
63
+ console.log('received error');
64
+ console.log(message, payload);
65
+ });
45
66
 
46
- idv.on('detection_complete', (message) => {
47
- console.log('capture finished');
48
- console.log(message);
49
- });
67
+ // Handle completion of document detection/capture
68
+ idv.on('detection_complete', (message) => {
69
+ console.log('capture finished');
70
+ console.log(message);
71
+ });
50
72
 
51
- idv.on('*', (message) => {
52
- console.log(message);
53
- });
54
- }
73
+ // Log all OneSDK events to console for debugging
74
+ idv.on('*', (message) => {
75
+ console.log(message);
76
+ });
77
+ }
55
78
  </script>
56
79
  </head>
57
80
 
58
81
  <body style="background-color: white" onload="startOneSdk()">
82
+ <!-- Container element where OneSDK will mount its UI components -->
59
83
  <div
60
84
  id="idv-el"
61
85
  style="top: 0; left: 0; width: 100%; height: 100%; display: block"
@@ -1 +1 @@
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,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8DvB,CAAC"}
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 +1,2 @@
1
- export const templateIdvReview: string;
1
+ export function templateIdvReview(getTokenImpl: any): string;
2
2
  //# sourceMappingURL=templateIdvReview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateIdvReview.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdvReview.js"],"names":[],"mappings":"AAEA,uCAgGS"}
1
+ {"version":3,"file":"templateIdvReview.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdvReview.js"],"names":[],"mappings":"AAEO,6DA6HC"}
@@ -1,95 +1,124 @@
1
1
  const html = String.raw;
2
- export const templateIdvReview = html `<html lang="en">
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">
3
7
  <head>
4
- <!-- UTF-8 encoding you page is important as some text in the smart UI might not come out as you expect -->
8
+ <!-- UTF-8 encoding ensures proper display of special characters in the UI -->
5
9
  <meta charset="utf-8" />
6
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>oneSdk onboarding</title>
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 -->
8
15
  <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
9
16
 
10
17
  <script>
11
- async function startOneSdk() {
12
- const oneSdk = await OneSdk({
13
- session: {
14
- token: GENERATED_TOKEN,
15
- },
16
- mode: 'production',
17
- recipe: {
18
- form: {
19
- provider: {
20
- name: 'react',
21
- },
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>",
22
36
  },
23
37
  },
24
- });
25
-
26
- const idv = oneSdk.flow('idv');
27
- const loading1 = oneSdk.component('form', {
28
- name: 'LOADING',
29
- title: { label: 'Loading...' },
30
- descriptions: [{ label: '' }],
31
- });
32
- const loading2 = oneSdk.component('form', {
33
- name: 'LOADING',
34
- title: { label: 'Processing results...' },
35
- descriptions: [
36
- {
37
- label:
38
- "Hold tight, this can take up to 30 seconds. Please do not refresh this page or click the 'back' button on your browser.",
39
- },
40
- ],
41
- });
42
- const review = oneSdk.component('form', {
43
- name: 'REVIEW',
44
- type: 'ocr',
45
- });
46
-
47
- idv.mount('#idv-el');
48
- let before = true;
49
- idv.on('loading', (display) => {
50
- if (display) {
51
- if (before) {
52
- loading1.mount('#loading1');
53
- }
54
- } else {
55
- if (before) {
56
- loading1.unmount();
57
- }
58
- before = false;
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');
59
77
  }
60
- console.log(before);
61
- console.log(display);
62
- });
63
-
64
- idv.on('results', async ({ checkStatus, document, entityId }) => {
65
- if (checkStatus) {
66
- console.log('results succesful');
67
- loading2.unmount();
68
- review.mount('#idv-el');
69
- } else {
70
- console.log('no data returned');
78
+ } else {
79
+ if (before) {
80
+ loading1.unmount();
71
81
  }
72
- });
73
-
74
- idv.on('error', ({ message, payload }) => {
75
- console.log('received error');
76
- console.log(message, payload);
77
- });
78
-
79
- idv.on('detection_complete', (message) => {
80
- console.log('capture finished');
81
- console.log(message);
82
- loading2.mount('#loading2');
83
- });
84
-
85
- idv.on('*', (message) => {
86
- console.log(message);
87
- });
88
- }
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
+ }
89
117
  </script>
90
118
  </head>
91
119
 
92
120
  <body style="background-color: white" onload="startOneSdk()">
121
+ <!-- Container element where OneSDK will mount its UI components -->
93
122
  <div
94
123
  id="idv-el"
95
124
  style="top: 0; left: 0; width: 100%; height: 100%; display: block"
@@ -1 +1 @@
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,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAgG7B,CAAC"}
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 +1,2 @@
1
- export const templateManualKyc: string;
1
+ export function templateManualKyc(getTokenImpl: any): string;
2
2
  //# sourceMappingURL=templateManualKyc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateManualKyc.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateManualKyc.js"],"names":[],"mappings":"AAEA,uCA2KS"}
1
+ {"version":3,"file":"templateManualKyc.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateManualKyc.js"],"names":[],"mappings":"AAEO,6DAsNC"}
@@ -1,170 +1,213 @@
1
1
  const html = String.raw;
2
- export const templateManualKyc = html `<html lang="en">
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">
3
10
  <head>
4
- <!-- UTF-8 encoding you page is important as some text in the smart UI might not come out as you expect -->
11
+ <!-- UTF-8 encoding ensures proper display of international characters -->
5
12
  <meta charset="utf-8" />
6
13
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>oneSdk onboarding</title>
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 -->
8
18
  <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
9
19
 
10
20
  <script>
11
- async function startOneSdk() {
12
- const oneSdkInstance = await OneSdk({
13
- session: {
14
- token: GENERATED_TOKEN,
15
- },
16
- mode: 'production',
17
- recipe: {
18
- form: {
19
- provider: {
20
- name: 'react',
21
- googleApiKey: GOOGLE_API_KEY,
22
- },
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>",
23
42
  },
24
43
  },
25
- });
26
- oneSdkInstance.on('*', console.log);
27
- const appContainer = document.querySelector('#idv-el');
28
-
29
- const welcome = oneSdkInstance.component('form', {
30
- name: 'WELCOME',
31
- mode: 'individual',
32
- type: 'manual',
33
- });
34
-
35
- const consent = oneSdkInstance.component('form', {
36
- name: 'CONSENT',
37
- mode: 'individual',
38
- type: 'manual',
39
- });
40
-
41
- const personal = oneSdkInstance.component('form', {
42
- name: 'PERSONAL',
43
- mode: 'individual',
44
- type: 'manual',
45
- });
46
-
47
- const documents = oneSdkInstance.component('form', {
48
- name: 'DOCUMENT',
49
- mode: 'individual',
50
- type: 'manual',
51
- });
52
-
53
- const review = oneSdkInstance.component('form', {
54
- name: 'REVIEW',
55
- mode: 'individual',
56
- type: 'manual',
57
- verify: true,
58
- customResult: true,
59
- });
60
-
61
- const success = oneSdkInstance.component('form', {
62
- name: 'RESULT',
63
- mode: 'individual',
64
- state: 'SUCCESS',
65
- type: 'manual',
66
- cta: {
67
- label: 'Continue',
68
- },
69
- });
70
-
71
- const failed = oneSdkInstance.component('form', {
72
- name: 'RESULT',
73
- mode: 'individual',
74
- state: 'FAIL',
75
- type: 'manual',
76
- cta: {
77
- label: 'Continue',
78
- },
79
- });
80
-
81
- const partial = oneSdkInstance.component('form', {
82
- name: 'RESULT',
83
- mode: 'individual',
84
- state: 'PARTIAL',
85
- type: 'manual',
86
- });
87
-
88
- const pending = oneSdkInstance.component('form', {
89
- name: 'RESULT',
90
- mode: 'individual',
91
- state: 'PENDING',
92
- type: 'manual',
93
- cta: {
94
- label: 'Continue',
95
- },
96
- });
97
-
98
- const retry = oneSdkInstance.component('form', {
99
- name: 'RETRY',
100
- mode: 'individual',
101
- type: 'manual',
102
- });
103
-
104
- welcome.on('form:welcome:ready', () => {
105
- consent.mount(appContainer);
106
- });
107
-
108
- consent.on('form:consent:ready', async () => {
109
- personal.mount(appContainer);
110
- });
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
+ });
111
185
 
112
- personal.on('form:personal:ready', async () => {
113
- documents.mount(appContainer);
114
- });
186
+ // Log final verification outcomes
187
+ pending.on('form:result:pending', async () => {
188
+ console.log('form result pending');
189
+ });
115
190
 
116
- documents.on('form:document:back', async () => {
117
- personal.mount(appContainer);
118
- });
191
+ success.on('form:result:success', async () => {
192
+ console.log('form result success');
193
+ });
119
194
 
120
- documents.on('form:document:ready', async () => {
121
- review.mount(appContainer);
122
- });
195
+ failed.on('form:result:failed', async () => {
196
+ console.log('form result failed');
197
+ });
123
198
 
124
- review.on('form:review:success', async () => {
125
- success.mount(appContainer);
126
- });
199
+ partial.on('form:result:partial', async () => {
200
+ retry.mount(appContainer);
201
+ });
127
202
 
128
- review.on('form:review:failed', async () => {
129
- failed.mount(appContainer);
130
- });
131
-
132
- review.on('form:review:pending', () => {
133
- pending.mount(appContainer);
134
- });
135
-
136
- let retryCount = 0;
137
- review.on('form:review:partial', async () => {
138
- if (retryCount < 2) {
139
- retryCount += 1;
140
- partial.mount(appContainer);
141
- } else {
142
- failed.mount(appContainer);
143
- }
144
- });
145
-
146
- pending.on('form:result:pending', async () => {
147
- console.log('form result pending');
148
- });
149
-
150
- success.on('form:result:success', async () => {
151
- console.log('form result success');
152
- });
153
-
154
- failed.on('form:result:failed', async () => {
155
- console.log('form result failed');
156
- });
157
-
158
- partial.on('form:result:partial', async () => {
159
- retry.mount(appContainer);
160
- });
161
-
162
- welcome.mount(appContainer);
163
- }
203
+ // Start the flow by mounting the welcome screen
204
+ welcome.mount(appContainer);
205
+ }
164
206
  </script>
165
207
  </head>
166
208
 
167
209
  <body style="background-color: white" onload="startOneSdk()">
210
+ <!-- Container where OneSDK will render its UI -->
168
211
  <div
169
212
  id="idv-el"
170
213
  style="top: 0; left: 0; width: 100%; height: 100%; display: block"
@@ -1 +1 @@
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,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA2K7B,CAAC"}
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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../modules/idv/vendors/Sumsub/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAMzD,OAAO,EAAa,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAoDhF,eAAO,MAAM,UAAU;;;;;;;;mBApDR,CAAC;;;;;;;;;;CA6Jf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../modules/idv/vendors/Sumsub/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAc,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMzD,OAAO,EAAa,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAkDhF,eAAO,MAAM,UAAU;;;;;;;;mBAlDR,CAAC;;;;;;;;;;CAsKf,CAAC"}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { OneSDKError, mkEventHub } from '../../../common/index.js';
10
+ import { mkEventHub, OneSDKError } from '../../../common/index.js';
11
11
  import { defineWrapper } from '../../../common/modules/defineModule.js';
12
12
  import { useFormToReviewResults } from '../../../common/vendors/form/useForm.js';
13
13
  import { install } from '../../../common/vendors/sumsub/index.js';
@@ -15,14 +15,14 @@ import { feat } from '../../../features.config.js';
15
15
  import { IDVClient, IDVStatus } from '../../../frankie-client/clients/IDVClient.js';
16
16
  import { createSession } from '../../../ocr/vendors/common/createSession.js';
17
17
  import { checkStatusEventMapping } from '../common/checkStatusEventMapping.js';
18
- const initProcess = (_a) => __awaiter(void 0, [_a], void 0, function* ({ eventHub, privateEventHub, idvClient, vendorParameters, entityId, }) {
18
+ const initProcess = (_a) => __awaiter(void 0, [_a], void 0, function* ({ eventHub, idvClient, vendorParameters, entityId, }) {
19
19
  try {
20
20
  const results = yield idvClient.initProcess({
21
21
  isSynchronous: true,
22
22
  vendorParameters,
23
23
  });
24
24
  checkStatusEventMapping({
25
- eventHub: privateEventHub,
25
+ eventHub,
26
26
  results,
27
27
  entityId,
28
28
  });
@@ -42,7 +42,7 @@ const removeVendorSDK = (mountElement) => {
42
42
  }
43
43
  };
44
44
  export const initialise = defineWrapper('sumsub', (shared, options) => __awaiter(void 0, void 0, void 0, function* () {
45
- var _a, _b;
45
+ var _a, _b, _c;
46
46
  const { recipe, frankieClient } = shared;
47
47
  const { mountElement, eventHub } = options;
48
48
  const idvClient = new IDVClient(frankieClient);
@@ -53,9 +53,25 @@ export const initialise = defineWrapper('sumsub', (shared, options) => __awaiter
53
53
  const { entityId, token, vendorParameters } = idvSession;
54
54
  const containsReviewScreen = feat(`modules.idv.containsReviewScreen.sumsub`);
55
55
  const recipeProvideReviewScreen = (_b = (_a = recipe.idv) === null || _a === void 0 ? void 0 : _a.provideReviewScreen) !== null && _b !== void 0 ? _b : feat('recipeDefaults.idv.provideReviewScreen');
56
- const attachForm = !containsReviewScreen || recipeProvideReviewScreen;
56
+ const attachForm = (_c = (!containsReviewScreen && recipeProvideReviewScreen)) !== null && _c !== void 0 ? _c : false;
57
57
  const privateEventHub = mkEventHub();
58
- privateEventHub.on('results', useFormToReviewResults(Object.assign(Object.assign({}, shared), { mountElement, attachForm: attachForm })));
58
+ privateEventHub.on('results', (results) => {
59
+ const levelName = vendorParameters === null || vendorParameters === void 0 ? void 0 : vendorParameters.levelName;
60
+ if (levelName === 'basic-kyc-level') {
61
+ useFormToReviewResults({
62
+ oneSdkInstance: shared.oneSdkInstance,
63
+ localEventHub: eventHub,
64
+ mountElement,
65
+ attachForm: attachForm,
66
+ })(results);
67
+ }
68
+ if (levelName === 'POA_ONLY') {
69
+ eventHub.emit('loading', false, {
70
+ message: 'Completed process successfully',
71
+ });
72
+ eventHub.emit('results', results);
73
+ }
74
+ });
59
75
  privateEventHub.on(['input_required', 'processing', 'error'], () => eventHub.emit('loading', false, {
60
76
  message: 'Completed process unsuccessfully',
61
77
  }));
@@ -87,16 +103,13 @@ export const initialise = defineWrapper('sumsub', (shared, options) => __awaiter
87
103
  eventHub.emit('ready', { domElement: mountElement });
88
104
  break;
89
105
  case 'idCheck.onApplicantStatusChanged':
90
- if ((payload === null || payload === void 0 ? void 0 : payload.reviewStatus) === 'pending') {
106
+ if ((payload === null || payload === void 0 ? void 0 : payload.reviewStatus) === 'completed') {
91
107
  eventHub.emit('detection_complete');
92
- }
93
- else if ((payload === null || payload === void 0 ? void 0 : payload.reviewStatus) === 'completed') {
94
108
  eventHub.emit('loading', true, {
95
109
  message: 'Retrieving IDV results',
96
110
  });
97
111
  yield initProcess({
98
- eventHub,
99
- privateEventHub,
112
+ eventHub: privateEventHub,
100
113
  idvClient,
101
114
  vendorParameters,
102
115
  entityId,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../modules/idv/vendors/Sumsub/index.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC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AC,CAAA,CACF;SACA,KAAK,EAAE;SACP,MAAM,CAAC,YAAY,CAAC,CAAC;AAC1B,CAAC,CAAA,CACF,CAAC"}
@@ -1 +1 @@
1
- { "version": "1.7.14-rc.2" }
1
+ { "version": "1.7.14-rc.4" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frankieone/one-sdk",
3
- "version": "1.7.14-rc.2",
3
+ "version": "1.7.14-rc.4",
4
4
  "cliVersion": "0.0.1",
5
5
  "description": "FrankieOne OneSDK",
6
6
  "keywords": [],
@@ -52,7 +52,7 @@
52
52
  "tsc-check": "tsc -p ./tsconfig.modules.json --noEmit",
53
53
  "tsc-check-all": "tsc -p ./tsconfig.json --noEmit",
54
54
  "test": "jest --clearCache && jest --detectOpenHandles --silent --expand",
55
- "test:analyze": "node --expose-gc ./node_modules/.bin/jest --runInBand --silent --coverage --logHeapUsage",
55
+ "test:analyze": "node --expose-gc ./node_modules/.bin/jest --silent --coverage --logHeapUsage",
56
56
  "watch": "webpack --watch",
57
57
  "watch:css": "npx tailwindcss -o styles/f1-style.css --watch",
58
58
  "prepare": "husky"