chore(sdks,docs): v0.13 SDK generation prep, upgrade guide, spec fixes (#688, #689)#690
Conversation
…tempt tests - Use response.models and response.pagination for list endpoints - Treat Event.status as optional per spec; poll for status after delivery - Add Event → Attempt test: publish event, assert attempt created with status success - Update run script, README, .env.example, mocharc, destination tests for SDK Co-authored-by: Cursor <cursoragent@cursor.com>
…xample - docs: add Upgrade to v0.12/v0.13 to sidebar, SDK migration section, issue #688 link - sdks/schemas: include pagination and speakeasy overlays for SDK generation - examples: dashboard-integration uses events list models/pagination (v0.13) Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Prepares the repo for Outpost v0.13 SDK regeneration by updating Speakeasy overlays, aligning spec-SDK contract tests to the new { models, pagination } envelope, and adding documentation/examples to guide users through the breaking SDK/API changes.
Changes:
- Updated Speakeasy overlays for v0.13 endpoint naming + pagination handling.
- Updated/added spec-SDK tests (events/topics + destination topic selection) to match v0.13 response shapes and async delivery behavior.
- Updated docs + demo dashboard example for the v0.13 list response envelope.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| spec-sdk-tests/tests/topics.test.ts | New topics list/sanity tests. |
| spec-sdk-tests/tests/events.test.ts | Updates event status polling and adds Event→Attempt test; adapts to models/pagination. |
| spec-sdk-tests/tests/destinations/webhook.test.ts | Uses instance topics from /topics for “array of topics” test. |
| spec-sdk-tests/tests/destinations/rabbitmq.test.ts | Uses instance topics from /topics for “array of topics” test. |
| spec-sdk-tests/tests/destinations/gcp-pubsub.test.ts | Uses instance topics from /topics for “array of topics” test. |
| spec-sdk-tests/tests/destinations/azure-servicebus.test.ts | Uses instance topics from /topics for “array of topics” test. |
| spec-sdk-tests/tests/destinations/aws-sqs.test.ts | Uses instance topics from /topics for “array of topics” test. |
| spec-sdk-tests/tests/destinations/aws-s3.test.ts | Uses instance topics from /topics for “array of topics” test. |
| spec-sdk-tests/tests/destinations/aws-kinesis.test.ts | Uses instance topics from /topics for “array of topics” test. |
| spec-sdk-tests/test-setup.ts | Adds optional global per-test delay hook via TEST_DELAY_MS. |
| spec-sdk-tests/scripts/run-tests.sh | Adds optional skip for /healthz check and improves API base URL handling. |
| spec-sdk-tests/package.json | Adds test:failures script for targeted reruns. |
| spec-sdk-tests/README.md | Documents managed Outpost health-check skip + delay + curl debugging. |
| spec-sdk-tests/.mocharc.json | Requires the new test-setup.ts hook file. |
| spec-sdk-tests/.env.example | Updates examples and adds SKIP_HEALTH_CHECK + TEST_DELAY_MS. |
| sdks/schemas/speakeasy-modifications-overlay.yaml | Updates Speakeasy name overrides for v0.13 endpoint/method naming. |
| sdks/schemas/pagination-fixes-overlay.yaml | Updates pagination override targets/config for v0.13 SeekPagination + envelope. |
| examples/demos/dashboard-integration/src/lib/outpost.ts | Updates dashboard example to read response.models from events list. |
| docs/zudoku.config.ts | Adds “Upgrade to v0.12/v0.13” guides to docs nav. |
| docs/pages/guides/upgrade-v0.13.mdx | Adds v0.13 SDK migration guidance and before/after examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -151,50 +227,44 @@ describe('Events - Status Field Tests (PR #491)', () => { | |||
| }); | |||
| console.log('Event published successfully'); | |||
|
|
|||
| // Poll for events with 5s intervals, max 30s wait | |||
| const events = await pollForEvents( | |||
| // Poll until at least one event has status (delivery attempt completed). Uses list without destinationId | |||
| // because GET /events?destination_id=... currently returns 500 (see GitHub issue). | |||
| const events = await pollForEventsWithStatus( | |||
| async () => { | |||
| const response = await sdk.events.listByDestination({ | |||
| const response = await sdk.events.list({ | |||
| tenantId: client.getTenantId(), | |||
| destinationId: destinationId, | |||
| }); | |||
| return response?.data || []; | |||
| return response?.models || []; | |||
There was a problem hiding this comment.
The status assertion can become a false-positive because it searches for any event with status in the tenant list. If the tenant already has historical events with status, this test can pass even if the event you just published never appears or never gets a status. Prefer capturing the eventId from publish.event() and polling sdk.events.get({ eventId }) until status is set, then assert on that specific event.
| /** Topic names used only for spec-SDK tests; they must not exist before/after. */ | ||
| const TEST_ONLY_TOPIC_NAMES = [ | ||
| 'spec-sdk-test.placeholder', | ||
| 'outpost.spec-test.topic', | ||
| 'test.only.topic.management', | ||
| ]; | ||
|
|
||
| describe('Topics - List and sanity checks', () => { | ||
| it('should list topics and return an array of strings', async function () { | ||
| const client = createSdkClient(); | ||
| const sdk = client.getSDK(); | ||
|
|
||
| const topics = await sdk.topics.list(); | ||
|
|
||
| expect(topics).to.be.an('array'); | ||
| topics.forEach((t: string, i: number) => { | ||
| expect(t, `topic[${i}]`).to.be.a('string'); | ||
| expect(t.length, `topic[${i}]`).to.be.greaterThan(0); | ||
| }); | ||
| }); | ||
|
|
||
| it('should not contain test-only placeholder topics (before/after sanity)', async function () { | ||
| const client = createSdkClient(); | ||
| const sdk = client.getSDK(); | ||
|
|
||
| const topics = await sdk.topics.list(); | ||
| const set = new Set(topics); | ||
|
|
||
| for (const testTopic of TEST_ONLY_TOPIC_NAMES) { | ||
| expect(set.has(testTopic), `Topic "${testTopic}" should not exist in instance list`).to.be.false; | ||
| } |
There was a problem hiding this comment.
This test hard-codes topic names that “must not exist” on the target Outpost instance. Since topics are instance-configured, a real deployment could legitimately include one of these strings and the suite would fail for reasons unrelated to the API/SDK contract. Consider gating this check behind an env flag (or removing it) so default runs don’t assume a specific topic set.
…nts pagination, topics.list) Co-authored-by: Cursor <cursoragent@cursor.com>
…ict topics check on env Co-authored-by: Cursor <cursoragent@cursor.com>
- Use repo-relative path in pagination-fixes-overlay.yaml extends (CI/contributors) - Remove obsolete curl-events.sh section; document run-tests.sh behavior Co-authored-by: Cursor <cursoragent@cursor.com>
…ek pagination only) Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Prep for v0.13 SDK generation and documentation updates. SDKs will be generated via GitHub Actions (Generate OUTPOST-TS, OUTPOST-GO, OUTPOST-PYTHON).
Changes
OpenAPI spec (#688, #689)
statusfrom Event schema (delivery outcome is on Attempt only).destination_idquery param from GET /events (unimplemented; no longer advertised).servers(https://api.outpost.hookdeck.com/2025-07-01), then localhost.Docs
SDKs
sdks/schemas/): includepagination-fixes-overlay.yamlandspeakeasy-modifications-overlay.yamlfor v0.13 generation (no generated SDK code in this PR).Examples
response.models,response.pagination).Spec SDK tests
response.models/response.pagination; Event → Attempt test (publish event, assert attempt created withstatus: success).statusassertions andpollForEventsWithStatus; simplify to list events and get by ID; updatetest:failuresgrep.sdk-defaults.test.tsasserting new Outpost instance defaults tohttps://api.outpost.hookdeck.com/2025-07-01.Next steps
set_versionto0.13.0).destination_id/ 500 note and Bug: GET /events with destination_id returns 500 #688 link if not done in a follow-up.Refs #688, #689