@whooshbang/contracts 1.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +198 -0
- package/LICENSE +21 -0
- package/README.md +120 -0
- package/contract-manifest.json +390 -0
- package/dist/base64url.d.ts +2 -0
- package/dist/base64url.js +51 -0
- package/dist/base64url.js.map +1 -0
- package/dist/generated/artifact-index.d.ts +205 -0
- package/dist/generated/artifact-index.js +396 -0
- package/dist/generated/artifact-index.js.map +1 -0
- package/dist/generated/contract-manifest.d.ts +66 -0
- package/dist/generated/contract-manifest.js +6 -0
- package/dist/generated/contract-manifest.js.map +1 -0
- package/dist/generated/core-scenario.d.ts +18 -0
- package/dist/generated/core-scenario.js +6 -0
- package/dist/generated/core-scenario.js.map +1 -0
- package/dist/generated/fixture-index.d.ts +33 -0
- package/dist/generated/fixture-index.js +6 -0
- package/dist/generated/fixture-index.js.map +1 -0
- package/dist/generated/interaction-machine-scenario.d.ts +263 -0
- package/dist/generated/interaction-machine-scenario.js +6 -0
- package/dist/generated/interaction-machine-scenario.js.map +1 -0
- package/dist/generated/interaction-v1.d.ts +152 -0
- package/dist/generated/interaction-v1.js +6 -0
- package/dist/generated/interaction-v1.js.map +1 -0
- package/dist/generated/machine-v1.d.ts +169 -0
- package/dist/generated/machine-v1.js +6 -0
- package/dist/generated/machine-v1.js.map +1 -0
- package/dist/generated/provider-capabilities-v1.d.ts +78 -0
- package/dist/generated/provider-capabilities-v1.js +6 -0
- package/dist/generated/provider-capabilities-v1.js.map +1 -0
- package/dist/generated/validators-standalone.d.ts +659 -0
- package/dist/generated/validators-standalone.js +47800 -0
- package/dist/generated/validators-standalone.js.map +1 -0
- package/dist/generated/validators.d.ts +74 -0
- package/dist/generated/validators.js +493 -0
- package/dist/generated/validators.js.map +1 -0
- package/dist/generated/webhook-delivery-case-v1.d.ts +91 -0
- package/dist/generated/webhook-delivery-case-v1.js +6 -0
- package/dist/generated/webhook-delivery-case-v1.js.map +1 -0
- package/dist/generated/webhook-signing-vector-v1.d.ts +88 -0
- package/dist/generated/webhook-signing-vector-v1.js +6 -0
- package/dist/generated/webhook-signing-vector-v1.js.map +1 -0
- package/dist/generated/whooshbang-event-v1.d.ts +191 -0
- package/dist/generated/whooshbang-event-v1.js +6 -0
- package/dist/generated/whooshbang-event-v1.js.map +1 -0
- package/dist/generated/whooshbang-v1.d.ts +1162 -0
- package/dist/generated/whooshbang-v1.js +6 -0
- package/dist/generated/whooshbang-v1.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/machine-credential.d.ts +31 -0
- package/dist/machine-credential.js +78 -0
- package/dist/machine-credential.js.map +1 -0
- package/dist/webhook-consumer.d.ts +50 -0
- package/dist/webhook-consumer.js +71 -0
- package/dist/webhook-consumer.js.map +1 -0
- package/dist/webhook-delivery.d.ts +46 -0
- package/dist/webhook-delivery.js +126 -0
- package/dist/webhook-delivery.js.map +1 -0
- package/dist/webhook-signature.d.ts +36 -0
- package/dist/webhook-signature.js +255 -0
- package/dist/webhook-signature.js.map +1 -0
- package/examples/python/verify_webhook.py +283 -0
- package/fixtures/.gitkeep +1 -0
- package/fixtures/core-v1/fixture-index.json +963 -0
- package/fixtures/core-v1/problems/auth-invalid.json +9 -0
- package/fixtures/core-v1/problems/authentication-required.json +9 -0
- package/fixtures/core-v1/problems/cancellation-too-late.json +9 -0
- package/fixtures/core-v1/problems/endpoint-rotation-conflict.json +10 -0
- package/fixtures/core-v1/problems/environment-mismatch.json +9 -0
- package/fixtures/core-v1/problems/idempotency-conflict.json +9 -0
- package/fixtures/core-v1/problems/idempotency-key-required.json +9 -0
- package/fixtures/core-v1/problems/project-slug-conflict.json +16 -0
- package/fixtures/core-v1/problems/provider-outcome-unknown.json +9 -0
- package/fixtures/core-v1/problems/provider-retryable.json +10 -0
- package/fixtures/core-v1/problems/provider-terminal.json +9 -0
- package/fixtures/core-v1/problems/rate-limited.json +10 -0
- package/fixtures/core-v1/problems/replay-unavailable-not-terminal.json +16 -0
- package/fixtures/core-v1/problems/replay-unavailable-payload.json +16 -0
- package/fixtures/core-v1/problems/replay-unavailable-rollout.json +16 -0
- package/fixtures/core-v1/problems/request-invalid.json +16 -0
- package/fixtures/core-v1/problems/resource-expired.json +9 -0
- package/fixtures/core-v1/problems/resource-not-found.json +9 -0
- package/fixtures/core-v1/problems/scope-forbidden.json +9 -0
- package/fixtures/core-v1/problems/subscriber-unbound.json +9 -0
- package/fixtures/core-v1/requests/create-api-credential.json +9 -0
- package/fixtures/core-v1/requests/create-customer-endpoint.json +5 -0
- package/fixtures/core-v1/requests/create-message.json +15 -0
- package/fixtures/core-v1/requests/create-project.json +4 -0
- package/fixtures/core-v1/requests/create-subscription-link.json +5 -0
- package/fixtures/core-v1/requests/rotate-api-credential.json +3 -0
- package/fixtures/core-v1/requests/rotate-customer-endpoint.json +3 -0
- package/fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json +14 -0
- package/fixtures/core-v1/scenarios/api-credential-one-time-reveal.json +21 -0
- package/fixtures/core-v1/scenarios/api-credential-revocation-replay.json +17 -0
- package/fixtures/core-v1/scenarios/api-credential-rotation-overlap.json +18 -0
- package/fixtures/core-v1/scenarios/cancellation-too-late.json +15 -0
- package/fixtures/core-v1/scenarios/cross-account-project.json +14 -0
- package/fixtures/core-v1/scenarios/cross-project-resource.json +17 -0
- package/fixtures/core-v1/scenarios/environment-mismatch.json +17 -0
- package/fixtures/core-v1/scenarios/idempotency-conflict.json +35 -0
- package/fixtures/core-v1/scenarios/idempotency-equivalent-replay.json +27 -0
- package/fixtures/core-v1/scenarios/malformed-bearer.json +14 -0
- package/fixtures/core-v1/scenarios/metadata-overrun.json +14 -0
- package/fixtures/core-v1/scenarios/missing-scope.json +15 -0
- package/fixtures/core-v1/scenarios/project-create-equivalent-replay.json +26 -0
- package/fixtures/core-v1/scenarios/project-slug-conflict.json +21 -0
- package/fixtures/core-v1/scenarios/provider-outcome-unknown.json +15 -0
- package/fixtures/core-v1/scenarios/subscription-activation-replay.json +18 -0
- package/fixtures/core-v1/scenarios/subscription-expired-replay.json +16 -0
- package/fixtures/core-v1/success/account-projection.json +11 -0
- package/fixtures/core-v1/success/api-credential-collection.json +22 -0
- package/fixtures/core-v1/success/api-credential-created.json +20 -0
- package/fixtures/core-v1/success/api-credential-revoked.json +19 -0
- package/fixtures/core-v1/success/api-credential-rotated.json +41 -0
- package/fixtures/core-v1/success/customer-endpoint-attempts.json +15 -0
- package/fixtures/core-v1/success/customer-endpoint-collection.json +26 -0
- package/fixtures/core-v1/success/customer-endpoint-create-replayed.json +16 -0
- package/fixtures/core-v1/success/customer-endpoint-created.json +17 -0
- package/fixtures/core-v1/success/customer-endpoint-rotated.json +21 -0
- package/fixtures/core-v1/success/message-accepted.json +30 -0
- package/fixtures/core-v1/success/message-cancellation-too-late.json +27 -0
- package/fixtures/core-v1/success/message-cancelled.json +27 -0
- package/fixtures/core-v1/success/message-outcome-unknown.json +33 -0
- package/fixtures/core-v1/success/message-provider-accepted.json +30 -0
- package/fixtures/core-v1/success/project-collection.json +42 -0
- package/fixtures/core-v1/success/project-created.json +38 -0
- package/fixtures/core-v1/success/subscription-link-activated.json +22 -0
- package/fixtures/core-v1/success/subscription-link-cancelled.json +14 -0
- package/fixtures/core-v1/success/subscription-link-paused.json +22 -0
- package/fixtures/core-v1/success/subscription-link-pending.json +14 -0
- package/fixtures/core-v1/success/subscription-link-revoked.json +22 -0
- package/fixtures/interaction-machine-v1/capabilities/providers.json +57 -0
- package/fixtures/interaction-machine-v1/capabilities/telegram.json +52 -0
- package/fixtures/interaction-machine-v1/events/confirm-answered.json +22 -0
- package/fixtures/interaction-machine-v1/events/input-answered.json +22 -0
- package/fixtures/interaction-machine-v1/events/input-redacted.json +18 -0
- package/fixtures/interaction-machine-v1/events/select-answered.json +22 -0
- package/fixtures/interaction-machine-v1/requests/ack-processed.json +5 -0
- package/fixtures/interaction-machine-v1/requests/ack-quarantined.json +5 -0
- package/fixtures/interaction-machine-v1/requests/create-machine-client.json +6 -0
- package/fixtures/interaction-machine-v1/requests/create-message-confirm.json +18 -0
- package/fixtures/interaction-machine-v1/requests/create-message-input.json +16 -0
- package/fixtures/interaction-machine-v1/requests/create-message-select.json +26 -0
- package/fixtures/interaction-machine-v1/requests/register-machine-credential.json +4 -0
- package/fixtures/interaction-machine-v1/scenarios/ack-conflict.json +14 -0
- package/fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json +15 -0
- package/fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json +15 -0
- package/fixtures/interaction-machine-v1/scenarios/ack-replay.json +17 -0
- package/fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json +15 -0
- package/fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json +15 -0
- package/fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json +14 -0
- package/fixtures/interaction-machine-v1/scenarios/credential-rotation.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/first-credential-activates.json +15 -0
- package/fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/interaction-expired.json +17 -0
- package/fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/interaction-retired.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/interaction-stale.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json +14 -0
- package/fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json +22 -0
- package/fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json +14 -0
- package/fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json +14 -0
- package/fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json +14 -0
- package/fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json +22 -0
- package/fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json +14 -0
- package/fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json +17 -0
- package/fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json +14 -0
- package/fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json +15 -0
- package/fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json +16 -0
- package/fixtures/interaction-machine-v1/scenarios/quarantine-valid.json +15 -0
- package/fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json +15 -0
- package/fixtures/interaction-machine-v1/success/ack-out-of-order.json +8 -0
- package/fixtures/interaction-machine-v1/success/ack-processed.json +8 -0
- package/fixtures/interaction-machine-v1/success/ack-quarantined.json +9 -0
- package/fixtures/interaction-machine-v1/success/interaction-answered-confirm.json +10 -0
- package/fixtures/interaction-machine-v1/success/interaction-answered-input.json +10 -0
- package/fixtures/interaction-machine-v1/success/interaction-answered-redacted.json +8 -0
- package/fixtures/interaction-machine-v1/success/interaction-answered-select.json +10 -0
- package/fixtures/interaction-machine-v1/success/interaction-open.json +7 -0
- package/fixtures/interaction-machine-v1/success/machine-client-active.json +20 -0
- package/fixtures/interaction-machine-v1/success/machine-client-provisioning.json +19 -0
- package/fixtures/interaction-machine-v1/success/machine-client-revoked.json +21 -0
- package/fixtures/interaction-machine-v1/success/machine-credential-active.json +13 -0
- package/fixtures/interaction-machine-v1/success/machine-credential-revoked.json +14 -0
- package/fixtures/interaction-machine-v1/success/message-interaction-open.json +33 -0
- package/fixtures/interaction-machine-v1/success/poll-empty.json +6 -0
- package/fixtures/interaction-machine-v1/success/poll-events.json +51 -0
- package/fixtures/interaction-machine-v1/tokens/callback-token.json +1 -0
- package/fixtures/whooshbang-events-v1/delivery/cases.json +418 -0
- package/fixtures/whooshbang-events-v1/events/agent-binding-degraded.json +17 -0
- package/fixtures/whooshbang-events-v1/events/interaction-expired.json +16 -0
- package/fixtures/whooshbang-events-v1/events/interaction-received.json +23 -0
- package/fixtures/whooshbang-events-v1/events/message-delivered.json +16 -0
- package/fixtures/whooshbang-events-v1/events/message-expired.json +15 -0
- package/fixtures/whooshbang-events-v1/events/message-failed.json +17 -0
- package/fixtures/whooshbang-events-v1/events/message-provider-accepted.json +15 -0
- package/fixtures/whooshbang-events-v1/events/subscription-activated.json +18 -0
- package/fixtures/whooshbang-events-v1/events/subscription-revoked.json +18 -0
- package/fixtures/whooshbang-events-v1/signing/vectors.json +852 -0
- package/openapi/.gitkeep +1 -0
- package/openapi/generated/whooshbang-v1.bundle.json +5913 -0
- package/openapi/whooshbang-v1.yaml +2334 -0
- package/package.json +63 -0
- package/schemas/contract-manifest.schema.json +140 -0
- package/schemas/core-scenario.schema.json +38 -0
- package/schemas/events/agent-binding-degraded-v1.schema.json +8 -0
- package/schemas/events/interaction-expired-v1.schema.json +8 -0
- package/schemas/events/interaction-received-v1.schema.json +8 -0
- package/schemas/events/message-delivered-v1.schema.json +8 -0
- package/schemas/events/message-expired-v1.schema.json +8 -0
- package/schemas/events/message-failed-v1.schema.json +8 -0
- package/schemas/events/message-provider-accepted-v1.schema.json +8 -0
- package/schemas/events/subscription-activated-v1.schema.json +8 -0
- package/schemas/events/subscription-revoked-v1.schema.json +8 -0
- package/schemas/events/whooshbang-event-v1.schema.json +689 -0
- package/schemas/fixture-index.schema.json +67 -0
- package/schemas/interaction-machine-scenario.schema.json +700 -0
- package/schemas/interaction-v1.schema.json +483 -0
- package/schemas/machine-v1.schema.json +430 -0
- package/schemas/provider-capabilities-v1.schema.json +263 -0
- package/schemas/webhooks/webhook-delivery-case-v1.schema.json +167 -0
- package/schemas/webhooks/webhook-signing-vector-v1.schema.json +197 -0
- package/schemas/whooshbang-v1.schema.json +2173 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://whooshbang.flowxo.com/schemas/webhooks/webhook-delivery-case-v1.schema.json",
|
|
4
|
+
"x-contract-version": "1.0.0-rc.13",
|
|
5
|
+
"title": "WebhookDeliveryCaseSetV1",
|
|
6
|
+
"description": "Deterministic customer webhook response classification, Retry-After, and delivery-bound cases.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["schema", "cases"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "whooshbang.webhook-delivery-cases.v1"
|
|
12
|
+
},
|
|
13
|
+
"cases": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"minItems": 20,
|
|
16
|
+
"maxItems": 64,
|
|
17
|
+
"x-unique-property": "id",
|
|
18
|
+
"items": {
|
|
19
|
+
"$ref": "#/$defs/DeliveryCase"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"$defs": {
|
|
25
|
+
"NetworkFailure": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"required": ["kind"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"kind": {
|
|
30
|
+
"const": "network_failure"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
35
|
+
"HttpOutcome": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": ["kind", "status"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"kind": {
|
|
40
|
+
"const": "http"
|
|
41
|
+
},
|
|
42
|
+
"status": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 100,
|
|
45
|
+
"maximum": 599
|
|
46
|
+
},
|
|
47
|
+
"retry_after": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"maxLength": 128
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
},
|
|
54
|
+
"AcceptedExpectation": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["action", "reason"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"action": {
|
|
59
|
+
"const": "accepted"
|
|
60
|
+
},
|
|
61
|
+
"reason": {
|
|
62
|
+
"const": "http_2xx"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
},
|
|
67
|
+
"TerminalExpectation": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": ["action", "reason"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"action": {
|
|
72
|
+
"const": "terminal"
|
|
73
|
+
},
|
|
74
|
+
"reason": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": [
|
|
77
|
+
"attempt_limit_exhausted",
|
|
78
|
+
"delivery_window_exhausted",
|
|
79
|
+
"http_terminal",
|
|
80
|
+
"redirect_not_followed",
|
|
81
|
+
"unexpected_http_status"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
"RetryExpectation": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"required": ["action", "reason", "latest_retry_at_epoch_seconds"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"action": {
|
|
92
|
+
"const": "retry"
|
|
93
|
+
},
|
|
94
|
+
"reason": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"enum": ["network_failure", "retryable_http_status"]
|
|
97
|
+
},
|
|
98
|
+
"latest_retry_at_epoch_seconds": {
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"minimum": 0
|
|
101
|
+
},
|
|
102
|
+
"retry_after_seconds": {
|
|
103
|
+
"type": "integer",
|
|
104
|
+
"minimum": 0,
|
|
105
|
+
"maximum": 86400
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"additionalProperties": false
|
|
109
|
+
},
|
|
110
|
+
"DeliveryCase": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"required": [
|
|
113
|
+
"id",
|
|
114
|
+
"attempt",
|
|
115
|
+
"first_attempt_at_epoch_seconds",
|
|
116
|
+
"now_epoch_seconds",
|
|
117
|
+
"outcome",
|
|
118
|
+
"expected"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"id": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"minLength": 1,
|
|
124
|
+
"maxLength": 128,
|
|
125
|
+
"pattern": "^[a-z][a-z0-9_-]*$"
|
|
126
|
+
},
|
|
127
|
+
"attempt": {
|
|
128
|
+
"type": "integer",
|
|
129
|
+
"minimum": 1,
|
|
130
|
+
"maximum": 8
|
|
131
|
+
},
|
|
132
|
+
"first_attempt_at_epoch_seconds": {
|
|
133
|
+
"type": "integer",
|
|
134
|
+
"minimum": 0
|
|
135
|
+
},
|
|
136
|
+
"now_epoch_seconds": {
|
|
137
|
+
"type": "integer",
|
|
138
|
+
"minimum": 0
|
|
139
|
+
},
|
|
140
|
+
"outcome": {
|
|
141
|
+
"oneOf": [
|
|
142
|
+
{
|
|
143
|
+
"$ref": "#/$defs/NetworkFailure"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"$ref": "#/$defs/HttpOutcome"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
"expected": {
|
|
151
|
+
"oneOf": [
|
|
152
|
+
{
|
|
153
|
+
"$ref": "#/$defs/AcceptedExpectation"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"$ref": "#/$defs/TerminalExpectation"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"$ref": "#/$defs/RetryExpectation"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"additionalProperties": false
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://whooshbang.flowxo.com/schemas/webhooks/webhook-signing-vector-v1.schema.json",
|
|
4
|
+
"x-contract-version": "1.0.0-rc.13",
|
|
5
|
+
"title": "WebhookSigningVectorSetV1",
|
|
6
|
+
"description": "Language-neutral deterministic Standard Webhooks V1 verification vectors. All key material is public synthetic test data and must never be used outside fixtures.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["schema", "synthetic_verification_keys", "raw_bodies", "cases"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "whooshbang.webhook-signing-vectors.v1"
|
|
12
|
+
},
|
|
13
|
+
"synthetic_verification_keys": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"minProperties": 3,
|
|
16
|
+
"maxProperties": 8,
|
|
17
|
+
"propertyNames": {
|
|
18
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^whsec_(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"raw_bodies": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"minProperties": 2,
|
|
28
|
+
"maxProperties": 8,
|
|
29
|
+
"propertyNames": {
|
|
30
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 2,
|
|
35
|
+
"maxLength": 16384
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"cases": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"minItems": 16,
|
|
41
|
+
"maxItems": 64,
|
|
42
|
+
"x-unique-property": "id",
|
|
43
|
+
"items": {
|
|
44
|
+
"$ref": "#/$defs/VerificationCase"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"$defs": {
|
|
50
|
+
"Header": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": ["name", "value"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"name": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 128
|
|
58
|
+
},
|
|
59
|
+
"value": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"maxLength": 1024
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"additionalProperties": false
|
|
65
|
+
},
|
|
66
|
+
"VerifiedExpectation": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["verified", "event_id", "timestamp", "attempt"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"verified": {
|
|
71
|
+
"const": true
|
|
72
|
+
},
|
|
73
|
+
"event_id": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 8,
|
|
76
|
+
"maxLength": 128
|
|
77
|
+
},
|
|
78
|
+
"timestamp": {
|
|
79
|
+
"type": "integer",
|
|
80
|
+
"minimum": 0
|
|
81
|
+
},
|
|
82
|
+
"attempt": {
|
|
83
|
+
"type": "integer",
|
|
84
|
+
"minimum": 1,
|
|
85
|
+
"maximum": 8
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"additionalProperties": false
|
|
89
|
+
},
|
|
90
|
+
"RejectedExpectation": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"required": ["verified", "reason"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"verified": {
|
|
95
|
+
"const": false
|
|
96
|
+
},
|
|
97
|
+
"reason": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"enum": [
|
|
100
|
+
"crypto_unavailable",
|
|
101
|
+
"duplicate_header",
|
|
102
|
+
"duplicate_secret",
|
|
103
|
+
"duplicate_signature",
|
|
104
|
+
"invalid_body",
|
|
105
|
+
"invalid_clock",
|
|
106
|
+
"invalid_secret",
|
|
107
|
+
"invalid_tolerance",
|
|
108
|
+
"malformed_attempt",
|
|
109
|
+
"malformed_header",
|
|
110
|
+
"malformed_signature",
|
|
111
|
+
"malformed_timestamp",
|
|
112
|
+
"malformed_webhook_id",
|
|
113
|
+
"missing_header",
|
|
114
|
+
"signature_mismatch",
|
|
115
|
+
"timestamp_outside_tolerance",
|
|
116
|
+
"too_many_secrets",
|
|
117
|
+
"too_many_signatures",
|
|
118
|
+
"unsupported_signature_version"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"additionalProperties": false
|
|
123
|
+
},
|
|
124
|
+
"VerificationCase": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"required": [
|
|
127
|
+
"id",
|
|
128
|
+
"raw_body",
|
|
129
|
+
"headers",
|
|
130
|
+
"trusted_keys",
|
|
131
|
+
"now_seconds",
|
|
132
|
+
"tolerance_seconds",
|
|
133
|
+
"expected"
|
|
134
|
+
],
|
|
135
|
+
"properties": {
|
|
136
|
+
"id": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1,
|
|
139
|
+
"maxLength": 128,
|
|
140
|
+
"pattern": "^[a-z][a-z0-9_-]*$"
|
|
141
|
+
},
|
|
142
|
+
"description": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"minLength": 1,
|
|
145
|
+
"maxLength": 500
|
|
146
|
+
},
|
|
147
|
+
"raw_body": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
150
|
+
},
|
|
151
|
+
"headers": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"minItems": 0,
|
|
154
|
+
"maxItems": 8,
|
|
155
|
+
"items": {
|
|
156
|
+
"$ref": "#/$defs/Header"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"trusted_keys": {
|
|
160
|
+
"type": "array",
|
|
161
|
+
"minItems": 0,
|
|
162
|
+
"maxItems": 3,
|
|
163
|
+
"items": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"now_seconds": {
|
|
169
|
+
"type": "integer",
|
|
170
|
+
"minimum": 0
|
|
171
|
+
},
|
|
172
|
+
"tolerance_seconds": {
|
|
173
|
+
"type": "integer",
|
|
174
|
+
"minimum": 1,
|
|
175
|
+
"maximum": 300
|
|
176
|
+
},
|
|
177
|
+
"duplicate_of": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"minLength": 1,
|
|
180
|
+
"maxLength": 128,
|
|
181
|
+
"pattern": "^[a-z][a-z0-9_-]*$"
|
|
182
|
+
},
|
|
183
|
+
"expected": {
|
|
184
|
+
"oneOf": [
|
|
185
|
+
{
|
|
186
|
+
"$ref": "#/$defs/VerifiedExpectation"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"$ref": "#/$defs/RejectedExpectation"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"additionalProperties": false
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|