@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,390 @@
1
+ {
2
+ "schema": "flowxo.contract-manifest.v1",
3
+ "artifact": "@whooshbang/contracts",
4
+ "version": "1.0.0-rc.13",
5
+ "openapi": [
6
+ {
7
+ "id": "whooshbang-rest-v1",
8
+ "version": "1.0.0-rc.13",
9
+ "path": "openapi/whooshbang-v1.yaml"
10
+ }
11
+ ],
12
+ "schemas": [
13
+ {
14
+ "id": "whooshbang-v1",
15
+ "version": "1.0.0-rc.13",
16
+ "path": "schemas/whooshbang-v1.schema.json"
17
+ },
18
+ {
19
+ "id": "interaction-v1",
20
+ "version": "1.0.0-rc.13",
21
+ "path": "schemas/interaction-v1.schema.json"
22
+ },
23
+ {
24
+ "id": "machine-v1",
25
+ "version": "1.0.0-rc.13",
26
+ "path": "schemas/machine-v1.schema.json"
27
+ },
28
+ {
29
+ "id": "provider-capabilities-v1",
30
+ "version": "1.0.0-rc.13",
31
+ "path": "schemas/provider-capabilities-v1.schema.json"
32
+ },
33
+ {
34
+ "id": "whooshbang-event-v1",
35
+ "version": "1.0.0-rc.13",
36
+ "path": "schemas/events/whooshbang-event-v1.schema.json"
37
+ },
38
+ {
39
+ "id": "subscription-activated-event-v1",
40
+ "version": "1.0.0-rc.13",
41
+ "path": "schemas/events/subscription-activated-v1.schema.json"
42
+ },
43
+ {
44
+ "id": "subscription-revoked-event-v1",
45
+ "version": "1.0.0-rc.13",
46
+ "path": "schemas/events/subscription-revoked-v1.schema.json"
47
+ },
48
+ {
49
+ "id": "message-provider-accepted-event-v1",
50
+ "version": "1.0.0-rc.13",
51
+ "path": "schemas/events/message-provider-accepted-v1.schema.json"
52
+ },
53
+ {
54
+ "id": "message-delivered-event-v1",
55
+ "version": "1.0.0-rc.13",
56
+ "path": "schemas/events/message-delivered-v1.schema.json"
57
+ },
58
+ {
59
+ "id": "message-failed-event-v1",
60
+ "version": "1.0.0-rc.13",
61
+ "path": "schemas/events/message-failed-v1.schema.json"
62
+ },
63
+ {
64
+ "id": "message-expired-event-v1",
65
+ "version": "1.0.0-rc.13",
66
+ "path": "schemas/events/message-expired-v1.schema.json"
67
+ },
68
+ {
69
+ "id": "interaction-received-event-v1",
70
+ "version": "1.0.0-rc.13",
71
+ "path": "schemas/events/interaction-received-v1.schema.json"
72
+ },
73
+ {
74
+ "id": "interaction-expired-event-v1",
75
+ "version": "1.0.0-rc.13",
76
+ "path": "schemas/events/interaction-expired-v1.schema.json"
77
+ },
78
+ {
79
+ "id": "agent-binding-degraded-event-v1",
80
+ "version": "1.0.0-rc.13",
81
+ "path": "schemas/events/agent-binding-degraded-v1.schema.json"
82
+ },
83
+ {
84
+ "id": "webhook-signing-vector-v1",
85
+ "version": "1.0.0-rc.13",
86
+ "path": "schemas/webhooks/webhook-signing-vector-v1.schema.json"
87
+ },
88
+ {
89
+ "id": "webhook-delivery-case-v1",
90
+ "version": "1.0.0-rc.13",
91
+ "path": "schemas/webhooks/webhook-delivery-case-v1.schema.json"
92
+ },
93
+ {
94
+ "id": "interaction-machine-scenario",
95
+ "version": "1.0.0-rc.13",
96
+ "path": "schemas/interaction-machine-scenario.schema.json"
97
+ },
98
+ {
99
+ "id": "core-contract-scenario",
100
+ "version": "1.0.0-rc.13",
101
+ "path": "schemas/core-scenario.schema.json"
102
+ },
103
+ {
104
+ "id": "core-fixture-index",
105
+ "version": "1.0.0-rc.13",
106
+ "path": "schemas/fixture-index.schema.json"
107
+ }
108
+ ],
109
+ "fixture_sets": [
110
+ {
111
+ "id": "core-api-bodies",
112
+ "version": "1.0.0-rc.13",
113
+ "schema": "schemas/whooshbang-v1.schema.json",
114
+ "fixtures": [
115
+ "fixtures/core-v1/requests/create-project.json",
116
+ "fixtures/core-v1/success/account-projection.json",
117
+ "fixtures/core-v1/success/project-created.json",
118
+ "fixtures/core-v1/success/project-collection.json",
119
+ "fixtures/core-v1/requests/create-api-credential.json",
120
+ "fixtures/core-v1/requests/rotate-api-credential.json",
121
+ "fixtures/core-v1/success/api-credential-collection.json",
122
+ "fixtures/core-v1/success/api-credential-created.json",
123
+ "fixtures/core-v1/success/api-credential-rotated.json",
124
+ "fixtures/core-v1/success/api-credential-revoked.json",
125
+ "fixtures/core-v1/requests/create-customer-endpoint.json",
126
+ "fixtures/core-v1/requests/rotate-customer-endpoint.json",
127
+ "fixtures/core-v1/success/customer-endpoint-created.json",
128
+ "fixtures/core-v1/success/customer-endpoint-create-replayed.json",
129
+ "fixtures/core-v1/success/customer-endpoint-rotated.json",
130
+ "fixtures/core-v1/success/customer-endpoint-collection.json",
131
+ "fixtures/core-v1/success/customer-endpoint-attempts.json",
132
+ "fixtures/core-v1/requests/create-subscription-link.json",
133
+ "fixtures/core-v1/requests/create-message.json",
134
+ "fixtures/core-v1/success/subscription-link-pending.json",
135
+ "fixtures/core-v1/success/subscription-link-activated.json",
136
+ "fixtures/core-v1/success/subscription-link-paused.json",
137
+ "fixtures/core-v1/success/subscription-link-revoked.json",
138
+ "fixtures/core-v1/success/subscription-link-cancelled.json",
139
+ "fixtures/core-v1/success/message-accepted.json",
140
+ "fixtures/core-v1/success/message-provider-accepted.json",
141
+ "fixtures/core-v1/success/message-outcome-unknown.json",
142
+ "fixtures/core-v1/success/message-cancelled.json",
143
+ "fixtures/core-v1/success/message-cancellation-too-late.json",
144
+ "fixtures/core-v1/problems/authentication-required.json",
145
+ "fixtures/core-v1/problems/auth-invalid.json",
146
+ "fixtures/core-v1/problems/scope-forbidden.json",
147
+ "fixtures/core-v1/problems/environment-mismatch.json",
148
+ "fixtures/core-v1/problems/idempotency-key-required.json",
149
+ "fixtures/core-v1/problems/idempotency-conflict.json",
150
+ "fixtures/core-v1/problems/project-slug-conflict.json",
151
+ "fixtures/core-v1/problems/request-invalid.json",
152
+ "fixtures/core-v1/problems/replay-unavailable-not-terminal.json",
153
+ "fixtures/core-v1/problems/replay-unavailable-payload.json",
154
+ "fixtures/core-v1/problems/replay-unavailable-rollout.json",
155
+ "fixtures/core-v1/problems/subscriber-unbound.json",
156
+ "fixtures/core-v1/problems/resource-not-found.json",
157
+ "fixtures/core-v1/problems/resource-expired.json",
158
+ "fixtures/core-v1/problems/cancellation-too-late.json",
159
+ "fixtures/core-v1/problems/endpoint-rotation-conflict.json",
160
+ "fixtures/core-v1/problems/rate-limited.json",
161
+ "fixtures/core-v1/problems/provider-retryable.json",
162
+ "fixtures/core-v1/problems/provider-terminal.json",
163
+ "fixtures/core-v1/problems/provider-outcome-unknown.json"
164
+ ]
165
+ },
166
+ {
167
+ "id": "core-semantic-scenarios",
168
+ "version": "1.0.0-rc.13",
169
+ "schema": "schemas/core-scenario.schema.json",
170
+ "fixtures": [
171
+ "fixtures/core-v1/scenarios/project-create-equivalent-replay.json",
172
+ "fixtures/core-v1/scenarios/project-slug-conflict.json",
173
+ "fixtures/core-v1/scenarios/cross-account-project.json",
174
+ "fixtures/core-v1/scenarios/api-credential-one-time-reveal.json",
175
+ "fixtures/core-v1/scenarios/api-credential-rotation-overlap.json",
176
+ "fixtures/core-v1/scenarios/api-credential-revocation-replay.json",
177
+ "fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json",
178
+ "fixtures/core-v1/scenarios/idempotency-equivalent-replay.json",
179
+ "fixtures/core-v1/scenarios/idempotency-conflict.json",
180
+ "fixtures/core-v1/scenarios/cross-project-resource.json",
181
+ "fixtures/core-v1/scenarios/environment-mismatch.json",
182
+ "fixtures/core-v1/scenarios/missing-scope.json",
183
+ "fixtures/core-v1/scenarios/malformed-bearer.json",
184
+ "fixtures/core-v1/scenarios/subscription-activation-replay.json",
185
+ "fixtures/core-v1/scenarios/subscription-expired-replay.json",
186
+ "fixtures/core-v1/scenarios/provider-outcome-unknown.json",
187
+ "fixtures/core-v1/scenarios/cancellation-too-late.json",
188
+ "fixtures/core-v1/scenarios/metadata-overrun.json"
189
+ ]
190
+ },
191
+ {
192
+ "id": "interaction-message-api-bodies",
193
+ "version": "1.0.0-rc.13",
194
+ "schema": "schemas/whooshbang-v1.schema.json",
195
+ "fixtures": [
196
+ "fixtures/interaction-machine-v1/requests/create-message-confirm.json",
197
+ "fixtures/interaction-machine-v1/requests/create-message-select.json",
198
+ "fixtures/interaction-machine-v1/requests/create-message-input.json",
199
+ "fixtures/interaction-machine-v1/success/message-interaction-open.json",
200
+ "fixtures/interaction-machine-v1/capabilities/providers.json"
201
+ ]
202
+ },
203
+ {
204
+ "id": "interaction-contract-bodies",
205
+ "version": "1.0.0-rc.13",
206
+ "schema": "schemas/interaction-v1.schema.json",
207
+ "fixtures": [
208
+ "fixtures/interaction-machine-v1/success/interaction-open.json",
209
+ "fixtures/interaction-machine-v1/success/interaction-answered-confirm.json",
210
+ "fixtures/interaction-machine-v1/success/interaction-answered-select.json",
211
+ "fixtures/interaction-machine-v1/success/interaction-answered-input.json",
212
+ "fixtures/interaction-machine-v1/success/interaction-answered-redacted.json",
213
+ "fixtures/interaction-machine-v1/events/confirm-answered.json",
214
+ "fixtures/interaction-machine-v1/events/select-answered.json",
215
+ "fixtures/interaction-machine-v1/events/input-answered.json",
216
+ "fixtures/interaction-machine-v1/events/input-redacted.json",
217
+ "fixtures/interaction-machine-v1/tokens/callback-token.json"
218
+ ]
219
+ },
220
+ {
221
+ "id": "machine-api-bodies",
222
+ "version": "1.0.0-rc.13",
223
+ "schema": "schemas/machine-v1.schema.json",
224
+ "fixtures": [
225
+ "fixtures/interaction-machine-v1/requests/create-machine-client.json",
226
+ "fixtures/interaction-machine-v1/requests/register-machine-credential.json",
227
+ "fixtures/interaction-machine-v1/requests/ack-processed.json",
228
+ "fixtures/interaction-machine-v1/requests/ack-quarantined.json",
229
+ "fixtures/interaction-machine-v1/success/machine-client-provisioning.json",
230
+ "fixtures/interaction-machine-v1/success/machine-client-active.json",
231
+ "fixtures/interaction-machine-v1/success/machine-client-revoked.json",
232
+ "fixtures/interaction-machine-v1/success/machine-credential-active.json",
233
+ "fixtures/interaction-machine-v1/success/machine-credential-revoked.json",
234
+ "fixtures/interaction-machine-v1/success/poll-events.json",
235
+ "fixtures/interaction-machine-v1/success/poll-empty.json",
236
+ "fixtures/interaction-machine-v1/success/ack-processed.json",
237
+ "fixtures/interaction-machine-v1/success/ack-out-of-order.json",
238
+ "fixtures/interaction-machine-v1/success/ack-quarantined.json"
239
+ ]
240
+ },
241
+ {
242
+ "id": "provider-capability-bodies",
243
+ "version": "1.0.0-rc.13",
244
+ "schema": "schemas/provider-capabilities-v1.schema.json",
245
+ "fixtures": ["fixtures/interaction-machine-v1/capabilities/telegram.json"]
246
+ },
247
+ {
248
+ "id": "interaction-machine-semantic-scenarios",
249
+ "version": "1.0.0-rc.13",
250
+ "schema": "schemas/interaction-machine-scenario.schema.json",
251
+ "fixtures": [
252
+ "fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json",
253
+ "fixtures/interaction-machine-v1/scenarios/interaction-stale.json",
254
+ "fixtures/interaction-machine-v1/scenarios/interaction-expired.json",
255
+ "fixtures/interaction-machine-v1/scenarios/interaction-retired.json",
256
+ "fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json",
257
+ "fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json",
258
+ "fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json",
259
+ "fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json",
260
+ "fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json",
261
+ "fixtures/interaction-machine-v1/scenarios/first-credential-activates.json",
262
+ "fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json",
263
+ "fixtures/interaction-machine-v1/scenarios/credential-rotation.json",
264
+ "fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json",
265
+ "fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json",
266
+ "fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json",
267
+ "fixtures/interaction-machine-v1/scenarios/ack-replay.json",
268
+ "fixtures/interaction-machine-v1/scenarios/ack-conflict.json",
269
+ "fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json",
270
+ "fixtures/interaction-machine-v1/scenarios/quarantine-valid.json",
271
+ "fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json",
272
+ "fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json",
273
+ "fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json",
274
+ "fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json",
275
+ "fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json",
276
+ "fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json",
277
+ "fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json",
278
+ "fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json",
279
+ "fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json",
280
+ "fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json",
281
+ "fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json"
282
+ ]
283
+ },
284
+ {
285
+ "id": "customer-event-bodies",
286
+ "version": "1.0.0-rc.13",
287
+ "schema": "schemas/events/whooshbang-event-v1.schema.json",
288
+ "fixtures": [
289
+ "fixtures/whooshbang-events-v1/events/subscription-activated.json",
290
+ "fixtures/whooshbang-events-v1/events/subscription-revoked.json",
291
+ "fixtures/whooshbang-events-v1/events/message-provider-accepted.json",
292
+ "fixtures/whooshbang-events-v1/events/message-delivered.json",
293
+ "fixtures/whooshbang-events-v1/events/message-failed.json",
294
+ "fixtures/whooshbang-events-v1/events/message-expired.json",
295
+ "fixtures/whooshbang-events-v1/events/interaction-received.json",
296
+ "fixtures/whooshbang-events-v1/events/interaction-expired.json",
297
+ "fixtures/whooshbang-events-v1/events/agent-binding-degraded.json"
298
+ ]
299
+ },
300
+ {
301
+ "id": "webhook-signing-vectors",
302
+ "version": "1.0.0-rc.13",
303
+ "schema": "schemas/webhooks/webhook-signing-vector-v1.schema.json",
304
+ "fixtures": ["fixtures/whooshbang-events-v1/signing/vectors.json"]
305
+ },
306
+ {
307
+ "id": "webhook-delivery-cases",
308
+ "version": "1.0.0-rc.13",
309
+ "schema": "schemas/webhooks/webhook-delivery-case-v1.schema.json",
310
+ "fixtures": ["fixtures/whooshbang-events-v1/delivery/cases.json"]
311
+ },
312
+ {
313
+ "id": "core-fixture-index",
314
+ "version": "1.0.0-rc.13",
315
+ "schema": "schemas/fixture-index.schema.json",
316
+ "fixtures": ["fixtures/core-v1/fixture-index.json"]
317
+ }
318
+ ],
319
+ "generated": [
320
+ {
321
+ "id": "whooshbang-openapi-v1-bundle",
322
+ "source": "openapi/whooshbang-v1.yaml",
323
+ "path": "openapi/generated/whooshbang-v1.bundle.json"
324
+ },
325
+ {
326
+ "id": "whooshbang-v1-types",
327
+ "source": "schemas/whooshbang-v1.schema.json",
328
+ "path": "src/generated/whooshbang-v1.ts"
329
+ },
330
+ {
331
+ "id": "interaction-v1-types",
332
+ "source": "schemas/interaction-v1.schema.json",
333
+ "path": "src/generated/interaction-v1.ts"
334
+ },
335
+ {
336
+ "id": "machine-v1-types",
337
+ "source": "schemas/machine-v1.schema.json",
338
+ "path": "src/generated/machine-v1.ts"
339
+ },
340
+ {
341
+ "id": "provider-capabilities-v1-types",
342
+ "source": "schemas/provider-capabilities-v1.schema.json",
343
+ "path": "src/generated/provider-capabilities-v1.ts"
344
+ },
345
+ {
346
+ "id": "whooshbang-event-v1-types",
347
+ "source": "schemas/events/whooshbang-event-v1.schema.json",
348
+ "path": "src/generated/whooshbang-event-v1.ts"
349
+ },
350
+ {
351
+ "id": "webhook-signing-vector-v1-types",
352
+ "source": "schemas/webhooks/webhook-signing-vector-v1.schema.json",
353
+ "path": "src/generated/webhook-signing-vector-v1.ts"
354
+ },
355
+ {
356
+ "id": "webhook-delivery-case-v1-types",
357
+ "source": "schemas/webhooks/webhook-delivery-case-v1.schema.json",
358
+ "path": "src/generated/webhook-delivery-case-v1.ts"
359
+ },
360
+ {
361
+ "id": "interaction-machine-scenario-types",
362
+ "source": "schemas/interaction-machine-scenario.schema.json",
363
+ "path": "src/generated/interaction-machine-scenario.ts"
364
+ },
365
+ {
366
+ "id": "core-contract-scenario-types",
367
+ "source": "schemas/core-scenario.schema.json",
368
+ "path": "src/generated/core-scenario.ts"
369
+ },
370
+ {
371
+ "id": "core-fixture-index-types",
372
+ "source": "schemas/fixture-index.schema.json",
373
+ "path": "src/generated/fixture-index.ts"
374
+ },
375
+ {
376
+ "id": "whooshbang-v1-validators",
377
+ "source": "schemas/whooshbang-v1.schema.json",
378
+ "path": "src/generated/validators.ts"
379
+ },
380
+ {
381
+ "id": "whooshbang-v1-standalone-validators",
382
+ "source": "schemas/whooshbang-v1.schema.json",
383
+ "path": "src/generated/validators-standalone.ts"
384
+ }
385
+ ],
386
+ "compatibility": {
387
+ "api_major": 1,
388
+ "status": "release-candidate"
389
+ }
390
+ }
@@ -0,0 +1,2 @@
1
+ export declare function encodeBase64Url(bytes: Uint8Array): string;
2
+ export declare function decodeBase64Url(value: string): Uint8Array | undefined;
@@ -0,0 +1,51 @@
1
+ const base64UrlAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
2
+ function alphabetCharacter(index) {
3
+ const character = base64UrlAlphabet[index];
4
+ if (character === undefined) {
5
+ throw new RangeError("Base64url sextet is outside the alphabet");
6
+ }
7
+ return character;
8
+ }
9
+ export function encodeBase64Url(bytes) {
10
+ let output = "";
11
+ let accumulator = 0;
12
+ let bitCount = 0;
13
+ for (const byte of bytes) {
14
+ accumulator = (accumulator << 8) | byte;
15
+ bitCount += 8;
16
+ while (bitCount >= 6) {
17
+ bitCount -= 6;
18
+ output += alphabetCharacter((accumulator >>> bitCount) & 0x3f);
19
+ }
20
+ }
21
+ if (bitCount > 0) {
22
+ output += alphabetCharacter((accumulator << (6 - bitCount)) & 0x3f);
23
+ }
24
+ return output;
25
+ }
26
+ export function decodeBase64Url(value) {
27
+ if (!/^[A-Za-z0-9_-]*$/u.test(value) || value.length % 4 === 1) {
28
+ return undefined;
29
+ }
30
+ const output = [];
31
+ let accumulator = 0;
32
+ let bitCount = 0;
33
+ for (const character of value) {
34
+ const index = base64UrlAlphabet.indexOf(character);
35
+ if (index < 0) {
36
+ return undefined;
37
+ }
38
+ accumulator = (accumulator << 6) | index;
39
+ bitCount += 6;
40
+ if (bitCount >= 8) {
41
+ bitCount -= 8;
42
+ output.push((accumulator >>> bitCount) & 0xff);
43
+ }
44
+ }
45
+ if (bitCount > 0 && (accumulator & ((1 << bitCount) - 1)) !== 0) {
46
+ return undefined;
47
+ }
48
+ const decoded = Uint8Array.from(output);
49
+ return encodeBase64Url(decoded) === value ? decoded : undefined;
50
+ }
51
+ //# sourceMappingURL=base64url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64url.js","sourceRoot":"","sources":["../src/base64url.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GACrB,kEAAkE,CAAC;AAErE,SAAS,iBAAiB,CAAC,KAAa;IACtC,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,IAAI,UAAU,CAAC,0CAA0C,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAiB;IAC/C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;IAEjB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,WAAW,GAAG,CAAC,WAAW,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QACxC,QAAQ,IAAI,CAAC,CAAC;QACd,OAAO,QAAQ,IAAI,CAAC,EAAE,CAAC;YACrB,QAAQ,IAAI,CAAC,CAAC;YACd,MAAM,IAAI,iBAAiB,CAAC,CAAC,WAAW,KAAK,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,IAAI,iBAAiB,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/D,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,KAAK,MAAM,SAAS,IAAI,KAAK,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,WAAW,GAAG,CAAC,WAAW,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;QACzC,QAAQ,IAAI,CAAC,CAAC;QACd,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;YAClB,QAAQ,IAAI,CAAC,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,KAAK,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IACD,IAAI,QAAQ,GAAG,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,eAAe,CAAC,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAClE,CAAC"}