@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
|
@@ -1,23 +1,64 @@
|
|
|
1
1
|
require('source-map-support').install();
|
|
2
2
|
|
|
3
|
-
import { Session } from "../../sdk"
|
|
4
3
|
import { CreateNoteAutomationAction } from "@tellescope/types-models"
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import {
|
|
5
|
+
assert_checks,
|
|
6
|
+
Check,
|
|
7
|
+
setup_isolated_tenant,
|
|
8
|
+
IsolatedSuite,
|
|
9
|
+
} from "../setup_isolated"
|
|
7
10
|
|
|
8
|
-
const host = process.env.API_URL ||
|
|
11
|
+
const host = process.env.API_URL || 'http://localhost:8080' as const
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
// (merge-field) text, or AI-generated text when aiSummaryConfiguration.enabled is set.
|
|
12
|
-
// The deterministic path is fully covered here; the AI path asserts config round-trip and,
|
|
13
|
-
// when the org lacks Bedrock enablement/credits (typical dev org), the error path instead.
|
|
14
|
-
export const create_note_action_tests = async ({ sdk } : { sdk: Session, sdkNonAdmin: Session }) => {
|
|
15
|
-
log_header("Create Note Action Tests")
|
|
13
|
+
const RAND = () => Math.random().toString(36).slice(2, 10)
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
const
|
|
15
|
+
const error_text = (err: unknown) => {
|
|
16
|
+
const message = (err as any)?.message ?? err
|
|
17
|
+
return typeof message === 'string' ? message : JSON.stringify(message)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Renders a value for a check's detail string. Never `JSON.stringify(x) || fallback`:
|
|
21
|
+
* JSON.stringify('') is '""', which is truthy, so the fallback would be unreachable. */
|
|
22
|
+
const show = (v: unknown) => v === undefined ? '(unset)' : JSON.stringify(v)
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* createNote journey action: creates a note on the enduser timeline with deterministic
|
|
26
|
+
* (merge-field) text, or AI-generated text when aiSummaryConfiguration.enabled is set.
|
|
27
|
+
* The deterministic path is fully covered here; the AI path asserts config round-trip and the
|
|
28
|
+
* error path a tenant without Bedrock enablement/credits takes.
|
|
29
|
+
*
|
|
30
|
+
* Provisions its own throwaway tenant: the journey, its steps and the automated_actions processed
|
|
31
|
+
* below are org-wide, and the note assertions count every note on the patient.
|
|
32
|
+
*
|
|
33
|
+
* Not covered here: the AI happy path (an AI-generated note, its aiGenerated flag and its
|
|
34
|
+
* ai_conversations record). A provisioned tenant has no Bedrock enablement, so that arm cannot run.
|
|
35
|
+
*/
|
|
36
|
+
export const create_note_action_checks = async (): Promise<Check[]> => {
|
|
37
|
+
const checks: Check[] = []
|
|
38
|
+
const record = (label: string, pass: boolean, detail: string) => checks.push({ label, pass, detail })
|
|
39
|
+
|
|
40
|
+
// async_test's shouldError path calls process.exit on failure, which would strand the tenant.
|
|
41
|
+
const expect_rejected = async (label: string, write: () => Promise<any>) => {
|
|
42
|
+
try {
|
|
43
|
+
await write()
|
|
44
|
+
record(label, false, 'the write was accepted, but it should have been rejected')
|
|
45
|
+
} catch (err) {
|
|
46
|
+
record(label, true, `rejected with: ${error_text(err) || '(no message on the rejection)'}`)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
let tenant: Awaited<ReturnType<typeof setup_isolated_tenant>> | undefined
|
|
19
51
|
|
|
20
52
|
try {
|
|
53
|
+
tenant = await setup_isolated_tenant({
|
|
54
|
+
name: `createNote action ${RAND()}`,
|
|
55
|
+
users: [{ isAdmin: true }],
|
|
56
|
+
apiKeys: 0,
|
|
57
|
+
})
|
|
58
|
+
const { sdk } = tenant
|
|
59
|
+
|
|
60
|
+
const journey = await sdk.api.journeys.createOne({ title: 'Create Note Test Journey' })
|
|
61
|
+
|
|
21
62
|
/*************** Config validation round-trip ***************/
|
|
22
63
|
const validInfo = {
|
|
23
64
|
title: 'Note for {{enduser.fname}}',
|
|
@@ -30,27 +71,25 @@ export const create_note_action_tests = async ({ sdk } : { sdk: Session, sdkNonA
|
|
|
30
71
|
events: [{ type: 'onJourneyStart', info: {} }],
|
|
31
72
|
action: { type: 'createNote', info: validInfo },
|
|
32
73
|
})
|
|
33
|
-
|
|
34
|
-
step.action.type === 'createNote' && step.action.info.title === validInfo.title && step.action.info.text === validInfo.text,
|
|
35
|
-
'createNote step round-trip failed',
|
|
74
|
+
record(
|
|
36
75
|
'createNote step round-trips',
|
|
76
|
+
step.action.type === 'createNote' && step.action.info.title === validInfo.title && step.action.info.text === validInfo.text,
|
|
77
|
+
`action=${JSON.stringify(step.action)}`,
|
|
37
78
|
)
|
|
38
79
|
|
|
39
|
-
await
|
|
80
|
+
await expect_rejected('createNote without title is rejected',
|
|
40
81
|
() => sdk.api.automation_steps.createOne({
|
|
41
82
|
journeyId: journey.id,
|
|
42
83
|
events: [{ type: 'onJourneyStart', info: {} }],
|
|
43
84
|
action: { type: 'createNote', info: { ...validInfo, title: undefined } as any },
|
|
44
85
|
}),
|
|
45
|
-
{ shouldError: true, onError: () => true },
|
|
46
86
|
)
|
|
47
|
-
await
|
|
87
|
+
await expect_rejected('createNote with over-length title is rejected',
|
|
48
88
|
() => sdk.api.automation_steps.createOne({
|
|
49
89
|
journeyId: journey.id,
|
|
50
90
|
events: [{ type: 'onJourneyStart', info: {} }],
|
|
51
91
|
action: { type: 'createNote', info: { ...validInfo, title: 'x'.repeat(251) } },
|
|
52
92
|
}),
|
|
53
|
-
{ shouldError: true, onError: () => true },
|
|
54
93
|
)
|
|
55
94
|
|
|
56
95
|
/*************** Runtime: the process endpoint ***************/
|
|
@@ -69,29 +108,60 @@ export const create_note_action_tests = async ({ sdk } : { sdk: Session, sdkNonA
|
|
|
69
108
|
|
|
70
109
|
// deterministic path: merge fields resolve, tags + source set
|
|
71
110
|
const enduser = await sdk.api.endusers.createOne({ fname: 'NoteTest' })
|
|
72
|
-
createdEnduserIds.push(enduser.id)
|
|
73
111
|
|
|
74
112
|
const result = await processFor(enduser.id, validInfo)
|
|
75
|
-
|
|
113
|
+
record(
|
|
114
|
+
'deterministic createNote succeeds',
|
|
115
|
+
result.success === true,
|
|
116
|
+
`success=${show(result.success)}, error=${show(result.error)}`,
|
|
117
|
+
)
|
|
76
118
|
|
|
77
119
|
const notes = await sdk.api.notes.getSome({ filter: { enduserId: enduser.id } })
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
120
|
+
record('exactly one note created', notes.length === 1, `expected 1 note, got ${notes.length}`)
|
|
121
|
+
record(
|
|
122
|
+
'title merge fields resolve',
|
|
123
|
+
notes[0]?.title === 'Note for NoteTest',
|
|
124
|
+
`title=${show(notes[0]?.title)}`,
|
|
125
|
+
)
|
|
126
|
+
record(
|
|
127
|
+
'text merge fields resolve',
|
|
128
|
+
notes[0]?.text === 'Hi NoteTest, this is a journey note.',
|
|
129
|
+
`text=${show(notes[0]?.text)}`,
|
|
130
|
+
)
|
|
131
|
+
record(
|
|
132
|
+
'tags set on note',
|
|
133
|
+
!!notes[0]?.tags?.includes('auto-note'),
|
|
134
|
+
`tags=${show(notes[0]?.tags)}`,
|
|
135
|
+
)
|
|
136
|
+
record(
|
|
137
|
+
'note source is Journey',
|
|
138
|
+
notes[0]?.source === 'Journey',
|
|
139
|
+
`source=${show(notes[0]?.source)}`,
|
|
140
|
+
)
|
|
141
|
+
record(
|
|
142
|
+
'note visible on timeline by default',
|
|
143
|
+
!notes[0]?.hiddenFromTimeline,
|
|
144
|
+
`hiddenFromTimeline=${show(notes[0]?.hiddenFromTimeline)}`,
|
|
145
|
+
)
|
|
146
|
+
record(
|
|
147
|
+
'deterministic note not flagged as AI-generated',
|
|
148
|
+
!notes[0]?.aiGenerated,
|
|
149
|
+
`aiGenerated=${show(notes[0]?.aiGenerated)}`,
|
|
150
|
+
)
|
|
85
151
|
|
|
86
152
|
// hiddenFromTimeline + no text variant
|
|
87
153
|
const hiddenResult = await processFor(enduser.id, { title: 'Hidden note', hiddenFromTimeline: true })
|
|
88
|
-
|
|
154
|
+
record(
|
|
155
|
+
'hidden createNote succeeds',
|
|
156
|
+
hiddenResult.success === true,
|
|
157
|
+
`success=${show(hiddenResult.success)}, error=${show(hiddenResult.error)}`,
|
|
158
|
+
)
|
|
89
159
|
const allNotes = await sdk.api.notes.getSome({ filter: { enduserId: enduser.id } })
|
|
90
160
|
const hiddenNote = allNotes.find(n => n.title === 'Hidden note')
|
|
91
|
-
|
|
92
|
-
!!hiddenNote && hiddenNote.hiddenFromTimeline === true && !hiddenNote.text,
|
|
93
|
-
'hidden/textless note not created correctly',
|
|
161
|
+
record(
|
|
94
162
|
'hiddenFromTimeline note created without text',
|
|
163
|
+
!!hiddenNote && hiddenNote.hiddenFromTimeline === true && !hiddenNote.text,
|
|
164
|
+
`note=${hiddenNote ? JSON.stringify(hiddenNote) : '(no note titled "Hidden note")'}`,
|
|
95
165
|
)
|
|
96
166
|
|
|
97
167
|
/*************** AI path ***************/
|
|
@@ -107,56 +177,65 @@ export const create_note_action_tests = async ({ sdk } : { sdk: Session, sdkNonA
|
|
|
107
177
|
events: [{ type: 'onJourneyStart', info: {} }],
|
|
108
178
|
action: { type: 'createNote', info: aiInfo },
|
|
109
179
|
})
|
|
110
|
-
|
|
111
|
-
aiStep.action.type === 'createNote' && aiStep.action.info.aiSummaryConfiguration?.enabled === true,
|
|
112
|
-
'AI createNote config round-trip failed',
|
|
180
|
+
record(
|
|
113
181
|
'AI createNote config round-trips',
|
|
182
|
+
aiStep.action.type === 'createNote' && aiStep.action.info.aiSummaryConfiguration?.enabled === true,
|
|
183
|
+
`action=${JSON.stringify(aiStep.action)}`,
|
|
114
184
|
)
|
|
115
185
|
|
|
186
|
+
// bedrockAIAllowed/credits are org-level and a provisioned tenant has neither, so only the
|
|
187
|
+
// configuration-error path is covered: the AI happy path cannot run on a tenant without Bedrock.
|
|
188
|
+
// Observed locally, the call RESOLVES with { success: false, error: 'Organization has not set up
|
|
189
|
+
// credits' }; a rejection is accepted too, since which of the two a missing-Bedrock tenant
|
|
190
|
+
// produces depends on where generation gives up. Either way the message must name the reason —
|
|
191
|
+
// a bare failure would let an unrelated regression pass as "Bedrock unavailable".
|
|
116
192
|
const aiEnduser = await sdk.api.endusers.createOne({ fname: 'AINoteTest' })
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
193
|
+
const AI_LABEL = 'AI createNote reports a configuration error (Bedrock unavailable — runtime generation skipped)'
|
|
194
|
+
const CONFIGURATION_ERROR = /bedrock|credit|enabled|ai/i
|
|
195
|
+
try {
|
|
196
|
+
const aiResult = await processFor(aiEnduser.id, aiInfo)
|
|
197
|
+
if (aiResult?.success) {
|
|
198
|
+
record(
|
|
199
|
+
AI_LABEL,
|
|
200
|
+
false,
|
|
201
|
+
'expected the AI arm to fail on a tenant without Bedrock, but it reported success —'
|
|
202
|
+
+ ' the AI happy path is deliberately not covered here',
|
|
203
|
+
)
|
|
204
|
+
} else {
|
|
205
|
+
record(
|
|
206
|
+
AI_LABEL,
|
|
207
|
+
CONFIGURATION_ERROR.test(aiResult?.error || ''),
|
|
208
|
+
`failed with: ${aiResult?.error || '(no error on the failed result)'}`,
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
} catch (err) {
|
|
212
|
+
const message = error_text(err)
|
|
213
|
+
record(
|
|
214
|
+
AI_LABEL,
|
|
215
|
+
CONFIGURATION_ERROR.test(message || ''),
|
|
216
|
+
`rejected with: ${message || '(no message on the rejection)'}`,
|
|
139
217
|
)
|
|
140
218
|
}
|
|
141
219
|
} finally {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
await sdk.api.endusers.deleteOne(id).catch(() => {})
|
|
145
|
-
}
|
|
220
|
+
// Teardown BEFORE anything asserts — assert calls process.exit, which would strand this tenant.
|
|
221
|
+
if (tenant) { try { await tenant.teardown() } catch (e) { console.error('teardown failed', e) } }
|
|
146
222
|
}
|
|
223
|
+
|
|
224
|
+
return checks
|
|
147
225
|
}
|
|
148
226
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
227
|
+
/** Asserting wrapper, for standalone runs. */
|
|
228
|
+
export const create_note_action_tests = async () => {
|
|
229
|
+
assert_checks('createNote action', await create_note_action_checks())
|
|
230
|
+
}
|
|
153
231
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
await create_note_action_tests({ sdk, sdkNonAdmin })
|
|
157
|
-
}
|
|
232
|
+
/** Enrolls this suite in the auto-discovered parallel pool — see run_discovered_isolated_suites. */
|
|
233
|
+
export const ISOLATED_SUITE: IsolatedSuite = { name: 'createNote action', run: create_note_action_checks }
|
|
158
234
|
|
|
159
|
-
|
|
235
|
+
// Allow running this test file independently
|
|
236
|
+
if (require.main === module) {
|
|
237
|
+
console.log(`🌐 Using API URL: ${host}`)
|
|
238
|
+
create_note_action_tests()
|
|
160
239
|
.then(() => {
|
|
161
240
|
console.log("✅ Create Note Action test suite completed successfully")
|
|
162
241
|
process.exit(0)
|
|
@@ -1,168 +1,140 @@
|
|
|
1
1
|
require('source-map-support').install();
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import {
|
|
4
|
+
assert_checks,
|
|
5
|
+
Check,
|
|
6
|
+
setup_isolated_tenant,
|
|
7
|
+
IsolatedSuite,
|
|
8
|
+
} from "../setup_isolated"
|
|
9
9
|
|
|
10
10
|
const host = process.env.API_URL || 'http://localhost:8080' as const
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
const RAND = () => Math.random().toString(36).slice(2, 10)
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Covers the "Create User Notifications" automation action fired by a Field Equals trigger, and the
|
|
16
|
+
* relatedRecords it attaches to the notification it creates.
|
|
17
|
+
*
|
|
18
|
+
* Provisions its own throwaway tenant: the trigger is org-wide automation state, and the check reads
|
|
19
|
+
* user_notifications, which is business-wide — on the shared fixture it both fires against every
|
|
20
|
+
* other suite's patients and reads their notifications.
|
|
21
|
+
*
|
|
22
|
+
* The tenant admin is used twice over: as the enduser's care-team member (the action's
|
|
23
|
+
* `careTeamOnly` matches `enduser.assignedTo`) and as the notification's recipient.
|
|
24
|
+
*/
|
|
25
|
+
export const create_user_notifications_trigger_checks = async (): Promise<Check[]> => {
|
|
26
|
+
const checks: Check[] = []
|
|
27
|
+
const record = (label: string, pass: boolean, detail: string) => checks.push({ label, pass, detail })
|
|
28
|
+
|
|
29
|
+
let tenant: Awaited<ReturnType<typeof setup_isolated_tenant>> | undefined
|
|
30
|
+
|
|
21
31
|
try {
|
|
22
|
-
|
|
23
|
-
|
|
32
|
+
tenant = await setup_isolated_tenant({
|
|
33
|
+
name: `Create User Notifications trigger ${RAND()}`,
|
|
34
|
+
users: [{ isAdmin: true }],
|
|
35
|
+
apiKeys: 0,
|
|
36
|
+
})
|
|
37
|
+
const { sdk } = tenant
|
|
38
|
+
|
|
39
|
+
// Setup - Create enduser assigned to the authenticated user
|
|
40
|
+
const testEnduser = await sdk.api.endusers.createOne({
|
|
41
|
+
assignedTo: [sdk.userInfo.id]
|
|
42
|
+
})
|
|
43
|
+
record(
|
|
24
44
|
'setup - create test enduser assigned to authenticated user',
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
assignedTo: [sdk.userInfo.id]
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
return testEnduser.assignedTo?.length === 1 && testEnduser.assignedTo[0] === sdk.userInfo.id
|
|
31
|
-
},
|
|
32
|
-
{ onResult: (result) => result === true }
|
|
45
|
+
testEnduser.assignedTo?.length === 1 && testEnduser.assignedTo[0] === sdk.userInfo.id,
|
|
46
|
+
`assignedTo=${JSON.stringify(testEnduser.assignedTo)}, expected [${sdk.userInfo.id}]`,
|
|
33
47
|
)
|
|
34
48
|
|
|
35
49
|
// set up trigger
|
|
36
|
-
await
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
info: {
|
|
45
|
-
field: '0',
|
|
46
|
-
value: 'trigger-test'
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
action: {
|
|
50
|
-
type: 'Create User Notifications',
|
|
51
|
-
info: {
|
|
52
|
-
message: 'Field equals notification',
|
|
53
|
-
notificationType: 'field-equals-notification',
|
|
54
|
-
careTeamOnly: true,
|
|
55
|
-
maxUsers: 1
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
triggerId = trigger.id
|
|
60
|
-
return !!trigger.id
|
|
61
|
-
},
|
|
62
|
-
{ onResult: (result) => result === true }
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
// Test 4: Submit form and verify notification
|
|
66
|
-
await async_test(
|
|
67
|
-
'submit form - verify notification created',
|
|
68
|
-
async () => {
|
|
69
|
-
await sdk.api.endusers.updateOne(testEnduser.id, {
|
|
70
|
-
fields: {
|
|
71
|
-
'0': 'trigger-test'
|
|
72
|
-
}
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
// Wait up to 10 seconds for notification
|
|
76
|
-
for (let i = 0; i < 10; i++) {
|
|
77
|
-
await new Promise(resolve => setTimeout(resolve, 1000))
|
|
78
|
-
|
|
79
|
-
const notifications = await sdk.api.user_notifications.getSome({ filter: {
|
|
80
|
-
type: 'field-equals-notification',
|
|
81
|
-
userId: sdk.userInfo.id
|
|
82
|
-
} })
|
|
83
|
-
|
|
84
|
-
if (notifications.length > 0) {
|
|
85
|
-
console.log(`✓ Found notification after ${i + 1} seconds`)
|
|
86
|
-
|
|
87
|
-
const notification = notifications[0]
|
|
88
|
-
|
|
89
|
-
// Verify notification structure and relatedRecords
|
|
90
|
-
console.log(`Notification details:`)
|
|
91
|
-
console.log(` - Type: ${notification.type}`)
|
|
92
|
-
console.log(` - User ID: ${notification.userId}`)
|
|
93
|
-
console.log(` - Message: ${notification.message}`)
|
|
94
|
-
console.log(` - Related Records: ${JSON.stringify(notification.relatedRecords)}`)
|
|
95
|
-
|
|
96
|
-
// Check if relatedRecords contains our test enduser
|
|
97
|
-
const hasCorrectEnduser = notification.relatedRecords?.some(record =>
|
|
98
|
-
record.type === 'enduser' && record.id === testEnduser.id
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
if (!hasCorrectEnduser) {
|
|
102
|
-
console.log(`❌ Notification does not contain correct enduser ID`)
|
|
103
|
-
console.log(` Expected enduser ID: ${testEnduser.id}`)
|
|
104
|
-
console.log(` Found related records: ${JSON.stringify(notification.relatedRecords)}`)
|
|
105
|
-
return false
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
console.log(`✓ Notification correctly associated with enduser ${testEnduser.id}`)
|
|
109
|
-
return true
|
|
110
|
-
}
|
|
50
|
+
const trigger = await sdk.api.automation_triggers.createOne({
|
|
51
|
+
title: `User Notification Test ${Date.now()}`,
|
|
52
|
+
status: 'Active',
|
|
53
|
+
event: {
|
|
54
|
+
type: 'Field Equals',
|
|
55
|
+
info: {
|
|
56
|
+
field: '0',
|
|
57
|
+
value: 'trigger-test'
|
|
111
58
|
}
|
|
112
|
-
|
|
113
|
-
console.log(`❌ No notification found after 10 seconds`)
|
|
114
|
-
return false
|
|
115
59
|
},
|
|
116
|
-
|
|
60
|
+
action: {
|
|
61
|
+
type: 'Create User Notifications',
|
|
62
|
+
info: {
|
|
63
|
+
message: 'Field equals notification',
|
|
64
|
+
notificationType: 'field-equals-notification',
|
|
65
|
+
careTeamOnly: true,
|
|
66
|
+
maxUsers: 1
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
record(
|
|
71
|
+
'create trigger - field equals event',
|
|
72
|
+
!!trigger.id,
|
|
73
|
+
`trigger id=${trigger.id || '(none returned)'}`,
|
|
117
74
|
)
|
|
118
75
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
throw error
|
|
124
|
-
} finally {
|
|
125
|
-
// Cleanup
|
|
126
|
-
console.log("🧹 Cleaning up test resources...")
|
|
127
|
-
|
|
128
|
-
try {
|
|
129
|
-
if (triggerId) {
|
|
130
|
-
await sdk.api.automation_triggers.deleteOne(triggerId)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (formId) {
|
|
134
|
-
await sdk.api.forms.deleteOne(formId)
|
|
76
|
+
// Set the field and verify the notification is created, with the enduser in relatedRecords
|
|
77
|
+
await sdk.api.endusers.updateOne(testEnduser.id, {
|
|
78
|
+
fields: {
|
|
79
|
+
'0': 'trigger-test'
|
|
135
80
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
// Wait up to 10 seconds for notification
|
|
84
|
+
let notification: Awaited<ReturnType<typeof sdk.api.user_notifications.getSome>>[number] | undefined
|
|
85
|
+
for (let i = 0; i < 10 && !notification; i++) {
|
|
86
|
+
await new Promise(resolve => setTimeout(resolve, 1000))
|
|
87
|
+
|
|
88
|
+
const notifications = await sdk.api.user_notifications.getSome({ filter: {
|
|
89
|
+
type: 'field-equals-notification',
|
|
90
|
+
userId: sdk.userInfo.id
|
|
91
|
+
} })
|
|
92
|
+
|
|
93
|
+
notification = notifications[0]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (!notification) {
|
|
97
|
+
record(
|
|
98
|
+
'submit form - verify notification created',
|
|
99
|
+
false,
|
|
100
|
+
'no field-equals-notification for the care-team user after 10 seconds',
|
|
101
|
+
)
|
|
102
|
+
} else {
|
|
103
|
+
// Verify notification structure and relatedRecords
|
|
104
|
+
const hasCorrectEnduser = !!notification.relatedRecords?.some(r =>
|
|
105
|
+
r.type === 'enduser' && r.id === testEnduser.id
|
|
106
|
+
)
|
|
107
|
+
record(
|
|
108
|
+
'submit form - verify notification created',
|
|
109
|
+
hasCorrectEnduser,
|
|
110
|
+
`type=${notification.type}, userId=${notification.userId}, message=${notification.message},`
|
|
111
|
+
+ ` relatedRecords=${JSON.stringify(notification.relatedRecords)}`
|
|
112
|
+
+ (hasCorrectEnduser ? '' : ` — expected a related enduser record with id ${testEnduser.id}`),
|
|
113
|
+
)
|
|
150
114
|
}
|
|
115
|
+
} finally {
|
|
116
|
+
// Teardown BEFORE anything asserts — assert calls process.exit, which would strand this tenant.
|
|
117
|
+
if (tenant) { try { await tenant.teardown() } catch (e) { console.error('teardown failed', e) } }
|
|
151
118
|
}
|
|
119
|
+
|
|
120
|
+
return checks
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** Asserting wrapper, for standalone runs. */
|
|
124
|
+
export const create_user_notifications_trigger_tests = async () => {
|
|
125
|
+
assert_checks('Create User Notifications trigger', await create_user_notifications_trigger_checks())
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Enrolls this suite in the auto-discovered parallel pool — see run_discovered_isolated_suites. */
|
|
129
|
+
export const ISOLATED_SUITE: IsolatedSuite = {
|
|
130
|
+
name: 'Create User Notifications trigger',
|
|
131
|
+
run: create_user_notifications_trigger_checks,
|
|
152
132
|
}
|
|
153
133
|
|
|
154
134
|
// Allow running this test file independently
|
|
155
135
|
if (require.main === module) {
|
|
156
136
|
console.log(`🌐 Using API URL: ${host}`)
|
|
157
|
-
|
|
158
|
-
const sdkNonAdmin = new Session({ host })
|
|
159
|
-
|
|
160
|
-
const runTests = async () => {
|
|
161
|
-
await setup_tests(sdk, sdkNonAdmin)
|
|
162
|
-
await create_user_notifications_trigger_tests({ sdk })
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
runTests()
|
|
137
|
+
create_user_notifications_trigger_tests()
|
|
166
138
|
.then(() => {
|
|
167
139
|
console.log("✅ Create User Notifications trigger test suite completed successfully")
|
|
168
140
|
process.exit(0)
|
|
@@ -171,4 +143,4 @@ if (require.main === module) {
|
|
|
171
143
|
console.error("❌ Create User Notifications trigger test suite failed:", error)
|
|
172
144
|
process.exit(1)
|
|
173
145
|
})
|
|
174
|
-
}
|
|
146
|
+
}
|