Skip to content

Commit acf1eab

Browse files
release: 4.8.0 (#74)
* feat(api): remove brand field from ElementalContent model * chore(internal): remove mock server code * chore: update mock server docs * codegen metadata * codegen metadata * codegen metadata * chore(internal): codegen related update * chore(ci): add build step * codegen metadata * feat(api): add provider_key/device/tracking to token params, remove body_token * chore(internal): codegen related update * chore(ci): skip uploading artifacts on stainless-internal branches * feat(api): add journeys resource with list and invoke methods * fix: mark MessageDetails timestamp fields as optional * codegen metadata * release: 4.8.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent cc67458 commit acf1eab

293 files changed

Lines changed: 3768 additions & 716 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.

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,44 @@ on:
1313
- 'stl-preview-base/**'
1414

1515
jobs:
16+
build:
17+
timeout-minutes: 10
18+
name: build
19+
permissions:
20+
contents: read
21+
id-token: write
22+
runs-on: ${{ github.repository == 'stainless-sdks/courier-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
23+
if: |-
24+
github.repository == 'stainless-sdks/courier-ruby' &&
25+
(github.event_name == 'push' || github.event.pull_request.head.repo.fork)
26+
steps:
27+
- uses: actions/checkout@v6
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@v1
30+
with:
31+
bundler-cache: false
32+
- run: |-
33+
bundle install
34+
35+
- name: Get GitHub OIDC Token
36+
if: |-
37+
github.repository == 'stainless-sdks/courier-ruby' &&
38+
!startsWith(github.ref, 'refs/heads/stl/')
39+
id: github-oidc
40+
uses: actions/github-script@v8
41+
with:
42+
script: core.setOutput('github_token', await core.getIDToken());
43+
44+
- name: Build and upload gem artifacts
45+
if: |-
46+
github.repository == 'stainless-sdks/courier-ruby' &&
47+
!startsWith(github.ref, 'refs/heads/stl/')
48+
env:
49+
URL: https://pkg.stainless.com/s
50+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
51+
SHA: ${{ github.sha }}
52+
PACKAGE_NAME: courier
53+
run: ./scripts/utils/upload-artifact.sh
1654
lint:
1755
timeout-minutes: 10
1856
name: lint

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.7.1"
2+
".": "4.8.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 81
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-3fc1c86b4a83a16393aaf17d1fb3ac6098d30dd057ba872973b57285a7a3f0d0.yml
3-
openapi_spec_hash: 02a545d217b13399f311e99561f9de1d
4-
config_hash: 0789c3cddc625bb9712b3bded274ab6c
1+
configured_endpoints: 83
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-19330fca8fa9bbae835ec9d9f83b37b3df364d9b462090b9623bfc9b6eae99c2.yml
3+
openapi_spec_hash: 0bc6889464c9ac2542b4837f569c1837
4+
config_hash: 1ae49ed522c8423378d9463cdd0fb880

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## 4.8.0 (2026-03-12)
4+
5+
Full Changelog: [v4.7.1...v4.8.0](https://github.com/trycourier/courier-ruby/compare/v4.7.1...v4.8.0)
6+
7+
### Features
8+
9+
* **api:** add journeys resource with list and invoke methods ([26a80de](https://github.com/trycourier/courier-ruby/commit/26a80de1aa75c947f63e09da0ae7cb539947ecc4))
10+
* **api:** add provider_key/device/tracking to token params, remove body_token ([acb3031](https://github.com/trycourier/courier-ruby/commit/acb30313188a385e2ad39be4f4040e4e5836106d))
11+
* **api:** remove brand field from ElementalContent model ([519fcc0](https://github.com/trycourier/courier-ruby/commit/519fcc0a2f35a1fd61e64362b5a2e7b2d8225232))
12+
13+
14+
### Bug Fixes
15+
16+
* mark MessageDetails timestamp fields as optional ([31a0be6](https://github.com/trycourier/courier-ruby/commit/31a0be63ee9969176a7bb3a627eabeb7c26d50f6))
17+
18+
19+
### Chores
20+
21+
* **ci:** add build step ([d07ae3d](https://github.com/trycourier/courier-ruby/commit/d07ae3dc073f38ac30af1311f1d70153e441bf51))
22+
* **ci:** skip uploading artifacts on stainless-internal branches ([d4c0636](https://github.com/trycourier/courier-ruby/commit/d4c06361e5ef4e7c0a3a1660215d63fe845694c5))
23+
* **internal:** codegen related update ([3a0f51e](https://github.com/trycourier/courier-ruby/commit/3a0f51e6a03c33097f1307ac7974a3c5ca72ac90))
24+
* **internal:** codegen related update ([1cce4a8](https://github.com/trycourier/courier-ruby/commit/1cce4a8be23782aae7fb9185b8ac2efd06516842))
25+
* **internal:** remove mock server code ([a81351a](https://github.com/trycourier/courier-ruby/commit/a81351a2fde27b8a785a79436394a991e9048d97))
26+
* update mock server docs ([62d69fc](https://github.com/trycourier/courier-ruby/commit/62d69fc657babf8ff535e150d74a2283ddb64459))
27+
28+
29+
### Documentation
30+
31+
* add AUTO-GENERATED-OVERVIEW markers for README sync ([#75](https://github.com/trycourier/courier-ruby/issues/75)) ([ab86102](https://github.com/trycourier/courier-ruby/commit/ab86102437d2af03dc45beae7262371c70b6847f))
32+
* sync README from mintlify-docs (2026-02-20 18:11 UTC) ([#76](https://github.com/trycourier/courier-ruby/issues/76)) ([cc67458](https://github.com/trycourier/courier-ruby/commit/cc6745816e152b890b84caaf666178bdbd9d3192))
33+
334
## 4.7.1 (2026-02-07)
435

536
Full Changelog: [v4.7.0...v4.7.1](https://github.com/trycourier/courier-ruby/compare/v4.7.0...v4.7.1)

CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ $ bundle exec rake
6666

6767
## Running tests
6868

69-
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
70-
71-
```bash
72-
$ npx prism mock path/to/your/openapi.yml
73-
```
74-
7569
```bash
7670
$ bundle exec rake test
7771
```

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
trycourier (4.7.1)
14+
trycourier (4.8.0)
1515
cgi
1616
connection_pool
1717

lib/courier.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
require_relative "courier/models/base_check"
5959
require_relative "courier/models/subscription_topic_new"
6060
require_relative "courier/models/elemental_channel_node"
61+
require_relative "courier/models/journeys_invoke_request"
6162
require_relative "courier/models/message_details"
6263
require_relative "courier/models/base_template_tenant_association"
6364
require_relative "courier/models/post_tenant_template_publish_request"
@@ -138,6 +139,11 @@
138139
require_relative "courier/models/inbound_track_event_response"
139140
require_relative "courier/models/intercom"
140141
require_relative "courier/models/intercom_recipient"
142+
require_relative "courier/models/journey"
143+
require_relative "courier/models/journey_invoke_params"
144+
require_relative "courier/models/journey_list_params"
145+
require_relative "courier/models/journeys_invoke_response"
146+
require_relative "courier/models/journeys_list_response"
141147
require_relative "courier/models/list_delete_params"
142148
require_relative "courier/models/list_filter"
143149
require_relative "courier/models/list_list_params"
@@ -287,6 +293,7 @@
287293
require_relative "courier/resources/brands"
288294
require_relative "courier/resources/bulk"
289295
require_relative "courier/resources/inbound"
296+
require_relative "courier/resources/journeys"
290297
require_relative "courier/resources/lists"
291298
require_relative "courier/resources/lists/subscriptions"
292299
require_relative "courier/resources/messages"

lib/courier/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class Client < Courier::Internal::Transport::BaseClient
3333
# @return [Courier::Resources::Automations]
3434
attr_reader :automations
3535

36+
# @return [Courier::Resources::Journeys]
37+
attr_reader :journeys
38+
3639
# @return [Courier::Resources::Brands]
3740
attr_reader :brands
3841

@@ -118,6 +121,7 @@ def initialize(
118121
@audit_events = Courier::Resources::AuditEvents.new(client: self)
119122
@auth = Courier::Resources::Auth.new(client: self)
120123
@automations = Courier::Resources::Automations.new(client: self)
124+
@journeys = Courier::Resources::Journeys.new(client: self)
121125
@brands = Courier::Resources::Brands.new(client: self)
122126
@bulk = Courier::Resources::Bulk.new(client: self)
123127
@inbound = Courier::Resources::Inbound.new(client: self)

lib/courier/internal/util.rb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,37 @@ def writable_enum(&blk)
490490
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
491491

492492
class << self
493+
# @api private
494+
#
495+
# @param query [Hash{Symbol=>Object}]
496+
#
497+
# @return [Hash{Symbol=>Object}]
498+
def encode_query_params(query)
499+
out = {}
500+
query.each { write_query_param_element!(out, _1, _2) }
501+
out
502+
end
503+
504+
# @api private
505+
#
506+
# @param collection [Hash{Symbol=>Object}]
507+
# @param key [String]
508+
# @param element [Object]
509+
#
510+
# @return [nil]
511+
private def write_query_param_element!(collection, key, element)
512+
case element
513+
in Hash
514+
element.each do |name, value|
515+
write_query_param_element!(collection, "#{key}[#{name}]", value)
516+
end
517+
in Array
518+
collection[key] = element.map(&:to_s).join(",")
519+
else
520+
collection[key] = element.to_s
521+
end
522+
end
523+
493524
# @api private
494525
#
495526
# @param y [Enumerator::Yielder]

lib/courier/models.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@ module Courier
179179

180180
IntercomRecipient = Courier::Models::IntercomRecipient
181181

182+
Journey = Courier::Models::Journey
183+
184+
JourneyInvokeParams = Courier::Models::JourneyInvokeParams
185+
186+
JourneyListParams = Courier::Models::JourneyListParams
187+
188+
JourneysInvokeRequest = Courier::Models::JourneysInvokeRequest
189+
190+
JourneysInvokeResponse = Courier::Models::JourneysInvokeResponse
191+
192+
JourneysListResponse = Courier::Models::JourneysListResponse
193+
182194
ListDeleteParams = Courier::Models::ListDeleteParams
183195

184196
ListFilter = Courier::Models::ListFilter

0 commit comments

Comments
 (0)