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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.13.0"
".": "4.13.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-f0ac5c2fa86eabda773c549f5809d3e2d109e3e1d5a07f6fe1ace18355e4680a.yml
openapi_spec_hash: b25dc0b42dd9386ab4a025bb2143bde6
config_hash: 6037e4a9909efb8b2edac2dcc907b84f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-3f78581b4e078a1f620d9f587f18d77bcde6d20f56b0e4ae798648f4236494fb.yml
openapi_spec_hash: 6bd33e0396d85e11bb46f0d549af93a3
config_hash: afcc4f6f8c33ca3f338589e32e086f56
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 4.13.1 (2026-04-14)

Full Changelog: [v4.13.0...v4.13.1](https://github.com/trycourier/courier-java/compare/v4.13.0...v4.13.1)

### Bug Fixes

* **types:** flatten response structure in NotificationTemplateResponse ([38b5307](https://github.com/trycourier/courier-java/commit/38b53079bd65f9813756e45cfbe7f8d4d5b27c99))
* **types:** make note optional in notifications, flatten template response ([ba686ac](https://github.com/trycourier/courier-java/commit/ba686ac91e66e3f6979623246a9f9b01607839aa))

## 4.13.0 (2026-04-13)

Full Changelog: [v4.12.0...v4.13.0](https://github.com/trycourier/courier-java/compare/v4.12.0...v4.13.0)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.courier"
version = "4.13.0" // x-release-please-version
version = "4.13.1" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ private constructor(
private val id: JsonField<String>,
private val createdAt: JsonField<Long>,
private val eventIds: JsonField<List<String>>,
private val note: JsonField<String>,
private val routing: JsonField<MessageRouting>,
private val topicId: JsonField<String>,
private val updatedAt: JsonField<Long>,
private val note: JsonField<String>,
private val tags: JsonField<Tags>,
private val title: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
Expand All @@ -447,7 +447,6 @@ private constructor(
@JsonProperty("event_ids")
@ExcludeMissing
eventIds: JsonField<List<String>> = JsonMissing.of(),
@JsonProperty("note") @ExcludeMissing note: JsonField<String> = JsonMissing.of(),
@JsonProperty("routing")
@ExcludeMissing
routing: JsonField<MessageRouting> = JsonMissing.of(),
Expand All @@ -457,16 +456,17 @@ private constructor(
@JsonProperty("updated_at")
@ExcludeMissing
updatedAt: JsonField<Long> = JsonMissing.of(),
@JsonProperty("note") @ExcludeMissing note: JsonField<String> = JsonMissing.of(),
@JsonProperty("tags") @ExcludeMissing tags: JsonField<Tags> = JsonMissing.of(),
@JsonProperty("title") @ExcludeMissing title: JsonField<String> = JsonMissing.of(),
) : this(
id,
createdAt,
eventIds,
note,
routing,
topicId,
updatedAt,
note,
tags,
title,
mutableMapOf(),
Expand Down Expand Up @@ -495,13 +495,6 @@ private constructor(
*/
fun eventIds(): List<String> = eventIds.getRequired("event_ids")

/**
* @throws CourierInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected
* value).
*/
fun note(): String = note.getRequired("note")

/**
* @throws CourierInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected
Expand All @@ -523,6 +516,12 @@ private constructor(
*/
fun updatedAt(): Long = updatedAt.getRequired("updated_at")

/**
* @throws CourierInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
*/
fun note(): Optional<String> = note.getOptional("note")

/**
* @throws CourierInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
Expand Down Expand Up @@ -562,13 +561,6 @@ private constructor(
@ExcludeMissing
fun _eventIds(): JsonField<List<String>> = eventIds

/**
* Returns the raw JSON value of [note].
*
* Unlike [note], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("note") @ExcludeMissing fun _note(): JsonField<String> = note

/**
* Returns the raw JSON value of [routing].
*
Expand All @@ -595,6 +587,13 @@ private constructor(
@ExcludeMissing
fun _updatedAt(): JsonField<Long> = updatedAt

/**
* Returns the raw JSON value of [note].
*
* Unlike [note], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("note") @ExcludeMissing fun _note(): JsonField<String> = note

/**
* Returns the raw JSON value of [tags].
*
Expand Down Expand Up @@ -631,7 +630,6 @@ private constructor(
* .id()
* .createdAt()
* .eventIds()
* .note()
* .routing()
* .topicId()
* .updatedAt()
Expand All @@ -646,10 +644,10 @@ private constructor(
private var id: JsonField<String>? = null
private var createdAt: JsonField<Long>? = null
private var eventIds: JsonField<MutableList<String>>? = null
private var note: JsonField<String>? = null
private var routing: JsonField<MessageRouting>? = null
private var topicId: JsonField<String>? = null
private var updatedAt: JsonField<Long>? = null
private var note: JsonField<String> = JsonMissing.of()
private var tags: JsonField<Tags> = JsonMissing.of()
private var title: JsonField<String> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
Expand All @@ -659,10 +657,10 @@ private constructor(
id = notification.id
createdAt = notification.createdAt
eventIds = notification.eventIds.map { it.toMutableList() }
note = notification.note
routing = notification.routing
topicId = notification.topicId
updatedAt = notification.updatedAt
note = notification.note
tags = notification.tags
title = notification.title
additionalProperties = notification.additionalProperties.toMutableMap()
Expand Down Expand Up @@ -716,17 +714,6 @@ private constructor(
}
}

fun note(note: String) = note(JsonField.of(note))

/**
* Sets [Builder.note] to an arbitrary JSON value.
*
* You should usually call [Builder.note] with a well-typed [String] value instead.
* This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
fun note(note: JsonField<String>) = apply { this.note = note }

fun routing(routing: MessageRouting) = routing(JsonField.of(routing))

/**
Expand Down Expand Up @@ -760,6 +747,17 @@ private constructor(
*/
fun updatedAt(updatedAt: JsonField<Long>) = apply { this.updatedAt = updatedAt }

fun note(note: String) = note(JsonField.of(note))

/**
* Sets [Builder.note] to an arbitrary JSON value.
*
* You should usually call [Builder.note] with a well-typed [String] value instead.
* This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
fun note(note: JsonField<String>) = apply { this.note = note }

fun tags(tags: Tags?) = tags(JsonField.ofNullable(tags))

/** Alias for calling [Builder.tags] with `tags.orElse(null)`. */
Expand Down Expand Up @@ -820,7 +818,6 @@ private constructor(
* .id()
* .createdAt()
* .eventIds()
* .note()
* .routing()
* .topicId()
* .updatedAt()
Expand All @@ -833,10 +830,10 @@ private constructor(
checkRequired("id", id),
checkRequired("createdAt", createdAt),
checkRequired("eventIds", eventIds).map { it.toImmutable() },
checkRequired("note", note),
checkRequired("routing", routing),
checkRequired("topicId", topicId),
checkRequired("updatedAt", updatedAt),
note,
tags,
title,
additionalProperties.toMutableMap(),
Expand All @@ -853,10 +850,10 @@ private constructor(
id()
createdAt()
eventIds()
note()
routing().validate()
topicId()
updatedAt()
note()
tags().ifPresent { it.validate() }
title()
validated = true
Expand All @@ -881,10 +878,10 @@ private constructor(
(if (id.asKnown().isPresent) 1 else 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
(eventIds.asKnown().getOrNull()?.size ?: 0) +
(if (note.asKnown().isPresent) 1 else 0) +
(routing.asKnown().getOrNull()?.validity() ?: 0) +
(if (topicId.asKnown().isPresent) 1 else 0) +
(if (updatedAt.asKnown().isPresent) 1 else 0) +
(if (note.asKnown().isPresent) 1 else 0) +
(tags.asKnown().getOrNull()?.validity() ?: 0) +
(if (title.asKnown().isPresent) 1 else 0)

Expand Down Expand Up @@ -1282,10 +1279,10 @@ private constructor(
id == other.id &&
createdAt == other.createdAt &&
eventIds == other.eventIds &&
note == other.note &&
routing == other.routing &&
topicId == other.topicId &&
updatedAt == other.updatedAt &&
note == other.note &&
tags == other.tags &&
title == other.title &&
additionalProperties == other.additionalProperties
Expand All @@ -1296,10 +1293,10 @@ private constructor(
id,
createdAt,
eventIds,
note,
routing,
topicId,
updatedAt,
note,
tags,
title,
additionalProperties,
Expand All @@ -1309,7 +1306,7 @@ private constructor(
override fun hashCode(): Int = hashCode

override fun toString() =
"Notification{id=$id, createdAt=$createdAt, eventIds=$eventIds, note=$note, routing=$routing, topicId=$topicId, updatedAt=$updatedAt, tags=$tags, title=$title, additionalProperties=$additionalProperties}"
"Notification{id=$id, createdAt=$createdAt, eventIds=$eventIds, routing=$routing, topicId=$topicId, updatedAt=$updatedAt, note=$note, tags=$tags, title=$title, additionalProperties=$additionalProperties}"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ private constructor(
) : this(notification, state, mutableMapOf())

/**
* Full document shape used in POST and PUT request bodies, and returned inside the GET response
* envelope.
* Core template fields used in POST and PUT request bodies (nested under a `notification` key)
* and returned at the top level in responses.
*
* @throws CourierInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
Expand Down Expand Up @@ -112,8 +112,8 @@ private constructor(
}

/**
* Full document shape used in POST and PUT request bodies, and returned inside the GET
* response envelope.
* Core template fields used in POST and PUT request bodies (nested under a `notification`
* key) and returned at the top level in responses.
*/
fun notification(notification: NotificationTemplatePayload) =
notification(JsonField.of(notification))
Expand Down
Loading
Loading