@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.
- package/lib/cjs/sdk.d.ts +6 -5
- package/lib/cjs/sdk.d.ts.map +1 -1
- package/lib/cjs/sdk.js +5 -0
- package/lib/cjs/sdk.js.map +1 -1
- package/lib/cjs/tests/api_tests/ai_conversations.test.d.ts +14 -5
- package/lib/cjs/tests/api_tests/ai_conversations.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/ai_conversations.test.js +163 -149
- package/lib/cjs/tests/api_tests/ai_conversations.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.d.ts +22 -0
- package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.js +518 -0
- package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/appointment_link_expiration.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/appointment_link_expiration.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/appointment_link_expiration.test.js +135 -73
- package/lib/cjs/tests/api_tests/appointment_link_expiration.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.js +240 -174
- package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/availability_block_buffer.test.d.ts +22 -0
- package/lib/cjs/tests/api_tests/availability_block_buffer.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/availability_block_buffer.test.js +311 -0
- package/lib/cjs/tests/api_tests/availability_block_buffer.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.js +235 -192
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.js +351 -264
- package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/bulk_assignment.test.d.ts +16 -5
- package/lib/cjs/tests/api_tests/bulk_assignment.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/bulk_assignment.test.js +336 -243
- package/lib/cjs/tests/api_tests/bulk_assignment.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/calendar_event_references_update.test.d.ts +13 -5
- package/lib/cjs/tests/api_tests/calendar_event_references_update.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/calendar_event_references_update.test.js +131 -108
- package/lib/cjs/tests/api_tests/calendar_event_references_update.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.js +240 -252
- package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/chats_analytics.test.d.ts +14 -5
- package/lib/cjs/tests/api_tests/chats_analytics.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/chats_analytics.test.js +190 -189
- package/lib/cjs/tests/api_tests/chats_analytics.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/concurrent_build_threads.test.d.ts +23 -5
- package/lib/cjs/tests/api_tests/concurrent_build_threads.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/concurrent_build_threads.test.js +121 -118
- package/lib/cjs/tests/api_tests/concurrent_build_threads.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/configurations_public_read.test.d.ts +21 -5
- package/lib/cjs/tests/api_tests/configurations_public_read.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/configurations_public_read.test.js +235 -119
- package/lib/cjs/tests/api_tests/configurations_public_read.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.js +356 -0
- package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/create_note_action.test.d.ts +18 -5
- package/lib/cjs/tests/api_tests/create_note_action.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/create_note_action.test.js +218 -173
- package/lib/cjs/tests/api_tests/create_note_action.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.d.ts +17 -4
- package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.js +144 -205
- package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/custom_aggregation.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/custom_aggregation.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/custom_aggregation.test.js +284 -223
- package/lib/cjs/tests/api_tests/custom_aggregation.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/database_cascade_delete.test.d.ts +13 -5
- package/lib/cjs/tests/api_tests/database_cascade_delete.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/database_cascade_delete.test.js +218 -242
- package/lib/cjs/tests/api_tests/database_cascade_delete.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts +21 -5
- package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.js +168 -112
- package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/elation_user_id.test.d.ts +17 -5
- package/lib/cjs/tests/api_tests/elation_user_id.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/elation_user_id.test.js +121 -54
- package/lib/cjs/tests/api_tests/elation_user_id.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/file_download_unicode_names.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/file_download_unicode_names.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/file_download_unicode_names.test.js +193 -143
- package/lib/cjs/tests/api_tests/file_download_unicode_names.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.js +532 -0
- package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/form_submitted_trigger.test.d.ts +25 -5
- package/lib/cjs/tests/api_tests/form_submitted_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/form_submitted_trigger.test.js +395 -366
- package/lib/cjs/tests/api_tests/form_submitted_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/form_translations.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/form_translations.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/form_translations.test.js +269 -189
- package/lib/cjs/tests/api_tests/form_translations.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/formsort_header_auth.test.d.ts +29 -5
- package/lib/cjs/tests/api_tests/formsort_header_auth.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/formsort_header_auth.test.js +179 -162
- package/lib/cjs/tests/api_tests/formsort_header_auth.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.d.ts +12 -6
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.js +98 -84
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/get_some_projection.test.d.ts +20 -5
- package/lib/cjs/tests/api_tests/get_some_projection.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/get_some_projection.test.js +342 -298
- package/lib/cjs/tests/api_tests/get_some_projection.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.js +294 -223
- package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/integrations_redacted.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/integrations_redacted.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/integrations_redacted.test.js +307 -213
- package/lib/cjs/tests/api_tests/integrations_redacted.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.js +179 -178
- package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/load_team_chat.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/load_team_chat.test.js +181 -124
- package/lib/cjs/tests/api_tests/load_team_chat.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/load_threads_autobuild.test.d.ts +24 -5
- package/lib/cjs/tests/api_tests/load_threads_autobuild.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/load_threads_autobuild.test.js +261 -227
- package/lib/cjs/tests/api_tests/load_threads_autobuild.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/load_threads_care_team.test.d.ts +6 -0
- package/lib/cjs/tests/api_tests/load_threads_care_team.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/load_threads_care_team.test.js +115 -31
- package/lib/cjs/tests/api_tests/load_threads_care_team.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/managed_content_file_access.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/managed_content_file_access.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/managed_content_file_access.test.js +285 -311
- package/lib/cjs/tests/api_tests/managed_content_file_access.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/mdb_sort.test.d.ts +20 -5
- package/lib/cjs/tests/api_tests/mdb_sort.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/mdb_sort.test.js +361 -305
- package/lib/cjs/tests/api_tests/mdb_sort.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/mdi_manual_sync.test.d.ts +27 -0
- package/lib/cjs/tests/api_tests/mdi_manual_sync.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/mdi_manual_sync.test.js +395 -0
- package/lib/cjs/tests/api_tests/mdi_manual_sync.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.js +259 -209
- package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/mdi_webhooks.test.d.ts +12 -5
- package/lib/cjs/tests/api_tests/mdi_webhooks.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/mdi_webhooks.test.js +67 -61
- package/lib/cjs/tests/api_tests/mdi_webhooks.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/message_assignment_trigger.test.d.ts +23 -14
- package/lib/cjs/tests/api_tests/message_assignment_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/message_assignment_trigger.test.js +258 -306
- package/lib/cjs/tests/api_tests/message_assignment_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/metriport_push_form_response.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/metriport_push_form_response.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/metriport_push_form_response.test.js +301 -238
- package/lib/cjs/tests/api_tests/metriport_push_form_response.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/organization_api_keys.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/organization_api_keys.test.js +226 -59
- package/lib/cjs/tests/api_tests/organization_api_keys.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.d.ts +19 -5
- package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.js +335 -222
- package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/organization_signup.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/organization_signup.test.js +218 -51
- package/lib/cjs/tests/api_tests/organization_signup.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.js +109 -1
- package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.d.ts +6 -6
- package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.js +309 -361
- package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.js +246 -165
- package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.js +130 -47
- package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.js +180 -132
- package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/programs.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/programs.test.js +417 -50
- package/lib/cjs/tests/api_tests/programs.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts +10 -5
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js +401 -282
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts +9 -5
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js +228 -211
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +13 -8
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js +270 -254
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +16 -6
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +167 -142
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +10 -5
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js +296 -221
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +12 -5
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +221 -216
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js +300 -203
- package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js +415 -275
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js +347 -228
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +18 -7
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js +164 -75
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +15 -9
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +99 -102
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js +132 -89
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +12 -5
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +190 -138
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.d.ts +18 -16
- package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.js +164 -124
- package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +122 -2
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js +288 -274
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts +17 -10
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js +173 -138
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +310 -265
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts +9 -5
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js +108 -83
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/stedi_approval.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/stedi_approval.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/stedi_approval.test.js +206 -137
- package/lib/cjs/tests/api_tests/stedi_approval.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/ticket_stage_archive.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/ticket_stage_archive.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/ticket_stage_archive.test.js +344 -0
- package/lib/cjs/tests/api_tests/ticket_stage_archive.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.js +165 -149
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/translations.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/translations.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/translations.test.js +104 -75
- package/lib/cjs/tests/api_tests/translations.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.d.ts +21 -4
- package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.js +238 -370
- package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/user_preferences.test.d.ts +30 -0
- package/lib/cjs/tests/api_tests/user_preferences.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/user_preferences.test.js +279 -0
- package/lib/cjs/tests/api_tests/user_preferences.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.d.ts +17 -5
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.js +204 -195
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.js +154 -179
- package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/welle_partner_token.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/welle_partner_token.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/welle_partner_token.test.js +393 -251
- package/lib/cjs/tests/api_tests/welle_partner_token.test.js.map +1 -1
- package/lib/cjs/tests/setup_isolated.d.ts +7 -0
- package/lib/cjs/tests/setup_isolated.d.ts.map +1 -1
- package/lib/cjs/tests/setup_isolated.js.map +1 -1
- package/lib/cjs/tests/tests.d.ts.map +1 -1
- package/lib/cjs/tests/tests.js +229 -461
- package/lib/cjs/tests/tests.js.map +1 -1
- package/lib/cjs/tests/unit_tests/date_string_validation.test.d.ts +2 -0
- package/lib/cjs/tests/unit_tests/date_string_validation.test.d.ts.map +1 -0
- package/lib/cjs/tests/unit_tests/date_string_validation.test.js +112 -0
- package/lib/cjs/tests/unit_tests/date_string_validation.test.js.map +1 -0
- package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/esm/sdk.d.ts +6 -5
- package/lib/esm/sdk.d.ts.map +1 -1
- package/lib/esm/sdk.js +5 -0
- package/lib/esm/sdk.js.map +1 -1
- package/lib/esm/tests/api_tests/ai_conversations.test.d.ts +14 -5
- package/lib/esm/tests/api_tests/ai_conversations.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/ai_conversations.test.js +161 -148
- package/lib/esm/tests/api_tests/ai_conversations.test.js.map +1 -1
- package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.d.ts +22 -0
- package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.js +510 -0
- package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.js.map +1 -0
- package/lib/esm/tests/api_tests/appointment_link_expiration.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/appointment_link_expiration.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/appointment_link_expiration.test.js +132 -71
- package/lib/esm/tests/api_tests/appointment_link_expiration.test.js.map +1 -1
- package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.js +238 -173
- package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/availability_block_buffer.test.d.ts +22 -0
- package/lib/esm/tests/api_tests/availability_block_buffer.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/availability_block_buffer.test.js +306 -0
- package/lib/esm/tests/api_tests/availability_block_buffer.test.js.map +1 -0
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.js +232 -190
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.js.map +1 -1
- package/lib/esm/tests/api_tests/beluga_trigger_refill.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/beluga_trigger_refill.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/beluga_trigger_refill.test.js +348 -262
- package/lib/esm/tests/api_tests/beluga_trigger_refill.test.js.map +1 -1
- package/lib/esm/tests/api_tests/bulk_assignment.test.d.ts +16 -5
- package/lib/esm/tests/api_tests/bulk_assignment.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/bulk_assignment.test.js +333 -241
- package/lib/esm/tests/api_tests/bulk_assignment.test.js.map +1 -1
- package/lib/esm/tests/api_tests/calendar_event_references_update.test.d.ts +13 -5
- package/lib/esm/tests/api_tests/calendar_event_references_update.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/calendar_event_references_update.test.js +129 -107
- package/lib/esm/tests/api_tests/calendar_event_references_update.test.js.map +1 -1
- package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.js +238 -251
- package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.js.map +1 -1
- package/lib/esm/tests/api_tests/chats_analytics.test.d.ts +14 -5
- package/lib/esm/tests/api_tests/chats_analytics.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/chats_analytics.test.js +188 -188
- package/lib/esm/tests/api_tests/chats_analytics.test.js.map +1 -1
- package/lib/esm/tests/api_tests/concurrent_build_threads.test.d.ts +23 -5
- package/lib/esm/tests/api_tests/concurrent_build_threads.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/concurrent_build_threads.test.js +119 -117
- package/lib/esm/tests/api_tests/concurrent_build_threads.test.js.map +1 -1
- package/lib/esm/tests/api_tests/configurations_public_read.test.d.ts +21 -5
- package/lib/esm/tests/api_tests/configurations_public_read.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/configurations_public_read.test.js +233 -118
- package/lib/esm/tests/api_tests/configurations_public_read.test.js.map +1 -1
- package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.js +351 -0
- package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.js.map +1 -0
- package/lib/esm/tests/api_tests/create_note_action.test.d.ts +18 -5
- package/lib/esm/tests/api_tests/create_note_action.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/create_note_action.test.js +216 -172
- package/lib/esm/tests/api_tests/create_note_action.test.js.map +1 -1
- package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.d.ts +17 -4
- package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.js +141 -203
- package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/custom_aggregation.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/custom_aggregation.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/custom_aggregation.test.js +282 -222
- package/lib/esm/tests/api_tests/custom_aggregation.test.js.map +1 -1
- package/lib/esm/tests/api_tests/database_cascade_delete.test.d.ts +13 -5
- package/lib/esm/tests/api_tests/database_cascade_delete.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/database_cascade_delete.test.js +216 -241
- package/lib/esm/tests/api_tests/database_cascade_delete.test.js.map +1 -1
- package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts +21 -5
- package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.js +165 -110
- package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.js.map +1 -1
- package/lib/esm/tests/api_tests/elation_user_id.test.d.ts +17 -5
- package/lib/esm/tests/api_tests/elation_user_id.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/elation_user_id.test.js +119 -53
- package/lib/esm/tests/api_tests/elation_user_id.test.js.map +1 -1
- package/lib/esm/tests/api_tests/file_download_unicode_names.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/file_download_unicode_names.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/file_download_unicode_names.test.js +190 -141
- package/lib/esm/tests/api_tests/file_download_unicode_names.test.js.map +1 -1
- package/lib/esm/tests/api_tests/form_intake_email_normalization.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/form_intake_email_normalization.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/form_intake_email_normalization.test.js +527 -0
- package/lib/esm/tests/api_tests/form_intake_email_normalization.test.js.map +1 -0
- package/lib/esm/tests/api_tests/form_submitted_trigger.test.d.ts +25 -5
- package/lib/esm/tests/api_tests/form_submitted_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/form_submitted_trigger.test.js +393 -365
- package/lib/esm/tests/api_tests/form_submitted_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/form_translations.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/form_translations.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/form_translations.test.js +268 -189
- package/lib/esm/tests/api_tests/form_translations.test.js.map +1 -1
- package/lib/esm/tests/api_tests/formsort_header_auth.test.d.ts +29 -5
- package/lib/esm/tests/api_tests/formsort_header_auth.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/formsort_header_auth.test.js +177 -161
- package/lib/esm/tests/api_tests/formsort_header_auth.test.js.map +1 -1
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.d.ts +12 -6
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.js +96 -83
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.js.map +1 -1
- package/lib/esm/tests/api_tests/get_some_projection.test.d.ts +20 -5
- package/lib/esm/tests/api_tests/get_some_projection.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/get_some_projection.test.js +339 -296
- package/lib/esm/tests/api_tests/get_some_projection.test.js.map +1 -1
- package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.js +292 -222
- package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.js.map +1 -1
- package/lib/esm/tests/api_tests/integrations_redacted.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/integrations_redacted.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/integrations_redacted.test.js +304 -211
- package/lib/esm/tests/api_tests/integrations_redacted.test.js.map +1 -1
- package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.js +177 -154
- package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.js.map +1 -1
- package/lib/esm/tests/api_tests/load_team_chat.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/load_team_chat.test.js +181 -124
- package/lib/esm/tests/api_tests/load_team_chat.test.js.map +1 -1
- package/lib/esm/tests/api_tests/load_threads_autobuild.test.d.ts +24 -5
- package/lib/esm/tests/api_tests/load_threads_autobuild.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/load_threads_autobuild.test.js +259 -226
- package/lib/esm/tests/api_tests/load_threads_autobuild.test.js.map +1 -1
- package/lib/esm/tests/api_tests/load_threads_care_team.test.d.ts +6 -0
- package/lib/esm/tests/api_tests/load_threads_care_team.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/load_threads_care_team.test.js +115 -31
- package/lib/esm/tests/api_tests/load_threads_care_team.test.js.map +1 -1
- package/lib/esm/tests/api_tests/managed_content_file_access.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/managed_content_file_access.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/managed_content_file_access.test.js +283 -287
- package/lib/esm/tests/api_tests/managed_content_file_access.test.js.map +1 -1
- package/lib/esm/tests/api_tests/mdb_sort.test.d.ts +20 -5
- package/lib/esm/tests/api_tests/mdb_sort.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/mdb_sort.test.js +358 -303
- package/lib/esm/tests/api_tests/mdb_sort.test.js.map +1 -1
- package/lib/esm/tests/api_tests/mdi_manual_sync.test.d.ts +27 -0
- package/lib/esm/tests/api_tests/mdi_manual_sync.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/mdi_manual_sync.test.js +390 -0
- package/lib/esm/tests/api_tests/mdi_manual_sync.test.js.map +1 -0
- package/lib/esm/tests/api_tests/mdi_trigger_refill.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/mdi_trigger_refill.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/mdi_trigger_refill.test.js +257 -208
- package/lib/esm/tests/api_tests/mdi_trigger_refill.test.js.map +1 -1
- package/lib/esm/tests/api_tests/mdi_webhooks.test.d.ts +12 -5
- package/lib/esm/tests/api_tests/mdi_webhooks.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/mdi_webhooks.test.js +65 -60
- package/lib/esm/tests/api_tests/mdi_webhooks.test.js.map +1 -1
- package/lib/esm/tests/api_tests/message_assignment_trigger.test.d.ts +23 -14
- package/lib/esm/tests/api_tests/message_assignment_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/message_assignment_trigger.test.js +256 -305
- package/lib/esm/tests/api_tests/message_assignment_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/metriport_push_form_response.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/metriport_push_form_response.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/metriport_push_form_response.test.js +298 -236
- package/lib/esm/tests/api_tests/metriport_push_form_response.test.js.map +1 -1
- package/lib/esm/tests/api_tests/organization_api_keys.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/organization_api_keys.test.js +226 -59
- package/lib/esm/tests/api_tests/organization_api_keys.test.js.map +1 -1
- package/lib/esm/tests/api_tests/organization_settings_duplicates.test.d.ts +19 -5
- package/lib/esm/tests/api_tests/organization_settings_duplicates.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/organization_settings_duplicates.test.js +332 -220
- package/lib/esm/tests/api_tests/organization_settings_duplicates.test.js.map +1 -1
- package/lib/esm/tests/api_tests/organization_signup.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/organization_signup.test.js +218 -51
- package/lib/esm/tests/api_tests/organization_signup.test.js.map +1 -1
- package/lib/esm/tests/api_tests/out_of_office_endpoint.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/out_of_office_endpoint.test.js +109 -1
- package/lib/esm/tests/api_tests/out_of_office_endpoint.test.js.map +1 -1
- package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.d.ts +6 -6
- package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.js +308 -361
- package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.js +243 -163
- package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.js.map +1 -1
- package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.js +127 -45
- package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.js.map +1 -1
- package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.js +177 -130
- package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.js.map +1 -1
- package/lib/esm/tests/api_tests/programs.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/programs.test.js +417 -50
- package/lib/esm/tests/api_tests/programs.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts +10 -5
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js +399 -281
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts +9 -5
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js +225 -209
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +13 -8
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js +268 -253
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +16 -6
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +165 -141
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +10 -5
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js +294 -220
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +12 -5
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +219 -215
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js +298 -202
- package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js +413 -274
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js +345 -227
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +18 -7
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js +162 -74
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +15 -9
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +96 -100
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js +129 -87
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +12 -5
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +187 -136
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/register_business_id_injection.test.d.ts +18 -16
- package/lib/esm/tests/api_tests/security/register_business_id_injection.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/register_business_id_injection.test.js +162 -123
- package/lib/esm/tests/api_tests/security/register_business_id_injection.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +122 -2
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js +285 -272
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts +17 -10
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js +171 -137
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +307 -263
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts +9 -5
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.js +105 -81
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.js.map +1 -1
- package/lib/esm/tests/api_tests/stedi_approval.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/stedi_approval.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/stedi_approval.test.js +204 -136
- package/lib/esm/tests/api_tests/stedi_approval.test.js.map +1 -1
- package/lib/esm/tests/api_tests/ticket_stage_archive.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/ticket_stage_archive.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/ticket_stage_archive.test.js +339 -0
- package/lib/esm/tests/api_tests/ticket_stage_archive.test.js.map +1 -0
- package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.js +162 -147
- package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.js.map +1 -1
- package/lib/esm/tests/api_tests/translations.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/translations.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/translations.test.js +102 -74
- package/lib/esm/tests/api_tests/translations.test.js.map +1 -1
- package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.d.ts +21 -4
- package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.js +236 -369
- package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.js.map +1 -1
- package/lib/esm/tests/api_tests/user_preferences.test.d.ts +30 -0
- package/lib/esm/tests/api_tests/user_preferences.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/user_preferences.test.js +274 -0
- package/lib/esm/tests/api_tests/user_preferences.test.js.map +1 -0
- package/lib/esm/tests/api_tests/webhook_error_handling.test.d.ts +17 -5
- package/lib/esm/tests/api_tests/webhook_error_handling.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/webhook_error_handling.test.js +202 -194
- package/lib/esm/tests/api_tests/webhook_error_handling.test.js.map +1 -1
- package/lib/esm/tests/api_tests/webhook_raw_json_number.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/webhook_raw_json_number.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/webhook_raw_json_number.test.js +152 -178
- package/lib/esm/tests/api_tests/webhook_raw_json_number.test.js.map +1 -1
- package/lib/esm/tests/api_tests/welle_partner_token.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/welle_partner_token.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/welle_partner_token.test.js +391 -250
- package/lib/esm/tests/api_tests/welle_partner_token.test.js.map +1 -1
- package/lib/esm/tests/setup_isolated.d.ts +7 -0
- package/lib/esm/tests/setup_isolated.d.ts.map +1 -1
- package/lib/esm/tests/setup_isolated.js.map +1 -1
- package/lib/esm/tests/tests.d.ts.map +1 -1
- package/lib/esm/tests/tests.js +229 -461
- package/lib/esm/tests/tests.js.map +1 -1
- package/lib/esm/tests/unit_tests/date_string_validation.test.d.ts +2 -0
- package/lib/esm/tests/unit_tests/date_string_validation.test.d.ts.map +1 -0
- package/lib/esm/tests/unit_tests/date_string_validation.test.js +108 -0
- package/lib/esm/tests/unit_tests/date_string_validation.test.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/sdk.ts +14 -3
- package/src/tests/api_tests/ai_conversations.test.ts +170 -138
- package/src/tests/api_tests/ai_conversations_agent_message.test.ts +491 -0
- package/src/tests/api_tests/appointment_link_expiration.test.ts +94 -35
- package/src/tests/api_tests/appointment_no_showed_trigger.test.ts +181 -128
- package/src/tests/api_tests/availability_block_buffer.test.ts +286 -0
- package/src/tests/api_tests/beluga_manual_sync.test.ts +103 -53
- package/src/tests/api_tests/beluga_trigger_refill.test.ts +131 -46
- package/src/tests/api_tests/bulk_assignment.test.ts +307 -220
- package/src/tests/api_tests/calendar_event_references_update.test.ts +97 -54
- package/src/tests/api_tests/calendar_event_webhook_template.test.ts +198 -158
- package/src/tests/api_tests/chats_analytics.test.ts +161 -123
- package/src/tests/api_tests/concurrent_build_threads.test.ts +80 -69
- package/src/tests/api_tests/configurations_public_read.test.ts +154 -67
- package/src/tests/api_tests/copied_form_response_no_enduser_sync.test.ts +307 -0
- package/src/tests/api_tests/create_note_action.test.ts +149 -70
- package/src/tests/api_tests/create_user_notifications_trigger.test.ts +116 -144
- package/src/tests/api_tests/custom_aggregation.test.ts +163 -92
- package/src/tests/api_tests/database_cascade_delete.test.ts +101 -87
- package/src/tests/api_tests/dont_sync_to_elation_form_submission.test.ts +122 -51
- package/src/tests/api_tests/elation_user_id.test.ts +105 -42
- package/src/tests/api_tests/file_download_unicode_names.test.ts +171 -122
- package/src/tests/api_tests/form_intake_email_normalization.test.ts +489 -0
- package/src/tests/api_tests/form_submitted_trigger.test.ts +152 -86
- package/src/tests/api_tests/form_translations.test.ts +117 -48
- package/src/tests/api_tests/formsort_header_auth.test.ts +147 -97
- package/src/tests/api_tests/gcal_sync_retry.test.ts +71 -49
- package/src/tests/api_tests/get_some_projection.test.ts +333 -169
- package/src/tests/api_tests/group_event_attendee_self_update.test.ts +103 -52
- package/src/tests/api_tests/integrations_redacted.test.ts +161 -84
- package/src/tests/api_tests/journey_delete_cancels_actions.test.ts +93 -64
- package/src/tests/api_tests/load_team_chat.test.ts +62 -6
- package/src/tests/api_tests/load_threads_autobuild.test.ts +163 -67
- package/src/tests/api_tests/load_threads_care_team.test.ts +103 -0
- package/src/tests/api_tests/managed_content_file_access.test.ts +132 -108
- package/src/tests/api_tests/mdb_sort.test.ts +247 -161
- package/src/tests/api_tests/mdi_manual_sync.test.ts +277 -0
- package/src/tests/api_tests/mdi_trigger_refill.test.ts +132 -78
- package/src/tests/api_tests/mdi_webhooks.test.ts +52 -22
- package/src/tests/api_tests/message_assignment_trigger.test.ts +129 -155
- package/src/tests/api_tests/metriport_push_form_response.test.ts +109 -49
- package/src/tests/api_tests/organization_api_keys.test.ts +170 -2
- package/src/tests/api_tests/organization_settings_duplicates.test.ts +291 -181
- package/src/tests/api_tests/organization_signup.test.ts +170 -5
- package/src/tests/api_tests/out_of_office_endpoint.test.ts +98 -0
- package/src/tests/api_tests/outbound_chat_sent_trigger.test.ts +163 -175
- package/src/tests/api_tests/phone_calls_cold_transfer.test.ts +195 -133
- package/src/tests/api_tests/phone_calls_conference_hold.test.ts +112 -42
- package/src/tests/api_tests/phone_tree_enduser_condition.test.ts +81 -32
- package/src/tests/api_tests/programs.test.ts +350 -0
- package/src/tests/api_tests/security/ai-conversations-rbac.test.ts +248 -128
- package/src/tests/api_tests/security/automated-actions-process-gate.test.ts +47 -42
- package/src/tests/api_tests/security/booking-info-idor-token-mint.test.ts +53 -45
- package/src/tests/api_tests/security/cascade-role-rename-cross-tenant.test.ts +100 -73
- package/src/tests/api_tests/security/data-sync-redaction-bypass.test.ts +125 -59
- package/src/tests/api_tests/security/develop-health-benefit-verification-rbac.test.ts +131 -103
- package/src/tests/api_tests/security/enduser-ai-summary-trust-gate.test.ts +161 -68
- package/src/tests/api_tests/security/enduser-cross-create.test.ts +200 -61
- package/src/tests/api_tests/security/enduser-write-restrictions.test.ts +179 -61
- package/src/tests/api_tests/security/globalunique-conflict-redaction.test.ts +163 -44
- package/src/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.ts +78 -70
- package/src/tests/api_tests/security/load-inbox-redaction.test.ts +79 -44
- package/src/tests/api_tests/security/proxy-image-unauth-ssrf.test.ts +95 -52
- package/src/tests/api_tests/security/register_business_id_injection.test.ts +132 -93
- package/src/tests/api_tests/security/sanitize-user-html-with-iframes.test.ts +127 -0
- package/src/tests/api_tests/security/schema-adminonly-enforcement.test.ts +42 -37
- package/src/tests/api_tests/security/self-admin-role-assignment.test.ts +92 -54
- package/src/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.ts +76 -34
- package/src/tests/api_tests/security/webhook-timeout.test.ts +67 -36
- package/src/tests/api_tests/stedi_approval.test.ts +156 -90
- package/src/tests/api_tests/ticket_stage_archive.test.ts +314 -0
- package/src/tests/api_tests/tickets_bulk_assign_care_team.test.ts +138 -103
- package/src/tests/api_tests/translations.test.ts +69 -46
- package/src/tests/api_tests/trigger_set_fields_date_difference.test.ts +198 -256
- package/src/tests/api_tests/user_preferences.test.ts +227 -0
- package/src/tests/api_tests/webhook_error_handling.test.ts +121 -60
- package/src/tests/api_tests/webhook_raw_json_number.test.ts +127 -109
- package/src/tests/api_tests/welle_partner_token.test.ts +217 -90
- package/src/tests/setup_isolated.ts +7 -0
- package/src/tests/tests.ts +41 -147
- package/src/tests/{api_tests → unit_tests}/date_string_validation.test.ts +2 -23
- package/test_generated.pdf +0 -0
|
@@ -51,10 +51,10 @@ var host = process.env.API_URL || 'http://localhost:8080';
|
|
|
51
51
|
export var load_team_chat_tests = function (_a) {
|
|
52
52
|
var sdk = _a.sdk, sdkNonAdmin = _a.sdkNonAdmin;
|
|
53
53
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
54
|
-
var enduserForCareTeam, enduserNotOnCareTeam, roomWithUserInIds, roomWhereUserIsCreator, roomWithCareTeamAccess, roomNoAccessForNonAdmin, roomNoAccessForAdmin, roomNoCareTeamAccess, closedRoom, externalRoom, roomWithEndusers, roomWithEmptyAboutEnduserId, firstBatch, lastRoom_1, assignedEnduserAccessRole, noEnduserAccessRole, enduserAccessTestEmail, enduserAccessTestUser,
|
|
55
|
-
var
|
|
56
|
-
return __generator(this, function (
|
|
57
|
-
switch (
|
|
54
|
+
var enduserForCareTeam, enduserNotOnCareTeam, SENT_AT_BASE, sent_at, roomWithUserInIds, roomWhereUserIsCreator, roomWithCareTeamAccess, roomNoAccessForNonAdmin, roomNoAccessForAdmin, roomNoCareTeamAccess, closedRoom, externalRoom, roomWithEndusers, roomWithEmptyAboutEnduserId, firstBatch, lastRoom_1, FIXTURE_ROOM_IDS, fixture_order, orderBeforeRename, _b, renamedTitle, assignedEnduserAccessRole, noEnduserAccessRole, enduserAccessTestEmail, enduserAccessTestUser, _c, enduserNotAssignedToTestUser, roomWithUnassignedEnduser, sdkAssignedAccess, _d, sdkNoEnduserAccess, _e, accessTagTestTag, accessTagRole, accessTagTestEmail, accessTagTestUser, _f, enduserWithAccessTag, roomWithAccessTagEnduser, sdkAccessTagUser, _g;
|
|
55
|
+
var _h, _j, _k;
|
|
56
|
+
return __generator(this, function (_l) {
|
|
57
|
+
switch (_l.label) {
|
|
58
58
|
case 0:
|
|
59
59
|
log_header("Load Team Chat Tests");
|
|
60
60
|
return [4 /*yield*/, sdk.api.endusers.createOne({
|
|
@@ -63,118 +63,131 @@ export var load_team_chat_tests = function (_a) {
|
|
|
63
63
|
assignedTo: [sdkNonAdmin.userInfo.id], // Non-admin is on care team
|
|
64
64
|
})];
|
|
65
65
|
case 1:
|
|
66
|
-
enduserForCareTeam =
|
|
66
|
+
enduserForCareTeam = _l.sent();
|
|
67
67
|
return [4 /*yield*/, sdk.api.endusers.createOne({
|
|
68
68
|
fname: 'NoCareTeam',
|
|
69
69
|
lname: 'TestPatient',
|
|
70
70
|
})
|
|
71
|
-
//
|
|
72
|
-
//
|
|
71
|
+
// load_team_chat orders and keyset-pages on recentMessageSentAt, and a room that has never had a
|
|
72
|
+
// message (no recentMessageSentAt) is not returned at all — so every fixture room below sets one.
|
|
73
|
+
// Distinct, descending values make the ordering and pagination assertions deterministic.
|
|
73
74
|
];
|
|
74
75
|
case 2:
|
|
75
|
-
enduserNotOnCareTeam =
|
|
76
|
+
enduserNotOnCareTeam = _l.sent();
|
|
77
|
+
SENT_AT_BASE = Date.now();
|
|
78
|
+
sent_at = function (secondsAgo) { return SENT_AT_BASE - secondsAgo * 1000; };
|
|
76
79
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
77
80
|
type: 'internal',
|
|
78
81
|
userIds: [sdkNonAdmin.userInfo.id],
|
|
79
82
|
title: 'Room with user in userIds',
|
|
83
|
+
recentMessageSentAt: sent_at(1),
|
|
80
84
|
})
|
|
81
85
|
// Room 2: Non-admin is creator
|
|
82
86
|
];
|
|
83
87
|
case 3:
|
|
84
|
-
roomWithUserInIds =
|
|
88
|
+
roomWithUserInIds = _l.sent();
|
|
85
89
|
return [4 /*yield*/, sdkNonAdmin.api.chat_rooms.createOne({
|
|
86
90
|
type: 'internal',
|
|
87
91
|
userIds: [],
|
|
88
92
|
title: 'Room where user is creator',
|
|
93
|
+
recentMessageSentAt: sent_at(2),
|
|
89
94
|
})
|
|
90
95
|
// Room 3: aboutEnduserId with care team access
|
|
91
96
|
];
|
|
92
97
|
case 4:
|
|
93
|
-
roomWhereUserIsCreator =
|
|
98
|
+
roomWhereUserIsCreator = _l.sent();
|
|
94
99
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
95
100
|
type: 'internal',
|
|
96
101
|
userIds: [],
|
|
97
102
|
aboutEnduserId: enduserForCareTeam.id,
|
|
98
103
|
title: 'Room with care team access',
|
|
104
|
+
recentMessageSentAt: sent_at(3),
|
|
99
105
|
})
|
|
100
106
|
// Room 4: No access for non-admin (different creator, not in userIds, no care team)
|
|
101
107
|
];
|
|
102
108
|
case 5:
|
|
103
|
-
roomWithCareTeamAccess =
|
|
109
|
+
roomWithCareTeamAccess = _l.sent();
|
|
104
110
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
105
111
|
type: 'internal',
|
|
106
112
|
userIds: [],
|
|
107
113
|
title: 'Room with no access for non-admin',
|
|
114
|
+
recentMessageSentAt: sent_at(4),
|
|
108
115
|
})
|
|
109
116
|
// Room 4b: No access for admin (non-admin is creator, admin not in userIds, not on care team)
|
|
110
117
|
];
|
|
111
118
|
case 6:
|
|
112
|
-
roomNoAccessForNonAdmin =
|
|
119
|
+
roomNoAccessForNonAdmin = _l.sent();
|
|
113
120
|
return [4 /*yield*/, sdkNonAdmin.api.chat_rooms.createOne({
|
|
114
121
|
type: 'internal',
|
|
115
122
|
userIds: [],
|
|
116
123
|
title: 'Room with no access for admin',
|
|
124
|
+
recentMessageSentAt: sent_at(5),
|
|
117
125
|
})
|
|
118
126
|
// Room 5: aboutEnduserId but non-admin NOT on care team
|
|
119
127
|
];
|
|
120
128
|
case 7:
|
|
121
|
-
roomNoAccessForAdmin =
|
|
129
|
+
roomNoAccessForAdmin = _l.sent();
|
|
122
130
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
123
131
|
type: 'internal',
|
|
124
132
|
userIds: [],
|
|
125
133
|
aboutEnduserId: enduserNotOnCareTeam.id,
|
|
126
134
|
title: 'Room without care team access',
|
|
135
|
+
recentMessageSentAt: sent_at(6),
|
|
127
136
|
})
|
|
128
137
|
// Room 6: Closed room (has endedAt)
|
|
129
138
|
];
|
|
130
139
|
case 8:
|
|
131
|
-
roomNoCareTeamAccess =
|
|
140
|
+
roomNoCareTeamAccess = _l.sent();
|
|
132
141
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
133
142
|
type: 'internal',
|
|
134
143
|
userIds: [sdkNonAdmin.userInfo.id],
|
|
135
144
|
title: 'Closed room',
|
|
145
|
+
recentMessageSentAt: sent_at(7),
|
|
136
146
|
endedAt: new Date(),
|
|
137
147
|
})
|
|
138
148
|
// Room 7: External type (should be excluded)
|
|
139
149
|
];
|
|
140
150
|
case 9:
|
|
141
|
-
closedRoom =
|
|
151
|
+
closedRoom = _l.sent();
|
|
142
152
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
143
153
|
type: 'external',
|
|
144
154
|
userIds: [sdkNonAdmin.userInfo.id],
|
|
145
155
|
title: 'External room',
|
|
156
|
+
recentMessageSentAt: sent_at(8),
|
|
146
157
|
})
|
|
147
158
|
// Room 8: Room with enduserIds (should be excluded - not a team chat)
|
|
148
159
|
];
|
|
149
160
|
case 10:
|
|
150
|
-
externalRoom =
|
|
161
|
+
externalRoom = _l.sent();
|
|
151
162
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
152
163
|
type: 'internal',
|
|
153
164
|
userIds: [sdkNonAdmin.userInfo.id],
|
|
154
165
|
enduserIds: [enduserForCareTeam.id],
|
|
155
166
|
title: 'Room with endusers',
|
|
167
|
+
recentMessageSentAt: sent_at(9),
|
|
156
168
|
})
|
|
157
169
|
// Room 9: Room with empty string aboutEnduserId (should not crash, user in userIds can see it)
|
|
158
170
|
];
|
|
159
171
|
case 11:
|
|
160
|
-
roomWithEndusers =
|
|
172
|
+
roomWithEndusers = _l.sent();
|
|
161
173
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
162
174
|
type: 'internal',
|
|
163
175
|
userIds: [sdkNonAdmin.userInfo.id],
|
|
164
176
|
aboutEnduserId: '',
|
|
165
177
|
title: 'Room with empty aboutEnduserId',
|
|
178
|
+
recentMessageSentAt: sent_at(10),
|
|
166
179
|
})
|
|
167
180
|
// Wait for timestamps to settle
|
|
168
181
|
];
|
|
169
182
|
case 12:
|
|
170
|
-
roomWithEmptyAboutEnduserId =
|
|
183
|
+
roomWithEmptyAboutEnduserId = _l.sent();
|
|
171
184
|
// Wait for timestamps to settle
|
|
172
185
|
return [4 /*yield*/, wait(undefined, 500)
|
|
173
186
|
// Test 1: Basic loading - rooms where user is in userIds
|
|
174
187
|
];
|
|
175
188
|
case 13:
|
|
176
189
|
// Wait for timestamps to settle
|
|
177
|
-
|
|
190
|
+
_l.sent();
|
|
178
191
|
// Test 1: Basic loading - rooms where user is in userIds
|
|
179
192
|
return [4 /*yield*/, async_test("Loads room where user is in userIds", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
180
193
|
onResult: function (r) { return r.chat_rooms.some(function (room) { return room.id === roomWithUserInIds.id; }); }
|
|
@@ -183,7 +196,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
183
196
|
];
|
|
184
197
|
case 14:
|
|
185
198
|
// Test 1: Basic loading - rooms where user is in userIds
|
|
186
|
-
|
|
199
|
+
_l.sent();
|
|
187
200
|
// Test 2: Creator access
|
|
188
201
|
return [4 /*yield*/, async_test("Loads room where user is creator", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
189
202
|
onResult: function (r) { return r.chat_rooms.some(function (room) { return room.id === roomWhereUserIsCreator.id; }); }
|
|
@@ -192,7 +205,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
192
205
|
];
|
|
193
206
|
case 15:
|
|
194
207
|
// Test 2: Creator access
|
|
195
|
-
|
|
208
|
+
_l.sent();
|
|
196
209
|
// Test 3: Care team access
|
|
197
210
|
return [4 /*yield*/, async_test("Loads room where user is on care team for aboutEnduserId", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
198
211
|
onResult: function (r) { return r.chat_rooms.some(function (room) { return room.id === roomWithCareTeamAccess.id; }); }
|
|
@@ -201,7 +214,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
201
214
|
];
|
|
202
215
|
case 16:
|
|
203
216
|
// Test 3: Care team access
|
|
204
|
-
|
|
217
|
+
_l.sent();
|
|
205
218
|
// Test 4: Returns endusers for aboutEnduserId
|
|
206
219
|
return [4 /*yield*/, async_test("Returns endusers for aboutEnduserId display", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
207
220
|
onResult: function (r) { return r.endusers.some(function (e) { return e.id === enduserForCareTeam.id; }); }
|
|
@@ -210,7 +223,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
210
223
|
];
|
|
211
224
|
case 17:
|
|
212
225
|
// Test 4: Returns endusers for aboutEnduserId
|
|
213
|
-
|
|
226
|
+
_l.sent();
|
|
214
227
|
// Test 5: Access exclusion - no access room should be excluded for non-admin
|
|
215
228
|
return [4 /*yield*/, async_test("Excludes rooms user has no access to", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
216
229
|
onResult: function (r) { return !r.chat_rooms.some(function (room) { return room.id === roomNoAccessForNonAdmin.id; }); }
|
|
@@ -219,7 +232,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
219
232
|
];
|
|
220
233
|
case 18:
|
|
221
234
|
// Test 5: Access exclusion - no access room should be excluded for non-admin
|
|
222
|
-
|
|
235
|
+
_l.sent();
|
|
223
236
|
// Test 6: No care team access exclusion
|
|
224
237
|
return [4 /*yield*/, async_test("Excludes rooms where user is not on care team for aboutEnduserId", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
225
238
|
onResult: function (r) { return !r.chat_rooms.some(function (room) { return room.id === roomNoCareTeamAccess.id; }); }
|
|
@@ -228,7 +241,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
228
241
|
];
|
|
229
242
|
case 19:
|
|
230
243
|
// Test 6: No care team access exclusion
|
|
231
|
-
|
|
244
|
+
_l.sent();
|
|
232
245
|
// Test 7: Closed rooms excluded by default
|
|
233
246
|
return [4 /*yield*/, async_test("Excludes closed rooms by default", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
234
247
|
onResult: function (r) { return !r.chat_rooms.some(function (room) { return room.id === closedRoom.id; }); }
|
|
@@ -237,7 +250,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
237
250
|
];
|
|
238
251
|
case 20:
|
|
239
252
|
// Test 7: Closed rooms excluded by default
|
|
240
|
-
|
|
253
|
+
_l.sent();
|
|
241
254
|
// Test 8: Closed rooms included with showClosed=true
|
|
242
255
|
return [4 /*yield*/, async_test("Includes closed rooms when showClosed=true", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({ showClosed: true }); }, {
|
|
243
256
|
onResult: function (r) { return r.chat_rooms.some(function (room) { return room.id === closedRoom.id; }); }
|
|
@@ -246,7 +259,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
246
259
|
];
|
|
247
260
|
case 21:
|
|
248
261
|
// Test 8: Closed rooms included with showClosed=true
|
|
249
|
-
|
|
262
|
+
_l.sent();
|
|
250
263
|
// Test 9: External type excluded
|
|
251
264
|
return [4 /*yield*/, async_test("Excludes external type rooms", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
252
265
|
onResult: function (r) { return !r.chat_rooms.some(function (room) { return room.id === externalRoom.id; }); }
|
|
@@ -255,7 +268,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
255
268
|
];
|
|
256
269
|
case 22:
|
|
257
270
|
// Test 9: External type excluded
|
|
258
|
-
|
|
271
|
+
_l.sent();
|
|
259
272
|
// Test 10: Rooms with enduserIds excluded
|
|
260
273
|
return [4 /*yield*/, async_test("Excludes rooms with enduserIds (not team chats)", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
261
274
|
onResult: function (r) { return !r.chat_rooms.some(function (room) { return room.id === roomWithEndusers.id; }); }
|
|
@@ -264,7 +277,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
264
277
|
];
|
|
265
278
|
case 23:
|
|
266
279
|
// Test 10: Rooms with enduserIds excluded
|
|
267
|
-
|
|
280
|
+
_l.sent();
|
|
268
281
|
// Test 10b: Room with empty string aboutEnduserId works (doesn't crash)
|
|
269
282
|
return [4 /*yield*/, async_test("Handles room with empty string aboutEnduserId gracefully", function () { return sdkNonAdmin.api.chat_rooms.load_team_chat({}); }, {
|
|
270
283
|
onResult: function (r) { return r.chat_rooms.some(function (room) { return room.id === roomWithEmptyAboutEnduserId.id; }); }
|
|
@@ -274,7 +287,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
274
287
|
];
|
|
275
288
|
case 24:
|
|
276
289
|
// Test 10b: Room with empty string aboutEnduserId works (doesn't crash)
|
|
277
|
-
|
|
290
|
+
_l.sent();
|
|
278
291
|
// Test 11: Admin also filtered to rooms they're involved in
|
|
279
292
|
// (Admins who need all rooms can use standard GET endpoints)
|
|
280
293
|
return [4 /*yield*/, async_test("Admin does NOT see rooms they're not involved in", function () { return sdk.api.chat_rooms.load_team_chat({}); }, {
|
|
@@ -285,7 +298,7 @@ export var load_team_chat_tests = function (_a) {
|
|
|
285
298
|
case 25:
|
|
286
299
|
// Test 11: Admin also filtered to rooms they're involved in
|
|
287
300
|
// (Admins who need all rooms can use standard GET endpoints)
|
|
288
|
-
|
|
301
|
+
_l.sent();
|
|
289
302
|
// Test 12: Pagination with limit
|
|
290
303
|
return [4 /*yield*/, async_test("Respects limit parameter", function () { return sdk.api.chat_rooms.load_team_chat({ limit: 2 }); }, {
|
|
291
304
|
onResult: function (r) { return r.chat_rooms.length <= 2; }
|
|
@@ -294,13 +307,15 @@ export var load_team_chat_tests = function (_a) {
|
|
|
294
307
|
];
|
|
295
308
|
case 26:
|
|
296
309
|
// Test 12: Pagination with limit
|
|
297
|
-
|
|
310
|
+
_l.sent();
|
|
298
311
|
return [4 /*yield*/, sdk.api.chat_rooms.load_team_chat({ limit: 2 })];
|
|
299
312
|
case 27:
|
|
300
|
-
firstBatch =
|
|
313
|
+
firstBatch = _l.sent();
|
|
301
314
|
if (!(firstBatch.chat_rooms.length === 2)) return [3 /*break*/, 29];
|
|
302
315
|
lastRoom_1 = firstBatch.chat_rooms[firstBatch.chat_rooms.length - 1];
|
|
303
|
-
return [4 /*yield*/, async_test("Pagination with lastUpdatedAt returns older rooms",
|
|
316
|
+
return [4 /*yield*/, async_test("Pagination with lastUpdatedAt returns older rooms",
|
|
317
|
+
// the cursor parameter keeps its name and Date type, but now carries recentMessageSentAt
|
|
318
|
+
function () { return sdk.api.chat_rooms.load_team_chat({ lastUpdatedAt: new Date(lastRoom_1.recentMessageSentAt) }); }, {
|
|
304
319
|
onResult: function (r) {
|
|
305
320
|
// Should not contain any rooms from first batch
|
|
306
321
|
var firstBatchIds = firstBatch.chat_rooms.map(function (room) { return room.id; });
|
|
@@ -308,29 +323,69 @@ export var load_team_chat_tests = function (_a) {
|
|
|
308
323
|
}
|
|
309
324
|
})];
|
|
310
325
|
case 28:
|
|
311
|
-
|
|
312
|
-
|
|
326
|
+
_l.sent();
|
|
327
|
+
_l.label = 29;
|
|
313
328
|
case 29:
|
|
314
|
-
// Test 14: Sorted by
|
|
315
|
-
return [4 /*yield*/, async_test("Results sorted by
|
|
329
|
+
// Test 14: Sorted by recentMessageSentAt descending
|
|
330
|
+
return [4 /*yield*/, async_test("Results sorted by recentMessageSentAt descending", function () { return sdk.api.chat_rooms.load_team_chat({}); }, {
|
|
316
331
|
onResult: function (r) {
|
|
332
|
+
if (r.chat_rooms.length === 0)
|
|
333
|
+
return false;
|
|
334
|
+
for (var _i = 0, _a = r.chat_rooms; _i < _a.length; _i++) {
|
|
335
|
+
var room = _a[_i];
|
|
336
|
+
if (room.recentMessageSentAt === undefined)
|
|
337
|
+
return false; // never-messaged rooms are excluded
|
|
338
|
+
}
|
|
317
339
|
for (var i = 1; i < r.chat_rooms.length; i++) {
|
|
318
|
-
|
|
319
|
-
var curr = new Date(r.chat_rooms[i].updatedAt).getTime();
|
|
320
|
-
if (prev < curr)
|
|
340
|
+
if (r.chat_rooms[i - 1].recentMessageSentAt < r.chat_rooms[i].recentMessageSentAt)
|
|
321
341
|
return false;
|
|
322
342
|
}
|
|
323
343
|
return true;
|
|
324
344
|
}
|
|
325
345
|
})
|
|
326
|
-
//
|
|
327
|
-
//
|
|
328
|
-
// ============================================
|
|
329
|
-
// Create a role with "Assigned" enduser access and chat_rooms access
|
|
346
|
+
// Test 14b: a write that is not a message must not re-order a room. updatedAt is bumped by any
|
|
347
|
+
// write (it was the old sort key); recentMessageSentAt is not.
|
|
330
348
|
];
|
|
331
349
|
case 30:
|
|
332
|
-
// Test 14: Sorted by
|
|
333
|
-
|
|
350
|
+
// Test 14: Sorted by recentMessageSentAt descending
|
|
351
|
+
_l.sent();
|
|
352
|
+
FIXTURE_ROOM_IDS = [
|
|
353
|
+
roomWithUserInIds.id, roomWithCareTeamAccess.id, roomNoAccessForNonAdmin.id,
|
|
354
|
+
roomNoCareTeamAccess.id, roomWithEmptyAboutEnduserId.id,
|
|
355
|
+
];
|
|
356
|
+
fixture_order = function (rooms) { return (rooms.map(function (room) { return room.id; }).filter(function (id) { return FIXTURE_ROOM_IDS.includes(id); }).join(',')); };
|
|
357
|
+
_b = fixture_order;
|
|
358
|
+
return [4 /*yield*/, sdk.api.chat_rooms.load_team_chat({})];
|
|
359
|
+
case 31:
|
|
360
|
+
orderBeforeRename = _b.apply(void 0, [(_l.sent()).chat_rooms]);
|
|
361
|
+
renamedTitle = 'Room with empty aboutEnduserId (renamed)';
|
|
362
|
+
// the oldest fixture room by recentMessageSentAt: before this change, the rename put it first
|
|
363
|
+
return [4 /*yield*/, sdk.api.chat_rooms.updateOne(roomWithEmptyAboutEnduserId.id, { title: renamedTitle })];
|
|
364
|
+
case 32:
|
|
365
|
+
// the oldest fixture room by recentMessageSentAt: before this change, the rename put it first
|
|
366
|
+
_l.sent();
|
|
367
|
+
return [4 /*yield*/, wait(undefined, 500)];
|
|
368
|
+
case 33:
|
|
369
|
+
_l.sent();
|
|
370
|
+
return [4 /*yield*/, async_test("A non-message update does not re-order a room", function () { return sdk.api.chat_rooms.load_team_chat({}); }, {
|
|
371
|
+
onResult: function (r) {
|
|
372
|
+
var renamed = r.chat_rooms.find(function (room) { return room.id === roomWithEmptyAboutEnduserId.id; });
|
|
373
|
+
var orderAfterRename = fixture_order(r.chat_rooms);
|
|
374
|
+
return ((renamed === null || renamed === void 0 ? void 0 : renamed.title) === renamedTitle // the write did land
|
|
375
|
+
&& (renamed === null || renamed === void 0 ? void 0 : renamed.recentMessageSentAt) === sent_at(10) // and left the sort key alone
|
|
376
|
+
&& orderAfterRename === orderBeforeRename
|
|
377
|
+
// still last of the fixture rooms, not first
|
|
378
|
+
&& r.chat_rooms.map(function (room) { return room.id; }).indexOf(roomWithEmptyAboutEnduserId.id)
|
|
379
|
+
> r.chat_rooms.map(function (room) { return room.id; }).indexOf(roomWithUserInIds.id));
|
|
380
|
+
}
|
|
381
|
+
})
|
|
382
|
+
// ============================================
|
|
383
|
+
// Enduser Access Control Tests
|
|
384
|
+
// ============================================
|
|
385
|
+
// Create a role with "Assigned" enduser access and chat_rooms access
|
|
386
|
+
];
|
|
387
|
+
case 34:
|
|
388
|
+
_l.sent();
|
|
334
389
|
return [4 /*yield*/, sdk.api.role_based_access_permissions.createOne({
|
|
335
390
|
role: 'Assigned Enduser Access',
|
|
336
391
|
permissions: {
|
|
@@ -340,8 +395,8 @@ export var load_team_chat_tests = function (_a) {
|
|
|
340
395
|
})
|
|
341
396
|
// Create a role with no enduser access but chat_rooms access
|
|
342
397
|
];
|
|
343
|
-
case
|
|
344
|
-
assignedEnduserAccessRole =
|
|
398
|
+
case 35:
|
|
399
|
+
assignedEnduserAccessRole = _l.sent();
|
|
345
400
|
return [4 /*yield*/, sdk.api.role_based_access_permissions.createOne({
|
|
346
401
|
role: 'No Enduser Access',
|
|
347
402
|
permissions: {
|
|
@@ -351,56 +406,57 @@ export var load_team_chat_tests = function (_a) {
|
|
|
351
406
|
})
|
|
352
407
|
// Create test user for enduser access tests
|
|
353
408
|
];
|
|
354
|
-
case
|
|
355
|
-
noEnduserAccessRole =
|
|
409
|
+
case 36:
|
|
410
|
+
noEnduserAccessRole = _l.sent();
|
|
356
411
|
enduserAccessTestEmail = 'team.chat.enduser.access.test@tellescope.com';
|
|
357
412
|
return [4 /*yield*/, sdk.api.users.getOne({ email: enduserAccessTestEmail }).catch(function () { return null; })];
|
|
358
|
-
case
|
|
359
|
-
|
|
360
|
-
if (
|
|
413
|
+
case 37:
|
|
414
|
+
_c = (_l.sent());
|
|
415
|
+
if (_c) return [3 /*break*/, 39];
|
|
361
416
|
return [4 /*yield*/, sdk.api.users.createOne({ email: enduserAccessTestEmail, notificationEmailsDisabled: true, verifiedEmail: true })];
|
|
362
|
-
case
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
case
|
|
366
|
-
enduserAccessTestUser =
|
|
417
|
+
case 38:
|
|
418
|
+
_c = (_l.sent());
|
|
419
|
+
_l.label = 39;
|
|
420
|
+
case 39:
|
|
421
|
+
enduserAccessTestUser = _c;
|
|
367
422
|
return [4 /*yield*/, sdk.api.endusers.createOne({
|
|
368
423
|
fname: 'NotAssigned',
|
|
369
424
|
lname: 'ToTestUser',
|
|
370
425
|
})
|
|
371
426
|
// Create a room aboutEnduserId pointing to the unassigned enduser, but add test user to userIds
|
|
372
427
|
];
|
|
373
|
-
case
|
|
374
|
-
enduserNotAssignedToTestUser =
|
|
428
|
+
case 40:
|
|
429
|
+
enduserNotAssignedToTestUser = _l.sent();
|
|
375
430
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
376
431
|
type: 'internal',
|
|
377
432
|
userIds: [enduserAccessTestUser.id],
|
|
378
433
|
aboutEnduserId: enduserNotAssignedToTestUser.id,
|
|
379
434
|
title: 'Room with unassigned enduser',
|
|
435
|
+
recentMessageSentAt: sent_at(11),
|
|
380
436
|
})];
|
|
381
|
-
case
|
|
382
|
-
roomWithUnassignedEnduser =
|
|
437
|
+
case 41:
|
|
438
|
+
roomWithUnassignedEnduser = _l.sent();
|
|
383
439
|
return [4 /*yield*/, wait(undefined, 500)
|
|
384
440
|
// Test 15: User with "Assigned" enduser access - only sees endusers they're assigned to
|
|
385
441
|
];
|
|
386
|
-
case
|
|
387
|
-
|
|
442
|
+
case 42:
|
|
443
|
+
_l.sent();
|
|
388
444
|
// Test 15: User with "Assigned" enduser access - only sees endusers they're assigned to
|
|
389
445
|
return [4 /*yield*/, sdk.api.users.updateOne(enduserAccessTestUser.id, { roles: [assignedEnduserAccessRole.role] }, { replaceObjectFields: true })];
|
|
390
|
-
case
|
|
446
|
+
case 43:
|
|
391
447
|
// Test 15: User with "Assigned" enduser access - only sees endusers they're assigned to
|
|
392
|
-
|
|
448
|
+
_l.sent();
|
|
393
449
|
return [4 /*yield*/, wait(undefined, 2000)]; // role change triggers logout
|
|
394
|
-
case
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
450
|
+
case 44:
|
|
451
|
+
_l.sent(); // role change triggers logout
|
|
452
|
+
_d = Session.bind;
|
|
453
|
+
_h = {
|
|
398
454
|
host: host
|
|
399
455
|
};
|
|
400
456
|
return [4 /*yield*/, sdk.api.users.generate_auth_token({ id: enduserAccessTestUser.id })];
|
|
401
|
-
case
|
|
402
|
-
sdkAssignedAccess = new (
|
|
403
|
-
|
|
457
|
+
case 45:
|
|
458
|
+
sdkAssignedAccess = new (_d.apply(Session, [void 0, (_h.authToken = (_l.sent()).authToken,
|
|
459
|
+
_h)]))();
|
|
404
460
|
// User can see the chat room (via userIds) but should NOT see the enduser (not assigned)
|
|
405
461
|
return [4 /*yield*/, async_test("Assigned enduser access: sees room but not unassigned enduser", function () { return sdkAssignedAccess.api.chat_rooms.load_team_chat({}); }, {
|
|
406
462
|
onResult: function (r) {
|
|
@@ -411,16 +467,16 @@ export var load_team_chat_tests = function (_a) {
|
|
|
411
467
|
})
|
|
412
468
|
// Now assign user to an enduser and verify they CAN see that enduser
|
|
413
469
|
];
|
|
414
|
-
case
|
|
470
|
+
case 46:
|
|
415
471
|
// User can see the chat room (via userIds) but should NOT see the enduser (not assigned)
|
|
416
|
-
|
|
472
|
+
_l.sent();
|
|
417
473
|
// Now assign user to an enduser and verify they CAN see that enduser
|
|
418
474
|
return [4 /*yield*/, sdk.api.endusers.updateOne(enduserForCareTeam.id, {
|
|
419
475
|
assignedTo: __spreadArray(__spreadArray([], (enduserForCareTeam.assignedTo || []), true), [enduserAccessTestUser.id], false)
|
|
420
476
|
})];
|
|
421
|
-
case
|
|
477
|
+
case 47:
|
|
422
478
|
// Now assign user to an enduser and verify they CAN see that enduser
|
|
423
|
-
|
|
479
|
+
_l.sent();
|
|
424
480
|
return [4 /*yield*/, async_test("Assigned enduser access: sees enduser when assigned", function () { return sdkAssignedAccess.api.chat_rooms.load_team_chat({}); }, {
|
|
425
481
|
onResult: function (r) {
|
|
426
482
|
// Should see enduserForCareTeam (now assigned) but not enduserNotAssignedToTestUser
|
|
@@ -431,24 +487,24 @@ export var load_team_chat_tests = function (_a) {
|
|
|
431
487
|
})
|
|
432
488
|
// Test 16: User with no enduser access - sees no endusers
|
|
433
489
|
];
|
|
434
|
-
case
|
|
435
|
-
|
|
490
|
+
case 48:
|
|
491
|
+
_l.sent();
|
|
436
492
|
// Test 16: User with no enduser access - sees no endusers
|
|
437
493
|
return [4 /*yield*/, sdk.api.users.updateOne(enduserAccessTestUser.id, { roles: [noEnduserAccessRole.role] }, { replaceObjectFields: true })];
|
|
438
|
-
case
|
|
494
|
+
case 49:
|
|
439
495
|
// Test 16: User with no enduser access - sees no endusers
|
|
440
|
-
|
|
496
|
+
_l.sent();
|
|
441
497
|
return [4 /*yield*/, wait(undefined, 2000)]; // role change triggers logout
|
|
442
|
-
case
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
498
|
+
case 50:
|
|
499
|
+
_l.sent(); // role change triggers logout
|
|
500
|
+
_e = Session.bind;
|
|
501
|
+
_j = {
|
|
446
502
|
host: host
|
|
447
503
|
};
|
|
448
504
|
return [4 /*yield*/, sdk.api.users.generate_auth_token({ id: enduserAccessTestUser.id })];
|
|
449
|
-
case
|
|
450
|
-
sdkNoEnduserAccess = new (
|
|
451
|
-
|
|
505
|
+
case 51:
|
|
506
|
+
sdkNoEnduserAccess = new (_e.apply(Session, [void 0, (_j.authToken = (_l.sent()).authToken,
|
|
507
|
+
_j)]))();
|
|
452
508
|
return [4 /*yield*/, async_test("No enduser access: sees rooms but no endusers", function () { return sdkNoEnduserAccess.api.chat_rooms.load_team_chat({}); }, {
|
|
453
509
|
onResult: function (r) {
|
|
454
510
|
var hasRoom = r.chat_rooms.some(function (room) { return room.id === roomWithUnassignedEnduser.id; });
|
|
@@ -458,8 +514,8 @@ export var load_team_chat_tests = function (_a) {
|
|
|
458
514
|
})
|
|
459
515
|
// Test 17: Admin (All access) sees all endusers
|
|
460
516
|
];
|
|
461
|
-
case
|
|
462
|
-
|
|
517
|
+
case 52:
|
|
518
|
+
_l.sent();
|
|
463
519
|
// Test 17: Admin (All access) sees all endusers
|
|
464
520
|
return [4 /*yield*/, async_test("Admin (All access): sees all endusers", function () { return sdk.api.chat_rooms.load_team_chat({}); }, {
|
|
465
521
|
onResult: function (r) {
|
|
@@ -471,9 +527,9 @@ export var load_team_chat_tests = function (_a) {
|
|
|
471
527
|
})
|
|
472
528
|
// Test 18: Access tags grant enduser visibility (not on care team, but matching access tag)
|
|
473
529
|
];
|
|
474
|
-
case
|
|
530
|
+
case 53:
|
|
475
531
|
// Test 17: Admin (All access) sees all endusers
|
|
476
|
-
|
|
532
|
+
_l.sent();
|
|
477
533
|
accessTagTestTag = 'access-tag-test-team-chat';
|
|
478
534
|
// Enable access tags at the organization level
|
|
479
535
|
return [4 /*yield*/, sdk.api.organizations.updateOne(sdk.userInfo.businessId, {
|
|
@@ -481,9 +537,9 @@ export var load_team_chat_tests = function (_a) {
|
|
|
481
537
|
})
|
|
482
538
|
// Create a role with Assigned enduser access (which uses access tags)
|
|
483
539
|
];
|
|
484
|
-
case
|
|
540
|
+
case 54:
|
|
485
541
|
// Enable access tags at the organization level
|
|
486
|
-
|
|
542
|
+
_l.sent();
|
|
487
543
|
return [4 /*yield*/, sdk.api.role_based_access_permissions.createOne({
|
|
488
544
|
role: 'Access Tag Enduser Access',
|
|
489
545
|
permissions: {
|
|
@@ -493,24 +549,24 @@ export var load_team_chat_tests = function (_a) {
|
|
|
493
549
|
})
|
|
494
550
|
// Create a user with the access tag
|
|
495
551
|
];
|
|
496
|
-
case
|
|
497
|
-
accessTagRole =
|
|
552
|
+
case 55:
|
|
553
|
+
accessTagRole = _l.sent();
|
|
498
554
|
accessTagTestEmail = 'team.chat.access.tag.test@tellescope.com';
|
|
499
555
|
return [4 /*yield*/, sdk.api.users.getOne({ email: accessTagTestEmail }).catch(function () { return null; })];
|
|
500
|
-
case
|
|
501
|
-
|
|
502
|
-
if (
|
|
556
|
+
case 56:
|
|
557
|
+
_f = (_l.sent());
|
|
558
|
+
if (_f) return [3 /*break*/, 58];
|
|
503
559
|
return [4 /*yield*/, sdk.api.users.createOne({
|
|
504
560
|
email: accessTagTestEmail,
|
|
505
561
|
notificationEmailsDisabled: true,
|
|
506
562
|
verifiedEmail: true,
|
|
507
563
|
tags: [accessTagTestTag],
|
|
508
564
|
})];
|
|
509
|
-
case
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
case
|
|
513
|
-
accessTagTestUser =
|
|
565
|
+
case 57:
|
|
566
|
+
_f = (_l.sent());
|
|
567
|
+
_l.label = 58;
|
|
568
|
+
case 58:
|
|
569
|
+
accessTagTestUser = _f;
|
|
514
570
|
// Ensure user has the tag and role
|
|
515
571
|
return [4 /*yield*/, sdk.api.users.updateOne(accessTagTestUser.id, {
|
|
516
572
|
tags: [accessTagTestTag],
|
|
@@ -518,9 +574,9 @@ export var load_team_chat_tests = function (_a) {
|
|
|
518
574
|
}, { replaceObjectFields: true })
|
|
519
575
|
// Create an enduser with matching access tag (but user is NOT in assignedTo)
|
|
520
576
|
];
|
|
521
|
-
case
|
|
577
|
+
case 59:
|
|
522
578
|
// Ensure user has the tag and role
|
|
523
|
-
|
|
579
|
+
_l.sent();
|
|
524
580
|
return [4 /*yield*/, sdk.api.endusers.createOne({
|
|
525
581
|
fname: 'AccessTag',
|
|
526
582
|
lname: 'TestEnduser',
|
|
@@ -529,29 +585,30 @@ export var load_team_chat_tests = function (_a) {
|
|
|
529
585
|
})
|
|
530
586
|
// Create a room about the enduser with access tag, add user to userIds
|
|
531
587
|
];
|
|
532
|
-
case
|
|
533
|
-
enduserWithAccessTag =
|
|
588
|
+
case 60:
|
|
589
|
+
enduserWithAccessTag = _l.sent();
|
|
534
590
|
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
535
591
|
type: 'internal',
|
|
536
592
|
userIds: [accessTagTestUser.id],
|
|
537
593
|
aboutEnduserId: enduserWithAccessTag.id,
|
|
538
594
|
title: 'Room with access tag enduser',
|
|
595
|
+
recentMessageSentAt: sent_at(12),
|
|
539
596
|
})];
|
|
540
|
-
case
|
|
541
|
-
roomWithAccessTagEnduser =
|
|
597
|
+
case 61:
|
|
598
|
+
roomWithAccessTagEnduser = _l.sent();
|
|
542
599
|
return [4 /*yield*/, wait(undefined, 2000)
|
|
543
600
|
// Re-authenticate to get the updated JWT with eat (enableAccessTags) flag
|
|
544
601
|
]; // role change triggers logout
|
|
545
|
-
case
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
602
|
+
case 62:
|
|
603
|
+
_l.sent(); // role change triggers logout
|
|
604
|
+
_g = Session.bind;
|
|
605
|
+
_k = {
|
|
549
606
|
host: host
|
|
550
607
|
};
|
|
551
608
|
return [4 /*yield*/, sdk.api.users.generate_auth_token({ id: accessTagTestUser.id })];
|
|
552
|
-
case
|
|
553
|
-
sdkAccessTagUser = new (
|
|
554
|
-
|
|
609
|
+
case 63:
|
|
610
|
+
sdkAccessTagUser = new (_g.apply(Session, [void 0, (_k.authToken = (_l.sent()).authToken,
|
|
611
|
+
_k)]))();
|
|
555
612
|
return [4 /*yield*/, async_test("Access tags: user sees enduser via matching access tag (not assigned)", function () { return sdkAccessTagUser.api.chat_rooms.load_team_chat({}); }, {
|
|
556
613
|
onResult: function (r) {
|
|
557
614
|
var hasRoom = r.chat_rooms.some(function (room) { return room.id === roomWithAccessTagEnduser.id; });
|
|
@@ -563,15 +620,15 @@ export var load_team_chat_tests = function (_a) {
|
|
|
563
620
|
})
|
|
564
621
|
// Cleanup - disable access tags before deleting test data
|
|
565
622
|
];
|
|
566
|
-
case
|
|
567
|
-
|
|
623
|
+
case 64:
|
|
624
|
+
_l.sent();
|
|
568
625
|
// Cleanup - disable access tags before deleting test data
|
|
569
626
|
return [4 /*yield*/, sdk.api.organizations.updateOne(sdk.userInfo.businessId, {
|
|
570
627
|
settings: { endusers: { enableAccessTags: false } }
|
|
571
628
|
})];
|
|
572
|
-
case
|
|
629
|
+
case 65:
|
|
573
630
|
// Cleanup - disable access tags before deleting test data
|
|
574
|
-
|
|
631
|
+
_l.sent();
|
|
575
632
|
return [4 /*yield*/, Promise.all([
|
|
576
633
|
sdk.api.chat_rooms.deleteOne(roomWithUserInIds.id),
|
|
577
634
|
sdk.api.chat_rooms.deleteOne(roomWhereUserIsCreator.id),
|
|
@@ -595,8 +652,8 @@ export var load_team_chat_tests = function (_a) {
|
|
|
595
652
|
sdk.api.users.deleteOne(enduserAccessTestUser.id),
|
|
596
653
|
sdk.api.users.deleteOne(accessTagTestUser.id),
|
|
597
654
|
])];
|
|
598
|
-
case
|
|
599
|
-
|
|
655
|
+
case 66:
|
|
656
|
+
_l.sent();
|
|
600
657
|
return [2 /*return*/];
|
|
601
658
|
}
|
|
602
659
|
});
|