Skip to content

Commit c6c051f

Browse files
Merge pull request #4 from docusign/sdk-update-java-1.0.0-beta.5
Update java SDK
2 parents 1a4f28e + e7c679c commit c6c051f

File tree

379 files changed

+39186
-6153
lines changed

Some content is hidden

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

379 files changed

+39186
-6153
lines changed

README.md

Lines changed: 82 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Developer Center](https://developers.docusign.com/).
3535
* [Retries](#retries)
3636
* [Error Handling](#error-handling)
3737
* [Server Selection](#server-selection)
38+
* [Debugging](#debugging)
3839
* [Development](#development)
3940
* [Maturity](#maturity)
4041
* [Contributions](#contributions)
@@ -52,15 +53,15 @@ The samples below show how a published SDK artifact is used:
5253

5354
Gradle:
5455
```groovy
55-
implementation 'com.docusign:iam-sdk:1.0.0-beta.3'
56+
implementation 'com.docusign:iam-sdk:1.0.0-beta.5'
5657
```
5758

5859
Maven:
5960
```xml
6061
<dependency>
6162
<groupId>com.docusign</groupId>
6263
<artifactId>iam-sdk</artifactId>
63-
<version>1.0.0-beta.3</version>
64+
<version>1.0.0-beta.5</version>
6465
</dependency>
6566
```
6667

@@ -77,33 +78,6 @@ On Windows:
7778
```bash
7879
gradlew.bat publishToMavenLocal -Pskip.signing
7980
```
80-
81-
### Logging
82-
A logging framework/facade has not yet been adopted but is under consideration.
83-
84-
For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
85-
```java
86-
SDK.builder()
87-
.enableHTTPDebugLogging(true)
88-
.build();
89-
```
90-
Example output:
91-
```
92-
Sending request: http://localhost:35123/bearer#global GET
93-
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
94-
Received response: (GET http://localhost:35123/bearer#global) 200
95-
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
96-
Response body:
97-
{
98-
"authenticated": true,
99-
"token": "global"
100-
}
101-
```
102-
__WARNING__: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
103-
104-
__NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging()`. The `SpeakeasyHTTPClient` honors this setting. If you are using a custom HTTP client, it is up to the custom client to honor this setting.
105-
106-
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
10781
<!-- End SDK Installation [installation] -->
10882

10983
<!-- Start SDK Example Usage [usage] -->
@@ -347,6 +321,42 @@ var res = sdk.auth().getUserInfo().call();
347321
* [deleteAgreement](docs/sdks/agreements/README.md#deleteagreement) - Delete a specific agreement
348322
* [createAgreementSummary](docs/sdks/agreements/README.md#createagreementsummary) - Create an AI-generated summary of an agreement document
349323

324+
### [workspaces()](docs/sdks/workspaces1/README.md)
325+
326+
327+
#### [workspaces().workspaceDocuments()](docs/sdks/workspacedocuments/README.md)
328+
329+
* [getWorkspaceDocuments](docs/sdks/workspacedocuments/README.md#getworkspacedocuments) - Get documents in the workspace accessible to the calling user
330+
* [getWorkspaceDocument](docs/sdks/workspacedocuments/README.md#getworkspacedocument) - Get information about the document
331+
* [deleteWorkspaceDocument](docs/sdks/workspacedocuments/README.md#deleteworkspacedocument) - Deletes a document in the workspace
332+
* [getWorkspaceDocumentContents](docs/sdks/workspacedocuments/README.md#getworkspacedocumentcontents) - Get the file contents of the document
333+
334+
#### [workspaces().workspaces()](docs/sdks/workspaces2/README.md)
335+
336+
* [getWorkspaces](docs/sdks/workspaces2/README.md#getworkspaces) - Gets workspaces available to the calling user
337+
* [createWorkspace](docs/sdks/workspaces2/README.md#createworkspace) - Creates a new workspace
338+
* [getWorkspace](docs/sdks/workspaces2/README.md#getworkspace) - Returns details about the workspace
339+
* [getWorkspaceAssignableRoles](docs/sdks/workspaces2/README.md#getworkspaceassignableroles) - Returns the roles the caller can assign to workspace users
340+
* [createWorkspaceEnvelope](docs/sdks/workspaces2/README.md#createworkspaceenvelope) - Creates an envelope with the given documents. Returns the ID of the created envelope
341+
* [getWorkspaceEnvelopes](docs/sdks/workspaces2/README.md#getworkspaceenvelopes) - Returns the envelopes associated with the given workspace
342+
343+
#### [workspaces().workspaceUploadRequest()](docs/sdks/workspaceuploadrequest/README.md)
344+
345+
* [createWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#createworkspaceuploadrequest) - Creates a new upload request within a workspace
346+
* [getWorkspaceUploadRequests](docs/sdks/workspaceuploadrequest/README.md#getworkspaceuploadrequests) - Gets upload requests within a workspace
347+
* [getWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#getworkspaceuploadrequest) - Gets details for a specific upload request
348+
* [updateWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#updateworkspaceuploadrequest) - Updates a specific upload request
349+
* [deleteWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#deleteworkspaceuploadrequest) - Deletes a specific upload request
350+
* [completeWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#completeworkspaceuploadrequest) - Complete an upload request
351+
352+
#### [workspaces().workspaceUsers()](docs/sdks/workspaceusers/README.md)
353+
354+
* [getWorkspaceUsers](docs/sdks/workspaceusers/README.md#getworkspaceusers) - Retrieves the list of users in the given workspace
355+
* [addWorkspaceUser](docs/sdks/workspaceusers/README.md#addworkspaceuser) - Adds a user to the workspace by email address
356+
* [updateWorkspaceUser](docs/sdks/workspaceusers/README.md#updateworkspaceuser) - Updates the specified user's role
357+
* [revokeWorkspaceUserAccess](docs/sdks/workspaceusers/README.md#revokeworkspaceuseraccess) - Revokes the specified user's access to the workspace
358+
* [restoreWorkspaceUserAccess](docs/sdks/workspaceusers/README.md#restoreworkspaceuseraccess) - Restores the specified user's access to the workspace
359+
350360
</details>
351361
<!-- End Available Resources and Operations [operations] -->
352362

@@ -383,8 +393,8 @@ public class Application {
383393
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
384394
.request(req)
385395
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
386-
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
387-
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
396+
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
397+
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
388398
.build())
389399
.retryConfig(RetryConfig.builder()
390400
.backoff(BackoffStrategy.builder()
@@ -443,8 +453,8 @@ public class Application {
443453
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
444454
.request(req)
445455
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
446-
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
447-
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
456+
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
457+
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
448458
.build())
449459
.call();
450460

@@ -494,8 +504,8 @@ public class Application {
494504
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
495505
.request(req)
496506
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
497-
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
498-
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
507+
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
508+
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
499509
.build())
500510
.call();
501511

@@ -546,8 +556,8 @@ public class Application {
546556
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
547557
.request(req)
548558
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
549-
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
550-
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
559+
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
560+
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
551561
.build())
552562
.call();
553563

@@ -586,8 +596,8 @@ public class Application {
586596
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
587597
.request(req)
588598
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
589-
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
590-
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
599+
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
600+
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
591601
.build())
592602
.call();
593603

@@ -625,8 +635,8 @@ public class Application {
625635
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
626636
.request(req)
627637
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
628-
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
629-
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
638+
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
639+
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
630640
.build())
631641
.serverURL("https://account.docusign.com")
632642
.call();
@@ -639,6 +649,37 @@ public class Application {
639649
```
640650
<!-- End Server Selection [server] -->
641651

652+
<!-- Start Debugging [debug] -->
653+
## Debugging
654+
655+
### Debug
656+
You can setup your SDK to emit debug logs for SDK requests and responses.
657+
658+
For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
659+
```java
660+
SDK.builder()
661+
.enableHTTPDebugLogging(true)
662+
.build();
663+
```
664+
Example output:
665+
```
666+
Sending request: http://localhost:35123/bearer#global GET
667+
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
668+
Received response: (GET http://localhost:35123/bearer#global) 200
669+
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
670+
Response body:
671+
{
672+
"authenticated": true,
673+
"token": "global"
674+
}
675+
```
676+
__WARNING__: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
677+
678+
__NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging()`. The `SpeakeasyHTTPClient` honors this setting. If you are using a custom HTTP client, it is up to the custom client to honor this setting.
679+
680+
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
681+
<!-- End Debugging [debug] -->
682+
642683
<!-- Placeholder for Future Speakeasy SDK Sections -->
643684

644685
# Development

RELEASES.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,24 @@ Based on:
3737
### Generated
3838
- [java v1.0.0-beta.3] .
3939
### Releases
40-
- [Maven Central v1.0.0-beta.3] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.3 - .
40+
- [Maven Central v1.0.0-beta.3] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.3 - .
41+
42+
## 2025-07-14 10:01:35
43+
### Changes
44+
Based on:
45+
- OpenAPI Doc
46+
- Speakeasy CLI 1.581.0 (2.656.5) https://github.com/speakeasy-api/speakeasy
47+
### Generated
48+
- [java v1.0.0-beta.4] .
49+
### Releases
50+
- [Maven Central v1.0.0-beta.4] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.4 - .
51+
52+
## 2025-09-03 17:15:22
53+
### Changes
54+
Based on:
55+
- OpenAPI Doc
56+
- Speakeasy CLI 1.609.0 (2.692.0) https://github.com/speakeasy-api/speakeasy
57+
### Generated
58+
- [java v1.0.0-beta.5] .
59+
### Releases
60+
- [Maven Central v1.0.0-beta.5] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.5 - .

build.gradle

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ plugins {
1414
id 'java-library'
1515
id 'maven-publish'
1616
id 'signing'
17+
id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3'
1718
}
1819

1920
compileJava.options.encoding = "UTF-8"
@@ -41,6 +42,7 @@ group = "${groupId}"
4142

4243
jar {
4344
dependsOn(":generatePomFileForMavenPublication")
45+
archiveBaseName = "${artifactId}"
4446

4547
into("META-INF/maven/com.docusign/iam-sdk") {
4648
from("$buildDir/pom.xml")
@@ -57,7 +59,7 @@ javadoc {
5759
}
5860

5961
tasks.withType(Javadoc) {
60-
failOnError false
62+
failOnError = false
6163
options.addStringOption('Xdoclint:none', '-quiet')
6264
}
6365

@@ -72,27 +74,38 @@ sourcesJar {
7274
javadocJar {
7375
archiveBaseName = "${artifactId}"
7476
}
77+
sonatypeCentralUpload {
78+
// This is your Sonatype generated username
79+
username = System.getenv("SONATYPE_USERNAME")
80+
// This is your sonatype generated password
81+
password = System.getenv("SONATYPE_PASSWORD")
82+
83+
// This is a list of files to upload. Ideally you would point to your jar file, source and javadoc jar (required by central)
84+
archives = files(
85+
"$buildDir/libs/${artifactId}-${version}.jar",
86+
"$buildDir/libs/${artifactId}-${version}-sources.jar",
87+
"$buildDir/libs/${artifactId}-${version}-javadoc.jar"
88+
)
89+
90+
// This is the pom file to upload. This is required by central
91+
pom = file("$buildDir/pom.xml")
92+
93+
// This is your PGP private key. This is required to sign your files
94+
signingKey = System.getenv("SONATYPE_SIGNING_KEY")
95+
// This is your PGP private key passphrase to decrypt your private key
96+
signingKeyPassphrase = System.getenv("SIGNING_KEY_PASSPHRASE")
97+
}
7598

7699

77100
publishing {
78-
repositories {
79-
maven {
80-
name = "OSSRH"
81-
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
82-
credentials {
83-
username = System.getenv("MAVEN_USERNAME")
84-
password = System.getenv("MAVEN_PASSWORD")
85-
}
86-
}
87-
}
88101

89102
publications {
90103
maven(MavenPublication) {
91104
// note that properties can't yet be used below!
92105
// https://github.com/gradle/gradle/issues/18619
93106
groupId = "com.docusign"
94107
artifactId = "iam-sdk"
95-
version = "1.0.0-beta.3"
108+
version = "1.0.0-beta.5"
96109

97110
from components.java
98111

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CreateWorkspaceBody
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
8+
| `name` | *Optional\<String>* | :heavy_check_mark: | The name of the workspace |
9+
| `brandId` | *JsonNullable\<String>* | :heavy_minus_sign: | A GUID value that identifies a brand. For more information, see <a href="https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/branding/">Branding</a> |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CreateWorkspaceEnvelopeResponse
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
8+
| `envelopeId` | *JsonNullable\<String>* | :heavy_minus_sign: | N/A |

0 commit comments

Comments
 (0)