From 99fe508aaee38089224aee14a859531ae43068b4 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 13 May 2026 19:13:40 +0000
Subject: [PATCH] SDK regeneration
---
.fern/metadata.json | 4 +-
README.md | 4 +-
build.gradle | 4 +-
.../com/pipedream/api/core/ClientOptions.java | 4 +-
.../resources/accounts/AccountsClient.java | 33 +++++
.../accounts/AsyncAccountsClient.java | 34 +++++
.../accounts/AsyncRawAccountsClient.java | 103 ++++++++++++++
.../resources/accounts/RawAccountsClient.java | 88 ++++++++++++
.../AccountsListByExternalUserRequest.java | 128 ++++++++++++++++++
9 files changed, 394 insertions(+), 8 deletions(-)
create mode 100644 src/main/java/com/pipedream/api/resources/accounts/requests/AccountsListByExternalUserRequest.java
diff --git a/.fern/metadata.json b/.fern/metadata.json
index f8cfed2..f259154 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -10,9 +10,9 @@
],
"retry-status-codes": "legacy"
},
- "originGitCommit": "b399bbbdcc0ed7ed414d0fcc795c5c6b6dea46eb",
+ "originGitCommit": "267ec323a4305eba2c41bd93e26686a26e329107",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"ciProvider": "github",
- "sdkVersion": "2.0.1"
+ "sdkVersion": "2.0.2"
}
\ No newline at end of file
diff --git a/README.md b/README.md
index c1647b9..65339b9 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ Add the dependency in your `build.gradle` file:
```groovy
dependencies {
- implementation 'com.pipedream:pipedream:2.0.1'
+ implementation 'com.pipedream:pipedream:2.0.2'
}
```
@@ -42,7 +42,7 @@ Add the dependency in your `pom.xml` file:
com.pipedream
pipedream
- 2.0.1
+ 2.0.2
```
diff --git a/build.gradle b/build.gradle
index d608ac0..e9a564f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -48,7 +48,7 @@ java {
group = 'com.pipedream'
-version = '2.0.1'
+version = '2.0.2'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -79,7 +79,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.pipedream'
artifactId = 'pipedream'
- version = '2.0.1'
+ version = '2.0.2'
from components.java
pom {
name = 'pipedream'
diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java
index a96357c..d8fc599 100644
--- a/src/main/java/com/pipedream/api/core/ClientOptions.java
+++ b/src/main/java/com/pipedream/api/core/ClientOptions.java
@@ -41,10 +41,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.pipedream:pipedream/2.0.1");
+ put("User-Agent", "com.pipedream:pipedream/2.0.2");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
- put("X-Fern-SDK-Version", "2.0.1");
+ put("X-Fern-SDK-Version", "2.0.2");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/pipedream/api/resources/accounts/AccountsClient.java b/src/main/java/com/pipedream/api/resources/accounts/AccountsClient.java
index ecc6a18..a020dd0 100644
--- a/src/main/java/com/pipedream/api/resources/accounts/AccountsClient.java
+++ b/src/main/java/com/pipedream/api/resources/accounts/AccountsClient.java
@@ -6,10 +6,12 @@
import com.pipedream.api.core.ClientOptions;
import com.pipedream.api.core.RequestOptions;
import com.pipedream.api.core.pagination.SyncPagingIterable;
+import com.pipedream.api.resources.accounts.requests.AccountsListByExternalUserRequest;
import com.pipedream.api.resources.accounts.requests.AccountsListRequest;
import com.pipedream.api.resources.accounts.requests.AccountsRetrieveRequest;
import com.pipedream.api.resources.accounts.requests.CreateAccountOpts;
import com.pipedream.api.types.Account;
+import java.util.List;
public class AccountsClient {
protected final ClientOptions clientOptions;
@@ -125,4 +127,35 @@ public void deleteByApp(String appId) {
public void deleteByApp(String appId, RequestOptions requestOptions) {
this.rawClient.deleteByApp(appId, requestOptions).body();
}
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public List listByExternalUser(String externalUserId) {
+ return this.rawClient.listByExternalUser(externalUserId).body();
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public List listByExternalUser(String externalUserId, RequestOptions requestOptions) {
+ return this.rawClient.listByExternalUser(externalUserId, requestOptions).body();
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public List listByExternalUser(String externalUserId, AccountsListByExternalUserRequest request) {
+ return this.rawClient.listByExternalUser(externalUserId, request).body();
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public List listByExternalUser(
+ String externalUserId, AccountsListByExternalUserRequest request, RequestOptions requestOptions) {
+ return this.rawClient
+ .listByExternalUser(externalUserId, request, requestOptions)
+ .body();
+ }
}
diff --git a/src/main/java/com/pipedream/api/resources/accounts/AsyncAccountsClient.java b/src/main/java/com/pipedream/api/resources/accounts/AsyncAccountsClient.java
index 26064b3..275a07a 100644
--- a/src/main/java/com/pipedream/api/resources/accounts/AsyncAccountsClient.java
+++ b/src/main/java/com/pipedream/api/resources/accounts/AsyncAccountsClient.java
@@ -6,10 +6,12 @@
import com.pipedream.api.core.ClientOptions;
import com.pipedream.api.core.RequestOptions;
import com.pipedream.api.core.pagination.SyncPagingIterable;
+import com.pipedream.api.resources.accounts.requests.AccountsListByExternalUserRequest;
import com.pipedream.api.resources.accounts.requests.AccountsListRequest;
import com.pipedream.api.resources.accounts.requests.AccountsRetrieveRequest;
import com.pipedream.api.resources.accounts.requests.CreateAccountOpts;
import com.pipedream.api.types.Account;
+import java.util.List;
import java.util.concurrent.CompletableFuture;
public class AsyncAccountsClient {
@@ -128,4 +130,36 @@ public CompletableFuture deleteByApp(String appId) {
public CompletableFuture deleteByApp(String appId, RequestOptions requestOptions) {
return this.rawClient.deleteByApp(appId, requestOptions).thenApply(response -> response.body());
}
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public CompletableFuture> listByExternalUser(String externalUserId) {
+ return this.rawClient.listByExternalUser(externalUserId).thenApply(response -> response.body());
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public CompletableFuture> listByExternalUser(String externalUserId, RequestOptions requestOptions) {
+ return this.rawClient.listByExternalUser(externalUserId, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public CompletableFuture> listByExternalUser(
+ String externalUserId, AccountsListByExternalUserRequest request) {
+ return this.rawClient.listByExternalUser(externalUserId, request).thenApply(response -> response.body());
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public CompletableFuture> listByExternalUser(
+ String externalUserId, AccountsListByExternalUserRequest request, RequestOptions requestOptions) {
+ return this.rawClient
+ .listByExternalUser(externalUserId, request, requestOptions)
+ .thenApply(response -> response.body());
+ }
}
diff --git a/src/main/java/com/pipedream/api/resources/accounts/AsyncRawAccountsClient.java b/src/main/java/com/pipedream/api/resources/accounts/AsyncRawAccountsClient.java
index e137079..3f1be50 100644
--- a/src/main/java/com/pipedream/api/resources/accounts/AsyncRawAccountsClient.java
+++ b/src/main/java/com/pipedream/api/resources/accounts/AsyncRawAccountsClient.java
@@ -4,6 +4,7 @@
package com.pipedream.api.resources.accounts;
import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
import com.pipedream.api.core.BaseClientApiException;
import com.pipedream.api.core.BaseClientException;
import com.pipedream.api.core.BaseClientHttpResponse;
@@ -14,6 +15,7 @@
import com.pipedream.api.core.RequestOptions;
import com.pipedream.api.core.pagination.SyncPagingIterable;
import com.pipedream.api.errors.TooManyRequestsError;
+import com.pipedream.api.resources.accounts.requests.AccountsListByExternalUserRequest;
import com.pipedream.api.resources.accounts.requests.AccountsListRequest;
import com.pipedream.api.resources.accounts.requests.AccountsRetrieveRequest;
import com.pipedream.api.resources.accounts.requests.CreateAccountOpts;
@@ -488,4 +490,105 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
});
return future;
}
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public CompletableFuture>> listByExternalUser(String externalUserId) {
+ return listByExternalUser(
+ externalUserId, AccountsListByExternalUserRequest.builder().build());
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public CompletableFuture>> listByExternalUser(
+ String externalUserId, RequestOptions requestOptions) {
+ return listByExternalUser(
+ externalUserId, AccountsListByExternalUserRequest.builder().build(), requestOptions);
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public CompletableFuture>> listByExternalUser(
+ String externalUserId, AccountsListByExternalUserRequest request) {
+ return listByExternalUser(externalUserId, request, null);
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public CompletableFuture>> listByExternalUser(
+ String externalUserId, AccountsListByExternalUserRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("v1/connect")
+ .addPathSegment(clientOptions.projectId())
+ .addPathSegments("users")
+ .addPathSegment(externalUserId)
+ .addPathSegments("accounts");
+ if (request.getIncludeCredentials().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl,
+ "include_credentials",
+ request.getIncludeCredentials().get(),
+ false);
+ }
+ if (request.getApp().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "app", request.getApp().get(), false);
+ }
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ CompletableFuture>> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseClientHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, new TypeReference>() {}),
+ response));
+ return;
+ }
+ try {
+ if (response.code() == 429) {
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseClientApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseClientException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseClientException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
}
diff --git a/src/main/java/com/pipedream/api/resources/accounts/RawAccountsClient.java b/src/main/java/com/pipedream/api/resources/accounts/RawAccountsClient.java
index dc2f286..6b9ec6e 100644
--- a/src/main/java/com/pipedream/api/resources/accounts/RawAccountsClient.java
+++ b/src/main/java/com/pipedream/api/resources/accounts/RawAccountsClient.java
@@ -4,6 +4,7 @@
package com.pipedream.api.resources.accounts;
import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
import com.pipedream.api.core.BaseClientApiException;
import com.pipedream.api.core.BaseClientException;
import com.pipedream.api.core.BaseClientHttpResponse;
@@ -14,6 +15,7 @@
import com.pipedream.api.core.RequestOptions;
import com.pipedream.api.core.pagination.SyncPagingIterable;
import com.pipedream.api.errors.TooManyRequestsError;
+import com.pipedream.api.resources.accounts.requests.AccountsListByExternalUserRequest;
import com.pipedream.api.resources.accounts.requests.AccountsListRequest;
import com.pipedream.api.resources.accounts.requests.AccountsRetrieveRequest;
import com.pipedream.api.resources.accounts.requests.CreateAccountOpts;
@@ -402,4 +404,90 @@ public BaseClientHttpResponse deleteByApp(String appId, RequestOptions req
throw new BaseClientException("Network error executing HTTP request", e);
}
}
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public BaseClientHttpResponse> listByExternalUser(String externalUserId) {
+ return listByExternalUser(
+ externalUserId, AccountsListByExternalUserRequest.builder().build());
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public BaseClientHttpResponse> listByExternalUser(
+ String externalUserId, RequestOptions requestOptions) {
+ return listByExternalUser(
+ externalUserId, AccountsListByExternalUserRequest.builder().build(), requestOptions);
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public BaseClientHttpResponse> listByExternalUser(
+ String externalUserId, AccountsListByExternalUserRequest request) {
+ return listByExternalUser(externalUserId, request, null);
+ }
+
+ /**
+ * List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
+ */
+ public BaseClientHttpResponse> listByExternalUser(
+ String externalUserId, AccountsListByExternalUserRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("v1/connect")
+ .addPathSegment(clientOptions.projectId())
+ .addPathSegments("users")
+ .addPathSegment(externalUserId)
+ .addPathSegments("accounts");
+ if (request.getIncludeCredentials().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl,
+ "include_credentials",
+ request.getIncludeCredentials().get(),
+ false);
+ }
+ if (request.getApp().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "app", request.getApp().get(), false);
+ }
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseClientHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, new TypeReference>() {}),
+ response);
+ }
+ try {
+ if (response.code() == 429) {
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseClientApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (IOException e) {
+ throw new BaseClientException("Network error executing HTTP request", e);
+ }
+ }
}
diff --git a/src/main/java/com/pipedream/api/resources/accounts/requests/AccountsListByExternalUserRequest.java b/src/main/java/com/pipedream/api/resources/accounts/requests/AccountsListByExternalUserRequest.java
new file mode 100644
index 0000000..2b8e74c
--- /dev/null
+++ b/src/main/java/com/pipedream/api/resources/accounts/requests/AccountsListByExternalUserRequest.java
@@ -0,0 +1,128 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.pipedream.api.resources.accounts.requests;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.pipedream.api.core.ObjectMappers;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = AccountsListByExternalUserRequest.Builder.class)
+public final class AccountsListByExternalUserRequest {
+ private final Optional includeCredentials;
+
+ private final Optional app;
+
+ private final Map additionalProperties;
+
+ private AccountsListByExternalUserRequest(
+ Optional includeCredentials, Optional app, Map additionalProperties) {
+ this.includeCredentials = includeCredentials;
+ this.app = app;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("include_credentials")
+ public Optional getIncludeCredentials() {
+ return includeCredentials;
+ }
+
+ @JsonProperty("app")
+ public Optional getApp() {
+ return app;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof AccountsListByExternalUserRequest && equalTo((AccountsListByExternalUserRequest) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(AccountsListByExternalUserRequest other) {
+ return includeCredentials.equals(other.includeCredentials) && app.equals(other.app);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.includeCredentials, this.app);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional includeCredentials = Optional.empty();
+
+ private Optional app = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(AccountsListByExternalUserRequest other) {
+ includeCredentials(other.getIncludeCredentials());
+ app(other.getApp());
+ return this;
+ }
+
+ @JsonSetter(value = "include_credentials", nulls = Nulls.SKIP)
+ public Builder includeCredentials(Optional includeCredentials) {
+ this.includeCredentials = includeCredentials;
+ return this;
+ }
+
+ public Builder includeCredentials(Boolean includeCredentials) {
+ this.includeCredentials = Optional.ofNullable(includeCredentials);
+ return this;
+ }
+
+ @JsonSetter(value = "app", nulls = Nulls.SKIP)
+ public Builder app(Optional app) {
+ this.app = app;
+ return this;
+ }
+
+ public Builder app(String app) {
+ this.app = Optional.ofNullable(app);
+ return this;
+ }
+
+ public AccountsListByExternalUserRequest build() {
+ return new AccountsListByExternalUserRequest(includeCredentials, app, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}