Skip to content

Commit 2d9786a

Browse files
Adding app categories arg and method to sdk
1 parent acf9687 commit 2d9786a

File tree

4 files changed

+72
-7
lines changed

4 files changed

+72
-7
lines changed

packages/sdk/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
# Changelog
44

5+
## [1.8.0] - 2025-08-13
6+
7+
### Added
8+
9+
- Added `categoryIds` parameter to `getApps` method for filtering apps by category IDs
10+
- Added `getAppCategories` method to retrieve available app categories
11+
512
## [1.7.0] - 2025-07-03
613

714
### Added

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pipedream/sdk",
33
"type": "module",
4-
"version": "1.7.0",
4+
"version": "1.8.0",
55
"description": "Pipedream SDK",
66
"main": "./dist/server.js",
77
"module": "./dist/server.js",

packages/sdk/src/shared/index.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,31 @@ export type App = AppInfo & {
126126
*/
127127
export type AppResponse = App;
128128

129+
/**
130+
* App category data returned from the API.
131+
*/
132+
export type AppCategory = {
133+
/**
134+
* The unique ID of the category.
135+
*/
136+
id: string;
137+
138+
/**
139+
* The name of the category.
140+
*/
141+
name: string;
142+
143+
/**
144+
* A description of the category.
145+
*/
146+
description: string;
147+
};
148+
149+
/**
150+
* The response received when retrieving app categories.
151+
*/
152+
export type GetAppCategoriesResponse = AppCategory[];
153+
129154
/**
130155
* A configuration option for a component's prop.
131156
*/
@@ -255,6 +280,10 @@ export type GetAppsOpts = RelationOpts & {
255280
* Filter by whether apps have triggers in the component registry.
256281
*/
257282
hasTriggers?: boolean;
283+
/**
284+
* Filter apps by category IDs (format: appcat_[a-zA-Z0-9]+).
285+
*/
286+
categoryIds?: string[];
258287
/**
259288
* The key to sort the apps by.
260289
*
@@ -1190,6 +1219,9 @@ export abstract class BaseClient {
11901219
? "1"
11911220
: "0";
11921221
}
1222+
if (opts?.categoryIds && opts.categoryIds.length > 0) {
1223+
params.category_ids = opts.categoryIds.join(",");
1224+
}
11931225
if (opts?.sortKey) {
11941226
params.sort_key = opts.sortKey;
11951227
}
@@ -1240,6 +1272,23 @@ export abstract class BaseClient {
12401272
return this.getApp(idOrNameSlug);
12411273
}
12421274

1275+
/**
1276+
* Retrieves the list of app categories available in Pipedream.
1277+
*
1278+
* @returns A promise resolving to a list of app categories.
1279+
*
1280+
* @example
1281+
* ```typescript
1282+
* const categories = await client.getAppCategories();
1283+
* console.log(categories);
1284+
* ```
1285+
*/
1286+
public getAppCategories() {
1287+
return this.makeAuthorizedRequest<GetAppCategoriesResponse>("/connect/app_categories", {
1288+
method: "GET",
1289+
});
1290+
}
1291+
12431292
/**
12441293
* Retrieves the list of components available in Pipedream.
12451294
*

pnpm-lock.yaml

Lines changed: 15 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)