@tellescope/sdk 2.0.0-beta.1 → 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/CLAUDE.md +24 -0
- package/env.example +6 -0
- package/lib/cjs/sdk.d.ts +375 -4
- 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/booking_prevent_upcoming_duplicate.test.d.ts +22 -0
- package/lib/cjs/tests/api_tests/booking_prevent_upcoming_duplicate.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/booking_prevent_upcoming_duplicate.test.js +506 -0
- package/lib/cjs/tests/api_tests/booking_prevent_upcoming_duplicate.test.js.map +1 -0
- 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/enduser_fields_sync.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/enduser_fields_sync.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/enduser_fields_sync.test.js +3 -1
- package/lib/cjs/tests/api_tests/enduser_fields_sync.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/enduser_observations_auto_review.test.js +3 -1
- package/lib/cjs/tests/api_tests/enduser_observations_auto_review.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/form_vital_reading.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/form_vital_reading.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/form_vital_reading.test.js +461 -0
- package/lib/cjs/tests/api_tests/form_vital_reading.test.js.map +1 -0
- 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/journey_statistics_cache.test.d.ts +26 -0
- package/lib/cjs/tests/api_tests/journey_statistics_cache.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/journey_statistics_cache.test.js +232 -0
- package/lib/cjs/tests/api_tests/journey_statistics_cache.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/journey_step_manual_count.test.d.ts +34 -0
- package/lib/cjs/tests/api_tests/journey_step_manual_count.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/journey_step_manual_count.test.js +243 -0
- package/lib/cjs/tests/api_tests/journey_step_manual_count.test.js.map +1 -0
- 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 +9 -1
- 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 +118 -32
- 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 +3 -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 +221 -52
- 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_embed_leave_message.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/phone_embed_leave_message.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/phone_embed_leave_message.test.js +571 -0
- package/lib/cjs/tests/api_tests/phone_embed_leave_message.test.js.map +1 -0
- 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 +3 -1
- package/lib/cjs/tests/api_tests/programs.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/programs.test.js +474 -51
- package/lib/cjs/tests/api_tests/programs.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/public_form_case_insensitive_match.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/public_form_case_insensitive_match.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/public_form_case_insensitive_match.test.js +733 -0
- package/lib/cjs/tests/api_tests/public_form_case_insensitive_match.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js +3 -1
- package/lib/cjs/tests/api_tests/security/add-to-journey-foreign-enduserid.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/appointment-reschedule-ownership.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/security/appointment-reschedule-ownership.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/appointment-reschedule-ownership.test.js +3 -1
- package/lib/cjs/tests/api_tests/security/appointment-reschedule-ownership.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/file-link-session-confinement.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/security/file-link-session-confinement.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/file-link-session-confinement.test.js +3 -1
- package/lib/cjs/tests/api_tests/security/file-link-session-confinement.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.js +3 -1
- package/lib/cjs/tests/api_tests/security/form-logic-js-execution.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/formsort_webhook_auth_field_lock.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/formsort_webhook_auth_field_lock.test.js +424 -39
- package/lib/cjs/tests/api_tests/security/formsort_webhook_auth_field_lock.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/rich-text-answer-sanitized-on-write.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/security/rich-text-answer-sanitized-on-write.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/rich-text-answer-sanitized-on-write.test.js +3 -1
- package/lib/cjs/tests/api_tests/security/rich-text-answer-sanitized-on-write.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/session_for_join_link.test.d.ts +10 -0
- package/lib/cjs/tests/api_tests/session_for_join_link.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/session_for_join_link.test.js +147 -0
- package/lib/cjs/tests/api_tests/session_for_join_link.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/set_fields_order_templates.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/set_fields_order_templates.test.js +191 -88
- package/lib/cjs/tests/api_tests/set_fields_order_templates.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/stripe_checkout_items.test.d.ts +17 -0
- package/lib/cjs/tests/api_tests/stripe_checkout_items.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/stripe_checkout_items.test.js +219 -0
- package/lib/cjs/tests/api_tests/stripe_checkout_items.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/stripe_multiple_customer_ids.test.d.ts +5 -0
- package/lib/cjs/tests/api_tests/stripe_multiple_customer_ids.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/stripe_multiple_customer_ids.test.js +396 -0
- package/lib/cjs/tests/api_tests/stripe_multiple_customer_ids.test.js.map +1 -0
- 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/tickets_bulk_assign_from_queue.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_from_queue.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_from_queue.test.js +3 -1
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_from_queue.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/totp_mfa.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/totp_mfa.test.js +37 -31
- package/lib/cjs/tests/api_tests/totp_mfa.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_contains_matching.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/trigger_contains_matching.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/trigger_contains_matching.test.js +3 -1
- package/lib/cjs/tests/api_tests/trigger_contains_matching.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_logs_restore_deleted.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/user_logs_restore_deleted.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/user_logs_restore_deleted.test.js +3 -1
- package/lib/cjs/tests/api_tests/user_logs_restore_deleted.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/vital_review_trigger_action.test.d.ts +3 -1
- package/lib/cjs/tests/api_tests/vital_review_trigger_action.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/vital_review_trigger_action.test.js +3 -1
- package/lib/cjs/tests/api_tests/vital_review_trigger_action.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/vitl_push.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/vitl_push.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/vitl_push.test.js +341 -0
- package/lib/cjs/tests/api_tests/vitl_push.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 +55 -0
- package/lib/cjs/tests/setup_isolated.d.ts.map +1 -1
- package/lib/cjs/tests/setup_isolated.js +119 -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 +385 -535
- 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/tests/unit_tests/isolated_suite_discovery.test.d.ts +2 -0
- package/lib/cjs/tests/unit_tests/isolated_suite_discovery.test.d.ts.map +1 -0
- package/lib/cjs/tests/unit_tests/isolated_suite_discovery.test.js +201 -0
- package/lib/cjs/tests/unit_tests/isolated_suite_discovery.test.js.map +1 -0
- package/lib/cjs/tests/unit_tests/programs_conditional_logic.test.d.ts +3 -0
- package/lib/cjs/tests/unit_tests/programs_conditional_logic.test.d.ts.map +1 -0
- package/lib/cjs/tests/unit_tests/programs_conditional_logic.test.js +120 -0
- package/lib/cjs/tests/unit_tests/programs_conditional_logic.test.js.map +1 -0
- package/lib/cjs/tests/webhooks_tests.js +44 -34
- package/lib/cjs/tests/webhooks_tests.js.map +1 -1
- package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/esm/sdk.d.ts +375 -4
- 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/booking_prevent_upcoming_duplicate.test.d.ts +22 -0
- package/lib/esm/tests/api_tests/booking_prevent_upcoming_duplicate.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/booking_prevent_upcoming_duplicate.test.js +501 -0
- package/lib/esm/tests/api_tests/booking_prevent_upcoming_duplicate.test.js.map +1 -0
- 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/enduser_fields_sync.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/enduser_fields_sync.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/enduser_fields_sync.test.js +2 -0
- package/lib/esm/tests/api_tests/enduser_fields_sync.test.js.map +1 -1
- package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/enduser_observations_auto_review.test.js +2 -0
- package/lib/esm/tests/api_tests/enduser_observations_auto_review.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/form_vital_reading.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/form_vital_reading.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/form_vital_reading.test.js +456 -0
- package/lib/esm/tests/api_tests/form_vital_reading.test.js.map +1 -0
- 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/journey_statistics_cache.test.d.ts +26 -0
- package/lib/esm/tests/api_tests/journey_statistics_cache.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/journey_statistics_cache.test.js +227 -0
- package/lib/esm/tests/api_tests/journey_statistics_cache.test.js.map +1 -0
- package/lib/esm/tests/api_tests/journey_step_manual_count.test.d.ts +34 -0
- package/lib/esm/tests/api_tests/journey_step_manual_count.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/journey_step_manual_count.test.js +238 -0
- package/lib/esm/tests/api_tests/journey_step_manual_count.test.js.map +1 -0
- 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 +9 -1
- 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 +117 -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 +3 -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 +220 -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_embed_leave_message.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/phone_embed_leave_message.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/phone_embed_leave_message.test.js +566 -0
- package/lib/esm/tests/api_tests/phone_embed_leave_message.test.js.map +1 -0
- 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 +3 -1
- package/lib/esm/tests/api_tests/programs.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/programs.test.js +473 -50
- package/lib/esm/tests/api_tests/programs.test.js.map +1 -1
- package/lib/esm/tests/api_tests/public_form_case_insensitive_match.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/public_form_case_insensitive_match.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/public_form_case_insensitive_match.test.js +728 -0
- package/lib/esm/tests/api_tests/public_form_case_insensitive_match.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.test.js +2 -0
- package/lib/esm/tests/api_tests/security/add-to-journey-foreign-enduserid.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/appointment-reschedule-ownership.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/security/appointment-reschedule-ownership.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/appointment-reschedule-ownership.test.js +2 -0
- package/lib/esm/tests/api_tests/security/appointment-reschedule-ownership.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/file-link-session-confinement.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/security/file-link-session-confinement.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/file-link-session-confinement.test.js +2 -0
- package/lib/esm/tests/api_tests/security/file-link-session-confinement.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.js +2 -0
- package/lib/esm/tests/api_tests/security/form-logic-js-execution.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/formsort_webhook_auth_field_lock.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/formsort_webhook_auth_field_lock.test.js +424 -39
- package/lib/esm/tests/api_tests/security/formsort_webhook_auth_field_lock.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/rich-text-answer-sanitized-on-write.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/security/rich-text-answer-sanitized-on-write.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/rich-text-answer-sanitized-on-write.test.js +2 -0
- package/lib/esm/tests/api_tests/security/rich-text-answer-sanitized-on-write.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/session_for_join_link.test.d.ts +10 -0
- package/lib/esm/tests/api_tests/session_for_join_link.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/session_for_join_link.test.js +142 -0
- package/lib/esm/tests/api_tests/session_for_join_link.test.js.map +1 -0
- package/lib/esm/tests/api_tests/set_fields_order_templates.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/set_fields_order_templates.test.js +191 -88
- package/lib/esm/tests/api_tests/set_fields_order_templates.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/stripe_checkout_items.test.d.ts +17 -0
- package/lib/esm/tests/api_tests/stripe_checkout_items.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/stripe_checkout_items.test.js +214 -0
- package/lib/esm/tests/api_tests/stripe_checkout_items.test.js.map +1 -0
- package/lib/esm/tests/api_tests/stripe_multiple_customer_ids.test.d.ts +5 -0
- package/lib/esm/tests/api_tests/stripe_multiple_customer_ids.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/stripe_multiple_customer_ids.test.js +388 -0
- package/lib/esm/tests/api_tests/stripe_multiple_customer_ids.test.js.map +1 -0
- 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/tickets_bulk_assign_from_queue.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/tickets_bulk_assign_from_queue.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/tickets_bulk_assign_from_queue.test.js +2 -0
- package/lib/esm/tests/api_tests/tickets_bulk_assign_from_queue.test.js.map +1 -1
- package/lib/esm/tests/api_tests/totp_mfa.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/totp_mfa.test.js +37 -31
- package/lib/esm/tests/api_tests/totp_mfa.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_contains_matching.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/trigger_contains_matching.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/trigger_contains_matching.test.js +2 -0
- package/lib/esm/tests/api_tests/trigger_contains_matching.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_logs_restore_deleted.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/user_logs_restore_deleted.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/user_logs_restore_deleted.test.js +2 -0
- package/lib/esm/tests/api_tests/user_logs_restore_deleted.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/vital_review_trigger_action.test.d.ts +3 -1
- package/lib/esm/tests/api_tests/vital_review_trigger_action.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/vital_review_trigger_action.test.js +2 -0
- package/lib/esm/tests/api_tests/vital_review_trigger_action.test.js.map +1 -1
- package/lib/esm/tests/api_tests/vitl_push.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/vitl_push.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/vitl_push.test.js +333 -0
- package/lib/esm/tests/api_tests/vitl_push.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 +55 -0
- package/lib/esm/tests/setup_isolated.d.ts.map +1 -1
- package/lib/esm/tests/setup_isolated.js +114 -0
- 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 +386 -536
- 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/esm/tests/unit_tests/isolated_suite_discovery.test.d.ts +2 -0
- package/lib/esm/tests/unit_tests/isolated_suite_discovery.test.d.ts.map +1 -0
- package/lib/esm/tests/unit_tests/isolated_suite_discovery.test.js +174 -0
- package/lib/esm/tests/unit_tests/isolated_suite_discovery.test.js.map +1 -0
- package/lib/esm/tests/unit_tests/programs_conditional_logic.test.d.ts +3 -0
- package/lib/esm/tests/unit_tests/programs_conditional_logic.test.d.ts.map +1 -0
- package/lib/esm/tests/unit_tests/programs_conditional_logic.test.js +117 -0
- package/lib/esm/tests/unit_tests/programs_conditional_logic.test.js.map +1 -0
- package/lib/esm/tests/webhooks_tests.js +44 -34
- package/lib/esm/tests/webhooks_tests.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -11
- package/src/sdk.ts +14 -2
- 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/booking_prevent_upcoming_duplicate.test.ts +541 -0
- 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/enduser_fields_sync.test.ts +4 -0
- package/src/tests/api_tests/enduser_observations_auto_review.test.ts +4 -0
- 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/form_vital_reading.test.ts +393 -0
- 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/journey_statistics_cache.test.ts +237 -0
- package/src/tests/api_tests/journey_step_manual_count.test.ts +220 -0
- 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 +107 -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 +174 -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_embed_leave_message.test.ts +541 -0
- package/src/tests/api_tests/phone_tree_enduser_condition.test.ts +81 -32
- package/src/tests/api_tests/programs.test.ts +701 -0
- package/src/tests/api_tests/public_form_case_insensitive_match.test.ts +632 -0
- package/src/tests/api_tests/security/add-to-journey-foreign-enduserid.test.ts +4 -0
- package/src/tests/api_tests/security/ai-conversations-rbac.test.ts +248 -128
- package/src/tests/api_tests/security/appointment-reschedule-ownership.test.ts +4 -0
- 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/file-link-session-confinement.test.ts +4 -0
- package/src/tests/api_tests/security/form-logic-js-execution.test.ts +4 -0
- package/src/tests/api_tests/security/formsort_webhook_auth_field_lock.test.ts +225 -0
- 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/rich-text-answer-sanitized-on-write.test.ts +4 -0
- 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/session_for_join_link.test.ts +99 -0
- package/src/tests/api_tests/set_fields_order_templates.test.ts +94 -9
- package/src/tests/api_tests/stedi_approval.test.ts +156 -90
- package/src/tests/api_tests/stripe_checkout_items.test.ts +186 -0
- 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/tickets_bulk_assign_from_queue.test.ts +4 -0
- package/src/tests/api_tests/totp_mfa.test.ts +10 -5
- package/src/tests/api_tests/translations.test.ts +69 -46
- package/src/tests/api_tests/trigger_contains_matching.test.ts +4 -0
- package/src/tests/api_tests/trigger_set_fields_date_difference.test.ts +198 -256
- package/src/tests/api_tests/user_logs_restore_deleted.test.ts +4 -0
- package/src/tests/api_tests/user_preferences.test.ts +227 -0
- package/src/tests/api_tests/vital_review_trigger_action.test.ts +455 -0
- package/src/tests/api_tests/vitl_push.test.ts +323 -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 +147 -0
- package/src/tests/tests.ts +165 -177
- package/src/tests/{api_tests → unit_tests}/date_string_validation.test.ts +2 -23
- package/src/tests/unit_tests/isolated_suite_discovery.test.ts +178 -0
- package/src/tests/unit_tests/programs_conditional_logic.test.ts +189 -0
- package/src/tests/webhooks_tests.ts +6 -1
- package/test_generated.pdf +0 -0
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
require('source-map-support').install();
|
|
2
|
+
|
|
3
|
+
import { EnduserSession, Session } from "../../sdk"
|
|
4
|
+
import {
|
|
5
|
+
assert_checks,
|
|
6
|
+
Check,
|
|
7
|
+
setup_isolated_tenant,
|
|
8
|
+
IsolatedSuite,
|
|
9
|
+
} from "../setup_isolated"
|
|
10
|
+
import { Form, FormField } from "@tellescope/types-client"
|
|
11
|
+
|
|
12
|
+
const host = process.env.API_URL || 'http://localhost:8080' as const
|
|
13
|
+
|
|
14
|
+
const RAND = () => Math.random().toString(36).slice(2, 10)
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Coverage for `settings.endusers.caseInsensitiveMatching` — the per-org opt-in that makes public
|
|
18
|
+
* form intake match an existing contact when only the CAPITALIZATION of fname/lname differs.
|
|
19
|
+
*
|
|
20
|
+
* Two matchers are gated by the setting and both are exercised here:
|
|
21
|
+
* - `session_for_public_form` (api/v1/api.ts), the intake screen
|
|
22
|
+
* - `resolveAutoMergeBeforeSubmission` (api/modules/auto_merge.ts), for autoMergeOnSubmission forms
|
|
23
|
+
*
|
|
24
|
+
* Fixture warning: `nameValidator` applies `first_letter_capitalized`, so "john" is already stored and
|
|
25
|
+
* submitted as "John" and a "john"/"John" fixture would pass with the setting OFF, proving nothing.
|
|
26
|
+
* Every case here differs AFTER the first letter ("MCDONALD" vs "Mcdonald").
|
|
27
|
+
*
|
|
28
|
+
* `setup_isolated` rather than `setup_tests` because these checks flip an ORGANIZATION setting, which
|
|
29
|
+
* on the shared fixture org would change behavior under every concurrently running suite. It also
|
|
30
|
+
* asserts on "how many contacts match this name", which needs a tenant nobody else writes to.
|
|
31
|
+
*
|
|
32
|
+
* Runs standalone or as part of the main suite:
|
|
33
|
+
* npm run test:modular -- api_tests/public_form_case_insensitive_match
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/** Builds a public form with the intake questions the matchers read.
|
|
37
|
+
* `intakePhone: 'optional'` so `session_for_public_form` does not reject a submission with no phone
|
|
38
|
+
* — the endpoint requires a phone number unless the form configures one. */
|
|
39
|
+
const createPublicForm = async (sdk: Session, { autoMergeOnSubmission = false } = {}) => {
|
|
40
|
+
const form = await sdk.api.forms.createOne({
|
|
41
|
+
title: `Case Insensitive Match ${RAND()}`,
|
|
42
|
+
allowPublicURL: true,
|
|
43
|
+
intakePhone: 'optional',
|
|
44
|
+
autoMergeOnSubmission,
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
// sequential: each field's previousFields references the one before it
|
|
48
|
+
const fnameField = await sdk.api.form_fields.createOne({
|
|
49
|
+
formId: form.id, title: 'First Name', type: 'string', intakeField: 'fname',
|
|
50
|
+
previousFields: [{ type: 'root', info: {} }],
|
|
51
|
+
})
|
|
52
|
+
const lnameField = await sdk.api.form_fields.createOne({
|
|
53
|
+
formId: form.id, title: 'Last Name', type: 'string', intakeField: 'lname',
|
|
54
|
+
previousFields: [{ type: 'after', info: { fieldId: fnameField.id } }],
|
|
55
|
+
})
|
|
56
|
+
const dobField = await sdk.api.form_fields.createOne({
|
|
57
|
+
formId: form.id, title: 'Date of Birth', type: 'dateString', intakeField: 'dateOfBirth',
|
|
58
|
+
previousFields: [{ type: 'after', info: { fieldId: lnameField.id } }],
|
|
59
|
+
})
|
|
60
|
+
const emailField = await sdk.api.form_fields.createOne({
|
|
61
|
+
formId: form.id, title: 'Email', type: 'email', intakeField: 'email',
|
|
62
|
+
previousFields: [{ type: 'after', info: { fieldId: dobField.id } }],
|
|
63
|
+
})
|
|
64
|
+
const phoneField = await sdk.api.form_fields.createOne({
|
|
65
|
+
formId: form.id, title: 'Phone', type: 'phone', intakeField: 'phone',
|
|
66
|
+
previousFields: [{ type: 'after', info: { fieldId: emailField.id } }],
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
return { form, fields: [fnameField, lnameField, dobField, emailField, phoneField] }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Drives the intake screen exactly as a public visitor would, returning the enduser the session was
|
|
73
|
+
* minted for. This is the `session_for_public_form` matcher under test. */
|
|
74
|
+
const intakeSession = async (
|
|
75
|
+
form: Form,
|
|
76
|
+
values: { fname?: string, lname?: string, dateOfBirth?: string, email?: string },
|
|
77
|
+
) => {
|
|
78
|
+
const enduserSDK = new EnduserSession({ host, businessId: form.businessId })
|
|
79
|
+
const { enduserId, accessCode, authToken } = await enduserSDK.api.form_responses.session_for_public_form({
|
|
80
|
+
formId: form.id,
|
|
81
|
+
businessId: form.businessId,
|
|
82
|
+
...values,
|
|
83
|
+
})
|
|
84
|
+
return { enduserId, accessCode, authedSDK: new EnduserSession({ host, businessId: form.businessId, authToken }) }
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** The intake screen alone, which is the matcher under test. */
|
|
88
|
+
const intake = async (
|
|
89
|
+
form: Form,
|
|
90
|
+
values: { fname?: string, lname?: string, dateOfBirth?: string, email?: string },
|
|
91
|
+
) => (await intakeSession(form, values)).enduserId
|
|
92
|
+
|
|
93
|
+
/** Intake followed by a real submission, so the intake-field write onto the matched contact runs. */
|
|
94
|
+
const intakeAndSubmit = async (
|
|
95
|
+
form: Form,
|
|
96
|
+
fields: FormField[],
|
|
97
|
+
values: { fname: string, lname: string, dateOfBirth: string },
|
|
98
|
+
) => {
|
|
99
|
+
const { enduserId, accessCode, authedSDK } = await intakeSession(form, values)
|
|
100
|
+
const byIntake = (intakeField: string) => fields.find(f => f.intakeField === intakeField)!
|
|
101
|
+
await authedSDK.api.form_responses.submit_form_response({
|
|
102
|
+
accessCode,
|
|
103
|
+
responses: [
|
|
104
|
+
{ fieldId: byIntake('fname').id, fieldTitle: 'First Name', answer: { type: 'string', value: values.fname } },
|
|
105
|
+
{ fieldId: byIntake('lname').id, fieldTitle: 'Last Name', answer: { type: 'string', value: values.lname } },
|
|
106
|
+
{ fieldId: byIntake('dateOfBirth').id, fieldTitle: 'Date of Birth', answer: { type: 'dateString', value: values.dateOfBirth } },
|
|
107
|
+
],
|
|
108
|
+
})
|
|
109
|
+
return enduserId
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Drives an auto-merge submission: a `skipMatch` session (which always inserts a fresh contact),
|
|
113
|
+
* then a submission whose intake answers are what `resolveAutoMergeBeforeSubmission` matches on. */
|
|
114
|
+
const submitWithSkipMatch = async (
|
|
115
|
+
form: Form,
|
|
116
|
+
fields: FormField[],
|
|
117
|
+
values: { fname: string, lname: string, dateOfBirth: string },
|
|
118
|
+
) => {
|
|
119
|
+
const enduserSDK = new EnduserSession({ host, businessId: form.businessId })
|
|
120
|
+
const { authToken, accessCode, enduserId } = await enduserSDK.api.form_responses.session_for_public_form({
|
|
121
|
+
formId: form.id,
|
|
122
|
+
businessId: form.businessId,
|
|
123
|
+
skipMatch: true,
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
const authedSDK = new EnduserSession({ host, businessId: form.businessId, authToken })
|
|
127
|
+
|
|
128
|
+
const byIntake = (intakeField: string) => fields.find(f => f.intakeField === intakeField)!
|
|
129
|
+
await authedSDK.api.form_responses.submit_form_response({
|
|
130
|
+
accessCode,
|
|
131
|
+
responses: [
|
|
132
|
+
{ fieldId: byIntake('fname').id, fieldTitle: 'First Name', answer: { type: 'string', value: values.fname } },
|
|
133
|
+
{ fieldId: byIntake('lname').id, fieldTitle: 'Last Name', answer: { type: 'string', value: values.lname } },
|
|
134
|
+
{ fieldId: byIntake('dateOfBirth').id, fieldTitle: 'Date of Birth', answer: { type: 'dateString', value: values.dateOfBirth } },
|
|
135
|
+
],
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
return enduserId
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const enduserExists = async (sdk: Session, enduserId: string) => {
|
|
142
|
+
try {
|
|
143
|
+
await sdk.api.endusers.getOne(enduserId)
|
|
144
|
+
return true
|
|
145
|
+
} catch {
|
|
146
|
+
return false
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export const public_form_case_insensitive_match_checks = async (): Promise<Check[]> => {
|
|
151
|
+
const checks: Check[] = []
|
|
152
|
+
const record = (label: string, pass: boolean, detail: string) => checks.push({ label, pass, detail })
|
|
153
|
+
|
|
154
|
+
let tenant: Awaited<ReturnType<typeof setup_isolated_tenant>> | undefined
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
tenant = await setup_isolated_tenant({
|
|
158
|
+
name: `PublicFormCaseInsensitive ${RAND()}`,
|
|
159
|
+
users: [{ isAdmin: true }],
|
|
160
|
+
apiKeys: 0,
|
|
161
|
+
})
|
|
162
|
+
const { sdk, businessId } = tenant
|
|
163
|
+
|
|
164
|
+
// Only writes when the value actually changes. The generic update route throttles identical
|
|
165
|
+
// updates to the same record (3 per 30s, keyed on the serialized body), so re-asserting the same
|
|
166
|
+
// toggle between sections would fail the run with a 429 rather than a check.
|
|
167
|
+
let caseInsensitiveState: boolean | undefined
|
|
168
|
+
const setCaseInsensitive = async (on: boolean) => {
|
|
169
|
+
if (caseInsensitiveState === on) return
|
|
170
|
+
await sdk.api.organizations.updateOne(businessId, {
|
|
171
|
+
settings: { endusers: { caseInsensitiveMatching: on } },
|
|
172
|
+
})
|
|
173
|
+
caseInsensitiveState = on
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* ============ 1. setting OFF: a capitalization variant creates a second contact ============ */
|
|
177
|
+
{
|
|
178
|
+
await setCaseInsensitive(false)
|
|
179
|
+
const { form, fields } = await createPublicForm(sdk)
|
|
180
|
+
const DOB = '1990-01-02'
|
|
181
|
+
|
|
182
|
+
// stored "MCDONALD" — nameValidator only capitalizes the FIRST letter, so this survives as-is
|
|
183
|
+
const stored = await sdk.api.endusers.createOne({ fname: 'John', lname: 'MCDONALD', dateOfBirth: DOB })
|
|
184
|
+
record(
|
|
185
|
+
'fixture: a non-first-letter capitalization variant is stored verbatim',
|
|
186
|
+
stored.lname === 'MCDONALD',
|
|
187
|
+
`stored lname=${JSON.stringify(stored.lname)} (if this is not MCDONALD every other check is vacuous)`,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
const matchedId = await intake(form, { fname: 'John', lname: 'Mcdonald', dateOfBirth: DOB })
|
|
191
|
+
record(
|
|
192
|
+
'setting OFF: "Mcdonald" does NOT match stored "MCDONALD" (unchanged behavior)',
|
|
193
|
+
matchedId !== stored.id,
|
|
194
|
+
`intake resolved to ${matchedId}, stored contact is ${stored.id}`,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
// control for the check above: an exact match still matches with the setting off
|
|
198
|
+
const exactId = await intake(form, { fname: 'John', lname: 'MCDONALD', dateOfBirth: DOB })
|
|
199
|
+
record(
|
|
200
|
+
'setting OFF: an exactly-matching name still matches (control)',
|
|
201
|
+
exactId === stored.id,
|
|
202
|
+
`intake resolved to ${exactId}, expected ${stored.id}`,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
// The capitalization guard in save_enduser_updates_for_form_response must be INERT for an
|
|
206
|
+
// organization that has not opted in: a case-only name difference submitted against a matched
|
|
207
|
+
// contact still writes through, exactly as before this change. Matched by email so the
|
|
208
|
+
// submitted last name is free to differ from the stored one.
|
|
209
|
+
const OFF_EMAIL = `dontsend-off-${RAND()}@tellescope.com`
|
|
210
|
+
const offContact = await sdk.api.endusers.createOne({ fname: 'Off', lname: 'MCDONALD', email: OFF_EMAIL })
|
|
211
|
+
const offSession = await intakeSession(form, { email: OFF_EMAIL })
|
|
212
|
+
const offField = (intakeField: string) => fields.find(f => f.intakeField === intakeField)!
|
|
213
|
+
await offSession.authedSDK.api.form_responses.submit_form_response({
|
|
214
|
+
accessCode: offSession.accessCode,
|
|
215
|
+
responses: [
|
|
216
|
+
{ fieldId: offField('fname').id, fieldTitle: 'First Name', answer: { type: 'string', value: 'Off' } },
|
|
217
|
+
{ fieldId: offField('lname').id, fieldTitle: 'Last Name', answer: { type: 'string', value: 'Mcdonald' } },
|
|
218
|
+
],
|
|
219
|
+
})
|
|
220
|
+
const offAfter = await sdk.api.endusers.getOne(offContact.id)
|
|
221
|
+
record(
|
|
222
|
+
'setting OFF: a case-only name change from intake still writes through (guard is inert)',
|
|
223
|
+
offSession.enduserId === offContact.id && offAfter.lname === 'Mcdonald',
|
|
224
|
+
`intake resolved to ${offSession.enduserId} (expected ${offContact.id}); stored lname is ${JSON.stringify(offAfter.lname)}, expected "Mcdonald"`,
|
|
225
|
+
)
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* ============ 2. setting ON: the variant matches, and does not rewrite the name ============ */
|
|
229
|
+
{
|
|
230
|
+
await setCaseInsensitive(true)
|
|
231
|
+
const { form, fields } = await createPublicForm(sdk)
|
|
232
|
+
const DOB = '1991-02-03'
|
|
233
|
+
const stored = await sdk.api.endusers.createOne({ fname: 'Jane', lname: 'MCDONALD', dateOfBirth: DOB })
|
|
234
|
+
|
|
235
|
+
const matchedId = await intake(form, { fname: 'Jane', lname: 'Mcdonald', dateOfBirth: DOB })
|
|
236
|
+
record(
|
|
237
|
+
'setting ON: "Mcdonald" matches stored "MCDONALD"',
|
|
238
|
+
matchedId === stored.id,
|
|
239
|
+
`intake resolved to ${matchedId}, expected ${stored.id}`,
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
const afterIntake = await sdk.api.endusers.getOne(stored.id)
|
|
243
|
+
record(
|
|
244
|
+
'setting ON: the intake screen does not rewrite a matched contact\'s capitalization',
|
|
245
|
+
afterIntake.lname === 'MCDONALD',
|
|
246
|
+
`stored lname is now ${JSON.stringify(afterIntake.lname)}, must still be "MCDONALD"`,
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
// the submission itself writes intake answers onto the matched contact — that write must not
|
|
250
|
+
// rewrite the stored capitalization either
|
|
251
|
+
const submittedId = await intakeAndSubmit(form, fields, { fname: 'Jane', lname: 'Mcdonald', dateOfBirth: DOB })
|
|
252
|
+
const afterSubmit = await sdk.api.endusers.getOne(stored.id)
|
|
253
|
+
record(
|
|
254
|
+
'setting ON: SUBMITTING the form does not rewrite a matched contact\'s capitalization',
|
|
255
|
+
submittedId === stored.id && afterSubmit.lname === 'MCDONALD',
|
|
256
|
+
`submission resolved to ${submittedId} (expected ${stored.id}); stored lname is now ${JSON.stringify(afterSubmit.lname)}, must still be "MCDONALD"`,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
// QA step 9: the submitted response must land on the matched contact's record, not just
|
|
260
|
+
// resolve to its id
|
|
261
|
+
const storedResponses = await sdk.api.form_responses.getSome({ filter: { enduserId: stored.id } })
|
|
262
|
+
record(
|
|
263
|
+
'setting ON: the submitted response is attached to the matched contact',
|
|
264
|
+
storedResponses.some(r => r.formId === form.id && !!r.submittedAt),
|
|
265
|
+
`form_responses on ${stored.id}: ${JSON.stringify(storedResponses.map(r => ({ formId: r.formId, submitted: !!r.submittedAt })))}`,
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
// QA step 19 / PHI: email and phone are authentication channels (password reset, OTP
|
|
269
|
+
// delivery). The auth-field lock already blocks intake answers from repointing them on a
|
|
270
|
+
// matched contact, but the case-insensitive setting creates a NEW way to reach a pre-existing
|
|
271
|
+
// patient, so the lock has to be re-proven in that state — the existing
|
|
272
|
+
// public_endpoint_auth_field_lock suite only exercises it with the setting off.
|
|
273
|
+
const LOCK_DOB = '1991-02-04'
|
|
274
|
+
const LOCK_EMAIL = `dontsend-lock-${RAND()}@tellescope.com`
|
|
275
|
+
const lockContact = await sdk.api.endusers.createOne({
|
|
276
|
+
fname: 'Lock', lname: 'MCDONALD', dateOfBirth: LOCK_DOB, email: LOCK_EMAIL, phone: '+15555550123',
|
|
277
|
+
})
|
|
278
|
+
const lockSession = await intakeSession(form, { fname: 'Lock', lname: 'Mcdonald', dateOfBirth: LOCK_DOB })
|
|
279
|
+
const lockField = (intakeField: string) => fields.find(f => f.intakeField === intakeField)!
|
|
280
|
+
await lockSession.authedSDK.api.form_responses.submit_form_response({
|
|
281
|
+
accessCode: lockSession.accessCode,
|
|
282
|
+
responses: [
|
|
283
|
+
{ fieldId: lockField('fname').id, fieldTitle: 'First Name', answer: { type: 'string', value: 'Lock' } },
|
|
284
|
+
{ fieldId: lockField('lname').id, fieldTitle: 'Last Name', answer: { type: 'string', value: 'Mcdonald' } },
|
|
285
|
+
{ fieldId: lockField('email').id, fieldTitle: 'Email', answer: { type: 'email', value: `attacker-${RAND()}@example.com` } },
|
|
286
|
+
{ fieldId: lockField('phone').id, fieldTitle: 'Phone', answer: { type: 'phone', value: '+15555559999' } },
|
|
287
|
+
],
|
|
288
|
+
})
|
|
289
|
+
const lockAfter = await sdk.api.endusers.getOne(lockContact.id)
|
|
290
|
+
record(
|
|
291
|
+
'setting ON: a case-insensitively matched contact keeps its email and phone (auth-field lock holds)',
|
|
292
|
+
lockSession.enduserId === lockContact.id
|
|
293
|
+
&& lockAfter.email === LOCK_EMAIL
|
|
294
|
+
&& lockAfter.phone === '+15555550123',
|
|
295
|
+
`intake resolved to ${lockSession.enduserId} (expected ${lockContact.id});`
|
|
296
|
+
+ ` email=${JSON.stringify(lockAfter.email)} (expected ${JSON.stringify(LOCK_EMAIL)}),`
|
|
297
|
+
+ ` phone=${JSON.stringify(lockAfter.phone)} (expected "+15555550123")`,
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
// Counterweight: the guard must suppress ONLY a capitalization-only difference, never a real
|
|
301
|
+
// name correction. Matched here by EMAIL (so the submitted last name is free to differ), then
|
|
302
|
+
// submitted with a genuinely different spelling, which must still be written through.
|
|
303
|
+
const RENAME_EMAIL = `dontsend-rename-${RAND()}@tellescope.com`
|
|
304
|
+
const renameTarget = await sdk.api.endusers.createOne({ fname: 'Rename', lname: 'Smith', email: RENAME_EMAIL })
|
|
305
|
+
const renameSession = await intakeSession(form, { email: RENAME_EMAIL })
|
|
306
|
+
const byIntake = (intakeField: string) => fields.find(f => f.intakeField === intakeField)!
|
|
307
|
+
await renameSession.authedSDK.api.form_responses.submit_form_response({
|
|
308
|
+
accessCode: renameSession.accessCode,
|
|
309
|
+
responses: [
|
|
310
|
+
{ fieldId: byIntake('fname').id, fieldTitle: 'First Name', answer: { type: 'string', value: 'Rename' } },
|
|
311
|
+
{ fieldId: byIntake('lname').id, fieldTitle: 'Last Name', answer: { type: 'string', value: 'Smyth' } },
|
|
312
|
+
],
|
|
313
|
+
})
|
|
314
|
+
const renamed = await sdk.api.endusers.getOne(renameTarget.id)
|
|
315
|
+
record(
|
|
316
|
+
'setting ON: a GENUINE name change from intake is still written through (control)',
|
|
317
|
+
renameSession.enduserId === renameTarget.id && renamed.lname === 'Smyth',
|
|
318
|
+
`intake resolved to ${renameSession.enduserId} (expected ${renameTarget.id}); stored lname is ${JSON.stringify(renamed.lname)}, expected "Smyth"`,
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
// the email clause of the same $or must keep working untouched
|
|
322
|
+
const EMAIL = `dontsend-ci-${RAND()}@tellescope.com`
|
|
323
|
+
const byEmail = await sdk.api.endusers.createOne({ fname: 'Email', lname: 'Only', email: EMAIL })
|
|
324
|
+
const emailMatchedId = await intake(form, { email: EMAIL })
|
|
325
|
+
record(
|
|
326
|
+
'setting ON: matching by email alone is unchanged',
|
|
327
|
+
emailMatchedId === byEmail.id,
|
|
328
|
+
`intake resolved to ${emailMatchedId}, expected ${byEmail.id}`,
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
// a blank last name must stay unmatchable rather than matching every nameless contact
|
|
332
|
+
const nameless = await sdk.api.endusers.createOne({ dateOfBirth: '1960-06-06' })
|
|
333
|
+
const namelessMatchId = await intake(form, { fname: 'Nobody', dateOfBirth: '1960-06-06' })
|
|
334
|
+
record(
|
|
335
|
+
'setting ON: a blank name does not match a nameless contact (sentinel survives)',
|
|
336
|
+
namelessMatchId !== nameless.id,
|
|
337
|
+
`intake resolved to ${namelessMatchId}, nameless contact is ${nameless.id}`,
|
|
338
|
+
)
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* ============ 3. several case variants: the OLDEST match wins, every time ============ */
|
|
342
|
+
{
|
|
343
|
+
await setCaseInsensitive(true)
|
|
344
|
+
const { form } = await createPublicForm(sdk)
|
|
345
|
+
const DOB = '1992-03-04'
|
|
346
|
+
|
|
347
|
+
// Two case variants of the same name with the same DOB. "Oldest" is `_id` order, which is
|
|
348
|
+
// creation order only to one-second granularity: ObjectIds are minted in the API process and
|
|
349
|
+
// the API runs one process per CPU, so two back-to-back creates handled by different cluster
|
|
350
|
+
// workers inside the same second can sort either way. The assertion is therefore on the LOWER
|
|
351
|
+
// _id rather than on which call was issued first — that is exactly what sort: 'oldFirst'
|
|
352
|
+
// promises, and it makes the check deterministic.
|
|
353
|
+
const a = await sdk.api.endusers.createOne({ fname: 'Olive', lname: 'Mcdonald', dateOfBirth: DOB })
|
|
354
|
+
const b = await sdk.api.endusers.createOne({ fname: 'Olive', lname: 'MCDONALD', dateOfBirth: DOB })
|
|
355
|
+
const [lowest, highest] = a.id < b.id ? [a, b] : [b, a]
|
|
356
|
+
|
|
357
|
+
const resolved: string[] = []
|
|
358
|
+
for (let i = 0; i < 3; i++) {
|
|
359
|
+
resolved.push(await intake(form, { fname: 'Olive', lname: 'McDonald', dateOfBirth: DOB }))
|
|
360
|
+
}
|
|
361
|
+
record(
|
|
362
|
+
'setting ON: with two case variants, the lowest-_id (oldest) contact wins on every submission',
|
|
363
|
+
resolved.every(id => id === lowest.id),
|
|
364
|
+
`resolved ${JSON.stringify(resolved)}, lowest _id=${lowest.id}, other=${highest.id}`,
|
|
365
|
+
)
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* ============ 4. regex metacharacters are escaped, not treated as wildcards ============ */
|
|
369
|
+
{
|
|
370
|
+
await setCaseInsensitive(true)
|
|
371
|
+
const { form } = await createPublicForm(sdk)
|
|
372
|
+
const DOB = '1993-04-05'
|
|
373
|
+
|
|
374
|
+
// Two INDEPENDENT checks rather than one contact plus a decoy sharing a DOB. With both under
|
|
375
|
+
// one DOB, an unescaped '.' would match them both and the oldest-wins rule could still return
|
|
376
|
+
// the intended contact, so the check would pass vacuously whenever _id order happened to
|
|
377
|
+
// favour it. Separating them removes any dependence on creation order.
|
|
378
|
+
|
|
379
|
+
// 4a. positive: the literal period matches itself, case-insensitively
|
|
380
|
+
const target = await sdk.api.endusers.createOne({ fname: 'Mary', lname: 'O.Brien', dateOfBirth: DOB })
|
|
381
|
+
const matchedId = await intake(form, { fname: 'Mary', lname: 'o.BRIEN', dateOfBirth: DOB })
|
|
382
|
+
record(
|
|
383
|
+
'setting ON: "." in a name is matched literally (matches the contact that has it)',
|
|
384
|
+
matchedId === target.id,
|
|
385
|
+
`intake resolved to ${matchedId}, expected O.Brien ${target.id}`,
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
// 4b. negative: the ONLY contact on this DOB has a different character where the '.' is, so an
|
|
389
|
+
// unescaped '.' (a wildcard) would match it and this check would fail. Nothing else can match.
|
|
390
|
+
const WILDCARD_DOB = '1993-04-06'
|
|
391
|
+
const decoy = await sdk.api.endusers.createOne({ fname: 'Mary', lname: 'OXBrien', dateOfBirth: WILDCARD_DOB })
|
|
392
|
+
const decoyProbeId = await intake(form, { fname: 'Mary', lname: 'O.Brien', dateOfBirth: WILDCARD_DOB })
|
|
393
|
+
record(
|
|
394
|
+
'setting ON: "." is NOT a wildcard (does not match a contact with another character there)',
|
|
395
|
+
decoyProbeId !== decoy.id,
|
|
396
|
+
`intake resolved to ${decoyProbeId}, must NOT be the OXBrien contact ${decoy.id}`,
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
// a hyphen is not a metacharacter but is the other punctuation real names carry
|
|
400
|
+
const HYPHEN_DOB = '1994-05-06'
|
|
401
|
+
const hyphenated = await sdk.api.endusers.createOne({ fname: 'Ann', lname: 'Smith-Jones', dateOfBirth: HYPHEN_DOB })
|
|
402
|
+
const hyphenMatchedId = await intake(form, { fname: 'Ann', lname: 'SMITH-JONES', dateOfBirth: HYPHEN_DOB })
|
|
403
|
+
record(
|
|
404
|
+
'setting ON: a hyphenated name matches case-insensitively',
|
|
405
|
+
hyphenMatchedId === hyphenated.id,
|
|
406
|
+
`intake resolved to ${hyphenMatchedId}, expected ${hyphenated.id}`,
|
|
407
|
+
)
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* ============ 5. auto-merge: gated by the setting, and still bails on ambiguity ============ */
|
|
411
|
+
{
|
|
412
|
+
const DOB = '1995-06-07'
|
|
413
|
+
|
|
414
|
+
// 5a. setting OFF: a capitalization variant is not a merge candidate
|
|
415
|
+
await setCaseInsensitive(false)
|
|
416
|
+
const offForm = await createPublicForm(sdk, { autoMergeOnSubmission: true })
|
|
417
|
+
const offDestination = await sdk.api.endusers.createOne({ fname: 'Merge', lname: 'MCDONALD', dateOfBirth: DOB })
|
|
418
|
+
const offSourceId = await submitWithSkipMatch(offForm.form, offForm.fields, {
|
|
419
|
+
fname: 'Merge', lname: 'Mcdonald', dateOfBirth: DOB,
|
|
420
|
+
})
|
|
421
|
+
record(
|
|
422
|
+
'auto-merge, setting OFF: a capitalization variant does NOT merge (unchanged behavior)',
|
|
423
|
+
await enduserExists(sdk, offSourceId),
|
|
424
|
+
`source ${offSourceId} should still exist alongside destination ${offDestination.id}`,
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
// 5b. setting ON: the same submission merges
|
|
428
|
+
await setCaseInsensitive(true)
|
|
429
|
+
const onForm = await createPublicForm(sdk, { autoMergeOnSubmission: true })
|
|
430
|
+
const ON_DOB = '1996-07-08'
|
|
431
|
+
const onDestination = await sdk.api.endusers.createOne({ fname: 'Merge', lname: 'MCDONNELL', dateOfBirth: ON_DOB })
|
|
432
|
+
const onSourceId = await submitWithSkipMatch(onForm.form, onForm.fields, {
|
|
433
|
+
fname: 'Merge', lname: 'Mcdonnell', dateOfBirth: ON_DOB,
|
|
434
|
+
})
|
|
435
|
+
const onSourceGone = !(await enduserExists(sdk, onSourceId))
|
|
436
|
+
const mergedDestination = await sdk.api.endusers.getOne(onDestination.id)
|
|
437
|
+
record(
|
|
438
|
+
'auto-merge, setting ON: a capitalization variant merges into the existing contact',
|
|
439
|
+
onSourceGone && !!mergedDestination.mergedIds?.includes(onSourceId),
|
|
440
|
+
`source deleted=${onSourceGone}, destination mergedIds=${JSON.stringify(mergedDestination.mergedIds)}`,
|
|
441
|
+
)
|
|
442
|
+
record(
|
|
443
|
+
'auto-merge, setting ON: the merged-into contact keeps its stored capitalization',
|
|
444
|
+
mergedDestination.lname === 'MCDONNELL',
|
|
445
|
+
`destination lname is ${JSON.stringify(mergedDestination.lname)}, must still be "MCDONNELL"`,
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
// 5c. setting ON: two case variants are ambiguous, so nothing may be merged
|
|
449
|
+
const AMBIGUOUS_DOB = '1997-08-09'
|
|
450
|
+
const ambiguousForm = await createPublicForm(sdk, { autoMergeOnSubmission: true })
|
|
451
|
+
const candidateA = await sdk.api.endusers.createOne({ fname: 'Ambi', lname: 'Mcguire', dateOfBirth: AMBIGUOUS_DOB })
|
|
452
|
+
const candidateB = await sdk.api.endusers.createOne({ fname: 'Ambi', lname: 'MCGUIRE', dateOfBirth: AMBIGUOUS_DOB })
|
|
453
|
+
const ambiguousSourceId = await submitWithSkipMatch(ambiguousForm.form, ambiguousForm.fields, {
|
|
454
|
+
fname: 'Ambi', lname: 'McGuire', dateOfBirth: AMBIGUOUS_DOB,
|
|
455
|
+
})
|
|
456
|
+
const [a, b] = await Promise.all([
|
|
457
|
+
sdk.api.endusers.getOne(candidateA.id),
|
|
458
|
+
sdk.api.endusers.getOne(candidateB.id),
|
|
459
|
+
])
|
|
460
|
+
record(
|
|
461
|
+
'auto-merge, setting ON: two case variants are ambiguous, so NOTHING is merged',
|
|
462
|
+
await enduserExists(sdk, ambiguousSourceId)
|
|
463
|
+
&& !a.mergedIds?.includes(ambiguousSourceId)
|
|
464
|
+
&& !b.mergedIds?.includes(ambiguousSourceId),
|
|
465
|
+
`source ${ambiguousSourceId} exists=${await enduserExists(sdk, ambiguousSourceId)},`
|
|
466
|
+
+ ` A.mergedIds=${JSON.stringify(a.mergedIds)}, B.mergedIds=${JSON.stringify(b.mergedIds)}`,
|
|
467
|
+
)
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/* ====== 5b. a public form GROUP: form 2 must not rewrite the capitalization either ====== */
|
|
471
|
+
{
|
|
472
|
+
await setCaseInsensitive(true)
|
|
473
|
+
const DOB = '1986-06-16'
|
|
474
|
+
const stored = await sdk.api.endusers.createOne({ fname: 'Group', lname: 'MCDONALD', dateOfBirth: DOB })
|
|
475
|
+
|
|
476
|
+
// Form 1 carries the intake screen that does the matching; form 2 ALSO carries name intake
|
|
477
|
+
// questions, which is the case that escapes a publicSubmit-only guard — the follow-on group
|
|
478
|
+
// responses are inserted by session_for_public_form without publicSubmit.
|
|
479
|
+
const first = await createPublicForm(sdk)
|
|
480
|
+
const second = await createPublicForm(sdk)
|
|
481
|
+
const group = await sdk.api.form_groups.createOne({
|
|
482
|
+
title: `Case Insensitive Group ${RAND()}`,
|
|
483
|
+
formIds: [first.form.id, second.form.id],
|
|
484
|
+
})
|
|
485
|
+
|
|
486
|
+
const enduserSDK = new EnduserSession({ host, businessId })
|
|
487
|
+
const { authToken, enduserId } = await enduserSDK.api.form_responses.session_for_public_form({
|
|
488
|
+
formId: first.form.id,
|
|
489
|
+
businessId,
|
|
490
|
+
groupId: group.id,
|
|
491
|
+
fname: 'Group',
|
|
492
|
+
lname: 'Mcdonald',
|
|
493
|
+
dateOfBirth: DOB,
|
|
494
|
+
})
|
|
495
|
+
const authedSDK = new EnduserSession({ host, businessId, authToken })
|
|
496
|
+
|
|
497
|
+
// Find the group's response for form 2. session_for_public_form inserts the follow-on group
|
|
498
|
+
// responses in a fire-and-forget insertMany issued AFTER res.json, so it is not ordered
|
|
499
|
+
// against this request — poll rather than reading once, or a loaded parallel run can lose the
|
|
500
|
+
// race. A timeout here fails the check loudly (submitted stays false); it never passes by
|
|
501
|
+
// default.
|
|
502
|
+
let secondResponse: { accessCode?: string } | undefined
|
|
503
|
+
for (let attempt = 0; attempt < 20 && !secondResponse; attempt++) {
|
|
504
|
+
const responses = await sdk.api.form_responses.getSome({ filter: { enduserId: stored.id } })
|
|
505
|
+
secondResponse = responses.find(r => r.formId === second.form.id)
|
|
506
|
+
if (!secondResponse) await new Promise(res => setTimeout(res, 100))
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
let submitted = false
|
|
510
|
+
if (secondResponse?.accessCode) {
|
|
511
|
+
const f = (intakeField: string) => second.fields.find(x => x.intakeField === intakeField)!
|
|
512
|
+
await authedSDK.api.form_responses.submit_form_response({
|
|
513
|
+
accessCode: secondResponse.accessCode,
|
|
514
|
+
responses: [
|
|
515
|
+
{ fieldId: f('fname').id, fieldTitle: 'First Name', answer: { type: 'string', value: 'Group' } },
|
|
516
|
+
{ fieldId: f('lname').id, fieldTitle: 'Last Name', answer: { type: 'string', value: 'Mcdonald' } },
|
|
517
|
+
],
|
|
518
|
+
})
|
|
519
|
+
submitted = true
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const after = await sdk.api.endusers.getOne(stored.id)
|
|
523
|
+
record(
|
|
524
|
+
'setting ON: form 2 of a public GROUP does not rewrite the matched contact\'s capitalization',
|
|
525
|
+
enduserId === stored.id && submitted && after.lname === 'MCDONALD',
|
|
526
|
+
`intake resolved to ${enduserId} (expected ${stored.id}); submitted form 2 = ${submitted}`
|
|
527
|
+
+ ` (accessCode present = ${!!secondResponse?.accessCode}); stored lname is ${JSON.stringify(after.lname)}, must still be "MCDONALD"`,
|
|
528
|
+
)
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/* ====== 6. the email+fname+lname clause (matchEmailAndNames) is gated too, and the ======
|
|
532
|
+
====== identifiers stay exact equality ====== */
|
|
533
|
+
{
|
|
534
|
+
await setCaseInsensitive(true)
|
|
535
|
+
const { form } = await createPublicForm(sdk)
|
|
536
|
+
|
|
537
|
+
// dateOfBirth is an identifier and stays an exact match: the same name with a different DOB
|
|
538
|
+
// must not match, with the setting on
|
|
539
|
+
const DOB = '1999-10-11'
|
|
540
|
+
const dobContact = await sdk.api.endusers.createOne({ fname: 'Dob', lname: 'MCDONALD', dateOfBirth: DOB })
|
|
541
|
+
const wrongDobId = await intake(form, { fname: 'Dob', lname: 'Mcdonald', dateOfBirth: '1999-10-12' })
|
|
542
|
+
record(
|
|
543
|
+
'setting ON: dateOfBirth is still an exact match (a different DOB does not match)',
|
|
544
|
+
wrongDobId !== dobContact.id,
|
|
545
|
+
`intake resolved to ${wrongDobId}, contact with DOB ${DOB} is ${dobContact.id}`,
|
|
546
|
+
)
|
|
547
|
+
|
|
548
|
+
// with matchEmailAndNames on, the email branch of the $or additionally requires fname + lname;
|
|
549
|
+
// those two must be case-insensitive as well, or the opt-in silently excludes email matching
|
|
550
|
+
await sdk.api.organizations.updateOne(businessId, {
|
|
551
|
+
settings: { endusers: { matchEmailAndNames: true } },
|
|
552
|
+
})
|
|
553
|
+
try {
|
|
554
|
+
const EMAIL = `dontsend-mean-${RAND()}@tellescope.com`
|
|
555
|
+
const emailContact = await sdk.api.endusers.createOne({ fname: 'Mean', lname: 'MCDONALD', email: EMAIL })
|
|
556
|
+
const matchedId = await intake(form, { email: EMAIL, fname: 'Mean', lname: 'Mcdonald' })
|
|
557
|
+
record(
|
|
558
|
+
'setting ON + matchEmailAndNames: the email+fname+lname clause is case-insensitive too',
|
|
559
|
+
matchedId === emailContact.id,
|
|
560
|
+
`intake resolved to ${matchedId}, expected ${emailContact.id}`,
|
|
561
|
+
)
|
|
562
|
+
} finally {
|
|
563
|
+
await sdk.api.organizations.updateOne(businessId, {
|
|
564
|
+
settings: { endusers: { matchEmailAndNames: false } },
|
|
565
|
+
})
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/* ============ 7. appointment booking is deliberately NOT gated by the setting ============ */
|
|
570
|
+
{
|
|
571
|
+
await setCaseInsensitive(true)
|
|
572
|
+
const DOB = '1998-09-10'
|
|
573
|
+
const stored = await sdk.api.endusers.createOne({ fname: 'Booking', lname: 'MCDONALD', dateOfBirth: DOB })
|
|
574
|
+
|
|
575
|
+
const template = await sdk.api.calendar_event_templates.createOne({
|
|
576
|
+
title: `Case Insensitive Booking ${RAND()}`,
|
|
577
|
+
durationInMinutes: 30,
|
|
578
|
+
})
|
|
579
|
+
const bookingSDK = new EnduserSession({ host, businessId })
|
|
580
|
+
let bookingMatched: boolean | undefined
|
|
581
|
+
try {
|
|
582
|
+
await bookingSDK.api.calendar_events.session_for_public_appointment_booking({
|
|
583
|
+
calendarEventTemplateId: template.id,
|
|
584
|
+
businessId,
|
|
585
|
+
fname: 'Booking',
|
|
586
|
+
lname: 'Mcdonald',
|
|
587
|
+
dateOfBirth: DOB,
|
|
588
|
+
})
|
|
589
|
+
// the booking endpoint returns only an authToken, so "did it match?" is read off the contact
|
|
590
|
+
// list: a non-match inserts a SECOND contact with the submitted capitalization
|
|
591
|
+
const sameName = await sdk.api.endusers.getSome({ filter: { dateOfBirth: DOB } })
|
|
592
|
+
bookingMatched = sameName.length === 1
|
|
593
|
+
} catch (err: any) {
|
|
594
|
+
bookingMatched = undefined
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
record(
|
|
598
|
+
'appointment booking stays byte-exact even with the setting ON (deliberately out of scope)',
|
|
599
|
+
bookingMatched === false,
|
|
600
|
+
bookingMatched === undefined
|
|
601
|
+
? 'the booking endpoint errored, so this check could not be evaluated'
|
|
602
|
+
: `contacts with dateOfBirth ${DOB}: ${bookingMatched ? 1 : 2}; expected 2 (a separate contact), stored=${stored.id}`,
|
|
603
|
+
)
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
return checks
|
|
607
|
+
} finally {
|
|
608
|
+
await tenant?.teardown()
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/** Asserting wrapper, for standalone runs. */
|
|
613
|
+
export const public_form_case_insensitive_match_tests = async () => {
|
|
614
|
+
assert_checks('Public form case-insensitive matching', await public_form_case_insensitive_match_checks())
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/** Enrolls this suite in the auto-discovered parallel pool — see run_discovered_isolated_suites. */
|
|
618
|
+
export const ISOLATED_SUITE: IsolatedSuite = { name: 'Public form case-insensitive matching', run: public_form_case_insensitive_match_checks }
|
|
619
|
+
|
|
620
|
+
// Allow running this test file independently
|
|
621
|
+
if (require.main === module) {
|
|
622
|
+
console.log(`Using API URL: ${host}`)
|
|
623
|
+
public_form_case_insensitive_match_tests()
|
|
624
|
+
.then(() => {
|
|
625
|
+
console.log("Public form case-insensitive match test suite completed successfully")
|
|
626
|
+
process.exit(0)
|
|
627
|
+
})
|
|
628
|
+
.catch((error) => {
|
|
629
|
+
console.error("Public form case-insensitive match test suite failed:", error)
|
|
630
|
+
process.exit(1)
|
|
631
|
+
})
|
|
632
|
+
}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
assert_checks,
|
|
5
5
|
Check,
|
|
6
6
|
setup_isolated_tenant,
|
|
7
|
+
IsolatedSuite,
|
|
7
8
|
} from "../../setup_isolated"
|
|
8
9
|
import { poll_for_results } from "@tellescope/testing"
|
|
9
10
|
|
|
@@ -199,6 +200,9 @@ export const add_to_journey_foreign_enduserid_tests = async () => {
|
|
|
199
200
|
assert_checks('add_to_journey foreign enduserId', await add_to_journey_foreign_enduserid_checks())
|
|
200
201
|
}
|
|
201
202
|
|
|
203
|
+
/** Enrolls this suite in the auto-discovered parallel pool — see run_discovered_isolated_suites. */
|
|
204
|
+
export const ISOLATED_SUITE: IsolatedSuite = { name: 'add_to_journey foreign enduserId', run: add_to_journey_foreign_enduserid_checks }
|
|
205
|
+
|
|
202
206
|
// Allow running this test file independently
|
|
203
207
|
if (require.main === module) {
|
|
204
208
|
console.log(`🌐 Using API URL: ${host}`)
|