@tellescope/sdk 2.0.0-beta.2 → 2.0.0-beta.3

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 (717) hide show
  1. package/lib/cjs/sdk.d.ts +6 -5
  2. package/lib/cjs/sdk.d.ts.map +1 -1
  3. package/lib/cjs/sdk.js +5 -0
  4. package/lib/cjs/sdk.js.map +1 -1
  5. package/lib/cjs/tests/api_tests/ai_conversations.test.d.ts +14 -5
  6. package/lib/cjs/tests/api_tests/ai_conversations.test.d.ts.map +1 -1
  7. package/lib/cjs/tests/api_tests/ai_conversations.test.js +163 -149
  8. package/lib/cjs/tests/api_tests/ai_conversations.test.js.map +1 -1
  9. package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.d.ts +22 -0
  10. package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.d.ts.map +1 -0
  11. package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.js +518 -0
  12. package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.js.map +1 -0
  13. package/lib/cjs/tests/api_tests/appointment_link_expiration.test.d.ts +6 -5
  14. package/lib/cjs/tests/api_tests/appointment_link_expiration.test.d.ts.map +1 -1
  15. package/lib/cjs/tests/api_tests/appointment_link_expiration.test.js +135 -73
  16. package/lib/cjs/tests/api_tests/appointment_link_expiration.test.js.map +1 -1
  17. package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.d.ts +6 -5
  18. package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.d.ts.map +1 -1
  19. package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.js +240 -174
  20. package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.js.map +1 -1
  21. package/lib/cjs/tests/api_tests/availability_block_buffer.test.d.ts +22 -0
  22. package/lib/cjs/tests/api_tests/availability_block_buffer.test.d.ts.map +1 -0
  23. package/lib/cjs/tests/api_tests/availability_block_buffer.test.js +311 -0
  24. package/lib/cjs/tests/api_tests/availability_block_buffer.test.js.map +1 -0
  25. package/lib/cjs/tests/api_tests/beluga_manual_sync.test.d.ts +6 -5
  26. package/lib/cjs/tests/api_tests/beluga_manual_sync.test.d.ts.map +1 -1
  27. package/lib/cjs/tests/api_tests/beluga_manual_sync.test.js +235 -192
  28. package/lib/cjs/tests/api_tests/beluga_manual_sync.test.js.map +1 -1
  29. package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.d.ts +6 -5
  30. package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.d.ts.map +1 -1
  31. package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.js +351 -264
  32. package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.js.map +1 -1
  33. package/lib/cjs/tests/api_tests/bulk_assignment.test.d.ts +16 -5
  34. package/lib/cjs/tests/api_tests/bulk_assignment.test.d.ts.map +1 -1
  35. package/lib/cjs/tests/api_tests/bulk_assignment.test.js +336 -243
  36. package/lib/cjs/tests/api_tests/bulk_assignment.test.js.map +1 -1
  37. package/lib/cjs/tests/api_tests/calendar_event_references_update.test.d.ts +13 -5
  38. package/lib/cjs/tests/api_tests/calendar_event_references_update.test.d.ts.map +1 -1
  39. package/lib/cjs/tests/api_tests/calendar_event_references_update.test.js +131 -108
  40. package/lib/cjs/tests/api_tests/calendar_event_references_update.test.js.map +1 -1
  41. package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.d.ts +15 -5
  42. package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.d.ts.map +1 -1
  43. package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.js +240 -252
  44. package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.js.map +1 -1
  45. package/lib/cjs/tests/api_tests/chats_analytics.test.d.ts +14 -5
  46. package/lib/cjs/tests/api_tests/chats_analytics.test.d.ts.map +1 -1
  47. package/lib/cjs/tests/api_tests/chats_analytics.test.js +190 -189
  48. package/lib/cjs/tests/api_tests/chats_analytics.test.js.map +1 -1
  49. package/lib/cjs/tests/api_tests/concurrent_build_threads.test.d.ts +23 -5
  50. package/lib/cjs/tests/api_tests/concurrent_build_threads.test.d.ts.map +1 -1
  51. package/lib/cjs/tests/api_tests/concurrent_build_threads.test.js +121 -118
  52. package/lib/cjs/tests/api_tests/concurrent_build_threads.test.js.map +1 -1
  53. package/lib/cjs/tests/api_tests/configurations_public_read.test.d.ts +21 -5
  54. package/lib/cjs/tests/api_tests/configurations_public_read.test.d.ts.map +1 -1
  55. package/lib/cjs/tests/api_tests/configurations_public_read.test.js +235 -119
  56. package/lib/cjs/tests/api_tests/configurations_public_read.test.js.map +1 -1
  57. package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts +7 -0
  58. package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts.map +1 -0
  59. package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.js +356 -0
  60. package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.js.map +1 -0
  61. package/lib/cjs/tests/api_tests/create_note_action.test.d.ts +18 -5
  62. package/lib/cjs/tests/api_tests/create_note_action.test.d.ts.map +1 -1
  63. package/lib/cjs/tests/api_tests/create_note_action.test.js +218 -173
  64. package/lib/cjs/tests/api_tests/create_note_action.test.js.map +1 -1
  65. package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.d.ts +17 -4
  66. package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.d.ts.map +1 -1
  67. package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.js +144 -205
  68. package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.js.map +1 -1
  69. package/lib/cjs/tests/api_tests/custom_aggregation.test.d.ts +15 -5
  70. package/lib/cjs/tests/api_tests/custom_aggregation.test.d.ts.map +1 -1
  71. package/lib/cjs/tests/api_tests/custom_aggregation.test.js +284 -223
  72. package/lib/cjs/tests/api_tests/custom_aggregation.test.js.map +1 -1
  73. package/lib/cjs/tests/api_tests/database_cascade_delete.test.d.ts +13 -5
  74. package/lib/cjs/tests/api_tests/database_cascade_delete.test.d.ts.map +1 -1
  75. package/lib/cjs/tests/api_tests/database_cascade_delete.test.js +218 -242
  76. package/lib/cjs/tests/api_tests/database_cascade_delete.test.js.map +1 -1
  77. package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts +21 -5
  78. package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts.map +1 -1
  79. package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.js +168 -112
  80. package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.js.map +1 -1
  81. package/lib/cjs/tests/api_tests/elation_user_id.test.d.ts +17 -5
  82. package/lib/cjs/tests/api_tests/elation_user_id.test.d.ts.map +1 -1
  83. package/lib/cjs/tests/api_tests/elation_user_id.test.js +121 -54
  84. package/lib/cjs/tests/api_tests/elation_user_id.test.js.map +1 -1
  85. package/lib/cjs/tests/api_tests/file_download_unicode_names.test.d.ts +6 -5
  86. package/lib/cjs/tests/api_tests/file_download_unicode_names.test.d.ts.map +1 -1
  87. package/lib/cjs/tests/api_tests/file_download_unicode_names.test.js +193 -143
  88. package/lib/cjs/tests/api_tests/file_download_unicode_names.test.js.map +1 -1
  89. package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.d.ts +7 -0
  90. package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.d.ts.map +1 -0
  91. package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.js +532 -0
  92. package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.js.map +1 -0
  93. package/lib/cjs/tests/api_tests/form_submitted_trigger.test.d.ts +25 -5
  94. package/lib/cjs/tests/api_tests/form_submitted_trigger.test.d.ts.map +1 -1
  95. package/lib/cjs/tests/api_tests/form_submitted_trigger.test.js +395 -366
  96. package/lib/cjs/tests/api_tests/form_submitted_trigger.test.js.map +1 -1
  97. package/lib/cjs/tests/api_tests/form_translations.test.d.ts +6 -5
  98. package/lib/cjs/tests/api_tests/form_translations.test.d.ts.map +1 -1
  99. package/lib/cjs/tests/api_tests/form_translations.test.js +269 -189
  100. package/lib/cjs/tests/api_tests/form_translations.test.js.map +1 -1
  101. package/lib/cjs/tests/api_tests/formsort_header_auth.test.d.ts +29 -5
  102. package/lib/cjs/tests/api_tests/formsort_header_auth.test.d.ts.map +1 -1
  103. package/lib/cjs/tests/api_tests/formsort_header_auth.test.js +179 -162
  104. package/lib/cjs/tests/api_tests/formsort_header_auth.test.js.map +1 -1
  105. package/lib/cjs/tests/api_tests/gcal_sync_retry.test.d.ts +12 -6
  106. package/lib/cjs/tests/api_tests/gcal_sync_retry.test.d.ts.map +1 -1
  107. package/lib/cjs/tests/api_tests/gcal_sync_retry.test.js +98 -84
  108. package/lib/cjs/tests/api_tests/gcal_sync_retry.test.js.map +1 -1
  109. package/lib/cjs/tests/api_tests/get_some_projection.test.d.ts +20 -5
  110. package/lib/cjs/tests/api_tests/get_some_projection.test.d.ts.map +1 -1
  111. package/lib/cjs/tests/api_tests/get_some_projection.test.js +342 -298
  112. package/lib/cjs/tests/api_tests/get_some_projection.test.js.map +1 -1
  113. package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.d.ts +6 -5
  114. package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.d.ts.map +1 -1
  115. package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.js +294 -223
  116. package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.js.map +1 -1
  117. package/lib/cjs/tests/api_tests/integrations_redacted.test.d.ts +6 -5
  118. package/lib/cjs/tests/api_tests/integrations_redacted.test.d.ts.map +1 -1
  119. package/lib/cjs/tests/api_tests/integrations_redacted.test.js +307 -213
  120. package/lib/cjs/tests/api_tests/integrations_redacted.test.js.map +1 -1
  121. package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.d.ts +6 -5
  122. package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.d.ts.map +1 -1
  123. package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.js +179 -178
  124. package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.js.map +1 -1
  125. package/lib/cjs/tests/api_tests/load_team_chat.test.d.ts.map +1 -1
  126. package/lib/cjs/tests/api_tests/load_team_chat.test.js +181 -124
  127. package/lib/cjs/tests/api_tests/load_team_chat.test.js.map +1 -1
  128. package/lib/cjs/tests/api_tests/load_threads_autobuild.test.d.ts +24 -5
  129. package/lib/cjs/tests/api_tests/load_threads_autobuild.test.d.ts.map +1 -1
  130. package/lib/cjs/tests/api_tests/load_threads_autobuild.test.js +261 -227
  131. package/lib/cjs/tests/api_tests/load_threads_autobuild.test.js.map +1 -1
  132. package/lib/cjs/tests/api_tests/load_threads_care_team.test.d.ts +6 -0
  133. package/lib/cjs/tests/api_tests/load_threads_care_team.test.d.ts.map +1 -1
  134. package/lib/cjs/tests/api_tests/load_threads_care_team.test.js +115 -31
  135. package/lib/cjs/tests/api_tests/load_threads_care_team.test.js.map +1 -1
  136. package/lib/cjs/tests/api_tests/managed_content_file_access.test.d.ts +15 -5
  137. package/lib/cjs/tests/api_tests/managed_content_file_access.test.d.ts.map +1 -1
  138. package/lib/cjs/tests/api_tests/managed_content_file_access.test.js +285 -311
  139. package/lib/cjs/tests/api_tests/managed_content_file_access.test.js.map +1 -1
  140. package/lib/cjs/tests/api_tests/mdb_sort.test.d.ts +20 -5
  141. package/lib/cjs/tests/api_tests/mdb_sort.test.d.ts.map +1 -1
  142. package/lib/cjs/tests/api_tests/mdb_sort.test.js +361 -305
  143. package/lib/cjs/tests/api_tests/mdb_sort.test.js.map +1 -1
  144. package/lib/cjs/tests/api_tests/mdi_manual_sync.test.d.ts +27 -0
  145. package/lib/cjs/tests/api_tests/mdi_manual_sync.test.d.ts.map +1 -0
  146. package/lib/cjs/tests/api_tests/mdi_manual_sync.test.js +395 -0
  147. package/lib/cjs/tests/api_tests/mdi_manual_sync.test.js.map +1 -0
  148. package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.d.ts +6 -5
  149. package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.d.ts.map +1 -1
  150. package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.js +259 -209
  151. package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.js.map +1 -1
  152. package/lib/cjs/tests/api_tests/mdi_webhooks.test.d.ts +12 -5
  153. package/lib/cjs/tests/api_tests/mdi_webhooks.test.d.ts.map +1 -1
  154. package/lib/cjs/tests/api_tests/mdi_webhooks.test.js +67 -61
  155. package/lib/cjs/tests/api_tests/mdi_webhooks.test.js.map +1 -1
  156. package/lib/cjs/tests/api_tests/message_assignment_trigger.test.d.ts +23 -14
  157. package/lib/cjs/tests/api_tests/message_assignment_trigger.test.d.ts.map +1 -1
  158. package/lib/cjs/tests/api_tests/message_assignment_trigger.test.js +258 -306
  159. package/lib/cjs/tests/api_tests/message_assignment_trigger.test.js.map +1 -1
  160. package/lib/cjs/tests/api_tests/metriport_push_form_response.test.d.ts +6 -5
  161. package/lib/cjs/tests/api_tests/metriport_push_form_response.test.d.ts.map +1 -1
  162. package/lib/cjs/tests/api_tests/metriport_push_form_response.test.js +301 -238
  163. package/lib/cjs/tests/api_tests/metriport_push_form_response.test.js.map +1 -1
  164. package/lib/cjs/tests/api_tests/organization_api_keys.test.d.ts.map +1 -1
  165. package/lib/cjs/tests/api_tests/organization_api_keys.test.js +226 -59
  166. package/lib/cjs/tests/api_tests/organization_api_keys.test.js.map +1 -1
  167. package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.d.ts +19 -5
  168. package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.d.ts.map +1 -1
  169. package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.js +335 -222
  170. package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.js.map +1 -1
  171. package/lib/cjs/tests/api_tests/organization_signup.test.d.ts.map +1 -1
  172. package/lib/cjs/tests/api_tests/organization_signup.test.js +218 -51
  173. package/lib/cjs/tests/api_tests/organization_signup.test.js.map +1 -1
  174. package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.d.ts.map +1 -1
  175. package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.js +109 -1
  176. package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.js.map +1 -1
  177. package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.d.ts +6 -6
  178. package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.d.ts.map +1 -1
  179. package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.js +309 -361
  180. package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.js.map +1 -1
  181. package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.d.ts +6 -5
  182. package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.d.ts.map +1 -1
  183. package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.js +246 -165
  184. package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.js.map +1 -1
  185. package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.d.ts +15 -5
  186. package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.d.ts.map +1 -1
  187. package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.js +130 -47
  188. package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.js.map +1 -1
  189. package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.d.ts +6 -5
  190. package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.d.ts.map +1 -1
  191. package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.js +180 -132
  192. package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.js.map +1 -1
  193. package/lib/cjs/tests/api_tests/programs.test.d.ts.map +1 -1
  194. package/lib/cjs/tests/api_tests/programs.test.js +417 -50
  195. package/lib/cjs/tests/api_tests/programs.test.js.map +1 -1
  196. package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts +10 -5
  197. package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -1
  198. package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js +401 -282
  199. package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -1
  200. package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts +9 -5
  201. package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -1
  202. package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js +228 -211
  203. package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -1
  204. package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +13 -8
  205. package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -1
  206. package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js +270 -254
  207. package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -1
  208. package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +16 -6
  209. package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -1
  210. package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +167 -142
  211. package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -1
  212. package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +10 -5
  213. package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -1
  214. package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js +296 -221
  215. package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -1
  216. package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +12 -5
  217. package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -1
  218. package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +221 -216
  219. package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -1
  220. package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts +11 -5
  221. package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts.map +1 -1
  222. package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js +300 -203
  223. package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js.map +1 -1
  224. package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts +11 -5
  225. package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -1
  226. package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js +415 -275
  227. package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js.map +1 -1
  228. package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts +11 -5
  229. package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -1
  230. package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js +347 -228
  231. package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -1
  232. package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +18 -7
  233. package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -1
  234. package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js +164 -75
  235. package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -1
  236. package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +15 -9
  237. package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -1
  238. package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +99 -102
  239. package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -1
  240. package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts +11 -5
  241. package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -1
  242. package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js +132 -89
  243. package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -1
  244. package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +12 -5
  245. package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -1
  246. package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +190 -138
  247. package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -1
  248. package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.d.ts +18 -16
  249. package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.d.ts.map +1 -1
  250. package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.js +164 -124
  251. package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.js.map +1 -1
  252. package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -1
  253. package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +122 -2
  254. package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -1
  255. package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +11 -5
  256. package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -1
  257. package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js +288 -274
  258. package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -1
  259. package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts +17 -10
  260. package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -1
  261. package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js +173 -138
  262. package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -1
  263. package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -5
  264. package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -1
  265. package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +310 -265
  266. package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -1
  267. package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts +9 -5
  268. package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -1
  269. package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js +108 -83
  270. package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js.map +1 -1
  271. package/lib/cjs/tests/api_tests/stedi_approval.test.d.ts +6 -5
  272. package/lib/cjs/tests/api_tests/stedi_approval.test.d.ts.map +1 -1
  273. package/lib/cjs/tests/api_tests/stedi_approval.test.js +206 -137
  274. package/lib/cjs/tests/api_tests/stedi_approval.test.js.map +1 -1
  275. package/lib/cjs/tests/api_tests/ticket_stage_archive.test.d.ts +7 -0
  276. package/lib/cjs/tests/api_tests/ticket_stage_archive.test.d.ts.map +1 -0
  277. package/lib/cjs/tests/api_tests/ticket_stage_archive.test.js +344 -0
  278. package/lib/cjs/tests/api_tests/ticket_stage_archive.test.js.map +1 -0
  279. package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts +6 -5
  280. package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts.map +1 -1
  281. package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.js +165 -149
  282. package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.js.map +1 -1
  283. package/lib/cjs/tests/api_tests/translations.test.d.ts +6 -5
  284. package/lib/cjs/tests/api_tests/translations.test.d.ts.map +1 -1
  285. package/lib/cjs/tests/api_tests/translations.test.js +104 -75
  286. package/lib/cjs/tests/api_tests/translations.test.js.map +1 -1
  287. package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.d.ts +21 -4
  288. package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.d.ts.map +1 -1
  289. package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.js +238 -370
  290. package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.js.map +1 -1
  291. package/lib/cjs/tests/api_tests/user_preferences.test.d.ts +30 -0
  292. package/lib/cjs/tests/api_tests/user_preferences.test.d.ts.map +1 -0
  293. package/lib/cjs/tests/api_tests/user_preferences.test.js +279 -0
  294. package/lib/cjs/tests/api_tests/user_preferences.test.js.map +1 -0
  295. package/lib/cjs/tests/api_tests/webhook_error_handling.test.d.ts +17 -5
  296. package/lib/cjs/tests/api_tests/webhook_error_handling.test.d.ts.map +1 -1
  297. package/lib/cjs/tests/api_tests/webhook_error_handling.test.js +204 -195
  298. package/lib/cjs/tests/api_tests/webhook_error_handling.test.js.map +1 -1
  299. package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.d.ts +15 -5
  300. package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.d.ts.map +1 -1
  301. package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.js +154 -179
  302. package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.js.map +1 -1
  303. package/lib/cjs/tests/api_tests/welle_partner_token.test.d.ts +6 -5
  304. package/lib/cjs/tests/api_tests/welle_partner_token.test.d.ts.map +1 -1
  305. package/lib/cjs/tests/api_tests/welle_partner_token.test.js +393 -251
  306. package/lib/cjs/tests/api_tests/welle_partner_token.test.js.map +1 -1
  307. package/lib/cjs/tests/setup_isolated.d.ts +7 -0
  308. package/lib/cjs/tests/setup_isolated.d.ts.map +1 -1
  309. package/lib/cjs/tests/setup_isolated.js.map +1 -1
  310. package/lib/cjs/tests/tests.d.ts.map +1 -1
  311. package/lib/cjs/tests/tests.js +229 -461
  312. package/lib/cjs/tests/tests.js.map +1 -1
  313. package/lib/cjs/tests/unit_tests/date_string_validation.test.d.ts +2 -0
  314. package/lib/cjs/tests/unit_tests/date_string_validation.test.d.ts.map +1 -0
  315. package/lib/cjs/tests/unit_tests/date_string_validation.test.js +112 -0
  316. package/lib/cjs/tests/unit_tests/date_string_validation.test.js.map +1 -0
  317. package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  318. package/lib/esm/sdk.d.ts +6 -5
  319. package/lib/esm/sdk.d.ts.map +1 -1
  320. package/lib/esm/sdk.js +5 -0
  321. package/lib/esm/sdk.js.map +1 -1
  322. package/lib/esm/tests/api_tests/ai_conversations.test.d.ts +14 -5
  323. package/lib/esm/tests/api_tests/ai_conversations.test.d.ts.map +1 -1
  324. package/lib/esm/tests/api_tests/ai_conversations.test.js +161 -148
  325. package/lib/esm/tests/api_tests/ai_conversations.test.js.map +1 -1
  326. package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.d.ts +22 -0
  327. package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.d.ts.map +1 -0
  328. package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.js +510 -0
  329. package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.js.map +1 -0
  330. package/lib/esm/tests/api_tests/appointment_link_expiration.test.d.ts +6 -5
  331. package/lib/esm/tests/api_tests/appointment_link_expiration.test.d.ts.map +1 -1
  332. package/lib/esm/tests/api_tests/appointment_link_expiration.test.js +132 -71
  333. package/lib/esm/tests/api_tests/appointment_link_expiration.test.js.map +1 -1
  334. package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.d.ts +6 -5
  335. package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.d.ts.map +1 -1
  336. package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.js +238 -173
  337. package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.js.map +1 -1
  338. package/lib/esm/tests/api_tests/availability_block_buffer.test.d.ts +22 -0
  339. package/lib/esm/tests/api_tests/availability_block_buffer.test.d.ts.map +1 -0
  340. package/lib/esm/tests/api_tests/availability_block_buffer.test.js +306 -0
  341. package/lib/esm/tests/api_tests/availability_block_buffer.test.js.map +1 -0
  342. package/lib/esm/tests/api_tests/beluga_manual_sync.test.d.ts +6 -5
  343. package/lib/esm/tests/api_tests/beluga_manual_sync.test.d.ts.map +1 -1
  344. package/lib/esm/tests/api_tests/beluga_manual_sync.test.js +232 -190
  345. package/lib/esm/tests/api_tests/beluga_manual_sync.test.js.map +1 -1
  346. package/lib/esm/tests/api_tests/beluga_trigger_refill.test.d.ts +6 -5
  347. package/lib/esm/tests/api_tests/beluga_trigger_refill.test.d.ts.map +1 -1
  348. package/lib/esm/tests/api_tests/beluga_trigger_refill.test.js +348 -262
  349. package/lib/esm/tests/api_tests/beluga_trigger_refill.test.js.map +1 -1
  350. package/lib/esm/tests/api_tests/bulk_assignment.test.d.ts +16 -5
  351. package/lib/esm/tests/api_tests/bulk_assignment.test.d.ts.map +1 -1
  352. package/lib/esm/tests/api_tests/bulk_assignment.test.js +333 -241
  353. package/lib/esm/tests/api_tests/bulk_assignment.test.js.map +1 -1
  354. package/lib/esm/tests/api_tests/calendar_event_references_update.test.d.ts +13 -5
  355. package/lib/esm/tests/api_tests/calendar_event_references_update.test.d.ts.map +1 -1
  356. package/lib/esm/tests/api_tests/calendar_event_references_update.test.js +129 -107
  357. package/lib/esm/tests/api_tests/calendar_event_references_update.test.js.map +1 -1
  358. package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.d.ts +15 -5
  359. package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.d.ts.map +1 -1
  360. package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.js +238 -251
  361. package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.js.map +1 -1
  362. package/lib/esm/tests/api_tests/chats_analytics.test.d.ts +14 -5
  363. package/lib/esm/tests/api_tests/chats_analytics.test.d.ts.map +1 -1
  364. package/lib/esm/tests/api_tests/chats_analytics.test.js +188 -188
  365. package/lib/esm/tests/api_tests/chats_analytics.test.js.map +1 -1
  366. package/lib/esm/tests/api_tests/concurrent_build_threads.test.d.ts +23 -5
  367. package/lib/esm/tests/api_tests/concurrent_build_threads.test.d.ts.map +1 -1
  368. package/lib/esm/tests/api_tests/concurrent_build_threads.test.js +119 -117
  369. package/lib/esm/tests/api_tests/concurrent_build_threads.test.js.map +1 -1
  370. package/lib/esm/tests/api_tests/configurations_public_read.test.d.ts +21 -5
  371. package/lib/esm/tests/api_tests/configurations_public_read.test.d.ts.map +1 -1
  372. package/lib/esm/tests/api_tests/configurations_public_read.test.js +233 -118
  373. package/lib/esm/tests/api_tests/configurations_public_read.test.js.map +1 -1
  374. package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts +7 -0
  375. package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts.map +1 -0
  376. package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.js +351 -0
  377. package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.js.map +1 -0
  378. package/lib/esm/tests/api_tests/create_note_action.test.d.ts +18 -5
  379. package/lib/esm/tests/api_tests/create_note_action.test.d.ts.map +1 -1
  380. package/lib/esm/tests/api_tests/create_note_action.test.js +216 -172
  381. package/lib/esm/tests/api_tests/create_note_action.test.js.map +1 -1
  382. package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.d.ts +17 -4
  383. package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.d.ts.map +1 -1
  384. package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.js +141 -203
  385. package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.js.map +1 -1
  386. package/lib/esm/tests/api_tests/custom_aggregation.test.d.ts +15 -5
  387. package/lib/esm/tests/api_tests/custom_aggregation.test.d.ts.map +1 -1
  388. package/lib/esm/tests/api_tests/custom_aggregation.test.js +282 -222
  389. package/lib/esm/tests/api_tests/custom_aggregation.test.js.map +1 -1
  390. package/lib/esm/tests/api_tests/database_cascade_delete.test.d.ts +13 -5
  391. package/lib/esm/tests/api_tests/database_cascade_delete.test.d.ts.map +1 -1
  392. package/lib/esm/tests/api_tests/database_cascade_delete.test.js +216 -241
  393. package/lib/esm/tests/api_tests/database_cascade_delete.test.js.map +1 -1
  394. package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts +21 -5
  395. package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts.map +1 -1
  396. package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.js +165 -110
  397. package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.js.map +1 -1
  398. package/lib/esm/tests/api_tests/elation_user_id.test.d.ts +17 -5
  399. package/lib/esm/tests/api_tests/elation_user_id.test.d.ts.map +1 -1
  400. package/lib/esm/tests/api_tests/elation_user_id.test.js +119 -53
  401. package/lib/esm/tests/api_tests/elation_user_id.test.js.map +1 -1
  402. package/lib/esm/tests/api_tests/file_download_unicode_names.test.d.ts +6 -5
  403. package/lib/esm/tests/api_tests/file_download_unicode_names.test.d.ts.map +1 -1
  404. package/lib/esm/tests/api_tests/file_download_unicode_names.test.js +190 -141
  405. package/lib/esm/tests/api_tests/file_download_unicode_names.test.js.map +1 -1
  406. package/lib/esm/tests/api_tests/form_intake_email_normalization.test.d.ts +7 -0
  407. package/lib/esm/tests/api_tests/form_intake_email_normalization.test.d.ts.map +1 -0
  408. package/lib/esm/tests/api_tests/form_intake_email_normalization.test.js +527 -0
  409. package/lib/esm/tests/api_tests/form_intake_email_normalization.test.js.map +1 -0
  410. package/lib/esm/tests/api_tests/form_submitted_trigger.test.d.ts +25 -5
  411. package/lib/esm/tests/api_tests/form_submitted_trigger.test.d.ts.map +1 -1
  412. package/lib/esm/tests/api_tests/form_submitted_trigger.test.js +393 -365
  413. package/lib/esm/tests/api_tests/form_submitted_trigger.test.js.map +1 -1
  414. package/lib/esm/tests/api_tests/form_translations.test.d.ts +6 -5
  415. package/lib/esm/tests/api_tests/form_translations.test.d.ts.map +1 -1
  416. package/lib/esm/tests/api_tests/form_translations.test.js +268 -189
  417. package/lib/esm/tests/api_tests/form_translations.test.js.map +1 -1
  418. package/lib/esm/tests/api_tests/formsort_header_auth.test.d.ts +29 -5
  419. package/lib/esm/tests/api_tests/formsort_header_auth.test.d.ts.map +1 -1
  420. package/lib/esm/tests/api_tests/formsort_header_auth.test.js +177 -161
  421. package/lib/esm/tests/api_tests/formsort_header_auth.test.js.map +1 -1
  422. package/lib/esm/tests/api_tests/gcal_sync_retry.test.d.ts +12 -6
  423. package/lib/esm/tests/api_tests/gcal_sync_retry.test.d.ts.map +1 -1
  424. package/lib/esm/tests/api_tests/gcal_sync_retry.test.js +96 -83
  425. package/lib/esm/tests/api_tests/gcal_sync_retry.test.js.map +1 -1
  426. package/lib/esm/tests/api_tests/get_some_projection.test.d.ts +20 -5
  427. package/lib/esm/tests/api_tests/get_some_projection.test.d.ts.map +1 -1
  428. package/lib/esm/tests/api_tests/get_some_projection.test.js +339 -296
  429. package/lib/esm/tests/api_tests/get_some_projection.test.js.map +1 -1
  430. package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.d.ts +6 -5
  431. package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.d.ts.map +1 -1
  432. package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.js +292 -222
  433. package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.js.map +1 -1
  434. package/lib/esm/tests/api_tests/integrations_redacted.test.d.ts +6 -5
  435. package/lib/esm/tests/api_tests/integrations_redacted.test.d.ts.map +1 -1
  436. package/lib/esm/tests/api_tests/integrations_redacted.test.js +304 -211
  437. package/lib/esm/tests/api_tests/integrations_redacted.test.js.map +1 -1
  438. package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.d.ts +6 -5
  439. package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.d.ts.map +1 -1
  440. package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.js +177 -154
  441. package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.js.map +1 -1
  442. package/lib/esm/tests/api_tests/load_team_chat.test.d.ts.map +1 -1
  443. package/lib/esm/tests/api_tests/load_team_chat.test.js +181 -124
  444. package/lib/esm/tests/api_tests/load_team_chat.test.js.map +1 -1
  445. package/lib/esm/tests/api_tests/load_threads_autobuild.test.d.ts +24 -5
  446. package/lib/esm/tests/api_tests/load_threads_autobuild.test.d.ts.map +1 -1
  447. package/lib/esm/tests/api_tests/load_threads_autobuild.test.js +259 -226
  448. package/lib/esm/tests/api_tests/load_threads_autobuild.test.js.map +1 -1
  449. package/lib/esm/tests/api_tests/load_threads_care_team.test.d.ts +6 -0
  450. package/lib/esm/tests/api_tests/load_threads_care_team.test.d.ts.map +1 -1
  451. package/lib/esm/tests/api_tests/load_threads_care_team.test.js +115 -31
  452. package/lib/esm/tests/api_tests/load_threads_care_team.test.js.map +1 -1
  453. package/lib/esm/tests/api_tests/managed_content_file_access.test.d.ts +15 -5
  454. package/lib/esm/tests/api_tests/managed_content_file_access.test.d.ts.map +1 -1
  455. package/lib/esm/tests/api_tests/managed_content_file_access.test.js +283 -287
  456. package/lib/esm/tests/api_tests/managed_content_file_access.test.js.map +1 -1
  457. package/lib/esm/tests/api_tests/mdb_sort.test.d.ts +20 -5
  458. package/lib/esm/tests/api_tests/mdb_sort.test.d.ts.map +1 -1
  459. package/lib/esm/tests/api_tests/mdb_sort.test.js +358 -303
  460. package/lib/esm/tests/api_tests/mdb_sort.test.js.map +1 -1
  461. package/lib/esm/tests/api_tests/mdi_manual_sync.test.d.ts +27 -0
  462. package/lib/esm/tests/api_tests/mdi_manual_sync.test.d.ts.map +1 -0
  463. package/lib/esm/tests/api_tests/mdi_manual_sync.test.js +390 -0
  464. package/lib/esm/tests/api_tests/mdi_manual_sync.test.js.map +1 -0
  465. package/lib/esm/tests/api_tests/mdi_trigger_refill.test.d.ts +6 -5
  466. package/lib/esm/tests/api_tests/mdi_trigger_refill.test.d.ts.map +1 -1
  467. package/lib/esm/tests/api_tests/mdi_trigger_refill.test.js +257 -208
  468. package/lib/esm/tests/api_tests/mdi_trigger_refill.test.js.map +1 -1
  469. package/lib/esm/tests/api_tests/mdi_webhooks.test.d.ts +12 -5
  470. package/lib/esm/tests/api_tests/mdi_webhooks.test.d.ts.map +1 -1
  471. package/lib/esm/tests/api_tests/mdi_webhooks.test.js +65 -60
  472. package/lib/esm/tests/api_tests/mdi_webhooks.test.js.map +1 -1
  473. package/lib/esm/tests/api_tests/message_assignment_trigger.test.d.ts +23 -14
  474. package/lib/esm/tests/api_tests/message_assignment_trigger.test.d.ts.map +1 -1
  475. package/lib/esm/tests/api_tests/message_assignment_trigger.test.js +256 -305
  476. package/lib/esm/tests/api_tests/message_assignment_trigger.test.js.map +1 -1
  477. package/lib/esm/tests/api_tests/metriport_push_form_response.test.d.ts +6 -5
  478. package/lib/esm/tests/api_tests/metriport_push_form_response.test.d.ts.map +1 -1
  479. package/lib/esm/tests/api_tests/metriport_push_form_response.test.js +298 -236
  480. package/lib/esm/tests/api_tests/metriport_push_form_response.test.js.map +1 -1
  481. package/lib/esm/tests/api_tests/organization_api_keys.test.d.ts.map +1 -1
  482. package/lib/esm/tests/api_tests/organization_api_keys.test.js +226 -59
  483. package/lib/esm/tests/api_tests/organization_api_keys.test.js.map +1 -1
  484. package/lib/esm/tests/api_tests/organization_settings_duplicates.test.d.ts +19 -5
  485. package/lib/esm/tests/api_tests/organization_settings_duplicates.test.d.ts.map +1 -1
  486. package/lib/esm/tests/api_tests/organization_settings_duplicates.test.js +332 -220
  487. package/lib/esm/tests/api_tests/organization_settings_duplicates.test.js.map +1 -1
  488. package/lib/esm/tests/api_tests/organization_signup.test.d.ts.map +1 -1
  489. package/lib/esm/tests/api_tests/organization_signup.test.js +218 -51
  490. package/lib/esm/tests/api_tests/organization_signup.test.js.map +1 -1
  491. package/lib/esm/tests/api_tests/out_of_office_endpoint.test.d.ts.map +1 -1
  492. package/lib/esm/tests/api_tests/out_of_office_endpoint.test.js +109 -1
  493. package/lib/esm/tests/api_tests/out_of_office_endpoint.test.js.map +1 -1
  494. package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.d.ts +6 -6
  495. package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.d.ts.map +1 -1
  496. package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.js +308 -361
  497. package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.js.map +1 -1
  498. package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.d.ts +6 -5
  499. package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.d.ts.map +1 -1
  500. package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.js +243 -163
  501. package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.js.map +1 -1
  502. package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.d.ts +15 -5
  503. package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.d.ts.map +1 -1
  504. package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.js +127 -45
  505. package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.js.map +1 -1
  506. package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.d.ts +6 -5
  507. package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.d.ts.map +1 -1
  508. package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.js +177 -130
  509. package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.js.map +1 -1
  510. package/lib/esm/tests/api_tests/programs.test.d.ts.map +1 -1
  511. package/lib/esm/tests/api_tests/programs.test.js +417 -50
  512. package/lib/esm/tests/api_tests/programs.test.js.map +1 -1
  513. package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts +10 -5
  514. package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -1
  515. package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js +399 -281
  516. package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -1
  517. package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts +9 -5
  518. package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -1
  519. package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js +225 -209
  520. package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -1
  521. package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +13 -8
  522. package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -1
  523. package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js +268 -253
  524. package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -1
  525. package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +16 -6
  526. package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -1
  527. package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +165 -141
  528. package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -1
  529. package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +10 -5
  530. package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -1
  531. package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js +294 -220
  532. package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -1
  533. package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +12 -5
  534. package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -1
  535. package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +219 -215
  536. package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -1
  537. package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts +11 -5
  538. package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts.map +1 -1
  539. package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js +298 -202
  540. package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js.map +1 -1
  541. package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts +11 -5
  542. package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -1
  543. package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js +413 -274
  544. package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js.map +1 -1
  545. package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts +11 -5
  546. package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -1
  547. package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js +345 -227
  548. package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -1
  549. package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +18 -7
  550. package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -1
  551. package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js +162 -74
  552. package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -1
  553. package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +15 -9
  554. package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -1
  555. package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +96 -100
  556. package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -1
  557. package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts +11 -5
  558. package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -1
  559. package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js +129 -87
  560. package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -1
  561. package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +12 -5
  562. package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -1
  563. package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +187 -136
  564. package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -1
  565. package/lib/esm/tests/api_tests/security/register_business_id_injection.test.d.ts +18 -16
  566. package/lib/esm/tests/api_tests/security/register_business_id_injection.test.d.ts.map +1 -1
  567. package/lib/esm/tests/api_tests/security/register_business_id_injection.test.js +162 -123
  568. package/lib/esm/tests/api_tests/security/register_business_id_injection.test.js.map +1 -1
  569. package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -1
  570. package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +122 -2
  571. package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -1
  572. package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +11 -5
  573. package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -1
  574. package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js +285 -272
  575. package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -1
  576. package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts +17 -10
  577. package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -1
  578. package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js +171 -137
  579. package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -1
  580. package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -5
  581. package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -1
  582. package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +307 -263
  583. package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -1
  584. package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts +9 -5
  585. package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -1
  586. package/lib/esm/tests/api_tests/security/webhook-timeout.test.js +105 -81
  587. package/lib/esm/tests/api_tests/security/webhook-timeout.test.js.map +1 -1
  588. package/lib/esm/tests/api_tests/stedi_approval.test.d.ts +6 -5
  589. package/lib/esm/tests/api_tests/stedi_approval.test.d.ts.map +1 -1
  590. package/lib/esm/tests/api_tests/stedi_approval.test.js +204 -136
  591. package/lib/esm/tests/api_tests/stedi_approval.test.js.map +1 -1
  592. package/lib/esm/tests/api_tests/ticket_stage_archive.test.d.ts +7 -0
  593. package/lib/esm/tests/api_tests/ticket_stage_archive.test.d.ts.map +1 -0
  594. package/lib/esm/tests/api_tests/ticket_stage_archive.test.js +339 -0
  595. package/lib/esm/tests/api_tests/ticket_stage_archive.test.js.map +1 -0
  596. package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts +6 -5
  597. package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts.map +1 -1
  598. package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.js +162 -147
  599. package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.js.map +1 -1
  600. package/lib/esm/tests/api_tests/translations.test.d.ts +6 -5
  601. package/lib/esm/tests/api_tests/translations.test.d.ts.map +1 -1
  602. package/lib/esm/tests/api_tests/translations.test.js +102 -74
  603. package/lib/esm/tests/api_tests/translations.test.js.map +1 -1
  604. package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.d.ts +21 -4
  605. package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.d.ts.map +1 -1
  606. package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.js +236 -369
  607. package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.js.map +1 -1
  608. package/lib/esm/tests/api_tests/user_preferences.test.d.ts +30 -0
  609. package/lib/esm/tests/api_tests/user_preferences.test.d.ts.map +1 -0
  610. package/lib/esm/tests/api_tests/user_preferences.test.js +274 -0
  611. package/lib/esm/tests/api_tests/user_preferences.test.js.map +1 -0
  612. package/lib/esm/tests/api_tests/webhook_error_handling.test.d.ts +17 -5
  613. package/lib/esm/tests/api_tests/webhook_error_handling.test.d.ts.map +1 -1
  614. package/lib/esm/tests/api_tests/webhook_error_handling.test.js +202 -194
  615. package/lib/esm/tests/api_tests/webhook_error_handling.test.js.map +1 -1
  616. package/lib/esm/tests/api_tests/webhook_raw_json_number.test.d.ts +15 -5
  617. package/lib/esm/tests/api_tests/webhook_raw_json_number.test.d.ts.map +1 -1
  618. package/lib/esm/tests/api_tests/webhook_raw_json_number.test.js +152 -178
  619. package/lib/esm/tests/api_tests/webhook_raw_json_number.test.js.map +1 -1
  620. package/lib/esm/tests/api_tests/welle_partner_token.test.d.ts +6 -5
  621. package/lib/esm/tests/api_tests/welle_partner_token.test.d.ts.map +1 -1
  622. package/lib/esm/tests/api_tests/welle_partner_token.test.js +391 -250
  623. package/lib/esm/tests/api_tests/welle_partner_token.test.js.map +1 -1
  624. package/lib/esm/tests/setup_isolated.d.ts +7 -0
  625. package/lib/esm/tests/setup_isolated.d.ts.map +1 -1
  626. package/lib/esm/tests/setup_isolated.js.map +1 -1
  627. package/lib/esm/tests/tests.d.ts.map +1 -1
  628. package/lib/esm/tests/tests.js +229 -461
  629. package/lib/esm/tests/tests.js.map +1 -1
  630. package/lib/esm/tests/unit_tests/date_string_validation.test.d.ts +2 -0
  631. package/lib/esm/tests/unit_tests/date_string_validation.test.d.ts.map +1 -0
  632. package/lib/esm/tests/unit_tests/date_string_validation.test.js +108 -0
  633. package/lib/esm/tests/unit_tests/date_string_validation.test.js.map +1 -0
  634. package/lib/tsconfig.tsbuildinfo +1 -1
  635. package/package.json +10 -10
  636. package/src/sdk.ts +14 -3
  637. package/src/tests/api_tests/ai_conversations.test.ts +170 -138
  638. package/src/tests/api_tests/ai_conversations_agent_message.test.ts +491 -0
  639. package/src/tests/api_tests/appointment_link_expiration.test.ts +94 -35
  640. package/src/tests/api_tests/appointment_no_showed_trigger.test.ts +181 -128
  641. package/src/tests/api_tests/availability_block_buffer.test.ts +286 -0
  642. package/src/tests/api_tests/beluga_manual_sync.test.ts +103 -53
  643. package/src/tests/api_tests/beluga_trigger_refill.test.ts +131 -46
  644. package/src/tests/api_tests/bulk_assignment.test.ts +307 -220
  645. package/src/tests/api_tests/calendar_event_references_update.test.ts +97 -54
  646. package/src/tests/api_tests/calendar_event_webhook_template.test.ts +198 -158
  647. package/src/tests/api_tests/chats_analytics.test.ts +161 -123
  648. package/src/tests/api_tests/concurrent_build_threads.test.ts +80 -69
  649. package/src/tests/api_tests/configurations_public_read.test.ts +154 -67
  650. package/src/tests/api_tests/copied_form_response_no_enduser_sync.test.ts +307 -0
  651. package/src/tests/api_tests/create_note_action.test.ts +149 -70
  652. package/src/tests/api_tests/create_user_notifications_trigger.test.ts +116 -144
  653. package/src/tests/api_tests/custom_aggregation.test.ts +163 -92
  654. package/src/tests/api_tests/database_cascade_delete.test.ts +101 -87
  655. package/src/tests/api_tests/dont_sync_to_elation_form_submission.test.ts +122 -51
  656. package/src/tests/api_tests/elation_user_id.test.ts +105 -42
  657. package/src/tests/api_tests/file_download_unicode_names.test.ts +171 -122
  658. package/src/tests/api_tests/form_intake_email_normalization.test.ts +489 -0
  659. package/src/tests/api_tests/form_submitted_trigger.test.ts +152 -86
  660. package/src/tests/api_tests/form_translations.test.ts +117 -48
  661. package/src/tests/api_tests/formsort_header_auth.test.ts +147 -97
  662. package/src/tests/api_tests/gcal_sync_retry.test.ts +71 -49
  663. package/src/tests/api_tests/get_some_projection.test.ts +333 -169
  664. package/src/tests/api_tests/group_event_attendee_self_update.test.ts +103 -52
  665. package/src/tests/api_tests/integrations_redacted.test.ts +161 -84
  666. package/src/tests/api_tests/journey_delete_cancels_actions.test.ts +93 -64
  667. package/src/tests/api_tests/load_team_chat.test.ts +62 -6
  668. package/src/tests/api_tests/load_threads_autobuild.test.ts +163 -67
  669. package/src/tests/api_tests/load_threads_care_team.test.ts +103 -0
  670. package/src/tests/api_tests/managed_content_file_access.test.ts +132 -108
  671. package/src/tests/api_tests/mdb_sort.test.ts +247 -161
  672. package/src/tests/api_tests/mdi_manual_sync.test.ts +277 -0
  673. package/src/tests/api_tests/mdi_trigger_refill.test.ts +132 -78
  674. package/src/tests/api_tests/mdi_webhooks.test.ts +52 -22
  675. package/src/tests/api_tests/message_assignment_trigger.test.ts +129 -155
  676. package/src/tests/api_tests/metriport_push_form_response.test.ts +109 -49
  677. package/src/tests/api_tests/organization_api_keys.test.ts +170 -2
  678. package/src/tests/api_tests/organization_settings_duplicates.test.ts +291 -181
  679. package/src/tests/api_tests/organization_signup.test.ts +170 -5
  680. package/src/tests/api_tests/out_of_office_endpoint.test.ts +98 -0
  681. package/src/tests/api_tests/outbound_chat_sent_trigger.test.ts +163 -175
  682. package/src/tests/api_tests/phone_calls_cold_transfer.test.ts +195 -133
  683. package/src/tests/api_tests/phone_calls_conference_hold.test.ts +112 -42
  684. package/src/tests/api_tests/phone_tree_enduser_condition.test.ts +81 -32
  685. package/src/tests/api_tests/programs.test.ts +350 -0
  686. package/src/tests/api_tests/security/ai-conversations-rbac.test.ts +248 -128
  687. package/src/tests/api_tests/security/automated-actions-process-gate.test.ts +47 -42
  688. package/src/tests/api_tests/security/booking-info-idor-token-mint.test.ts +53 -45
  689. package/src/tests/api_tests/security/cascade-role-rename-cross-tenant.test.ts +100 -73
  690. package/src/tests/api_tests/security/data-sync-redaction-bypass.test.ts +125 -59
  691. package/src/tests/api_tests/security/develop-health-benefit-verification-rbac.test.ts +131 -103
  692. package/src/tests/api_tests/security/enduser-ai-summary-trust-gate.test.ts +161 -68
  693. package/src/tests/api_tests/security/enduser-cross-create.test.ts +200 -61
  694. package/src/tests/api_tests/security/enduser-write-restrictions.test.ts +179 -61
  695. package/src/tests/api_tests/security/globalunique-conflict-redaction.test.ts +163 -44
  696. package/src/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.ts +78 -70
  697. package/src/tests/api_tests/security/load-inbox-redaction.test.ts +79 -44
  698. package/src/tests/api_tests/security/proxy-image-unauth-ssrf.test.ts +95 -52
  699. package/src/tests/api_tests/security/register_business_id_injection.test.ts +132 -93
  700. package/src/tests/api_tests/security/sanitize-user-html-with-iframes.test.ts +127 -0
  701. package/src/tests/api_tests/security/schema-adminonly-enforcement.test.ts +42 -37
  702. package/src/tests/api_tests/security/self-admin-role-assignment.test.ts +92 -54
  703. package/src/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.ts +76 -34
  704. package/src/tests/api_tests/security/webhook-timeout.test.ts +67 -36
  705. package/src/tests/api_tests/stedi_approval.test.ts +156 -90
  706. package/src/tests/api_tests/ticket_stage_archive.test.ts +314 -0
  707. package/src/tests/api_tests/tickets_bulk_assign_care_team.test.ts +138 -103
  708. package/src/tests/api_tests/translations.test.ts +69 -46
  709. package/src/tests/api_tests/trigger_set_fields_date_difference.test.ts +198 -256
  710. package/src/tests/api_tests/user_preferences.test.ts +227 -0
  711. package/src/tests/api_tests/webhook_error_handling.test.ts +121 -60
  712. package/src/tests/api_tests/webhook_raw_json_number.test.ts +127 -109
  713. package/src/tests/api_tests/welle_partner_token.test.ts +217 -90
  714. package/src/tests/setup_isolated.ts +7 -0
  715. package/src/tests/tests.ts +41 -147
  716. package/src/tests/{api_tests → unit_tests}/date_string_validation.test.ts +2 -23
  717. package/test_generated.pdf +0 -0
