@tryvital/vital-node 1.3.8 → 1.3.9
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/client/Link.ts +4 -2
- package/dist/client/Link.d.ts +1 -1
- package/dist/client/Link.js +3 -1
- package/package.json +2 -2
package/client/Link.ts
CHANGED
@@ -19,12 +19,14 @@ export class LinkApi {
|
|
19
19
|
public async create(
|
20
20
|
userId: string,
|
21
21
|
provider: string = null,
|
22
|
-
redirect_url: string = null
|
22
|
+
redirect_url: string = null,
|
23
|
+
providers: string[] = null
|
23
24
|
): Promise<LinkTokenExchangeResponse> {
|
24
25
|
const resp = await this.client.post(this.baseURL.concat('/link/token/'), {
|
25
26
|
user_key: userId,
|
26
27
|
provider,
|
27
28
|
redirect_url,
|
29
|
+
providers,
|
28
30
|
});
|
29
31
|
return resp.data;
|
30
32
|
}
|
@@ -50,7 +52,7 @@ export class LinkApi {
|
|
50
52
|
linkToken: string,
|
51
53
|
provider: EmailProviders,
|
52
54
|
email: string,
|
53
|
-
region?: string
|
55
|
+
region?: string
|
54
56
|
): Promise<ProviderLinkResponse> {
|
55
57
|
const payload = region ? { email, region } : { email };
|
56
58
|
const resp = await this.client.post(
|
package/dist/client/Link.d.ts
CHANGED
@@ -5,7 +5,7 @@ export declare class LinkApi {
|
|
5
5
|
baseURL: string;
|
6
6
|
client: AxiosInstance;
|
7
7
|
constructor(baseURL: string, axios: AxiosInstance);
|
8
|
-
create(userId: string, provider?: string, redirect_url?: string): Promise<LinkTokenExchangeResponse>;
|
8
|
+
create(userId: string, provider?: string, redirect_url?: string, providers?: string[]): Promise<LinkTokenExchangeResponse>;
|
9
9
|
connectProvider(linkToken: string, provider: PasswordProviders, username: string, password: string): Promise<ProviderLinkResponse>;
|
10
10
|
connectEmailProvider(linkToken: string, provider: EmailProviders, email: string, region?: string): Promise<ProviderLinkResponse>;
|
11
11
|
getOAuthLink(linkToken: string, provider: OAuthProviders): Promise<SourceWithLinkInfo>;
|
package/dist/client/Link.js
CHANGED
@@ -42,9 +42,10 @@ var LinkApi = /** @class */ (function () {
|
|
42
42
|
this.baseURL = baseURL;
|
43
43
|
this.client = axios;
|
44
44
|
}
|
45
|
-
LinkApi.prototype.create = function (userId, provider, redirect_url) {
|
45
|
+
LinkApi.prototype.create = function (userId, provider, redirect_url, providers) {
|
46
46
|
if (provider === void 0) { provider = null; }
|
47
47
|
if (redirect_url === void 0) { redirect_url = null; }
|
48
|
+
if (providers === void 0) { providers = null; }
|
48
49
|
return __awaiter(this, void 0, void 0, function () {
|
49
50
|
var resp;
|
50
51
|
return __generator(this, function (_a) {
|
@@ -53,6 +54,7 @@ var LinkApi = /** @class */ (function () {
|
|
53
54
|
user_key: userId,
|
54
55
|
provider: provider,
|
55
56
|
redirect_url: redirect_url,
|
57
|
+
providers: providers,
|
56
58
|
})];
|
57
59
|
case 1:
|
58
60
|
resp = _a.sent();
|
package/package.json
CHANGED