Skip to content

Commit e480c44

Browse files
Merge pull request #8 from docusign/sdk-update-java-1.0.0-beta.9
Update java SDK
2 parents 7c3ee9f + 60a9c0c commit e480c44

218 files changed

Lines changed: 13566 additions & 3871 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@
44
# Linux start script should use lf
55
/gradlew text eol=lf
66

7-
# These are Windows script files and should use crlf
8-
*.bat text eol=crlf
9-
107
# This allows generated code to be indexed correctly
118
*.java linguist-generated=false

README.md

Lines changed: 92 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Developer Center](https://developers.docusign.com/).
3838
* [Server Selection](#server-selection)
3939
* [Custom HTTP Client](#custom-http-client)
4040
* [Debugging](#debugging)
41+
* [Jackson Configuration](#jackson-configuration)
4142
* [Development](#development)
4243
* [Maturity](#maturity)
4344
* [Contributions](#contributions)
@@ -55,15 +56,15 @@ The samples below show how a published SDK artifact is used:
5556

5657
Gradle:
5758
```groovy
58-
implementation 'com.docusign:iam-sdk:1.0.0-beta.8'
59+
implementation 'com.docusign:iam-sdk:1.0.0-beta.9'
5960
```
6061

6162
Maven:
6263
```xml
6364
<dependency>
6465
<groupId>com.docusign</groupId>
6566
<artifactId>iam-sdk</artifactId>
66-
<version>1.0.0-beta.8</version>
67+
<version>1.0.0-beta.9</version>
6768
</dependency>
6869
```
6970

@@ -107,11 +108,20 @@ public class Application {
107108
.call();
108109

109110
if (res.userInfo().isPresent()) {
110-
// handle response
111+
System.out.println(res.userInfo().get());
111112
}
112113
}
113114
}
114115
```
116+
117+
#### Union Consumption Patterns
118+
119+
When a response field is a union model:
120+
121+
- Discriminated unions: branch on the discriminator (`switch`) and then narrow to the concrete type.
122+
- Non-discriminated unions: use generated accessors (for example `string()`, `asLong()`, `simpleObject()`) to determine the active variant.
123+
124+
For full model-specific examples (including Java 11/16/21 variants), see each union model's **Supported Types** section in the generated model docs.
115125
<!-- End SDK Example Usage [usage] -->
116126

117127
<!-- Start Authentication [security] -->
@@ -280,6 +290,22 @@ var res = sdk.auth().getUserInfo().call();
280290
<details open>
281291
<summary>Available methods</summary>
282292

293+
### [AgreementManager.Agreements](docs/sdks/agreements/README.md)
294+
295+
* [getAgreementsList](docs/sdks/agreements/README.md#getagreementslist) - Retrieve a list of agreements
296+
* [patchAgreementByDocumentId](docs/sdks/agreements/README.md#patchagreementbydocumentid) - Update an agreement by locating it via document ID
297+
* [getAgreementTypes](docs/sdks/agreements/README.md#getagreementtypes) - List configured agreement types for the account.
298+
* [getAgreement](docs/sdks/agreements/README.md#getagreement) - Retrieve detailed information about a specific agreement
299+
* [deleteAgreement](docs/sdks/agreements/README.md#deleteagreement) - Delete a specific agreement
300+
* [patchAgreement](docs/sdks/agreements/README.md#patchagreement) - Update specific fields of an agreement
301+
* [changeAgreementType](docs/sdks/agreements/README.md#changeagreementtype) - Change the type of an agreement
302+
303+
### [AgreementManager.BulkJob](docs/sdks/bulkjob/README.md)
304+
305+
* [createBulkUploadJob](docs/sdks/bulkjob/README.md#createbulkuploadjob) - Create new bulk job with presigned URLs direct to Azure Blob Store
306+
* [getBulkJobStatus](docs/sdks/bulkjob/README.md#getbulkjobstatus) - Get bulk job status
307+
* [uploadCompleteBulkJob](docs/sdks/bulkjob/README.md#uploadcompletebulkjob) - Mark bulk job upload as complete
308+
283309
### [Auth](docs/sdks/auth/README.md)
284310

285311
* [getTokenFromConfidentialAuthCode](docs/sdks/auth/README.md#gettokenfromconfidentialauthcode) - Obtains an access token from the Docusign API using an authorization code.
@@ -292,32 +318,20 @@ var res = sdk.auth().getUserInfo().call();
292318

293319
* [getConnectedFieldsTabGroups](docs/sdks/tabinfo/README.md#getconnectedfieldstabgroups) - Returns all tabs associated with the given account
294320

295-
### [Maestro.WorkflowInstanceManagement](docs/sdks/workflowinstancemanagement/README.md)
321+
### [WorkflowBuilder.WorkflowInstanceManagement](docs/sdks/workflowinstancemanagement/README.md)
296322

297323
* [getWorkflowInstancesList](docs/sdks/workflowinstancemanagement/README.md#getworkflowinstanceslist) - Retrieve All Workflow Instances
298324
* [getWorkflowInstance](docs/sdks/workflowinstancemanagement/README.md#getworkflowinstance) - Retrieve a Workflow Instance
299325
* [cancelWorkflowInstance](docs/sdks/workflowinstancemanagement/README.md#cancelworkflowinstance) - Cancel a Running Workflow Instance
300326

301-
### [Maestro.Workflows](docs/sdks/workflows/README.md)
327+
### [WorkflowBuilder.Workflows](docs/sdks/workflows/README.md)
302328

303-
* [getWorkflowsList](docs/sdks/workflows/README.md#getworkflowslist) - Retrieve a list of available Maestro workflows
304-
* [getWorkflowTriggerRequirements](docs/sdks/workflows/README.md#getworkflowtriggerrequirements) - Retrieve trigger requirements for a specific Maestro workflow
305-
* [triggerWorkflow](docs/sdks/workflows/README.md#triggerworkflow) - Trigger a new instance of a Maestro workflow
329+
* [getWorkflowsList](docs/sdks/workflows/README.md#getworkflowslist) - Retrieve a list of available Workflow Builder workflows
330+
* [getWorkflowTriggerRequirements](docs/sdks/workflows/README.md#getworkflowtriggerrequirements) - Retrieve trigger requirements for a specific Workflow Builder workflow
331+
* [triggerWorkflow](docs/sdks/workflows/README.md#triggerworkflow) - Trigger a new instance of a Workflow Builder workflow
306332
* [pauseNewWorkflowInstances](docs/sdks/workflows/README.md#pausenewworkflowinstances) - Pause an Active Workflow
307333
* [resumePausedWorkflow](docs/sdks/workflows/README.md#resumepausedworkflow) - Resume a Paused Workflow
308334

309-
### [Navigator.Agreements](docs/sdks/agreements/README.md)
310-
311-
* [getAgreementsList](docs/sdks/agreements/README.md#getagreementslist) - Retrieve a list of agreements
312-
* [getAgreement](docs/sdks/agreements/README.md#getagreement) - Retrieve detailed information about a specific agreement
313-
* [deleteAgreement](docs/sdks/agreements/README.md#deleteagreement) - Delete a specific agreement
314-
315-
### [Navigator.BulkJob](docs/sdks/bulkjob/README.md)
316-
317-
* [createBulkUploadJob](docs/sdks/bulkjob/README.md#createbulkuploadjob) - Create new bulk job with presigned URLs direct to Azure Blob Store
318-
* [getBulkJobStatus](docs/sdks/bulkjob/README.md#getbulkjobstatus) - Get bulk job status
319-
* [uploadCompleteBulkJob](docs/sdks/bulkjob/README.md#uploadcompletebulkjob) - Mark bulk job upload as complete
320-
321335
### [Workspaces.WorkspaceBrands](docs/sdks/workspacebrands/README.md)
322336

323337
* [getWorkspaceBrand](docs/sdks/workspacebrands/README.md#getworkspacebrand) - Returns details about the brand set for a workspace
@@ -411,7 +425,7 @@ public class Application {
411425
.call();
412426

413427
if (res.authorizationCodeGrantResponse().isPresent()) {
414-
// handle response
428+
System.out.println(res.authorizationCodeGrantResponse().get());
415429
}
416430
}
417431
}
@@ -461,7 +475,7 @@ public class Application {
461475
.call();
462476

463477
if (res.authorizationCodeGrantResponse().isPresent()) {
464-
// handle response
478+
System.out.println(res.authorizationCodeGrantResponse().get());
465479
}
466480
}
467481
}
@@ -522,7 +536,7 @@ public class Application {
522536
.call();
523537

524538
if (res.authorizationCodeGrantResponse().isPresent()) {
525-
// handle response
539+
System.out.println(res.authorizationCodeGrantResponse().get());
526540
}
527541
} catch (IamClientError ex) { // all SDK exceptions inherit from IamClientError
528542

@@ -564,7 +578,7 @@ public class Application {
564578
**Primary error:**
565579
* [`IamClientError`](./src/main/java/models/errors/IamClientError.java): The base class for HTTP error responses.
566580

567-
<details><summary>Less common errors (10)</summary>
581+
<details><summary>Less common errors (9)</summary>
568582

569583
<br />
570584

@@ -574,10 +588,9 @@ public class Application {
574588
many more subclasses in the JDK platform).
575589

576590
**Inherit from [`IamClientError`](./src/main/java/models/errors/IamClientError.java)**:
577-
* [`com.docusign.iam.sdk.models.errors.ErrorDetails`](./src/main/java/models/errors/com.docusign.iam.sdk.models.errors.ErrorDetails.java): The error response object for the Workspaces API. Applicable to 26 of 46 methods.*
578-
* [`com.docusign.iam.sdk.models.errors.Error`](./src/main/java/models/errors/com.docusign.iam.sdk.models.errors.Error.java): Bad Request - The request could not be understood or was missing required parameters. Applicable to 10 of 46 methods.*
579-
* [`com.docusign.iam.sdk.models.errors.OAuthErrorResponse`](./src/main/java/models/errors/com.docusign.iam.sdk.models.errors.OAuthErrorResponse.java): Status code `400`. Applicable to 5 of 46 methods.*
580-
* [`com.docusign.iam.sdk.models.errors.ErrDetails`](./src/main/java/models/errors/com.docusign.iam.sdk.models.errors.ErrDetails.java): Applicable to 3 of 46 methods.*
591+
* [`com.docusign.iam.sdk.models.errors.ErrorDetails`](./src/main/java/models/errors/com.docusign.iam.sdk.models.errors.ErrorDetails.java): The error response object for the Workspaces API. Applicable to 26 of 50 methods.*
592+
* [`com.docusign.iam.sdk.models.errors.ErrDetails`](./src/main/java/models/errors/com.docusign.iam.sdk.models.errors.ErrDetails.java): Error response conforming to RFC 9457 (Problem Details for HTTP APIs). See: https://www.rfc-editor.org/rfc/rfc9457.html. Applicable to 17 of 50 methods.*
593+
* [`com.docusign.iam.sdk.models.errors.OAuthErrorResponse`](./src/main/java/models/errors/com.docusign.iam.sdk.models.errors.OAuthErrorResponse.java): Status code `400`. Applicable to 5 of 50 methods.*
581594

582595

583596
</details>
@@ -603,34 +616,27 @@ You can override the default server globally using the `.server(AvailableServers
603616
package hello.world;
604617

605618
import com.docusign.iam.sdk.IamClient;
606-
import com.docusign.iam.sdk.models.components.ConfidentialAuthCodeGrantRequestBody;
607-
import com.docusign.iam.sdk.models.errors.OAuthErrorResponse;
608-
import com.docusign.iam.sdk.models.operations.GetTokenFromConfidentialAuthCodeResponse;
609-
import com.docusign.iam.sdk.models.operations.GetTokenFromConfidentialAuthCodeSecurity;
619+
import com.docusign.iam.sdk.models.errors.ErrDetails;
620+
import com.docusign.iam.sdk.models.operations.GetWorkflowsListResponse;
621+
import com.docusign.iam.sdk.models.operations.Status;
610622
import java.lang.Exception;
611623

612624
public class Application {
613625

614-
public static void main(String[] args) throws OAuthErrorResponse, Exception {
626+
public static void main(String[] args) throws ErrDetails, Exception {
615627

616628
IamClient sdk = IamClient.builder()
617629
.server(IamClient.AvailableServers.DEMO)
630+
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
618631
.build();
619632

620-
ConfidentialAuthCodeGrantRequestBody req = ConfidentialAuthCodeGrantRequestBody.builder()
621-
.code("eyJ0eXAi.....QFsje43QVZ_gw")
622-
.build();
623-
624-
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
625-
.request(req)
626-
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
627-
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
628-
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
629-
.build())
633+
GetWorkflowsListResponse res = sdk.workflowBuilder().workflows().getWorkflowsList()
634+
.accountId("ae232f1f-8efc-4b8c-bb08-626847fad8bb")
635+
.status(Status.ACTIVE)
630636
.call();
631637

632-
if (res.authorizationCodeGrantResponse().isPresent()) {
633-
// handle response
638+
if (res.workflowsListSuccess().isPresent()) {
639+
System.out.println(res.workflowsListSuccess().get());
634640
}
635641
}
636642
}
@@ -643,34 +649,27 @@ The default server can also be overridden globally using the `.serverURL(String
643649
package hello.world;
644650

645651
import com.docusign.iam.sdk.IamClient;
646-
import com.docusign.iam.sdk.models.components.ConfidentialAuthCodeGrantRequestBody;
647-
import com.docusign.iam.sdk.models.errors.OAuthErrorResponse;
648-
import com.docusign.iam.sdk.models.operations.GetTokenFromConfidentialAuthCodeResponse;
649-
import com.docusign.iam.sdk.models.operations.GetTokenFromConfidentialAuthCodeSecurity;
652+
import com.docusign.iam.sdk.models.errors.ErrDetails;
653+
import com.docusign.iam.sdk.models.operations.GetWorkflowsListResponse;
654+
import com.docusign.iam.sdk.models.operations.Status;
650655
import java.lang.Exception;
651656

652657
public class Application {
653658

654-
public static void main(String[] args) throws OAuthErrorResponse, Exception {
659+
public static void main(String[] args) throws ErrDetails, Exception {
655660

656661
IamClient sdk = IamClient.builder()
657662
.serverURL("https://api-d.docusign.com")
663+
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
658664
.build();
659665

660-
ConfidentialAuthCodeGrantRequestBody req = ConfidentialAuthCodeGrantRequestBody.builder()
661-
.code("eyJ0eXAi.....QFsje43QVZ_gw")
662-
.build();
663-
664-
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
665-
.request(req)
666-
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
667-
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
668-
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
669-
.build())
666+
GetWorkflowsListResponse res = sdk.workflowBuilder().workflows().getWorkflowsList()
667+
.accountId("ae232f1f-8efc-4b8c-bb08-626847fad8bb")
668+
.status(Status.ACTIVE)
670669
.call();
671670

672-
if (res.authorizationCodeGrantResponse().isPresent()) {
673-
// handle response
671+
if (res.workflowsListSuccess().isPresent()) {
672+
System.out.println(res.workflowsListSuccess().get());
674673
}
675674
}
676675
}
@@ -710,7 +709,7 @@ public class Application {
710709
.call();
711710

712711
if (res.authorizationCodeGrantResponse().isPresent()) {
713-
// handle response
712+
System.out.println(res.authorizationCodeGrantResponse().get());
714713
}
715714
}
716715
}
@@ -876,6 +875,36 @@ __NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging
876875
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
877876
<!-- End Debugging [debug] -->
878877

878+
<!-- Start Jackson Configuration [jackson] -->
879+
## Jackson Configuration
880+
881+
The SDK ships with a pre-configured Jackson [`ObjectMapper`][jackson-databind] accessible via
882+
`JSON.getMapper()`. It is set up with type modules, strict deserializers, and the feature flags
883+
needed for full SDK compatibility (including ISO-8601 `OffsetDateTime` serialization):
884+
885+
```java
886+
import com.docusign.iam.sdk.utils.JSON;
887+
888+
String json = JSON.getMapper().writeValueAsString(response);
889+
```
890+
891+
To compose with your own `ObjectMapper`, register the provided `IamSDKJacksonModule`, which
892+
bundles all the same modules and feature flags as a single plug-and-play module:
893+
894+
```java
895+
import com.docusign.iam.sdk.utils.IamSDKJacksonModule;
896+
import com.fasterxml.jackson.databind.ObjectMapper;
897+
898+
ObjectMapper myMapper = new ObjectMapper()
899+
.registerModule(new IamSDKJacksonModule());
900+
901+
String json = myMapper.writeValueAsString(response);
902+
```
903+
904+
[jackson-databind]: https://github.com/FasterXML/jackson-databind
905+
[jackson-jsr310]: https://github.com/FasterXML/jackson-modules-java8/tree/master/datetime
906+
<!-- End Jackson Configuration [jackson] -->
907+
879908
<!-- Placeholder for Future Speakeasy SDK Sections -->
880909

881910
# Development

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,14 @@ Based on:
8787
### Generated
8888
- [java v1.0.0-beta.8] .
8989
### Releases
90-
- [Maven Central v1.0.0-beta.8] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.8 - .
90+
- [Maven Central v1.0.0-beta.8] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.8 - .
91+
92+
## 2026-05-11 07:15:00
93+
### Changes
94+
Based on:
95+
- OpenAPI Doc
96+
- Speakeasy CLI 1.762.0 (2.882.0) https://github.com/speakeasy-api/speakeasy
97+
### Generated
98+
- [java v1.0.0-beta.9] .
99+
### Releases
100+
- [Maven Central v1.0.0-beta.9] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.9 - .

USAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class Application {
1919
.call();
2020

2121
if (res.userInfo().isPresent()) {
22-
// handle response
22+
System.out.println(res.userInfo().get());
2323
}
2424
}
2525
}

docs/models/components/Actions.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Actions
2+
3+
Available actions on the agreement.
4+
5+
6+
## Fields
7+
8+
| Field | Type | Required | Description |
9+
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
10+
| `changeType` | [Optional\<ChangeAgreementTypeResponseChangeType>](../../models/components/ChangeAgreementTypeResponseChangeType.md) | :heavy_minus_sign: | N/A |

0 commit comments

Comments
 (0)