Skip to content

Commit 2b453c6

Browse files
chore: 🐝 Update SDK - Generate [next] 3.15.0 (#146)
1 parent c88280e commit 2b453c6

651 files changed

Lines changed: 58653 additions & 1732 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

.speakeasy/gen.lock

Lines changed: 2485 additions & 550 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ generation:
3131
generateNewTests: true
3232
skipResponseBodyAssertions: false
3333
java:
34-
version: 3.14.0
34+
version: 3.15.0
3535
additionalDependencies: []
3636
additionalPlugins: []
3737
artifactID: novu-java
@@ -46,11 +46,13 @@ java:
4646
enableFormatting: false
4747
enableSlf4jLogging: true
4848
enableStreamingUploads: true
49+
explicitDocImports: false
4950
flattenGlobalSecurity: true
5051
forwardCompatibleEnumsByDefault: true
5152
forwardCompatibleUnionsByDefault: "false"
5253
generateOptionalUnionAccessors: true
5354
generateSpringBootStarter: true
55+
generateUnionDocs: false
5456
githubURL: github.com/novuhq/novu-java
5557
groupID: co.novu
5658
imports:
@@ -74,7 +76,9 @@ java:
7476
operationScopedParams: true
7577
outputModelSuffix: output
7678
packageName: co.novu
79+
prefixModeMethodNames: false
7780
projectName: novu
7881
respectTitlesForPrimitiveUnionMembers: false
82+
showSetterGetterTypesInDocs: false
7983
templateVersion: v2
8084
unionStrategy: populated-fields

.speakeasy/workflow.lock

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.732.2
1+
speakeasyVersion: 1.761.3
22
sources:
33
'DEPRECATED: Novu API. Use -openapi.{json,yaml} instead.':
44
sourceNamespace: novu-oas
@@ -9,20 +9,19 @@ sources:
99
- 3.12.0
1010
novu-OAS:
1111
sourceNamespace: novu-oas
12-
sourceRevisionDigest: sha256:aaf89e274c31a5a450b1170b501418fe743781d8797e09e5827f2adb34e5f49a
13-
sourceBlobDigest: sha256:70458c344be37b8b008f62e6725939bfe6ebcef8ec5edceebaf375ae6f541c10
12+
sourceRevisionDigest: sha256:c5dd0d3f13489389911c14b53f3bbdd6237fcab5d844a6bfaff97940512a44a6
13+
sourceBlobDigest: sha256:13ff54b154fcc9d198ca82a7d3ba72b1fe8cfbcb323370bd57a93450207b2311
1414
tags:
1515
- latest
16-
- speakeasy-sdk-regen-next-1769213168
17-
- 3.14.0
16+
- 3.15.0
1817
targets:
1918
novu:
2019
source: novu-OAS
2120
sourceNamespace: novu-oas
22-
sourceRevisionDigest: sha256:aaf89e274c31a5a450b1170b501418fe743781d8797e09e5827f2adb34e5f49a
23-
sourceBlobDigest: sha256:70458c344be37b8b008f62e6725939bfe6ebcef8ec5edceebaf375ae6f541c10
21+
sourceRevisionDigest: sha256:c5dd0d3f13489389911c14b53f3bbdd6237fcab5d844a6bfaff97940512a44a6
22+
sourceBlobDigest: sha256:13ff54b154fcc9d198ca82a7d3ba72b1fe8cfbcb323370bd57a93450207b2311
2423
codeSamplesNamespace: novu-oas-java-code-samples
25-
codeSamplesRevisionDigest: sha256:c73df67cdc82540ab0df3a94450eda0fdb446c4f8d4bdfe12f23112c12595130
24+
codeSamplesRevisionDigest: sha256:20ca348983899708eae37f797d0826188fbc41e60b63e28e0f7e9fa3342ee446
2625
workflow:
2726
workflowVersion: 1.0.0
2827
speakeasyVersion: latest

README.md

Lines changed: 95 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ For more information about the API: [Novu Documentation](https://docs.novu.co)
4444
<!-- Start Table of Contents [toc] -->
4545
## Table of Contents
4646
<!-- $toc-max-depth=2 -->
47-
* [openapi](#openapi)
47+
* [JAVA Novu SDK](#java-novu-sdk)
4848
* [SDK Installation](#sdk-installation)
4949
* [SDK Example Usage](#sdk-example-usage)
5050
* [Asynchronous Support](#asynchronous-support)
@@ -56,6 +56,7 @@ For more information about the API: [Novu Documentation](https://docs.novu.co)
5656
* [Server Selection](#server-selection)
5757
* [Custom HTTP Client](#custom-http-client)
5858
* [Debugging](#debugging)
59+
* [Jackson Configuration](#jackson-configuration)
5960
* [Development](#development)
6061
* [Maturity](#maturity)
6162
* [Contributions](#contributions)
@@ -73,15 +74,15 @@ The samples below show how a published SDK artifact is used:
7374

7475
Gradle:
7576
```groovy
76-
implementation 'co.novu:novu-java:3.14.0'
77+
implementation 'co.novu:novu-java:3.15.0'
7778
```
7879

7980
Maven:
8081
```xml
8182
<dependency>
8283
<groupId>co.novu</groupId>
8384
<artifactId>novu-java</artifactId>
84-
<version>3.14.0</version>
85+
<version>3.15.0</version>
8586
</dependency>
8687
```
8788

@@ -140,7 +141,7 @@ public class Application {
140141
.call();
141142

142143
if (res.triggerEventResponseDto().isPresent()) {
143-
// handle response
144+
System.out.println(res.triggerEventResponseDto().get());
144145
}
145146
}
146147
}
@@ -170,7 +171,7 @@ public class Application {
170171
.call();
171172

172173
if (res.boolean_().isPresent()) {
173-
// handle response
174+
System.out.println(res.boolean_().get());
174175
}
175176
}
176177
}
@@ -225,7 +226,7 @@ public class Application {
225226
.call();
226227

227228
if (res.triggerEventResponseDto().isPresent()) {
228-
// handle response
229+
System.out.println(res.triggerEventResponseDto().get());
229230
}
230231
}
231232
}
@@ -281,7 +282,7 @@ public class Application {
281282
.call();
282283

283284
if (res.triggerEventResponseDtos().isPresent()) {
284-
// handle response
285+
System.out.println(res.triggerEventResponseDtos().get());
285286
}
286287
}
287288
}
@@ -325,14 +326,23 @@ public class Application {
325326

326327
resFut.thenAccept(res -> {
327328
if (res.triggerEventResponseDto().isPresent()) {
328-
// handle response
329+
System.out.println(res.triggerEventResponseDto().get());
329330
}
330331
});
331332
}
332333
}
333334
```
334335

335336
[comp-fut]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
337+
338+
#### Union Consumption Patterns
339+
340+
When a response field is a union model:
341+
342+
- Discriminated unions: branch on the discriminator (`switch`) and then narrow to the concrete type.
343+
- Non-discriminated unions: use generated accessors (for example `string()`, `asLong()`, `simpleObject()`) to determine the active variant.
344+
345+
For full model-specific examples (including Java 11/16/21 variants), see each union model's **Supported Types** section in the generated model docs.
336346
<!-- End SDK Example Usage [usage] -->
337347

338348
<!-- Start Asynchronous Support [async-support] -->
@@ -448,7 +458,7 @@ public class Application {
448458
.call();
449459

450460
if (res.triggerEventResponseDto().isPresent()) {
451-
// handle response
461+
System.out.println(res.triggerEventResponseDto().get());
452462
}
453463
}
454464
}
@@ -470,7 +480,7 @@ public class Application {
470480

471481
### [Activity](docs/sdks/activity/README.md)
472482

473-
* [track](docs/sdks/activity/README.md#track) - Track activity and engagement events
483+
* [track](docs/sdks/activity/README.md#track) - Track provider activity and engagement events
474484

475485
### [ChannelConnections](docs/sdks/channelconnections/README.md)
476486

@@ -496,8 +506,19 @@ public class Application {
496506
* [get](docs/sdks/contexts/README.md#get) - Retrieve a context
497507
* [delete](docs/sdks/contexts/README.md#delete) - Delete a context
498508

509+
### [EnvironmentVariables](docs/sdks/environmentvariables/README.md)
510+
511+
* [list](docs/sdks/environmentvariables/README.md#list) - List all variables
512+
* [create](docs/sdks/environmentvariables/README.md#create) - Create a variable
513+
* [retrieve](docs/sdks/environmentvariables/README.md#retrieve) - Get environment variable
514+
* [update](docs/sdks/environmentvariables/README.md#update) - Update a variable
515+
* [delete](docs/sdks/environmentvariables/README.md#delete) - Delete environment variable
516+
* [usage](docs/sdks/environmentvariables/README.md#usage) - Retrieve a variable usage
517+
499518
### [Environments](docs/sdks/environments/README.md)
500519

520+
* [diff](docs/sdks/environments/README.md#diff) - Compare resources between environments
521+
* [publish](docs/sdks/environments/README.md#publish) - Publish resources to target environment
501522
* [create](docs/sdks/environments/README.md#create) - Create an environment
502523
* [list](docs/sdks/environments/README.md#list) - List all environments
503524
* [update](docs/sdks/environments/README.md#update) - Update an environment
@@ -553,6 +574,26 @@ public class Application {
553574
* [removeCredentials](docs/sdks/subscribers/README.md#removecredentials) - Delete provider credentials
554575
* [markAllMessages](docs/sdks/subscribers/README.md#markallmessages) - Update all notifications state
555576

577+
#### [Subscribers.Notifications](docs/sdks/subscribersnotifications1/README.md)
578+
579+
* [list](docs/sdks/subscribersnotifications1/README.md#list) - Retrieve subscriber notifications
580+
* [delete](docs/sdks/subscribersnotifications1/README.md#delete) - Delete a notification
581+
* [completeAction](docs/sdks/subscribersnotifications1/README.md#completeaction) - Complete a notification action
582+
* [revertAction](docs/sdks/subscribersnotifications1/README.md#revertaction) - Revert a notification action
583+
* [archive](docs/sdks/subscribersnotifications1/README.md#archive) - Archive a notification
584+
* [markAsRead](docs/sdks/subscribersnotifications1/README.md#markasread) - Mark a notification as read
585+
* [snooze](docs/sdks/subscribersnotifications1/README.md#snooze) - Snooze a notification
586+
* [unarchive](docs/sdks/subscribersnotifications1/README.md#unarchive) - Unarchive a notification
587+
* [markAsUnread](docs/sdks/subscribersnotifications1/README.md#markasunread) - Mark a notification as unread
588+
* [unsnooze](docs/sdks/subscribersnotifications1/README.md#unsnooze) - Unsnooze a notification
589+
* [archiveAll](docs/sdks/subscribersnotifications1/README.md#archiveall) - Archive all notifications
590+
* [count](docs/sdks/subscribersnotifications1/README.md#count) - Retrieve subscriber notifications count
591+
* [deleteAll](docs/sdks/subscribersnotifications1/README.md#deleteall) - Delete all notifications
592+
* [markAllAsRead](docs/sdks/subscribersnotifications1/README.md#markallasread) - Mark all notifications as read
593+
* [archiveAllRead](docs/sdks/subscribersnotifications1/README.md#archiveallread) - Archive all read notifications
594+
* [markAsSeen](docs/sdks/subscribersnotifications1/README.md#markasseen) - Mark notifications as seen
595+
* [getUnseenCount](docs/sdks/subscribersnotifications1/README.md#getunseencount) - Retrieve unseen notifications count
596+
556597
### [Subscribers.Credentials](docs/sdks/credentials/README.md)
557598

558599
* [upsert](docs/sdks/credentials/README.md#upsert) - Upsert provider credentials
@@ -561,10 +602,6 @@ public class Application {
561602

562603
* [updateActionStatus](docs/sdks/subscribersmessages1/README.md#updateactionstatus) - Update notification action status
563604

564-
### [Subscribers.Notifications](docs/sdks/subscribersnotifications2/README.md)
565-
566-
* [getUnseenCount](docs/sdks/subscribersnotifications2/README.md#getunseencount) - Retrieve unseen notifications count
567-
568605
### [Subscribers.Preferences](docs/sdks/preferences/README.md)
569606

570607
* [list](docs/sdks/preferences/README.md#list) - Retrieve subscriber preferences
@@ -574,9 +611,9 @@ public class Application {
574611

575612
* [markAllAs](docs/sdks/subscribersmessages2/README.md#markallas) - Update notifications state
576613

577-
### [SubscribersNotifications](docs/sdks/subscribersnotifications1/README.md)
614+
### [SubscribersNotifications](docs/sdks/subscribersnotifications2/README.md)
578615

579-
* [getFeed](docs/sdks/subscribersnotifications1/README.md#getfeed) - Retrieve subscriber notifications
616+
* [getFeed](docs/sdks/subscribersnotifications2/README.md#getfeed) - Retrieve subscriber notifications
580617

581618
### [SubscribersProperties](docs/sdks/subscribersproperties/README.md)
582619

@@ -632,6 +669,10 @@ public class Application {
632669

633670
* [get](docs/sdks/steps/README.md#get) - Retrieve workflow step
634671

672+
### [WorkflowsSteps](docs/sdks/workflowssteps/README.md)
673+
674+
* [generatePreview](docs/sdks/workflowssteps/README.md#generatepreview) - Generate a step preview
675+
635676
</details>
636677
<!-- End Available Resources and Operations [operations] -->
637678

@@ -738,7 +779,7 @@ public class Application {
738779
.call();
739780

740781
if (res.triggerEventResponseDto().isPresent()) {
741-
// handle response
782+
System.out.println(res.triggerEventResponseDto().get());
742783
}
743784
}
744785
}
@@ -793,7 +834,7 @@ public class Application {
793834
.call();
794835

795836
if (res.triggerEventResponseDto().isPresent()) {
796-
// handle response
837+
System.out.println(res.triggerEventResponseDto().get());
797838
}
798839
}
799840
}
@@ -857,7 +898,7 @@ public class Application {
857898
.call();
858899

859900
if (res.triggerEventResponseDto().isPresent()) {
860-
// handle response
901+
System.out.println(res.triggerEventResponseDto().get());
861902
}
862903
} catch (NovuException ex) { // all SDK exceptions inherit from NovuException
863904

@@ -912,9 +953,9 @@ public class Application {
912953
many more subclasses in the JDK platform).
913954

914955
**Inherit from [`NovuException`](./src/main/java/models/errors/NovuException.java)**:
915-
* [`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.*
916-
* [`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.*
917-
* [`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.*
956+
* [`co.novu.models.errors.PayloadValidationExceptionDto`](./src/main/java/models/errors/co.novu.models.errors.PayloadValidationExceptionDto.java): Status code `400`. Applicable to 3 of 118 methods.*
957+
* [`co.novu.models.errors.SubscriberResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.SubscriberResponseDtoException.java): Created. Status code `409`. Applicable to 1 of 118 methods.*
958+
* [`co.novu.models.errors.TopicResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.TopicResponseDtoException.java): OK. Status code `409`. Applicable to 1 of 118 methods.*
918959

919960

920961
</details>
@@ -972,7 +1013,7 @@ public class Application {
9721013
.call();
9731014

9741015
if (res.triggerEventResponseDto().isPresent()) {
975-
// handle response
1016+
System.out.println(res.triggerEventResponseDto().get());
9761017
}
9771018
}
9781019
}
@@ -1017,7 +1058,7 @@ public class Application {
10171058
.call();
10181059

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

1287+
<!-- Start Jackson Configuration [jackson] -->
1288+
## Jackson Configuration
1289+
1290+
The SDK ships with a pre-configured Jackson [`ObjectMapper`][jackson-databind] accessible via
1291+
`JSON.getMapper()`. It is set up with type modules, strict deserializers, and the feature flags
1292+
needed for full SDK compatibility (including ISO-8601 `OffsetDateTime` serialization):
1293+
1294+
```java
1295+
import co.novu.utils.JSON;
1296+
1297+
String json = JSON.getMapper().writeValueAsString(response);
1298+
```
1299+
1300+
To compose with your own `ObjectMapper`, register the provided `NovuJavaJacksonModule`, which
1301+
bundles all the same modules and feature flags as a single plug-and-play module:
1302+
1303+
```java
1304+
import co.novu.utils.NovuJavaJacksonModule;
1305+
import com.fasterxml.jackson.databind.ObjectMapper;
1306+
1307+
ObjectMapper myMapper = new ObjectMapper()
1308+
.registerModule(new NovuJavaJacksonModule());
1309+
1310+
String json = myMapper.writeValueAsString(response);
1311+
```
1312+
1313+
[jackson-databind]: https://github.com/FasterXML/jackson-databind
1314+
[jackson-jsr310]: https://github.com/FasterXML/jackson-modules-java8/tree/master/datetime
1315+
<!-- End Jackson Configuration [jackson] -->
1316+
12461317
<!-- Placeholder for Future Speakeasy SDK Sections -->
12471318

12481319
# Development

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@ Based on:
1818
### Generated
1919
- [java v3.14.0] .
2020
### Releases
21-
- [Maven Central v3.14.0] https://central.sonatype.com/artifact/co.novu/novu-java/3.14.0 - .
21+
- [Maven Central v3.14.0] https://central.sonatype.com/artifact/co.novu/novu-java/3.14.0 - .
22+
23+
## 2026-04-13 15:11:33
24+
### Changes
25+
Based on:
26+
- OpenAPI Doc
27+
- Speakeasy CLI 1.761.3 (2.879.11) https://github.com/speakeasy-api/speakeasy
28+
### Generated
29+
- [java v3.15.0] .
30+
### Releases
31+
- [Maven Central v3.15.0] https://central.sonatype.com/artifact/co.novu/novu-java/3.15.0 - .

0 commit comments

Comments
 (0)