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
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.25.0"
".": "4.26.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 145
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-9074e771bd8042233d1c6d73d11ea3c41ee63f3639119deae5dc3b7a5655e568.yml
openapi_spec_hash: f09e821d35afa0ad0117a1d8eb9d4d16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-31abe25287f6885a9e18e84b9317abcb36a9fff5f694feb7a4353c5622d93730.yml
openapi_spec_hash: 65d48382e29817ef7b89e70b20bf8d4d
config_hash: 3eb0070d128aef7a6da16173f7050177
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.26.0 (2026-08-04)

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

### Features

* Merge pull request [#178](https://github.com/trycourier/courier-java/issues/178) from trycourier/geraldosilva/c-19484-elemental-formatting-controls ([b101502](https://github.com/trycourier/courier-java/commit/b101502c679ded2342612293da4c8fec8574e1c2))


### Chores

* **internal:** codegen related update ([703b085](https://github.com/trycourier/courier-java/commit/703b085eb7aeb0ba0948849bb023a8fe7b9622da))

## 4.25.0 (2026-08-03)

Full Changelog: [v4.24.0...v4.25.0](https://github.com/trycourier/courier-java/compare/v4.24.0...v4.25.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.25.0" // x-release-please-version
version = "4.26.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ private constructor(
private val loop: JsonField<String>,
private val ref: JsonField<String>,
private val channel: JsonField<String>,
private val fontSize: JsonField<String>,
private val lineHeight: JsonField<String>,
private val padding: JsonField<String>,
private val raw: JsonField<Raw>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {
Expand All @@ -50,8 +53,13 @@ private constructor(
@JsonProperty("loop") @ExcludeMissing loop: JsonField<String> = JsonMissing.of(),
@JsonProperty("ref") @ExcludeMissing ref: JsonField<String> = JsonMissing.of(),
@JsonProperty("channel") @ExcludeMissing channel: JsonField<String> = JsonMissing.of(),
@JsonProperty("font_size") @ExcludeMissing fontSize: JsonField<String> = JsonMissing.of(),
@JsonProperty("line_height")
@ExcludeMissing
lineHeight: JsonField<String> = JsonMissing.of(),
@JsonProperty("padding") @ExcludeMissing padding: JsonField<String> = JsonMissing.of(),
@JsonProperty("raw") @ExcludeMissing raw: JsonField<Raw> = JsonMissing.of(),
) : this(channels, if_, loop, ref, channel, raw, mutableMapOf())
) : this(channels, if_, loop, ref, channel, fontSize, lineHeight, padding, raw, mutableMapOf())

fun toElementalBaseNode(): ElementalBaseNode =
ElementalBaseNode.builder().channels(channels).if_(if_).loop(loop).ref(ref).build()
Expand Down Expand Up @@ -89,6 +97,34 @@ private constructor(
*/
fun channel(): Optional<String> = channel.getOptional("channel")

/**
* Email only. Document-level base font size (CSS px, e.g. `16px`) for body content — text,
* quote, list and action button labels. Heading styles (`h1`/`h2`/`h3`) and `subtext` keep
* their preset sizes.
*
* @throws CourierInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun fontSize(): Optional<String> = fontSize.getOptional("font_size")

/**
* Email only. Document-level line height (CSS px or unitless multiplier, e.g. `24px` or `1.5`)
* applied to all body content unless overridden per block.
*
* @throws CourierInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun lineHeight(): Optional<String> = lineHeight.getOptional("line_height")

/**
* Email only. Document-level body padding applied once around the email body, as a CSS px
* shorthand (1–4 values), e.g. `48px 64px`.
*
* @throws CourierInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun padding(): Optional<String> = padding.getOptional("padding")

/**
* Raw data to apply to the channel. If `elements` has not been specified, `raw` is required.
*
Expand Down Expand Up @@ -132,6 +168,27 @@ private constructor(
*/
@JsonProperty("channel") @ExcludeMissing fun _channel(): JsonField<String> = channel

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

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

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

/**
* Returns the raw JSON value of [raw].
*
Expand Down Expand Up @@ -165,6 +222,9 @@ private constructor(
private var loop: JsonField<String> = JsonMissing.of()
private var ref: JsonField<String> = JsonMissing.of()
private var channel: JsonField<String> = JsonMissing.of()
private var fontSize: JsonField<String> = JsonMissing.of()
private var lineHeight: JsonField<String> = JsonMissing.of()
private var padding: JsonField<String> = JsonMissing.of()
private var raw: JsonField<Raw> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

Expand All @@ -175,6 +235,9 @@ private constructor(
loop = elementalChannelNode.loop
ref = elementalChannelNode.ref
channel = elementalChannelNode.channel
fontSize = elementalChannelNode.fontSize
lineHeight = elementalChannelNode.lineHeight
padding = elementalChannelNode.padding
raw = elementalChannelNode.raw
additionalProperties = elementalChannelNode.additionalProperties.toMutableMap()
}
Expand Down Expand Up @@ -260,6 +323,59 @@ private constructor(
*/
fun channel(channel: JsonField<String>) = apply { this.channel = channel }

/**
* Email only. Document-level base font size (CSS px, e.g. `16px`) for body content — text,
* quote, list and action button labels. Heading styles (`h1`/`h2`/`h3`) and `subtext` keep
* their preset sizes.
*/
fun fontSize(fontSize: String?) = fontSize(JsonField.ofNullable(fontSize))

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

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

/**
* Email only. Document-level line height (CSS px or unitless multiplier, e.g. `24px` or
* `1.5`) applied to all body content unless overridden per block.
*/
fun lineHeight(lineHeight: String?) = lineHeight(JsonField.ofNullable(lineHeight))

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

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

/**
* Email only. Document-level body padding applied once around the email body, as a CSS px
* shorthand (1–4 values), e.g. `48px 64px`.
*/
fun padding(padding: String?) = padding(JsonField.ofNullable(padding))

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

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

/**
* Raw data to apply to the channel. If `elements` has not been specified, `raw` is
* required.
Expand Down Expand Up @@ -308,6 +424,9 @@ private constructor(
loop,
ref,
channel,
fontSize,
lineHeight,
padding,
raw,
additionalProperties.toMutableMap(),
)
Expand All @@ -333,6 +452,9 @@ private constructor(
loop()
ref()
channel()
fontSize()
lineHeight()
padding()
raw().ifPresent { it.validate() }
validated = true
}
Expand All @@ -357,6 +479,9 @@ private constructor(
(if (loop.asKnown().isPresent) 1 else 0) +
(if (ref.asKnown().isPresent) 1 else 0) +
(if (channel.asKnown().isPresent) 1 else 0) +
(if (fontSize.asKnown().isPresent) 1 else 0) +
(if (lineHeight.asKnown().isPresent) 1 else 0) +
(if (padding.asKnown().isPresent) 1 else 0) +
(raw.asKnown().getOrNull()?.validity() ?: 0)

/**
Expand Down Expand Up @@ -481,16 +606,30 @@ private constructor(
loop == other.loop &&
ref == other.ref &&
channel == other.channel &&
fontSize == other.fontSize &&
lineHeight == other.lineHeight &&
padding == other.padding &&
raw == other.raw &&
additionalProperties == other.additionalProperties
}

private val hashCode: Int by lazy {
Objects.hash(channels, if_, loop, ref, channel, raw, additionalProperties)
Objects.hash(
channels,
if_,
loop,
ref,
channel,
fontSize,
lineHeight,
padding,
raw,
additionalProperties,
)
}

override fun hashCode(): Int = hashCode

override fun toString() =
"ElementalChannelNode{channels=$channels, if_=$if_, loop=$loop, ref=$ref, channel=$channel, raw=$raw, additionalProperties=$additionalProperties}"
"ElementalChannelNode{channels=$channels, if_=$if_, loop=$loop, ref=$ref, channel=$channel, fontSize=$fontSize, lineHeight=$lineHeight, padding=$padding, raw=$raw, additionalProperties=$additionalProperties}"
}
Loading
Loading