@@ -44,319 +44,362 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
44
44
  return to.concat(ar || Array.prototype.slice.call(from));
45
45
  };
46
46
  require('source-map-support').install();
47
- import { Session } from "../../sdk";
48
- import { assert, async_test, log_header, } from "@tellescope/testing";
49
- import { setup_tests } from "../setup";
47
+ import { assert_checks, setup_isolated_tenant, } from "../setup_isolated";
50
48
  var host = process.env.API_URL || 'http://localhost:8080';
51
- // Main test function that can be called independently
52
- export var get_some_projection_tests = function (_a) {
53
- var sdk = _a.sdk, sdkNonAdmin = _a.sdkNonAdmin;
54
- return __awaiter(void 0, void 0, void 0, function () {
55
- var testEnduser, observationIds, obs1, obs2, obs3, _i, observationIds_1, obsId, error_1, deleteError_1;
56
- return __generator(this, function (_b) {
57
- switch (_b.label) {
58
- case 0:
59
- log_header("getSome Projection Support");
60
- return [4 /*yield*/, sdk.api.endusers.createOne({ fname: 'ProjectionTest', lname: 'User', email: 'projection-test@tellescope.com' })];
61
- case 1:
62
- testEnduser = _b.sent();
63
- observationIds = [];
64
- _b.label = 2;
65
- case 2:
66
- _b.trys.push([2, , 13, 25]);
67
- return [4 /*yield*/, sdk.api.enduser_observations.createOne({
68
- enduserId: testEnduser.id,
69
- status: 'final',
70
- category: 'vital-signs',
71
- measurement: { value: 120, unit: 'mmHg' },
72
- })];
73
- case 3:
74
- obs1 = _b.sent();
75
- return [4 /*yield*/, sdk.api.enduser_observations.createOne({
76
- enduserId: testEnduser.id,
77
- status: 'final',
78
- category: 'vital-signs',
79
- measurement: { value: 80, unit: 'mmHg' },
80
- })];
81
- case 4:
82
- obs2 = _b.sent();
83
- return [4 /*yield*/, sdk.api.enduser_observations.createOne({
84
- enduserId: testEnduser.id,
85
- status: 'final',
86
- category: 'vital-signs',
87
- measurement: { value: 98, unit: 'bpm' },
88
- })];
89
- case 5:
90
- obs3 = _b.sent();
91
- observationIds = [obs1.id, obs2.id, obs3.id];
49
+ var RAND = function () { return Math.random().toString(36).slice(2, 10); };
50
+ var PROJECTION_TEST_EMAIL = 'projection-test@tellescope.com';
51
+ /**
52
+ * getSome `projection` coverage: which fields come back for an inclusion projection, for no
53
+ * projection, for an empty projection, alongside filter/limit/sortBy, across lastId pagination, on a
54
+ * second model (endusers), and for a non-admin session.
55
+ *
56
+ * Runs on its own provisioned tenant. Every check counts records — three observations, one enduser
57
+ * at a FIXED email address — so on the shared fixture org a concurrently running suite's observation
58
+ * or a leftover projection-test@tellescope.com enduser changed the counts. Owning the tenant is also
59
+ * what lets the enduser lookup assert an exact count instead of `>= 1`.
60
+ *
61
+ * Each former async_test's nested `assert` calls became one Check each: `assert` calls process.exit,
62
+ * which inside a pooled `run` would skip every concurrently running suite's teardown and strand its
63
+ * tenant permanently.
64
+ */
65
+ export var get_some_projection_checks = function () { return __awaiter(void 0, void 0, void 0, function () {
66
+ var checks, record, describe, errorMessage, presentIn, step, tenant, sdk_1, sdkNonAdmin_1, testEnduser_1, e_1, e_2;
67
+ return __generator(this, function (_a) {
68
+ switch (_a.label) {
69
+ case 0:
70
+ checks = [];
71
+ record = function (label, pass, detail) { return checks.push({ label: label, pass: pass, detail: detail }); };
72
+ describe = function (value) {
73
+ if (value === undefined || value === null)
74
+ return String(value);
75
+ var stringified = JSON.stringify(value);
76
+ return stringified === undefined ? String(value) : stringified;
77
+ };
78
+ errorMessage = function (e) { return (typeof (e === null || e === void 0 ? void 0 : e.message) === 'string' && e.message !== '' ? e.message : describe(e)); };
79
+ presentIn = function (results, get) { return ("present in ".concat(results.filter(function (r) { return get(r) !== undefined; }).length, " of ").concat(results.length)); };
80
+ step = function (name, body) { return __awaiter(void 0, void 0, void 0, function () {
81
+ var e_3;
82
+ return __generator(this, function (_a) {
83
+ switch (_a.label) {
84
+ case 0:
85
+ _a.trys.push([0, 2, , 3]);
86
+ return [4 /*yield*/, body()];
87
+ case 1:
88
+ _a.sent();
89
+ return [3 /*break*/, 3];
90
+ case 2:
91
+ e_3 = _a.sent();
92
+ record("".concat(name, ": block ran to completion"), false, "threw: ".concat(errorMessage(e_3)));
93
+ return [3 /*break*/, 3];
94
+ case 3: return [2 /*return*/];
95
+ }
96
+ });
97
+ }); };
98
+ _a.label = 1;
99
+ case 1:
100
+ _a.trys.push([1, , 17, 22]);
101
+ return [4 /*yield*/, setup_isolated_tenant({
102
+ name: "getSome projection ".concat(RAND()),
103
+ users: [{ isAdmin: true }, { roles: ['Non-Admin'] }],
104
+ apiKeys: 0,
105
+ })];
106
+ case 2:
107
+ tenant = _a.sent();
108
+ sdk_1 = tenant.sdk, sdkNonAdmin_1 = tenant.sdkNonAdmin;
109
+ _a.label = 3;
110
+ case 3:
111
+ _a.trys.push([3, 15, , 16]);
112
+ return [4 /*yield*/, sdk_1.api.endusers.createOne({
113
+ fname: 'ProjectionTest', lname: 'User', email: PROJECTION_TEST_EMAIL,
114
+ assignedTo: [tenant.users[1].id],
115
+ })
116
+ // Create test observations
117
+ ];
118
+ case 4:
119
+ testEnduser_1 = _a.sent();
120
+ // Create test observations
121
+ return [4 /*yield*/, sdk_1.api.enduser_observations.createOne({
122
+ enduserId: testEnduser_1.id,
123
+ status: 'final',
124
+ category: 'vital-signs',
125
+ measurement: { value: 120, unit: 'mmHg' },
126
+ })];
127
+ case 5:
128
+ // Create test observations
129
+ _a.sent();
130
+ return [4 /*yield*/, sdk_1.api.enduser_observations.createOne({
131
+ enduserId: testEnduser_1.id,
132
+ status: 'final',
133
+ category: 'vital-signs',
134
+ measurement: { value: 80, unit: 'mmHg' },
135
+ })];
136
+ case 6:
137
+ _a.sent();
138
+ return [4 /*yield*/, sdk_1.api.enduser_observations.createOne({
139
+ enduserId: testEnduser_1.id,
140
+ status: 'final',
141
+ category: 'vital-signs',
142
+ measurement: { value: 98, unit: 'bpm' },
143
+ })
92
144
  // Test 1: Inclusion projection returns only specified fields
93
- return [4 /*yield*/, async_test('projection-inclusion', function () { return __awaiter(void 0, void 0, void 0, function () {
94
- var results, _i, results_1, r;
95
- return __generator(this, function (_a) {
96
- switch (_a.label) {
97
- case 0: return [4 /*yield*/, sdk.api.enduser_observations.getSome({
98
- filter: { enduserId: testEnduser.id },
99
- projection: { timestamp: 1, measurement: 1, enduserId: 1 },
100
- })];
101
- case 1:
102
- results = _a.sent();
103
- assert(results.length === 3, 'Expected 3 observations with projection', 'Got correct count with projection');
104
- for (_i = 0, results_1 = results; _i < results_1.length; _i++) {
105
- r = results_1[_i];
106
- assert(r.id !== undefined, 'id should always be present');
107
- assert(r.createdAt !== undefined, 'createdAt should always be present');
108
- assert(r.measurement !== undefined, 'measurement should be present in projection');
109
- assert(r.enduserId !== undefined, 'enduserId should be present in projection');
110
- assert(r.timestamp !== undefined, 'timestamp should be present in projection');
111
- // Fields NOT in projection should be excluded
112
- assert(r.status === undefined, 'status should NOT be present when not in projection');
113
- assert(r.category === undefined, 'category should NOT be present when not in projection');
114
- }
115
- return [2 /*return*/, results];
116
- }
117
- });
118
- }); }, { onResult: function () { return true; } })
119
- // Test 2: No projection returns all fields (backward compatibility)
120
- ];
121
- case 6:
122
- // Test 1: Inclusion projection returns only specified fields
123
- _b.sent();
145
+ ];
146
+ case 7:
147
+ _a.sent();
148
+ // Test 1: Inclusion projection returns only specified fields
149
+ return [4 /*yield*/, step('projection-inclusion', function () { return __awaiter(void 0, void 0, void 0, function () {
150
+ var results;
151
+ return __generator(this, function (_a) {
152
+ switch (_a.label) {
153
+ case 0: return [4 /*yield*/, sdk_1.api.enduser_observations.getSome({
154
+ filter: { enduserId: testEnduser_1.id },
155
+ projection: { timestamp: 1, measurement: 1, enduserId: 1 },
156
+ })];
157
+ case 1:
158
+ results = _a.sent();
159
+ record('projection-inclusion: Expected 3 observations with projection', results.length === 3, "length=".concat(results.length));
160
+ // One Check per nested assert, evaluated over every returned record rather than once per
161
+ // record, so the labels stay one-to-one with the original asserts.
162
+ record('projection-inclusion: id should always be present', results.every(function (r) { return r.id !== undefined; }), "ids=".concat(describe(results.map(function (r) { return r.id; }))));
163
+ record('projection-inclusion: createdAt should always be present', results.every(function (r) { return r.createdAt !== undefined; }), "createdAts=".concat(describe(results.map(function (r) { return r.createdAt; }))));
164
+ record('projection-inclusion: measurement should be present in projection', results.every(function (r) { return r.measurement !== undefined; }), "measurements=".concat(describe(results.map(function (r) { return r.measurement; }))));
165
+ record('projection-inclusion: enduserId should be present in projection', results.every(function (r) { return r.enduserId !== undefined; }), "enduserIds=".concat(describe(results.map(function (r) { return r.enduserId; }))));
166
+ record('projection-inclusion: timestamp should be present in projection', results.every(function (r) { return r.timestamp !== undefined; }), "timestamps=".concat(describe(results.map(function (r) { return r.timestamp; }))));
167
+ // Fields NOT in projection should be excluded
168
+ record('projection-inclusion: status should NOT be present when not in projection', results.every(function (r) { return r.status === undefined; }), "status ".concat(presentIn(results, function (r) { return r.status; })));
169
+ record('projection-inclusion: category should NOT be present when not in projection', results.every(function (r) { return r.category === undefined; }), "category ".concat(presentIn(results, function (r) { return r.category; })));
170
+ return [2 /*return*/];
171
+ }
172
+ });
173
+ }); })
124
174
  // Test 2: No projection returns all fields (backward compatibility)
125
- return [4 /*yield*/, async_test('no-projection-returns-all-fields', function () { return __awaiter(void 0, void 0, void 0, function () {
126
- var results, _i, results_2, r;
127
- return __generator(this, function (_a) {
128
- switch (_a.label) {
129
- case 0: return [4 /*yield*/, sdk.api.enduser_observations.getSome({
130
- filter: { enduserId: testEnduser.id },
131
- })];
132
- case 1:
133
- results = _a.sent();
134
- assert(results.length === 3, 'Expected 3 observations without projection');
135
- for (_i = 0, results_2 = results; _i < results_2.length; _i++) {
136
- r = results_2[_i];
137
- assert(r.id !== undefined, 'id should be present');
138
- assert(r.status !== undefined, 'status should be present without projection');
139
- assert(r.category !== undefined, 'category should be present without projection');
140
- assert(r.measurement !== undefined, 'measurement should be present without projection');
141
- assert(r.enduserId !== undefined, 'enduserId should be present without projection');
142
- }
143
- return [2 /*return*/, results];
144
- }
145
- });
146
- }); }, { onResult: function () { return true; } })
147
- // Test 3: Projection with other filters (filter, limit, sortBy)
148
- ];
149
- case 7:
150
- // Test 2: No projection returns all fields (backward compatibility)
151
- _b.sent();
152
- // Test 3: Projection with other filters (filter, limit, sortBy)
153
- return [4 /*yield*/, async_test('projection-with-filters', function () { return __awaiter(void 0, void 0, void 0, function () {
154
- var results, _i, results_3, r;
155
- return __generator(this, function (_a) {
156
- switch (_a.label) {
157
- case 0: return [4 /*yield*/, sdk.api.enduser_observations.getSome({
158
- filter: { enduserId: testEnduser.id },
159
- projection: { measurement: 1 },
160
- limit: 2,
161
- sortBy: 'timestamp',
162
- })];
163
- case 1:
164
- results = _a.sent();
165
- assert(results.length === 2, 'Expected 2 observations with limit=2', "Got ".concat(results.length));
166
- for (_i = 0, results_3 = results; _i < results_3.length; _i++) {
167
- r = results_3[_i];
168
- assert(r.measurement !== undefined, 'measurement should be present in projection');
169
- assert(r.status === undefined, 'status should NOT be present when not in projection');
170
- }
171
- return [2 /*return*/, results];
172
- }
173
- });
174
- }); }, { onResult: function () { return true; } })
175
- // Test 4: Projection works across different models (endusers)
176
- ];
177
- case 8:
175
+ ];
176
+ case 8:
177
+ // Test 1: Inclusion projection returns only specified fields
178
+ _a.sent();
179
+ // Test 2: No projection returns all fields (backward compatibility)
180
+ return [4 /*yield*/, step('no-projection-returns-all-fields', function () { return __awaiter(void 0, void 0, void 0, function () {
181
+ var results;
182
+ return __generator(this, function (_a) {
183
+ switch (_a.label) {
184
+ case 0: return [4 /*yield*/, sdk_1.api.enduser_observations.getSome({
185
+ filter: { enduserId: testEnduser_1.id },
186
+ })];
187
+ case 1:
188
+ results = _a.sent();
189
+ record('no-projection-returns-all-fields: Expected 3 observations without projection', results.length === 3, "length=".concat(results.length));
190
+ record('no-projection-returns-all-fields: id should be present', results.every(function (r) { return r.id !== undefined; }), "ids=".concat(describe(results.map(function (r) { return r.id; }))));
191
+ record('no-projection-returns-all-fields: status should be present without projection', results.every(function (r) { return r.status !== undefined; }), "statuses=".concat(describe(results.map(function (r) { return r.status; }))));
192
+ record('no-projection-returns-all-fields: category should be present without projection', results.every(function (r) { return r.category !== undefined; }), "categories=".concat(describe(results.map(function (r) { return r.category; }))));
193
+ record('no-projection-returns-all-fields: measurement should be present without projection', results.every(function (r) { return r.measurement !== undefined; }), "measurements=".concat(describe(results.map(function (r) { return r.measurement; }))));
194
+ record('no-projection-returns-all-fields: enduserId should be present without projection', results.every(function (r) { return r.enduserId !== undefined; }), "enduserIds=".concat(describe(results.map(function (r) { return r.enduserId; }))));
195
+ return [2 /*return*/];
196
+ }
197
+ });
198
+ }); })
178
199
  // Test 3: Projection with other filters (filter, limit, sortBy)
179
- _b.sent();
200
+ ];
201
+ case 9:
202
+ // Test 2: No projection returns all fields (backward compatibility)
203
+ _a.sent();
204
+ // Test 3: Projection with other filters (filter, limit, sortBy)
205
+ return [4 /*yield*/, step('projection-with-filters', function () { return __awaiter(void 0, void 0, void 0, function () {
206
+ var results;
207
+ return __generator(this, function (_a) {
208
+ switch (_a.label) {
209
+ case 0: return [4 /*yield*/, sdk_1.api.enduser_observations.getSome({
210
+ filter: { enduserId: testEnduser_1.id },
211
+ projection: { measurement: 1 },
212
+ limit: 2,
213
+ sortBy: 'timestamp',
214
+ })];
215
+ case 1:
216
+ results = _a.sent();
217
+ record('projection-with-filters: Expected 2 observations with limit=2', results.length === 2, "Got ".concat(results.length));
218
+ record('projection-with-filters: measurement should be present in projection', results.every(function (r) { return r.measurement !== undefined; }), "measurements=".concat(describe(results.map(function (r) { return r.measurement; }))));
219
+ record('projection-with-filters: status should NOT be present when not in projection', results.every(function (r) { return r.status === undefined; }), "status ".concat(presentIn(results, function (r) { return r.status; })));
220
+ return [2 /*return*/];
221
+ }
222
+ });
223
+ }); })
180
224
  // Test 4: Projection works across different models (endusers)
181
- return [4 /*yield*/, async_test('projection-on-endusers', function () { return __awaiter(void 0, void 0, void 0, function () {
182
- var results, enduser;
183
- return __generator(this, function (_a) {
184
- switch (_a.label) {
185
- case 0: return [4 /*yield*/, sdk.api.endusers.getSome({
186
- filter: { email: 'projection-test@tellescope.com' },
187
- projection: { fname: 1, email: 1 },
188
- })];
189
- case 1:
190
- results = _a.sent();
191
- assert(results.length >= 1, 'Expected at least 1 enduser');
192
- enduser = results[0];
193
- assert(enduser.id !== undefined, 'id should always be present');
194
- assert(enduser.fname !== undefined, 'fname should be present in projection');
195
- assert(enduser.email !== undefined, 'email should be present in projection');
196
- assert(enduser.lname === undefined, 'lname should NOT be present when not in projection');
197
- return [2 /*return*/, results];
198
- }
199
- });
200
- }); }, { onResult: function () { return true; } })
201
- // Test 5: Projection with pagination (lastId)
202
- ];
203
- case 9:
204
- // Test 4: Projection works across different models (endusers)
205
- _b.sent();
225
+ ];
226
+ case 10:
227
+ // Test 3: Projection with other filters (filter, limit, sortBy)
228
+ _a.sent();
229
+ // Test 4: Projection works across different models (endusers)
230
+ return [4 /*yield*/, step('projection-on-endusers', function () { return __awaiter(void 0, void 0, void 0, function () {
231
+ var results, enduser;
232
+ return __generator(this, function (_a) {
233
+ switch (_a.label) {
234
+ case 0: return [4 /*yield*/, sdk_1.api.endusers.getSome({
235
+ filter: { email: PROJECTION_TEST_EMAIL },
236
+ projection: { fname: 1, email: 1 },
237
+ })
238
+ // Tightened from the shared-org version's `>= 1`: this tenant has exactly one enduser, so an
239
+ // exact count is unambiguous here and a stray second match is now a real failure.
240
+ ];
241
+ case 1:
242
+ results = _a.sent();
243
+ // Tightened from the shared-org version's `>= 1`: this tenant has exactly one enduser, so an
244
+ // exact count is unambiguous here and a stray second match is now a real failure.
245
+ record('projection-on-endusers: Expected exactly 1 enduser', results.length === 1, "length=".concat(results.length));
246
+ enduser = results[0];
247
+ record('projection-on-endusers: id should always be present', (enduser === null || enduser === void 0 ? void 0 : enduser.id) !== undefined, "id=".concat(describe(enduser === null || enduser === void 0 ? void 0 : enduser.id)));
248
+ record('projection-on-endusers: fname should be present in projection', (enduser === null || enduser === void 0 ? void 0 : enduser.fname) !== undefined, "fname=".concat(describe(enduser === null || enduser === void 0 ? void 0 : enduser.fname)));
249
+ record('projection-on-endusers: email should be present in projection', (enduser === null || enduser === void 0 ? void 0 : enduser.email) !== undefined, "email=".concat(describe(enduser === null || enduser === void 0 ? void 0 : enduser.email)));
250
+ record('projection-on-endusers: lname should NOT be present when not in projection', (enduser === null || enduser === void 0 ? void 0 : enduser.lname) === undefined, "lname=".concat(describe(enduser === null || enduser === void 0 ? void 0 : enduser.lname)));
251
+ return [2 /*return*/];
252
+ }
253
+ });
254
+ }); })
206
255
  // Test 5: Projection with pagination (lastId)
207
- return [4 /*yield*/, async_test('projection-with-pagination', function () { return __awaiter(void 0, void 0, void 0, function () {
208
- var page1, lastId, page2, _i, _a, r;
209
- return __generator(this, function (_b) {
210
- switch (_b.label) {
211
- case 0: return [4 /*yield*/, sdk.api.enduser_observations.getSome({
212
- filter: { enduserId: testEnduser.id },
256
+ ];
257
+ case 11:
258
+ // Test 4: Projection works across different models (endusers)
259
+ _a.sent();
260
+ // Test 5: Projection with pagination (lastId)
261
+ return [4 /*yield*/, step('projection-with-pagination', function () { return __awaiter(void 0, void 0, void 0, function () {
262
+ var page1, lastId, page2, bothPages;
263
+ var _a;
264
+ return __generator(this, function (_b) {
265
+ switch (_b.label) {
266
+ case 0: return [4 /*yield*/, sdk_1.api.enduser_observations.getSome({
267
+ filter: { enduserId: testEnduser_1.id },
268
+ projection: { measurement: 1, enduserId: 1 },
269
+ limit: 2,
270
+ sort: 'oldFirst',
271
+ })];
272
+ case 1:
273
+ page1 = _b.sent();
274
+ record('projection-with-pagination: Expected 2 observations on first page', page1.length === 2, "length=".concat(page1.length));
275
+ lastId = (_a = page1[page1.length - 1]) === null || _a === void 0 ? void 0 : _a.id;
276
+ return [4 /*yield*/, sdk_1.api.enduser_observations.getSome({
277
+ filter: { enduserId: testEnduser_1.id },
213
278
  projection: { measurement: 1, enduserId: 1 },
214
279
  limit: 2,
215
280
  sort: 'oldFirst',
281
+ lastId: lastId,
216
282
  })];
217
- case 1:
218
- page1 = _b.sent();
219
- assert(page1.length === 2, 'Expected 2 observations on first page');
220
- lastId = page1[page1.length - 1].id;
221
- return [4 /*yield*/, sdk.api.enduser_observations.getSome({
222
- filter: { enduserId: testEnduser.id },
223
- projection: { measurement: 1, enduserId: 1 },
224
- limit: 2,
225
- sort: 'oldFirst',
226
- lastId: lastId,
227
- })];
228
- case 2:
229
- page2 = _b.sent();
230
- assert(page2.length === 1, 'Expected 1 observation on second page');
231
- // Verify consistent fields across pages
232
- for (_i = 0, _a = __spreadArray(__spreadArray([], page1, true), page2, true); _i < _a.length; _i++) {
233
- r = _a[_i];
234
- assert(r.measurement !== undefined, 'measurement should be present across pages');
235
- assert(r.enduserId !== undefined, 'enduserId should be present across pages');
236
- assert(r.status === undefined, 'status should NOT be present across pages');
237
- }
238
- return [2 /*return*/, __spreadArray(__spreadArray([], page1, true), page2, true)];
239
- }
240
- });
241
- }); }, { onResult: function () { return true; } })
242
- // Test 6: Empty projection returns all fields (no crash)
243
- ];
244
- case 10:
245
- // Test 5: Projection with pagination (lastId)
246
- _b.sent();
283
+ case 2:
284
+ page2 = _b.sent();
285
+ record('projection-with-pagination: Expected 1 observation on second page', page2.length === 1, "length=".concat(page2.length, " (lastId=").concat(describe(lastId), ")"));
286
+ bothPages = __spreadArray(__spreadArray([], page1, true), page2, true);
287
+ record('projection-with-pagination: measurement should be present across pages', bothPages.every(function (r) { return r.measurement !== undefined; }), "measurements=".concat(describe(bothPages.map(function (r) { return r.measurement; }))));
288
+ record('projection-with-pagination: enduserId should be present across pages', bothPages.every(function (r) { return r.enduserId !== undefined; }), "enduserIds=".concat(describe(bothPages.map(function (r) { return r.enduserId; }))));
289
+ record('projection-with-pagination: status should NOT be present across pages', bothPages.every(function (r) { return r.status === undefined; }), "status ".concat(presentIn(bothPages, function (r) { return r.status; })));
290
+ return [2 /*return*/];
291
+ }
292
+ });
293
+ }); })
247
294
  // Test 6: Empty projection returns all fields (no crash)
248
- return [4 /*yield*/, async_test('empty-projection', function () { return __awaiter(void 0, void 0, void 0, function () {
249
- var results, _i, results_4, r;
250
- return __generator(this, function (_a) {
251
- switch (_a.label) {
252
- case 0: return [4 /*yield*/, sdk.api.enduser_observations.getSome({
253
- filter: { enduserId: testEnduser.id },
254
- projection: {},
255
- })];
256
- case 1:
257
- results = _a.sent();
258
- assert(results.length === 3, 'Expected 3 observations with empty projection');
259
- for (_i = 0, results_4 = results; _i < results_4.length; _i++) {
260
- r = results_4[_i];
261
- assert(r.status !== undefined, 'status should be present with empty projection');
262
- assert(r.category !== undefined, 'category should be present with empty projection');
263
- assert(r.measurement !== undefined, 'measurement should be present with empty projection');
264
- }
265
- return [2 /*return*/, results];
266
- }
267
- });
268
- }); }, { onResult: function () { return true; } })
269
- // Test 7: Non-admin access with projection (RBA still applies)
270
- ];
271
- case 11:
272
- // Test 6: Empty projection returns all fields (no crash)
273
- _b.sent();
295
+ ];
296
+ case 12:
297
+ // Test 5: Projection with pagination (lastId)
298
+ _a.sent();
299
+ // Test 6: Empty projection returns all fields (no crash)
300
+ return [4 /*yield*/, step('empty-projection', function () { return __awaiter(void 0, void 0, void 0, function () {
301
+ var results;
302
+ return __generator(this, function (_a) {
303
+ switch (_a.label) {
304
+ case 0: return [4 /*yield*/, sdk_1.api.enduser_observations.getSome({
305
+ filter: { enduserId: testEnduser_1.id },
306
+ projection: {},
307
+ })];
308
+ case 1:
309
+ results = _a.sent();
310
+ record('empty-projection: Expected 3 observations with empty projection', results.length === 3, "length=".concat(results.length));
311
+ record('empty-projection: status should be present with empty projection', results.every(function (r) { return r.status !== undefined; }), "statuses=".concat(describe(results.map(function (r) { return r.status; }))));
312
+ record('empty-projection: category should be present with empty projection', results.every(function (r) { return r.category !== undefined; }), "categories=".concat(describe(results.map(function (r) { return r.category; }))));
313
+ record('empty-projection: measurement should be present with empty projection', results.every(function (r) { return r.measurement !== undefined; }), "measurements=".concat(describe(results.map(function (r) { return r.measurement; }))));
314
+ return [2 /*return*/];
315
+ }
316
+ });
317
+ }); })
274
318
  // Test 7: Non-admin access with projection (RBA still applies)
275
- return [4 /*yield*/, async_test('non-admin-projection', function () { return __awaiter(void 0, void 0, void 0, function () {
276
- var results, _i, results_5, r;
277
- return __generator(this, function (_a) {
278
- switch (_a.label) {
279
- case 0: return [4 /*yield*/, sdkNonAdmin.api.enduser_observations.getSome({
280
- filter: { enduserId: testEnduser.id },
281
- projection: { measurement: 1, enduserId: 1 },
282
- })
283
- // Non-admin should still get results (RBA should apply)
284
- ];
285
- case 1:
286
- results = _a.sent();
287
- // Non-admin should still get results (RBA should apply)
288
- assert(Array.isArray(results), 'Non-admin should receive an array response');
289
- for (_i = 0, results_5 = results; _i < results_5.length; _i++) {
290
- r = results_5[_i];
291
- assert(r.measurement !== undefined, 'measurement should be present for non-admin projection');
292
- assert(r.enduserId !== undefined, 'enduserId should be present for non-admin projection');
293
- }
294
- return [2 /*return*/, results];
295
- }
296
- });
297
- }); }, { onResult: function () { return true; } })];
298
- case 12:
299
- // Test 7: Non-admin access with projection (RBA still applies)
300
- _b.sent();
301
- return [3 /*break*/, 25];
302
- case 13:
303
- _b.trys.push([13, 19, , 24]);
304
- _i = 0, observationIds_1 = observationIds;
305
- _b.label = 14;
306
- case 14:
307
- if (!(_i < observationIds_1.length)) return [3 /*break*/, 17];
308
- obsId = observationIds_1[_i];
309
- return [4 /*yield*/, sdk.api.enduser_observations.deleteOne(obsId)];
310
- case 15:
311
- _b.sent();
312
- _b.label = 16;
313
- case 16:
314
- _i++;
315
- return [3 /*break*/, 14];
316
- case 17: return [4 /*yield*/, sdk.api.endusers.deleteOne(testEnduser.id)];
317
- case 18:
318
- _b.sent();
319
- return [3 /*break*/, 24];
320
- case 19:
321
- error_1 = _b.sent();
322
- console.error('Cleanup error:', error_1);
323
- _b.label = 20;
324
- case 20:
325
- _b.trys.push([20, 22, , 23]);
326
- return [4 /*yield*/, sdk.api.endusers.deleteOne(testEnduser.id)];
327
- case 21:
328
- _b.sent();
329
- return [3 /*break*/, 23];
330
- case 22:
331
- deleteError_1 = _b.sent();
332
- console.error('Failed to delete test enduser:', deleteError_1);
333
- return [3 /*break*/, 23];
334
- case 23: return [3 /*break*/, 24];
335
- case 24: return [7 /*endfinally*/];
336
- case 25: return [2 /*return*/];
337
- }
338
- });
319
+ ];
320
+ case 13:
321
+ // Test 6: Empty projection returns all fields (no crash)
322
+ _a.sent();
323
+ // Test 7: Non-admin access with projection (RBA still applies)
324
+ return [4 /*yield*/, step('non-admin-projection', function () { return __awaiter(void 0, void 0, void 0, function () {
325
+ var results;
326
+ return __generator(this, function (_a) {
327
+ switch (_a.label) {
328
+ case 0: return [4 /*yield*/, sdkNonAdmin_1.api.enduser_observations.getSome({
329
+ filter: { enduserId: testEnduser_1.id },
330
+ projection: { measurement: 1, enduserId: 1 },
331
+ })
332
+ // Non-admin should still get results (RBA should apply)
333
+ ];
334
+ case 1:
335
+ results = _a.sent();
336
+ // Non-admin should still get results (RBA should apply)
337
+ record('non-admin-projection: Non-admin should receive an array response', Array.isArray(results), "results=".concat(describe(results.map(function (r) { return r.id; }))));
338
+ // `.every` over an empty array is true, so these two asserted nothing whenever RBA returned
339
+ // nothing — which, before the care-team assignment above, was always. The length guard is
340
+ // what stops them passing vacuously again if enduser access regresses.
341
+ record('non-admin-projection: measurement should be present for non-admin projection', results.length === 3 && results.every(function (r) { return r.measurement !== undefined; }), "measurements=".concat(describe(results.map(function (r) { return r.measurement; }))));
342
+ record('non-admin-projection: enduserId should be present for non-admin projection', results.length === 3 && results.every(function (r) { return r.enduserId !== undefined; }), "enduserIds=".concat(describe(results.map(function (r) { return r.enduserId; }))));
343
+ return [2 /*return*/];
344
+ }
345
+ });
346
+ }); })
347
+ // The shared-org version deleted its observations and enduser here. Teardown discards the
348
+ // whole tenant, so the records go with it.
349
+ ];
350
+ case 14:
351
+ // Test 7: Non-admin access with projection (RBA still applies)
352
+ _a.sent();
353
+ return [3 /*break*/, 16];
354
+ case 15:
355
+ e_1 = _a.sent();
356
+ // A fixture write outside a step threw. Record it rather than letting it escape `run`, which
357
+ // would fail every other suite in the batch instead of just this one.
358
+ record('getSome projection suite ran to completion', false, "threw: ".concat(errorMessage(e_1)));
359
+ return [3 /*break*/, 16];
360
+ case 16: return [3 /*break*/, 22];
361
+ case 17:
362
+ if (!tenant) return [3 /*break*/, 21];
363
+ _a.label = 18;
364
+ case 18:
365
+ _a.trys.push([18, 20, , 21]);
366
+ return [4 /*yield*/, tenant.teardown()];
367
+ case 19:
368
+ _a.sent();
369
+ return [3 /*break*/, 21];
370
+ case 20:
371
+ e_2 = _a.sent();
372
+ console.error('teardown failed', e_2);
373
+ return [3 /*break*/, 21];
374
+ case 21: return [7 /*endfinally*/];
375
+ case 22: return [2 /*return*/, checks];
376
+ }
377
+ });
378
+ }); };
379
+ /** Asserting wrapper, for standalone runs. */
380
+ export var get_some_projection_tests = function () { return __awaiter(void 0, void 0, void 0, function () {
381
+ var _a, _b;
382
+ return __generator(this, function (_c) {
383
+ switch (_c.label) {
384
+ case 0:
385
+ _a = assert_checks;
386
+ _b = ['getSome projection'];
387
+ return [4 /*yield*/, get_some_projection_checks()];
388
+ case 1:
389
+ _a.apply(void 0, _b.concat([_c.sent()]));
390
+ return [2 /*return*/];
391
+ }
339
392
  });
393
+ }); };
394
+ /** Enrolls this suite in the auto-discovered parallel pool — see run_discovered_isolated_suites. */
395
+ export var ISOLATED_SUITE = {
396
+ name: 'getSome projection',
397
+ run: get_some_projection_checks,
340
398
  };
341
399
  // Allow running this test file independently
342
400
  if (require.main === module) {
343
401
  console.log("\uD83C\uDF10 Using API URL: ".concat(host));
344
- var sdk_1 = new Session({ host: host });
345
- var sdkNonAdmin_1 = new Session({ host: host });
346
- var runTests = function () { return __awaiter(void 0, void 0, void 0, function () {
347
- return __generator(this, function (_a) {
348
- switch (_a.label) {
349
- case 0: return [4 /*yield*/, setup_tests(sdk_1, sdkNonAdmin_1)];
350
- case 1:
351
- _a.sent();
352
- return [4 /*yield*/, get_some_projection_tests({ sdk: sdk_1, sdkNonAdmin: sdkNonAdmin_1 })];
353
- case 2:
354
- _a.sent();
355
- return [2 /*return*/];
356
- }
357
- });
358
- }); };
359
- runTests()
402
+ get_some_projection_tests()
360
403
  .then(function () {
361
404
  console.log("✅ getSome projection test suite completed successfully");
362
405
  process.exit(0);