Skip to content

Commit 367231a

Browse files
authored
Merge pull request #63 from apideck-libraries/speakeasy-sdk-regen-1756222557
chore: 🐝 Update SDK - Generate 0.20.0
2 parents 0cb54e9 + 82ae07c commit 367231a

File tree

1,538 files changed

+209026
-4545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,538 files changed

+209026
-4545
lines changed

.speakeasy/gen.lock

Lines changed: 833 additions & 24 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,19 @@ generation:
2121
generateNewTests: false
2222
skipResponseBodyAssertions: false
2323
java:
24-
version: 0.19.6
24+
version: 0.20.0
2525
additionalDependencies: []
2626
additionalPlugins: []
2727
artifactID: unify
28+
asyncMode: enabled
2829
baseErrorName: ApideckError
2930
clientServerStatusCodesAsErrors: true
3031
companyEmail: [email protected]
3132
companyName: Apideck
3233
companyURL: www.apideck.com
3334
defaultErrorName: APIException
34-
enableAsync: false
3535
enableCustomCodeRegions: false
36+
enableStreamingUploads: false
3637
flattenGlobalSecurity: true
3738
githubURL: github.com/apideck-libraries/sdk-java
3839
groupID: com.apideck

.speakeasy/workflow.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.606.4
1+
speakeasyVersion: 1.611.1
22
sources:
33
Apideck-OAS:
44
sourceNamespace: apideck-oas
5-
sourceRevisionDigest: sha256:078e68a8cec3da1e448d7bc55dd01b005f0098ef6b50595d24b7ebc9c07f4b89
6-
sourceBlobDigest: sha256:124328f4c187b9316e99832028dd5a8473d10f603564cf1bd2bfdbad33f8fb66
5+
sourceRevisionDigest: sha256:cb0201d032f54350a28bd8c493037ef74777e49604a1b8f76718c2d0d9918db4
6+
sourceBlobDigest: sha256:88de9a39fea7106d70b4526a9c8207a4c54c38a3c13136b2b27fbb947336e267
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1755873448
10-
- 10.20.11
9+
- speakeasy-sdk-regen-1756222557
10+
- 10.20.13
1111
targets:
1212
apideck:
1313
source: Apideck-OAS
1414
sourceNamespace: apideck-oas
15-
sourceRevisionDigest: sha256:078e68a8cec3da1e448d7bc55dd01b005f0098ef6b50595d24b7ebc9c07f4b89
16-
sourceBlobDigest: sha256:124328f4c187b9316e99832028dd5a8473d10f603564cf1bd2bfdbad33f8fb66
15+
sourceRevisionDigest: sha256:cb0201d032f54350a28bd8c493037ef74777e49604a1b8f76718c2d0d9918db4
16+
sourceBlobDigest: sha256:88de9a39fea7106d70b4526a9c8207a4c54c38a3c13136b2b27fbb947336e267
1717
codeSamplesNamespace: apideck-oas-java-code-samples
18-
codeSamplesRevisionDigest: sha256:ea92545e2dff7135fd738b339b446c1d7c8523e0474e42ce69ba8f42dfaf5344
18+
codeSamplesRevisionDigest: sha256:54eb8baab6c83d948e18f408565f292b896a31660c931e855c482b86d9b5b56c
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

README.md

