From c1d931e038b56a706c6cfdbc7f652833a599993b Mon Sep 17 00:00:00 2001
From: js07 <19861096+js07@users.noreply.github.com>
Date: Wed, 30 Apr 2025 14:38:00 -0400
Subject: [PATCH 1/8] [Docs] Add Connect API endpoint for updating a deployed
trigger
---
docs-v2/pages/connect/api.mdx | 145 ++++++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+)
diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx
index b21dd2fb1c056..fdf9aa1658f72 100644
--- a/docs-v2/pages/connect/api.mdx
+++ b/docs-v2/pages/connect/api.mdx
@@ -2709,6 +2709,151 @@ The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`
[The external user ID](/connect/api/#external-users) in your system on behalf of
which you want to deploy the trigger.
+#### Update a deployed trigger
+
+Update a deployed trigger for a given user.
+
+```text
+PUT /deployed-triggers/{deployed_trigger_id}
+```
+
+##### Path parameters
+
+`deployed_trigger_id` **string**
+
+The deployed trigger ID for the trigger you'd like to update (ex, `dc_xxxxxxx`).
+
+##### Query parameters
+
+`external_user_id` **string**
+
+[The external user ID](/connect/api/#external-users) in your system on behalf of
+which you want to update the trigger.
+
+##### Body parameters
+
+`active` **boolean** (_optional_)
+
+The state to which the trigger should be updated.
+
+`configured_props` **object** (_optional_)
+
+The new configuration props for the trigger.
+
+`name` **string** (_optional_)
+
+The new name of the trigger.
+
+##### Examples
+
+
+
+
+```typescript
+import {
+ createBackendClient,
+ GetTriggerResponse,
+ V1DeployedComponent,
+ type BackendClient,
+ type BackendClientOpts,
+ type UpdateTriggerOpts,
+} from "@pipedream/sdk/server";
+
+const clientOpts: BackendClientOpts = {
+ environment: "development", // change to production if running for a test production account, or in production
+ credentials: {
+ clientId: "{oauth_client_id}",
+ clientSecret: "{oauth_client_secret}",
+ },
+ projectId: "{your_project_id}"
+};
+const pd: BackendClient = createBackendClient(clientOpts);
+
+// Update the deployed trigger for the specified user
+const requestOpts: UpdateTriggerOpts = {
+ id: "dc_gzumK2e",
+ externalUserId: "jverce",
+ active: true,
+ name: "My Updated Trigger",
+ configuredProps: {
+ gitlab: {
+ authProvisionId: "apn_kVh9AoD",
+ },
+ projectId: 45672542,
+ },
+};
+const response: GetTriggerResponse = await pd.updateTrigger(requestOpts);
+
+const {
+ data: trigger, // The updated deployed trigger
+}: {
+ data: V1DeployedComponent,
+} = response;
+```
+
+
+
+```javascript
+import {
+ createBackendClient,
+} from "@pipedream/sdk/server";
+
+const pd = createBackendClient({
+ environment: "development", // change to production if running for a test production account, or in production
+ credentials: {
+ clientId: "{oauth_client_id}",
+ clientSecret: "{oauth_client_secret}",
+ },
+ projectId: "{your_project_id}"
+});
+
+// Update the deployed trigger for the specified user
+const requestOpts = {
+ id: "dc_gzumK2e",
+ externalUserId: "jverce",
+ active: true,
+ name: "My Updated Trigger",
+ configuredProps: {
+ gitlab: {
+ authProvisionId: "apn_kVh9AoD",
+ },
+ projectId: 45672542,
+ },
+};
+const { data: deployedTrigger } = await pd.updateTrigger(requestOpts);
+
+// Parse and return the data you need
+```
+
+
+
+```bash
+# First, obtain an OAuth access token
+curl -X POST https://api.pipedream.com/v1/oauth/token \
+ -H "Content-Type: application/json" \
+ -d '{
+ "grant_type": "client_credentials",
+ "client_id": "{oauth_client_id}",
+ "client_secret": "{oauth_client_secret}"
+ }'
+
+# The response will include an access_token. Use it in the Authorization header below.
+# This request will update the deployed trigger for the specified user.
+
+curl -X PUT "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/" \
+ -H "Authorization: Bearer {access_token}" \
+ -H "Content-Type: application/json" \
+ -H "x-pd-environment: development" \
+ -d '{
+ "external_user_id": "jverce",
+ "active": true,
+ "configured_props": {},
+ "name": "My Updated Trigger"
+ }'
+```
+
+
+
##### Examples
From 6d5e179d89e0fc45890b36dac008280d491c22b6 Mon Sep 17 00:00:00 2001
From: js07 <19861096+js07@users.noreply.github.com>
Date: Wed, 30 Apr 2025 14:40:31 -0400
Subject: [PATCH 2/8] update pnpm-lock.yaml
---
pnpm-lock.yaml | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 08f58741e85d2..d50c173e8182d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -4085,8 +4085,7 @@ importers:
specifier: ^1.3.0
version: 1.6.6
- components/emailverify_io:
- specifiers: {}
+ components/emailverify_io: {}
components/emelia: {}
@@ -28099,22 +28098,22 @@ packages:
superagent@3.8.1:
resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==}
engines: {node: '>= 4.0'}
- deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net
+ deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at .
superagent@4.1.0:
resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==}
engines: {node: '>= 6.0'}
- deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net
+ deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at .
superagent@5.3.1:
resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==}
engines: {node: '>= 7.0.0'}
- deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net
+ deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at .
superagent@7.1.6:
resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==}
engines: {node: '>=6.4.0 <13 || >=14'}
- deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net
+ deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731)
supports-color@2.0.0:
resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}
@@ -34740,6 +34739,8 @@ snapshots:
'@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))
'@putout/operator-json': 2.2.0
putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3)
+ transitivePeerDependencies:
+ - supports-color
'@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))':
dependencies:
From ffef787aea074d705ea0bceda6eabebebd3ca8c4 Mon Sep 17 00:00:00 2001
From: js07 <19861096+js07@users.noreply.github.com>
Date: Wed, 30 Apr 2025 15:44:29 -0400
Subject: [PATCH 3/8] use type imports for type-only entities in example
---
docs-v2/pages/connect/api.mdx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx
index fdf9aa1658f72..c8ac07dba1f17 100644
--- a/docs-v2/pages/connect/api.mdx
+++ b/docs-v2/pages/connect/api.mdx
@@ -2752,8 +2752,8 @@ The new name of the trigger.
```typescript
import {
createBackendClient,
- GetTriggerResponse,
- V1DeployedComponent,
+ type GetTriggerResponse,
+ type V1DeployedComponent,
type BackendClient,
type BackendClientOpts,
type UpdateTriggerOpts,
From ecc2ef13001da4d747a1b0631bebe3d17fb6a59d Mon Sep 17 00:00:00 2001
From: js07 <19861096+js07@users.noreply.github.com>
Date: Wed, 30 Apr 2025 15:46:06 -0400
Subject: [PATCH 4/8] add trailing slash to endpoint path for consistency
---
docs-v2/pages/connect/api.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx
index c8ac07dba1f17..3cd3f3af94e8d 100644
--- a/docs-v2/pages/connect/api.mdx
+++ b/docs-v2/pages/connect/api.mdx
@@ -2714,7 +2714,7 @@ which you want to deploy the trigger.
Update a deployed trigger for a given user.
```text
-PUT /deployed-triggers/{deployed_trigger_id}
+PUT /deployed-triggers/{deployed_trigger_id}/
```
##### Path parameters
From 39fa58ae85ae7edf5c923c5e0d166e113854792e Mon Sep 17 00:00:00 2001
From: js07 <19861096+js07@users.noreply.github.com>
Date: Wed, 30 Apr 2025 16:15:28 -0400
Subject: [PATCH 5/8] fix placement of example and response for delete trigger
add example response for update trigger
---
docs-v2/pages/connect/api.mdx | 222 +++++++++++++++++++++-------------
1 file changed, 136 insertions(+), 86 deletions(-)
diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx
index 3cd3f3af94e8d..e2de7287f602c 100644
--- a/docs-v2/pages/connect/api.mdx
+++ b/docs-v2/pages/connect/api.mdx
@@ -2709,6 +2709,93 @@ The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`
[The external user ID](/connect/api/#external-users) in your system on behalf of
which you want to deploy the trigger.
+##### Examples
+
+
+
+
+```typescript
+import {
+ createBackendClient,
+ type BackendClient,
+ type BackendClientOpts,
+ type DeleteTriggerOpts,
+} from "@pipedream/sdk/server";
+
+const clientOpts: BackendClientOpts = {
+ environment: "development", // change to production if running for a test production account, or in production
+ credentials: {
+ clientId: "{oauth_client_id}",
+ clientSecret: "{oauth_client_secret}",
+ },
+ projectId: "{your_project_id}"
+};
+const pd: BackendClient = createBackendClient(clientOpts);
+
+// Delete the deployed trigger for the specified user.
+const requestOpts: DeleteTriggerOpts = {
+ id: "dc_gzumK2e",
+ externalUserId: "jverce",
+};
+
+// The method doesn't return any data.
+await pd.deleteTrigger(requestOpts);
+```
+
+
+
+```javascript
+import {
+ createBackendClient,
+} from "@pipedream/sdk/server";
+
+const pd = createBackendClient({
+ environment: "development", // change to production if running for a test production account, or in production
+ credentials: {
+ clientId: "{oauth_client_id}",
+ clientSecret: "{oauth_client_secret}",
+ },
+ projectId: "{your_project_id}"
+});
+
+// Delete the deployed trigger for the specified user. The method doesn't return
+// any data.
+await pd.deleteTrigger({
+ id: "dc_gzumK2e",
+ externalUserId: "jverce"
+});
+```
+
+
+
+```bash
+# First, obtain an OAuth access token
+curl -X POST https://api.pipedream.com/v1/oauth/token \
+ -H "Content-Type: application/json" \
+ -d '{
+ "grant_type": "client_credentials",
+ "client_id": "{oauth_client_id}",
+ "client_secret": "{oauth_client_secret}"
+ }'
+
+# The response will include an access_token. Use it in the Authorization header below.
+# This request will list all deployed triggers for the specified user.
+
+curl -X DELETE \
+ -G \
+ "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/" \
+ -H "Authorization: Bearer {access_token}" \
+ -H "Content-Type: application/json" \
+ -H "x-pd-environment: development" \
+ -d "external_user_id={external_user_id}"
+```
+
+
+
+##### Response
+
+Pipedream returns a `204 No Content` response on successful deletion
+
#### Update a deployed trigger
Update a deployed trigger for a given user.
@@ -2852,96 +2939,59 @@ curl -X PUT "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-tri
}'
```
-
-##### Examples
-
-
-
-
-```typescript
-import {
- createBackendClient,
- type BackendClient,
- type BackendClientOpts,
- type DeleteTriggerOpts,
-} from "@pipedream/sdk/server";
-
-const clientOpts: BackendClientOpts = {
- environment: "development", // change to production if running for a test production account, or in production
- credentials: {
- clientId: "{oauth_client_id}",
- clientSecret: "{oauth_client_secret}",
- },
- projectId: "{your_project_id}"
-};
-const pd: BackendClient = createBackendClient(clientOpts);
-
-// Delete the deployed trigger for the specified user.
-const requestOpts: DeleteTriggerOpts = {
- id: "dc_gzumK2e",
- externalUserId: "jverce",
-};
-
-// The method doesn't return any data.
-await pd.deleteTrigger(requestOpts);
-```
-
-
-
-```javascript
-import {
- createBackendClient,
-} from "@pipedream/sdk/server";
-
-const pd = createBackendClient({
- environment: "development", // change to production if running for a test production account, or in production
- credentials: {
- clientId: "{oauth_client_id}",
- clientSecret: "{oauth_client_secret}",
- },
- projectId: "{your_project_id}"
-});
-
-// Delete the deployed trigger for the specified user. The method doesn't return
-// any data.
-await pd.deleteTrigger({
- id: "dc_gzumK2e",
- externalUserId: "jverce"
-});
-```
-
-
-
-```bash
-# First, obtain an OAuth access token
-curl -X POST https://api.pipedream.com/v1/oauth/token \
- -H "Content-Type: application/json" \
- -d '{
- "grant_type": "client_credentials",
- "client_id": "{oauth_client_id}",
- "client_secret": "{oauth_client_secret}"
- }'
-
-# The response will include an access_token. Use it in the Authorization header below.
-# This request will list all deployed triggers for the specified user.
+##### Example response
-curl -X DELETE \
- -G \
- "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-triggers/{deployed_trigger_id}/" \
- -H "Authorization: Bearer {access_token}" \
- -H "Content-Type: application/json" \
- -H "x-pd-environment: development" \
- -d "external_user_id={external_user_id}"
+```json
+{
+ "data": {
+ "id": "dc_dAuGmW7",
+ "owner_id": "exu_oedidz",
+ "component_id": "sc_3vijzQr",
+ "configurable_props": [
+ {
+ "name": "gitlab",
+ "type": "app",
+ "app": "gitlab"
+ },
+ {
+ "name": "db",
+ "type": "$.service.db"
+ },
+ {
+ "name": "http",
+ "type": "$.interface.http",
+ "customResponse": true
+ },
+ {
+ "name": "projectId",
+ "type": "integer",
+ "label": "Project ID",
+ "description": "The project ID, as displayed in the main project page",
+ "remoteOptions": true
+ }
+ ],
+ "configured_props": {
+ "gitlab": {
+ "authProvisionId": "apn_kVh9AoD"
+ },
+ "db": {
+ "type": "$.service.db"
+ },
+ "http": {
+ "endpoint_url": "https://xxxxxxxxxx.m.pipedream.net"
+ },
+ "projectId": 45672542
+ },
+ "active": true,
+ "created_at": 1734028283,
+ "updated_at": 1734038486,
+ "name": "My Updated Trigger",
+ "name_slug": "my-updated-trigger"
+ }
+}
```
-
-
-
-##### Response
-
-Pipedream returns a `204 No Content` response on successful deletion
-
#### Retrieve the events emitted by a deployed trigger
From 2f4035432eeaf9803a9ab44785c884ceee6d874f Mon Sep 17 00:00:00 2001
From: js07 <19861096+js07@users.noreply.github.com>
Date: Wed, 30 Apr 2025 16:19:36 -0400
Subject: [PATCH 6/8] fixup whitespace
revert newline removal
---
docs-v2/pages/connect/api.mdx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx
index e2de7287f602c..f4a44b98c00e5 100644
--- a/docs-v2/pages/connect/api.mdx
+++ b/docs-v2/pages/connect/api.mdx
@@ -2709,6 +2709,7 @@ The deployed trigger ID for the trigger you'd like to retrieve (ex, `dc_xxxxxxx`
[The external user ID](/connect/api/#external-users) in your system on behalf of
which you want to deploy the trigger.
+
##### Examples
@@ -2923,7 +2924,7 @@ curl -X POST https://api.pipedream.com/v1/oauth/token \
"client_id": "{oauth_client_id}",
"client_secret": "{oauth_client_secret}"
}'
-
+
# The response will include an access_token. Use it in the Authorization header below.
# This request will update the deployed trigger for the specified user.
From ddab4fe2232135905354d3fdf018709e50c198aa Mon Sep 17 00:00:00 2001
From: js07 <19861096+js07@users.noreply.github.com>
Date: Wed, 30 Apr 2025 16:29:58 -0400
Subject: [PATCH 7/8] update configured_props in cURL example
---
docs-v2/pages/connect/api.mdx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx
index f4a44b98c00e5..d5d87b862027f 100644
--- a/docs-v2/pages/connect/api.mdx
+++ b/docs-v2/pages/connect/api.mdx
@@ -2935,7 +2935,12 @@ curl -X PUT "https://api.pipedream.com/v1/connect/{your_project_id}/deployed-tri
-d '{
"external_user_id": "jverce",
"active": true,
- "configured_props": {},
+ "configured_props": {
+ "gitlab": {
+ "authProvisionId": "apn_kVh9AoD"
+ },
+ "projectId": 45672542,
+ },
"name": "My Updated Trigger"
}'
```
From b13c94dac3a314e2d33fc3dcc702fe5196936bd3 Mon Sep 17 00:00:00 2001
From: js07 <19861096+js07@users.noreply.github.com>
Date: Tue, 6 May 2025 12:24:10 -0400
Subject: [PATCH 8/8] "Update a deployed trigger" -> "Update Deployed Trigger"
---
docs-v2/pages/connect/api.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx
index d5d87b862027f..9dfcc17518105 100644
--- a/docs-v2/pages/connect/api.mdx
+++ b/docs-v2/pages/connect/api.mdx
@@ -2797,7 +2797,7 @@ curl -X DELETE \
Pipedream returns a `204 No Content` response on successful deletion
-#### Update a deployed trigger
+#### Update Deployed Trigger
Update a deployed trigger for a given user.