Skip to content

Commit d16a778

Browse files
committed
[fern-generated] Update SDK
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 4.8.11
1 parent f3ee599 commit d16a778

33 files changed

Lines changed: 404 additions & 2591 deletions

.fern/metadata.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"cliVersion": "5.17.0",
2+
"cliVersion": "5.37.12",
33
"generatorName": "fernapi/fern-java-sdk",
4-
"generatorVersion": "4.8.4",
4+
"generatorVersion": "4.8.11",
55
"generatorConfig": {
66
"publish-to": "central",
77
"client-class-name": "BaseClient",
@@ -10,9 +10,8 @@
1010
],
1111
"retry-status-codes": "legacy"
1212
},
13-
"originGitCommit": "fa2fad94474bee68b5a4c87f25775ff6701a0fe6",
14-
"originGitCommitIsDirty": false,
15-
"invokedBy": "ci",
16-
"ciProvider": "github",
17-
"sdkVersion": "2.0.4"
13+
"originGitCommit": "320eac6d2809f95097ec1bb8cdb630cf13316b22",
14+
"originGitCommitIsDirty": true,
15+
"invokedBy": "manual",
16+
"sdkVersion": "2.0.5"
1817
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Add the dependency in your `build.gradle` file:
3030

3131
```groovy
3232
dependencies {
33-
implementation 'com.pipedream:pipedream:2.0.4'
33+
implementation 'com.pipedream:pipedream:2.0.5'
3434
}
3535
```
3636

