Skip to content

feat(sdk): add configuredProps arg to updateTrigger method #16490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

# Changelog

## [1.6.0] - 2025-04-30

### Added

- Added `configuredProps` argument to the `updateTrigger` method.

### Changed

- Corrected the return type of `updateTrigger`.
- Changed the type of property values of `ConfigureComponentContext` from
explicit `any` to `unknown`.

## [1.5.5] - 2025-04-28

### Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pipedream/sdk",
"type": "module",
"version": "1.5.5",
"version": "1.6.0",
"description": "Pipedream SDK",
"main": "./dist/server.js",
"module": "./dist/server.js",
Expand Down
13 changes: 11 additions & 2 deletions packages/sdk/src/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export type PropOption = {
value: string;
};

type ConfigureComponentContext = Record<string, any>
type ConfigureComponentContext = Record<string, unknown>

/**
* The response received after configuring a component's prop.
Expand Down Expand Up @@ -800,6 +800,13 @@ export type UpdateTriggerOpts = {
*/
active?: boolean;

/**
* The props that have already been configured for the trigger. This is a
* JSON-serializable object with the prop names as keys and the configured
* values as values.
*/
configuredProps?: ConfiguredProps<ConfigurableProps>;

/**
* The new name of the trigger.
*/
Expand Down Expand Up @@ -1559,16 +1566,18 @@ export abstract class BaseClient {
id,
externalUserId,
active = null,
configuredProps = null,
name = null,
} = opts;

return this.makeConnectRequest<V1DeployedComponent>(`/deployed-triggers/${id}`, {
return this.makeConnectRequest<GetTriggerResponse>(`/deployed-triggers/${id}`, {
method: "PUT",
params: {
external_user_id: externalUserId,
},
body: {
active,
configured_props: configuredProps,
name,
},
});
Expand Down
10 changes: 6 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading