Skip to content
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
timeout-minutes: 15
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/nuntly-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

steps:
- uses: actions/checkout@v6
Expand All @@ -46,7 +46,7 @@ jobs:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/nuntly-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.0"
".": "0.6.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 55
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/bazoud-corp%2Fnuntly-b843f02910523cb4ef8c23e1094c8421eb3bd6f78d9af975c12a162615bfd8e1.yml
openapi_spec_hash: a6cd2ac946127a11e40151aa47452036
config_hash: f7efb1381efa887568a5e7028908ebd3
configured_endpoints: 56
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/bazoud-corp/nuntly-8c62ff49f7cf36d877996fed2351b4e8e81f2397f5c7cb9d54b417f37cda8cd7.yml
openapi_spec_hash: 3e951a779e301ace98f73eabfe149e9b
config_hash: cf044f6bbd66c7aaf276100fe2f65f7e
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 0.6.0 (2026-05-06)

Full Changelog: [v0.5.0...v0.6.0](https://github.com/nuntly/nuntly-sdk-java/compare/v0.5.0...v0.6.0)

### Features

* **api:** implement label ([9106e39](https://github.com/nuntly/nuntly-sdk-java/commit/9106e39a9f68032114ada016fb3e6d6a1be4cf27))
* **client:** more robust error parsing ([cc836e0](https://github.com/nuntly/nuntly-sdk-java/commit/cc836e0fed4853538d946b64125c6cc402fcbdbc))
* **client:** support proxy authentication ([e6e0f39](https://github.com/nuntly/nuntly-sdk-java/commit/e6e0f3929ae6693a5d300ab4efdbc729819c0182))
* support setting headers via env ([fba15cd](https://github.com/nuntly/nuntly-sdk-java/commit/fba15cddd34b79348161aa1036496e5aeb9e3170))


### Performance Improvements

* **client:** create one json mapper ([f349b91](https://github.com/nuntly/nuntly-sdk-java/commit/f349b91d30687e78cb5f1389fdbb8abb73e6a28c))


### Chores

* **ci:** skip lint on metadata-only changes ([be6c700](https://github.com/nuntly/nuntly-sdk-java/commit/be6c7000aa0ec54b5abd5acc023c3d2ffd69969a))
* **internal:** update multipart form array serialization ([7cc35eb](https://github.com/nuntly/nuntly-sdk-java/commit/7cc35eb8ed276450e7fbc1617c32149a12818dd4))
* remove duplicated dokka setup ([b905581](https://github.com/nuntly/nuntly-sdk-java/commit/b90558163d03ec7305341c5929a47a678c6f1889))
* **tests:** bump steady to v0.19.7 ([9ad4c85](https://github.com/nuntly/nuntly-sdk-java/commit/9ad4c85cf8e51352f661d7ee640ae1d8dd724a8f))
* **tests:** bump steady to v0.20.1 ([4ca6c5e](https://github.com/nuntly/nuntly-sdk-java/commit/4ca6c5e8299d69f16020dc83f95452a25e9de016))
* **tests:** bump steady to v0.20.2 ([f406712](https://github.com/nuntly/nuntly-sdk-java/commit/f406712b2daed702c802028b63b1f97facd75454))
* **tests:** bump steady to v0.22.1 ([0043aa0](https://github.com/nuntly/nuntly-sdk-java/commit/0043aa083c9f94bd71e9be4552431ffee23c76c9))


### Documentation

* clarify forwards compat behavior ([3dfae7a](https://github.com/nuntly/nuntly-sdk-java/commit/3dfae7a1b98935aba71e07f06e13f2e68888203d))

## 0.5.0 (2026-03-24)

Full Changelog: [v0.4.0...v0.5.0](https://github.com/nuntly/nuntly-sdk-java/compare/v0.4.0...v0.5.0)
Expand Down
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.nuntly/nuntly-java)](https://central.sonatype.com/artifact/com.nuntly/nuntly-java/0.5.0)
[![javadoc](https://javadoc.io/badge2/com.nuntly/nuntly-java/0.5.0/javadoc.svg)](https://javadoc.io/doc/com.nuntly/nuntly-java/0.5.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.nuntly/nuntly-java)](https://central.sonatype.com/artifact/com.nuntly/nuntly-java/0.6.0)
[![javadoc](https://javadoc.io/badge2/com.nuntly/nuntly-java/0.6.0/javadoc.svg)](https://javadoc.io/doc/com.nuntly/nuntly-java/0.6.0)

<!-- x-release-please-end -->

Expand All @@ -22,7 +22,7 @@ Use the Nuntly MCP Server to enable AI assistants to interact with this API, all

<!-- x-release-please-start-version -->

The REST API documentation can be found on [developers.nuntly.com](http://developers.nuntly.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.nuntly/nuntly-java/0.5.0).
The REST API documentation can be found on [developers.nuntly.com](http://developers.nuntly.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.nuntly/nuntly-java/0.6.0).

<!-- x-release-please-end -->

Expand All @@ -33,7 +33,7 @@ The REST API documentation can be found on [developers.nuntly.com](http://develo
### Gradle

```kotlin
implementation("com.nuntly:nuntly-java:0.5.0")
implementation("com.nuntly:nuntly-java:0.6.0")
```

### Maven
Expand All @@ -42,7 +42,7 @@ implementation("com.nuntly:nuntly-java:0.5.0")
<dependency>
<groupId>com.nuntly</groupId>
<artifactId>nuntly-java</artifactId>
<version>0.5.0</version>
<version>0.6.0</version>
</dependency>
```

Expand Down Expand Up @@ -460,6 +460,21 @@ NuntlyClient client = NuntlyOkHttpClient.builder()
.build();
```

If the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:

```java
import com.nuntly.client.NuntlyClient;
import com.nuntly.client.okhttp.NuntlyOkHttpClient;
import com.nuntly.core.http.ProxyAuthenticator;

NuntlyClient client = NuntlyOkHttpClient.builder()
.fromEnv()
.proxy(...)
// Or a custom implementation of `ProxyAuthenticator`.
.proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))
.build();
```

### Connection pooling

To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:
Expand Down Expand Up @@ -700,7 +715,9 @@ In rare cases, the API may return a response that doesn't match the expected typ

By default, the SDK will not throw an exception in this case. It will throw [`NuntlyInvalidDataException`](nuntly-java-core/src/main/kotlin/com/nuntly/errors/NuntlyInvalidDataException.kt) only if you directly access the property.

If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:
Validating the response is _not_ forwards compatible with new types from the API for existing fields.

If you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:

```java
import com.nuntly.models.emails.EmailSendResponse;
Expand Down
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.nuntly"
version = "0.5.0" // x-release-please-version
version = "0.6.0" // x-release-please-version
}

subprojects {
Expand All @@ -21,7 +21,6 @@ subprojects {
group = "Verification"
description = "Verifies all source files are formatted."
}
apply(plugin = "org.jetbrains.dokka")
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.nuntly.core.Timeout
import com.nuntly.core.http.AsyncStreamResponse
import com.nuntly.core.http.Headers
import com.nuntly.core.http.HttpClient
import com.nuntly.core.http.ProxyAuthenticator
import com.nuntly.core.http.QueryParams
import com.nuntly.core.jsonMapper
import java.net.Proxy
Expand Down Expand Up @@ -49,6 +50,7 @@ class NuntlyOkHttpClient private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
private var proxyAuthenticator: ProxyAuthenticator? = null
private var maxIdleConnections: Int? = null
private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
Expand Down Expand Up @@ -79,6 +81,20 @@ class NuntlyOkHttpClient private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional<Proxy>) = proxy(proxy.getOrNull())

/**
* Provides credentials when an HTTP proxy responds with `407 Proxy Authentication
* Required`.
*/
fun proxyAuthenticator(proxyAuthenticator: ProxyAuthenticator?) = apply {
this.proxyAuthenticator = proxyAuthenticator
}

/**
* Alias for calling [Builder.proxyAuthenticator] with `proxyAuthenticator.orElse(null)`.
*/
fun proxyAuthenticator(proxyAuthenticator: Optional<ProxyAuthenticator>) =
proxyAuthenticator(proxyAuthenticator.getOrNull())

/**
* The maximum number of idle connections kept by the underlying OkHttp connection pool.
*
Expand Down Expand Up @@ -230,6 +246,9 @@ class NuntlyOkHttpClient private constructor() {
/**
* Whether to call `validate` on every response before returning it.
*
* Setting this to `true` is _not_ forwards compatible with new types from the API for
* existing fields.
*
* Defaults to false, which means the shape of the response will not be validated upfront.
* Instead, validation will only occur for the parts of the response that are accessed.
*/
Expand Down Expand Up @@ -376,6 +395,7 @@ class NuntlyOkHttpClient private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
.proxyAuthenticator(proxyAuthenticator)
.maxIdleConnections(maxIdleConnections)
.keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.nuntly.core.Timeout
import com.nuntly.core.http.AsyncStreamResponse
import com.nuntly.core.http.Headers
import com.nuntly.core.http.HttpClient
import com.nuntly.core.http.ProxyAuthenticator
import com.nuntly.core.http.QueryParams
import com.nuntly.core.jsonMapper
import java.net.Proxy
Expand Down Expand Up @@ -49,6 +50,7 @@ class NuntlyOkHttpClientAsync private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
private var proxyAuthenticator: ProxyAuthenticator? = null
private var maxIdleConnections: Int? = null
private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
Expand Down Expand Up @@ -79,6 +81,20 @@ class NuntlyOkHttpClientAsync private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional<Proxy>) = proxy(proxy.getOrNull())

/**
* Provides credentials when an HTTP proxy responds with `407 Proxy Authentication
* Required`.
*/
fun proxyAuthenticator(proxyAuthenticator: ProxyAuthenticator?) = apply {
this.proxyAuthenticator = proxyAuthenticator
}

/**
* Alias for calling [Builder.proxyAuthenticator] with `proxyAuthenticator.orElse(null)`.
*/
fun proxyAuthenticator(proxyAuthenticator: Optional<ProxyAuthenticator>) =
proxyAuthenticator(proxyAuthenticator.getOrNull())

/**
* The maximum number of idle connections kept by the underlying OkHttp connection pool.
*
Expand Down Expand Up @@ -230,6 +246,9 @@ class NuntlyOkHttpClientAsync private constructor() {
/**
* Whether to call `validate` on every response before returning it.
*
* Setting this to `true` is _not_ forwards compatible with new types from the API for
* existing fields.
*
* Defaults to false, which means the shape of the response will not be validated upfront.
* Instead, validation will only occur for the parts of the response that are accessed.
*/
Expand Down Expand Up @@ -376,6 +395,7 @@ class NuntlyOkHttpClientAsync private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
.proxyAuthenticator(proxyAuthenticator)
.maxIdleConnections(maxIdleConnections)
.keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
Expand Down
Loading
Loading