@@ -42,7 +42,7 @@ Add the dependency in your `pom.xml` file:
4242
<dependency>
4343
<groupId>com.pipedream</groupId>
4444
<artifactId>pipedream</artifactId>
45-
<version>2.0.4</version>
45+
<version>2.0.5</version>
4646
</dependency>
4747
```
4848

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ java {
4848

4949
group = 'com.pipedream'
5050

51-
version = '2.0.4'
51+
version = '2.0.5'
5252

5353
jar {
5454
dependsOn(":generatePomFileForMavenPublication")
@@ -79,7 +79,7 @@ publishing {
7979
maven(MavenPublication) {
8080
groupId = 'com.pipedream'
8181
artifactId = 'pipedream'
82-
version = '2.0.4'
82+
version = '2.0.5'
8383
from components.java
8484
pom {
8585
name = 'pipedream'

reference.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,91 @@ client.accounts().deleteByApp("app_id");
727727
</dl>
728728

729729

730+
</dd>
731+
</dl>
732+
</details>
733+
734+
<details><summary><code>client.accounts.listByExternalUser(projectId, externalUserId) -> List&amp;lt;Account&amp;gt;</code></summary>
735+
<dl>
736+
<dd>
737+
738+
#### 📝 Description
739+
740+
<dl>
741+
<dd>
742+
743+
<dl>
744+
<dd>
745+
746+
List all connected accounts for a specific external user. Equivalent to GET /accounts with external_user_id filter but uses path-based routing.
747+
</dd>
748+
</dl>
749+
</dd>
750+
</dl>
751+
752+
#### 🔌 Usage
753+
754+
<dl>
755+
<dd>
756+
757+
<dl>
758+
<dd>
759+
760+
```java
761+
client.accounts().listByExternalUser(
762+
"external_user_id",
763+
AccountsListByExternalUserRequest
764+
.builder()
765+
.includeCredentials(true)
766+
.app("app")
767+
.build()
768+
);
769+
```
770+
</dd>
771+
</dl>
772+
</dd>
773+
</dl>
774+
775+
#### ⚙️ Parameters
776+
777+
<dl>
778+
<dd>
779+
780+
<dl>
781+
<dd>
782+
783+
**projectId:** `String` — The project ID, which starts with `proj_`.
784+
785+
</dd>
786+
</dl>
787+
788+
<dl>
789+
<dd>
790+
791+
**externalUserId:** `String`
792+
793+
</dd>
794+
</dl>
795+
796+
<dl>
797+
<dd>
798+
799+
**includeCredentials:** `Optional<Boolean>`
800+
801+
</dd>
802+
</dl>
803+
804+
<dl>
805+
<dd>
806+
807+
**app:** `Optional<String>`
808+
809+
</dd>
810+
</dl>
811+
</dd>
812+
</dl>
813+
814+
730815
</dd>
731816
</dl>
732817
</details>

src/main/java/com/pipedream/api/AsyncBaseClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,12 @@ public static AsyncBaseClientBuilder._TokenAuth withToken(String token) {
152152
public static AsyncBaseClientBuilder._CredentialsAuth withCredentials(String clientId, String clientSecret) {
153153
return AsyncBaseClientBuilder.withCredentials(clientId, clientSecret);
154154
}
155+
156+
/**
157+
* Creates a new client builder.
158+
* @return A builder for configuring and creating the client
159+
*/
160+
public static AsyncBaseClientBuilder._Builder builder() {
161+
return AsyncBaseClientBuilder.builder();
162+
}
155163
}

src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
14
package com.pipedream.api;
25

36
import com.pipedream.api.core.ClientOptions;
@@ -10,7 +13,7 @@
1013
import java.util.Optional;
1114
import okhttp3.OkHttpClient;
1215

13-
public class AsyncBaseClientBuilder<T extends AsyncBaseClientBuilder<T>> {
16+
public class AsyncBaseClientBuilder {
1417
private Optional<Integer> timeout = Optional.empty();
1518

1619
private Optional<Integer> maxRetries = Optional.empty();
@@ -64,51 +67,51 @@ public static _Builder builder() {
6467
/**
6568
* Sets projectEnvironment
6669
*/
67-
public T projectEnvironment(String projectEnvironment) {
70+
public AsyncBaseClientBuilder projectEnvironment(String projectEnvironment) {
6871
this.projectEnvironment = projectEnvironment;
69-
return (T) this;
72+
return this;
7073
}
7174

72-
public T environment(Environment environment) {
75+
public AsyncBaseClientBuilder environment(Environment environment) {
7376
this.environment = environment;
74-
return (T) this;
77+
return this;
7578
}
7679

77-
public T url(String url) {
80+
public AsyncBaseClientBuilder url(String url) {
7881
this.environment = Environment.custom(url);
79-
return (T) this;
82+
return this;
8083
}
8184

8285
/**
8386
* Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
8487
*/
85-
public T timeout(int timeout) {
88+
public AsyncBaseClientBuilder timeout(int timeout) {
8689
this.timeout = Optional.of(timeout);
87-
return (T) this;
90+
return this;
8891
}
8992

9093
/**
9194
* Sets the maximum number of retries for the client. Defaults to 2 retries.
9295
*/
93-
public T maxRetries(int maxRetries) {
96+
public AsyncBaseClientBuilder maxRetries(int maxRetries) {
9497
this.maxRetries = Optional.of(maxRetries);
95-
return (T) this;
98+
return this;
9699
}
97100

98101
/**
99102
* Sets the underlying OkHttp client
100103
*/
101-
public T httpClient(OkHttpClient httpClient) {
104+
public AsyncBaseClientBuilder httpClient(OkHttpClient httpClient) {
102105
this.httpClient = httpClient;
103-
return (T) this;
106+
return this;
104107
}
105108

106109
/**
107110
* Configure logging for the SDK. Silent by default — no log output unless explicitly configured.
108111
*/
109-
public T logging(LogConfig logging) {
112+
public AsyncBaseClientBuilder logging(LogConfig logging) {
110113
this.logging = Optional.of(logging);
111-
return (T) this;
114+
return this;
112115
}
113116

114117
/**
@@ -119,14 +122,14 @@ public T logging(LogConfig logging) {
119122
* @param value The header value
120123
* @return This builder for method chaining
121124
*/
122-
public T addHeader(String name, String value) {
125+
public AsyncBaseClientBuilder addHeader(String name, String value) {
123126
this.customHeaders.put(name, value);
124-
return (T) this;
127+
return this;
125128
}
126129

127-
public T projectId(String projectId) {
130+
public AsyncBaseClientBuilder projectId(String projectId) {
128131
this.projectId = projectId;
129-
return (T) this;
132+
return this;
130133
}
131134

132135
protected ClientOptions buildClientOptions() {
@@ -295,7 +298,7 @@ public AsyncBaseClient build() {
295298
return new AsyncBaseClient(buildClientOptions());
296299
}
297300

298-
public static final class _TokenAuth extends AsyncBaseClientBuilder<_TokenAuth> {
301+
public static final class _TokenAuth extends AsyncBaseClientBuilder {
299302
private final String token;
300303

301304
_TokenAuth(String token) {
@@ -308,7 +311,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
308311
}
309312
}
310313

311-
public static final class _CredentialsAuth extends AsyncBaseClientBuilder<_CredentialsAuth> {
314+
public static final class _CredentialsAuth extends AsyncBaseClientBuilder {
312315
private final String clientId;
313316

314317
private final String clientSecret;
@@ -348,8 +351,6 @@ public static final class _Builder {
348351

349352
private OkHttpClient httpClient;
350353

351-
private Optional<LogConfig> logging = Optional.empty();
352-
353354
private final Map<String, String> headers = new HashMap<>();
354355

355356
public _Builder environment(Environment environment) {
@@ -386,14 +387,6 @@ public _Builder httpClient(OkHttpClient httpClient) {
386387
return this;
387388
}
388389

389-
/**
390-
* Configure logging for the SDK. Silent by default — no log output unless explicitly configured.
391-
*/
392-
public _Builder logging(LogConfig logging) {
393-
this.logging = Optional.of(logging);
394-
return this;
395-
}
396-
397390
/**
398391
* Add a custom header to be sent with all requests.
399392
* @param name The header name
@@ -415,7 +408,21 @@ public _Builder addHeader(String name, String value) {
415408
*/
416409
public _TokenAuth token(String token) {
417410
_TokenAuth auth = new _TokenAuth(token);
418-
applyTo(auth);
411+
if (this.environment != null) {
412+
auth.environment = this.environment;
413+
}
414+
if (this.timeout.isPresent()) {
415+
auth.timeout(this.timeout.get());
416+
}
417+
if (this.maxRetries.isPresent()) {
418+
auth.maxRetries(this.maxRetries.get());
419+
}
420+
if (this.httpClient != null) {
421+
auth.httpClient(this.httpClient);
422+
}
423+
for (Map.Entry<String, String> header : this.headers.entrySet()) {
424+
auth.addHeader(header.getKey(), header.getValue());
425+
}
419426
return auth;
420427
}
421428

@@ -429,11 +436,6 @@ public _TokenAuth token(String token) {
429436
*/
430437
public _CredentialsAuth credentials(String clientId, String clientSecret) {
431438
_CredentialsAuth auth = new _CredentialsAuth(clientId, clientSecret);
432-
applyTo(auth);
433-
return auth;
434-
}
435-
436-
private <B extends AsyncBaseClientBuilder<B>> void applyTo(B auth) {
437439
if (this.environment != null) {
438440
auth.environment = this.environment;
439441
}
@@ -446,12 +448,10 @@ private <B extends AsyncBaseClientBuilder<B>> void applyTo(B auth) {
446448
if (this.httpClient != null) {
447449
auth.httpClient(this.httpClient);
448450
}
449-
if (this.logging.isPresent()) {
450-
auth.logging(this.logging.get());
451-
}
452451
for (Map.Entry<String, String> header : this.headers.entrySet()) {
453452
auth.addHeader(header.getKey(), header.getValue());
454453
}
454+
return auth;
455455
}
456456
}
457457
}

src/main/java/com/pipedream/api/BaseClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,12 @@ public static BaseClientBuilder._TokenAuth withToken(String token) {
152152
public static BaseClientBuilder._CredentialsAuth withCredentials(String clientId, String clientSecret) {
153153
return BaseClientBuilder.withCredentials(clientId, clientSecret);
154154
}
155+
156+
/**
157+
* Creates a new client builder.
158+
* @return A builder for configuring and creating the client
159+
*/
160+
public static BaseClientBuilder._Builder builder() {
161+
return BaseClientBuilder.builder();
162+
}
155163
}

0 commit comments

Comments
 (0)