@tellescope/sdk 1.256.14 → 1.256.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/sdk.d.ts +2 -2
- package/lib/cjs/tests/api_tests/auto_merge_form_submission.test.js +1 -1
- package/lib/cjs/tests/api_tests/auto_merge_form_submission.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.d.ts +5 -0
- package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.js +388 -0
- package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/integrations_redacted.test.js +3 -3
- package/lib/cjs/tests/api_tests/integrations_redacted.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/organization_signup.test.d.ts +1 -1
- package/lib/cjs/tests/api_tests/organization_signup.test.js +1 -1
- package/lib/cjs/tests/api_tests/purchase_made_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/purchase_made_trigger.test.js +103 -162
- package/lib/cjs/tests/api_tests/purchase_made_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/F-0200-form-logic-js-execution.test.d.ts +33 -0
- package/lib/cjs/tests/api_tests/security/F-0200-form-logic-js-execution.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0200-form-logic-js-execution.test.js +249 -0
- package/lib/cjs/tests/api_tests/security/F-0200-form-logic-js-execution.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts +42 -0
- package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js +281 -0
- package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts +38 -0
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js +390 -0
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/allowed-paths-confinement.test.d.ts +6 -0
- package/lib/cjs/tests/api_tests/security/allowed-paths-confinement.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/allowed-paths-confinement.test.js +1003 -0
- package/lib/cjs/tests/api_tests/security/allowed-paths-confinement.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts +42 -0
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js +323 -0
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +29 -0
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js +335 -0
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +32 -0
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +237 -0
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +28 -0
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js +349 -0
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +30 -0
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +314 -0
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts +21 -0
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js +362 -0
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts +21 -0
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js +366 -0
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/file-link-session-confinement.test.d.ts +5 -0
- package/lib/cjs/tests/api_tests/security/file-link-session-confinement.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/file-link-session-confinement.test.js +357 -0
- package/lib/cjs/tests/api_tests/security/file-link-session-confinement.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.d.ts +32 -0
- package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.js +248 -0
- package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +19 -0
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js +138 -0
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +24 -0
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +201 -0
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/invite-user-enumeration.test.d.ts +29 -0
- package/lib/cjs/tests/api_tests/security/invite-user-enumeration.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/invite-user-enumeration.test.js +278 -0
- package/lib/cjs/tests/api_tests/security/invite-user-enumeration.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts +17 -0
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js +155 -0
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/prototype-pollution.test.d.ts +2 -0
- package/lib/cjs/tests/api_tests/security/prototype-pollution.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/prototype-pollution.test.js +88 -0
- package/lib/cjs/tests/api_tests/security/prototype-pollution.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +34 -0
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +230 -0
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts +2 -0
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +242 -0
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/sanitize-user-html.test.d.ts +2 -0
- package/lib/cjs/tests/api_tests/security/sanitize-user-html.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/sanitize-user-html.test.js +148 -0
- package/lib/cjs/tests/api_tests/security/sanitize-user-html.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +45 -0
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js +388 -0
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts +38 -0
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js +222 -0
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -0
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +354 -0
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/webhook-outbound-ssrf.test.d.ts +28 -0
- package/lib/cjs/tests/api_tests/security/webhook-outbound-ssrf.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/webhook-outbound-ssrf.test.js +442 -0
- package/lib/cjs/tests/api_tests/security/webhook-outbound-ssrf.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts +19 -0
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js +156 -0
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.js +2 -2
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.js.map +1 -1
- package/lib/cjs/tests/tests.d.ts.map +1 -1
- package/lib/cjs/tests/tests.js +60 -46
- package/lib/cjs/tests/tests.js.map +1 -1
- package/lib/cjs/tests/unit_tests/openapi_spec_freshness.test.d.ts +1 -1
- package/lib/cjs/tests/unit_tests/openapi_spec_freshness.test.js +1 -1
- package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/lib/esm/enduser.d.ts +0 -1
- package/lib/esm/enduser.d.ts.map +1 -1
- package/lib/esm/sdk.d.ts +4 -5
- package/lib/esm/sdk.d.ts.map +1 -1
- package/lib/esm/session.d.ts +0 -1
- package/lib/esm/session.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/auto_merge_form_submission.test.js +1 -1
- package/lib/esm/tests/api_tests/auto_merge_form_submission.test.js.map +1 -1
- package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.d.ts +5 -0
- package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.js +383 -0
- package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.js.map +1 -0
- package/lib/esm/tests/api_tests/integrations_redacted.test.js +3 -3
- package/lib/esm/tests/api_tests/integrations_redacted.test.js.map +1 -1
- package/lib/esm/tests/api_tests/organization_signup.test.d.ts +1 -1
- package/lib/esm/tests/api_tests/organization_signup.test.js +1 -1
- package/lib/esm/tests/api_tests/purchase_made_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/purchase_made_trigger.test.js +104 -163
- package/lib/esm/tests/api_tests/purchase_made_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/F-0200-form-logic-js-execution.test.d.ts +33 -0
- package/lib/esm/tests/api_tests/security/F-0200-form-logic-js-execution.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0200-form-logic-js-execution.test.js +244 -0
- package/lib/esm/tests/api_tests/security/F-0200-form-logic-js-execution.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts +42 -0
- package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js +276 -0
- package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts +38 -0
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js +386 -0
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/allowed-paths-confinement.test.d.ts +6 -0
- package/lib/esm/tests/api_tests/security/allowed-paths-confinement.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/allowed-paths-confinement.test.js +996 -0
- package/lib/esm/tests/api_tests/security/allowed-paths-confinement.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts +42 -0
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js +316 -0
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +29 -0
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js +331 -0
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +32 -0
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +233 -0
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +28 -0
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js +345 -0
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +30 -0
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +310 -0
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts +21 -0
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js +358 -0
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts +21 -0
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js +362 -0
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/file-link-session-confinement.test.d.ts +5 -0
- package/lib/esm/tests/api_tests/security/file-link-session-confinement.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/file-link-session-confinement.test.js +349 -0
- package/lib/esm/tests/api_tests/security/file-link-session-confinement.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.d.ts +32 -0
- package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.js +243 -0
- package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +19 -0
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js +134 -0
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +24 -0
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +194 -0
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/invite-user-enumeration.test.d.ts +29 -0
- package/lib/esm/tests/api_tests/security/invite-user-enumeration.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/invite-user-enumeration.test.js +271 -0
- package/lib/esm/tests/api_tests/security/invite-user-enumeration.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts +17 -0
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js +151 -0
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/prototype-pollution.test.d.ts +2 -0
- package/lib/esm/tests/api_tests/security/prototype-pollution.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/prototype-pollution.test.js +84 -0
- package/lib/esm/tests/api_tests/security/prototype-pollution.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +34 -0
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +223 -0
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts +2 -0
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +238 -0
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/sanitize-user-html.test.d.ts +2 -0
- package/lib/esm/tests/api_tests/security/sanitize-user-html.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/sanitize-user-html.test.js +144 -0
- package/lib/esm/tests/api_tests/security/sanitize-user-html.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +45 -0
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js +381 -0
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts +38 -0
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js +218 -0
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -0
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +350 -0
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/webhook-outbound-ssrf.test.d.ts +28 -0
- package/lib/esm/tests/api_tests/security/webhook-outbound-ssrf.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/webhook-outbound-ssrf.test.js +435 -0
- package/lib/esm/tests/api_tests/security/webhook-outbound-ssrf.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts +19 -0
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.js +149 -0
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.js.map +1 -0
- package/lib/esm/tests/api_tests/webhook_error_handling.test.js +2 -2
- package/lib/esm/tests/api_tests/webhook_error_handling.test.js.map +1 -1
- package/lib/esm/tests/tests.d.ts.map +1 -1
- package/lib/esm/tests/tests.js +38 -24
- package/lib/esm/tests/tests.js.map +1 -1
- package/lib/esm/tests/unit_tests/openapi_spec_freshness.test.d.ts +1 -1
- package/lib/esm/tests/unit_tests/openapi_spec_freshness.test.js +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/tests/api_tests/auto_merge_form_submission.test.ts +1 -1
- package/src/tests/api_tests/enduser_observations_auto_review.test.ts +358 -0
- package/src/tests/api_tests/integrations_redacted.test.ts +1 -1
- package/src/tests/api_tests/organization_signup.test.ts +2 -2
- package/src/tests/api_tests/purchase_made_trigger.test.ts +29 -41
- package/src/tests/api_tests/security/{F-0196-add-to-journey-foreign-enduserid.test.ts → add-to-journey-foreign-enduserid.test.ts} +6 -7
- package/src/tests/api_tests/security/{F-0005-ai-conversations-rbac.test.ts → ai-conversations-rbac.test.ts} +14 -14
- package/src/tests/api_tests/security/{F-0166-allowed-paths-wildcard-bypass.test.ts → allowed-paths-confinement.test.ts} +11 -11
- package/src/tests/api_tests/security/{F-0192-automated-actions-process-gate.test.ts → automated-actions-process-gate.test.ts} +6 -7
- package/src/tests/api_tests/security/{F-0179-booking-info-idor-token-mint.test.ts → booking-info-idor-token-mint.test.ts} +5 -6
- package/src/tests/api_tests/security/{F-0053-cascade-role-rename-cross-tenant.test.ts → cascade-role-rename-cross-tenant.test.ts} +10 -10
- package/src/tests/api_tests/security/{F-0001-data-sync-redaction-bypass.test.ts → data-sync-redaction-bypass.test.ts} +9 -9
- package/src/tests/api_tests/security/{F-0006-develop-health-benefit-verification-rbac.test.ts → develop-health-benefit-verification-rbac.test.ts} +7 -8
- package/src/tests/api_tests/security/{F-0116-F-0119-enduser-cross-create.test.ts → enduser-cross-create.test.ts} +25 -25
- package/src/tests/api_tests/security/{F-0106-F-0110-enduser-write-restrictions.test.ts → enduser-write-restrictions.test.ts} +12 -14
- package/src/tests/api_tests/security/file-link-session-confinement.test.ts +291 -0
- package/src/tests/api_tests/security/form-logic-js-execution.test.ts +183 -0
- package/src/tests/api_tests/security/{F-0145-globalunique-leak.test.ts → globalunique-conflict-redaction.test.ts} +5 -6
- package/src/tests/api_tests/security/{F-0008-handle-incoming-communication-cross-tenant.test.ts → handle-incoming-communication-cross-tenant.test.ts} +8 -8
- package/src/tests/api_tests/security/{F-0007-invite-user-enumeration.test.ts → invite-user-enumeration.test.ts} +8 -8
- package/src/tests/api_tests/security/{F-0151-load-inbox-redaction.test.ts → load-inbox-redaction.test.ts} +5 -6
- package/src/tests/api_tests/security/{F-0016-prototype-pollution.test.ts → prototype-pollution.test.ts} +4 -4
- package/src/tests/api_tests/security/{F-0025-proxy-image-unauth-ssrf.test.ts → proxy-image-unauth-ssrf.test.ts} +11 -12
- package/src/tests/api_tests/security/{F-0013-sanitize-user-html-with-iframes.test.ts → sanitize-user-html-with-iframes.test.ts} +5 -5
- package/src/tests/api_tests/security/{F-0013-sanitize-user-html.test.ts → sanitize-user-html.test.ts} +4 -4
- package/src/tests/api_tests/security/{F-0191-schema-adminonly-enforcement.test.ts → schema-adminonly-enforcement.test.ts} +6 -7
- package/src/tests/api_tests/security/{F-0076-self-admin-role-assignment.test.ts → self-admin-role-assignment.test.ts} +13 -13
- package/src/tests/api_tests/security/{F-0185-startlinktoken-enduser-staff-escalation.test.ts → startlinktoken-enduser-staff-escalation.test.ts} +6 -6
- package/src/tests/api_tests/security/{F-0015-webhook-outbound-ssrf.test.ts → webhook-outbound-ssrf.test.ts} +13 -14
- package/src/tests/api_tests/security/{F-0155-webhook-timeout.test.ts → webhook-timeout.test.ts} +6 -7
- package/src/tests/api_tests/webhook_error_handling.test.ts +1 -1
- package/src/tests/tests.ts +43 -24
- package/src/tests/unit_tests/openapi_spec_freshness.test.ts +1 -1
- package/test_generated.pdf +0 -0
- package/src/tests/api_tests/security/readonly-enduser-preview.test.ts +0 -301
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.enduser_cross_create_tests = void 0;
|
|
40
|
+
require('source-map-support').install();
|
|
41
|
+
var sdk_1 = require("../../../sdk");
|
|
42
|
+
var testing_1 = require("@tellescope/testing");
|
|
43
|
+
var setup_1 = require("../../setup");
|
|
44
|
+
var host = process.env.API_URL || 'http://localhost:8080';
|
|
45
|
+
var businessId = '60398b1131a295e64f084ff6';
|
|
46
|
+
var ENDUSER_PASSWORD = 'F0116TestPassword!123';
|
|
47
|
+
var CROSS_ENDUSER_MESSAGE = "enduserId does not match creator id for enduser session";
|
|
48
|
+
/**
|
|
49
|
+
* Regression test for the enduser cross-enduser CREATE gating gaps:
|
|
50
|
+
* enduser_observations
|
|
51
|
+
* enduser_orders
|
|
52
|
+
* managed_content_records
|
|
53
|
+
* chat_rooms (enduserIds-only gate; staff userIds targeting is by-design)
|
|
54
|
+
*
|
|
55
|
+
* Each model exposed enduserActions.create with an `enduserId`/`enduserIds` field that
|
|
56
|
+
* lacked a write-side gate, letting an authenticated enduser create records bound to a
|
|
57
|
+
* DIFFERENT enduser in the same tenant. The fix adds a `constraints.relationship`
|
|
58
|
+
* evaluator mirroring the canonical `tickets` pattern (schema.ts).
|
|
59
|
+
*
|
|
60
|
+
* Methodology: each section asserts BOTH the exploit-is-blocked case AND that the
|
|
61
|
+
* legitimate path (self-create + staff-create) still works.
|
|
62
|
+
*/
|
|
63
|
+
var enduser_cross_create_tests = function (_a) {
|
|
64
|
+
var sdk = _a.sdk;
|
|
65
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
+
var attackerId, victimId, createdObservationIds, createdOrderIds, createdContentIds, createdRoomIds, attackerEmail, victimEmail, attacker, victim, attackerSDK_1, orderPayload_1, staffId_1, _i, createdRoomIds_1, id, _b, _c, createdContentIds_1, id, _d, _e, createdObservationIds_1, id, _f, _g, createdOrderIds_1, id, _h, _j, _k;
|
|
67
|
+
return __generator(this, function (_l) {
|
|
68
|
+
switch (_l.label) {
|
|
69
|
+
case 0:
|
|
70
|
+
(0, testing_1.log_header)("enduser cross-enduser create gates");
|
|
71
|
+
createdObservationIds = [];
|
|
72
|
+
createdOrderIds = [];
|
|
73
|
+
createdContentIds = [];
|
|
74
|
+
createdRoomIds = [];
|
|
75
|
+
_l.label = 1;
|
|
76
|
+
case 1:
|
|
77
|
+
_l.trys.push([1, , 21, 54]);
|
|
78
|
+
attackerEmail = "f0116-attacker-".concat(Date.now(), "@example.com");
|
|
79
|
+
victimEmail = "f0116-victim-".concat(Date.now(), "@example.com");
|
|
80
|
+
return [4 /*yield*/, sdk.api.endusers.createOne({ email: attackerEmail, fname: 'F0116', lname: 'Attacker' })];
|
|
81
|
+
case 2:
|
|
82
|
+
attacker = _l.sent();
|
|
83
|
+
attackerId = attacker.id;
|
|
84
|
+
return [4 /*yield*/, sdk.api.endusers.createOne({ email: victimEmail, fname: 'F0116', lname: 'Victim' })];
|
|
85
|
+
case 3:
|
|
86
|
+
victim = _l.sent();
|
|
87
|
+
victimId = victim.id;
|
|
88
|
+
return [4 /*yield*/, sdk.api.endusers.set_password({ id: attacker.id, password: ENDUSER_PASSWORD })];
|
|
89
|
+
case 4:
|
|
90
|
+
_l.sent();
|
|
91
|
+
attackerSDK_1 = new sdk_1.EnduserSession({ host: host, businessId: businessId });
|
|
92
|
+
return [4 /*yield*/, attackerSDK_1.authenticate(attackerEmail, ENDUSER_PASSWORD)
|
|
93
|
+
// ============================================================
|
|
94
|
+
// enduser_observations
|
|
95
|
+
// ============================================================
|
|
96
|
+
];
|
|
97
|
+
case 5:
|
|
98
|
+
_l.sent();
|
|
99
|
+
// ============================================================
|
|
100
|
+
// enduser_observations
|
|
101
|
+
// ============================================================
|
|
102
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser cannot create observation on another enduser (createOne)", function () { return attackerSDK_1.api.enduser_observations.createOne({
|
|
103
|
+
enduserId: victimId, category: 'vital-signs', status: 'final',
|
|
104
|
+
measurement: { unit: 'mmHg', value: 220 },
|
|
105
|
+
}); }, { shouldError: true, onError: function (e) { return e.message === CROSS_ENDUSER_MESSAGE; } })];
|
|
106
|
+
case 6:
|
|
107
|
+
// ============================================================
|
|
108
|
+
// enduser_observations
|
|
109
|
+
// ============================================================
|
|
110
|
+
_l.sent();
|
|
111
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser cannot create observation on another enduser (createMany)", function () { return attackerSDK_1.api.enduser_observations.createSome([{
|
|
112
|
+
enduserId: victimId, category: 'vital-signs', status: 'final',
|
|
113
|
+
measurement: { unit: 'mmHg', value: 220 },
|
|
114
|
+
}]); }, { shouldError: true, onError: function (e) { return e.message === CROSS_ENDUSER_MESSAGE; } })
|
|
115
|
+
// Positive control: enduser CAN create an observation on their OWN record
|
|
116
|
+
];
|
|
117
|
+
case 7:
|
|
118
|
+
_l.sent();
|
|
119
|
+
// Positive control: enduser CAN create an observation on their OWN record
|
|
120
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser can still create observation on own record", function () { return attackerSDK_1.api.enduser_observations.createOne({
|
|
121
|
+
enduserId: attackerId, category: 'vital-signs', status: 'final',
|
|
122
|
+
measurement: { unit: 'mmHg', value: 120 },
|
|
123
|
+
}); }, { onResult: function (o) { if (o === null || o === void 0 ? void 0 : o.id)
|
|
124
|
+
createdObservationIds.push(o.id); return (o === null || o === void 0 ? void 0 : o.enduserId) === attackerId; } })
|
|
125
|
+
// Positive control: staff CAN create an observation on any tenant enduser
|
|
126
|
+
];
|
|
127
|
+
case 8:
|
|
128
|
+
// Positive control: enduser CAN create an observation on their OWN record
|
|
129
|
+
_l.sent();
|
|
130
|
+
// Positive control: staff CAN create an observation on any tenant enduser
|
|
131
|
+
return [4 /*yield*/, (0, testing_1.async_test)("staff can still create observation on any enduser", function () { return sdk.api.enduser_observations.createOne({
|
|
132
|
+
enduserId: victimId, category: 'vital-signs', status: 'final',
|
|
133
|
+
measurement: { unit: 'mmHg', value: 118 },
|
|
134
|
+
}); }, { onResult: function (o) { if (o === null || o === void 0 ? void 0 : o.id)
|
|
135
|
+
createdObservationIds.push(o.id); return (o === null || o === void 0 ? void 0 : o.enduserId) === victimId; } })
|
|
136
|
+
// ============================================================
|
|
137
|
+
// enduser_orders
|
|
138
|
+
// ============================================================
|
|
139
|
+
];
|
|
140
|
+
case 9:
|
|
141
|
+
// Positive control: staff CAN create an observation on any tenant enduser
|
|
142
|
+
_l.sent();
|
|
143
|
+
orderPayload_1 = function (enduserId) { return ({
|
|
144
|
+
enduserId: enduserId,
|
|
145
|
+
externalId: "f0117-".concat(Date.now()), source: 'f0117-source',
|
|
146
|
+
title: 'f0117 order', status: 'pending',
|
|
147
|
+
}); };
|
|
148
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser cannot create order on another enduser", function () { return attackerSDK_1.api.enduser_orders.createOne(orderPayload_1(victimId)); }, { shouldError: true, onError: function (e) { return e.message === CROSS_ENDUSER_MESSAGE; } })];
|
|
149
|
+
case 10:
|
|
150
|
+
_l.sent();
|
|
151
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser can still create order on own record", function () { return attackerSDK_1.api.enduser_orders.createOne(orderPayload_1(attackerId)); }, { onResult: function (o) { if (o === null || o === void 0 ? void 0 : o.id)
|
|
152
|
+
createdOrderIds.push(o.id); return (o === null || o === void 0 ? void 0 : o.enduserId) === attackerId; } })];
|
|
153
|
+
case 11:
|
|
154
|
+
_l.sent();
|
|
155
|
+
return [4 /*yield*/, (0, testing_1.async_test)("staff can still create order on any enduser", function () { return sdk.api.enduser_orders.createOne(orderPayload_1(victimId)); }, { onResult: function (o) { if (o === null || o === void 0 ? void 0 : o.id)
|
|
156
|
+
createdOrderIds.push(o.id); return (o === null || o === void 0 ? void 0 : o.enduserId) === victimId; } })
|
|
157
|
+
// ============================================================
|
|
158
|
+
// managed_content_records
|
|
159
|
+
// ============================================================
|
|
160
|
+
];
|
|
161
|
+
case 12:
|
|
162
|
+
_l.sent();
|
|
163
|
+
// ============================================================
|
|
164
|
+
// managed_content_records
|
|
165
|
+
// ============================================================
|
|
166
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser cannot create content with allowUnauthenticatedAccess", function () { return attackerSDK_1.api.managed_content_records.createOne({
|
|
167
|
+
title: 'f0119 phishing', textContent: 'x', allowUnauthenticatedAccess: true,
|
|
168
|
+
}); }, { shouldError: true, onError: function (e) { return e.message === "allowUnauthenticatedAccess cannot be set by endusers"; } })];
|
|
169
|
+
case 13:
|
|
170
|
+
// ============================================================
|
|
171
|
+
// managed_content_records
|
|
172
|
+
// ============================================================
|
|
173
|
+
_l.sent();
|
|
174
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser cannot create content with publicRead", function () { return attackerSDK_1.api.managed_content_records.createOne({
|
|
175
|
+
title: 'f0119 broadcast', textContent: 'x', publicRead: true,
|
|
176
|
+
}); }, { shouldError: true, onError: function (e) { return e.message === "publicRead cannot be set by endusers"; } })];
|
|
177
|
+
case 14:
|
|
178
|
+
_l.sent();
|
|
179
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser cannot create content bound to another enduser", function () { return attackerSDK_1.api.managed_content_records.createOne({
|
|
180
|
+
title: 'f0119 cross', textContent: 'x', enduserId: victimId,
|
|
181
|
+
}); }, { shouldError: true, onError: function (e) { return e.message === CROSS_ENDUSER_MESSAGE; } })];
|
|
182
|
+
case 15:
|
|
183
|
+
_l.sent();
|
|
184
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser can still create ordinary content", function () { return attackerSDK_1.api.managed_content_records.createOne({
|
|
185
|
+
title: 'f0119 ok', textContent: 'hello',
|
|
186
|
+
}); }, { onResult: function (o) { if (o === null || o === void 0 ? void 0 : o.id)
|
|
187
|
+
createdContentIds.push(o.id); return !(o === null || o === void 0 ? void 0 : o.publicRead) && !(o === null || o === void 0 ? void 0 : o.allowUnauthenticatedAccess); } })];
|
|
188
|
+
case 16:
|
|
189
|
+
_l.sent();
|
|
190
|
+
return [4 /*yield*/, (0, testing_1.async_test)("staff can still create public content", function () { return sdk.api.managed_content_records.createOne({
|
|
191
|
+
title: 'f0119 staff public', textContent: 'x', publicRead: true,
|
|
192
|
+
}); }, { onResult: function (o) { if (o === null || o === void 0 ? void 0 : o.id)
|
|
193
|
+
createdContentIds.push(o.id); return (o === null || o === void 0 ? void 0 : o.publicRead) === true; } })
|
|
194
|
+
// ============================================================
|
|
195
|
+
// chat_rooms (enduserIds-only gate; staff userIds targeting is by-design)
|
|
196
|
+
// ============================================================
|
|
197
|
+
];
|
|
198
|
+
case 17:
|
|
199
|
+
_l.sent();
|
|
200
|
+
staffId_1 = sdk.userInfo.id;
|
|
201
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser cannot add another patient to a chat room (enduserIds)", function () { return attackerSDK_1.api.chat_rooms.createOne({
|
|
202
|
+
type: 'internal', enduserIds: [attackerId, victimId], userIds: [staffId_1],
|
|
203
|
+
}); }, { shouldError: true, onError: function (e) { return e.message === "enduserIds may only contain your own id for enduser session"; } })
|
|
204
|
+
// Positive control: patient CAN create a room with care-team staff + self (intended feature)
|
|
205
|
+
];
|
|
206
|
+
case 18:
|
|
207
|
+
_l.sent();
|
|
208
|
+
// Positive control: patient CAN create a room with care-team staff + self (intended feature)
|
|
209
|
+
return [4 /*yield*/, (0, testing_1.async_test)("enduser can still create a room with staff + self", function () { return attackerSDK_1.api.chat_rooms.createOne({
|
|
210
|
+
type: 'internal', enduserIds: [attackerId], userIds: [staffId_1],
|
|
211
|
+
}); }, { onResult: function (o) { var _a, _b; if (o === null || o === void 0 ? void 0 : o.id)
|
|
212
|
+
createdRoomIds.push(o.id); return ((_a = o === null || o === void 0 ? void 0 : o.enduserIds) === null || _a === void 0 ? void 0 : _a.length) === 1 && ((_b = o === null || o === void 0 ? void 0 : o.userIds) === null || _b === void 0 ? void 0 : _b.includes(staffId_1)); } })
|
|
213
|
+
// Positive control: staff can still create multi-patient rooms
|
|
214
|
+
];
|
|
215
|
+
case 19:
|
|
216
|
+
// Positive control: patient CAN create a room with care-team staff + self (intended feature)
|
|
217
|
+
_l.sent();
|
|
218
|
+
// Positive control: staff can still create multi-patient rooms
|
|
219
|
+
return [4 /*yield*/, (0, testing_1.async_test)("staff can still create a room with multiple endusers", function () { return sdk.api.chat_rooms.createOne({
|
|
220
|
+
type: 'internal', enduserIds: [attackerId, victimId], userIds: [staffId_1],
|
|
221
|
+
}); }, { onResult: function (o) { var _a; if (o === null || o === void 0 ? void 0 : o.id)
|
|
222
|
+
createdRoomIds.push(o.id); return ((_a = o === null || o === void 0 ? void 0 : o.enduserIds) === null || _a === void 0 ? void 0 : _a.length) === 2; } })];
|
|
223
|
+
case 20:
|
|
224
|
+
// Positive control: staff can still create multi-patient rooms
|
|
225
|
+
_l.sent();
|
|
226
|
+
return [3 /*break*/, 54];
|
|
227
|
+
case 21:
|
|
228
|
+
_i = 0, createdRoomIds_1 = createdRoomIds;
|
|
229
|
+
_l.label = 22;
|
|
230
|
+
case 22:
|
|
231
|
+
if (!(_i < createdRoomIds_1.length)) return [3 /*break*/, 27];
|
|
232
|
+
id = createdRoomIds_1[_i];
|
|
233
|
+
_l.label = 23;
|
|
234
|
+
case 23:
|
|
235
|
+
_l.trys.push([23, 25, , 26]);
|
|
236
|
+
return [4 /*yield*/, sdk.api.chat_rooms.deleteOne(id)];
|
|
237
|
+
case 24:
|
|
238
|
+
_l.sent();
|
|
239
|
+
return [3 /*break*/, 26];
|
|
240
|
+
case 25:
|
|
241
|
+
_b = _l.sent();
|
|
242
|
+
return [3 /*break*/, 26];
|
|
243
|
+
case 26:
|
|
244
|
+
_i++;
|
|
245
|
+
return [3 /*break*/, 22];
|
|
246
|
+
case 27:
|
|
247
|
+
_c = 0, createdContentIds_1 = createdContentIds;
|
|
248
|
+
_l.label = 28;
|
|
249
|
+
case 28:
|
|
250
|
+
if (!(_c < createdContentIds_1.length)) return [3 /*break*/, 33];
|
|
251
|
+
id = createdContentIds_1[_c];
|
|
252
|
+
_l.label = 29;
|
|
253
|
+
case 29:
|
|
254
|
+
_l.trys.push([29, 31, , 32]);
|
|
255
|
+
return [4 /*yield*/, sdk.api.managed_content_records.deleteOne(id)];
|
|
256
|
+
case 30:
|
|
257
|
+
_l.sent();
|
|
258
|
+
return [3 /*break*/, 32];
|
|
259
|
+
case 31:
|
|
260
|
+
_d = _l.sent();
|
|
261
|
+
return [3 /*break*/, 32];
|
|
262
|
+
case 32:
|
|
263
|
+
_c++;
|
|
264
|
+
return [3 /*break*/, 28];
|
|
265
|
+
case 33:
|
|
266
|
+
_e = 0, createdObservationIds_1 = createdObservationIds;
|
|
267
|
+
_l.label = 34;
|
|
268
|
+
case 34:
|
|
269
|
+
if (!(_e < createdObservationIds_1.length)) return [3 /*break*/, 39];
|
|
270
|
+
id = createdObservationIds_1[_e];
|
|
271
|
+
_l.label = 35;
|
|
272
|
+
case 35:
|
|
273
|
+
_l.trys.push([35, 37, , 38]);
|
|
274
|
+
return [4 /*yield*/, sdk.api.enduser_observations.deleteOne(id)];
|
|
275
|
+
case 36:
|
|
276
|
+
_l.sent();
|
|
277
|
+
return [3 /*break*/, 38];
|
|
278
|
+
case 37:
|
|
279
|
+
_f = _l.sent();
|
|
280
|
+
return [3 /*break*/, 38];
|
|
281
|
+
case 38:
|
|
282
|
+
_e++;
|
|
283
|
+
return [3 /*break*/, 34];
|
|
284
|
+
case 39:
|
|
285
|
+
_g = 0, createdOrderIds_1 = createdOrderIds;
|
|
286
|
+
_l.label = 40;
|
|
287
|
+
case 40:
|
|
288
|
+
if (!(_g < createdOrderIds_1.length)) return [3 /*break*/, 45];
|
|
289
|
+
id = createdOrderIds_1[_g];
|
|
290
|
+
_l.label = 41;
|
|
291
|
+
case 41:
|
|
292
|
+
_l.trys.push([41, 43, , 44]);
|
|
293
|
+
return [4 /*yield*/, sdk.api.enduser_orders.deleteOne(id)];
|
|
294
|
+
case 42:
|
|
295
|
+
_l.sent();
|
|
296
|
+
return [3 /*break*/, 44];
|
|
297
|
+
case 43:
|
|
298
|
+
_h = _l.sent();
|
|
299
|
+
return [3 /*break*/, 44];
|
|
300
|
+
case 44:
|
|
301
|
+
_g++;
|
|
302
|
+
return [3 /*break*/, 40];
|
|
303
|
+
case 45:
|
|
304
|
+
if (!attackerId) return [3 /*break*/, 49];
|
|
305
|
+
_l.label = 46;
|
|
306
|
+
case 46:
|
|
307
|
+
_l.trys.push([46, 48, , 49]);
|
|
308
|
+
return [4 /*yield*/, sdk.api.endusers.deleteOne(attackerId)];
|
|
309
|
+
case 47:
|
|
310
|
+
_l.sent();
|
|
311
|
+
return [3 /*break*/, 49];
|
|
312
|
+
case 48:
|
|
313
|
+
_j = _l.sent();
|
|
314
|
+
return [3 /*break*/, 49];
|
|
315
|
+
case 49:
|
|
316
|
+
if (!victimId) return [3 /*break*/, 53];
|
|
317
|
+
_l.label = 50;
|
|
318
|
+
case 50:
|
|
319
|
+
_l.trys.push([50, 52, , 53]);
|
|
320
|
+
return [4 /*yield*/, sdk.api.endusers.deleteOne(victimId)];
|
|
321
|
+
case 51:
|
|
322
|
+
_l.sent();
|
|
323
|
+
return [3 /*break*/, 53];
|
|
324
|
+
case 52:
|
|
325
|
+
_k = _l.sent();
|
|
326
|
+
return [3 /*break*/, 53];
|
|
327
|
+
case 53: return [7 /*endfinally*/];
|
|
328
|
+
case 54: return [2 /*return*/];
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
exports.enduser_cross_create_tests = enduser_cross_create_tests;
|
|
334
|
+
// Allow running this test file independently
|
|
335
|
+
if (require.main === module) {
|
|
336
|
+
console.log("\uD83C\uDF10 Using API URL: ".concat(host));
|
|
337
|
+
var sdk_2 = new sdk_1.Session({ host: host });
|
|
338
|
+
var sdkNonAdmin_1 = new sdk_1.Session({ host: host });
|
|
339
|
+
var runTests = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
340
|
+
return __generator(this, function (_a) {
|
|
341
|
+
switch (_a.label) {
|
|
342
|
+
case 0: return [4 /*yield*/, (0, setup_1.setup_tests)(sdk_2, sdkNonAdmin_1)];
|
|
343
|
+
case 1:
|
|
344
|
+
_a.sent();
|
|
345
|
+
return [4 /*yield*/, (0, exports.enduser_cross_create_tests)({ sdk: sdk_2, sdkNonAdmin: sdkNonAdmin_1 })];
|
|
346
|
+
case 2:
|
|
347
|
+
_a.sent();
|
|
348
|
+
return [2 /*return*/];
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
}); };
|
|
352
|
+
runTests()
|
|
353
|
+
.then(function () {
|
|
354
|
+
console.log("✅ enduser cross-create test suite completed successfully");
|
|
355
|
+
process.exit(0);
|
|
356
|
+
})
|
|
357
|
+
.catch(function (error) {
|
|
358
|
+
console.error("❌ enduser cross-create test suite failed:", error);
|
|
359
|
+
process.exit(1);
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
//# sourceMappingURL=enduser-cross-create.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enduser-cross-create.test.js","sourceRoot":"","sources":["../../../../../src/tests/api_tests/security/enduser-cross-create.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,EAAE,CAAC;AAExC,oCAAsD;AACtD,+CAG4B;AAC5B,qCAAyC;AAEzC,IAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,uBAAgC,CAAA;AACpE,IAAM,UAAU,GAAG,0BAA0B,CAAA;AAE7C,IAAM,gBAAgB,GAAG,uBAAuB,CAAA;AAEhD,IAAM,qBAAqB,GAAG,yDAAyD,CAAA;AAEvF;;;;;;;;;;;;;;GAcG;AACI,IAAM,0BAA0B,GAAG,UAAO,EAAgD;QAA9C,GAAG,SAAA;;;;;;oBACpD,IAAA,oBAAU,EAAC,oCAAoC,CAAC,CAAA;oBAI1C,qBAAqB,GAAa,EAAE,CAAA;oBACpC,eAAe,GAAa,EAAE,CAAA;oBAC9B,iBAAiB,GAAa,EAAE,CAAA;oBAChC,cAAc,GAAa,EAAE,CAAA;;;;oBAI3B,aAAa,GAAG,yBAAkB,IAAI,CAAC,GAAG,EAAE,iBAAc,CAAA;oBAC1D,WAAW,GAAG,uBAAgB,IAAI,CAAC,GAAG,EAAE,iBAAc,CAAA;oBAC3C,qBAAM,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAA;;oBAAxG,QAAQ,GAAG,SAA6F;oBAC9G,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QAAQ,GAAG;;;wBACf,qBAAM,IAAA,mBAAW,EAAC,KAAG,EAAE,aAAW,CAAC,EAAA;;oBAAnC,SAAmC,CAAA;oBACnC,qBAAM,IAAA,kCAA0B,EAAC,EAAE,GAAG,OAAA,EAAE,WAAW,eAAA,EAAE,CAAC,EAAA;;oBAAtD,SAAsD,CAAA;;;;SACvD,CAAA;IAED,QAAQ,EAAE;SACP,IAAI,CAAC;QACJ,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAA;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC;SACD,KAAK,CAAC,UAAC,KAAK;QACX,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAA;QACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;CACL"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Session } from "../../../sdk";
|
|
2
|
+
/**
|
|
3
|
+
* Regression test: enduser self-updates must not write staff-only fields on `endusers` or `form_responses`.
|
|
4
|
+
*
|
|
5
|
+
* Endusers could PATCH admin-only / access-bearing / attribution-bearing fields on
|
|
6
|
+
* their own endusers record (assignedTo, tags, references, ...) and their own
|
|
7
|
+
* form_responses (procedureCodes, submittedBy, markedAsSubmitted, ...). The fix adds
|
|
8
|
+
* the `enduserUpdatesDisabled` field option (schema.ts ModelFieldInfo), enforced for
|
|
9
|
+
* enduser sessions in the generic update handler (routing.ts createDefaultEndpoints).
|
|
10
|
+
*
|
|
11
|
+
* This test asserts, for every flagged field on both models:
|
|
12
|
+
* - an enduser session updating its OWN record gets a 400 "<field> cannot be updated by endusers"
|
|
13
|
+
* - nothing persists (spot-checked on assignedTo, the highest-impact field)
|
|
14
|
+
* - enduser self-updates of allowed fields still work (fname, hideFromEnduserPortal)
|
|
15
|
+
* - staff sessions can still update the restricted fields
|
|
16
|
+
*/
|
|
17
|
+
export declare const enduser_write_restrictions_tests: ({ sdk }: {
|
|
18
|
+
sdk: Session;
|
|
19
|
+
sdkNonAdmin: Session;
|
|
20
|
+
}) => Promise<void>;
|
|
21
|
+
//# sourceMappingURL=enduser-write-restrictions.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enduser-write-restrictions.test.d.ts","sourceRoot":"","sources":["../../../../../src/tests/api_tests/security/enduser-write-restrictions.test.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAkB,MAAM,cAAc,CAAA;AAsEtD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC;SAA2B,OAAO;iBAAe,OAAO;mBAwIpG,CAAA"}
|