headers = new LinkedHashMap<>();
- byte[] body = new byte[0];
-
- public MockResponse setResponseCode(int code) {
- this.code = code;
- return this;
- }
-
- public MockResponse setHeader(String name, String value) {
- this.headers.put(name, value);
- return this;
- }
-
- public MockResponse setBody(String body) {
- this.body = body.getBytes(StandardCharsets.UTF_8);
- return this;
- }
-
- public MockResponse setBody(Buffer body) {
- this.body = body.readByteArray();
- return this;
- }
-}
diff --git a/src/test/java/com/pipedream/api/testutil/MockWebServer.java b/src/test/java/com/pipedream/api/testutil/MockWebServer.java
deleted file mode 100644
index d1e5315..0000000
--- a/src/test/java/com/pipedream/api/testutil/MockWebServer.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package com.pipedream.api.testutil;
-
-import com.sun.net.httpserver.HttpExchange;
-import com.sun.net.httpserver.HttpServer;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetSocketAddress;
-import java.util.Map;
-import java.util.concurrent.BlockingDeque;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.LinkedBlockingDeque;
-import java.util.concurrent.TimeUnit;
-import okhttp3.HttpUrl;
-
-/**
- * Drop-in replacement for {@code okhttp3.mockwebserver.MockWebServer} that uses the JDK's
- * built-in {@link HttpServer}. Exists so the wire tests in this repo do not require an
- * external mock-server dependency that would have to be threaded into the Fern-managed
- * {@code build.gradle}.
- *
- * Implements only the surface used here: {@code start()}, {@code shutdown()},
- * {@code url(String)}, {@code enqueue(MockResponse)}, and {@code takeRequest()}.
- */
-public final class MockWebServer {
- private final HttpServer server;
- private final ExecutorService executor;
- private final BlockingDeque responses = new LinkedBlockingDeque<>();
- private final BlockingDeque requests = new LinkedBlockingDeque<>();
-
- public MockWebServer() throws IOException {
- this.server = HttpServer.create(new InetSocketAddress("127.0.0.1", 0), 0);
- this.executor = Executors.newCachedThreadPool();
- this.server.setExecutor(executor);
- this.server.createContext("/", this::handle);
- }
-
- public void start() {
- server.start();
- }
-
- public void shutdown() {
- server.stop(0);
- executor.shutdownNow();
- }
-
- public HttpUrl url(String path) {
- if (!path.startsWith("/")) path = "/" + path;
- return HttpUrl.parse("http://" + server.getAddress().getHostString() + ":"
- + server.getAddress().getPort() + path);
- }
-
- public void enqueue(MockResponse response) {
- responses.add(response);
- }
-
- public RecordedRequest takeRequest() throws InterruptedException {
- return requests.poll(10, TimeUnit.SECONDS);
- }
-
- private void handle(HttpExchange exchange) throws IOException {
- byte[] requestBody = readAllBytes(exchange.getRequestBody());
- requests.add(new RecordedRequest(
- exchange.getRequestMethod(), exchange.getRequestURI().toString(), requestBody));
-
- MockResponse response = responses.poll();
- if (response == null) {
- exchange.sendResponseHeaders(503, -1);
- exchange.close();
- return;
- }
-
- for (Map.Entry header : response.headers.entrySet()) {
- exchange.getResponseHeaders().add(header.getKey(), header.getValue());
- }
-
- if (response.body.length == 0) {
- exchange.sendResponseHeaders(response.code, -1);
- } else {
- exchange.sendResponseHeaders(response.code, response.body.length);
- try (OutputStream out = exchange.getResponseBody()) {
- out.write(response.body);
- }
- }
- exchange.close();
- }
-
- private static byte[] readAllBytes(InputStream is) throws IOException {
- ByteArrayOutputStream buf = new ByteArrayOutputStream();
- byte[] chunk = new byte[1024];
- int n;
- while ((n = is.read(chunk)) != -1) {
- buf.write(chunk, 0, n);
- }
- return buf.toByteArray();
- }
-}
diff --git a/src/test/java/com/pipedream/api/testutil/RecordedRequest.java b/src/test/java/com/pipedream/api/testutil/RecordedRequest.java
deleted file mode 100644
index 8e7e319..0000000
--- a/src/test/java/com/pipedream/api/testutil/RecordedRequest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.pipedream.api.testutil;
-
-import java.nio.charset.StandardCharsets;
-
-/**
- * Drop-in replacement for {@code okhttp3.mockwebserver.RecordedRequest}. Exposes only
- * the {@code getMethod()}, {@code getPath()}, and {@code getBody().readUtf8()} surface
- * used by the wire tests in this repo.
- */
-public final class RecordedRequest {
- private final String method;
- private final String path;
- private final byte[] body;
-
- public RecordedRequest(String method, String path, byte[] body) {
- this.method = method;
- this.path = path;
- this.body = body;
- }
-
- public String getMethod() {
- return method;
- }
-
- public String getPath() {
- return path;
- }
-
- public Body getBody() {
- return new Body(body);
- }
-
- /** Minimal stand-in for {@code okio.Buffer} as exposed by {@code RecordedRequest.getBody()}. */
- public static final class Body {
- private final byte[] bytes;
-
- Body(byte[] bytes) {
- this.bytes = bytes;
- }
-
- public String readUtf8() {
- return new String(bytes, StandardCharsets.UTF_8);
- }
- }
-}
From c015dfe8cd47358683f689b66685d4d87e67e386 Mon Sep 17 00:00:00 2001
From: Jay Vercellone
Date: Tue, 26 May 2026 17:01:49 -0700
Subject: [PATCH 2/2] Custom changes
---
reference.md | 939 +++++++++++-------
.../com/pipedream/api/AsyncBaseClient.java | 8 -
.../pipedream/api/AsyncBaseClientBuilder.java | 80 +-
.../java/com/pipedream/api/BaseClient.java | 8 -
.../com/pipedream/api/BaseClientBuilder.java | 80 +-
.../api/resources/proxy/AsyncProxyClient.java | 114 ++-
.../resources/proxy/AsyncRawProxyClient.java | 139 +--
.../api/resources/proxy/ProxyClient.java | 108 +-
.../api/resources/proxy/RawProxyClient.java | 114 ++-
.../resources/proxy/types/ProxyResponse.java | 190 ++++
.../workflows/AsyncRawWorkflowsClient.java | 268 +++++
.../workflows/AsyncWorkflowsClient.java | 128 +++
.../workflows/RawWorkflowsClient.java | 241 +++++
.../resources/workflows/WorkflowsClient.java | 125 +++
.../api/resources/workflows/package-info.java | 27 +
.../InvokeWorkflowForExternalUserOpts.java | 182 ++++
.../requests/InvokeWorkflowOpts.java | 164 +++
.../com/pipedream/api/types/HTTPAuthType.java | 42 +
18 files changed, 2361 insertions(+), 596 deletions(-)
create mode 100644 src/main/java/com/pipedream/api/resources/proxy/types/ProxyResponse.java
create mode 100644 src/main/java/com/pipedream/api/resources/workflows/AsyncRawWorkflowsClient.java
create mode 100644 src/main/java/com/pipedream/api/resources/workflows/AsyncWorkflowsClient.java
create mode 100644 src/main/java/com/pipedream/api/resources/workflows/RawWorkflowsClient.java
create mode 100644 src/main/java/com/pipedream/api/resources/workflows/WorkflowsClient.java
create mode 100644 src/main/java/com/pipedream/api/resources/workflows/package-info.java
create mode 100644 src/main/java/com/pipedream/api/resources/workflows/requests/InvokeWorkflowForExternalUserOpts.java
create mode 100644 src/main/java/com/pipedream/api/resources/workflows/requests/InvokeWorkflowOpts.java
create mode 100644 src/main/java/com/pipedream/api/types/HTTPAuthType.java
diff --git a/reference.md b/reference.md
index de3b6f7..4d75a73 100644
--- a/reference.md
+++ b/reference.md
@@ -1,5 +1,7 @@
# Reference
+
## AppCategories
+
client.appCategories.list() -> List<AppCategory>
@@ -29,12 +31,12 @@ Retrieve all available categories for integrated apps
```java
client.appCategories().list();
```
+
-
@@ -68,6 +70,7 @@ Get details of a specific app category by its ID
```java
client.appCategories().retrieve("id");
```
+
@@ -82,18 +85,18 @@ client.appCategories().retrieve("id");
**id:** `String` — The ID of the app category to retrieve
-
+
-
## Apps
+
client.apps.list() -> SyncPagingIterable<App>
@@ -139,6 +142,7 @@ client.apps().list(
.build()
);
```
+
@@ -153,7 +157,7 @@ client.apps().list(
**after:** `Optional` — The cursor to start from for pagination
-
+
@@ -161,7 +165,7 @@ client.apps().list(
**before:** `Optional` — The cursor to end before for pagination
-
+
@@ -169,7 +173,7 @@ client.apps().list(
**limit:** `Optional` — The maximum number of results to return
-
+
@@ -177,7 +181,7 @@ client.apps().list(
**q:** `Optional` — A search query to filter the apps
-
+
@@ -185,7 +189,7 @@ client.apps().list(
**sortKey:** `Optional` — The key to sort the apps by
-
+
@@ -193,7 +197,7 @@ client.apps().list(
**sortDirection:** `Optional` — The direction to sort the apps
-
+
@@ -201,7 +205,7 @@ client.apps().list(
**categoryIds:** `Optional` — Only return apps in these categories
-
+
@@ -209,7 +213,7 @@ client.apps().list(
**hasComponents:** `Optional` — Only return apps that have components (actions or triggers)
-
+
@@ -217,7 +221,7 @@ client.apps().list(
**hasActions:** `Optional` — Only return apps that have actions
-
+
@@ -225,13 +229,12 @@ client.apps().list(
**hasTriggers:** `Optional` — Only return apps that have triggers
-
+
-
@@ -265,6 +268,7 @@ Get detailed information about a specific app by ID or name slug
```java
client.apps().retrieve("app_id");
```
+
@@ -279,18 +283,18 @@ client.apps().retrieve("app_id");
**appId:** `String` — The name slug or ID of the app (e.g., 'slack', 'github')
-
+
-
## Accounts
+
client.accounts.list(projectId) -> SyncPagingIterable<Account>
@@ -331,6 +335,7 @@ client.accounts().list(
.build()
);
```
+
@@ -345,15 +350,15 @@ client.accounts().list(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**externalUserId:** `Optional`
-
+**externalUserId:** `Optional`
+
@@ -361,7 +366,7 @@ client.accounts().list(
**oauthAppId:** `Optional` — The OAuth app ID to filter by, if applicable
-
+
@@ -369,7 +374,7 @@ client.accounts().list(
**after:** `Optional` — The cursor to start from for pagination
-
+
@@ -377,7 +382,7 @@ client.accounts().list(
**before:** `Optional` — The cursor to end before for pagination
-
+
@@ -385,7 +390,7 @@ client.accounts().list(
**limit:** `Optional` — The maximum number of results to return
-
+
@@ -393,7 +398,7 @@ client.accounts().list(
**app:** `Optional` — The app slug or ID to filter accounts by.
-
+
@@ -401,13 +406,12 @@ client.accounts().list(
**includeCredentials:** `Optional` — Whether to retrieve the account's credentials or not
-
+
-
@@ -450,6 +454,7 @@ client.accounts().create(
.build()
);
```
+
@@ -464,15 +469,15 @@ client.accounts().create(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**externalUserId:** `Optional`
-
+**externalUserId:** `Optional`
+
@@ -480,7 +485,7 @@ client.accounts().create(
**oauthAppId:** `Optional` — The OAuth app ID to filter by, if applicable
-
+
@@ -488,7 +493,7 @@ client.accounts().create(
**appSlug:** `String` — The app slug for the account
-
+
@@ -496,7 +501,7 @@ client.accounts().create(
**cfmapJson:** `String` — JSON string containing the custom fields mapping
-
+
@@ -504,7 +509,7 @@ client.accounts().create(
**connectToken:** `String` — The connect token for authentication
-
+
@@ -512,7 +517,7 @@ client.accounts().create(
**name:** `Optional` — Optional name for the account
-
+
@@ -520,13 +525,12 @@ client.accounts().create(
**accountId:** `Optional` — An existing account ID to reconnect. When provided, the account's credentials are updated instead of creating a new account. Must belong to the same external user and project environment as the connect token, and match the app identified by app_slug.
-
+
-
@@ -566,6 +570,7 @@ client.accounts().retrieve(
.build()
);
```
+
@@ -580,15 +585,15 @@ client.accounts().retrieve(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**accountId:** `String`
-
+**accountId:** `String`
+
@@ -596,13 +601,12 @@ client.accounts().retrieve(
**includeCredentials:** `Optional` — Whether to retrieve the account's credentials or not
-
+
-
@@ -636,6 +640,7 @@ Remove a connected account and its associated credentials
```java
client.accounts().delete("account_id");
```
+
@@ -650,21 +655,20 @@ client.accounts().delete("account_id");
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**accountId:** `String`
-
+**accountId:** `String`
+
-
@@ -698,6 +702,7 @@ Remove all connected accounts for a specific app
```java
client.accounts().deleteByApp("app_id");
```
+
@@ -712,21 +717,20 @@ client.accounts().deleteByApp("app_id");
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**appId:** `String`
-
+**appId:** `String`
+
-
@@ -767,6 +771,7 @@ client.accounts().listByExternalUser(
.build()
);
```
+
@@ -781,42 +786,42 @@ client.accounts().listByExternalUser(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**externalUserId:** `String`
-
+**externalUserId:** `String`
+
-**includeCredentials:** `Optional`
-
+**includeCredentials:** `Optional`
+
-**app:** `Optional`
-
+**app:** `Optional`
+
-
## Users
+
client.users.deleteExternalUser(projectId, externalUserId)
@@ -846,6 +851,7 @@ Remove an external user and all their associated accounts and resources
```java
client.users().deleteExternalUser("external_user_id");
```
+
@@ -860,21 +866,20 @@ client.users().deleteExternalUser("external_user_id");
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**externalUserId:** `String`
-
+**externalUserId:** `String`
+
-
@@ -916,6 +921,7 @@ client.users().list(
.build()
);
```
+
@@ -930,7 +936,7 @@ client.users().list(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -938,7 +944,7 @@ client.users().list(
**after:** `Optional` — The cursor to start from for pagination
-
+
@@ -946,7 +952,7 @@ client.users().list(
**before:** `Optional` — The cursor to end before for pagination
-
+
@@ -954,7 +960,7 @@ client.users().list(
**limit:** `Optional` — The maximum number of results to return
-
+
@@ -962,18 +968,18 @@ client.users().list(
**q:** `Optional` — Filter users by external_id (partial match)
-
+
-
## Components
+
client.components.list(projectId) -> SyncPagingIterable<Component>
@@ -1014,6 +1020,7 @@ client.components().list(
.build()
);
```
+
@@ -1028,7 +1035,7 @@ client.components().list(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -1036,7 +1043,7 @@ client.components().list(
**after:** `Optional` — The cursor to start from for pagination
-
+
@@ -1044,7 +1051,7 @@ client.components().list(
**before:** `Optional` — The cursor to end before for pagination
-
+
@@ -1052,7 +1059,7 @@ client.components().list(
**limit:** `Optional` — The maximum number of results to return
-
+
@@ -1060,7 +1067,7 @@ client.components().list(
**q:** `Optional` — A search query to filter the components
-
+
@@ -1068,7 +1075,7 @@ client.components().list(
**app:** `Optional` — The ID or name slug of the app to filter the components
-
+
@@ -1076,7 +1083,7 @@ client.components().list(
**registry:** `Optional` — The registry to retrieve components from. Defaults to 'all' ('public', 'private', or 'all')
-
+
@@ -1084,13 +1091,12 @@ client.components().list(
**componentType:** `Optional` — The type of the component to filter the components
-
+
-
@@ -1130,6 +1136,7 @@ client.components().retrieve(
.build()
);
```
+
@@ -1144,7 +1151,7 @@ client.components().retrieve(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -1152,7 +1159,7 @@ client.components().retrieve(
**componentId:** `String` — The key that uniquely identifies the component (e.g., 'slack-send-message')
-
+
@@ -1160,13 +1167,12 @@ client.components().retrieve(
**version:** `Optional` — Optional semantic version of the component to retrieve (for example '1.0.0')
-
+
-
@@ -1207,6 +1213,7 @@ client.components().configureProp(
.build()
);
```
+
@@ -1221,21 +1228,20 @@ client.components().configureProp(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**request:** `ConfigurePropOpts`
-
+**request:** `ConfigurePropOpts`
+
-
@@ -1275,6 +1281,7 @@ client.components().reloadProps(
.build()
);
```
+
@@ -1289,26 +1296,26 @@ client.components().reloadProps(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**request:** `ReloadPropsOpts`
-
+**request:** `ReloadPropsOpts`
+
-
## Actions
+
client.actions.list(projectId) -> SyncPagingIterable<Component>
@@ -1348,6 +1355,7 @@ client.actions().list(
.build()
);
```
+
@@ -1362,7 +1370,7 @@ client.actions().list(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -1370,7 +1378,7 @@ client.actions().list(
**after:** `Optional` — The cursor to start from for pagination
-
+
@@ -1378,7 +1386,7 @@ client.actions().list(
**before:** `Optional` — The cursor to end before for pagination
-
+
@@ -1386,7 +1394,7 @@ client.actions().list(
**limit:** `Optional` — The maximum number of results to return
-
+
@@ -1394,7 +1402,7 @@ client.actions().list(
**q:** `Optional` — A search query to filter the actions
-
+
@@ -1402,7 +1410,7 @@ client.actions().list(
**app:** `Optional` — The ID or name slug of the app to filter the actions
-
+
@@ -1410,13 +1418,12 @@ client.actions().list(
**registry:** `Optional` — The registry to retrieve actions from. Defaults to 'all' ('public', 'private', or 'all')
-
+
-
@@ -1456,6 +1463,7 @@ client.actions().retrieve(
.build()
);
```
+
@@ -1470,7 +1478,7 @@ client.actions().retrieve(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -1478,7 +1486,7 @@ client.actions().retrieve(
**componentId:** `String` — The key that uniquely identifies the component (e.g., 'slack-send-message')
-
+
@@ -1486,13 +1494,12 @@ client.actions().retrieve(
**version:** `Optional` — Optional semantic version of the component to retrieve (for example '1.0.0')
-
+
-
@@ -1533,6 +1540,7 @@ client.actions().configureProp(
.build()
);
```
+
@@ -1547,21 +1555,20 @@ client.actions().configureProp(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**request:** `ConfigurePropOpts`
-
+**request:** `ConfigurePropOpts`
+
-
@@ -1601,6 +1608,7 @@ client.actions().reloadProps(
.build()
);
```
+
@@ -1615,21 +1623,20 @@ client.actions().reloadProps(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**request:** `ReloadPropsOpts`
-
+**request:** `ReloadPropsOpts`
+
-
@@ -1669,6 +1676,7 @@ client.actions().run(
.build()
);
```
+
@@ -1683,7 +1691,7 @@ client.actions().run(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -1691,7 +1699,7 @@ client.actions().run(
**id:** `String` — The action component ID
-
+
@@ -1699,7 +1707,7 @@ client.actions().run(
**version:** `Optional` — Optional action component version (in SemVer format, for example '1.0.0'), defaults to latest
-
+
@@ -1707,15 +1715,15 @@ client.actions().run(
**externalUserId:** `String` — The external user ID
-
+
-**configuredProps:** `Optional>`
-
+**configuredProps:** `Optional>`
+
@@ -1723,26 +1731,26 @@ client.actions().run(
**dynamicPropsId:** `Optional` — The ID for dynamic props
-
+
-**stashId:** `Optional`
-
+**stashId:** `Optional`
+
-
## Triggers
+
client.triggers.list(projectId) -> SyncPagingIterable<Component>
@@ -1782,6 +1790,7 @@ client.triggers().list(
.build()
);
```
+
@@ -1796,7 +1805,7 @@ client.triggers().list(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -1804,7 +1813,7 @@ client.triggers().list(
**after:** `Optional` — The cursor to start from for pagination
-
+
@@ -1812,7 +1821,7 @@ client.triggers().list(
**before:** `Optional` — The cursor to end before for pagination
-
+
@@ -1820,7 +1829,7 @@ client.triggers().list(
**limit:** `Optional` — The maximum number of results to return
-
+
@@ -1828,7 +1837,7 @@ client.triggers().list(
**q:** `Optional` — A search query to filter the triggers
-
+
@@ -1836,7 +1845,7 @@ client.triggers().list(
**app:** `Optional` — The ID or name slug of the app to filter the triggers
-
+
@@ -1844,13 +1853,12 @@ client.triggers().list(
**registry:** `Optional` — The registry to retrieve triggers from. Defaults to 'all' ('public', 'private', or 'all')
-
+
-
@@ -1890,6 +1898,7 @@ client.triggers().retrieve(
.build()
);
```
+
@@ -1904,7 +1913,7 @@ client.triggers().retrieve(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -1912,7 +1921,7 @@ client.triggers().retrieve(
**componentId:** `String` — The key that uniquely identifies the component (e.g., 'slack-send-message')
-
+
@@ -1920,13 +1929,12 @@ client.triggers().retrieve(
**version:** `Optional` — Optional semantic version of the component to retrieve (for example '1.0.0')
-
+
-
@@ -1967,6 +1975,7 @@ client.triggers().configureProp(
.build()
);
```
+
@@ -1981,21 +1990,20 @@ client.triggers().configureProp(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**request:** `ConfigurePropOpts`
-
+**request:** `ConfigurePropOpts`
+
-
@@ -2035,6 +2043,7 @@ client.triggers().reloadProps(
.build()
);
```
+
@@ -2049,21 +2058,20 @@ client.triggers().reloadProps(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**request:** `ReloadPropsOpts`
-
+**request:** `ReloadPropsOpts`
+
-
@@ -2103,6 +2111,7 @@ client.triggers().deploy(
.build()
);
```
+
@@ -2117,7 +2126,7 @@ client.triggers().deploy(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -2125,7 +2134,7 @@ client.triggers().deploy(
**id:** `String` — The trigger component ID
-
+
@@ -2133,7 +2142,7 @@ client.triggers().deploy(
**version:** `Optional` — Optional trigger component version (in SemVer format, for example '1.0.0'), defaults to latest
-
+
@@ -2141,15 +2150,15 @@ client.triggers().deploy(
**externalUserId:** `String` — The external user ID
-
+
-**configuredProps:** `Optional>`
-
+**configuredProps:** `Optional>`
+
@@ -2157,7 +2166,7 @@ client.triggers().deploy(
**dynamicPropsId:** `Optional` — The ID for dynamic props
-
+
@@ -2165,7 +2174,7 @@ client.triggers().deploy(
**workflowId:** `Optional` — Optional ID of a workflow to receive trigger events
-
+
@@ -2173,7 +2182,7 @@ client.triggers().deploy(
**webhookUrl:** `Optional` — Optional webhook URL to receive trigger events
-
+
@@ -2181,18 +2190,18 @@ client.triggers().deploy(
**emitOnDeploy:** `Optional` — Whether the trigger should emit events during the deploy hook execution. Defaults to true if not specified.
-
+
-
## DeployedTriggers
+
client.deployedTriggers.list(projectId) -> SyncPagingIterable<Emitter>
@@ -2231,6 +2240,7 @@ client.deployedTriggers().list(
.build()
);
```
+
@@ -2245,7 +2255,7 @@ client.deployedTriggers().list(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -2253,7 +2263,7 @@ client.deployedTriggers().list(
**after:** `Optional` — The cursor to start from for pagination
-
+
@@ -2261,7 +2271,7 @@ client.deployedTriggers().list(
**before:** `Optional` — The cursor to end before for pagination
-
+
@@ -2269,7 +2279,7 @@ client.deployedTriggers().list(
**limit:** `Optional` — The maximum number of results to return
-
+
@@ -2277,7 +2287,7 @@ client.deployedTriggers().list(
**externalUserId:** `String` — Your end user ID, for whom you deployed the trigger
-
+
@@ -2285,13 +2295,12 @@ client.deployedTriggers().list(
**emitterType:** `Optional` — Filter deployed triggers by emitter type (defaults to 'source' if not provided)
-
+
-
@@ -2331,6 +2340,7 @@ client.deployedTriggers().retrieve(
.build()
);
```
+
@@ -2345,15 +2355,15 @@ client.deployedTriggers().retrieve(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
@@ -2361,13 +2371,12 @@ client.deployedTriggers().retrieve(
**externalUserId:** `String` — Your end user ID, for whom you deployed the trigger
-
+
-
@@ -2407,6 +2416,7 @@ client.deployedTriggers().update(
.build()
);
```
+
@@ -2421,15 +2431,15 @@ client.deployedTriggers().update(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
@@ -2437,7 +2447,7 @@ client.deployedTriggers().update(
**externalUserId:** `String` — The external user ID who owns the trigger
-
+
@@ -2445,15 +2455,15 @@ client.deployedTriggers().update(
**active:** `Optional` — Whether the trigger should be active
-
+
-**configuredProps:** `Optional>`
-
+**configuredProps:** `Optional>`
+
@@ -2461,7 +2471,7 @@ client.deployedTriggers().update(
**name:** `Optional` — The name of the trigger
-
+
@@ -2469,13 +2479,12 @@ client.deployedTriggers().update(
**emitOnDeploy:** `Optional` — Whether the trigger should emit events during deployment
-
+
-
@@ -2516,6 +2525,7 @@ client.deployedTriggers().delete(
.build()
);
```
+
@@ -2530,15 +2540,15 @@ client.deployedTriggers().delete(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
@@ -2546,7 +2556,7 @@ client.deployedTriggers().delete(
**externalUserId:** `String` — The external user ID who owns the trigger
-
+
@@ -2554,13 +2564,12 @@ client.deployedTriggers().delete(
**ignoreHookErrors:** `Optional` — Whether to ignore errors during deactivation hook
-
+
-
@@ -2601,6 +2610,7 @@ client.deployedTriggers().listEvents(
.build()
);
```
+
@@ -2615,15 +2625,15 @@ client.deployedTriggers().listEvents(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
@@ -2631,7 +2641,7 @@ client.deployedTriggers().listEvents(
**externalUserId:** `String` — Your end user ID, for whom you deployed the trigger
-
+
@@ -2639,13 +2649,12 @@ client.deployedTriggers().listEvents(
**n:** `Optional` — The number of events to retrieve (defaults to 20 if not provided)
-
+
-
@@ -2685,6 +2694,7 @@ client.deployedTriggers().listWorkflows(
.build()
);
```
+
@@ -2699,15 +2709,15 @@ client.deployedTriggers().listWorkflows(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
@@ -2715,13 +2725,12 @@ client.deployedTriggers().listWorkflows(
**externalUserId:** `String` — The external user ID who owns the trigger
-
+
-
@@ -2764,6 +2773,7 @@ client.deployedTriggers().updateWorkflows(
.build()
);
```
+
@@ -2778,15 +2788,15 @@ client.deployedTriggers().updateWorkflows(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
@@ -2794,7 +2804,7 @@ client.deployedTriggers().updateWorkflows(
**externalUserId:** `String` — The external user ID who owns the trigger
-
+
@@ -2802,13 +2812,12 @@ client.deployedTriggers().updateWorkflows(
**workflowIds:** `List` — Array of workflow IDs to set
-
+
-
@@ -2848,6 +2857,7 @@ client.deployedTriggers().listWebhooks(
.build()
);
```
+
@@ -2862,15 +2872,15 @@ client.deployedTriggers().listWebhooks(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
@@ -2878,13 +2888,12 @@ client.deployedTriggers().listWebhooks(
**externalUserId:** `String` — The external user ID who owns the trigger
-
+
-
@@ -2927,6 +2936,7 @@ client.deployedTriggers().updateWebhooks(
.build()
);
```
+
@@ -2941,15 +2951,15 @@ client.deployedTriggers().updateWebhooks(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
@@ -2957,7 +2967,7 @@ client.deployedTriggers().updateWebhooks(
**externalUserId:** `String` — The external user ID who owns the trigger
-
+
@@ -2965,13 +2975,12 @@ client.deployedTriggers().updateWebhooks(
**webhookUrls:** `List` — Array of webhook URLs to set
-
+
-
@@ -3012,6 +3021,7 @@ client.deployedTriggers().retrieveWebhook(
.build()
);
```
+
@@ -3026,23 +3036,23 @@ client.deployedTriggers().retrieveWebhook(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
-**webhookId:** `String`
-
+**webhookId:** `String`
+
@@ -3050,13 +3060,12 @@ client.deployedTriggers().retrieveWebhook(
**externalUserId:** `String` — The external user ID who owns the trigger
-
+
-
@@ -3097,6 +3106,7 @@ client.deployedTriggers().regenerateWebhookSigningKey(
.build()
);
```
+
@@ -3111,23 +3121,23 @@ client.deployedTriggers().regenerateWebhookSigningKey(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**triggerId:** `String`
-
+**triggerId:** `String`
+
-**webhookId:** `String`
-
+**webhookId:** `String`
+
@@ -3135,18 +3145,18 @@ client.deployedTriggers().regenerateWebhookSigningKey(
**externalUserId:** `String` — The external user ID who owns the trigger
-
+
-
## ProjectEnvironment
+
client.projectEnvironment.retrieveWebhook(projectId) -> GetWebhookResponse
@@ -3176,6 +3186,7 @@ Retrieve the webhook configured for a project environment
```java
client.projectEnvironment().retrieveWebhook();
```
+
@@ -3190,13 +3201,12 @@ client.projectEnvironment().retrieveWebhook();
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-
@@ -3235,6 +3245,7 @@ client.projectEnvironment().updateWebhook(
.build()
);
```
+
@@ -3249,7 +3260,7 @@ client.projectEnvironment().updateWebhook(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -3257,13 +3268,12 @@ client.projectEnvironment().updateWebhook(
**url:** `String` — The webhook URL to set
-
+
-
@@ -3297,6 +3307,7 @@ Remove the webhook configured for a project environment
```java
client.projectEnvironment().deleteWebhook();
```
+
@@ -3311,13 +3322,12 @@ client.projectEnvironment().deleteWebhook();
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-
@@ -3351,6 +3361,7 @@ Regenerate the signing key for the project environment webhook
```java
client.projectEnvironment().regenerateWebhookSigningKey();
```
+
@@ -3365,18 +3376,18 @@ client.projectEnvironment().regenerateWebhookSigningKey();
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-
## Projects
+
client.projects.list() -> SyncPagingIterable<Project>
@@ -3414,6 +3425,7 @@ client.projects().list(
.build()
);
```
+
@@ -3428,7 +3440,7 @@ client.projects().list(
**after:** `Optional` — The cursor to start from for pagination
-
+
@@ -3436,7 +3448,7 @@ client.projects().list(
**before:** `Optional` — The cursor to end before for pagination
-
+
@@ -3444,7 +3456,7 @@ client.projects().list(
**limit:** `Optional` — The maximum number of results to return
-
+
@@ -3452,13 +3464,12 @@ client.projects().list(
**q:** `Optional` — A search query to filter the projects
-
+
-
@@ -3497,6 +3508,7 @@ client.projects().create(
.build()
);
```
+
@@ -3511,7 +3523,7 @@ client.projects().create(
**name:** `String` — Name of the project
-
+
@@ -3519,7 +3531,7 @@ client.projects().create(
**appName:** `Optional` — Display name for the Connect application
-
+
@@ -3527,7 +3539,7 @@ client.projects().create(
**supportEmail:** `Optional` — Support email displayed to end users
-
+
@@ -3535,13 +3547,12 @@ client.projects().create(
**connectRequireKeyAuthTest:** `Optional` — Send a test request to the upstream API when adding Connect accounts for key-based apps
-
+
-
@@ -3575,6 +3586,7 @@ Get the project details for a specific project
```java
client.projects().retrieve("project_id");
```
+
@@ -3589,13 +3601,12 @@ client.projects().retrieve("project_id");
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-
@@ -3629,6 +3640,7 @@ Delete a project owned by the authenticated workspace
```java
client.projects().delete("project_id");
```
+
@@ -3643,13 +3655,12 @@ client.projects().delete("project_id");
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-
@@ -3688,6 +3699,7 @@ client.projects().update(
.build()
);
```
+
@@ -3702,7 +3714,7 @@ client.projects().update(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -3710,7 +3722,7 @@ client.projects().update(
**name:** `Optional` — Name of the project
-
+
@@ -3718,7 +3730,7 @@ client.projects().update(
**appName:** `Optional` — Display name for the Connect application
-
+
@@ -3726,7 +3738,7 @@ client.projects().update(
**supportEmail:** `Optional` — Support email displayed to end users
-
+
@@ -3734,13 +3746,12 @@ client.projects().update(
**connectRequireKeyAuthTest:** `Optional` — Send a test request to the upstream API when adding Connect accounts for key-based apps
-
+
-
@@ -3780,6 +3791,7 @@ client.projects().updateLogo(
.build()
);
```
+
@@ -3794,7 +3806,7 @@ client.projects().updateLogo(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -3802,13 +3814,12 @@ client.projects().updateLogo(
**logo:** `String` — Data URI containing the new Base64 encoded image
-
+
-
@@ -3842,6 +3853,7 @@ Retrieve project configuration and environment details
```java
client.projects().retrieveInfo();
```
+
@@ -3856,18 +3868,18 @@ client.projects().retrieveInfo();
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-
## FileStash
+
client.fileStash.downloadFile(projectId) -> InputStream
@@ -3902,6 +3914,7 @@ client.fileStash().downloadFile(
.build()
);
```
+
@@ -3916,27 +3929,50 @@ client.fileStash().downloadFile(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
-**s3Key:** `String`
-
+**s3Key:** `String`
+
-
## Proxy
-client.proxy.get(projectId, url64) -> InputStream
+
+The Proxy client forwards authenticated HTTP requests to a third-party API using credentials
+from a connected account stored in Pipedream Connect. Pass the target URL as a `String` (or
+`okhttp3.HttpUrl`) — the client Base64-encodes it internally before calling the Pipedream API.
+
+Every method returns a `ProxyResponse`, which is a closeable union of either a parsed JSON
+value (`response.isJson()` / `response.json()`) or a raw `InputStream` (`response.isStream()` /
+`response.stream()`), determined by the upstream `Content-Type`. Stream responses should be
+consumed inside a try-with-resources block to release the underlying HTTP connection:
+
+```java
+try (ProxyResponse response = client.proxy().get("https://api.example.com/users", request)) {
+ if (response.isJson()) {
+ Object json = response.json();
+ } else {
+ InputStream body = response.stream();
+ }
+}
+```
+
+For full HTTP metadata (status code, headers), use `client.proxy().withRawResponse()`. The
+async client (`asyncClient.proxy().get(...)`) exposes the same surface with
+`CompletableFuture` return types.
+
+client.proxy.get(url, request) -> ProxyResponse
@@ -3964,7 +4000,7 @@ Forward an authenticated GET request to an external API using an external user's
```java
client.proxy().get(
- "url_64",
+ "https://api.example.com/users",
ProxyGetRequest
.builder()
.externalUserId("external_user_id")
@@ -3972,6 +4008,7 @@ client.proxy().get(
.build()
);
```
+
@@ -3985,16 +4022,8 @@ client.proxy().get(
-**projectId:** `String` — The project ID, which starts with `proj_`.
-
-
-
-
-
-
+**url:** `String` — Target URL to forward the request to. Base64-encoded internally before being sent to Pipedream. An `okhttp3.HttpUrl` overload is also available.
-**url64:** `String` — Base64-encoded target URL
-
@@ -4002,7 +4031,7 @@ client.proxy().get(
**externalUserId:** `String` — The external user ID for the proxy request
-
+
@@ -4010,18 +4039,17 @@ client.proxy().get(
**accountId:** `String` — The account ID to use for authentication
-
+
-
-client.proxy.post(projectId, url64, request) -> InputStream
+client.proxy.post(url, request) -> ProxyResponse
@@ -4049,21 +4077,21 @@ Forward an authenticated POST request to an external API using an external user'
```java
client.proxy().post(
- "url_64",
+ "https://api.example.com/users",
ProxyPostRequest
.builder()
.externalUserId("external_user_id")
.accountId("account_id")
.body(
new HashMap() {{
- put("string", new
- HashMap() {{put("key", "value");
- }});
+ put("name", "Jane Doe");
+ put("email", "jane@example.com");
}}
)
.build()
);
```
+
@@ -4077,16 +4105,8 @@ client.proxy().post(
-**projectId:** `String` — The project ID, which starts with `proj_`.
-
-
-
-
-
-
+**url:** `String` — Target URL to forward the request to. Base64-encoded internally before being sent to Pipedream. An `okhttp3.HttpUrl` overload is also available.
-**url64:** `String` — Base64-encoded target URL
-
@@ -4094,7 +4114,7 @@ client.proxy().post(
**externalUserId:** `String` — The external user ID for the proxy request
-
+
@@ -4102,26 +4122,25 @@ client.proxy().post(
**accountId:** `String` — The account ID to use for authentication
-
+
-**request:** `Map` — Request body to forward to the target API
-
+**body:** `Map` — Request body to forward to the target API
+
-
-client.proxy.put(projectId, url64, request) -> InputStream
+client.proxy.put(url, request) -> ProxyResponse
@@ -4149,21 +4168,21 @@ Forward an authenticated PUT request to an external API using an external user's
```java
client.proxy().put(
- "url_64",
+ "https://api.example.com/users/42",
ProxyPutRequest
.builder()
.externalUserId("external_user_id")
.accountId("account_id")
.body(
new HashMap() {{
- put("string", new
- HashMap() {{put("key", "value");
- }});
+ put("name", "Jane Doe");
+ put("email", "jane@example.com");
}}
)
.build()
);
```
+
@@ -4177,16 +4196,8 @@ client.proxy().put(
-**projectId:** `String` — The project ID, which starts with `proj_`.
-
-
-
-
-
-
+**url:** `String` — Target URL to forward the request to. Base64-encoded internally before being sent to Pipedream. An `okhttp3.HttpUrl` overload is also available.
-**url64:** `String` — Base64-encoded target URL
-
@@ -4194,7 +4205,7 @@ client.proxy().put(
**externalUserId:** `String` — The external user ID for the proxy request
-
+
@@ -4202,26 +4213,25 @@ client.proxy().put(
**accountId:** `String` — The account ID to use for authentication
-
+
-**request:** `Map` — Request body to forward to the target API
-
+**body:** `Map` — Request body to forward to the target API
+
-
-client.proxy.delete(projectId, url64) -> InputStream
+client.proxy.delete(url, request) -> ProxyResponse
@@ -4249,7 +4259,7 @@ Forward an authenticated DELETE request to an external API using an external use
```java
client.proxy().delete(
- "url_64",
+ "https://api.example.com/users/42",
ProxyDeleteRequest
.builder()
.externalUserId("external_user_id")
@@ -4257,6 +4267,7 @@ client.proxy().delete(
.build()
);
```
+
@@ -4270,16 +4281,8 @@ client.proxy().delete(
-**projectId:** `String` — The project ID, which starts with `proj_`.
-
-
-
+**url:** `String` — Target URL to forward the request to. Base64-encoded internally before being sent to Pipedream. An `okhttp3.HttpUrl` overload is also available.
-
-
-
-**url64:** `String` — Base64-encoded target URL
-
@@ -4287,7 +4290,7 @@ client.proxy().delete(
**externalUserId:** `String` — The external user ID for the proxy request
-
+
@@ -4295,18 +4298,17 @@ client.proxy().delete(
**accountId:** `String` — The account ID to use for authentication
-
+
-
-client.proxy.patch(projectId, url64, request) -> InputStream
+client.proxy.patch(url, request) -> ProxyResponse
@@ -4334,21 +4336,20 @@ Forward an authenticated PATCH request to an external API using an external user
```java
client.proxy().patch(
- "url_64",
+ "https://api.example.com/users/42",
ProxyPatchRequest
.builder()
.externalUserId("external_user_id")
.accountId("account_id")
.body(
new HashMap() {{
- put("string", new
- HashMap() {{put("key", "value");
- }});
+ put("email", "jane.new@example.com");
}}
)
.build()
);
```
+
@@ -4362,16 +4363,8 @@ client.proxy().patch(
-**projectId:** `String` — The project ID, which starts with `proj_`.
-
-
-
+**url:** `String` — Target URL to forward the request to. Base64-encoded internally before being sent to Pipedream. An `okhttp3.HttpUrl` overload is also available.
-
-
-
-**url64:** `String` — Base64-encoded target URL
-
@@ -4379,7 +4372,7 @@ client.proxy().patch(
**externalUserId:** `String` — The external user ID for the proxy request
-
+
@@ -4387,26 +4380,26 @@ client.proxy().patch(
**accountId:** `String` — The account ID to use for authentication
-
+
-**request:** `Map` — Request body to forward to the target API
-
+**body:** `Map` — Request body to forward to the target API
+
-
## Tokens
+
client.tokens.create(projectId, request) -> CreateTokenResponse
@@ -4441,6 +4434,7 @@ client.tokens().create(
.build()
);
```
+
@@ -4455,7 +4449,7 @@ client.tokens().create(
**projectId:** `String` — The project ID, which starts with `proj_`.
-
+
@@ -4463,7 +4457,7 @@ client.tokens().create(
**allowedOrigins:** `Optional>` — List of allowed origins for CORS
-
+
@@ -4471,7 +4465,7 @@ client.tokens().create(
**errorRedirectUri:** `Optional` — URI to redirect to on error
-
+
@@ -4479,7 +4473,7 @@ client.tokens().create(
**expiresIn:** `Optional` — Token TTL in seconds (max 14400 = 4 hours). Defaults to 4 hours if not specified.
-
+
@@ -4487,15 +4481,15 @@ client.tokens().create(
**externalUserId:** `String` — Your end user ID, for whom you're creating the token
-
+
-**scope:** `Optional` — Space-separated scopes to restrict token permissions. Defaults to 'connect:*' if not specified. See https://pipedream.com/docs/connect/api-reference/authentication#connect-token-scopes for more information.
-
+**scope:** `Optional` — Space-separated scopes to restrict token permissions. Defaults to 'connect:*' if not specified. See for more information.
+
@@ -4503,7 +4497,7 @@ client.tokens().create(
**successRedirectUri:** `Optional` — URI to redirect to on success
-
+
@@ -4511,7 +4505,7 @@ client.tokens().create(
**webhookUri:** `Optional` — Webhook URI for notifications
-
+
@@ -4519,13 +4513,12 @@ client.tokens().create(
**allowProgressiveScopes:** `Optional` — When true, end users may authorize a subset of the app's OAuth scopes; only the app's functional scopes (needed for the post-OAuth test request) are enforced. Defaults to false.
-
+
-
@@ -4567,6 +4560,7 @@ client.tokens().validate(
.build()
);
```
+
@@ -4580,8 +4574,8 @@ client.tokens().validate(
-**ctok:** `String`
-
+**ctok:** `String`
+
@@ -4589,7 +4583,7 @@ client.tokens().validate(
**appId:** `String` — The app ID to validate against
-
+
@@ -4597,7 +4591,7 @@ client.tokens().validate(
**accountId:** `Optional` — An existing account ID to reconnect. Must belong to the app identified by app_id.
-
+
@@ -4605,18 +4599,18 @@ client.tokens().validate(
**oauthAppId:** `Optional` — The OAuth app ID to validate against (if the token is for an OAuth app)
-
+
-
## Usage
+
client.usage.list() -> ConnectUsageResponse
@@ -4652,6 +4646,7 @@ client.usage().list(
.build()
);
```
+
@@ -4666,7 +4661,7 @@ client.usage().list(
**startTs:** `Integer` — Usage window start timestamp (seconds)
-
+
@@ -4674,18 +4669,18 @@ client.usage().list(
**endTs:** `Integer` — Usage window end timestamp (seconds)
-
+
-
## OauthTokens
+
client.oauthTokens.create(request) -> CreateOAuthTokenResponse
@@ -4721,6 +4716,7 @@ client.oauthTokens().create(
.build()
);
```
+
@@ -4734,24 +4730,24 @@ client.oauthTokens().create(
-**grantType:** `String`
-
+**grantType:** `String`
+
-**clientId:** `String`
-
+**clientId:** `String`
+
-**clientSecret:** `String`
-
+**clientSecret:** `String`
+
@@ -4759,14 +4755,219 @@ client.oauthTokens().create(
**scope:** `Optional` — Optional space-separated scopes for the access token. Defaults to `*`.
-
+
+
+
+
+
+
+
+
+
+
+## Workflows
+
+The Workflows client invokes a Pipedream workflow via its HTTP interface. Pass either a full
+workflow URL (`https://eo3xxxx.m.pipedream.net`) or just the endpoint ID (`eo3xxxx`). Both
+methods return the workflow's response body as a deserialized `Object` (typically a `Map`,
+`List`, or scalar — see Jackson's default deserialization). The async client
+(`asyncClient.workflows().invoke(...)` / `invokeForExternalUser(...)`) exposes the same two
+methods returning `CompletableFuture`.
+
+client.workflows.invoke(urlOrEndpoint) -> Object
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```java
+// Simple workflow invocation (uses OAuth authentication by default)
+client.workflows().invoke("eo3xxxx");
+
+// Advanced workflow invocation with all options
+client.workflows().invoke(
+ InvokeWorkflowOpts
+ .builder()
+ .urlOrEndpoint("https://eo3xxxx.m.pipedream.net")
+ .body(
+ new HashMap() {{
+ put("name", "John Doe");
+ put("email", "john@example.com");
+ }}
+ )
+ .headers(
+ new HashMap() {{
+ put("Content-Type", "application/json");
+ put("Authorization", "Bearer your-token"); // For STATIC_BEARER auth
+ }}
+ )
+ .method("POST")
+ .authType(HTTPAuthType.STATIC_BEARER)
+ .build()
+);
+```
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**urlOrEndpoint:** `String` — Either a workflow endpoint ID (e.g., `eo3xxxx`) or a full workflow URL
+
+
+
+
+
+
+
+**body:** `Optional` — Request body to send to the workflow (will be JSON serialized)
+
+
+
+
+
+
+
+**headers:** `Optional>` — Additional headers to include in the request
+
+
+
+
+
+
+
+**method:** `Optional` — HTTP method to use (defaults to `POST`)
+
+
+
+
+
+
+
+**authType:** `Optional` — Authentication type: `OAUTH` (default), `STATIC_BEARER`, or `NONE`
+
+
+
+
+
+client.workflows.invokeForExternalUser(urlOrEndpoint, externalUserId) -> Object
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```java
+// Simple external user invocation (uses OAuth authentication by default)
+client.workflows().invokeForExternalUser("eo3xxxx", "user123");
+
+// Advanced external user invocation with all options
+client.workflows().invokeForExternalUser(
+ InvokeWorkflowForExternalUserOpts
+ .builder()
+ .url("https://eo3xxxx.m.pipedream.net")
+ .externalUserId("user123")
+ .body(
+ new HashMap() {{
+ put("action", "process_data");
+ put("data", Arrays.asList("item1", "item2"));
+ }}
+ )
+ .headers(
+ new HashMap() {{
+ put("X-Custom-Header", "value");
+ }}
+ )
+ .method("POST")
+ .authType(HTTPAuthType.OAUTH)
+ .build()
+);
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**url:** `String` — The full workflow URL to invoke
+
+
+
+
+
+
+
+**externalUserId:** `String` — Your end user ID, for whom you're invoking the workflow (Pipedream Connect)
+
+
+
+
+
+
+
+**body:** `Optional` — Request body to send to the workflow (will be JSON serialized)
+
+
+
+
+
+
+
+**headers:** `Optional>` — Additional headers to include in the request
+
+
+
+
+
+
+
+**method:** `Optional` — HTTP method to use (defaults to `POST`)
+
+
+
+
+
+
+
+**authType:** `Optional` — Authentication type: `OAUTH` (default), `STATIC_BEARER`, or `NONE`
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/pipedream/api/AsyncBaseClient.java b/src/main/java/com/pipedream/api/AsyncBaseClient.java
index f48620f..3635ca6 100644
--- a/src/main/java/com/pipedream/api/AsyncBaseClient.java
+++ b/src/main/java/com/pipedream/api/AsyncBaseClient.java
@@ -152,12 +152,4 @@ public static AsyncBaseClientBuilder._TokenAuth withToken(String token) {
public static AsyncBaseClientBuilder._CredentialsAuth withCredentials(String clientId, String clientSecret) {
return AsyncBaseClientBuilder.withCredentials(clientId, clientSecret);
}
-
- /**
- * Creates a new client builder.
- * @return A builder for configuring and creating the client
- */
- public static AsyncBaseClientBuilder._Builder builder() {
- return AsyncBaseClientBuilder.builder();
- }
}
diff --git a/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java b/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java
index 0dc7662..e6ad3c8 100644
--- a/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java
+++ b/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java
@@ -1,6 +1,3 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
package com.pipedream.api;
import com.pipedream.api.core.ClientOptions;
@@ -13,7 +10,7 @@
import java.util.Optional;
import okhttp3.OkHttpClient;
-public class AsyncBaseClientBuilder {
+public class AsyncBaseClientBuilder> {
private Optional timeout = Optional.empty();
private Optional maxRetries = Optional.empty();
@@ -67,51 +64,51 @@ public static _Builder builder() {
/**
* Sets projectEnvironment
*/
- public AsyncBaseClientBuilder projectEnvironment(String projectEnvironment) {
+ public T projectEnvironment(String projectEnvironment) {
this.projectEnvironment = projectEnvironment;
- return this;
+ return (T) this;
}
- public AsyncBaseClientBuilder environment(Environment environment) {
+ public T environment(Environment environment) {
this.environment = environment;
- return this;
+ return (T) this;
}
- public AsyncBaseClientBuilder url(String url) {
+ public T url(String url) {
this.environment = Environment.custom(url);
- return this;
+ return (T) this;
}
/**
* Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
*/
- public AsyncBaseClientBuilder timeout(int timeout) {
+ public T timeout(int timeout) {
this.timeout = Optional.of(timeout);
- return this;
+ return (T) this;
}
/**
* Sets the maximum number of retries for the client. Defaults to 2 retries.
*/
- public AsyncBaseClientBuilder maxRetries(int maxRetries) {
+ public T maxRetries(int maxRetries) {
this.maxRetries = Optional.of(maxRetries);
- return this;
+ return (T) this;
}
/**
* Sets the underlying OkHttp client
*/
- public AsyncBaseClientBuilder httpClient(OkHttpClient httpClient) {
+ public T httpClient(OkHttpClient httpClient) {
this.httpClient = httpClient;
- return this;
+ return (T) this;
}
/**
* Configure logging for the SDK. Silent by default — no log output unless explicitly configured.
*/
- public AsyncBaseClientBuilder logging(LogConfig logging) {
+ public T logging(LogConfig logging) {
this.logging = Optional.of(logging);
- return this;
+ return (T) this;
}
/**
@@ -122,14 +119,14 @@ public AsyncBaseClientBuilder logging(LogConfig logging) {
* @param value The header value
* @return This builder for method chaining
*/
- public AsyncBaseClientBuilder addHeader(String name, String value) {
+ public T addHeader(String name, String value) {
this.customHeaders.put(name, value);
- return this;
+ return (T) this;
}
- public AsyncBaseClientBuilder projectId(String projectId) {
+ public T projectId(String projectId) {
this.projectId = projectId;
- return this;
+ return (T) this;
}
protected ClientOptions buildClientOptions() {
@@ -298,7 +295,7 @@ public AsyncBaseClient build() {
return new AsyncBaseClient(buildClientOptions());
}
- public static final class _TokenAuth extends AsyncBaseClientBuilder {
+ public static final class _TokenAuth extends AsyncBaseClientBuilder<_TokenAuth> {
private final String token;
_TokenAuth(String token) {
@@ -311,7 +308,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
}
}
- public static final class _CredentialsAuth extends AsyncBaseClientBuilder {
+ public static final class _CredentialsAuth extends AsyncBaseClientBuilder<_CredentialsAuth> {
private final String clientId;
private final String clientSecret;
@@ -351,6 +348,8 @@ public static final class _Builder {
private OkHttpClient httpClient;
+ private Optional logging = Optional.empty();
+
private final Map headers = new HashMap<>();
public _Builder environment(Environment environment) {
@@ -387,6 +386,14 @@ public _Builder httpClient(OkHttpClient httpClient) {
return this;
}
+ /**
+ * Configure logging for the SDK. Silent by default — no log output unless explicitly configured.
+ */
+ public _Builder logging(LogConfig logging) {
+ this.logging = Optional.of(logging);
+ return this;
+ }
+
/**
* Add a custom header to be sent with all requests.
* @param name The header name
@@ -408,21 +415,7 @@ public _Builder addHeader(String name, String value) {
*/
public _TokenAuth token(String token) {
_TokenAuth auth = new _TokenAuth(token);
- if (this.environment != null) {
- auth.environment = this.environment;
- }
- if (this.timeout.isPresent()) {
- auth.timeout(this.timeout.get());
- }
- if (this.maxRetries.isPresent()) {
- auth.maxRetries(this.maxRetries.get());
- }
- if (this.httpClient != null) {
- auth.httpClient(this.httpClient);
- }
- for (Map.Entry header : this.headers.entrySet()) {
- auth.addHeader(header.getKey(), header.getValue());
- }
+ applyTo(auth);
return auth;
}
@@ -436,6 +429,11 @@ public _TokenAuth token(String token) {
*/
public _CredentialsAuth credentials(String clientId, String clientSecret) {
_CredentialsAuth auth = new _CredentialsAuth(clientId, clientSecret);
+ applyTo(auth);
+ return auth;
+ }
+
+ private > void applyTo(B auth) {
if (this.environment != null) {
auth.environment = this.environment;
}
@@ -448,10 +446,12 @@ public _CredentialsAuth credentials(String clientId, String clientSecret) {
if (this.httpClient != null) {
auth.httpClient(this.httpClient);
}
+ if (this.logging.isPresent()) {
+ auth.logging(this.logging.get());
+ }
for (Map.Entry header : this.headers.entrySet()) {
auth.addHeader(header.getKey(), header.getValue());
}
- return auth;
}
}
}
diff --git a/src/main/java/com/pipedream/api/BaseClient.java b/src/main/java/com/pipedream/api/BaseClient.java
index 6d39477..056a9f9 100644
--- a/src/main/java/com/pipedream/api/BaseClient.java
+++ b/src/main/java/com/pipedream/api/BaseClient.java
@@ -152,12 +152,4 @@ public static BaseClientBuilder._TokenAuth withToken(String token) {
public static BaseClientBuilder._CredentialsAuth withCredentials(String clientId, String clientSecret) {
return BaseClientBuilder.withCredentials(clientId, clientSecret);
}
-
- /**
- * Creates a new client builder.
- * @return A builder for configuring and creating the client
- */
- public static BaseClientBuilder._Builder builder() {
- return BaseClientBuilder.builder();
- }
}
diff --git a/src/main/java/com/pipedream/api/BaseClientBuilder.java b/src/main/java/com/pipedream/api/BaseClientBuilder.java
index d632962..74601de 100644
--- a/src/main/java/com/pipedream/api/BaseClientBuilder.java
+++ b/src/main/java/com/pipedream/api/BaseClientBuilder.java
@@ -1,6 +1,3 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
package com.pipedream.api;
import com.pipedream.api.core.ClientOptions;
@@ -13,7 +10,7 @@
import java.util.Optional;
import okhttp3.OkHttpClient;
-public class BaseClientBuilder {
+public class BaseClientBuilder> {
private Optional timeout = Optional.empty();
private Optional maxRetries = Optional.empty();
@@ -67,51 +64,51 @@ public static _Builder builder() {
/**
* Sets projectEnvironment
*/
- public BaseClientBuilder projectEnvironment(String projectEnvironment) {
+ public T projectEnvironment(String projectEnvironment) {
this.projectEnvironment = projectEnvironment;
- return this;
+ return (T) this;
}
- public BaseClientBuilder environment(Environment environment) {
+ public T environment(Environment environment) {
this.environment = environment;
- return this;
+ return (T) this;
}
- public BaseClientBuilder url(String url) {
+ public T url(String url) {
this.environment = Environment.custom(url);
- return this;
+ return (T) this;
}
/**
* Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
*/
- public BaseClientBuilder timeout(int timeout) {
+ public T timeout(int timeout) {
this.timeout = Optional.of(timeout);
- return this;
+ return (T) this;
}
/**
* Sets the maximum number of retries for the client. Defaults to 2 retries.
*/
- public BaseClientBuilder maxRetries(int maxRetries) {
+ public T maxRetries(int maxRetries) {
this.maxRetries = Optional.of(maxRetries);
- return this;
+ return (T) this;
}
/**
* Sets the underlying OkHttp client
*/
- public BaseClientBuilder httpClient(OkHttpClient httpClient) {
+ public T httpClient(OkHttpClient httpClient) {
this.httpClient = httpClient;
- return this;
+ return (T) this;
}
/**
* Configure logging for the SDK. Silent by default — no log output unless explicitly configured.
*/
- public BaseClientBuilder logging(LogConfig logging) {
+ public T logging(LogConfig logging) {
this.logging = Optional.of(logging);
- return this;
+ return (T) this;
}
/**
@@ -122,14 +119,14 @@ public BaseClientBuilder logging(LogConfig logging) {
* @param value The header value
* @return This builder for method chaining
*/
- public BaseClientBuilder addHeader(String name, String value) {
+ public T addHeader(String name, String value) {
this.customHeaders.put(name, value);
- return this;
+ return (T) this;
}
- public BaseClientBuilder projectId(String projectId) {
+ public T projectId(String projectId) {
this.projectId = projectId;
- return this;
+ return (T) this;
}
protected ClientOptions buildClientOptions() {
@@ -298,7 +295,7 @@ public BaseClient build() {
return new BaseClient(buildClientOptions());
}
- public static final class _TokenAuth extends BaseClientBuilder {
+ public static final class _TokenAuth extends BaseClientBuilder<_TokenAuth> {
private final String token;
_TokenAuth(String token) {
@@ -311,7 +308,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
}
}
- public static final class _CredentialsAuth extends BaseClientBuilder {
+ public static final class _CredentialsAuth extends BaseClientBuilder<_CredentialsAuth> {
private final String clientId;
private final String clientSecret;
@@ -351,6 +348,8 @@ public static final class _Builder {
private OkHttpClient httpClient;
+ private Optional logging = Optional.empty();
+
private final Map