@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.
Files changed (229) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/LICENSE +21 -0
  3. package/README.md +120 -0
  4. package/contract-manifest.json +390 -0
  5. package/dist/base64url.d.ts +2 -0
  6. package/dist/base64url.js +51 -0
  7. package/dist/base64url.js.map +1 -0
  8. package/dist/generated/artifact-index.d.ts +205 -0
  9. package/dist/generated/artifact-index.js +396 -0
  10. package/dist/generated/artifact-index.js.map +1 -0
  11. package/dist/generated/contract-manifest.d.ts +66 -0
  12. package/dist/generated/contract-manifest.js +6 -0
  13. package/dist/generated/contract-manifest.js.map +1 -0
  14. package/dist/generated/core-scenario.d.ts +18 -0
  15. package/dist/generated/core-scenario.js +6 -0
  16. package/dist/generated/core-scenario.js.map +1 -0
  17. package/dist/generated/fixture-index.d.ts +33 -0
  18. package/dist/generated/fixture-index.js +6 -0
  19. package/dist/generated/fixture-index.js.map +1 -0
  20. package/dist/generated/interaction-machine-scenario.d.ts +263 -0
  21. package/dist/generated/interaction-machine-scenario.js +6 -0
  22. package/dist/generated/interaction-machine-scenario.js.map +1 -0
  23. package/dist/generated/interaction-v1.d.ts +152 -0
  24. package/dist/generated/interaction-v1.js +6 -0
  25. package/dist/generated/interaction-v1.js.map +1 -0
  26. package/dist/generated/machine-v1.d.ts +169 -0
  27. package/dist/generated/machine-v1.js +6 -0
  28. package/dist/generated/machine-v1.js.map +1 -0
  29. package/dist/generated/provider-capabilities-v1.d.ts +78 -0
  30. package/dist/generated/provider-capabilities-v1.js +6 -0
  31. package/dist/generated/provider-capabilities-v1.js.map +1 -0
  32. package/dist/generated/validators-standalone.d.ts +659 -0
  33. package/dist/generated/validators-standalone.js +47800 -0
  34. package/dist/generated/validators-standalone.js.map +1 -0
  35. package/dist/generated/validators.d.ts +74 -0
  36. package/dist/generated/validators.js +493 -0
  37. package/dist/generated/validators.js.map +1 -0
  38. package/dist/generated/webhook-delivery-case-v1.d.ts +91 -0
  39. package/dist/generated/webhook-delivery-case-v1.js +6 -0
  40. package/dist/generated/webhook-delivery-case-v1.js.map +1 -0
  41. package/dist/generated/webhook-signing-vector-v1.d.ts +88 -0
  42. package/dist/generated/webhook-signing-vector-v1.js +6 -0
  43. package/dist/generated/webhook-signing-vector-v1.js.map +1 -0
  44. package/dist/generated/whooshbang-event-v1.d.ts +191 -0
  45. package/dist/generated/whooshbang-event-v1.js +6 -0
  46. package/dist/generated/whooshbang-event-v1.js.map +1 -0
  47. package/dist/generated/whooshbang-v1.d.ts +1162 -0
  48. package/dist/generated/whooshbang-v1.js +6 -0
  49. package/dist/generated/whooshbang-v1.js.map +1 -0
  50. package/dist/index.d.ts +20 -0
  51. package/dist/index.js +7 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/machine-credential.d.ts +31 -0
  54. package/dist/machine-credential.js +78 -0
  55. package/dist/machine-credential.js.map +1 -0
  56. package/dist/webhook-consumer.d.ts +50 -0
  57. package/dist/webhook-consumer.js +71 -0
  58. package/dist/webhook-consumer.js.map +1 -0
  59. package/dist/webhook-delivery.d.ts +46 -0
  60. package/dist/webhook-delivery.js +126 -0
  61. package/dist/webhook-delivery.js.map +1 -0
  62. package/dist/webhook-signature.d.ts +36 -0
  63. package/dist/webhook-signature.js +255 -0
  64. package/dist/webhook-signature.js.map +1 -0
  65. package/examples/python/verify_webhook.py +283 -0
  66. package/fixtures/.gitkeep +1 -0
  67. package/fixtures/core-v1/fixture-index.json +963 -0
  68. package/fixtures/core-v1/problems/auth-invalid.json +9 -0
  69. package/fixtures/core-v1/problems/authentication-required.json +9 -0
  70. package/fixtures/core-v1/problems/cancellation-too-late.json +9 -0
  71. package/fixtures/core-v1/problems/endpoint-rotation-conflict.json +10 -0
  72. package/fixtures/core-v1/problems/environment-mismatch.json +9 -0
  73. package/fixtures/core-v1/problems/idempotency-conflict.json +9 -0
  74. package/fixtures/core-v1/problems/idempotency-key-required.json +9 -0
  75. package/fixtures/core-v1/problems/project-slug-conflict.json +16 -0
  76. package/fixtures/core-v1/problems/provider-outcome-unknown.json +9 -0
  77. package/fixtures/core-v1/problems/provider-retryable.json +10 -0
  78. package/fixtures/core-v1/problems/provider-terminal.json +9 -0
  79. package/fixtures/core-v1/problems/rate-limited.json +10 -0
  80. package/fixtures/core-v1/problems/replay-unavailable-not-terminal.json +16 -0
  81. package/fixtures/core-v1/problems/replay-unavailable-payload.json +16 -0
  82. package/fixtures/core-v1/problems/replay-unavailable-rollout.json +16 -0
  83. package/fixtures/core-v1/problems/request-invalid.json +16 -0
  84. package/fixtures/core-v1/problems/resource-expired.json +9 -0
  85. package/fixtures/core-v1/problems/resource-not-found.json +9 -0
  86. package/fixtures/core-v1/problems/scope-forbidden.json +9 -0
  87. package/fixtures/core-v1/problems/subscriber-unbound.json +9 -0
  88. package/fixtures/core-v1/requests/create-api-credential.json +9 -0
  89. package/fixtures/core-v1/requests/create-customer-endpoint.json +5 -0
  90. package/fixtures/core-v1/requests/create-message.json +15 -0
  91. package/fixtures/core-v1/requests/create-project.json +4 -0
  92. package/fixtures/core-v1/requests/create-subscription-link.json +5 -0
  93. package/fixtures/core-v1/requests/rotate-api-credential.json +3 -0
  94. package/fixtures/core-v1/requests/rotate-customer-endpoint.json +3 -0
  95. package/fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json +14 -0
  96. package/fixtures/core-v1/scenarios/api-credential-one-time-reveal.json +21 -0
  97. package/fixtures/core-v1/scenarios/api-credential-revocation-replay.json +17 -0
  98. package/fixtures/core-v1/scenarios/api-credential-rotation-overlap.json +18 -0
  99. package/fixtures/core-v1/scenarios/cancellation-too-late.json +15 -0
  100. package/fixtures/core-v1/scenarios/cross-account-project.json +14 -0
  101. package/fixtures/core-v1/scenarios/cross-project-resource.json +17 -0
  102. package/fixtures/core-v1/scenarios/environment-mismatch.json +17 -0
  103. package/fixtures/core-v1/scenarios/idempotency-conflict.json +35 -0
  104. package/fixtures/core-v1/scenarios/idempotency-equivalent-replay.json +27 -0
  105. package/fixtures/core-v1/scenarios/malformed-bearer.json +14 -0
  106. package/fixtures/core-v1/scenarios/metadata-overrun.json +14 -0
  107. package/fixtures/core-v1/scenarios/missing-scope.json +15 -0
  108. package/fixtures/core-v1/scenarios/project-create-equivalent-replay.json +26 -0
  109. package/fixtures/core-v1/scenarios/project-slug-conflict.json +21 -0
  110. package/fixtures/core-v1/scenarios/provider-outcome-unknown.json +15 -0
  111. package/fixtures/core-v1/scenarios/subscription-activation-replay.json +18 -0
  112. package/fixtures/core-v1/scenarios/subscription-expired-replay.json +16 -0
  113. package/fixtures/core-v1/success/account-projection.json +11 -0
  114. package/fixtures/core-v1/success/api-credential-collection.json +22 -0
  115. package/fixtures/core-v1/success/api-credential-created.json +20 -0
  116. package/fixtures/core-v1/success/api-credential-revoked.json +19 -0
  117. package/fixtures/core-v1/success/api-credential-rotated.json +41 -0
  118. package/fixtures/core-v1/success/customer-endpoint-attempts.json +15 -0
  119. package/fixtures/core-v1/success/customer-endpoint-collection.json +26 -0
  120. package/fixtures/core-v1/success/customer-endpoint-create-replayed.json +16 -0
  121. package/fixtures/core-v1/success/customer-endpoint-created.json +17 -0
  122. package/fixtures/core-v1/success/customer-endpoint-rotated.json +21 -0
  123. package/fixtures/core-v1/success/message-accepted.json +30 -0
  124. package/fixtures/core-v1/success/message-cancellation-too-late.json +27 -0
  125. package/fixtures/core-v1/success/message-cancelled.json +27 -0
  126. package/fixtures/core-v1/success/message-outcome-unknown.json +33 -0
  127. package/fixtures/core-v1/success/message-provider-accepted.json +30 -0
  128. package/fixtures/core-v1/success/project-collection.json +42 -0
  129. package/fixtures/core-v1/success/project-created.json +38 -0
  130. package/fixtures/core-v1/success/subscription-link-activated.json +22 -0
  131. package/fixtures/core-v1/success/subscription-link-cancelled.json +14 -0
  132. package/fixtures/core-v1/success/subscription-link-paused.json +22 -0
  133. package/fixtures/core-v1/success/subscription-link-pending.json +14 -0
  134. package/fixtures/core-v1/success/subscription-link-revoked.json +22 -0
  135. package/fixtures/interaction-machine-v1/capabilities/providers.json +57 -0
  136. package/fixtures/interaction-machine-v1/capabilities/telegram.json +52 -0
  137. package/fixtures/interaction-machine-v1/events/confirm-answered.json +22 -0
  138. package/fixtures/interaction-machine-v1/events/input-answered.json +22 -0
  139. package/fixtures/interaction-machine-v1/events/input-redacted.json +18 -0
  140. package/fixtures/interaction-machine-v1/events/select-answered.json +22 -0
  141. package/fixtures/interaction-machine-v1/requests/ack-processed.json +5 -0
  142. package/fixtures/interaction-machine-v1/requests/ack-quarantined.json +5 -0
  143. package/fixtures/interaction-machine-v1/requests/create-machine-client.json +6 -0
  144. package/fixtures/interaction-machine-v1/requests/create-message-confirm.json +18 -0
  145. package/fixtures/interaction-machine-v1/requests/create-message-input.json +16 -0
  146. package/fixtures/interaction-machine-v1/requests/create-message-select.json +26 -0
  147. package/fixtures/interaction-machine-v1/requests/register-machine-credential.json +4 -0
  148. package/fixtures/interaction-machine-v1/scenarios/ack-conflict.json +14 -0
  149. package/fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json +15 -0
  150. package/fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json +15 -0
  151. package/fixtures/interaction-machine-v1/scenarios/ack-replay.json +17 -0
  152. package/fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json +15 -0
  153. package/fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json +16 -0
  154. package/fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json +16 -0
  155. package/fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json +15 -0
  156. package/fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json +14 -0
  157. package/fixtures/interaction-machine-v1/scenarios/credential-rotation.json +16 -0
  158. package/fixtures/interaction-machine-v1/scenarios/first-credential-activates.json +15 -0
  159. package/fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json +16 -0
  160. package/fixtures/interaction-machine-v1/scenarios/interaction-expired.json +17 -0
  161. package/fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json +16 -0
  162. package/fixtures/interaction-machine-v1/scenarios/interaction-retired.json +16 -0
  163. package/fixtures/interaction-machine-v1/scenarios/interaction-stale.json +16 -0
  164. package/fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json +14 -0
  165. package/fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json +22 -0
  166. package/fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json +14 -0
  167. package/fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json +16 -0
  168. package/fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json +14 -0
  169. package/fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json +14 -0
  170. package/fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json +22 -0
  171. package/fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json +14 -0
  172. package/fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json +17 -0
  173. package/fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json +14 -0
  174. package/fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json +15 -0
  175. package/fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json +16 -0
  176. package/fixtures/interaction-machine-v1/scenarios/quarantine-valid.json +15 -0
  177. package/fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json +15 -0
  178. package/fixtures/interaction-machine-v1/success/ack-out-of-order.json +8 -0
  179. package/fixtures/interaction-machine-v1/success/ack-processed.json +8 -0
  180. package/fixtures/interaction-machine-v1/success/ack-quarantined.json +9 -0
  181. package/fixtures/interaction-machine-v1/success/interaction-answered-confirm.json +10 -0
  182. package/fixtures/interaction-machine-v1/success/interaction-answered-input.json +10 -0
  183. package/fixtures/interaction-machine-v1/success/interaction-answered-redacted.json +8 -0
  184. package/fixtures/interaction-machine-v1/success/interaction-answered-select.json +10 -0
  185. package/fixtures/interaction-machine-v1/success/interaction-open.json +7 -0
  186. package/fixtures/interaction-machine-v1/success/machine-client-active.json +20 -0
  187. package/fixtures/interaction-machine-v1/success/machine-client-provisioning.json +19 -0
  188. package/fixtures/interaction-machine-v1/success/machine-client-revoked.json +21 -0
  189. package/fixtures/interaction-machine-v1/success/machine-credential-active.json +13 -0
  190. package/fixtures/interaction-machine-v1/success/machine-credential-revoked.json +14 -0
  191. package/fixtures/interaction-machine-v1/success/message-interaction-open.json +33 -0
  192. package/fixtures/interaction-machine-v1/success/poll-empty.json +6 -0
  193. package/fixtures/interaction-machine-v1/success/poll-events.json +51 -0
  194. package/fixtures/interaction-machine-v1/tokens/callback-token.json +1 -0
  195. package/fixtures/whooshbang-events-v1/delivery/cases.json +418 -0
  196. package/fixtures/whooshbang-events-v1/events/agent-binding-degraded.json +17 -0
  197. package/fixtures/whooshbang-events-v1/events/interaction-expired.json +16 -0
  198. package/fixtures/whooshbang-events-v1/events/interaction-received.json +23 -0
  199. package/fixtures/whooshbang-events-v1/events/message-delivered.json +16 -0
  200. package/fixtures/whooshbang-events-v1/events/message-expired.json +15 -0
  201. package/fixtures/whooshbang-events-v1/events/message-failed.json +17 -0
  202. package/fixtures/whooshbang-events-v1/events/message-provider-accepted.json +15 -0
  203. package/fixtures/whooshbang-events-v1/events/subscription-activated.json +18 -0
  204. package/fixtures/whooshbang-events-v1/events/subscription-revoked.json +18 -0
  205. package/fixtures/whooshbang-events-v1/signing/vectors.json +852 -0
  206. package/openapi/.gitkeep +1 -0
  207. package/openapi/generated/whooshbang-v1.bundle.json +5913 -0
  208. package/openapi/whooshbang-v1.yaml +2334 -0
  209. package/package.json +63 -0
  210. package/schemas/contract-manifest.schema.json +140 -0
  211. package/schemas/core-scenario.schema.json +38 -0
  212. package/schemas/events/agent-binding-degraded-v1.schema.json +8 -0
  213. package/schemas/events/interaction-expired-v1.schema.json +8 -0
  214. package/schemas/events/interaction-received-v1.schema.json +8 -0
  215. package/schemas/events/message-delivered-v1.schema.json +8 -0
  216. package/schemas/events/message-expired-v1.schema.json +8 -0
  217. package/schemas/events/message-failed-v1.schema.json +8 -0
  218. package/schemas/events/message-provider-accepted-v1.schema.json +8 -0
  219. package/schemas/events/subscription-activated-v1.schema.json +8 -0
  220. package/schemas/events/subscription-revoked-v1.schema.json +8 -0
  221. package/schemas/events/whooshbang-event-v1.schema.json +689 -0
  222. package/schemas/fixture-index.schema.json +67 -0
  223. package/schemas/interaction-machine-scenario.schema.json +700 -0
  224. package/schemas/interaction-v1.schema.json +483 -0
  225. package/schemas/machine-v1.schema.json +430 -0
  226. package/schemas/provider-capabilities-v1.schema.json +263 -0
  227. package/schemas/webhooks/webhook-delivery-case-v1.schema.json +167 -0
  228. package/schemas/webhooks/webhook-signing-vector-v1.schema.json +197 -0
  229. package/schemas/whooshbang-v1.schema.json +2173 -0
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/credential_invalid",
3
+ "title": "Credential invalid",
4
+ "status": 401,
5
+ "detail": "The bearer credential is malformed, invalid, or revoked.",
6
+ "code": "credential_invalid",
7
+ "diagnostic_id": "diag_credential_invalid_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/authentication_required",
3
+ "title": "Authentication required",
4
+ "status": 401,
5
+ "detail": "Provide a bearer credential.",
6
+ "code": "authentication_required",
7
+ "diagnostic_id": "diag_auth_required_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/cancellation_too_late",
3
+ "title": "Cancellation too late",
4
+ "status": 409,
5
+ "detail": "The operation can no longer be cancelled.",
6
+ "code": "cancellation_too_late",
7
+ "diagnostic_id": "diag_cancel_late_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/endpoint_rotation_conflict",
3
+ "title": "Endpoint rotation conflict",
4
+ "status": 409,
5
+ "detail": "A prior signing-secret overlap is still active. Retry after that overlap expires.",
6
+ "code": "endpoint_rotation_conflict",
7
+ "diagnostic_id": "diag_endpoint_rotation_conflict_001",
8
+ "retryable": true,
9
+ "retry_at": "2026-08-06T14:00:00.000Z"
10
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/environment_mismatch",
3
+ "title": "Environment mismatch",
4
+ "status": 403,
5
+ "detail": "The credential cannot address a binding in another environment.",
6
+ "code": "environment_mismatch",
7
+ "diagnostic_id": "diag_environment_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/idempotency_conflict",
3
+ "title": "Idempotency conflict",
4
+ "status": 409,
5
+ "detail": "The key was already accepted with materially different validated input.",
6
+ "code": "idempotency_conflict",
7
+ "diagnostic_id": "diag_idem_conflict_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/idempotency_key_required",
3
+ "title": "Idempotency key required",
4
+ "status": 400,
5
+ "detail": "Provide an Idempotency-Key containing 8 to 255 visible ASCII characters.",
6
+ "code": "idempotency_key_required",
7
+ "diagnostic_id": "diag_idem_required_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/project_slug_conflict",
3
+ "title": "Project slug conflict",
4
+ "status": 409,
5
+ "detail": "That project slug is already used in this account.",
6
+ "code": "project_slug_conflict",
7
+ "diagnostic_id": "diag_project_slug_conflict_001",
8
+ "retryable": false,
9
+ "field_errors": [
10
+ {
11
+ "field": "/slug",
12
+ "code": "already_exists",
13
+ "detail": "Choose a different project slug."
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/provider_outcome_unknown",
3
+ "title": "Provider outcome unknown",
4
+ "status": 502,
5
+ "detail": "The provider may have accepted the operation; no automatic retry is scheduled.",
6
+ "code": "provider_outcome_unknown",
7
+ "diagnostic_id": "diag_provider_unknown_002",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/provider_retryable",
3
+ "title": "Provider retryable failure",
4
+ "status": 503,
5
+ "detail": "The provider call failed before acceptance and may be retried by the service.",
6
+ "code": "provider_retryable",
7
+ "diagnostic_id": "diag_provider_retry_001",
8
+ "retryable": true,
9
+ "retry_at": "2026-07-25T17:46:00Z"
10
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/provider_terminal",
3
+ "title": "Provider terminal failure",
4
+ "status": 502,
5
+ "detail": "The provider rejected the operation and no automatic retry is scheduled.",
6
+ "code": "provider_terminal",
7
+ "diagnostic_id": "diag_provider_terminal_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/rate_limited",
3
+ "title": "Rate limited",
4
+ "status": 429,
5
+ "detail": "The project or operation rate limit was exceeded.",
6
+ "code": "rate_limited",
7
+ "diagnostic_id": "diag_rate_limited_001",
8
+ "retryable": true,
9
+ "retry_at": "2026-07-25T17:46:00Z"
10
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/replay_unavailable",
3
+ "title": "Replay unavailable",
4
+ "status": 409,
5
+ "detail": "Replay is available only after the latest delivery sequence reaches terminal failure.",
6
+ "code": "replay_unavailable",
7
+ "diagnostic_id": "diag_replay_unavailable_not_terminal_001",
8
+ "retryable": false,
9
+ "field_errors": [
10
+ {
11
+ "field": "/",
12
+ "code": "not_terminal",
13
+ "detail": "Replay is available only after the latest delivery sequence reaches terminal failure."
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/replay_unavailable",
3
+ "title": "Replay unavailable",
4
+ "status": 409,
5
+ "detail": "Replay is unavailable because the signed event payload is no longer retained.",
6
+ "code": "replay_unavailable",
7
+ "diagnostic_id": "diag_replay_unavailable_payload_001",
8
+ "retryable": false,
9
+ "field_errors": [
10
+ {
11
+ "field": "/",
12
+ "code": "payload_unavailable",
13
+ "detail": "Replay is unavailable because the signed event payload is no longer retained."
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/replay_unavailable",
3
+ "title": "Replay unavailable",
4
+ "status": 409,
5
+ "detail": "Customer event replay is not enabled for this project environment.",
6
+ "code": "replay_unavailable",
7
+ "diagnostic_id": "diag_replay_unavailable_rollout_001",
8
+ "retryable": false,
9
+ "field_errors": [
10
+ {
11
+ "field": "/",
12
+ "code": "rollout_disabled",
13
+ "detail": "Customer event replay is not enabled for this project environment."
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/request_invalid",
3
+ "title": "Request invalid",
4
+ "status": 400,
5
+ "detail": "One or more request fields are invalid.",
6
+ "code": "request_invalid",
7
+ "diagnostic_id": "diag_request_invalid_001",
8
+ "retryable": false,
9
+ "field_errors": [
10
+ {
11
+ "field": "/content/text",
12
+ "code": "utf8_bytes_exceeded",
13
+ "detail": "Text must contain at most 8192 UTF-8 bytes."
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/resource_expired",
3
+ "title": "Resource expired",
4
+ "status": 404,
5
+ "detail": "The resource is no longer available.",
6
+ "code": "resource_expired",
7
+ "diagnostic_id": "diag_resource_expired_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/resource_not_found",
3
+ "title": "Resource not found",
4
+ "status": 404,
5
+ "detail": "The resource was not found.",
6
+ "code": "resource_not_found",
7
+ "diagnostic_id": "diag_not_found_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/scope_forbidden",
3
+ "title": "Scope forbidden",
4
+ "status": 403,
5
+ "detail": "The credential does not grant the required operation scope.",
6
+ "code": "scope_forbidden",
7
+ "diagnostic_id": "diag_scope_forbidden_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "https://whooshbang.flowxo.com/problems/subscriber_unbound",
3
+ "title": "Subscriber unbound",
4
+ "status": 422,
5
+ "detail": "No authorized channel binding is available for this subscriber and notifier.",
6
+ "code": "subscriber_unbound",
7
+ "diagnostic_id": "diag_subscriber_unbound_001",
8
+ "retryable": false
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "label": "Production integration",
3
+ "scopes": [
4
+ "messages:write",
5
+ "messages:read",
6
+ "subscriptions:write",
7
+ "subscriptions:read"
8
+ ]
9
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "url": "https://events.example.com/whooshbang",
3
+ "event_types": ["interaction.received", "message.delivered"],
4
+ "local_test": false
5
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "to": {
3
+ "subscriber_id": "customer_123"
4
+ },
5
+ "notifier_id": "default",
6
+ "content": {
7
+ "type": "text",
8
+ "text": "Your export is ready."
9
+ },
10
+ "expires_at": "2026-07-25T18:00:00Z",
11
+ "correlation_id": "export_987",
12
+ "metadata": {
13
+ "job": "export_987"
14
+ }
15
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "Synthetic Alerts",
3
+ "slug": "synthetic-alerts"
4
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "subscriber_id": "customer_123",
3
+ "channels": ["telegram"],
4
+ "return_url": "https://example.test/settings/notifications"
5
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "overlap_seconds": 3600
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "overlap_seconds": 3600
3
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "api-credential-invalid-indistinguishable",
4
+ "category": "credential_lifecycle",
5
+ "given": {
6
+ "presented_statuses": ["unknown", "revoked", "expired_overlap"]
7
+ },
8
+ "expected": {
9
+ "http_status": 401,
10
+ "problem_code": "credential_invalid",
11
+ "resource_looked_up": false,
12
+ "existence_disclosed": false
13
+ }
14
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "api-credential-one-time-reveal",
4
+ "category": "credential_lifecycle",
5
+ "given": {
6
+ "operation": "createApiCredential",
7
+ "environment": "live",
8
+ "scopes": [
9
+ "messages:write",
10
+ "messages:read",
11
+ "subscriptions:write",
12
+ "subscriptions:read"
13
+ ]
14
+ },
15
+ "expected": {
16
+ "status": 201,
17
+ "secrets_returned_by_creation": 1,
18
+ "secrets_returned_by_later_reads": 0,
19
+ "digest_returned": false
20
+ }
21
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "api-credential-revocation-replay",
4
+ "category": "credential_lifecycle",
5
+ "given": {
6
+ "operation": "revokeApiCredential",
7
+ "first_status": "active",
8
+ "repeat_status": "revoked"
9
+ },
10
+ "expected": {
11
+ "first_http_status": 200,
12
+ "repeat_http_status": 200,
13
+ "terminal_status": "revoked",
14
+ "revocation_events": 1,
15
+ "secret_returned": false
16
+ }
17
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "api-credential-rotation-overlap",
4
+ "category": "credential_lifecycle",
5
+ "given": {
6
+ "operation": "rotateApiCredential",
7
+ "overlap_seconds": 3600,
8
+ "old_status": "active"
9
+ },
10
+ "expected": {
11
+ "status": 201,
12
+ "credentials_created": 1,
13
+ "new_credential_authorized_during_overlap": true,
14
+ "old_credential_authorized_during_overlap": true,
15
+ "old_credential_authorized_after_overlap": false,
16
+ "new_secret_returned_once": true
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "cancellation-too-late",
4
+ "category": "cancellation",
5
+ "given": {
6
+ "message_id": "msg_synthetic_004",
7
+ "state": "sending",
8
+ "provider_call_owned": true
9
+ },
10
+ "expected": {
11
+ "state": "sending",
12
+ "cancellation_effective": false,
13
+ "provider_deletion_claimed": false
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "cross-account-project",
4
+ "category": "isolation",
5
+ "given": {
6
+ "authenticated_account_id": "account_synthetic_001",
7
+ "requested_project_id": "project_other_account_001"
8
+ },
9
+ "expected": {
10
+ "status": 404,
11
+ "problem_code": "resource_not_found",
12
+ "existence_disclosed": false
13
+ }
14
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "cross-project-resource",
4
+ "category": "isolation",
5
+ "given": {
6
+ "operation_id": "getMessage",
7
+ "credential_project_id": "project_a",
8
+ "credential_environment": "test",
9
+ "resource_project_id": "project_b",
10
+ "resource_environment": "test"
11
+ },
12
+ "expected": {
13
+ "status": 404,
14
+ "problem_code": "resource_not_found",
15
+ "existence_disclosed": false
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "environment-mismatch",
4
+ "category": "isolation",
5
+ "given": {
6
+ "operation_id": "createMessage",
7
+ "credential_project_id": "project_synthetic",
8
+ "credential_environment": "test",
9
+ "binding_project_id": "project_synthetic",
10
+ "binding_environment": "live"
11
+ },
12
+ "expected": {
13
+ "status": 403,
14
+ "problem_code": "environment_mismatch",
15
+ "provider_called": false
16
+ }
17
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "idempotency-conflict",
4
+ "category": "idempotency",
5
+ "given": {
6
+ "operation_id": "createMessage",
7
+ "environment": "test",
8
+ "key": "fixture-key-conflict-001",
9
+ "first_request": {
10
+ "to": {
11
+ "subscriber_id": "customer_123"
12
+ },
13
+ "content": {
14
+ "type": "text",
15
+ "text": "First payload"
16
+ }
17
+ },
18
+ "replay_request": {
19
+ "to": {
20
+ "subscriber_id": "customer_123"
21
+ },
22
+ "content": {
23
+ "type": "text",
24
+ "text": "Different payload"
25
+ }
26
+ }
27
+ },
28
+ "expected": {
29
+ "outcome": "conflict",
30
+ "status": 409,
31
+ "problem_code": "idempotency_conflict",
32
+ "logical_operations": 1,
33
+ "retention_extended": false
34
+ }
35
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "idempotency-equivalent-replay",
4
+ "category": "idempotency",
5
+ "given": {
6
+ "operation_id": "createSubscriptionLink",
7
+ "environment": "test",
8
+ "key": "fixture-key-equivalent-001",
9
+ "first_request": {
10
+ "subscriber_id": "customer_123",
11
+ "channels": ["telegram"]
12
+ },
13
+ "replay_request": {
14
+ "subscriber_id": "customer_123",
15
+ "notifier_id": "default",
16
+ "channels": ["telegram"],
17
+ "expires_in_seconds": 900
18
+ }
19
+ },
20
+ "expected": {
21
+ "outcome": "replayed",
22
+ "status": 201,
23
+ "resource_id": "slink_synthetic_001",
24
+ "logical_operations": 1,
25
+ "retention_extended": false
26
+ }
27
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "malformed-bearer",
4
+ "category": "isolation",
5
+ "given": {
6
+ "operation_id": "getSubscriptionLink",
7
+ "authorization": "Basic synthetic"
8
+ },
9
+ "expected": {
10
+ "status": 401,
11
+ "problem_code": "credential_invalid",
12
+ "resource_looked_up": false
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "metadata-overrun",
4
+ "category": "message_outcome",
5
+ "given": {
6
+ "operation_id": "createMessage",
7
+ "metadata_serialized_bytes": 4097
8
+ },
9
+ "expected": {
10
+ "status": 400,
11
+ "problem_code": "request_invalid",
12
+ "logical_operations": 0
13
+ }
14
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "missing-scope",
4
+ "category": "isolation",
5
+ "given": {
6
+ "operation_id": "createMessage",
7
+ "credential_scopes": ["messages:read"],
8
+ "required_scope": "messages:write"
9
+ },
10
+ "expected": {
11
+ "status": 403,
12
+ "problem_code": "scope_forbidden",
13
+ "logical_operations": 0
14
+ }
15
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "project-create-equivalent-replay",
4
+ "category": "idempotency",
5
+ "given": {
6
+ "account_id": "account_synthetic_001",
7
+ "operation_id": "createProject",
8
+ "idempotency_key": "project-create-synthetic-001",
9
+ "first_request": {
10
+ "name": "Synthetic Alerts",
11
+ "slug": "synthetic-alerts"
12
+ },
13
+ "replay_request": {
14
+ "name": "Synthetic Alerts",
15
+ "slug": "synthetic-alerts"
16
+ }
17
+ },
18
+ "expected": {
19
+ "status": 201,
20
+ "outcome": "replayed",
21
+ "projects_created": 1,
22
+ "environments_created": 2,
23
+ "default_notifiers_created": 2,
24
+ "retention_extended": false
25
+ }
26
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "project-slug-conflict",
4
+ "category": "idempotency",
5
+ "given": {
6
+ "account_id": "account_synthetic_001",
7
+ "existing_project_id": "project_synthetic_001",
8
+ "existing_slug": "synthetic-alerts",
9
+ "request": {
10
+ "name": "Different Project",
11
+ "slug": "synthetic-alerts"
12
+ }
13
+ },
14
+ "expected": {
15
+ "status": 409,
16
+ "problem_code": "project_slug_conflict",
17
+ "projects_created": 0,
18
+ "environments_created": 0,
19
+ "default_notifiers_created": 0
20
+ }
21
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "contract_version": "1.0.0-rc.13",
3
+ "id": "provider-outcome-unknown",
4
+ "category": "message_outcome",
5
+ "given": {
6
+ "message_id": "msg_synthetic_002",
7
+ "provider_call_owned": true,
8
+ "trustworthy_provider_result": false
9
+ },
10
+ "expected": {
11
+ "state": "outcome_unknown",
12
+ "retry_scheduled": false,
13
+ "caller_may_create_new_message_explicitly": true
14
+ }
15
+ }