Skip to content

chore(journey-client): revision reads and revision names - #498

Merged
stewarthsoj merged 4 commits into
mainfrom
josh/er-5411-journey-client-1.6.0
Sep 11, 2026
Merged

chore(journey-client): revision reads and revision names#498
stewarthsoj merged 4 commits into
mainfrom
josh/er-5411-journey-client-1.6.0

Conversation

@stewarthsoj

@stewarthsoj stewarthsoj commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Regenerates @epilot/journey-client from journey-config spec 1.6.0, which adds two fields the platform already relies on:

  • revision_id — an optional query parameter on getJourney (GET /v1/journey/configuration/{id}), and a field on its response naming the revision served. This is what lets a save-and-continue session stay on the revision it started on.
  • revision_name — optional on JourneyRevisionRequest: what a save changed, for the revision history to list. Distinct from name, the journey's own name.

revision_name shipped to journey-api's master without an OpenAPI version bump, so it has been untyped for every consumer since. The journey builder sends it today and works only because JourneyRevisionRequest carries an index signature. This release is the first to type it.

What changed

  • src/openapi.json, src/openapi-runtime.json, src/openapi.d.ts regenerated. The only removal in the diff is the version string; everything else is additive.
  • A changeset marking @epilot/sdk as a minor release.

Test plan

  • npm run typegenrevision_name?: string on JourneyRevisionRequest; revision_id? in GetJourney.QueryParameters.
  • npm run typescript (tsc) clean; npm run bundle-definition succeeds.
  • npm test — 3 tests pass.
  • servers unchanged from the published client: prod + dev, both retained.
  • Behaviour verified against dev before this regen: published revisions served publicly, unpublished only with edit permission, revision_id + version → 400, legacy ?version=n untouched.

Backwards compatibility

Both fields are optional and additive. Existing operations, schemas and the default base URLs are unchanged, so consumers that never pass revision_id or revision_name behave exactly as before. With journeys-versioning off no journey adopts versioning, so the API never serves revision_id at all.

Josh Stewart and others added 2 commits September 11, 2026 07:08
getJourney takes an optional revision_id and reports which revision it
served; the create-revision request takes an optional revision_name.

Generated from journey-api's spec file: the public docs still serve 1.5.0
until journey-api reaches prod. The servers block, which publication injects
rather than the repo carrying it, is preserved as published.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141GA3wvnTSZnewvXPHeq6d
The v2 SDK keeps its own compact definition, types and docs per API, so
updating the journey client alone left them behind and compact.test.ts
failed on the missing revision_id parameter.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141GA3wvnTSZnewvXPHeq6d
@stewarthsoj stewarthsoj changed the title ER-5411: journey-client spec 1.6.0 — revision reads and revision names chore(journey-client): revision reads and revision names Sep 11, 2026
journey-api is on prod, so docs.api.epilot.io now serves 1.6.0 and the
client is generated from it rather than the repo's spec file. The published
spec declares only the prod server, so the dev entry this branch had added
is gone: CI regenerates from the same URL and would strip it anyway.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141GA3wvnTSZnewvXPHeq6d
@stewarthsoj
stewarthsoj marked this pull request as ready for review September 11, 2026 07:31
The client's own version is bumped by hand in the PR; the auto-release job
only covers @epilot/sdk and @epilot/cli. Without this the package stays at
0.7.0 and journey-monorepo's 0.8.0 pin cannot resolve.

Also asserts the runtime read carries revision_id, ported from !490.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141GA3wvnTSZnewvXPHeq6d
@stewarthsoj
stewarthsoj merged commit a29d04a into main Sep 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant