@tellescope/sdk 1.256.14 → 1.256.15

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 (283) hide show
  1. package/lib/cjs/tests/api_tests/auto_merge_form_submission.test.js +1 -1
  2. package/lib/cjs/tests/api_tests/auto_merge_form_submission.test.js.map +1 -1
  3. package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.d.ts +5 -0
  4. package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.d.ts.map +1 -0
  5. package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.js +388 -0
  6. package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.js.map +1 -0
  7. package/lib/cjs/tests/api_tests/integrations_redacted.test.js +3 -3
  8. package/lib/cjs/tests/api_tests/integrations_redacted.test.js.map +1 -1
  9. package/lib/cjs/tests/api_tests/organization_signup.test.d.ts +1 -1
  10. package/lib/cjs/tests/api_tests/organization_signup.test.js +1 -1
  11. package/lib/cjs/tests/api_tests/purchase_made_trigger.test.d.ts.map +1 -1
  12. package/lib/cjs/tests/api_tests/purchase_made_trigger.test.js +103 -162
  13. package/lib/cjs/tests/api_tests/purchase_made_trigger.test.js.map +1 -1
  14. package/lib/cjs/tests/api_tests/security/F-0200-form-logic-js-execution.test.d.ts +33 -0
  15. package/lib/cjs/tests/api_tests/security/F-0200-form-logic-js-execution.test.d.ts.map +1 -0
  16. package/lib/cjs/tests/api_tests/security/F-0200-form-logic-js-execution.test.js +249 -0
  17. package/lib/cjs/tests/api_tests/security/F-0200-form-logic-js-execution.test.js.map +1 -0
  18. package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts +42 -0
  19. package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts.map +1 -0
  20. package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js +281 -0
  21. package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js.map +1 -0
  22. package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts +38 -0
  23. package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -0
  24. package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js +390 -0
  25. package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -0
  26. package/lib/cjs/tests/api_tests/security/allowed-paths-confinement.test.d.ts +6 -0
  27. package/lib/cjs/tests/api_tests/security/allowed-paths-confinement.test.d.ts.map +1 -0
  28. package/lib/cjs/tests/api_tests/security/allowed-paths-confinement.test.js +1003 -0
  29. package/lib/cjs/tests/api_tests/security/allowed-paths-confinement.test.js.map +1 -0
  30. package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts +42 -0
  31. package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -0
  32. package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js +323 -0
  33. package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -0
  34. package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +29 -0
  35. package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -0
  36. package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js +335 -0
  37. package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -0
  38. package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +32 -0
  39. package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -0
  40. package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +237 -0
  41. package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -0
  42. package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +28 -0
  43. package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -0
  44. package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js +349 -0
  45. package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -0
  46. package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +30 -0
  47. package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -0
  48. package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +314 -0
  49. package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -0
  50. package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts +21 -0
  51. package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -0
  52. package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js +362 -0
  53. package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js.map +1 -0
  54. package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts +21 -0
  55. package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -0
  56. package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js +366 -0
  57. package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -0
  58. package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.d.ts +32 -0
  59. package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.d.ts.map +1 -0
  60. package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.js +248 -0
  61. package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.js.map +1 -0
  62. package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +19 -0
  63. package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -0
  64. package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js +138 -0
  65. package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -0
  66. package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +24 -0
  67. package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -0
  68. package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +201 -0
  69. package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -0
  70. package/lib/cjs/tests/api_tests/security/invite-user-enumeration.test.d.ts +29 -0
  71. package/lib/cjs/tests/api_tests/security/invite-user-enumeration.test.d.ts.map +1 -0
  72. package/lib/cjs/tests/api_tests/security/invite-user-enumeration.test.js +278 -0
  73. package/lib/cjs/tests/api_tests/security/invite-user-enumeration.test.js.map +1 -0
  74. package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts +17 -0
  75. package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -0
  76. package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js +155 -0
  77. package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -0
  78. package/lib/cjs/tests/api_tests/security/prototype-pollution.test.d.ts +2 -0
  79. package/lib/cjs/tests/api_tests/security/prototype-pollution.test.d.ts.map +1 -0
  80. package/lib/cjs/tests/api_tests/security/prototype-pollution.test.js +88 -0
  81. package/lib/cjs/tests/api_tests/security/prototype-pollution.test.js.map +1 -0
  82. package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +34 -0
  83. package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -0
  84. package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +230 -0
  85. package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -0
  86. package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts +2 -0
  87. package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -0
  88. package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +242 -0
  89. package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -0
  90. package/lib/cjs/tests/api_tests/security/sanitize-user-html.test.d.ts +2 -0
  91. package/lib/cjs/tests/api_tests/security/sanitize-user-html.test.d.ts.map +1 -0
  92. package/lib/cjs/tests/api_tests/security/sanitize-user-html.test.js +148 -0
  93. package/lib/cjs/tests/api_tests/security/sanitize-user-html.test.js.map +1 -0
  94. package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +45 -0
  95. package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -0
  96. package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js +388 -0
  97. package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -0
  98. package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts +38 -0
  99. package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -0
  100. package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js +222 -0
  101. package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -0
  102. package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -0
  103. package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -0
  104. package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +354 -0
  105. package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -0
  106. package/lib/cjs/tests/api_tests/security/webhook-outbound-ssrf.test.d.ts +28 -0
  107. package/lib/cjs/tests/api_tests/security/webhook-outbound-ssrf.test.d.ts.map +1 -0
  108. package/lib/cjs/tests/api_tests/security/webhook-outbound-ssrf.test.js +442 -0
  109. package/lib/cjs/tests/api_tests/security/webhook-outbound-ssrf.test.js.map +1 -0
  110. package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts +19 -0
  111. package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -0
  112. package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js +156 -0
  113. package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js.map +1 -0
  114. package/lib/cjs/tests/api_tests/webhook_error_handling.test.js +2 -2
  115. package/lib/cjs/tests/api_tests/webhook_error_handling.test.js.map +1 -1
  116. package/lib/cjs/tests/tests.d.ts.map +1 -1
  117. package/lib/cjs/tests/tests.js +58 -46
  118. package/lib/cjs/tests/tests.js.map +1 -1
  119. package/lib/cjs/tests/unit_tests/openapi_spec_freshness.test.d.ts +1 -1
  120. package/lib/cjs/tests/unit_tests/openapi_spec_freshness.test.js +1 -1
  121. package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -0
  122. package/lib/esm/enduser.d.ts +0 -1
  123. package/lib/esm/enduser.d.ts.map +1 -1
  124. package/lib/esm/sdk.d.ts +2 -3
  125. package/lib/esm/sdk.d.ts.map +1 -1
  126. package/lib/esm/session.d.ts +0 -1
  127. package/lib/esm/session.d.ts.map +1 -1
  128. package/lib/esm/tests/api_tests/auto_merge_form_submission.test.js +1 -1
  129. package/lib/esm/tests/api_tests/auto_merge_form_submission.test.js.map +1 -1
  130. package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.d.ts +5 -0
  131. package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.d.ts.map +1 -0
  132. package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.js +383 -0
  133. package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.js.map +1 -0
  134. package/lib/esm/tests/api_tests/integrations_redacted.test.js +3 -3
  135. package/lib/esm/tests/api_tests/integrations_redacted.test.js.map +1 -1
  136. package/lib/esm/tests/api_tests/organization_signup.test.d.ts +1 -1
  137. package/lib/esm/tests/api_tests/organization_signup.test.js +1 -1
  138. package/lib/esm/tests/api_tests/purchase_made_trigger.test.d.ts.map +1 -1
  139. package/lib/esm/tests/api_tests/purchase_made_trigger.test.js +104 -163
  140. package/lib/esm/tests/api_tests/purchase_made_trigger.test.js.map +1 -1
  141. package/lib/esm/tests/api_tests/security/F-0200-form-logic-js-execution.test.d.ts +33 -0
  142. package/lib/esm/tests/api_tests/security/F-0200-form-logic-js-execution.test.d.ts.map +1 -0
  143. package/lib/esm/tests/api_tests/security/F-0200-form-logic-js-execution.test.js +244 -0
  144. package/lib/esm/tests/api_tests/security/F-0200-form-logic-js-execution.test.js.map +1 -0
  145. package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts +42 -0
  146. package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts.map +1 -0
  147. package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js +276 -0
  148. package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js.map +1 -0
  149. package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts +38 -0
  150. package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -0
  151. package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js +386 -0
  152. package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -0
  153. package/lib/esm/tests/api_tests/security/allowed-paths-confinement.test.d.ts +6 -0
  154. package/lib/esm/tests/api_tests/security/allowed-paths-confinement.test.d.ts.map +1 -0
  155. package/lib/esm/tests/api_tests/security/allowed-paths-confinement.test.js +996 -0
  156. package/lib/esm/tests/api_tests/security/allowed-paths-confinement.test.js.map +1 -0
  157. package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts +42 -0
  158. package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -0
  159. package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js +316 -0
  160. package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -0
  161. package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +29 -0
  162. package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -0
  163. package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js +331 -0
  164. package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -0
  165. package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +32 -0
  166. package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -0
  167. package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +233 -0
  168. package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -0
  169. package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +28 -0
  170. package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -0
  171. package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js +345 -0
  172. package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -0
  173. package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +30 -0
  174. package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -0
  175. package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +310 -0
  176. package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -0
  177. package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts +21 -0
  178. package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -0
  179. package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js +358 -0
  180. package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js.map +1 -0
  181. package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts +21 -0
  182. package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -0
  183. package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js +362 -0
  184. package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -0
  185. package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.d.ts +32 -0
  186. package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.d.ts.map +1 -0
  187. package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.js +243 -0
  188. package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.js.map +1 -0
  189. package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +19 -0
  190. package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -0
  191. package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js +134 -0
  192. package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -0
  193. package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +24 -0
  194. package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -0
  195. package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +194 -0
  196. package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -0
  197. package/lib/esm/tests/api_tests/security/invite-user-enumeration.test.d.ts +29 -0
  198. package/lib/esm/tests/api_tests/security/invite-user-enumeration.test.d.ts.map +1 -0
  199. package/lib/esm/tests/api_tests/security/invite-user-enumeration.test.js +271 -0
  200. package/lib/esm/tests/api_tests/security/invite-user-enumeration.test.js.map +1 -0
  201. package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts +17 -0
  202. package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -0
  203. package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js +151 -0
  204. package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -0
  205. package/lib/esm/tests/api_tests/security/prototype-pollution.test.d.ts +2 -0
  206. package/lib/esm/tests/api_tests/security/prototype-pollution.test.d.ts.map +1 -0
  207. package/lib/esm/tests/api_tests/security/prototype-pollution.test.js +84 -0
  208. package/lib/esm/tests/api_tests/security/prototype-pollution.test.js.map +1 -0
  209. package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +34 -0
  210. package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -0
  211. package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +223 -0
  212. package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -0
  213. package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts +2 -0
  214. package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -0
  215. package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +238 -0
  216. package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -0
  217. package/lib/esm/tests/api_tests/security/sanitize-user-html.test.d.ts +2 -0
  218. package/lib/esm/tests/api_tests/security/sanitize-user-html.test.d.ts.map +1 -0
  219. package/lib/esm/tests/api_tests/security/sanitize-user-html.test.js +144 -0
  220. package/lib/esm/tests/api_tests/security/sanitize-user-html.test.js.map +1 -0
  221. package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +45 -0
  222. package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -0
  223. package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js +381 -0
  224. package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -0
  225. package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts +38 -0
  226. package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -0
  227. package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js +218 -0
  228. package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -0
  229. package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -0
  230. package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -0
  231. package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +350 -0
  232. package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -0
  233. package/lib/esm/tests/api_tests/security/webhook-outbound-ssrf.test.d.ts +28 -0
  234. package/lib/esm/tests/api_tests/security/webhook-outbound-ssrf.test.d.ts.map +1 -0
  235. package/lib/esm/tests/api_tests/security/webhook-outbound-ssrf.test.js +435 -0
  236. package/lib/esm/tests/api_tests/security/webhook-outbound-ssrf.test.js.map +1 -0
  237. package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts +19 -0
  238. package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -0
  239. package/lib/esm/tests/api_tests/security/webhook-timeout.test.js +149 -0
  240. package/lib/esm/tests/api_tests/security/webhook-timeout.test.js.map +1 -0
  241. package/lib/esm/tests/api_tests/webhook_error_handling.test.js +2 -2
  242. package/lib/esm/tests/api_tests/webhook_error_handling.test.js.map +1 -1
  243. package/lib/esm/tests/tests.d.ts.map +1 -1
  244. package/lib/esm/tests/tests.js +36 -24
  245. package/lib/esm/tests/tests.js.map +1 -1
  246. package/lib/esm/tests/unit_tests/openapi_spec_freshness.test.d.ts +1 -1
  247. package/lib/esm/tests/unit_tests/openapi_spec_freshness.test.js +1 -1
  248. package/lib/tsconfig.tsbuildinfo +1 -1
  249. package/package.json +10 -10
  250. package/src/tests/api_tests/auto_merge_form_submission.test.ts +1 -1
  251. package/src/tests/api_tests/enduser_observations_auto_review.test.ts +358 -0
  252. package/src/tests/api_tests/integrations_redacted.test.ts +1 -1
  253. package/src/tests/api_tests/organization_signup.test.ts +2 -2
  254. package/src/tests/api_tests/purchase_made_trigger.test.ts +29 -41
  255. package/src/tests/api_tests/security/{F-0196-add-to-journey-foreign-enduserid.test.ts → add-to-journey-foreign-enduserid.test.ts} +6 -7
  256. package/src/tests/api_tests/security/{F-0005-ai-conversations-rbac.test.ts → ai-conversations-rbac.test.ts} +14 -14
  257. package/src/tests/api_tests/security/{F-0166-allowed-paths-wildcard-bypass.test.ts → allowed-paths-confinement.test.ts} +11 -11
  258. package/src/tests/api_tests/security/{F-0192-automated-actions-process-gate.test.ts → automated-actions-process-gate.test.ts} +6 -7
  259. package/src/tests/api_tests/security/{F-0179-booking-info-idor-token-mint.test.ts → booking-info-idor-token-mint.test.ts} +5 -6
  260. package/src/tests/api_tests/security/{F-0053-cascade-role-rename-cross-tenant.test.ts → cascade-role-rename-cross-tenant.test.ts} +10 -10
  261. package/src/tests/api_tests/security/{F-0001-data-sync-redaction-bypass.test.ts → data-sync-redaction-bypass.test.ts} +9 -9
  262. package/src/tests/api_tests/security/{F-0006-develop-health-benefit-verification-rbac.test.ts → develop-health-benefit-verification-rbac.test.ts} +7 -8
  263. package/src/tests/api_tests/security/{F-0116-F-0119-enduser-cross-create.test.ts → enduser-cross-create.test.ts} +25 -25
  264. package/src/tests/api_tests/security/{F-0106-F-0110-enduser-write-restrictions.test.ts → enduser-write-restrictions.test.ts} +12 -14
  265. package/src/tests/api_tests/security/form-logic-js-execution.test.ts +183 -0
  266. package/src/tests/api_tests/security/{F-0145-globalunique-leak.test.ts → globalunique-conflict-redaction.test.ts} +5 -6
  267. package/src/tests/api_tests/security/{F-0008-handle-incoming-communication-cross-tenant.test.ts → handle-incoming-communication-cross-tenant.test.ts} +8 -8
  268. package/src/tests/api_tests/security/{F-0007-invite-user-enumeration.test.ts → invite-user-enumeration.test.ts} +8 -8
  269. package/src/tests/api_tests/security/{F-0151-load-inbox-redaction.test.ts → load-inbox-redaction.test.ts} +5 -6
  270. package/src/tests/api_tests/security/{F-0016-prototype-pollution.test.ts → prototype-pollution.test.ts} +4 -4
  271. package/src/tests/api_tests/security/{F-0025-proxy-image-unauth-ssrf.test.ts → proxy-image-unauth-ssrf.test.ts} +11 -12
  272. package/src/tests/api_tests/security/{F-0013-sanitize-user-html-with-iframes.test.ts → sanitize-user-html-with-iframes.test.ts} +5 -5
  273. package/src/tests/api_tests/security/{F-0013-sanitize-user-html.test.ts → sanitize-user-html.test.ts} +4 -4
  274. package/src/tests/api_tests/security/{F-0191-schema-adminonly-enforcement.test.ts → schema-adminonly-enforcement.test.ts} +6 -7
  275. package/src/tests/api_tests/security/{F-0076-self-admin-role-assignment.test.ts → self-admin-role-assignment.test.ts} +13 -13
  276. package/src/tests/api_tests/security/{F-0185-startlinktoken-enduser-staff-escalation.test.ts → startlinktoken-enduser-staff-escalation.test.ts} +6 -6
  277. package/src/tests/api_tests/security/{F-0015-webhook-outbound-ssrf.test.ts → webhook-outbound-ssrf.test.ts} +13 -14
  278. package/src/tests/api_tests/security/{F-0155-webhook-timeout.test.ts → webhook-timeout.test.ts} +6 -7
  279. package/src/tests/api_tests/webhook_error_handling.test.ts +1 -1
  280. package/src/tests/tests.ts +41 -24
  281. package/src/tests/unit_tests/openapi_spec_freshness.test.ts +1 -1
  282. package/test_generated.pdf +0 -0
  283. package/src/tests/api_tests/security/readonly-enduser-preview.test.ts +0 -301
