From ea3ec70a9339c34c0e162d807fe58ee4cbc8cc62 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 23:15:24 +0000 Subject: [PATCH 1/3] docs(openapi): use canonical type-id prefixes in id examples (#160) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(openapi): use canonical type-id prefixes in id examples Align example ids with the backend's type-id prefixes (backend staging, lib/courier-ids ID_PREFIXES): nt=notification, rs=routing-strategy, pc=provider-config, ps=preference-section, pt=preference-topic. - providers: prov_ -> pc_ (wrong prefix corrected) - preference sections: PS5QM... -> ps_ - preference topics: raw ULIDs and "marketing" -> distinct pt_ (the valid vs not-found example ids are kept distinct) - notifications / routing: normalize the fake-short nt_01abc123 / rs_01abc123 to valid 26-char typeids All new values are format-valid typeids (prefix_ + 26-char base32), generated with typeid-js. Scope is "typed fields only": path {id}/{section_id}/{topic_id} params and clearly-named id fields for the 5 entities that have prefixes. The shared generic placeholder abc-123 (used across many unrelated entities) and the already-correct, readable elem_* element ids are left as-is. Examples-only; no schema/contract change. Co-Authored-By: Claude Opus 4.8 * test(e2e): make the journeys invoke test self-contained The "lists journeys and invokes the first template" test invoked list.templates[0], which is flaky against the shared live workspace: when no journey happens to exist there the list is empty and the test fails on `expect(firstId).toBeDefined()` (data drift, not a regression). Every other test in this file creates its own journey; make this one do the same — create + publish a minimal api-invoke journey, then invoke it by id. `list` is still covered by the "lists journeys" test above. Co-Authored-By: Claude Opus 4.8 --------- Co-authored-by: Claude Opus 4.8 --- .stats.yml | 4 ++-- test/courier/resources/notifications_test.rb | 2 +- test/courier/resources/users/preferences_test.rb | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6ea0b3..70c7b0e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 138 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-e8d4bd51bf260b8a6cb9875718e36eab95d4e8d9490cd6c5c669eb69b82c2bf8.yml -openapi_spec_hash: bf321581a238ae891debcc5bb59dd501 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-6f6deee1badbf852c3040ab900f25716890cf5d0e71c59f1a6b770a7fb877500.yml +openapi_spec_hash: b22e111bf1a9a968c6c1ee427015a901 config_hash: 6c3a754258f0f77e9032a90a478ab76d diff --git a/test/courier/resources/notifications_test.rb b/test/courier/resources/notifications_test.rb index 3ce1b92..2a843bb 100644 --- a/test/courier/resources/notifications_test.rb +++ b/test/courier/resources/notifications_test.rb @@ -13,7 +13,7 @@ def test_create_required_params content: {elements: [{}], version: "2022-01-01"}, name: "Welcome Email", routing: {strategy_id: "rs_123"}, - subscription: {topic_id: "marketing"}, + subscription: {topic_id: "pt_01kx4h2jdafq8bk9a26x0kvd1t"}, tags: %w[onboarding welcome] } ) diff --git a/test/courier/resources/users/preferences_test.rb b/test/courier/resources/users/preferences_test.rb index 8b086bd..048d8fd 100644 --- a/test/courier/resources/users/preferences_test.rb +++ b/test/courier/resources/users/preferences_test.rb @@ -26,7 +26,7 @@ def test_bulk_replace_required_params response = @courier.users.preferences.bulk_replace( "user_id", - topics: [{status: :OPTED_IN, topic_id: "74Q4QGFBEX481DP6JRPMV751H4XT"}] + topics: [{status: :OPTED_IN, topic_id: "pt_01kx4h2jdafq8bk996nn92357r"}] ) assert_pattern do @@ -48,8 +48,8 @@ def test_bulk_update_required_params @courier.users.preferences.bulk_update( "user_id", topics: [ - {status: :OPTED_IN, topic_id: "74Q4QGFBEX481DP6JRPMV751H4XT"}, - {status: :OPTED_OUT, topic_id: "5Q4QGFBEX481DP6JRPMV751H4YU"} + {status: :OPTED_IN, topic_id: "pt_01kx4h2jdafq8bk996nn92357r"}, + {status: :OPTED_OUT, topic_id: "pt_01kx4h2jdafq8bk99eyt3dx43x"} ] ) From c72a6f63809b553dd84f047498ce8d695b311b09 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 00:04:43 +0000 Subject: [PATCH 2/3] docs(openapi): canonical type-id prefixes across all examples (#162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(openapi): canonical type-id prefixes in remaining id examples Follow-up to #160, which normalized nt/rs/pc/ps/pt id examples but left a few prefixed-entity ids using placeholder/short values. Align these with the backend's canonical type-id prefixes (staging lib/courier-ids ID_PREFIXES): - routing: strategy_id "rs_123" -> valid rs_ typeid (matches the rs_ example used elsewhere in the spec) - error messages: "Notification template nt_nonexistent not found" and "Routing strategy rs_nonexistent not found" -> valid-format not-found typeids (distinct from the "exists" example ids, per #160's valid-vs-not-found convention) - error message: "Version not found for template nt_123" -> canonical nt_ typeid (the template exists; only the version is missing) All values are format-valid typeids (prefix_ + 26-char base32), generated with typeid-js. Readable elem_* element ids are left as-is (element ids are idiomatically human-readable in this spec). Examples-only; no schema/contract change. Co-Authored-By: Claude Opus 4.8 * docs(openapi): use canonical jry_ / nt_ ids in journey examples Latest backend staging lib/courier-ids ID_PREFIXES added a JOURNEY: "jry" prefix (journey create always generates a jry_ typeid). The journeys example ids were still placeholders — align them: - journey ids (list items, create/get/replace/publish responses): abc-123 / abc-123-def-456 / xyz-789-ghi-012 -> jry_ typeids - journey-scoped notification templates (POST /journeys/{templateId}/templates results): tmpl-1 / tmpl-2 -> nt_ typeids Left as-is: journey node ids (trigger-1, send-1) are user-authored readable ids; run_id/runId are X-Ray-style run identifiers, not typeids; brand/tenant ids stay readable placeholders (both accept customer-supplied ids, matching #160). /automations examples are untouched (automation template ids are composite tenant/env-scoped, not a bare jry_). All new values are format-valid typeids (prefix_ + 26-char base32), generated with typeid-js. Examples-only; no schema/contract change. Co-Authored-By: Claude Opus 4.8 * docs: canonical brand/notification/routing ids + release-shepherd note Complete the type-id sweep so every prefixed-entity example uses a canonical typeid, and document the release-shepherd skill. openapi.yml (examples-only, no schema/contract change): - brand ids -> bnd_ (Brand, BrandsResponse, Tenant/TenantListResponse brand_id, RoutingStrategyGetResponse brand_id, and brand.id in notification responses): brand now has a canonical bnd prefix on staging, so the placeholder ULID / brand_abc values are replaced - NotificationListResponse item id: abc-123 -> nt_ (was missed) - RoutingStrategyGetResponse id: abc-123 -> rs_ (was missed) - BulkGetJobUsersResponse templateId -> nt_ Left readable/untouched (not backend-generated typeids): tenant/workspace ids (customer-supplied, wrk_ is only the generated fallback), tag ids, submission-check ids, audit-event ids, and /automations template ids (composite tenant/env-scoped, not a bare jry_). README: add a note pointing to the courier-release-shepherd skill for driving the docs sync + SDK release PRs after a merge. Co-Authored-By: Claude Opus 4.8 --------- Co-authored-by: Claude Opus 4.8 --- .stats.yml | 4 ++-- test/courier/resources/notifications_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 70c7b0e..9e3b99b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 138 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-6f6deee1badbf852c3040ab900f25716890cf5d0e71c59f1a6b770a7fb877500.yml -openapi_spec_hash: b22e111bf1a9a968c6c1ee427015a901 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-11e1931d767cef402bbed5a965746d1933ae72db0f41881860593a0b1424fd80.yml +openapi_spec_hash: 9def941805f233f8761c4bdae88f6137 config_hash: 6c3a754258f0f77e9032a90a478ab76d diff --git a/test/courier/resources/notifications_test.rb b/test/courier/resources/notifications_test.rb index 2a843bb..37d0525 100644 --- a/test/courier/resources/notifications_test.rb +++ b/test/courier/resources/notifications_test.rb @@ -9,10 +9,10 @@ def test_create_required_params response = @courier.notifications.create( notification: { - brand: {id: "brand_abc"}, + brand: {id: "bnd_01kx4mrd0pfzw8wt7pn7p2fzag"}, content: {elements: [{}], version: "2022-01-01"}, name: "Welcome Email", - routing: {strategy_id: "rs_123"}, + routing: {strategy_id: "rs_01kx4h2jdafq8bk9amzvy6hbv0"}, subscription: {topic_id: "pt_01kx4h2jdafq8bk9a26x0kvd1t"}, tags: %w[onboarding welcome] } From 0fd417467786482870e83313a5adcfc61fe07177 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 00:05:05 +0000 Subject: [PATCH 3/3] release: 4.19.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ Gemfile.lock | 2 +- lib/courier/version.rb | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a458854..abeb3cc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.19.1" + ".": "4.19.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 72ee7b0..3f1a41a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 4.19.2 (2026-07-10) + +Full Changelog: [v4.19.1...v4.19.2](https://github.com/trycourier/courier-ruby/compare/v4.19.1...v4.19.2) + +### Documentation + +* **openapi:** canonical type-id prefixes across all examples ([#162](https://github.com/trycourier/courier-ruby/issues/162)) ([c72a6f6](https://github.com/trycourier/courier-ruby/commit/c72a6f63809b553dd84f047498ce8d695b311b09)) +* **openapi:** use canonical type-id prefixes in id examples ([#160](https://github.com/trycourier/courier-ruby/issues/160)) ([ea3ec70](https://github.com/trycourier/courier-ruby/commit/ea3ec70a9339c34c0e162d807fe58ee4cbc8cc62)) + ## 4.19.1 (2026-07-09) Full Changelog: [v4.19.0...v4.19.1](https://github.com/trycourier/courier-ruby/compare/v4.19.0...v4.19.1) diff --git a/Gemfile.lock b/Gemfile.lock index 7a6d503..de77cce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - trycourier (4.19.1) + trycourier (4.19.2) cgi connection_pool diff --git a/lib/courier/version.rb b/lib/courier/version.rb index b8b4655..6766905 100644 --- a/lib/courier/version.rb +++ b/lib/courier/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Courier - VERSION = "4.19.1" + VERSION = "4.19.2" end