Skip to content

Commit 17e2fbe

Browse files
authored
Add pagination parameters to component configuration (#15233)
* Add pagination parameters to component configuration * Add pagination parameters to component configuration * Fix linter errors
1 parent 2519bf6 commit 17e2fbe

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines 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.3",
3+
"version": "1.1.4",
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: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,19 @@ export type ConfigureComponentOpts = ExternalUserId & {
333333
dynamicPropsId?: string;
334334

335335
query?: string;
336+
337+
/**
338+
* A 0 indexed page number. Use with APIs that accept a
339+
* numeric page number for pagination.
340+
*/
341+
page?: number;
342+
343+
/**
344+
* A string representing the context for the previous options
345+
* execution. Use with APIs that accept a token representing the last
346+
* record for pagination.
347+
*/
348+
prevContext?: never;
336349
};
337350

338351
/**
@@ -787,14 +800,21 @@ export abstract class BaseClient {
787800
params.q = opts.q;
788801
}
789802
if (opts?.hasActions != null) {
790-
params.has_actions = opts.hasActions ? "1" : "0";
803+
params.has_actions = opts.hasActions
804+
? "1"
805+
: "0";
791806
}
792807
if (opts?.hasComponents != null) {
793-
params.has_components = opts.hasComponents ? "1" : "0";
808+
params.has_components = opts.hasComponents
809+
? "1"
810+
: "0";
794811
}
795812
if (opts?.hasTriggers != null) {
796-
params.has_triggers = opts.hasTriggers ? "1" : "0";
813+
params.has_triggers = opts.hasTriggers
814+
? "1"
815+
: "0";
797816
}
817+
798818
this.addRelationOpts(params, opts);
799819
return this.makeAuthorizedRequest<GetAppsResponse>(
800820
"/apps",
@@ -949,6 +969,8 @@ export abstract class BaseClient {
949969
prop_name: opts.propName,
950970
configured_props: opts.configuredProps,
951971
dynamic_props_id: opts.dynamicPropsId,
972+
page: opts.page,
973+
prev_context: opts.prevContext,
952974
};
953975
return this.makeConnectRequest<ConfigureComponentResponse>("/components/configure", {
954976
method: "POST",

0 commit comments

Comments
 (0)