@@ -11,10 +11,10 @@ import { setup_tests } from "../../setup"
11
11
  const host = process.env.API_URL || 'http://localhost:8080' as const
12
12
 
13
13
  /**
14
- * Self-role privilege-escalation guard (relates to security-audit finding F-0076, which was
14
+ * Self-role privilege-escalation guard (relates to a prior internal review, which was
15
15
  * investigated and closed as a FALSE POSITIVE — see that file for the full code trace).
16
16
  *
17
- * F-0076 hypothesized that a non-admin staff user could `PATCH /v1/users/{their-own-id}` with
17
+ * An earlier review hypothesized that a non-admin staff user could `PATCH /v1/users/{their-own-id}` with
18
18
  * `{ roles: ['Admin'] }` and self-promote to Admin, because the FIRST `users` relationship
19
19
  * constraint ("Only admin users can set the admin role",
20
20
  * [schema.ts:3446](packages/public/schema/src/schema.ts#L3446)) has a self-exception
@@ -43,7 +43,7 @@ const host = process.env.API_URL || 'http://localhost:8080' as const
43
43
  * path role-writable by non-admins would flip the step-3/step-4 assertions to red.
44
44
  */
45
45
  export const self_admin_role_assignment_tests = async ({ sdk } : { sdk: Session, sdkNonAdmin: Session }) => {
46
- log_header("F-0076: self-admin role assignment privilege-escalation regression")
46
+ log_header("self-admin role assignment privilege-escalation regression")
47
47
 
48
48
  const stamp = Date.now()
49
49
  const NON_ADMIN_ROLE = 'Provider'
@@ -84,7 +84,7 @@ export const self_admin_role_assignment_tests = async ({ sdk } : { sdk: Session,
84
84
  assert(
85
85
  JSON.stringify(attackerBefore.roles) === JSON.stringify([NON_ADMIN_ROLE]),
86
86
  `Setup failed: expected attacker to hold [${NON_ADMIN_ROLE}], got ${JSON.stringify(attackerBefore.roles)}`,
87
- 'F-0076 setup: attacker holds a non-admin role',
87
+ 'setup: attacker holds a non-admin role',
88
88
  )
89
89
 
90
90
  // 2. Authenticate AS the attacker (no password needed — admin mints an auth token).
@@ -96,25 +96,25 @@ export const self_admin_role_assignment_tests = async ({ sdk } : { sdk: Session,
96
96
  assert(
97
97
  sdkAttacker.userInfo.id === attackerId && !(sdkAttacker.userInfo.roles ?? []).includes('Admin'),
98
98
  `Setup failed: attacker session is not the expected non-admin user`,
99
- 'F-0076 setup: authenticated as the non-admin attacker',
99
+ 'setup: authenticated as the non-admin attacker',
100
100
  )
101
101
 
102
102
  // 3. SECURITY ASSERTIONS — every self-role mutation by the non-admin must be blocked.
103
103
  await expect_blocked(
104
104
  () => sdkAttacker.api.users.updateOne(attackerId!, { roles: ['Admin'] }, { replaceObjectFields: true }),
105
- 'F-0076: non-admin self-update to [Admin] is blocked',
105
+ 'non-admin self-update to [Admin] is blocked',
106
106
  )
107
107
  await expect_blocked(
108
108
  () => sdkAttacker.api.users.updateOne(attackerId!, { roles: [NON_ADMIN_ROLE, 'Admin'] }, { replaceObjectFields: true }),
109
- 'F-0076: non-admin self-update to [Provider, Admin] is blocked',
109
+ 'non-admin self-update to [Provider, Admin] is blocked',
110
110
  )
111
111
  await expect_blocked(
112
112
  () => sdkAttacker.api.users.updateOne(attackerId!, { roles: [`Arbitrary_${stamp}`] }, { replaceObjectFields: true }),
113
- 'F-0076: non-admin self-update to an arbitrary role is blocked',
113
+ 'non-admin self-update to an arbitrary role is blocked',
114
114
  )
115
115
  await expect_blocked(
116
116
  () => sdkAttacker.api.users.updateOne(attackerId!, { roles: [] }, { replaceObjectFields: true }),
117
- 'F-0076: non-admin self-update to [] (would grant defaults) is blocked',
117
+ 'non-admin self-update to [] (would grant defaults) is blocked',
118
118
  )
119
119
 
120
120
  // 4. STATE ASSERTION — nothing slipped through; roles are still the original non-admin role.
@@ -123,7 +123,7 @@ export const self_admin_role_assignment_tests = async ({ sdk } : { sdk: Session,
123
123
  JSON.stringify(attackerAfter.roles) === JSON.stringify([NON_ADMIN_ROLE]),
124
124
  `ESCALATION LEAK: attacker roles changed to ${JSON.stringify(attackerAfter.roles)} `
125
125
  + `after self-update attempts. Expected [${NON_ADMIN_ROLE}].`,
126
- 'F-0076: attacker roles unchanged after all self-escalation attempts',
126
+ 'attacker roles unchanged after all self-escalation attempts',
127
127
  )
128
128
 
129
129
  // 5. POSITIVE CONTROL — an Admin CAN update the user's roles (mechanism is not over-restricted).
@@ -132,7 +132,7 @@ export const self_admin_role_assignment_tests = async ({ sdk } : { sdk: Session,
132
132
  assert(
133
133
  JSON.stringify(afterAdminUpdate.roles) === JSON.stringify([NON_ADMIN_ROLE]),
134
134
  `Admin role update failed: roles are ${JSON.stringify(afterAdminUpdate.roles)}, expected [${NON_ADMIN_ROLE}]`,
135
- 'F-0076: admin can manage user roles (positive control)',
135
+ 'admin can manage user roles (positive control)',
136
136
  )
137
137
  } finally {
138
138
  // Cleanup: delete the throwaway attacker. Never touches pre-existing users.
@@ -155,11 +155,11 @@ if (require.main === module) {
155
155
 
156
156
  runTests()
157
157
  .then(() => {
158
- console.log("✅ F-0076 self-admin role assignment test suite completed successfully")
158
+ console.log("✅ self-admin role assignment test suite completed successfully")
159
159
  process.exit(0)
160
160
  })
161
161
  .catch((error) => {
162
- console.error("❌ F-0076 self-admin role assignment test suite failed:", error)
162
+ console.error("❌ self-admin role assignment test suite failed:", error)
163
163
  process.exit(1)
164
164
  })
165
165
  }
@@ -8,7 +8,7 @@ import { PROVIDER_PERMISSIONS } from "@tellescope/constants"
8
8
  const host = process.env.API_URL || 'http://localhost:8080' as const
9
9
 
10
10
  /**
11
- * Regression test for F-0185 — `calendar_events.startLinkToken` privilege escalation.
11
+ * Regression test — `calendar_events.startLinkToken` privilege escalation.
12
12
  *
13
13
  * startLinkToken is a DOCUMENTED feature ("Video Call Start Links"): a tenant's staff / API-key
14
14
  * integration PATCHes a CalendarEvent to set a random token, then sends the host user the
@@ -40,7 +40,7 @@ const host = process.env.API_URL || 'http://localhost:8080' as const
40
40
  const RAND = () => Math.random().toString(36).slice(2, 10)
41
41
 
42
42
  export const startlinktoken_escalation_tests = async ({ sdk } : { sdk: Session, sdkNonAdmin: Session }) => {
43
- log_header("F-0185: startLinkToken enduser-writable / readable → staff session escalation")
43
+ log_header("startLinkToken enduser-writable / readable → staff session escalation")
44
44
 
45
45
  const businessId = sdk.userInfo.businessId
46
46
  const userIds: string[] = []
@@ -66,7 +66,7 @@ export const startlinktoken_escalation_tests = async ({ sdk } : { sdk: Session,
66
66
  enduserIds.push(patient.id)
67
67
 
68
68
  const event = await sdk.api.calendar_events.createOne({
69
- title: 'F-0185 appointment', durationInMinutes: 30, startTimeInMS: Date.now() + 3600_000,
69
+ title: 'appointment', durationInMinutes: 30, startTimeInMS: Date.now() + 3600_000,
70
70
  attendees: [{ type: 'user', id: host_user.id }, { type: 'enduser', id: patient.id }],
71
71
  } as any)
72
72
  eventIds.push(event.id)
@@ -140,7 +140,7 @@ export const startlinktoken_escalation_tests = async ({ sdk } : { sdk: Session,
140
140
  }
141
141
 
142
142
  // Report the full table before asserting (the harness exits on the first failed assert).
143
- console.log('\n F-0185 check summary:')
143
+ console.log('\n check summary:')
144
144
  for (const c of checks) console.log(` ${c.pass ? 'PASS' : 'FAIL'} ${c.label} — ${c.detail}`)
145
145
  console.log('')
146
146
  for (const c of checks) assert(c.pass, `${c.label} — ${c.detail}`, c.label)
@@ -157,6 +157,6 @@ if (require.main === module) {
157
157
  const sdkNonAdmin = new Session({ host })
158
158
  setup_tests(sdk, sdkNonAdmin)
159
159
  .then(() => startlinktoken_escalation_tests({ sdk, sdkNonAdmin }))
160
- .then(() => { console.log("✅ F-0185 startLinkToken escalation test suite completed successfully"); process.exit(0) })
161
- .catch((error) => { console.error("❌ F-0185 startLinkToken escalation test suite failed:", error); process.exit(1) })
160
+ .then(() => { console.log("✅ startLinkToken escalation test suite completed successfully"); process.exit(0) })
161
+ .catch((error) => { console.error("❌ startLinkToken escalation test suite failed:", error); process.exit(1) })
162
162
  }
@@ -51,7 +51,7 @@ const assert_local_api = () => {
51
51
  const hostname = new URL(host).hostname
52
52
  if (!LOCAL_HOSTNAMES.includes(hostname)) {
53
53
  throw new Error(
54
- `F-0015 SSRF tests must run against a local API (got ${host}). `
54
+ `SSRF tests must run against a local API (got ${host}). `
55
55
  + `127.0.0.1 would resolve to the API server rather than this machine, and this test configures a webhook.`
56
56
  )
57
57
  }
@@ -76,8 +76,7 @@ const wait_until = async (predicate: () => boolean, ms: number) => {
76
76
  }
77
77
 
78
78
  /**
79
- * Regression tests for F-0015
80
- * (security-audit/findings/F-0015-webhook-outbound-ssrf.md).
79
+ * Regression tests: outbound webhook delivery must refuse internal destinations.
81
80
  *
82
81
  * Outbound webhooks request customer-configured URLs that are validated only for SYNTAX
83
82
  * (urlValidator -> validator.isURL, which happily accepts http://10.0.0.1/). Four call sites are
@@ -99,7 +98,7 @@ const wait_until = async (predicate: () => boolean, ms: number) => {
99
98
  * subscription. So each is paired with a positive control that proves the attempt really was made.
100
99
  */
101
100
  export const webhook_outbound_ssrf_tests = async ({ sdk } : { sdk: Session, sdkNonAdmin: Session }) => {
102
- log_header("F-0015: outbound webhook SSRF")
101
+ log_header("outbound webhook SSRF")
103
102
  assert_local_api()
104
103
 
105
104
  const SENTINEL = `f0015-sentinel-${Date.now()}-${Math.random().toString(36).slice(2)}`
@@ -110,9 +109,9 @@ export const webhook_outbound_ssrf_tests = async ({ sdk } : { sdk: Session, sdkN
110
109
  // guard refuses in every environment, and loopback does not qualify (see the note above).
111
110
  assert(
112
111
  false,
113
- 'F-0015 SKIPPED: no non-loopback RFC1918 interface on this host, so the SSRF sentinel cannot be '
112
+ 'SKIPPED: no non-loopback RFC1918 interface on this host, so the SSRF sentinel cannot be '
114
113
  + 'bound anywhere the guard refuses. Run on a host with a private network interface.',
115
- 'F-0015 outbound SSRF',
114
+ 'outbound SSRF',
116
115
  )
117
116
  return
118
117
  }
@@ -179,21 +178,21 @@ export const webhook_outbound_ssrf_tests = async ({ sdk } : { sdk: Session, sdkN
179
178
  // webhook, every "sentinel not contacted" assertion below is meaningless.
180
179
  // ---------------------------------------------------------------------------------------------
181
180
  await async_test(
182
- 'F-0015: automation webhook to a permitted target still delivers (regression baseline)',
181
+ 'automation webhook to a permitted target still delivers (regression baseline)',
183
182
  () => send_automation_webhook_to(okURL),
184
183
  { onResult: (r: any) => r.okHits === 1 && r.sentinelHits === 0 },
185
184
  )
186
185
 
187
186
  // T3 — direct non-allowlisted private destination.
188
187
  await async_test(
189
- 'F-0015: automation webhook does not reach a private destination',
188
+ 'automation webhook does not reach a private destination',
190
189
  () => send_automation_webhook_to(sentinelURL),
191
190
  { onResult: (r: any) => r.sentinelHits === 0 },
192
191
  )
193
192
 
194
193
  // T4 — the redirect bypass. THE test that justifies a connect-time guard over a pre-flight check.
195
194
  await async_test(
196
- 'F-0015: automation webhook does not follow a redirect from a permitted host into a private one',
195
+ 'automation webhook does not follow a redirect from a permitted host into a private one',
197
196
  () => send_automation_webhook_to(redirectURL),
198
197
  {
199
198
  // redirectHits === 1 is the positive control: hop 1 was allowlisted and really was reached, so
@@ -212,7 +211,7 @@ export const webhook_outbound_ssrf_tests = async ({ sdk } : { sdk: Session, sdkN
212
211
  templateEnduserId = templateEnduser.id
213
212
 
214
213
  await async_test(
215
- 'F-0015: automation webhook validates the URL after template interpolation, not before',
214
+ 'automation webhook validates the URL after template interpolation, not before',
216
215
  () => send_automation_webhook_to('http://{{enduser.ssrfTarget}}/ssrf-sentinel', templateEnduser.id),
217
216
  { onResult: (r: any) => r.sentinelHits === 0 },
218
217
  )
@@ -229,7 +228,7 @@ export const webhook_outbound_ssrf_tests = async ({ sdk } : { sdk: Session, sdkN
229
228
  configuredWebhook = true
230
229
 
231
230
  await async_test(
232
- 'F-0015: configured webhook to a permitted target still delivers (positive control)',
231
+ 'configured webhook to a permitted target still delivers (positive control)',
233
232
  async () => {
234
233
  sentinelHits = 0; okHits = 0
235
234
  const e = await sdk.api.endusers.createOne({ email: `f0015-ok-${Date.now()}@example.com` })
@@ -244,7 +243,7 @@ export const webhook_outbound_ssrf_tests = async ({ sdk } : { sdk: Session, sdkN
244
243
  await sdk.api.webhooks.update({ url: sentinelURL })
245
244
 
246
245
  await async_test(
247
- 'F-0015: configured webhook does not deliver to a private destination',
246
+ 'configured webhook does not deliver to a private destination',
248
247
  async () => {
249
248
  sentinelHits = 0; okHits = 0
250
249
  const e = await sdk.api.endusers.createOne({ email: `f0015-blocked-${Date.now()}@example.com` })
@@ -282,11 +281,11 @@ if (require.main === module) {
282
281
 
283
282
  runTests()
284
283
  .then(() => {
285
- console.log("✅ F-0015 outbound webhook SSRF test suite completed successfully")
284
+ console.log("✅ outbound webhook SSRF test suite completed successfully")
286
285
  process.exit(0)
287
286
  })
288
287
  .catch((error) => {
289
- console.error("❌ F-0015 outbound webhook SSRF test suite failed:", error)
288
+ console.error("❌ outbound webhook SSRF test suite failed:", error)
290
289
  process.exit(1)
291
290
  })
292
291
  }
@@ -10,12 +10,11 @@ import { setup_tests } from "../../setup"
10
10
 
11
11
  const host = process.env.API_URL || 'http://localhost:8080' as const
12
12
 
13
- // The server-side axios timeout is 15s (F-0155 fix). We bound our own wait above that.
13
+ // The server-side axios timeout is 15s (the fix under test). We bound our own wait above that.
14
14
  const CLIENT_WAIT_MS = 20_000
15
15
 
16
16
  /**
17
- * Regression test for F-0155
18
- * (security-audit/findings/F-0155-outbound-webhook-no-timeout-slow-loris.md).
17
+ * Regression test: outbound webhook delivery must time out rather than hang.
19
18
  *
20
19
  * Outbound webhook delivery used axios.post(url, ...) with no `timeout` (axios default = infinite).
21
20
  * A tenant-controlled receiver that accepts the connection and never responds hangs the awaited
@@ -28,7 +27,7 @@ const CLIENT_WAIT_MS = 20_000
28
27
  * - red (unfixed): the call is still pending at 20s → client timer wins
29
28
  */
30
29
  export const webhook_timeout_tests = async ({ sdk } : { sdk: Session, sdkNonAdmin: Session }) => {
31
- log_header("F-0155: outbound webhook timeout")
30
+ log_header("outbound webhook timeout")
32
31
 
33
32
  let enduserId: string | undefined
34
33
  const slowServer = http.createServer(() => { /* accept connection, never respond */ })
@@ -42,7 +41,7 @@ export const webhook_timeout_tests = async ({ sdk } : { sdk: Session, sdkNonAdmi
42
41
  enduserId = enduser.id
43
42
 
44
43
  await async_test(
45
- 'F-0155: outbound webhook to a non-responding receiver times out server-side (does not hang)',
44
+ 'outbound webhook to a non-responding receiver times out server-side (does not hang)',
46
45
  async () => {
47
46
  const start = Date.now()
48
47
  const outcome = await Promise.race([
@@ -75,11 +74,11 @@ if (require.main === module) {
75
74
 
76
75
  runTests()
77
76
  .then(() => {
78
- console.log("✅ F-0155 webhook timeout test suite completed successfully")
77
+ console.log("✅ webhook timeout test suite completed successfully")
79
78
  process.exit(0)
80
79
  })
81
80
  .catch((error) => {
82
- console.error("❌ F-0155 webhook timeout test suite failed:", error)
81
+ console.error("❌ webhook timeout test suite failed:", error)
83
82
  process.exit(1)
84
83
  })
85
84
  }
@@ -133,7 +133,7 @@ export const webhook_error_handling_tests = async ({ sdk, sdkNonAdmin } : { sdk:
133
133
 
134
134
  // Scenario 3 (timeout): skipped — WEBHOOK_TIMEOUT_MS is a constant (15s), not env-overridable,
135
135
  // and a 15s+ non-responding receiver would make this suite unacceptably slow.
136
- // Covered by security/F-0155-webhook-timeout.test.ts via send_automation_webhook.
136
+ // Covered by security/webhook-timeout.test.ts via send_automation_webhook.
137
137
 
138
138
  // Scenario 4: success path unchanged — 200 logged, counter untouched
139
139
  await sdk.api.webhooks.update({ url: `${receiverBase}/success` })
@@ -112,33 +112,34 @@ import { nutrition_tracking_tests } from "./api_tests/nutrition_tracking.test";
112
112
  import { no_access_permission_checks_tests } from "./api_tests/no_access_permission_checks.test";
113
113
  import { resource_access_tags_tests } from "./api_tests/resource_access_tags.test";
114
114
  import { field_redaction_tests } from "./api_tests/field_redaction.test";
115
- import { data_sync_redaction_bypass_tests } from "./api_tests/security/F-0001-data-sync-redaction-bypass.test";
116
- import { enduser_write_restrictions_tests } from "./api_tests/security/F-0106-F-0110-enduser-write-restrictions.test";
117
- import { ai_conversations_rbac_tests } from "./api_tests/security/F-0005-ai-conversations-rbac.test";
118
- import { develop_health_benefit_verification_rbac_tests } from "./api_tests/security/F-0006-develop-health-benefit-verification-rbac.test";
119
- import { cascade_role_rename_cross_tenant_tests } from "./api_tests/security/F-0053-cascade-role-rename-cross-tenant.test";
120
- import { self_admin_role_assignment_tests } from "./api_tests/security/F-0076-self-admin-role-assignment.test";
121
- import { invite_user_enumeration_tests } from "./api_tests/security/F-0007-invite-user-enumeration.test";
115
+ import { data_sync_redaction_bypass_tests } from "./api_tests/security/data-sync-redaction-bypass.test";
116
+ import { enduser_write_restrictions_tests } from "./api_tests/security/enduser-write-restrictions.test";
117
+ import { ai_conversations_rbac_tests } from "./api_tests/security/ai-conversations-rbac.test";
118
+ import { develop_health_benefit_verification_rbac_tests } from "./api_tests/security/develop-health-benefit-verification-rbac.test";
119
+ import { cascade_role_rename_cross_tenant_tests } from "./api_tests/security/cascade-role-rename-cross-tenant.test";
120
+ import { self_admin_role_assignment_tests } from "./api_tests/security/self-admin-role-assignment.test";
121
+ import { invite_user_enumeration_tests } from "./api_tests/security/invite-user-enumeration.test";
122
122
  import { register_business_id_injection_tests } from "./api_tests/security/register_business_id_injection.test";
123
- import { handle_incoming_communication_cross_tenant_tests } from "./api_tests/security/F-0008-handle-incoming-communication-cross-tenant.test";
124
- import { sanitize_user_html_xss_tests } from "./api_tests/security/F-0013-sanitize-user-html.test";
125
- import { sanitize_user_html_with_iframes_tests } from "./api_tests/security/F-0013-sanitize-user-html-with-iframes.test";
126
- import { prototype_pollution_tests } from "./api_tests/security/F-0016-prototype-pollution.test";
127
- import { enduser_cross_create_tests } from "./api_tests/security/F-0116-F-0119-enduser-cross-create.test";
128
- import { globalunique_leak_tests } from "./api_tests/security/F-0145-globalunique-leak.test";
129
- import { load_inbox_redaction_tests } from "./api_tests/security/F-0151-load-inbox-redaction.test";
123
+ import { handle_incoming_communication_cross_tenant_tests } from "./api_tests/security/handle-incoming-communication-cross-tenant.test";
124
+ import { sanitize_user_html_xss_tests } from "./api_tests/security/sanitize-user-html.test";
125
+ import { sanitize_user_html_with_iframes_tests } from "./api_tests/security/sanitize-user-html-with-iframes.test";
126
+ import { prototype_pollution_tests } from "./api_tests/security/prototype-pollution.test";
127
+ import { enduser_cross_create_tests } from "./api_tests/security/enduser-cross-create.test";
128
+ import { globalunique_leak_tests } from "./api_tests/security/globalunique-conflict-redaction.test";
129
+ import { load_inbox_redaction_tests } from "./api_tests/security/load-inbox-redaction.test";
130
130
  import { suggested_reply_redaction_tests } from "./api_tests/security/suggested-reply-redaction.test";
131
- import { webhook_timeout_tests } from "./api_tests/security/F-0155-webhook-timeout.test";
131
+ import { webhook_timeout_tests } from "./api_tests/security/webhook-timeout.test";
132
132
  import { enduser_ai_summary_trust_gate_tests } from "./api_tests/security/enduser-ai-summary-trust-gate.test";
133
- import { allowed_paths_confinement_tests } from "./api_tests/security/F-0166-allowed-paths-wildcard-bypass.test";
134
- import { proxy_image_ssrf_tests } from "./api_tests/security/F-0025-proxy-image-unauth-ssrf.test";
135
- import { webhook_outbound_ssrf_tests } from "./api_tests/security/F-0015-webhook-outbound-ssrf.test";
133
+ import { allowed_paths_confinement_tests } from "./api_tests/security/allowed-paths-confinement.test";
134
+ import { proxy_image_ssrf_tests } from "./api_tests/security/proxy-image-unauth-ssrf.test";
135
+ import { webhook_outbound_ssrf_tests } from "./api_tests/security/webhook-outbound-ssrf.test";
136
136
  import { public_endpoint_auth_field_lock_tests } from "./api_tests/security/public_endpoint_auth_field_lock.test";
137
137
  import { formsort_webhook_auth_field_lock_tests } from "./api_tests/security/formsort_webhook_auth_field_lock.test";
138
- import { booking_info_idor_tests } from "./api_tests/security/F-0179-booking-info-idor-token-mint.test";
139
- import { automated_actions_process_gate_tests } from "./api_tests/security/F-0192-automated-actions-process-gate.test";
140
- import { schema_adminonly_enforcement_tests } from "./api_tests/security/F-0191-schema-adminonly-enforcement.test";
141
- import { startlinktoken_escalation_tests } from "./api_tests/security/F-0185-startlinktoken-enduser-staff-escalation.test";
138
+ import { booking_info_idor_tests } from "./api_tests/security/booking-info-idor-token-mint.test";
139
+ import { automated_actions_process_gate_tests } from "./api_tests/security/automated-actions-process-gate.test";
140
+ import { schema_adminonly_enforcement_tests } from "./api_tests/security/schema-adminonly-enforcement.test";
141
+ import { startlinktoken_escalation_tests } from "./api_tests/security/startlinktoken-enduser-staff-escalation.test";
142
+ import { form_logic_js_execution_checks } from "./api_tests/security/form-logic-js-execution.test";
142
143
  import { bulk_assignment_tests } from "./api_tests/bulk_assignment.test";
143
144
  import { tickets_bulk_assign_care_team_tests } from "./api_tests/tickets_bulk_assign_care_team.test";
144
145
  import { managed_content_enduser_access_tests } from "./api_tests/managed_content_enduser_access.test";
@@ -159,8 +160,9 @@ import { phone_validation_unit_tests } from "./unit_tests/phone_validation.test"
159
160
  import { openapi_spec_freshness_unit_tests } from "./unit_tests/openapi_spec_freshness.test";
160
161
  import { do_not_send_address_unit_tests } from "./unit_tests/do_not_send_address.test";
161
162
  import { organization_signup_checks } from "./api_tests/organization_signup.test";
162
- import { add_to_journey_foreign_enduserid_checks } from "./api_tests/security/F-0196-add-to-journey-foreign-enduserid.test";
163
+ import { add_to_journey_foreign_enduserid_checks } from "./api_tests/security/add-to-journey-foreign-enduserid.test";
163
164
  import { tickets_bulk_assign_from_queue_checks } from "./api_tests/tickets_bulk_assign_from_queue.test";
165
+ import { enduser_observations_auto_review_checks } from "./api_tests/enduser_observations_auto_review.test";
164
166
  import { run_isolated_in_parallel } from "./setup_isolated";
165
167
  import { elation_user_id_tests } from "./api_tests/elation_user_id.test";
166
168
  import { organization_settings_duplicates_tests } from "./api_tests/organization_settings_duplicates.test";
@@ -10903,6 +10905,19 @@ export const form_conditional_logic_tests = async () => {
10903
10905
  run_conditional_form_test({ $and: [{ condition: { [FORM_LOGIC_CALCULATED_FIELDS[0]]: { $exists: true } } }] }, true)
10904
10906
  run_conditional_form_test({ $and: [{ condition: { [FORM_LOGIC_CALCULATED_FIELDS[0]]: { $gt: 25 } } }] }, true)
10905
10907
  run_conditional_form_test({ $and: [{ condition: { [FORM_LOGIC_CALCULATED_FIELDS[0]]: { $lt: 25 } } }] }, false)
10908
+
10909
+ // A $JS(...) condition value was previously compiled and executed with new Function().
10910
+ // These must evaluate to false (parseInt -> NaN -> no match), and must never be executed.
10911
+ // The values are typed `number` on BasicFilter but are strings in stored data, hence the casts.
10912
+ delete (globalThis as any).__F0200
10913
+ run_conditional_form_test({ $and: [{ condition: { '3': { $gt: '$JS(return 0)' as any } } }] }, false, '$gt $JS not evaluated')
10914
+ run_conditional_form_test({ $and: [{ condition: { '3': { $lt: '$JS(return 99999)' as any } } }] }, false, '$lt $JS not evaluated')
10915
+ run_conditional_form_test({ $and: [{ condition: { '3': { $gt: '$JS(globalThis.__F0200 = 1; return 0)' as any } } }] }, false, '$JS side effect not evaluated')
10916
+ assert(
10917
+ (globalThis as any).__F0200 === undefined,
10918
+ 'a $JS(...) condition value was executed',
10919
+ '$JS payload never executed',
10920
+ )
10906
10921
  }
10907
10922
 
10908
10923
  export const enduser_conditional_logic_tests = async () => {
@@ -15386,8 +15401,10 @@ const ip_address_form_tests = async () => {
15386
15401
  // process.exit, which would otherwise strand the other suite's tenants.
15387
15402
  await run_isolated_in_parallel([
15388
15403
  { name: 'Organization signup', run: organization_signup_checks },
15389
- { name: 'F-0196 add_to_journey foreign enduserId', run: add_to_journey_foreign_enduserid_checks },
15404
+ { name: 'add_to_journey foreign enduserId', run: add_to_journey_foreign_enduserid_checks },
15390
15405
  { name: 'Tickets bulk assign from queue', run: tickets_bulk_assign_from_queue_checks },
15406
+ { name: 'Vital auto-review on create', run: enduser_observations_auto_review_checks },
15407
+ { name: '$JS in stored conditional logic', run: form_logic_js_execution_checks },
15391
15408
  ])
15392
15409
  await embeddables_auth_token_tests({ sdk, sdkNonAdmin })
15393
15410
  await proxy_image_ssrf_tests({ sdk, sdkNonAdmin })
@@ -17,7 +17,7 @@ import {
17
17
  * .npmignore covers only set_vars.sh), but nothing in the build or CI regenerates it. It had
18
18
  * therefore drifted several commits behind schema.ts — which mattered because `adminOnly` is
19
19
  * rendered into the spec as an "**Admin only.**" description prefix, so the published docs were
20
- * advertising gates that had changed. That drift is the doc half of F-0191; the runtime half was
20
+ * advertising gates that had changed. That drift is the documentation half of the problem; the runtime half was
21
21
  * fixed by making getCustomEndpointFields fall back to the schema flag.
22
22
  *
23
23
  * The generator is byte-deterministic (date `getExample`s are pinned in validation.ts precisely so
Binary file