@finverse/sdk-typescript 0.0.30 → 0.0.31
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 +25 -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
|
@@ -1854,6 +1854,12 @@ export interface LoginIdentity {
|
|
|
1854
1854
|
* @memberof LoginIdentity
|
|
1855
1855
|
*/
|
|
1856
1856
|
last_session_id?: string;
|
|
1857
|
+
/**
|
|
1858
|
+
*
|
|
1859
|
+
* @type {RefreshData}
|
|
1860
|
+
* @memberof LoginIdentity
|
|
1861
|
+
*/
|
|
1862
|
+
refresh?: RefreshData;
|
|
1857
1863
|
}
|
|
1858
1864
|
/**
|
|
1859
1865
|
*
|
|
@@ -2317,6 +2323,25 @@ export interface RedirectUriResponse {
|
|
|
2317
2323
|
*/
|
|
2318
2324
|
redirect_uri?: string;
|
|
2319
2325
|
}
|
|
2326
|
+
/**
|
|
2327
|
+
*
|
|
2328
|
+
* @export
|
|
2329
|
+
* @interface RefreshData
|
|
2330
|
+
*/
|
|
2331
|
+
export interface RefreshData {
|
|
2332
|
+
/**
|
|
2333
|
+
*
|
|
2334
|
+
* @type {boolean}
|
|
2335
|
+
* @memberof RefreshData
|
|
2336
|
+
*/
|
|
2337
|
+
credentials_stored?: boolean;
|
|
2338
|
+
/**
|
|
2339
|
+
*
|
|
2340
|
+
* @type {boolean}
|
|
2341
|
+
* @memberof RefreshData
|
|
2342
|
+
*/
|
|
2343
|
+
refresh_allowed?: boolean;
|
|
2344
|
+
}
|
|
2320
2345
|
/**
|
|
2321
2346
|
*
|
|
2322
2347
|
* @export
|