Skip to content

ci(platform): sync the webhook event types from production every hour - #336

Merged
ozsay merged 1 commit into
mainfrom
chore/sync-webhook-event-types
Oct 18, 2026
Merged

ozsay merged 1 commit into
mainfrom
chore/sync-webhook-event-types

Conversation

@ozsay

@ozsay ozsay commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Adds sync-webhook-events.yml, a sibling of sync-asyncapi.yml for the server webhooks module. It runs hourly at :45, apart from the asyncapi sync's :15. Each run:

  1. Adds new event types. npm run sync:webhooks appends to scripts/webhook-event-types.json every event type in the webhooks section of https://app.base44.com/api/v1/outbound-webhooks/openapi.json. It only adds: a retired type leaves the spec, but endpoints that selected it keep receiving it, so the SDK keeps its type.
  2. Regenerates every type. npm run generate:webhooks regenerates webhooks.events.generated.ts from https://base44.com/webhooks/schemas on every run, so a changed schema is picked up even when the list didn't change.
  3. Keeps one rolling PR. On a change it builds the docs, runs the tests, and opens or updates the PR on bot/platform-webhook-events-sync. With no change, it closes a stale one. This is the same mechanics as the asyncapi sync.

Two changes so the bot's PR passes without hand edits:

  • Exports: src/server/index.ts re-exports every generated data type with export type * instead of naming each one. Before this, a new event's type wasn't exported, and TypeDoc (treatWarningsAsErrors) failed the docs build.
  • Type test: tests/types/webhooks.types.ts no longer pins the full list of known types in its default branch. It also drops owner_service_external_id from the app.created.v1 fixture: that field was removed from every event in base44-dev/apper#30148.

The first run, verified locally, will:

  • add builder.turn_started.v1 and builder.turn_ended.v1;
  • remove owner_service_external_id from the existing events, matching the published schemas.

That's both an added event and an edited one. I ran the workflow's steps against prod: the sync, the generation, create-docs and npm test (82 passed). This PR leaves those changes to the bot, so its first PR proves both paths.

🤖 Generated with Claude Code

A sibling of sync-asyncapi.yml. Each hour it adds the event types the
production Outbound Webhooks spec publishes to webhook-event-types.json,
regenerates every type from the published schemas, and keeps one rolling
PR open when that changes anything, so new events and changed schemas
both reach the SDK.

Two changes let that PR pass without hand edits: the server entrypoint
re-exports every generated data type instead of naming each one, and the
type test no longer pins the full list of event types.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available! (@base44/platform)


Install this PR's preview build with npm:

npm i @base44-preview/platform@0.2.0-pr.336.059c4cd

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/platform:

npm i "@base44/platform@npm:@base44-preview/platform@0.2.0-pr.336.059c4cd"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/platform": "npm:@base44-preview/platform@0.2.0-pr.336.059c4cd"
  }
}

Preview published to npm registry — try new features instantly!

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.54-pr.336.059c4cd

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.54-pr.336.059c4cd"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.54-pr.336.059c4cd"
  }
}

Preview published to npm registry — try new features instantly!

@ozsay
ozsay merged commit fe82606 into main Oct 18, 2026
8 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.

2 participants