@finverse/sdk-typescript 0.0.29 → 0.0.32
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 +32 -1
- 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
|
*
|
|
@@ -2094,7 +2100,13 @@ export interface PaymentDetails {
|
|
|
2094
2100
|
*/
|
|
2095
2101
|
export interface PaymentInstruction {
|
|
2096
2102
|
/**
|
|
2097
|
-
*
|
|
2103
|
+
* An id of the this payment
|
|
2104
|
+
* @type {string}
|
|
2105
|
+
* @memberof PaymentInstruction
|
|
2106
|
+
*/
|
|
2107
|
+
payment_instruction_id?: string;
|
|
2108
|
+
/**
|
|
2109
|
+
* An id of the user of this payment, need to equal to userId when creating link
|
|
2098
2110
|
* @type {string}
|
|
2099
2111
|
* @memberof PaymentInstruction
|
|
2100
2112
|
*/
|
|
@@ -2311,6 +2323,25 @@ export interface RedirectUriResponse {
|
|
|
2311
2323
|
*/
|
|
2312
2324
|
redirect_uri?: string;
|
|
2313
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
|
+
}
|
|
2314
2345
|
/**
|
|
2315
2346
|
*
|
|
2316
2347
|
* @export
|