Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
123 changes: 82 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Developer Center](https://developers.docusign.com/).
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Debugging](#debugging)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)
Expand All @@ -52,15 +53,15 @@ The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'com.docusign:iam-sdk:1.0.0-beta.3'
implementation 'com.docusign:iam-sdk:1.0.0-beta.5'
```

Maven:
```xml
<dependency>
<groupId>com.docusign</groupId>
<artifactId>iam-sdk</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.5</version>
</dependency>
```

Expand All @@ -77,33 +78,6 @@ On Windows:
```bash
gradlew.bat publishToMavenLocal -Pskip.signing
```

### Logging
A logging framework/facade has not yet been adopted but is under consideration.

For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
```java
SDK.builder()
.enableHTTPDebugLogging(true)
.build();
```
Example output:
```
Sending request: http://localhost:35123/bearer#global GET
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]}
Received response: (GET http://localhost:35123/bearer#global) 200
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]}
Response body:
{
"authenticated": true,
"token": "global"
}
```
__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`.

__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.

Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
<!-- End SDK Installation [installation] -->

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

### [workspaces()](docs/sdks/workspaces1/README.md)


#### [workspaces().workspaceDocuments()](docs/sdks/workspacedocuments/README.md)

* [getWorkspaceDocuments](docs/sdks/workspacedocuments/README.md#getworkspacedocuments) - Get documents in the workspace accessible to the calling user
* [getWorkspaceDocument](docs/sdks/workspacedocuments/README.md#getworkspacedocument) - Get information about the document
* [deleteWorkspaceDocument](docs/sdks/workspacedocuments/README.md#deleteworkspacedocument) - Deletes a document in the workspace
* [getWorkspaceDocumentContents](docs/sdks/workspacedocuments/README.md#getworkspacedocumentcontents) - Get the file contents of the document

#### [workspaces().workspaces()](docs/sdks/workspaces2/README.md)

* [getWorkspaces](docs/sdks/workspaces2/README.md#getworkspaces) - Gets workspaces available to the calling user
* [createWorkspace](docs/sdks/workspaces2/README.md#createworkspace) - Creates a new workspace
* [getWorkspace](docs/sdks/workspaces2/README.md#getworkspace) - Returns details about the workspace
* [getWorkspaceAssignableRoles](docs/sdks/workspaces2/README.md#getworkspaceassignableroles) - Returns the roles the caller can assign to workspace users
* [createWorkspaceEnvelope](docs/sdks/workspaces2/README.md#createworkspaceenvelope) - Creates an envelope with the given documents. Returns the ID of the created envelope
* [getWorkspaceEnvelopes](docs/sdks/workspaces2/README.md#getworkspaceenvelopes) - Returns the envelopes associated with the given workspace

#### [workspaces().workspaceUploadRequest()](docs/sdks/workspaceuploadrequest/README.md)

* [createWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#createworkspaceuploadrequest) - Creates a new upload request within a workspace
* [getWorkspaceUploadRequests](docs/sdks/workspaceuploadrequest/README.md#getworkspaceuploadrequests) - Gets upload requests within a workspace
* [getWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#getworkspaceuploadrequest) - Gets details for a specific upload request
* [updateWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#updateworkspaceuploadrequest) - Updates a specific upload request
* [deleteWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#deleteworkspaceuploadrequest) - Deletes a specific upload request
* [completeWorkspaceUploadRequest](docs/sdks/workspaceuploadrequest/README.md#completeworkspaceuploadrequest) - Complete an upload request

#### [workspaces().workspaceUsers()](docs/sdks/workspaceusers/README.md)

* [getWorkspaceUsers](docs/sdks/workspaceusers/README.md#getworkspaceusers) - Retrieves the list of users in the given workspace
* [addWorkspaceUser](docs/sdks/workspaceusers/README.md#addworkspaceuser) - Adds a user to the workspace by email address
* [updateWorkspaceUser](docs/sdks/workspaceusers/README.md#updateworkspaceuser) - Updates the specified user's role
* [revokeWorkspaceUserAccess](docs/sdks/workspaceusers/README.md#revokeworkspaceuseraccess) - Revokes the specified user's access to the workspace
* [restoreWorkspaceUserAccess](docs/sdks/workspaceusers/README.md#restoreworkspaceuseraccess) - Restores the specified user's access to the workspace

</details>
<!-- End Available Resources and Operations [operations] -->

Expand Down Expand Up @@ -383,8 +393,8 @@ public class Application {
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
.request(req)
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
.build())
.retryConfig(RetryConfig.builder()
.backoff(BackoffStrategy.builder()
Expand Down Expand Up @@ -443,8 +453,8 @@ public class Application {
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
.request(req)
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
.build())
.call();

Expand Down Expand Up @@ -494,8 +504,8 @@ public class Application {
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
.request(req)
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
.build())
.call();

Expand Down Expand Up @@ -546,8 +556,8 @@ public class Application {
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
.request(req)
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
.build())
.call();

Expand Down Expand Up @@ -586,8 +596,8 @@ public class Application {
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
.request(req)
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
.build())
.call();

Expand Down Expand Up @@ -625,8 +635,8 @@ public class Application {
GetTokenFromConfidentialAuthCodeResponse res = sdk.auth().getTokenFromConfidentialAuthCode()
.request(req)
.security(GetTokenFromConfidentialAuthCodeSecurity.builder()
.clientId(System.getenv().getOrDefault("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79", ""))
.secretKey(System.getenv().getOrDefault("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI", ""))
.clientId("2da1cb14-xxxx-xxxx-xxxx-5b7b40829e79")
.secretKey("MTIzNDU2Nzxxxxxxxxxxxxxxxxxxxxx0NTY3ODkwMTI")
.build())
.serverURL("https://account.docusign.com")
.call();
Expand All @@ -639,6 +649,37 @@ public class Application {
```
<!-- End Server Selection [server] -->

<!-- Start Debugging [debug] -->
## Debugging

### Debug
You can setup your SDK to emit debug logs for SDK requests and responses.

For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
```java
SDK.builder()
.enableHTTPDebugLogging(true)
.build();
```
Example output:
```
Sending request: http://localhost:35123/bearer#global GET
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]}
Received response: (GET http://localhost:35123/bearer#global) 200
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]}
Response body:
{
"authenticated": true,
"token": "global"
}
```
__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`.

__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.

Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
<!-- End Debugging [debug] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

# Development
Expand Down
22 changes: 21 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,24 @@ Based on:
### Generated
- [java v1.0.0-beta.3] .
### Releases
- [Maven Central v1.0.0-beta.3] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.3 - .
- [Maven Central v1.0.0-beta.3] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.3 - .

## 2025-07-14 10:01:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.581.0 (2.656.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v1.0.0-beta.4] .
### Releases
- [Maven Central v1.0.0-beta.4] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.4 - .

## 2025-09-03 17:15:22
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.609.0 (2.692.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v1.0.0-beta.5] .
### Releases
- [Maven Central v1.0.0-beta.5] https://central.sonatype.com/artifact/com.docusign/iam-sdk/1.0.0-beta.5 - .
37 changes: 25 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3'
}

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

jar {
dependsOn(":generatePomFileForMavenPublication")
archiveBaseName = "${artifactId}"

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

tasks.withType(Javadoc) {
failOnError false
failOnError = false
options.addStringOption('Xdoclint:none', '-quiet')
}

Expand All @@ -72,27 +74,38 @@ sourcesJar {
javadocJar {
archiveBaseName = "${artifactId}"
}
sonatypeCentralUpload {
// This is your Sonatype generated username
username = System.getenv("SONATYPE_USERNAME")
// This is your sonatype generated password
password = System.getenv("SONATYPE_PASSWORD")

// This is a list of files to upload. Ideally you would point to your jar file, source and javadoc jar (required by central)
archives = files(
"$buildDir/libs/${artifactId}-${version}.jar",
"$buildDir/libs/${artifactId}-${version}-sources.jar",
"$buildDir/libs/${artifactId}-${version}-javadoc.jar"
)

// This is the pom file to upload. This is required by central
pom = file("$buildDir/pom.xml")

// This is your PGP private key. This is required to sign your files
signingKey = System.getenv("SONATYPE_SIGNING_KEY")
// This is your PGP private key passphrase to decrypt your private key
signingKeyPassphrase = System.getenv("SIGNING_KEY_PASSPHRASE")
}


publishing {
repositories {
maven {
name = "OSSRH"
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}

publications {
maven(MavenPublication) {
// note that properties can't yet be used below!
// https://github.com/gradle/gradle/issues/18619
groupId = "com.docusign"
artifactId = "iam-sdk"
version = "1.0.0-beta.3"
version = "1.0.0-beta.5"

from components.java

Expand Down
9 changes: 9 additions & 0 deletions docs/models/components/CreateWorkspaceBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CreateWorkspaceBody


## Fields

| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | *Optional\<String>* | :heavy_check_mark: | The name of the workspace |
| `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> |
8 changes: 8 additions & 0 deletions docs/models/components/CreateWorkspaceEnvelopeResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CreateWorkspaceEnvelopeResponse


## Fields

| Field | Type | Required | Description |
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
| `envelopeId` | *JsonNullable\<String>* | :heavy_minus_sign: | N/A |
Loading