Export Siren's full typed taxonomy; add missing webhook events#5
Open
alexstandiford wants to merge 1 commit into
Open
Export Siren's full typed taxonomy; add missing webhook events#5alexstandiford wants to merge 1 commit into
alexstandiford wants to merge 1 commit into
Conversation
…ok events Siren owns its domain vocabulary (global-taxonomy-and-sdk-doctrine); this SDK is the typed carrier of it so integrations never hand-roll magic strings. - Add EventSlug (built-in ingestion slugs) and status vocabularies: ConversionStatus, TransactionStatus, ObligationStatus, PayoutStatus, FulfillmentStatus, OpportunityStatus, ApiKeyStatus, WebhookSubscriptionStatus (src/taxonomy.ts, exported from the root). - WebhookEventType: add credit.issued, credit.redeemed, currency.created, currency.deleted — dispatched by the service but missing from the SDK and openapi.yaml. - Pin the canonical vocabularies in test/taxonomy.test.ts (mirrors the service's dispatchers and REST validations). - README: use WebhookEventType constants in the webhook example instead of raw strings; document the taxonomy exports. Charter 761 (SDKs speak the taxonomy). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138jQKyzwyDfEbbAeMmYNnL
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.
What
Charter 761 (SDKs speak the taxonomy) — the SDK becomes the typed carrier of Siren's domain vocabulary so integrations reach for SDK types instead of magic strings (doctrine:
global-taxonomy-and-sdk-doctrine).src/taxonomy.ts, exported from the package root:EventSlug(built-in ingestion slugssale/refund/site-visited) and status vocabulariesConversionStatus,TransactionStatus,ObligationStatus,PayoutStatus,FulfillmentStatus,OpportunityStatus,ApiKeyStatus,WebhookSubscriptionStatus— each a const object + string-union type, same pattern as the existingWebhookEventType.WebhookEventType: 4 missing events added —credit.issued,credit.redeemed,currency.created,currency.deleted. The Siren service registers dispatchers for all four (lib/Webhooks/Service/Initializer.php) but the SDK andopenapi.yamlnever listed them. Both updated.test/taxonomy.test.tspins every vocabulary to the canonical set mined from the service (webhook dispatchers + RESTIsAnyvalidations). The stale 28-count assertion intest/webhooks.test.tsupdated to 32.WebhookEventTypeconstants instead of raw strings; taxonomy documented under Features.Source of truth
Vocabularies mined from
Novatorius/siren(the taxonomy owner): webhook dispatcher slugs, event factory slugs, and per-domain REST status validations.Noted upstream inconsistency (encoded as-is, flagged for founder): obligation machine paths write
completewhile the management REST surface acceptsfulfilled— both included inObligationStatus.Verification
npm test: 69 tests green (was 58; +11 taxonomy pins)npm run typecheckclean;npm run buildclean🤖 Generated with Claude Code
https://claude.ai/code/session_0138jQKyzwyDfEbbAeMmYNnL