Skip to content
Open
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
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# This allows generated code to be indexed correctly
*.java linguist-generated=false
1,038 changes: 684 additions & 354 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: false
java:
version: 3.14.0
version: 3.14.1
additionalDependencies: []
additionalPlugins: []
artifactID: novu-java
Expand All @@ -46,11 +46,13 @@ java:
enableFormatting: false
enableSlf4jLogging: true
enableStreamingUploads: true
explicitDocImports: false
flattenGlobalSecurity: true
forwardCompatibleEnumsByDefault: true
forwardCompatibleUnionsByDefault: "false"
generateOptionalUnionAccessors: true
generateSpringBootStarter: true
generateUnionDocs: false
githubURL: github.com/novuhq/novu-java
groupID: co.novu
imports:
Expand All @@ -74,7 +76,9 @@ java:
operationScopedParams: true
outputModelSuffix: output
packageName: co.novu
prefixModeMethodNames: false
projectName: novu
respectTitlesForPrimitiveUnionMembers: false
showSetterGetterTypesInDocs: false
templateVersion: v2
unionStrategy: populated-fields
13 changes: 6 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.732.2
speakeasyVersion: 1.748.0
sources:
'DEPRECATED: Novu API. Use -openapi.{json,yaml} instead.':
sourceNamespace: novu-oas
Expand All @@ -9,20 +9,19 @@ sources:
- 3.12.0
novu-OAS:
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:aaf89e274c31a5a450b1170b501418fe743781d8797e09e5827f2adb34e5f49a
sourceBlobDigest: sha256:70458c344be37b8b008f62e6725939bfe6ebcef8ec5edceebaf375ae6f541c10
sourceRevisionDigest: sha256:95fa382c732d36b81aefba1e9cf9468548b3a146f40136251ce3a4ee067bb2d0
sourceBlobDigest: sha256:928b0fddad679fc5fcd639f78b158c52b20e478dc3872968c906d8d9c0b3fdaf
tags:
- latest
- speakeasy-sdk-regen-next-1769213168
- 3.14.0
targets:
novu:
source: novu-OAS
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:aaf89e274c31a5a450b1170b501418fe743781d8797e09e5827f2adb34e5f49a
sourceBlobDigest: sha256:70458c344be37b8b008f62e6725939bfe6ebcef8ec5edceebaf375ae6f541c10
sourceRevisionDigest: sha256:95fa382c732d36b81aefba1e9cf9468548b3a146f40136251ce3a4ee067bb2d0
sourceBlobDigest: sha256:928b0fddad679fc5fcd639f78b158c52b20e478dc3872968c906d8d9c0b3fdaf
codeSamplesNamespace: novu-oas-java-code-samples
codeSamplesRevisionDigest: sha256:c73df67cdc82540ab0df3a94450eda0fdb446c4f8d4bdfe12f23112c12595130
codeSamplesRevisionDigest: sha256:0d90a51525f72cdc68d507210a014a109b84e621f219deb63031df3d0d395287
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
67 changes: 50 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For more information about the API: [Novu Documentation](https://docs.novu.co)
<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [openapi](#openapi)
* [JAVA Novu SDK](#java-novu-sdk)
* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Asynchronous Support](#asynchronous-support)
Expand All @@ -56,6 +56,7 @@ For more information about the API: [Novu Documentation](https://docs.novu.co)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Debugging](#debugging)
* [Jackson Configuration](#jackson-configuration)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)
Expand All @@ -73,15 +74,15 @@ The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'co.novu:novu-java:3.14.0'
implementation 'co.novu:novu-java:3.14.1'
```

Maven:
```xml
<dependency>
<groupId>co.novu</groupId>
<artifactId>novu-java</artifactId>
<version>3.14.0</version>
<version>3.14.1</version>
</dependency>
```

Expand Down Expand Up @@ -140,7 +141,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -170,7 +171,7 @@ public class Application {
.call();

if (res.boolean_().isPresent()) {
// handle response
System.out.println(res.boolean_().get());
}
}
}
Expand Down Expand Up @@ -225,7 +226,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -281,7 +282,7 @@ public class Application {
.call();

if (res.triggerEventResponseDtos().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDtos().get());
}
}
}
Expand Down Expand Up @@ -325,7 +326,7 @@ public class Application {

resFut.thenAccept(res -> {
if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
});
}
Expand Down Expand Up @@ -448,7 +449,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -498,6 +499,8 @@ public class Application {

### [Environments](docs/sdks/environments/README.md)

* [diff](docs/sdks/environments/README.md#diff) - Compare resources between environments
* [publish](docs/sdks/environments/README.md#publish) - Publish resources to target environment
* [create](docs/sdks/environments/README.md#create) - Create an environment
* [list](docs/sdks/environments/README.md#list) - List all environments
* [update](docs/sdks/environments/README.md#update) - Update an environment
Expand Down Expand Up @@ -738,7 +741,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -793,7 +796,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -857,7 +860,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
} catch (NovuException ex) { // all SDK exceptions inherit from NovuException

Expand Down Expand Up @@ -912,9 +915,9 @@ public class Application {
many more subclasses in the JDK platform).

**Inherit from [`NovuException`](./src/main/java/models/errors/NovuException.java)**:
* [`co.novu.models.errors.PayloadValidationExceptionDto`](./src/main/java/models/errors/co.novu.models.errors.PayloadValidationExceptionDto.java): Status code `400`. Applicable to 3 of 93 methods.*
* [`co.novu.models.errors.SubscriberResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.SubscriberResponseDtoException.java): Created. Status code `409`. Applicable to 1 of 93 methods.*
* [`co.novu.models.errors.TopicResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.TopicResponseDtoException.java): OK. Status code `409`. Applicable to 1 of 93 methods.*
* [`co.novu.models.errors.PayloadValidationExceptionDto`](./src/main/java/models/errors/co.novu.models.errors.PayloadValidationExceptionDto.java): Status code `400`. Applicable to 3 of 95 methods.*
* [`co.novu.models.errors.SubscriberResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.SubscriberResponseDtoException.java): Created. Status code `409`. Applicable to 1 of 95 methods.*
* [`co.novu.models.errors.TopicResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.TopicResponseDtoException.java): OK. Status code `409`. Applicable to 1 of 95 methods.*


</details>
Expand Down Expand Up @@ -972,7 +975,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -1017,7 +1020,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -1243,6 +1246,36 @@ __NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this option does not log request/response bodies.
<!-- End Debugging [debug] -->

<!-- Start Jackson Configuration [jackson] -->
## Jackson Configuration

The SDK ships with a pre-configured Jackson [`ObjectMapper`][jackson-databind] accessible via
`JSON.getMapper()`. It is set up with type modules, strict deserializers, and the feature flags
needed for full SDK compatibility (including ISO-8601 `OffsetDateTime` serialization):

```java
import co.novu.utils.JSON;

String json = JSON.getMapper().writeValueAsString(response);
```

To compose with your own `ObjectMapper`, register the provided `NovuJavaJacksonModule`, which
bundles all the same modules and feature flags as a single plug-and-play module:

```java
import co.novu.utils.NovuJavaJacksonModule;
import com.fasterxml.jackson.databind.ObjectMapper;

ObjectMapper myMapper = new ObjectMapper()
.registerModule(new NovuJavaJacksonModule());

String json = myMapper.writeValueAsString(response);
```

[jackson-databind]: https://github.com/FasterXML/jackson-databind
[jackson-jsr310]: https://github.com/FasterXML/jackson-modules-java8/tree/master/datetime
<!-- End Jackson Configuration [jackson] -->

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

# Development
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,14 @@ Based on:
### Generated
- [java v3.14.0] .
### Releases
- [Maven Central v3.14.0] https://central.sonatype.com/artifact/co.novu/novu-java/3.14.0 - .
- [Maven Central v3.14.0] https://central.sonatype.com/artifact/co.novu/novu-java/3.14.0 - .

## 2026-03-07 00:07:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.748.0 (2.852.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v3.14.1] .
### Releases
- [Maven Central v3.14.1] https://central.sonatype.com/artifact/co.novu/novu-java/3.14.1 - .
8 changes: 4 additions & 4 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -66,7 +66,7 @@ public class Application {
.call();

if (res.boolean_().isPresent()) {
// handle response
System.out.println(res.boolean_().get());
}
}
}
Expand Down Expand Up @@ -121,7 +121,7 @@ public class Application {
.call();

if (res.triggerEventResponseDto().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDto().get());
}
}
}
Expand Down Expand Up @@ -177,7 +177,7 @@ public class Application {
.call();

if (res.triggerEventResponseDtos().isPresent()) {
// handle response
System.out.println(res.triggerEventResponseDtos().get());
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions docs/models/components/ActivityNotificationJobResponseDtoType.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

Type of the job

## Example Usage

```java
import co.novu.models.components.ActivityNotificationJobResponseDtoType;

ActivityNotificationJobResponseDtoType value = ActivityNotificationJobResponseDtoType.IN_APP;

// Open enum: use .of() to create instances from custom string values
ActivityNotificationJobResponseDtoType custom = ActivityNotificationJobResponseDtoType.of("custom_value");
```


## Values

Expand Down
11 changes: 11 additions & 0 deletions docs/models/components/ActorTypeEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

The type of the actor, indicating the role in the notification process.

## Example Usage

```java
import co.novu.models.components.ActorTypeEnum;

ActorTypeEnum value = ActorTypeEnum.NONE;

// Open enum: use .of() to create instances from custom string values
ActorTypeEnum custom = ActorTypeEnum.of("custom_value");
```


## Values

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

## Example Usage

```java
import co.novu.models.components.BackoffUnit;

BackoffUnit value = BackoffUnit.SECONDS;

// Open enum: use .of() to create instances from custom string values
BackoffUnit custom = BackoffUnit.of("custom_value");
```


## Values

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

## Example Usage

```java
import co.novu.models.components.BuilderFieldTypeEnum;

BuilderFieldTypeEnum value = BuilderFieldTypeEnum.BOOLEAN;

// Open enum: use .of() to create instances from custom string values
BuilderFieldTypeEnum custom = BuilderFieldTypeEnum.of("custom_value");
```


## Values

Expand Down
Loading