@noresponse/node 2.0.13 → 2.0.14

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 (263) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +12 -1
  3. package/dist/commonjs/client.d.ts +24 -0
  4. package/dist/commonjs/client.d.ts.map +1 -1
  5. package/dist/commonjs/client.js +43 -1
  6. package/dist/commonjs/client.js.map +1 -1
  7. package/dist/commonjs/funcs/webhook-endpoints-create.d.ts +19 -0
  8. package/dist/commonjs/funcs/webhook-endpoints-create.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/webhook-endpoints-create.js +137 -0
  10. package/dist/commonjs/funcs/webhook-endpoints-create.js.map +1 -0
  11. package/dist/commonjs/funcs/webhook-endpoints-delete.d.ts +18 -0
  12. package/dist/commonjs/funcs/webhook-endpoints-delete.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/webhook-endpoints-delete.js +151 -0
  14. package/dist/commonjs/funcs/webhook-endpoints-delete.js.map +1 -0
  15. package/dist/commonjs/funcs/webhook-endpoints-list.d.ts +18 -0
  16. package/dist/commonjs/funcs/webhook-endpoints-list.d.ts.map +1 -0
  17. package/dist/commonjs/funcs/webhook-endpoints-list.js +137 -0
  18. package/dist/commonjs/funcs/webhook-endpoints-list.js.map +1 -0
  19. package/dist/commonjs/funcs/webhook-endpoints-rotate-signing-key.d.ts +18 -0
  20. package/dist/commonjs/funcs/webhook-endpoints-rotate-signing-key.d.ts.map +1 -0
  21. package/dist/commonjs/funcs/webhook-endpoints-rotate-signing-key.js +142 -0
  22. package/dist/commonjs/funcs/webhook-endpoints-rotate-signing-key.js.map +1 -0
  23. package/dist/commonjs/funcs/webhook-endpoints-send-test-event.d.ts +18 -0
  24. package/dist/commonjs/funcs/webhook-endpoints-send-test-event.d.ts.map +1 -0
  25. package/dist/commonjs/funcs/webhook-endpoints-send-test-event.js +142 -0
  26. package/dist/commonjs/funcs/webhook-endpoints-send-test-event.js.map +1 -0
  27. package/dist/commonjs/index.d.ts +1 -1
  28. package/dist/commonjs/index.d.ts.map +1 -1
  29. package/dist/commonjs/index.js +2 -1
  30. package/dist/commonjs/index.js.map +1 -1
  31. package/dist/commonjs/lib/config.d.ts +2 -2
  32. package/dist/commonjs/lib/config.js +2 -2
  33. package/dist/commonjs/models/bad-request-error-code.d.ts +1 -0
  34. package/dist/commonjs/models/bad-request-error-code.d.ts.map +1 -1
  35. package/dist/commonjs/models/bad-request-error-code.js +1 -0
  36. package/dist/commonjs/models/bad-request-error-code.js.map +1 -1
  37. package/dist/commonjs/models/conflict-error-code.d.ts +2 -0
  38. package/dist/commonjs/models/conflict-error-code.d.ts.map +1 -1
  39. package/dist/commonjs/models/conflict-error-code.js +2 -0
  40. package/dist/commonjs/models/conflict-error-code.js.map +1 -1
  41. package/dist/commonjs/models/index.d.ts +12 -0
  42. package/dist/commonjs/models/index.d.ts.map +1 -1
  43. package/dist/commonjs/models/index.js +12 -0
  44. package/dist/commonjs/models/index.js.map +1 -1
  45. package/dist/commonjs/models/operations/create-webhook-endpoint.d.ts +14 -0
  46. package/dist/commonjs/models/operations/create-webhook-endpoint.d.ts.map +1 -0
  47. package/dist/commonjs/models/operations/create-webhook-endpoint.js +55 -0
  48. package/dist/commonjs/models/operations/create-webhook-endpoint.js.map +1 -0
  49. package/dist/commonjs/models/operations/delete-webhook-endpoint.d.ts +25 -0
  50. package/dist/commonjs/models/operations/delete-webhook-endpoint.d.ts.map +1 -0
  51. package/dist/commonjs/models/operations/delete-webhook-endpoint.js +64 -0
  52. package/dist/commonjs/models/operations/delete-webhook-endpoint.js.map +1 -0
  53. package/dist/commonjs/models/operations/index.d.ts +5 -0
  54. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  55. package/dist/commonjs/models/operations/index.js +5 -0
  56. package/dist/commonjs/models/operations/index.js.map +1 -1
  57. package/dist/commonjs/models/operations/list-webhook-endpoints.d.ts +14 -0
  58. package/dist/commonjs/models/operations/list-webhook-endpoints.d.ts.map +1 -0
  59. package/dist/commonjs/models/operations/list-webhook-endpoints.js +55 -0
  60. package/dist/commonjs/models/operations/list-webhook-endpoints.js.map +1 -0
  61. package/dist/commonjs/models/operations/rotate-webhook-signing-key.d.ts +29 -0
  62. package/dist/commonjs/models/operations/rotate-webhook-signing-key.d.ts.map +1 -0
  63. package/dist/commonjs/models/operations/rotate-webhook-signing-key.js +68 -0
  64. package/dist/commonjs/models/operations/rotate-webhook-signing-key.js.map +1 -0
  65. package/dist/commonjs/models/operations/send-webhook-test-event.d.ts +29 -0
  66. package/dist/commonjs/models/operations/send-webhook-test-event.d.ts.map +1 -0
  67. package/dist/commonjs/models/operations/send-webhook-test-event.js +68 -0
  68. package/dist/commonjs/models/operations/send-webhook-test-event.js.map +1 -0
  69. package/dist/commonjs/models/response-mode.d.ts +5 -3
  70. package/dist/commonjs/models/response-mode.d.ts.map +1 -1
  71. package/dist/commonjs/models/response-mode.js +5 -4
  72. package/dist/commonjs/models/response-mode.js.map +1 -1
  73. package/dist/commonjs/models/signing-key.d.ts +21 -0
  74. package/dist/commonjs/models/signing-key.d.ts.map +1 -0
  75. package/dist/commonjs/models/signing-key.js +58 -0
  76. package/dist/commonjs/models/signing-key.js.map +1 -0
  77. package/dist/commonjs/models/signing-secret.d.ts +21 -0
  78. package/dist/commonjs/models/signing-secret.d.ts.map +1 -0
  79. package/dist/commonjs/models/signing-secret.js +56 -0
  80. package/dist/commonjs/models/signing-secret.js.map +1 -0
  81. package/dist/commonjs/models/webhook-endpoint-created.d.ts +22 -0
  82. package/dist/commonjs/models/webhook-endpoint-created.d.ts.map +1 -0
  83. package/dist/commonjs/models/webhook-endpoint-created.js +55 -0
  84. package/dist/commonjs/models/webhook-endpoint-created.js.map +1 -0
  85. package/dist/commonjs/models/webhook-endpoint-list.d.ts +14 -0
  86. package/dist/commonjs/models/webhook-endpoint-list.d.ts.map +1 -0
  87. package/dist/commonjs/models/webhook-endpoint-list.js +48 -0
  88. package/dist/commonjs/models/webhook-endpoint-list.js.map +1 -0
  89. package/dist/commonjs/models/webhook-endpoint-request.d.ts +24 -0
  90. package/dist/commonjs/models/webhook-endpoint-request.d.ts.map +1 -0
  91. package/dist/commonjs/models/webhook-endpoint-request.js +53 -0
  92. package/dist/commonjs/models/webhook-endpoint-request.js.map +1 -0
  93. package/dist/commonjs/models/webhook-endpoint-state.d.ts +17 -0
  94. package/dist/commonjs/models/webhook-endpoint-state.d.ts.map +1 -0
  95. package/dist/commonjs/models/webhook-endpoint-state.js +48 -0
  96. package/dist/commonjs/models/webhook-endpoint-state.js.map +1 -0
  97. package/dist/commonjs/models/webhook-endpoint.d.ts +40 -0
  98. package/dist/commonjs/models/webhook-endpoint.d.ts.map +1 -0
  99. package/dist/commonjs/models/webhook-endpoint.js +66 -0
  100. package/dist/commonjs/models/webhook-endpoint.js.map +1 -0
  101. package/dist/commonjs/models/webhook-key-rotation-request.d.ts +11 -0
  102. package/dist/commonjs/models/webhook-key-rotation-request.d.ts.map +1 -0
  103. package/dist/commonjs/models/webhook-key-rotation-request.js +44 -0
  104. package/dist/commonjs/models/webhook-key-rotation-request.js.map +1 -0
  105. package/dist/commonjs/models/webhook-key-rotation.d.ts +29 -0
  106. package/dist/commonjs/models/webhook-key-rotation.d.ts.map +1 -0
  107. package/dist/commonjs/models/webhook-key-rotation.js +60 -0
  108. package/dist/commonjs/models/webhook-key-rotation.js.map +1 -0
  109. package/dist/commonjs/models/webhook-test-request-event.d.ts +18 -0
  110. package/dist/commonjs/models/webhook-test-request-event.d.ts.map +1 -0
  111. package/dist/commonjs/models/webhook-test-request-event.js +49 -0
  112. package/dist/commonjs/models/webhook-test-request-event.js.map +1 -0
  113. package/dist/commonjs/models/webhook-test-request.d.ts +19 -0
  114. package/dist/commonjs/models/webhook-test-request.d.ts.map +1 -0
  115. package/dist/commonjs/models/webhook-test-request.js +47 -0
  116. package/dist/commonjs/models/webhook-test-request.js.map +1 -0
  117. package/dist/commonjs/models/webhook-test.d.ts +34 -0
  118. package/dist/commonjs/models/webhook-test.d.ts.map +1 -0
  119. package/dist/commonjs/models/webhook-test.js +61 -0
  120. package/dist/commonjs/models/webhook-test.js.map +1 -0
  121. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  122. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  123. package/dist/commonjs/sdk/sdk.js +5 -0
  124. package/dist/commonjs/sdk/sdk.js.map +1 -1
  125. package/dist/commonjs/sdk/webhook-endpoints.d.ts +41 -0
  126. package/dist/commonjs/sdk/webhook-endpoints.d.ts.map +1 -0
  127. package/dist/commonjs/sdk/webhook-endpoints.js +59 -0
  128. package/dist/commonjs/sdk/webhook-endpoints.js.map +1 -0
  129. package/dist/commonjs/webhooks.d.ts +5 -0
  130. package/dist/commonjs/webhooks.d.ts.map +1 -1
  131. package/dist/commonjs/webhooks.js +2 -2
  132. package/dist/commonjs/webhooks.js.map +1 -1
  133. package/dist/esm/client.d.ts +24 -0
  134. package/dist/esm/client.d.ts.map +1 -1
  135. package/dist/esm/client.js +41 -0
  136. package/dist/esm/client.js.map +1 -1
  137. package/dist/esm/funcs/webhook-endpoints-create.d.ts +19 -0
  138. package/dist/esm/funcs/webhook-endpoints-create.d.ts.map +1 -0
  139. package/dist/esm/funcs/webhook-endpoints-create.js +101 -0
  140. package/dist/esm/funcs/webhook-endpoints-create.js.map +1 -0
  141. package/dist/esm/funcs/webhook-endpoints-delete.d.ts +18 -0
  142. package/dist/esm/funcs/webhook-endpoints-delete.d.ts.map +1 -0
  143. package/dist/esm/funcs/webhook-endpoints-delete.js +115 -0
  144. package/dist/esm/funcs/webhook-endpoints-delete.js.map +1 -0
  145. package/dist/esm/funcs/webhook-endpoints-list.d.ts +18 -0
  146. package/dist/esm/funcs/webhook-endpoints-list.d.ts.map +1 -0
  147. package/dist/esm/funcs/webhook-endpoints-list.js +101 -0
  148. package/dist/esm/funcs/webhook-endpoints-list.js.map +1 -0
  149. package/dist/esm/funcs/webhook-endpoints-rotate-signing-key.d.ts +18 -0
  150. package/dist/esm/funcs/webhook-endpoints-rotate-signing-key.d.ts.map +1 -0
  151. package/dist/esm/funcs/webhook-endpoints-rotate-signing-key.js +106 -0
  152. package/dist/esm/funcs/webhook-endpoints-rotate-signing-key.js.map +1 -0
  153. package/dist/esm/funcs/webhook-endpoints-send-test-event.d.ts +18 -0
  154. package/dist/esm/funcs/webhook-endpoints-send-test-event.d.ts.map +1 -0
  155. package/dist/esm/funcs/webhook-endpoints-send-test-event.js +106 -0
  156. package/dist/esm/funcs/webhook-endpoints-send-test-event.js.map +1 -0
  157. package/dist/esm/index.d.ts +1 -1
  158. package/dist/esm/index.d.ts.map +1 -1
  159. package/dist/esm/index.js +1 -1
  160. package/dist/esm/index.js.map +1 -1
  161. package/dist/esm/lib/config.d.ts +2 -2
  162. package/dist/esm/lib/config.js +2 -2
  163. package/dist/esm/models/bad-request-error-code.d.ts +1 -0
  164. package/dist/esm/models/bad-request-error-code.d.ts.map +1 -1
  165. package/dist/esm/models/bad-request-error-code.js +1 -0
  166. package/dist/esm/models/bad-request-error-code.js.map +1 -1
  167. package/dist/esm/models/conflict-error-code.d.ts +2 -0
  168. package/dist/esm/models/conflict-error-code.d.ts.map +1 -1
  169. package/dist/esm/models/conflict-error-code.js +2 -0
  170. package/dist/esm/models/conflict-error-code.js.map +1 -1
  171. package/dist/esm/models/index.d.ts +12 -0
  172. package/dist/esm/models/index.d.ts.map +1 -1
  173. package/dist/esm/models/index.js +12 -0
  174. package/dist/esm/models/index.js.map +1 -1
  175. package/dist/esm/models/operations/create-webhook-endpoint.d.ts +14 -0
  176. package/dist/esm/models/operations/create-webhook-endpoint.d.ts.map +1 -0
  177. package/dist/esm/models/operations/create-webhook-endpoint.js +18 -0
  178. package/dist/esm/models/operations/create-webhook-endpoint.js.map +1 -0
  179. package/dist/esm/models/operations/delete-webhook-endpoint.d.ts +25 -0
  180. package/dist/esm/models/operations/delete-webhook-endpoint.d.ts.map +1 -0
  181. package/dist/esm/models/operations/delete-webhook-endpoint.js +26 -0
  182. package/dist/esm/models/operations/delete-webhook-endpoint.js.map +1 -0
  183. package/dist/esm/models/operations/index.d.ts +5 -0
  184. package/dist/esm/models/operations/index.d.ts.map +1 -1
  185. package/dist/esm/models/operations/index.js +5 -0
  186. package/dist/esm/models/operations/index.js.map +1 -1
  187. package/dist/esm/models/operations/list-webhook-endpoints.d.ts +14 -0
  188. package/dist/esm/models/operations/list-webhook-endpoints.d.ts.map +1 -0
  189. package/dist/esm/models/operations/list-webhook-endpoints.js +18 -0
  190. package/dist/esm/models/operations/list-webhook-endpoints.js.map +1 -0
  191. package/dist/esm/models/operations/rotate-webhook-signing-key.d.ts +29 -0
  192. package/dist/esm/models/operations/rotate-webhook-signing-key.d.ts.map +1 -0
  193. package/dist/esm/models/operations/rotate-webhook-signing-key.js +30 -0
  194. package/dist/esm/models/operations/rotate-webhook-signing-key.js.map +1 -0
  195. package/dist/esm/models/operations/send-webhook-test-event.d.ts +29 -0
  196. package/dist/esm/models/operations/send-webhook-test-event.d.ts.map +1 -0
  197. package/dist/esm/models/operations/send-webhook-test-event.js +30 -0
  198. package/dist/esm/models/operations/send-webhook-test-event.js.map +1 -0
  199. package/dist/esm/models/response-mode.d.ts +5 -3
  200. package/dist/esm/models/response-mode.d.ts.map +1 -1
  201. package/dist/esm/models/response-mode.js +4 -3
  202. package/dist/esm/models/response-mode.js.map +1 -1
  203. package/dist/esm/models/signing-key.d.ts +21 -0
  204. package/dist/esm/models/signing-key.d.ts.map +1 -0
  205. package/dist/esm/models/signing-key.js +21 -0
  206. package/dist/esm/models/signing-key.js.map +1 -0
  207. package/dist/esm/models/signing-secret.d.ts +21 -0
  208. package/dist/esm/models/signing-secret.d.ts.map +1 -0
  209. package/dist/esm/models/signing-secret.js +19 -0
  210. package/dist/esm/models/signing-secret.js.map +1 -0
  211. package/dist/esm/models/webhook-endpoint-created.d.ts +22 -0
  212. package/dist/esm/models/webhook-endpoint-created.d.ts.map +1 -0
  213. package/dist/esm/models/webhook-endpoint-created.js +18 -0
  214. package/dist/esm/models/webhook-endpoint-created.js.map +1 -0
  215. package/dist/esm/models/webhook-endpoint-list.d.ts +14 -0
  216. package/dist/esm/models/webhook-endpoint-list.d.ts.map +1 -0
  217. package/dist/esm/models/webhook-endpoint-list.js +11 -0
  218. package/dist/esm/models/webhook-endpoint-list.js.map +1 -0
  219. package/dist/esm/models/webhook-endpoint-request.d.ts +24 -0
  220. package/dist/esm/models/webhook-endpoint-request.d.ts.map +1 -0
  221. package/dist/esm/models/webhook-endpoint-request.js +16 -0
  222. package/dist/esm/models/webhook-endpoint-request.js.map +1 -0
  223. package/dist/esm/models/webhook-endpoint-state.d.ts +17 -0
  224. package/dist/esm/models/webhook-endpoint-state.d.ts.map +1 -0
  225. package/dist/esm/models/webhook-endpoint-state.js +12 -0
  226. package/dist/esm/models/webhook-endpoint-state.js.map +1 -0
  227. package/dist/esm/models/webhook-endpoint.d.ts +40 -0
  228. package/dist/esm/models/webhook-endpoint.d.ts.map +1 -0
  229. package/dist/esm/models/webhook-endpoint.js +29 -0
  230. package/dist/esm/models/webhook-endpoint.js.map +1 -0
  231. package/dist/esm/models/webhook-key-rotation-request.d.ts +11 -0
  232. package/dist/esm/models/webhook-key-rotation-request.d.ts.map +1 -0
  233. package/dist/esm/models/webhook-key-rotation-request.js +7 -0
  234. package/dist/esm/models/webhook-key-rotation-request.js.map +1 -0
  235. package/dist/esm/models/webhook-key-rotation.d.ts +29 -0
  236. package/dist/esm/models/webhook-key-rotation.d.ts.map +1 -0
  237. package/dist/esm/models/webhook-key-rotation.js +23 -0
  238. package/dist/esm/models/webhook-key-rotation.js.map +1 -0
  239. package/dist/esm/models/webhook-test-request-event.d.ts +18 -0
  240. package/dist/esm/models/webhook-test-request-event.d.ts.map +1 -0
  241. package/dist/esm/models/webhook-test-request-event.js +13 -0
  242. package/dist/esm/models/webhook-test-request-event.js.map +1 -0
  243. package/dist/esm/models/webhook-test-request.d.ts +19 -0
  244. package/dist/esm/models/webhook-test-request.d.ts.map +1 -0
  245. package/dist/esm/models/webhook-test-request.js +10 -0
  246. package/dist/esm/models/webhook-test-request.js.map +1 -0
  247. package/dist/esm/models/webhook-test.d.ts +34 -0
  248. package/dist/esm/models/webhook-test.d.ts.map +1 -0
  249. package/dist/esm/models/webhook-test.js +24 -0
  250. package/dist/esm/models/webhook-test.js.map +1 -0
  251. package/dist/esm/sdk/sdk.d.ts +3 -0
  252. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  253. package/dist/esm/sdk/sdk.js +5 -0
  254. package/dist/esm/sdk/sdk.js.map +1 -1
  255. package/dist/esm/sdk/webhook-endpoints.d.ts +41 -0
  256. package/dist/esm/sdk/webhook-endpoints.d.ts.map +1 -0
  257. package/dist/esm/sdk/webhook-endpoints.js +55 -0
  258. package/dist/esm/sdk/webhook-endpoints.js.map +1 -0
  259. package/dist/esm/webhooks.d.ts +5 -0
  260. package/dist/esm/webhooks.d.ts.map +1 -1
  261. package/dist/esm/webhooks.js +2 -2
  262. package/dist/esm/webhooks.js.map +1 -1
  263. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-endpoint-request.d.ts","sourceRoot":"","sources":["../../../src/models/webhook-endpoint-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,YAAY,EAA+B,MAAM,oBAAoB,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,+BAA+B,GAAG;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,WAAW,CAC/D,+BAA+B,EAC/B,sBAAsB,CAWvB,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,sBAAsB,EAAE,sBAAsB,GAC7C,MAAM,CAIR"}
