@tryvital/vital-node 1.3.2 → 1.3.3

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 CHANGED
@@ -18,11 +18,13 @@ export class LinkApi {
18
18
 
19
19
  public async create(
20
20
  userId: string,
21
- provider: string = null
21
+ provider: string = null,
22
+ redirect_url: string = null
22
23
  ): Promise<LinkTokenExchangeResponse> {
23
24
  const resp = await this.client.post(this.baseURL.concat('/link/token/'), {
24
25
  user_key: userId,
25
26
  provider,
27
+ redirect_url,
26
28
  });
27
29
  return resp.data;
28
30
  }
@@ -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): Promise<LinkTokenExchangeResponse>;
8
+ create(userId: string, provider?: string, redirect_url?: 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): Promise<ProviderLinkResponse>;
11
11
  getOAuthLink(linkToken: string, provider: OAuthProviders): Promise<SourceWithLinkInfo>;
@@ -42,8 +42,9 @@ var LinkApi = /** @class */ (function () {
42
42
  this.baseURL = baseURL;
43
43
  this.client = axios;
44
44
  }
45
- LinkApi.prototype.create = function (userId, provider) {
45
+ LinkApi.prototype.create = function (userId, provider, redirect_url) {
46
46
  if (provider === void 0) { provider = null; }
47
+ if (redirect_url === void 0) { redirect_url = null; }
47
48
  return __awaiter(this, void 0, void 0, function () {
48
49
  var resp;
49
50
  return __generator(this, function (_a) {
@@ -51,6 +52,7 @@ var LinkApi = /** @class */ (function () {
51
52
  case 0: return [4 /*yield*/, this.client.post(this.baseURL.concat('/link/token/'), {
52
53
  user_key: userId,
53
54
  provider: provider,
55
+ redirect_url: redirect_url,
54
56
  })];
55
57
  case 1:
56
58
  resp = _a.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-node",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Node client for Vital",
5
5
  "author": "maitham",
6
6
  "keywords": [