@finverse/sdk-typescript 0.0.30 → 0.0.33
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 +18 -20
- package/dist/api.d.ts +27 -1
- package/dist/api.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,13 +40,13 @@ const configuration = new Configuration({
|
|
|
40
40
|
accessToken: customerToken.access_token
|
|
41
41
|
});
|
|
42
42
|
const linkTokenResp = await new CustomerApi(configuration).generateLinkToken({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
client_id: clientId,
|
|
44
|
+
user_id: userId,
|
|
45
|
+
redirect_uri: redirectUri,
|
|
46
|
+
state: state,
|
|
47
|
+
response_mode: "form_post",
|
|
48
|
+
response_type: "code",
|
|
49
|
+
grant_type: "client_credentials",
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
// The linkUrl can be used to initiate Finverse Link
|
|
@@ -218,15 +218,15 @@ const configuration = new Configuration({
|
|
|
218
218
|
accessToken: customerToken.access_token
|
|
219
219
|
});
|
|
220
220
|
const linkTokenResp = await new CustomerApi(configuration).generateLinkToken({
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
221
|
+
client_id: clientId,
|
|
222
|
+
user_id: userId,
|
|
223
|
+
redirect_uri: redirectUri,
|
|
224
|
+
state: state,
|
|
225
|
+
response_mode: "form_post",
|
|
226
|
+
response_type: "code",
|
|
227
|
+
grant_type: "client_credentials",
|
|
228
|
+
payment_instruction_id: createPaymentInstructionResponse.data.payment_instruction_id,
|
|
229
|
+
products_requested: "PAYMENTS",
|
|
230
230
|
});
|
|
231
231
|
|
|
232
232
|
// The linkUrl can be used to initiate Finverse Link
|
|
@@ -259,8 +259,7 @@ Alternatively you can use webhook to receive LoginIdentity event.
|
|
|
259
259
|
```typescript
|
|
260
260
|
enum FinalStatus {
|
|
261
261
|
ERROR = 'ERROR',
|
|
262
|
-
|
|
263
|
-
DATA_RETRIEVAL_COMPLETE = 'DATA_RETRIEVAL_COMPLETE',
|
|
262
|
+
CONNECTION_COMPLETE= 'CONNECTION_COMPLETE',
|
|
264
263
|
}
|
|
265
264
|
|
|
266
265
|
const configuration = new Configuration({
|
|
@@ -275,8 +274,7 @@ for (let i = 0; i < 20; i++) {
|
|
|
275
274
|
const loginIdentityStatus = loginIdentity.data.login_identity.status;
|
|
276
275
|
if (
|
|
277
276
|
loginIdentityStatus === FinalStatus.ERROR ||
|
|
278
|
-
loginIdentityStatus === FinalStatus.
|
|
279
|
-
loginIdentityStatus === FinalStatus.DATA_RETRIEVAL_PARTIALLY_SUCCESSFUL
|
|
277
|
+
loginIdentityStatus === FinalStatus.CONNECTION_COMPLETE
|
|
280
278
|
) { break; }
|
|
281
279
|
|
|
282
280
|
await new Promise((resolve) => setTimeout(resolve, 3000));
|
package/dist/api.d.ts
CHANGED
|
@@ -1496,7 +1496,7 @@ export interface LinkTokenRequest {
|
|
|
1496
1496
|
*/
|
|
1497
1497
|
link_mode?: string;
|
|
1498
1498
|
/**
|
|
1499
|
-
* The UI mode link is intended to be used in - \"iframe\" (default), \"auto_redirect\" or \"redirect\"
|
|
1499
|
+
* The UI mode link is intended to be used in - \"iframe\" (default), \"auto_redirect\" or \"redirect\" or \"standalone\"
|
|
1500
1500
|
* @type {string}
|
|
1501
1501
|
* @memberof LinkTokenRequest
|
|
1502
1502
|
*/
|
|
@@ -1584,6 +1584,7 @@ export declare const LinkTokenRequestUiModeEnum: {
|
|
|
1584
1584
|
readonly Iframe: "iframe";
|
|
1585
1585
|
readonly Redirect: "redirect";
|
|
1586
1586
|
readonly AutoRedirect: "auto_redirect";
|
|
1587
|
+
readonly Standalone: "standalone";
|
|
1587
1588
|
};
|
|
1588
1589
|
export declare type LinkTokenRequestUiModeEnum = typeof LinkTokenRequestUiModeEnum[keyof typeof LinkTokenRequestUiModeEnum];
|
|
1589
1590
|
export declare const LinkTokenRequestAutomaticDataRefreshEnum: {
|
|
@@ -1854,6 +1855,12 @@ export interface LoginIdentity {
|
|
|
1854
1855
|
* @memberof LoginIdentity
|
|
1855
1856
|
*/
|
|
1856
1857
|
last_session_id?: string;
|
|
1858
|
+
/**
|
|
1859
|
+
*
|
|
1860
|
+
* @type {RefreshData}
|
|
1861
|
+
* @memberof LoginIdentity
|
|
1862
|
+
*/
|
|
1863
|
+
refresh?: RefreshData;
|
|
1857
1864
|
}
|
|
1858
1865
|
/**
|
|
1859
1866
|
*
|
|
@@ -2317,6 +2324,25 @@ export interface RedirectUriResponse {
|
|
|
2317
2324
|
*/
|
|
2318
2325
|
redirect_uri?: string;
|
|
2319
2326
|
}
|
|
2327
|
+
/**
|
|
2328
|
+
*
|
|
2329
|
+
* @export
|
|
2330
|
+
* @interface RefreshData
|
|
2331
|
+
*/
|
|
2332
|
+
export interface RefreshData {
|
|
2333
|
+
/**
|
|
2334
|
+
*
|
|
2335
|
+
* @type {boolean}
|
|
2336
|
+
* @memberof RefreshData
|
|
2337
|
+
*/
|
|
2338
|
+
credentials_stored: boolean;
|
|
2339
|
+
/**
|
|
2340
|
+
*
|
|
2341
|
+
* @type {boolean}
|
|
2342
|
+
* @memberof RefreshData
|
|
2343
|
+
*/
|
|
2344
|
+
refresh_allowed: boolean;
|
|
2345
|
+
}
|
|
2320
2346
|
/**
|
|
2321
2347
|
*
|
|
2322
2348
|
* @export
|
package/dist/api.js
CHANGED