Add webhook history examples and webhook payload fixes#254
Closed
aenadgrleey wants to merge 3 commits into
Closed
Conversation
Add webhook history examples across SDKs and teach generated webhook payload\ndeserializers to distinguish normal message deliveries from link_shared\nmessage payloads.\n\nUpdate the shared IR/spec plumbing for custom union deserializers and wire the\nGo, C#, Kotlin, Python, Swift, and TypeScript generators to use the composite\nwebhook discriminator without record-key hacks.\n\nValidation:\n- python3 -m py_compile pachca/*.py\n- bun run build\n- bun run examples/webhook-history.ts\n\nCo-authored-by: openai-codex/gpt-5.4 <openai-codex-gpt-5-4@models.pi.local>
Keep literal discriminator fields on generated union member models instead of dropping them during Kotlin and C# union emission. C# now serializes concrete override properties with the JSON field name, while Kotlin keeps secondary literal fields as body properties to avoid changing positional constructor APIs. Also prefer the configured discriminator field when routing union decoding in Go, Python, Swift, and C# so secondary literals like event do not accidentally become the primary discriminator. Regenerated SDK outputs, generator snapshots, and release metadata. Validation: bun --cwd packages/generator test; cd packages/generator && bun run typecheck; SDK compile/build checks for TypeScript, Python, Go, Kotlin, C#, and Swift; real main and webhook-history examples across all six SDKs. Co-authored-by: openai-codex/gpt-5.5 <openai-codex-gpt-5-5@models.pi.local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
messageandmessage + link_sharedare decoded as separate payload shapesKey changes
WebhookEventpathVerification
python3 -m py_compile pachca/*.pybun run buildPACHCA_TOKEN=*** bun run examples/webhook-history.tsReferences
link_sharedwebhook deliveries