idwise-react-native-sdk 5.4.5-alpha.4 → 5.4.5-alpha.6
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/index.d.ts +125 -0
- package/package.json +3 -1
- package/tsconfig.json +31 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// index.d.ts
|
|
2
|
+
|
|
3
|
+
// ===== Common Types =====
|
|
4
|
+
|
|
5
|
+
export interface IDWiseError {
|
|
6
|
+
code: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface InitializeCallback {
|
|
11
|
+
onError?: (error: IDWiseError) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IDWiseJourneyCallbacks {
|
|
15
|
+
onJourneyStarted:(journeyStartedInfo:JSON) => void;
|
|
16
|
+
onJourneyResumed:(journeyResumedInfo:JSON) => void;
|
|
17
|
+
onJourneyCompleted:(journeyCompletedInfo:JSON) => void;
|
|
18
|
+
onJourneyCancelled:(journeyCancelledInfo:JSON) => void;
|
|
19
|
+
onJourneyBlocked:(journeyBlockedInfo:JSON) => void;
|
|
20
|
+
onError:(idwiseError:IDWiseError) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface IDWiseStepCallbacks {
|
|
24
|
+
onStepCaptured:(stepCapturedInfo:JSON) => void;
|
|
25
|
+
onStepResult:(stepResultInfo:JSON) => void;
|
|
26
|
+
onStepCancelled:(stepCancelledInfo:JSON) => void;
|
|
27
|
+
onStepSkipped:(stepSkippedInfo:JSON) => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export interface JourneySummaryCallback {
|
|
32
|
+
onJourneySummary:(journeySummary:JSON) => void;
|
|
33
|
+
onError:(error:JSON) => void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
// ===== IDWise Module =====
|
|
38
|
+
export namespace IDWise {
|
|
39
|
+
function initialize(
|
|
40
|
+
clientKey: string,
|
|
41
|
+
theme:string,
|
|
42
|
+
callback: InitializeCallback
|
|
43
|
+
): void;
|
|
44
|
+
|
|
45
|
+
function isDeviceBlocked(): Promise<boolean>;
|
|
46
|
+
|
|
47
|
+
function startJourney(
|
|
48
|
+
journeyDefinitionId: string,
|
|
49
|
+
referenceNo: string,
|
|
50
|
+
locale: string,
|
|
51
|
+
applicantDetails: Map<string,string>|undefined,
|
|
52
|
+
journeyCallback: IDWiseJourneyCallbacks
|
|
53
|
+
): void;
|
|
54
|
+
|
|
55
|
+
function resumeJourney(
|
|
56
|
+
journeyDefinitionId: string,
|
|
57
|
+
journeyId: string,
|
|
58
|
+
locale: string,
|
|
59
|
+
journeyCallback: IDWiseJourneyCallbacks
|
|
60
|
+
): void;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// ===== IDWiseDynamic Module =====
|
|
64
|
+
export namespace IDWiseDynamic {
|
|
65
|
+
function initialize(
|
|
66
|
+
clientKey: string,
|
|
67
|
+
theme: Record<string, any>,
|
|
68
|
+
callback: InitializeCallback
|
|
69
|
+
): void;
|
|
70
|
+
|
|
71
|
+
function isDeviceBlocked(): Promise<boolean>;
|
|
72
|
+
|
|
73
|
+
function startJourney(
|
|
74
|
+
journeyDefinitionId: string,
|
|
75
|
+
referenceNo: string,
|
|
76
|
+
locale: string,
|
|
77
|
+
applicantDetails: Map<string,string>|undefined,
|
|
78
|
+
journeyCallback: IDWiseJourneyCallbacks,
|
|
79
|
+
stepCallback: IDWiseStepCallbacks
|
|
80
|
+
): void;
|
|
81
|
+
|
|
82
|
+
function resumeJourney(
|
|
83
|
+
journeyDefinitionId: string,
|
|
84
|
+
journeyId: string,
|
|
85
|
+
locale: string,
|
|
86
|
+
journeyCallback: IDWiseJourneyCallbacks,
|
|
87
|
+
stepCallback: IDWiseStepCallbacks
|
|
88
|
+
): void;
|
|
89
|
+
|
|
90
|
+
function startStep(stepId: string): void;
|
|
91
|
+
|
|
92
|
+
function skipStep(stepId: string): void;
|
|
93
|
+
|
|
94
|
+
function getJourneySummary(callback: JourneySummaryCallback): void;
|
|
95
|
+
|
|
96
|
+
function finishJourney(): void;
|
|
97
|
+
|
|
98
|
+
function unloadSDK(): void;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// ===== IDWiseTheme =====
|
|
102
|
+
declare const IDWiseTheme: {
|
|
103
|
+
LIGHT: 'LIGHT';
|
|
104
|
+
DARK: 'DARK';
|
|
105
|
+
SYSTEM_DEFAULT: 'SYSTEM_DEFAULT';
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
declare const ApplicantDetailsKeys: {
|
|
109
|
+
FIRST_NAME: 'first_name';
|
|
110
|
+
LAST_NAME: 'last_name';
|
|
111
|
+
ADDRESS: 'address';
|
|
112
|
+
SEX:'sex'
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export {IDWiseTheme}
|
|
116
|
+
export {ApplicantDetailsKeys}
|
|
117
|
+
// ===== Default Export =====
|
|
118
|
+
declare const IDWiseSDK: {
|
|
119
|
+
IDWise: typeof IDWise;
|
|
120
|
+
IDWiseTheme: typeof IDWiseTheme;
|
|
121
|
+
ApplicantDetailsKeys: typeof ApplicantDetailsKeys;
|
|
122
|
+
IDWiseDynamic: typeof IDWiseDynamic;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export default IDWiseSDK;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idwise-react-native-sdk",
|
|
3
|
-
"version": "5.4.5-alpha.
|
|
3
|
+
"version": "5.4.5-alpha.6",
|
|
4
4
|
"description": "IDWise React Native Bridge",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"src",
|
|
12
12
|
"lib",
|
|
13
|
+
"index.d.ts",
|
|
14
|
+
"tsconfig.json",
|
|
13
15
|
"android",
|
|
14
16
|
"ios",
|
|
15
17
|
"cpp",
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": ".",
|
|
4
|
+
"paths": {
|
|
5
|
+
"idwise-mobile-sdk": ["./src/index"]
|
|
6
|
+
},
|
|
7
|
+
"allowUnreachableCode": false,
|
|
8
|
+
"allowUnusedLabels": false,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"jsx": "react",
|
|
12
|
+
"lib": ["esnext"],
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"noFallthroughCasesInSwitch": true,
|
|
15
|
+
"noImplicitReturns": true,
|
|
16
|
+
"noImplicitUseStrict": false,
|
|
17
|
+
"noStrictGenericChecks": false,
|
|
18
|
+
"noUncheckedIndexedAccess": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"resolveJsonModule": true,
|
|
22
|
+
"skipLibCheck": true,
|
|
23
|
+
"verbatimModuleSyntax": true,
|
|
24
|
+
"allowJs": true,
|
|
25
|
+
"checkJs": true,
|
|
26
|
+
"strict": true,
|
|
27
|
+
"target": "ES6",
|
|
28
|
+
"module": "CommonJS"
|
|
29
|
+
},
|
|
30
|
+
"include": ["index.js", "index.d.ts"]
|
|
31
|
+
}
|