Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/sdk",
"version": "0.0.12",
"version": "0.0.13",
"description": "Pipedream SDK",
"type": "module",
"main": "dist/server/index.js",
Expand Down
28 changes: 28 additions & 0 deletions packages/sdk/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ export type ConnectTokenCreateOpts = {
external_user_id: string;
};

export type AppInfo = {
/**
* ID of the app. Only applies for Oauth apps.
*/
id?: string;

/**
* https://pipedream.com/docs/connect/quickstart#find-your-apps-name-slug
*/
name_slug: string;
}

/**
* Response received after requesting project info.
*/
export type ProjectInfoResponse = {
/**
* An array of apps linked to the project.
*/
apps: AppInfo[]
}

/**
* Response received after creating a connect token.
*/
Expand Down Expand Up @@ -491,4 +513,10 @@ class ServerClient {
method: "DELETE",
});
}

async getProjectInfo(): Promise<ProjectInfoResponse> {
return this._makeConnectRequest<ProjectInfoResponse>("/projects/info", {
method: "GET",
});
}
}