Skip to content

Commit 6aa37dd

Browse files
committed
feat(sdk): added app sortKey and sortDirection
1 parent 35607f0 commit 6aa37dd

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

packages/sdk/CHANGELOG.md

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

33
# Changelog
44

5+
## [1.6.10] - 2025-07-01
6+
7+
### Added
8+
9+
- Added `sortKey` and `sortDirection` options to the `getApps` method
10+
511
## [1.6.9] - 2025-06-10
612

713
### 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.6.9",
4+
"version": "1.6.10",
55
"description": "Pipedream SDK",
66
"main": "./dist/server.js",
77
"module": "./dist/server.js",

packages/sdk/src/shared/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,18 @@ export type GetAppsOpts = RelationOpts & {
255255
* Filter by whether apps have triggers in the component registry.
256256
*/
257257
hasTriggers?: boolean;
258+
/**
259+
* The key to sort the apps by.
260+
*
261+
* @default "name_slug"
262+
*/
263+
sortKey?: "name" | "featured_weight" | "name_slug";
264+
/**
265+
* The direction to sort the apps.
266+
*
267+
* @default "asc"
268+
*/
269+
sortDirection?: "asc" | "desc";
258270
};
259271

260272
/**
@@ -1178,6 +1190,12 @@ export abstract class BaseClient {
11781190
? "1"
11791191
: "0";
11801192
}
1193+
if (opts?.sortKey) {
1194+
params.sort_key = opts.sortKey;
1195+
}
1196+
if (opts?.sortDirection) {
1197+
params.sort_direction = opts.sortDirection;
1198+
}
11811199

11821200
this.addRelationOpts(params, opts);
11831201
return this.makeAuthorizedRequest<GetAppsResponse>(

0 commit comments

Comments
 (0)