Skip to content

Commit 293e80a

Browse files
authored
Merge branch 'main' into fern-bot/2025-07-31T22-26Z
2 parents a2a0c98 + 72c8358 commit 293e80a

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22

33
import com.pipedream.api.core.ClientOptions;
44
import com.pipedream.api.core.Environment;
5-
import java.util.Optional;
5+
import com.pipedream.api.core.Suppliers;
6+
import com.pipedream.api.resources.workflows.WorkflowsClient;
67
import org.immutables.value.Value;
78

9+
import java.util.Optional;
10+
import java.util.function.Supplier;
11+
812
@Value
913
public class AsyncPipedreamClient extends AsyncBaseClient {
14+
private final Supplier<WorkflowsClient> workflowsClient;
15+
1016
public AsyncPipedreamClient(final ClientOptions clientOptions) {
1117
super(clientOptions);
18+
this.workflowsClient = Suppliers.memoize(() -> new WorkflowsClient(clientOptions));
1219
}
1320

1421
public static AsyncPipedreamClientBuilder builder() {
@@ -33,4 +40,8 @@ public Optional<String> rawAccessToken() {
3340
// or `Basic` prefix from the header value.
3441
return Optional.ofNullable(authorizationHeader).map(h -> h.replaceFirst("^.*?\\s+", ""));
3542
}
43+
44+
public WorkflowsClient workflows() {
45+
return this.workflowsClient.get();
46+
}
3647
}

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22

33
import com.pipedream.api.core.ClientOptions;
44
import com.pipedream.api.core.Environment;
5-
import java.util.Optional;
5+
import com.pipedream.api.core.Suppliers;
6+
import com.pipedream.api.resources.workflows.WorkflowsClient;
67
import org.immutables.value.Value;
78

9+
import java.util.Optional;
10+
import java.util.function.Supplier;
11+
812
@Value
913
public class PipedreamClient extends BaseClient {
14+
private final Supplier<WorkflowsClient> workflowsClient;
15+
1016
public PipedreamClient(final ClientOptions clientOptions) {
1117
super(clientOptions);
18+
this.workflowsClient = Suppliers.memoize(() -> new WorkflowsClient(clientOptions));
1219
}
1320

1421
public static PipedreamClientBuilder builder() {
@@ -33,4 +40,8 @@ public Optional<String> rawAccessToken() {
3340
// or `Basic` prefix from the header value.
3441
return Optional.ofNullable(authorizationHeader).map(h -> h.replaceFirst("^.*?\\s+", ""));
3542
}
43+
44+
public WorkflowsClient workflows() {
45+
return this.workflowsClient.get();
46+
}
3647
}

0 commit comments

Comments
 (0)