Skip to content

Commit 47becba

Browse files
committed
Add method to retrieve the client's access token
1 parent fde006a commit 47becba

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
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.0-rc.1",
3+
"version": "2.0.0-rc.2",
44
"private": false,
55
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
66
"type": "commonjs",

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ export class PipedreamClient {
7373
"x-pd-environment": _options?.projectEnvironment,
7474
"X-Fern-Language": "JavaScript",
7575
"X-Fern-SDK-Name": "@pipedream/sdk",
76-
"X-Fern-SDK-Version": "1.7.1",
77-
"User-Agent": "@pipedream/sdk/1.7.1",
76+
"X-Fern-SDK-Version": "2.0.0-rc.2",
77+
"User-Agent": "@pipedream/sdk/2.0.0-rc.2",
7878
"X-Fern-Runtime": core.RUNTIME.type,
7979
"X-Fern-Runtime-Version": core.RUNTIME.version,
8080
},

src/wrapper/Pipedream.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ export class Pipedream extends PipedreamClient {
6060
this._workflowDomain = workflowDomain;
6161
}
6262

63+
/**
64+
* Returns an access token that can be used to authenticate API requests
65+
*
66+
* @returns A promise that resolves to the access token string.
67+
*/
68+
public get rawAccessToken(): Promise<string> {
69+
return this._oauthTokenProvider.getToken();
70+
}
71+
6372
public get workflows(): Workflows {
6473
return (this._workflows ??= new Workflows({
6574
...this._options,

0 commit comments

Comments
 (0)