@@ -0,0 +1,16 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { remap as remap$ } from "../lib/primitives.js";
3
+ import { ResponseMode$outboundSchema } from "./response-mode.js";
4
+ /** @internal */
5
+ export const WebhookEndpointRequest$outboundSchema = z.pipe(z.object({
6
+ url: z.string(),
7
+ responseMode: z.optional(ResponseMode$outboundSchema),
8
+ }), z.transform((v) => {
9
+ return remap$(v, {
10
+ responseMode: "response_mode",
11
+ });
12
+ }));
13
+ export function webhookEndpointRequestToJSON(webhookEndpointRequest) {
14
+ return JSON.stringify(WebhookEndpointRequest$outboundSchema.parse(webhookEndpointRequest));
15
+ }
16
+ //# sourceMappingURL=webhook-endpoint-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-endpoint-request.js","sourceRoot":"","sources":["../../../src/models/webhook-endpoint-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAgB,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAsB/E,gBAAgB;AAChB,MAAM,CAAC,MAAM,qCAAqC,GAG9C,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,2BAA2B,CAAC;CACtD,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,YAAY,EAAE,eAAe;KAC9B,CAAC,CAAC;AAAA,CACJ,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAC1C,sBAA8C,EACtC;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,qCAAqC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CACpE,CAAC;AAAA,CACH"}
@@ -0,0 +1,17 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ /**
4
+ * unverified until the endpoint echoes an endpoint.verification challenge (send one with POST /v1/webhooks/{endpoint_id}/test); verified receives assessment.updated events; disabled after 72 hours of continuous delivery failure, and verified again by the same challenge.
5
+ */
6
+ export declare const WebhookEndpointState: {
7
+ readonly Unverified: "unverified";
8
+ readonly Verified: "verified";
9
+ readonly Disabled: "disabled";
10
+ };
11
+ /**
12
+ * unverified until the endpoint echoes an endpoint.verification challenge (send one with POST /v1/webhooks/{endpoint_id}/test); verified receives assessment.updated events; disabled after 72 hours of continuous delivery failure, and verified again by the same challenge.
13
+ */
14
+ export type WebhookEndpointState = OpenEnum<typeof WebhookEndpointState>;
15
+ /** @internal */
16
+ export declare const WebhookEndpointState$inboundSchema: z.ZodMiniType<WebhookEndpointState, unknown>;
17
+ //# sourceMappingURL=webhook-endpoint-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-endpoint-state.d.ts","sourceRoot":"","sources":["../../../src/models/webhook-endpoint-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEzE,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,WAAW,CAC5D,oBAAoB,EACpB,OAAO,CACwC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as openEnums from "../types/enums.js";
2
+ /**
3
+ * unverified until the endpoint echoes an endpoint.verification challenge (send one with POST /v1/webhooks/{endpoint_id}/test); verified receives assessment.updated events; disabled after 72 hours of continuous delivery failure, and verified again by the same challenge.
4
+ */
5
+ export const WebhookEndpointState = {
6
+ Unverified: "unverified",
7
+ Verified: "verified",
8
+ Disabled: "disabled",
9
+ };
10
+ /** @internal */
11
+ export const WebhookEndpointState$inboundSchema = openEnums.inboundSchema(WebhookEndpointState);
12
+ //# sourceMappingURL=webhook-endpoint-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-endpoint-state.js","sourceRoot":"","sources":["../../../src/models/webhook-endpoint-state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAMX,gBAAgB;AAChB,MAAM,CAAC,MAAM,kCAAkC,GAG3C,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
4
+ import { ResponseMode } from "./response-mode.js";
5
+ import { SigningKey } from "./signing-key.js";
6
+ import { WebhookEndpointState } from "./webhook-endpoint-state.js";
7
+ /**
8
+ * One of the tenant's registered webhook endpoints. Signing secrets are not part of it: a secret is shown once, when it is issued (POST /v1/webhooks and POST /v1/webhooks/{endpoint_id}/rotate).
9
+ */
10
+ export type WebhookEndpoint = {
11
+ /**
12
+ * Opaque id of the endpoint registration.
13
+ */
14
+ endpointId: string;
15
+ /**
16
+ * The destination URL, as registered.
17
+ */
18
+ url: string;
19
+ /**
20
+ * unverified until the endpoint echoes an endpoint.verification challenge (send one with POST /v1/webhooks/{endpoint_id}/test); verified receives assessment.updated events; disabled after 72 hours of continuous delivery failure, and verified again by the same challenge.
21
+ */
22
+ state: WebhookEndpointState;
23
+ /**
24
+ * standard returns the consolidated risk response; detailed adds merged provider-neutral facts when the key has detailed scope. There is no raw mode.
25
+ */
26
+ responseMode: ResponseMode;
27
+ createdAt: string;
28
+ /**
29
+ * When the endpoint last echoed a challenge. Absent until it first does.
30
+ */
31
+ verifiedAt?: string | undefined;
32
+ /**
33
+ * The keys a receiver may see in NR-Webhook-Key-Id, oldest first. The last one signs every new delivery; an older one keeps verifying until its expires_at.
34
+ */
35
+ signingKeys: Array<SigningKey>;
36
+ };
37
+ /** @internal */
38
+ export declare const WebhookEndpoint$inboundSchema: z.ZodMiniType<WebhookEndpoint, unknown>;
39
+ export declare function webhookEndpointFromJSON(jsonString: string): SafeParseResult<WebhookEndpoint, SDKValidationError>;
40
+ //# sourceMappingURL=webhook-endpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-endpoint.d.ts","sourceRoot":"","sources":["../../../src/models/webhook-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAA8B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAA4B,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,oBAAoB,EAErB,MAAM,6BAA6B,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,oBAAoB,CAAC;IAC5B;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAChC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,WAAW,CACvD,eAAe,EACf,OAAO,CAoBR,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD"}
@@ -0,0 +1,29 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { remap as remap$ } from "../lib/primitives.js";
3
+ import { safeParse } from "../lib/schemas.js";
4
+ import * as types from "../types/primitives.js";
5
+ import { ResponseMode$inboundSchema } from "./response-mode.js";
6
+ import { SigningKey$inboundSchema } from "./signing-key.js";
7
+ import { WebhookEndpointState$inboundSchema, } from "./webhook-endpoint-state.js";
8
+ /** @internal */
9
+ export const WebhookEndpoint$inboundSchema = z.pipe(z.object({
10
+ endpoint_id: types.string(),
11
+ url: types.string(),
12
+ state: WebhookEndpointState$inboundSchema,
13
+ response_mode: ResponseMode$inboundSchema,
14
+ created_at: types.string(),
15
+ verified_at: types.optional(types.string()),
16
+ signing_keys: z.array(SigningKey$inboundSchema),
17
+ }), z.transform((v) => {
18
+ return remap$(v, {
19
+ "endpoint_id": "endpointId",
20
+ "response_mode": "responseMode",
21
+ "created_at": "createdAt",
22
+ "verified_at": "verifiedAt",
23
+ "signing_keys": "signingKeys",
24
+ });
25
+ }));
26
+ export function webhookEndpointFromJSON(jsonString) {
27
+ return safeParse(jsonString, (x) => WebhookEndpoint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookEndpoint' from JSON`);
28
+ }
29
+ //# sourceMappingURL=webhook-endpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-endpoint.js","sourceRoot":"","sources":["../../../src/models/webhook-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EA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11 @@
1
+ import * as z from "zod/v4-mini";
2
+ /**
3
+ * POST /v1/webhooks/{endpoint_id}/rotate body: an empty object. The old key keeps verifying for 7 days.
4
+ */
5
+ export type WebhookKeyRotationRequest = {};
6
+ /** @internal */
7
+ export type WebhookKeyRotationRequest$Outbound = {};
8
+ /** @internal */
9
+ export declare const WebhookKeyRotationRequest$outboundSchema: z.ZodMiniType<WebhookKeyRotationRequest$Outbound, WebhookKeyRotationRequest>;
10
+ export declare function webhookKeyRotationRequestToJSON(webhookKeyRotationRequest: WebhookKeyRotationRequest): string;
11
+ //# sourceMappingURL=webhook-key-rotation-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-key-rotation-request.d.ts","sourceRoot":"","sources":["../../../src/models/webhook-key-rotation-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE3C,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG,EAAE,CAAC;AAEpD,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CACX,CAAC;AAEjB,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
@@ -0,0 +1,7 @@
1
+ import * as z from "zod/v4-mini";
2
+ /** @internal */
3
+ export const WebhookKeyRotationRequest$outboundSchema = z.object({});
4
+ export function webhookKeyRotationRequestToJSON(webhookKeyRotationRequest) {
5
+ return JSON.stringify(WebhookKeyRotationRequest$outboundSchema.parse(webhookKeyRotationRequest));
6
+ }
7
+ //# sourceMappingURL=webhook-key-rotation-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-key-rotation-request.js","sourceRoot":"","sources":["../../../src/models/webhook-key-rotation-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAUjC,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAGjD,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEjB,MAAM,UAAU,+BAA+B,CAC7C,yBAAoD,EAC5C;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AAAA,CACH"}
@@ -0,0 +1,29 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
4
+ import { SigningSecret } from "./signing-secret.js";
5
+ /**
6
+ * The 201 answer of POST /v1/webhooks/{endpoint_id}/rotate: the new signing secret, shown once, which signs every delivery from now on, and when the key it replaced stops verifying. Until then a receiver accepts both.
7
+ */
8
+ export type WebhookKeyRotation = {
9
+ /**
10
+ * Opaque id of the endpoint registration.
11
+ */
12
+ endpointId: string;
13
+ /**
14
+ * A newly issued signing key with its secret, shown only in this answer. A receiver verifies NR-Webhook-Signature with the secret's UTF-8 bytes as the HMAC-SHA256 key.
15
+ */
16
+ signingSecret: SigningSecret;
17
+ /**
18
+ * The key that signed until this rotation.
19
+ */
20
+ previousKeyId: string;
21
+ /**
22
+ * When the previous key stops verifying: 7 days after the rotation.
23
+ */
24
+ previousKeyExpiresAt: string;
25
+ };
26
+ /** @internal */
27
+ export declare const WebhookKeyRotation$inboundSchema: z.ZodMiniType<WebhookKeyRotation, unknown>;
28
+ export declare function webhookKeyRotationFromJSON(jsonString: string): SafeParseResult<WebhookKeyRotation, SDKValidationError>;
29
+ //# sourceMappingURL=webhook-key-rotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-key-rotation.d.ts","sourceRoot":"","sources":["../../../src/models/webhook-key-rotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EACL,aAAa,EAEd,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,WAAW,CAC1D,kBAAkB,EAClB,OAAO,CAgBR,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
@@ -0,0 +1,23 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { remap as remap$ } from "../lib/primitives.js";
3
+ import { safeParse } from "../lib/schemas.js";
4
+ import * as types from "../types/primitives.js";
5
+ import { SigningSecret$inboundSchema, } from "./signing-secret.js";
6
+ /** @internal */
7
+ export const WebhookKeyRotation$inboundSchema = z.pipe(z.object({
8
+ endpoint_id: types.string(),
9
+ signing_secret: SigningSecret$inboundSchema,
10
+ previous_key_id: types.string(),
11
+ previous_key_expires_at: types.string(),
12
+ }), z.transform((v) => {
13
+ return remap$(v, {
14
+ "endpoint_id": "endpointId",
15
+ "signing_secret": "signingSecret",
16
+ "previous_key_id": "previousKeyId",
17
+ "previous_key_expires_at": "previousKeyExpiresAt",
18
+ });
19
+ }));
20
+ export function webhookKeyRotationFromJSON(jsonString) {
21
+ return safeParse(jsonString, (x) => WebhookKeyRotation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookKeyRotation' from JSON`);
22
+ }
23
+ //# sourceMappingURL=webhook-key-rotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-key-rotation.js","sourceRoot":"","sources":["../../../src/models/webhook-key-rotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAEL,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAwB7B,gBAAgB;AAChB,MAAM,CAAC,MAAM,gCAAgC,GAGzC,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE;IAC3B,cAAc,EAAE,2BAA2B;IAC3C,eAAe,EAAE,KAAK,CAAC,MAAM,EAAE;IAC/B,uBAAuB,EAAE,KAAK,CAAC,MAAM,EAAE;CACxC,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,aAAa,EAAE,YAAY;QAC3B,gBAAgB,EAAE,eAAe;QACjC,iBAAiB,EAAE,eAAe;QAClC,yBAAyB,EAAE,sBAAsB;KAClD,CAAC,CAAC;AAAA,CACJ,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,0BAA0B,CACxC,UAAkB,EACuC;IACzD,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AAAA,CACH"}
@@ -0,0 +1,18 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ /**
4
+ * endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
5
+ */
6
+ export declare const WebhookTestRequestEvent: {
7
+ readonly EndpointVerification: "endpoint.verification";
8
+ readonly AssessmentUpdated: "assessment.updated";
9
+ };
10
+ /**
11
+ * endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
12
+ */
13
+ export type WebhookTestRequestEvent = OpenEnum<typeof WebhookTestRequestEvent>;
14
+ /** @internal */
15
+ export declare const WebhookTestRequestEvent$inboundSchema: z.ZodMiniType<WebhookTestRequestEvent, unknown>;
16
+ /** @internal */
17
+ export declare const WebhookTestRequestEvent$outboundSchema: z.ZodMiniType<string, WebhookTestRequestEvent>;
18
+ //# sourceMappingURL=webhook-test-request-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-test-request-event.d.ts","sourceRoot":"","sources":["../../../src/models/webhook-test-request-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE/E,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,WAAW,CAC/D,uBAAuB,EACvB,OAAO,CAC2C,CAAC;AACrD,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,WAAW,CAChE,MAAM,EACN,uBAAuB,CAC4B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import * as openEnums from "../types/enums.js";
2
+ /**
3
+ * endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
4
+ */
5
+ export const WebhookTestRequestEvent = {
6
+ EndpointVerification: "endpoint.verification",
7
+ AssessmentUpdated: "assessment.updated",
8
+ };
9
+ /** @internal */
10
+ export const WebhookTestRequestEvent$inboundSchema = openEnums.inboundSchema(WebhookTestRequestEvent);
11
+ /** @internal */
12
+ export const WebhookTestRequestEvent$outboundSchema = openEnums.outboundSchema(WebhookTestRequestEvent);
13
+ //# sourceMappingURL=webhook-test-request-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-test-request-event.js","sourceRoot":"","sources":["../../../src/models/webhook-test-request-event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,oBAAoB,EAAE,uBAAuB;IAC7C,iBAAiB,EAAE,oBAAoB;CAC/B,CAAC;AAMX,gBAAgB;AAChB,MAAM,CAAC,MAAM,qCAAqC,GAG9C,SAAS,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;AACrD,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAG/C,SAAS,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { WebhookTestRequestEvent } from "./webhook-test-request-event.js";
3
+ /**
4
+ * POST /v1/webhooks/{endpoint_id}/test body: which event to send.
5
+ */
6
+ export type WebhookTestRequest = {
7
+ /**
8
+ * endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
9
+ */
10
+ event: WebhookTestRequestEvent;
11
+ };
12
+ /** @internal */
13
+ export type WebhookTestRequest$Outbound = {
14
+ event: string;
15
+ };
16
+ /** @internal */
17
+ export declare const WebhookTestRequest$outboundSchema: z.ZodMiniType<WebhookTestRequest$Outbound, WebhookTestRequest>;
18
+ export declare function webhookTestRequestToJSON(webhookTestRequest: WebhookTestRequest): string;
19
+ //# sourceMappingURL=webhook-test-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-test-request.d.ts","sourceRoot":"","sources":["../../../src/models/webhook-test-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,uBAAuB,EAExB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC;CAChC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,WAAW,CAC3D,2BAA2B,EAC3B,kBAAkB,CAGlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
@@ -0,0 +1,10 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { WebhookTestRequestEvent$outboundSchema, } from "./webhook-test-request-event.js";
3
+ /** @internal */
4
+ export const WebhookTestRequest$outboundSchema = z.object({
5
+ event: WebhookTestRequestEvent$outboundSchema,
6
+ });
7
+ export function webhookTestRequestToJSON(webhookTestRequest) {
8
+ return JSON.stringify(WebhookTestRequest$outboundSchema.parse(webhookTestRequest));
9
+ }
10
+ //# sourceMappingURL=webhook-test-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-test-request.js","sourceRoot":"","sources":["../../../src/models/webhook-test-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAEL,sCAAsC,GACvC,MAAM,iCAAiC,CAAC;AAiBzC,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAG1C,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,sCAAsC;CAC9C,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,kBAAsC,EAC9B;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,iCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AAAA,CACH"}
@@ -0,0 +1,34 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
4
+ import { WebhookEndpointState } from "./webhook-endpoint-state.js";
5
+ import { WebhookTestRequestEvent } from "./webhook-test-request-event.js";
6
+ /**
7
+ * The 202 answer of POST /v1/webhooks/{endpoint_id}/test: the event that was sent or queued.
8
+ */
9
+ export type WebhookTest = {
10
+ /**
11
+ * The event id the receiver sees as NR-Webhook-Id and as the body's id.
12
+ */
13
+ deliveryId: string;
14
+ /**
15
+ * Opaque id of the endpoint registration.
16
+ */
17
+ endpointId: string;
18
+ /**
19
+ * endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
20
+ */
21
+ event: WebhookTestRequestEvent;
22
+ /**
23
+ * unverified until the endpoint echoes an endpoint.verification challenge (send one with POST /v1/webhooks/{endpoint_id}/test); verified receives assessment.updated events; disabled after 72 hours of continuous delivery failure, and verified again by the same challenge.
24
+ */
25
+ state: WebhookEndpointState;
26
+ /**
27
+ * endpoint.verification only: true when the endpoint echoed the challenge within 5 seconds. A false answer leaves the endpoint's state as it was.
28
+ */
29
+ verified?: boolean | undefined;
30
+ };
31
+ /** @internal */
32
+ export declare const WebhookTest$inboundSchema: z.ZodMiniType<WebhookTest, unknown>;
33
+ export declare function webhookTestFromJSON(jsonString: string): SafeParseResult<WebhookTest, SDKValidationError>;
34
+ //# sourceMappingURL=webhook-test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-test.d.ts","sourceRoot":"","sources":["../../../src/models/webhook-test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EACL,oBAAoB,EAErB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,uBAAuB,EAExB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC;IAC/B;;OAEG;IACH,KAAK,EAAE,oBAAoB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,OAAO,CAevE,CAAC;AAEJ,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAMlD"}
@@ -0,0 +1,24 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { remap as remap$ } from "../lib/primitives.js";
3
+ import { safeParse } from "../lib/schemas.js";
4
+ import * as types from "../types/primitives.js";
5
+ import { WebhookEndpointState$inboundSchema, } from "./webhook-endpoint-state.js";
6
+ import { WebhookTestRequestEvent$inboundSchema, } from "./webhook-test-request-event.js";
7
+ /** @internal */
8
+ export const WebhookTest$inboundSchema = z
9
+ .pipe(z.object({
10
+ delivery_id: types.string(),
11
+ endpoint_id: types.string(),
12
+ event: WebhookTestRequestEvent$inboundSchema,
13
+ state: WebhookEndpointState$inboundSchema,
14
+ verified: types.optional(types.boolean()),
15
+ }), z.transform((v) => {
16
+ return remap$(v, {
17
+ "delivery_id": "deliveryId",
18
+ "endpoint_id": "endpointId",
19
+ });
20
+ }));
21
+ export function webhookTestFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => WebhookTest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookTest' from JSON`);
23
+ }
24
+ //# sourceMappingURL=webhook-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-test.js","sourceRoot":"","sources":["../../../src/models/webhook-test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAEL,kCAAkC,GACnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,qCAAqC,GACtC,MAAM,iCAAiC,CAAC;AA4BzC,gBAAgB;AAChB,MAAM,CAAC,MAAM,yBAAyB,GAAwC,CAAC;KAC5E,IAAI,CACH,CAAC,CAAC,MAAM,CAAC;IACP,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE;IAC3B,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE;IAC3B,KAAK,EAAE,qCAAqC;IAC5C,KAAK,EAAE,kCAAkC;IACzC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;CAC1C,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,aAAa,EAAE,YAAY;QAC3B,aAAa,EAAE,YAAY;KAC5B,CAAC,CAAC;AAAA,CACJ,CAAC,CACH,CAAC;AAEJ,MAAM,UAAU,mBAAmB,CACjC,UAAkB,EACgC;IAClD,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACrD,yCAAyC,CAC1C,CAAC;AAAA,CACH"}
@@ -2,6 +2,7 @@ import { ClientSDK } from "../lib/sdks.js";
2
2
  import { Assessments } from "./assessments.js";
3
3
  import { Integrations } from "./integrations.js";
4
4
  import { Keys } from "./keys.js";
5
+ import { WebhookEndpoints } from "./webhook-endpoints.js";
5
6
  export declare class NoResponse extends ClientSDK {
6
7
  private _assessments?;
7
8
  get assessments(): Assessments;
@@ -9,5 +10,7 @@ export declare class NoResponse extends ClientSDK {
9
10
  get keys(): Keys;
10
11
  private _integrations?;
11
12
  get integrations(): Integrations;
13
+ private _webhookEndpoints?;
14
+ get webhookEndpoints(): WebhookEndpoints;
12
15
  }
13
16
  //# sourceMappingURL=sdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,qBAAa,UAAW,SAAQ,SAAS;IACvC,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,IAAI,IAAI,IAAI,IAAI,CAEf;IAED,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,IAAI,YAAY,IAAI,YAAY,CAE/B;CACF"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,qBAAa,UAAW,SAAQ,SAAS;IACvC,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,IAAI,IAAI,IAAI,IAAI,CAEf;IAED,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,OAAO,CAAC,iBAAiB,CAAC,CAAmB;IAC7C,IAAI,gBAAgB,IAAI,gBAAgB,CAEvC;CACF"}
@@ -2,6 +2,7 @@ import { ClientSDK } from "../lib/sdks.js";
2
2
  import { Assessments } from "./assessments.js";
3
3
  import { Integrations } from "./integrations.js";
4
4
  import { Keys } from "./keys.js";
5
+ import { WebhookEndpoints } from "./webhook-endpoints.js";
5
6
  export class NoResponse extends ClientSDK {
6
7
  _assessments;
7
8
  get assessments() {
@@ -15,5 +16,9 @@ export class NoResponse extends ClientSDK {
15
16
  get integrations() {
16
17
  return (this._integrations ?? (this._integrations = new Integrations(this._options)));
17
18
  }
19
+ _webhookEndpoints;
20
+ get webhookEndpoints() {
21
+ return (this._webhookEndpoints ?? (this._webhookEndpoints = new WebhookEndpoints(this._options)));
22
+ }
18
23
  }
19
24
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC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CAAC,IAAI,CAAC,KAAK,KAAV,IAAI,CAAC,KAAK,GAAK,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACjD;IAEO,aAAa,CAAgB;IACrC,IAAI,YAAY,GAAiB;QAC/B,OAAO,CAAC,IAAI,CAAC,aAAa,KAAlB,IAAI,CAAC,aAAa,GAAK,IAAI,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACjE;IAEO,iBAAiB,CAAoB;IAC7C,IAAI,gBAAgB,GAAqB;QACvC,OAAO,CAAC,IAAI,CAAC,iBAAiB,KAAtB,IAAI,CAAC,iBAAiB,GAAK,IAAI,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACzE;CACF"}
@@ -0,0 +1,41 @@
1
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as models from "../models/index.js";
3
+ import * as operations from "../models/operations/index.js";
4
+ export declare class WebhookEndpoints extends ClientSDK {
5
+ /**
6
+ * List the tenant's webhook endpoints.
7
+ *
8
+ * @remarks
9
+ * Lists your webhook endpoints in every state, ordered by endpoint_id, with the ids of their signing keys and without secrets. Requires the webhooks scope.
10
+ */
11
+ list(options?: RequestOptions): Promise<operations.ListWebhookEndpointsResponse>;
12
+ /**
13
+ * Register a webhook endpoint.
14
+ *
15
+ * @remarks
16
+ * Registers a webhook endpoint and returns it with its first signing secret, shown only in this answer: store it where your receiver reads it. The URL is https on port 443 or 8443 with a DNS host whose every address is public; it is checked now and on every delivery. The endpoint starts unverified and receives assessment events once it echoes an endpoint.verification challenge, which sendTestEvent sends. You can hold 5 endpoints. Requires the webhooks scope, and response_mode detailed also the detailed scope. Registration is not idempotent: a retry after a lost answer registers a second endpoint, which you can list and delete.
17
+ */
18
+ create(request: models.WebhookEndpointRequest, options?: RequestOptions): Promise<operations.CreateWebhookEndpointResponse>;
19
+ /**
20
+ * Delete a webhook endpoint.
21
+ *
22
+ * @remarks
23
+ * Deletes the endpoint and its signing keys. Deliveries still queued for it are dropped. Requires the webhooks scope. An endpoint that is already gone answers 404.
24
+ */
25
+ delete(request: operations.DeleteWebhookEndpointRequest, options?: RequestOptions): Promise<operations.DeleteWebhookEndpointResponse | undefined>;
26
+ /**
27
+ * Rotate an endpoint's signing key.
28
+ *
29
+ * @remarks
30
+ * Issues a new signing key for the endpoint and returns its secret once. Every delivery from now on is signed with it; the key it replaces keeps verifying for 7 days, so your receiver can hold both while it switches. Requires the webhooks scope. Rotation is not idempotent: a retry after a lost answer issues another key, which replaces the first.
31
+ */
32
+ rotateSigningKey(request: operations.RotateWebhookSigningKeyRequest, options?: RequestOptions): Promise<operations.RotateWebhookSigningKeyResponse>;
33
+ /**
34
+ * Send a test event to an endpoint.
35
+ *
36
+ * @remarks
37
+ * endpoint.verification sends a signed challenge now and answers whether the endpoint echoed it within 5 seconds; an echo verifies the endpoint, including a disabled one. assessment.updated queues one signed event with test: true and a fixed example assessment in the endpoint's response mode, delivered and retried like any other event; the endpoint must be verified. Both use the endpoint's current signing key. Requires the webhooks scope.
38
+ */
39
+ sendTestEvent(request: operations.SendWebhookTestEventRequest, options?: RequestOptions): Promise<operations.SendWebhookTestEventResponse>;
40
+ }
41
+ //# sourceMappingURL=webhook-endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-endpoints.d.ts","sourceRoot":"","sources":["../../../src/sdk/webhook-endpoints.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C;;;;;OAKG;IACG,IAAI,CACR,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAKlD;IAED;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,MAAM,CAAC,sBAAsB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAMnD;IAED;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,GAAG,SAAS,CAAC,CAM/D;IAED;;;;;OAKG;IACG,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAMrD;IAED;;;;;OAKG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAMlD;CACF"}
@@ -0,0 +1,55 @@
1
+ import { webhookEndpointsCreate } from "../funcs/webhook-endpoints-create.js";
2
+ import { webhookEndpointsDelete } from "../funcs/webhook-endpoints-delete.js";
3
+ import { webhookEndpointsList } from "../funcs/webhook-endpoints-list.js";
4
+ import { webhookEndpointsRotateSigningKey } from "../funcs/webhook-endpoints-rotate-signing-key.js";
5
+ import { webhookEndpointsSendTestEvent } from "../funcs/webhook-endpoints-send-test-event.js";
6
+ import { ClientSDK } from "../lib/sdks.js";
7
+ import { unwrapAsync } from "../types/fp.js";
8
+ export class WebhookEndpoints extends ClientSDK {
9
+ /**
10
+ * List the tenant's webhook endpoints.
11
+ *
12
+ * @remarks
13
+ * Lists your webhook endpoints in every state, ordered by endpoint_id, with the ids of their signing keys and without secrets. Requires the webhooks scope.
14
+ */
15
+ async list(options) {
16
+ return unwrapAsync(webhookEndpointsList(this, options));
17
+ }
18
+ /**
19
+ * Register a webhook endpoint.
20
+ *
21
+ * @remarks
22
+ * Registers a webhook endpoint and returns it with its first signing secret, shown only in this answer: store it where your receiver reads it. The URL is https on port 443 or 8443 with a DNS host whose every address is public; it is checked now and on every delivery. The endpoint starts unverified and receives assessment events once it echoes an endpoint.verification challenge, which sendTestEvent sends. You can hold 5 endpoints. Requires the webhooks scope, and response_mode detailed also the detailed scope. Registration is not idempotent: a retry after a lost answer registers a second endpoint, which you can list and delete.
23
+ */
24
+ async create(request, options) {
25
+ return unwrapAsync(webhookEndpointsCreate(this, request, options));
26
+ }
27
+ /**
28
+ * Delete a webhook endpoint.
29
+ *
30
+ * @remarks
31
+ * Deletes the endpoint and its signing keys. Deliveries still queued for it are dropped. Requires the webhooks scope. An endpoint that is already gone answers 404.
32
+ */
33
+ async delete(request, options) {
34
+ return unwrapAsync(webhookEndpointsDelete(this, request, options));
35
+ }
36
+ /**
37
+ * Rotate an endpoint's signing key.
38
+ *
39
+ * @remarks
40
+ * Issues a new signing key for the endpoint and returns its secret once. Every delivery from now on is signed with it; the key it replaces keeps verifying for 7 days, so your receiver can hold both while it switches. Requires the webhooks scope. Rotation is not idempotent: a retry after a lost answer issues another key, which replaces the first.
41
+ */
42
+ async rotateSigningKey(request, options) {
43
+ return unwrapAsync(webhookEndpointsRotateSigningKey(this, request, options));
44
+ }
45
+ /**
46
+ * Send a test event to an endpoint.
47
+ *
48
+ * @remarks
49
+ * endpoint.verification sends a signed challenge now and answers whether the endpoint echoed it within 5 seconds; an echo verifies the endpoint, including a disabled one. assessment.updated queues one signed event with test: true and a fixed example assessment in the endpoint's response mode, delivered and retried like any other event; the endpoint must be verified. Both use the endpoint's current signing key. Requires the webhooks scope.
50
+ */
51
+ async sendTestEvent(request, options) {
52
+ return unwrapAsync(webhookEndpointsSendTestEvent(this, request, options));
53
+ }
54
+ }
55
+ //# sourceMappingURL=webhook-endpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-endpoints.js","sourceRoot":"","sources":["../../../src/sdk/webhook-endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MA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essmentUpdatedEvent = {
27
27
  id: string;
28
28
  type: "assessment.updated";
29
29
  createdAt: string;
30
+ /**
31
+ * True on an event sent by webhookEndpoints.sendTestEvent: data is a fixed
32
+ * example assessment, not one of yours. Acknowledge it and apply nothing.
33
+ */
34
+ test?: true;
30
35
  /** The assessment exactly as assessments.get returns it at this version. */
31
36
  data: Assessment;
32
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/webhooks.ts"],"names":[],"mappings":"AAQA,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAa7C,gIAAgI;AAChI,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACnC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;AAE5D,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC;AAE3E,MAAM,MAAM,qBAAqB,GAAG;IAClC,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,SAAS,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAE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AAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,oBAAoB,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,iBAAiB,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,uBAAuB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,yBAAyB,CAAC;AAEvG,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,GACb,mBAAmB,GACnB,iBAAiB,CAAC;AAEtB,qGAAqG;AACrG,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,YAAY,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAIlD;CACF;AAqDD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,UAAU,GAAG,MAAM,EAC5B,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,GAAE,qBAA0B,GAClC,YAAY,CA8Cd;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAK/E;AAED,qGAAqG;AACrG,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,IAAI,sBAAsB,CAEnF"}
@@ -116,7 +116,7 @@ export function constructEvent(payload, headers, secrets, options = {}) {
116
116
  if (!isRecord(body) || body["id"] !== found.get("nr-webhook-id")) {
117
117
  fail("invalid_payload", "Webhook event id does not match NR-Webhook-Id");
118
118
  }
119
- const { id, type, created_at, data } = body;
119
+ const { id, type, created_at, data, test } = body;
120
120
  if (typeof id !== "string" || !EVENT_ID.test(id) || typeof created_at !== "string" || !validDateTime(created_at) || !isRecord(data)) {
121
121
  fail("invalid_payload", "Webhook event envelope is malformed");
122
122
  }
@@ -135,7 +135,7 @@ export function constructEvent(payload, headers, secrets, options = {}) {
135
135
  const result = z.safeParse(Assessment$inboundSchema, data);
136
136
  if (!result.success)
137
137
  fail("invalid_payload", "Webhook data is not an assessment");
138
- return { id, type, createdAt: created_at, data: result.data };
138
+ return test === true ? { id, type, createdAt: created_at, test: true, data: result.data } : { id, type, createdAt: created_at, data: result.data };
139
139
  }
140
140
  /** The body to answer an endpoint.verification event with, as JSON, status 200. */
141
141
  export function verificationResponse(event) {