Skip to content

Commit 90c41ff

Browse files
committed
Expose the external user ID in the browser client
1 parent 7d0a6ca commit 90c41ff

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/sdk",
3-
"version": "2.0.9",
3+
"version": "2.0.10",
44
"private": false,
55
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
66
"type": "commonjs",

src/browser/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
// Browser-specific imports that avoid Node.js dependencies
77
export type * from "../api/types/index.js";
8+
export * from "../index.js";
9+
810
import { ConnectTokenProvider, TokenCallback } from "../core/auth/index.js";
911
import { type Account, type App, PipedreamClient as BackendClient, PipedreamEnvironment } from "../index.js";
1012
import { PipedreamClientOpts as BackendClientOpts } from "../wrapper/Pipedream.js";
@@ -200,6 +202,10 @@ export class PipedreamClient extends BackendClient {
200202
this.iframeURL = `${this.baseURL}/_static/connect.html`;
201203
}
202204

205+
get externalUserId(): string | undefined {
206+
return (this._tokenProvider as ConnectTokenProvider).externalUserId;
207+
}
208+
203209
/**
204210
* Initiates the process of connecting an account.
205211
*

src/core/auth/ConnectTokenProvider.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export class ConnectTokenProvider implements TokenProvider {
2323
this._tokenCallback = tokenCallback;
2424
}
2525

26+
get externalUserId(): string | undefined {
27+
return this._externalUserId;
28+
}
29+
2630
public async getToken(): Promise<string> {
2731
if (this._token && this._tokenExpiresAt && this._tokenExpiresAt > new Date()) {
2832
return this._token;

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SDK_VERSION = "2.0.9";
1+
export const SDK_VERSION = "2.0.10";

0 commit comments

Comments
 (0)