Lines changed: 193 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ For more information about the API: [Apideck Developer Docs](https://developers.
2929
* [Retries](#retries)
3030
* [Error Handling](#error-handling)
3131
* [Server Selection](#server-selection)
32+
* [Asynchronous Support](#asynchronous-support)
3233
* [Authentication](#authentication)
3334
* [Debugging](#debugging)
3435
* [Development](#development)
@@ -48,15 +49,15 @@ The samples below show how a published SDK artifact is used:
4849

4950
Gradle:
5051
```groovy
51-
implementation 'com.apideck:unify:0.19.6'
52+
implementation 'com.apideck:unify:0.20.0'
5253
```
5354

5455
Maven:
5556
```xml
5657
<dependency>
5758
<groupId>com.apideck</groupId>
5859
<artifactId>unify</artifactId>
59-
<version>0.19.6</version>
60+
<version>0.20.0</version>
6061
</dependency>
6162
```
6263

@@ -115,8 +116,8 @@ public class Application {
115116
.fields("id,updated_at")
116117
.build();
117118

119+
118120
sdk.accounting().taxRates().list()
119-
.request(req)
120121
.callAsStream()
121122
.forEach((AccountingTaxRatesAllResponse item) -> {
122123
// handle page
@@ -125,6 +126,60 @@ public class Application {
125126
}
126127
}
127128
```
129+
#### Asynchronous Call
130+
An asynchronous SDK client is also available that returns a [`CompletableFuture<T>`][comp-fut]. See [Asynchronous Support](#asynchronous-support) for more details on async benefits and reactive library integration.
131+
```java
132+
package hello.world;
133+
134+
import com.apideck.unify.Apideck;
135+
import com.apideck.unify.AsyncApideck;
136+
import com.apideck.unify.models.components.TaxRatesFilter;
137+
import com.apideck.unify.models.operations.AccountingTaxRatesAllRequest;
138+
import com.apideck.unify.models.operations.async.AccountingTaxRatesAllResponse;
139+
import java.util.Map;
140+
import reactor.core.publisher.Flux;
141+
142+
public class Application {
143+
144+
public static void main(String[] args) {
145+
146+
AsyncApideck sdk = Apideck.builder()
147+
.consumerId("test-consumer")
148+
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
149+
.apiKey(System.getenv().getOrDefault("API_KEY", ""))
150+
.build()
151+
.async();
152+
153+
AccountingTaxRatesAllRequest req = AccountingTaxRatesAllRequest.builder()
154+
.serviceId("salesforce")
155+
.filter(TaxRatesFilter.builder()
156+
.assets(true)
157+
.equity(true)
158+
.expenses(true)
159+
.liabilities(true)
160+
.revenue(true)
161+
.build())
162+
.passThrough(Map.ofEntries(
163+
Map.entry("search", "San Francisco")))
164+
.fields("id,updated_at")
165+
.build();
166+
167+
168+
var b = sdk.accounting().taxRates().list();
169+
170+
// Example using Project Reactor (illustrative) - pages
171+
Flux<AccountingTaxRatesAllResponse> pageFlux = Flux.from(b.callAsPublisher());
172+
pageFlux.subscribe(
173+
page -> System.out.println(page),
174+
error -> error.printStackTrace(),
175+
() -> System.out.println("Pagination completed")
176+
);
177+
178+
}
179+
}
180+
```
181+
182+
[comp-fut]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
128183
<!-- End SDK Example Usage [usage] -->
129184

130185
<!-- Start Available Resources and Operations [operations] -->
@@ -637,6 +692,14 @@ public class Application {
637692
### [vault()](docs/sdks/vault/README.md)
638693

639694

695+
#### [vault().connectionConsent()](docs/sdks/connectionconsent/README.md)
696+
697+
* [update](docs/sdks/connectionconsent/README.md#update) - Update consent state
698+
699+
#### [vault().connectionConsents()](docs/sdks/connectionconsents/README.md)
700+
701+
* [list](docs/sdks/connectionconsents/README.md#list) - Get consent records
702+
640703
#### [vault().connectionCustomMappings()](docs/sdks/connectioncustommappings/README.md)
641704

642705
* [list](docs/sdks/connectioncustommappings/README.md#list) - List connection custom mappings
@@ -713,7 +776,6 @@ For certain operations, you can also use the `callAsStreamUnwrapped` method that
713776

714777
Here's an example depicting the different ways to use pagination:
715778

716-
717779
```java
718780
package hello.world;
719781

@@ -750,8 +812,8 @@ public class Application {
750812
.fields("id,updated_at")
751813
.build();
752814

753-
var b = sdk.accounting().taxRates().list()
754-
.request(req);
815+
816+
var b = sdk.accounting().taxRates().list();
755817

756818
// Iterate through all pages using a traditional for-each loop
757819
// Each iteration returns a complete page response
@@ -772,6 +834,60 @@ public class Application {
772834
}
773835
}
774836
```
837+
#### Asynchronous Pagination
838+
An asynchronous SDK client is also available for pagination that returns a [`Flow.Publisher<T>`][flow-pub]. For async pagination, you can use `callAsPublisher()` to get pages as a publisher, or `callAsPublisherUnwrapped()` to get individual items directly. See [Asynchronous Support](#asynchronous-support) for more details on async benefits and reactive library integration.
839+
```java
840+
package hello.world;
841+
842+
import com.apideck.unify.Apideck;
843+
import com.apideck.unify.AsyncApideck;
844+
import com.apideck.unify.models.components.TaxRatesFilter;
845+
import com.apideck.unify.models.operations.AccountingTaxRatesAllRequest;
846+
import com.apideck.unify.models.operations.async.AccountingTaxRatesAllResponse;
847+
import java.util.Map;
848+
import reactor.core.publisher.Flux;
849+
850+
public class Application {
851+
852+
public static void main(String[] args) {
853+
854+
AsyncApideck sdk = Apideck.builder()
855+
.consumerId("test-consumer")
856+
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
857+
.apiKey(System.getenv().getOrDefault("API_KEY", ""))
858+
.build()
859+
.async();
860+
861+
AccountingTaxRatesAllRequest req = AccountingTaxRatesAllRequest.builder()
862+
.serviceId("salesforce")
863+
.filter(TaxRatesFilter.builder()
864+
.assets(true)
865+
.equity(true)
866+
.expenses(true)
867+
.liabilities(true)
868+
.revenue(true)
869+
.build())
870+
.passThrough(Map.ofEntries(
871+
Map.entry("search", "San Francisco")))
872+
.fields("id,updated_at")
873+
.build();
874+
875+
876+
var b = sdk.accounting().taxRates().list();
877+
878+
// Example using Project Reactor (illustrative) - pages
879+
Flux<AccountingTaxRatesAllResponse> pageFlux = Flux.from(b.callAsPublisher());
880+
pageFlux.subscribe(
881+
page -> System.out.println(page),
882+
error -> error.printStackTrace(),
883+
() -> System.out.println("Pagination completed")
884+
);
885+
886+
}
887+
}
888+
```
889+
890+
[flow-pub]: https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/Flow.Publisher.html
775891
<!-- End Pagination [pagination] -->
776892

777893
<!-- Start Retries [retries] -->
@@ -818,8 +934,8 @@ public class Application {
818934
.fields("id,updated_at")
819935
.build();
820936

937+
821938
sdk.accounting().taxRates().list()
822-
.request(req)
823939
.retryConfig(RetryConfig.builder()
824940
.backoff(BackoffStrategy.builder()
825941
.initialInterval(1L, TimeUnit.MILLISECONDS)
@@ -888,8 +1004,8 @@ public class Application {
8881004
.fields("id,updated_at")
8891005
.build();
8901006

1007+
8911008
sdk.accounting().taxRates().list()
892-
.request(req)
8931009
.callAsStream()
8941010
.forEach((AccountingTaxRatesAllResponse item) -> {
8951011
// handle page
@@ -953,8 +1069,8 @@ public class Application {
9531069
.fields("id,updated_at")
9541070
.build();
9551071

1072+
9561073
sdk.accounting().taxRates().list()
957-
.request(req)
9581074
.callAsStream()
9591075
.forEach((AccountingTaxRatesAllResponse item) -> {
9601076
// handle page
@@ -1007,8 +1123,8 @@ public class Application {
10071123
.fields("id,updated_at")
10081124
.build();
10091125

1126+
10101127
sdk.accounting().taxRates().list()
1011-
.request(req)
10121128
.callAsStream()
10131129
.forEach((AccountingTaxRatesAllResponse item) -> {
10141130
// handle page
@@ -1055,14 +1171,77 @@ public class Application {
10551171
.serverURL("https://upload.apideck.com")
10561172
.call();
10571173

1058-
if (res.createAttachmentResponse().isPresent()) {
1059-
// handle response
1060-
}
10611174
}
10621175
}
10631176
```
10641177
<!-- End Server Selection [server] -->
10651178

1179+
<!-- Start Asynchronous Support [async-support] -->
1180+
## Asynchronous Support
1181+
1182+
The SDK provides comprehensive asynchronous support using Java's [`CompletableFuture<T>`][comp-fut] and [Reactive Streams `Publisher<T>`][reactive-streams] APIs. This design makes no assumptions about your choice of reactive toolkit, allowing seamless integration with any reactive library.
1183+
1184+
<details>
1185+
<summary>Why Use Async?</summary>
1186+
1187+
Asynchronous operations provide several key benefits:
1188+
1189+
- **Non-blocking I/O**: Your threads stay free for other work while operations are in flight
1190+
- **Better resource utilization**: Handle more concurrent operations with fewer threads
1191+
- **Improved scalability**: Build highly responsive applications that can handle thousands of concurrent requests
1192+
- **Reactive integration**: Works seamlessly with reactive streams and backpressure handling
1193+
1194+
</details>
1195+
1196+
<details>
1197+
<summary>Reactive Library Integration</summary>
1198+
1199+
The SDK returns [Reactive Streams `Publisher<T>`][reactive-streams] instances for operations dealing with streams involving multiple I/O interactions. We use Reactive Streams instead of JDK Flow API to provide broader compatibility with the reactive ecosystem, as most reactive libraries natively support Reactive Streams.
1200+
1201+
**Why Reactive Streams over JDK Flow?**
1202+
- **Broader ecosystem compatibility**: Most reactive libraries (Project Reactor, RxJava, Akka Streams, etc.) natively support Reactive Streams
1203+
- **Industry standard**: Reactive Streams is the de facto standard for reactive programming in Java
1204+
- **Better interoperability**: Seamless integration without additional adapters for most use cases
1205+
1206+
**Integration with Popular Libraries:**
1207+
- **Project Reactor**: Use `Flux.from(publisher)` to convert to Reactor types
1208+
- **RxJava**: Use `Flowable.fromPublisher(publisher)` for RxJava integration
1209+
- **Akka Streams**: Use `Source.fromPublisher(publisher)` for Akka Streams integration
1210+
- **Vert.x**: Use `ReadStream.fromPublisher(vertx, publisher)` for Vert.x reactive streams
1211+
- **Mutiny**: Use `Multi.createFrom().publisher(publisher)` for Quarkus Mutiny integration
1212+
1213+
**For JDK Flow API Integration:**
1214+
If you need JDK Flow API compatibility (e.g., for Quarkus/Mutiny 2), you can use adapters:
1215+
```java
1216+
// Convert Reactive Streams Publisher to Flow Publisher
1217+
Flow.Publisher<T> flowPublisher = FlowAdapters.toFlowPublisher(reactiveStreamsPublisher);
1218+
1219+
// Convert Flow Publisher to Reactive Streams Publisher
1220+
Publisher<T> reactiveStreamsPublisher = FlowAdapters.toPublisher(flowPublisher);
1221+
```
1222+
1223+
For standard single-response operations, the SDK returns `CompletableFuture<T>` for straightforward async execution.
1224+
1225+
</details>
1226+
1227+
<details>
1228+
<summary>Supported Operations</summary>
1229+
1230+
Async support is available for:
1231+
1232+
- **[Server-sent Events](#server-sent-event-streaming)**: Stream real-time events with Reactive Streams `Publisher<T>`
1233+
- **[JSONL Streaming](#jsonl-streaming)**: Process streaming JSON lines asynchronously
1234+
- **[Pagination](#pagination)**: Iterate through paginated results using `callAsPublisher()` and `callAsPublisherUnwrapped()`
1235+
- **[File Uploads](#file-uploads)**: Upload files asynchronously with progress tracking
1236+
- **[File Downloads](#file-downloads)**: Download files asynchronously with streaming support
1237+
- **[Standard Operations](#example)**: All regular API calls return `CompletableFuture<T>` for async execution
1238+
1239+
</details>
1240+
1241+
[comp-fut]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
1242+
[reactive-streams]: https://www.reactive-streams.org/
1243+
<!-- End Asynchronous Support [async-support] -->
1244+
10661245
<!-- Start Authentication [security] -->
10671246
## Authentication
10681247

@@ -1110,8 +1289,8 @@ public class Application {
11101289
.fields("id,updated_at")
11111290
.build();
11121291

1292+
11131293
sdk.accounting().taxRates().list()
1114-
.request(req)
11151294
.callAsStream()
11161295
.forEach((AccountingTaxRatesAllResponse item) -> {
11171296
// handle page

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,4 +458,14 @@ Based on:
458458
### Generated
459459
- [java v0.19.6] .
460460
### Releases
461-
- [Maven Central v0.19.6] https://central.sonatype.com/artifact/com.apideck/unify/0.19.6 - .
461+
- [Maven Central v0.19.6] https://central.sonatype.com/artifact/com.apideck/unify/0.19.6 - .
462+
463+
## 2025-09-08 00:13:18
464+
### Changes
465+
Based on:
466+
- OpenAPI Doc
467+
- Speakeasy CLI 1.611.1 (2.694.1) https://github.com/speakeasy-api/speakeasy
468+
### Generated
469+
- [java v0.20.0] .
470+
### Releases
471+
- [Maven Central v0.20.0] https://central.sonatype.com/artifact/com.apideck/unify/0.20.0 - .

0 commit comments

Comments
 (0)