Skip to content

Commit 18a1329

Browse files
fern-api[bot]jverceTheBestMoshe
authored
Custom component listing (#279)
This change accepts an extra parameter when listing components, so that users can list private components, public/registry components, or both. --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Jay Vercellone <jay@pipedream.com> Co-authored-by: Moshe Grunwald <moshe@pipedream.com>
1 parent 114e3b8 commit 18a1329

29 files changed

+158
-9
lines changed

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": "2.3.0",
3+
"version": "2.3.1",
44
"private": false,
55
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
66
"type": "commonjs",

src/api/resources/actions/client/Client.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export class Actions {
3737
* before: "before",
3838
* limit: 1,
3939
* q: "q",
40-
* app: "app"
40+
* app: "app",
41+
* registry: "public"
4142
* })
4243
*/
4344
public async list(
@@ -48,7 +49,7 @@ export class Actions {
4849
async (
4950
request: Pipedream.ActionsListRequest,
5051
): Promise<core.WithRawResponse<Pipedream.GetComponentsResponse>> => {
51-
const { after, before, limit, q, app } = request;
52+
const { after, before, limit, q, app, registry } = request;
5253
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
5354
if (after != null) {
5455
_queryParams.after = after;
@@ -65,6 +66,12 @@ export class Actions {
6566
if (app != null) {
6667
_queryParams.app = app;
6768
}
69+
if (registry != null) {
70+
_queryParams.registry = serializers.ActionsListRequestRegistry.jsonOrThrow(registry, {
71+
unrecognizedObjectKeys: "strip",
72+
omitUndefined: true,
73+
});
74+
}
6875
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
6976
this._options?.headers,
7077
mergeOnlyDefinedHeaders({

src/api/resources/actions/client/requests/ActionsListRequest.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
// This file was auto-generated by Fern from our API Definition.
22

3+
import type * as Pipedream from "../../../../index.js";
4+
35
/**
46
* @example
57
* {
68
* after: "after",
79
* before: "before",
810
* limit: 1,
911
* q: "q",
10-
* app: "app"
12+
* app: "app",
13+
* registry: "public"
1114
* }
1215
*/
1316
export interface ActionsListRequest {
@@ -21,4 +24,6 @@ export interface ActionsListRequest {
2124
q?: string;
2225
/** The ID or name slug of the app to filter the actions */
2326
app?: string;
27+
/** The registry to retrieve actions from. Defaults to 'all' ('public', 'private', or 'all') */
28+
registry?: Pipedream.ActionsListRequestRegistry;
2429
}

src/api/resources/actions/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from "./client/index.js";
2+
export * from "./types/index.js";
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
export const ActionsListRequestRegistry = {
4+
Public: "public",
5+
Private: "private",
6+
All: "all",
7+
} as const;
8+
export type ActionsListRequestRegistry = (typeof ActionsListRequestRegistry)[keyof typeof ActionsListRequestRegistry];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./ActionsListRequestRegistry.js";

src/api/resources/components/client/Client.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class Components {
3838
* limit: 1,
3939
* q: "q",
4040
* app: "app",
41+
* registry: "public",
4142
* componentType: "trigger"
4243
* })
4344
*/
@@ -49,7 +50,7 @@ export class Components {
4950
async (
5051
request: Pipedream.ComponentsListRequest,
5152
): Promise<core.WithRawResponse<Pipedream.GetComponentsResponse>> => {
52-
const { after, before, limit, q, app, componentType } = request;
53+
const { after, before, limit, q, app, registry, componentType } = request;
5354
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
5455
if (after != null) {
5556
_queryParams.after = after;
@@ -66,6 +67,12 @@ export class Components {
6667
if (app != null) {
6768
_queryParams.app = app;
6869
}
70+
if (registry != null) {
71+
_queryParams.registry = serializers.ComponentsListRequestRegistry.jsonOrThrow(registry, {
72+
unrecognizedObjectKeys: "strip",
73+
omitUndefined: true,
74+
});
75+
}
6976
if (componentType != null) {
7077
_queryParams.component_type = serializers.ComponentType.jsonOrThrow(componentType, {
7178
unrecognizedObjectKeys: "strip",

src/api/resources/components/client/requests/ComponentsListRequest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type * as Pipedream from "../../../../index.js";
1010
* limit: 1,
1111
* q: "q",
1212
* app: "app",
13+
* registry: "public",
1314
* componentType: "trigger"
1415
* }
1516
*/
@@ -24,6 +25,8 @@ export interface ComponentsListRequest {
2425
q?: string;
2526
/** The ID or name slug of the app to filter the components */
2627
app?: string;
28+
/** The registry to retrieve components from. Defaults to 'all' ('public', 'private', or 'all') */
29+
registry?: Pipedream.ComponentsListRequestRegistry;
2730
/** The type of the component to filter the components */
2831
componentType?: Pipedream.ComponentType;
2932
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from "./client/index.js";
2+
export * from "./types/index.js";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
export const ComponentsListRequestRegistry = {
4+
Public: "public",
5+
Private: "private",
6+
All: "all",
7+
} as const;
8+
export type ComponentsListRequestRegistry =
9+
(typeof ComponentsListRequestRegistry)[keyof typeof ComponentsListRequestRegistry];

0 commit comments

Comments
 (0)