Skip to content

Commit b2e8b70

Browse files
committed
feat(sdk): getApps hasActions, hasComponents, hasTriggers (1.1.3)
1 parent ace38f7 commit b2e8b70

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

packages/sdk/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<!-- markdownlint-disable MD024 -->
22
# Changelog
33

4+
## [1.1.3] - 2024-12-13
5+
6+
### Added
7+
8+
- Can now filter `getApps` by whether app `hasComponents`,
9+
`hasActions`, or `hasTriggers` in the registry
10+
411
## [1.1.2] - 2024-12-12
512

613
### Changed

packages/sdk/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": "1.1.2",
3+
"version": "1.1.3",
44
"description": "Pipedream SDK",
55
"main": "dist/server/server/index.js",
66
"module": "dist/server/server/index.js",

packages/sdk/src/shared/index.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,18 @@ export type GetAppsOpts = RelationOpts & {
181181
* A search query to filter the apps.
182182
*/
183183
q?: string;
184+
/**
185+
* Filter by whether apps have actions in the component registry.
186+
*/
187+
hasActions?: boolean;
188+
/**
189+
* Filter by whether apps have components in the component registry.
190+
*/
191+
hasComponents?: boolean;
192+
/**
193+
* Filter by whether apps have triggers in the component registry.
194+
*/
195+
hasTriggers?: boolean;
184196
};
185197

186198
/**
@@ -774,6 +786,15 @@ export abstract class BaseClient {
774786
if (opts?.q) {
775787
params.q = opts.q;
776788
}
789+
if (opts?.hasActions != null) {
790+
params.has_actions = opts.hasActions ? "1" : "0";
791+
}
792+
if (opts?.hasComponents != null) {
793+
params.has_components = opts.hasComponents ? "1" : "0";
794+
}
795+
if (opts?.hasTriggers != null) {
796+
params.has_triggers = opts.hasTriggers ? "1" : "0";
797+
}
777798
this.addRelationOpts(params, opts);
778799
return this.makeAuthorizedRequest<GetAppsResponse>(
779800
"/apps",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)