File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export default function Home() {
2828 setApp ( app )
2929 pd . connectAccount ( {
3030 app,
31+ oauthAppId,
3132 token,
3233 onSuccess : ( { id : authProvisionId } ) => {
3334 setAuthProvisionId ( authProvisionId as string )
Original file line number Diff line number Diff line change 11{
22 "name" : " @pipedream/sdk" ,
3- "version" : " 0.0.8 " ,
3+ "version" : " 0.0.9 " ,
44 "description" : " Pipedream SDK" ,
55 "type" : " module" ,
66 "main" : " dist/server/index.js" ,
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ type CreateBrowserClientOpts = {
2424 */
2525type AppId = string ;
2626
27+ /**
28+ * A unique identifier for an oauth app.
29+ */
30+ type OauthAppId = string ;
31+
2732/**
2833 * Object representing an app to start connecting with.
2934 */
@@ -63,6 +68,10 @@ type StartConnectOpts = {
6368 */
6469 app : AppId | StartConnectApp ;
6570
71+ /**
72+ * The ID of the OAuth Client to connect.
73+ */
74+ oauthAppId : OauthAppId ;
6675 /**
6776 * Callback function to be called upon successful connection.
6877 *
@@ -218,6 +227,11 @@ class BrowserClient {
218227 } else {
219228 throw new ConnectError ( "Object app not yet supported" ) ;
220229 }
230+ if ( typeof opts . oauthAppId === "string" ) {
231+ qp . set ( "oauthAppId" , opts . oauthAppId ) ;
232+ } else {
233+ throw new ConnectError ( "Object app not yet supported" ) ;
234+ }
221235
222236 const iframe = document . createElement ( "iframe" ) ;
223237 iframe . id = `pipedream-connect-iframe-${ this . iframeId ++ } ` ;
You can’t perform that action at this time.
0 commit comments