@tellescope/sdk 2.0.0-beta.2 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/sdk.d.ts +6 -5
- package/lib/cjs/sdk.d.ts.map +1 -1
- package/lib/cjs/sdk.js +5 -0
- package/lib/cjs/sdk.js.map +1 -1
- package/lib/cjs/tests/api_tests/ai_conversations.test.d.ts +14 -5
- package/lib/cjs/tests/api_tests/ai_conversations.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/ai_conversations.test.js +163 -149
- package/lib/cjs/tests/api_tests/ai_conversations.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.d.ts +22 -0
- package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.js +518 -0
- package/lib/cjs/tests/api_tests/ai_conversations_agent_message.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/appointment_link_expiration.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/appointment_link_expiration.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/appointment_link_expiration.test.js +135 -73
- package/lib/cjs/tests/api_tests/appointment_link_expiration.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.js +240 -174
- package/lib/cjs/tests/api_tests/appointment_no_showed_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/availability_block_buffer.test.d.ts +22 -0
- package/lib/cjs/tests/api_tests/availability_block_buffer.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/availability_block_buffer.test.js +311 -0
- package/lib/cjs/tests/api_tests/availability_block_buffer.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.js +235 -192
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.js +351 -264
- package/lib/cjs/tests/api_tests/beluga_trigger_refill.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/bulk_assignment.test.d.ts +16 -5
- package/lib/cjs/tests/api_tests/bulk_assignment.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/bulk_assignment.test.js +336 -243
- package/lib/cjs/tests/api_tests/bulk_assignment.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/calendar_event_references_update.test.d.ts +13 -5
- package/lib/cjs/tests/api_tests/calendar_event_references_update.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/calendar_event_references_update.test.js +131 -108
- package/lib/cjs/tests/api_tests/calendar_event_references_update.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.js +240 -252
- package/lib/cjs/tests/api_tests/calendar_event_webhook_template.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/chats_analytics.test.d.ts +14 -5
- package/lib/cjs/tests/api_tests/chats_analytics.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/chats_analytics.test.js +190 -189
- package/lib/cjs/tests/api_tests/chats_analytics.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/concurrent_build_threads.test.d.ts +23 -5
- package/lib/cjs/tests/api_tests/concurrent_build_threads.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/concurrent_build_threads.test.js +121 -118
- package/lib/cjs/tests/api_tests/concurrent_build_threads.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/configurations_public_read.test.d.ts +21 -5
- package/lib/cjs/tests/api_tests/configurations_public_read.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/configurations_public_read.test.js +235 -119
- package/lib/cjs/tests/api_tests/configurations_public_read.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.js +356 -0
- package/lib/cjs/tests/api_tests/copied_form_response_no_enduser_sync.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/create_note_action.test.d.ts +18 -5
- package/lib/cjs/tests/api_tests/create_note_action.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/create_note_action.test.js +218 -173
- package/lib/cjs/tests/api_tests/create_note_action.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.d.ts +17 -4
- package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.js +144 -205
- package/lib/cjs/tests/api_tests/create_user_notifications_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/custom_aggregation.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/custom_aggregation.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/custom_aggregation.test.js +284 -223
- package/lib/cjs/tests/api_tests/custom_aggregation.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/database_cascade_delete.test.d.ts +13 -5
- package/lib/cjs/tests/api_tests/database_cascade_delete.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/database_cascade_delete.test.js +218 -242
- package/lib/cjs/tests/api_tests/database_cascade_delete.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts +21 -5
- package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.js +168 -112
- package/lib/cjs/tests/api_tests/dont_sync_to_elation_form_submission.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/elation_user_id.test.d.ts +17 -5
- package/lib/cjs/tests/api_tests/elation_user_id.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/elation_user_id.test.js +121 -54
- package/lib/cjs/tests/api_tests/elation_user_id.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/file_download_unicode_names.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/file_download_unicode_names.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/file_download_unicode_names.test.js +193 -143
- package/lib/cjs/tests/api_tests/file_download_unicode_names.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.js +532 -0
- package/lib/cjs/tests/api_tests/form_intake_email_normalization.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/form_submitted_trigger.test.d.ts +25 -5
- package/lib/cjs/tests/api_tests/form_submitted_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/form_submitted_trigger.test.js +395 -366
- package/lib/cjs/tests/api_tests/form_submitted_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/form_translations.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/form_translations.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/form_translations.test.js +269 -189
- package/lib/cjs/tests/api_tests/form_translations.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/formsort_header_auth.test.d.ts +29 -5
- package/lib/cjs/tests/api_tests/formsort_header_auth.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/formsort_header_auth.test.js +179 -162
- package/lib/cjs/tests/api_tests/formsort_header_auth.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.d.ts +12 -6
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.js +98 -84
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/get_some_projection.test.d.ts +20 -5
- package/lib/cjs/tests/api_tests/get_some_projection.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/get_some_projection.test.js +342 -298
- package/lib/cjs/tests/api_tests/get_some_projection.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.js +294 -223
- package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/integrations_redacted.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/integrations_redacted.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/integrations_redacted.test.js +307 -213
- package/lib/cjs/tests/api_tests/integrations_redacted.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.js +179 -178
- package/lib/cjs/tests/api_tests/journey_delete_cancels_actions.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/load_team_chat.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/load_team_chat.test.js +181 -124
- package/lib/cjs/tests/api_tests/load_team_chat.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/load_threads_autobuild.test.d.ts +24 -5
- package/lib/cjs/tests/api_tests/load_threads_autobuild.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/load_threads_autobuild.test.js +261 -227
- package/lib/cjs/tests/api_tests/load_threads_autobuild.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/load_threads_care_team.test.d.ts +6 -0
- package/lib/cjs/tests/api_tests/load_threads_care_team.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/load_threads_care_team.test.js +115 -31
- package/lib/cjs/tests/api_tests/load_threads_care_team.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/managed_content_file_access.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/managed_content_file_access.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/managed_content_file_access.test.js +285 -311
- package/lib/cjs/tests/api_tests/managed_content_file_access.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/mdb_sort.test.d.ts +20 -5
- package/lib/cjs/tests/api_tests/mdb_sort.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/mdb_sort.test.js +361 -305
- package/lib/cjs/tests/api_tests/mdb_sort.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/mdi_manual_sync.test.d.ts +27 -0
- package/lib/cjs/tests/api_tests/mdi_manual_sync.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/mdi_manual_sync.test.js +395 -0
- package/lib/cjs/tests/api_tests/mdi_manual_sync.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.js +259 -209
- package/lib/cjs/tests/api_tests/mdi_trigger_refill.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/mdi_webhooks.test.d.ts +12 -5
- package/lib/cjs/tests/api_tests/mdi_webhooks.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/mdi_webhooks.test.js +67 -61
- package/lib/cjs/tests/api_tests/mdi_webhooks.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/message_assignment_trigger.test.d.ts +23 -14
- package/lib/cjs/tests/api_tests/message_assignment_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/message_assignment_trigger.test.js +258 -306
- package/lib/cjs/tests/api_tests/message_assignment_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/metriport_push_form_response.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/metriport_push_form_response.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/metriport_push_form_response.test.js +301 -238
- package/lib/cjs/tests/api_tests/metriport_push_form_response.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/organization_api_keys.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/organization_api_keys.test.js +226 -59
- package/lib/cjs/tests/api_tests/organization_api_keys.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.d.ts +19 -5
- package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.js +335 -222
- package/lib/cjs/tests/api_tests/organization_settings_duplicates.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/organization_signup.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/organization_signup.test.js +218 -51
- package/lib/cjs/tests/api_tests/organization_signup.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.js +109 -1
- package/lib/cjs/tests/api_tests/out_of_office_endpoint.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.d.ts +6 -6
- package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.js +309 -361
- package/lib/cjs/tests/api_tests/outbound_chat_sent_trigger.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.js +246 -165
- package/lib/cjs/tests/api_tests/phone_calls_cold_transfer.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.js +130 -47
- package/lib/cjs/tests/api_tests/phone_calls_conference_hold.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.js +180 -132
- package/lib/cjs/tests/api_tests/phone_tree_enduser_condition.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/programs.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/programs.test.js +417 -50
- package/lib/cjs/tests/api_tests/programs.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts +10 -5
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js +401 -282
- package/lib/cjs/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts +9 -5
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js +228 -211
- package/lib/cjs/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +13 -8
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js +270 -254
- package/lib/cjs/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +16 -6
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +167 -142
- package/lib/cjs/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +10 -5
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js +296 -221
- package/lib/cjs/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +12 -5
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +221 -216
- package/lib/cjs/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js +300 -203
- package/lib/cjs/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js +415 -275
- package/lib/cjs/tests/api_tests/security/enduser-cross-create.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js +347 -228
- package/lib/cjs/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +18 -7
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js +164 -75
- package/lib/cjs/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +15 -9
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +99 -102
- package/lib/cjs/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js +132 -89
- package/lib/cjs/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +12 -5
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +190 -138
- package/lib/cjs/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.d.ts +18 -16
- package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.js +164 -124
- package/lib/cjs/tests/api_tests/security/register_business_id_injection.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +122 -2
- package/lib/cjs/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +11 -5
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js +288 -274
- package/lib/cjs/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts +17 -10
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js +173 -138
- package/lib/cjs/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +310 -265
- package/lib/cjs/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts +9 -5
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js +108 -83
- package/lib/cjs/tests/api_tests/security/webhook-timeout.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/stedi_approval.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/stedi_approval.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/stedi_approval.test.js +206 -137
- package/lib/cjs/tests/api_tests/stedi_approval.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/ticket_stage_archive.test.d.ts +7 -0
- package/lib/cjs/tests/api_tests/ticket_stage_archive.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/ticket_stage_archive.test.js +344 -0
- package/lib/cjs/tests/api_tests/ticket_stage_archive.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.js +165 -149
- package/lib/cjs/tests/api_tests/tickets_bulk_assign_care_team.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/translations.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/translations.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/translations.test.js +104 -75
- package/lib/cjs/tests/api_tests/translations.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.d.ts +21 -4
- package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.js +238 -370
- package/lib/cjs/tests/api_tests/trigger_set_fields_date_difference.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/user_preferences.test.d.ts +30 -0
- package/lib/cjs/tests/api_tests/user_preferences.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/user_preferences.test.js +279 -0
- package/lib/cjs/tests/api_tests/user_preferences.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.d.ts +17 -5
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.js +204 -195
- package/lib/cjs/tests/api_tests/webhook_error_handling.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.d.ts +15 -5
- package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.js +154 -179
- package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/welle_partner_token.test.d.ts +6 -5
- package/lib/cjs/tests/api_tests/welle_partner_token.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/welle_partner_token.test.js +393 -251
- package/lib/cjs/tests/api_tests/welle_partner_token.test.js.map +1 -1
- package/lib/cjs/tests/setup_isolated.d.ts +7 -0
- package/lib/cjs/tests/setup_isolated.d.ts.map +1 -1
- package/lib/cjs/tests/setup_isolated.js.map +1 -1
- package/lib/cjs/tests/tests.d.ts.map +1 -1
- package/lib/cjs/tests/tests.js +229 -461
- package/lib/cjs/tests/tests.js.map +1 -1
- package/lib/cjs/tests/unit_tests/date_string_validation.test.d.ts +2 -0
- package/lib/cjs/tests/unit_tests/date_string_validation.test.d.ts.map +1 -0
- package/lib/cjs/tests/unit_tests/date_string_validation.test.js +112 -0
- package/lib/cjs/tests/unit_tests/date_string_validation.test.js.map +1 -0
- package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/esm/sdk.d.ts +6 -5
- package/lib/esm/sdk.d.ts.map +1 -1
- package/lib/esm/sdk.js +5 -0
- package/lib/esm/sdk.js.map +1 -1
- package/lib/esm/tests/api_tests/ai_conversations.test.d.ts +14 -5
- package/lib/esm/tests/api_tests/ai_conversations.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/ai_conversations.test.js +161 -148
- package/lib/esm/tests/api_tests/ai_conversations.test.js.map +1 -1
- package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.d.ts +22 -0
- package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.js +510 -0
- package/lib/esm/tests/api_tests/ai_conversations_agent_message.test.js.map +1 -0
- package/lib/esm/tests/api_tests/appointment_link_expiration.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/appointment_link_expiration.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/appointment_link_expiration.test.js +132 -71
- package/lib/esm/tests/api_tests/appointment_link_expiration.test.js.map +1 -1
- package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.js +238 -173
- package/lib/esm/tests/api_tests/appointment_no_showed_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/availability_block_buffer.test.d.ts +22 -0
- package/lib/esm/tests/api_tests/availability_block_buffer.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/availability_block_buffer.test.js +306 -0
- package/lib/esm/tests/api_tests/availability_block_buffer.test.js.map +1 -0
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.js +232 -190
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.js.map +1 -1
- package/lib/esm/tests/api_tests/beluga_trigger_refill.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/beluga_trigger_refill.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/beluga_trigger_refill.test.js +348 -262
- package/lib/esm/tests/api_tests/beluga_trigger_refill.test.js.map +1 -1
- package/lib/esm/tests/api_tests/bulk_assignment.test.d.ts +16 -5
- package/lib/esm/tests/api_tests/bulk_assignment.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/bulk_assignment.test.js +333 -241
- package/lib/esm/tests/api_tests/bulk_assignment.test.js.map +1 -1
- package/lib/esm/tests/api_tests/calendar_event_references_update.test.d.ts +13 -5
- package/lib/esm/tests/api_tests/calendar_event_references_update.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/calendar_event_references_update.test.js +129 -107
- package/lib/esm/tests/api_tests/calendar_event_references_update.test.js.map +1 -1
- package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.js +238 -251
- package/lib/esm/tests/api_tests/calendar_event_webhook_template.test.js.map +1 -1
- package/lib/esm/tests/api_tests/chats_analytics.test.d.ts +14 -5
- package/lib/esm/tests/api_tests/chats_analytics.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/chats_analytics.test.js +188 -188
- package/lib/esm/tests/api_tests/chats_analytics.test.js.map +1 -1
- package/lib/esm/tests/api_tests/concurrent_build_threads.test.d.ts +23 -5
- package/lib/esm/tests/api_tests/concurrent_build_threads.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/concurrent_build_threads.test.js +119 -117
- package/lib/esm/tests/api_tests/concurrent_build_threads.test.js.map +1 -1
- package/lib/esm/tests/api_tests/configurations_public_read.test.d.ts +21 -5
- package/lib/esm/tests/api_tests/configurations_public_read.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/configurations_public_read.test.js +233 -118
- package/lib/esm/tests/api_tests/configurations_public_read.test.js.map +1 -1
- package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.js +351 -0
- package/lib/esm/tests/api_tests/copied_form_response_no_enduser_sync.test.js.map +1 -0
- package/lib/esm/tests/api_tests/create_note_action.test.d.ts +18 -5
- package/lib/esm/tests/api_tests/create_note_action.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/create_note_action.test.js +216 -172
- package/lib/esm/tests/api_tests/create_note_action.test.js.map +1 -1
- package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.d.ts +17 -4
- package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.js +141 -203
- package/lib/esm/tests/api_tests/create_user_notifications_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/custom_aggregation.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/custom_aggregation.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/custom_aggregation.test.js +282 -222
- package/lib/esm/tests/api_tests/custom_aggregation.test.js.map +1 -1
- package/lib/esm/tests/api_tests/database_cascade_delete.test.d.ts +13 -5
- package/lib/esm/tests/api_tests/database_cascade_delete.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/database_cascade_delete.test.js +216 -241
- package/lib/esm/tests/api_tests/database_cascade_delete.test.js.map +1 -1
- package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts +21 -5
- package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.js +165 -110
- package/lib/esm/tests/api_tests/dont_sync_to_elation_form_submission.test.js.map +1 -1
- package/lib/esm/tests/api_tests/elation_user_id.test.d.ts +17 -5
- package/lib/esm/tests/api_tests/elation_user_id.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/elation_user_id.test.js +119 -53
- package/lib/esm/tests/api_tests/elation_user_id.test.js.map +1 -1
- package/lib/esm/tests/api_tests/file_download_unicode_names.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/file_download_unicode_names.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/file_download_unicode_names.test.js +190 -141
- package/lib/esm/tests/api_tests/file_download_unicode_names.test.js.map +1 -1
- package/lib/esm/tests/api_tests/form_intake_email_normalization.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/form_intake_email_normalization.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/form_intake_email_normalization.test.js +527 -0
- package/lib/esm/tests/api_tests/form_intake_email_normalization.test.js.map +1 -0
- package/lib/esm/tests/api_tests/form_submitted_trigger.test.d.ts +25 -5
- package/lib/esm/tests/api_tests/form_submitted_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/form_submitted_trigger.test.js +393 -365
- package/lib/esm/tests/api_tests/form_submitted_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/form_translations.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/form_translations.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/form_translations.test.js +268 -189
- package/lib/esm/tests/api_tests/form_translations.test.js.map +1 -1
- package/lib/esm/tests/api_tests/formsort_header_auth.test.d.ts +29 -5
- package/lib/esm/tests/api_tests/formsort_header_auth.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/formsort_header_auth.test.js +177 -161
- package/lib/esm/tests/api_tests/formsort_header_auth.test.js.map +1 -1
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.d.ts +12 -6
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.js +96 -83
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.js.map +1 -1
- package/lib/esm/tests/api_tests/get_some_projection.test.d.ts +20 -5
- package/lib/esm/tests/api_tests/get_some_projection.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/get_some_projection.test.js +339 -296
- package/lib/esm/tests/api_tests/get_some_projection.test.js.map +1 -1
- package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.js +292 -222
- package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.js.map +1 -1
- package/lib/esm/tests/api_tests/integrations_redacted.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/integrations_redacted.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/integrations_redacted.test.js +304 -211
- package/lib/esm/tests/api_tests/integrations_redacted.test.js.map +1 -1
- package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.js +177 -154
- package/lib/esm/tests/api_tests/journey_delete_cancels_actions.test.js.map +1 -1
- package/lib/esm/tests/api_tests/load_team_chat.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/load_team_chat.test.js +181 -124
- package/lib/esm/tests/api_tests/load_team_chat.test.js.map +1 -1
- package/lib/esm/tests/api_tests/load_threads_autobuild.test.d.ts +24 -5
- package/lib/esm/tests/api_tests/load_threads_autobuild.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/load_threads_autobuild.test.js +259 -226
- package/lib/esm/tests/api_tests/load_threads_autobuild.test.js.map +1 -1
- package/lib/esm/tests/api_tests/load_threads_care_team.test.d.ts +6 -0
- package/lib/esm/tests/api_tests/load_threads_care_team.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/load_threads_care_team.test.js +115 -31
- package/lib/esm/tests/api_tests/load_threads_care_team.test.js.map +1 -1
- package/lib/esm/tests/api_tests/managed_content_file_access.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/managed_content_file_access.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/managed_content_file_access.test.js +283 -287
- package/lib/esm/tests/api_tests/managed_content_file_access.test.js.map +1 -1
- package/lib/esm/tests/api_tests/mdb_sort.test.d.ts +20 -5
- package/lib/esm/tests/api_tests/mdb_sort.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/mdb_sort.test.js +358 -303
- package/lib/esm/tests/api_tests/mdb_sort.test.js.map +1 -1
- package/lib/esm/tests/api_tests/mdi_manual_sync.test.d.ts +27 -0
- package/lib/esm/tests/api_tests/mdi_manual_sync.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/mdi_manual_sync.test.js +390 -0
- package/lib/esm/tests/api_tests/mdi_manual_sync.test.js.map +1 -0
- package/lib/esm/tests/api_tests/mdi_trigger_refill.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/mdi_trigger_refill.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/mdi_trigger_refill.test.js +257 -208
- package/lib/esm/tests/api_tests/mdi_trigger_refill.test.js.map +1 -1
- package/lib/esm/tests/api_tests/mdi_webhooks.test.d.ts +12 -5
- package/lib/esm/tests/api_tests/mdi_webhooks.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/mdi_webhooks.test.js +65 -60
- package/lib/esm/tests/api_tests/mdi_webhooks.test.js.map +1 -1
- package/lib/esm/tests/api_tests/message_assignment_trigger.test.d.ts +23 -14
- package/lib/esm/tests/api_tests/message_assignment_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/message_assignment_trigger.test.js +256 -305
- package/lib/esm/tests/api_tests/message_assignment_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/metriport_push_form_response.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/metriport_push_form_response.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/metriport_push_form_response.test.js +298 -236
- package/lib/esm/tests/api_tests/metriport_push_form_response.test.js.map +1 -1
- package/lib/esm/tests/api_tests/organization_api_keys.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/organization_api_keys.test.js +226 -59
- package/lib/esm/tests/api_tests/organization_api_keys.test.js.map +1 -1
- package/lib/esm/tests/api_tests/organization_settings_duplicates.test.d.ts +19 -5
- package/lib/esm/tests/api_tests/organization_settings_duplicates.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/organization_settings_duplicates.test.js +332 -220
- package/lib/esm/tests/api_tests/organization_settings_duplicates.test.js.map +1 -1
- package/lib/esm/tests/api_tests/organization_signup.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/organization_signup.test.js +218 -51
- package/lib/esm/tests/api_tests/organization_signup.test.js.map +1 -1
- package/lib/esm/tests/api_tests/out_of_office_endpoint.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/out_of_office_endpoint.test.js +109 -1
- package/lib/esm/tests/api_tests/out_of_office_endpoint.test.js.map +1 -1
- package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.d.ts +6 -6
- package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.js +308 -361
- package/lib/esm/tests/api_tests/outbound_chat_sent_trigger.test.js.map +1 -1
- package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.js +243 -163
- package/lib/esm/tests/api_tests/phone_calls_cold_transfer.test.js.map +1 -1
- package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.js +127 -45
- package/lib/esm/tests/api_tests/phone_calls_conference_hold.test.js.map +1 -1
- package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.js +177 -130
- package/lib/esm/tests/api_tests/phone_tree_enduser_condition.test.js.map +1 -1
- package/lib/esm/tests/api_tests/programs.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/programs.test.js +417 -50
- package/lib/esm/tests/api_tests/programs.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts +10 -5
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js +399 -281
- package/lib/esm/tests/api_tests/security/ai-conversations-rbac.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts +9 -5
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js +225 -209
- package/lib/esm/tests/api_tests/security/automated-actions-process-gate.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts +13 -8
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js +268 -253
- package/lib/esm/tests/api_tests/security/booking-info-idor-token-mint.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts +16 -6
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js +165 -141
- package/lib/esm/tests/api_tests/security/cascade-role-rename-cross-tenant.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts +10 -5
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js +294 -220
- package/lib/esm/tests/api_tests/security/data-sync-redaction-bypass.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts +12 -5
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js +219 -215
- package/lib/esm/tests/api_tests/security/develop-health-benefit-verification-rbac.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js +298 -202
- package/lib/esm/tests/api_tests/security/enduser-ai-summary-trust-gate.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js +413 -274
- package/lib/esm/tests/api_tests/security/enduser-cross-create.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js +345 -227
- package/lib/esm/tests/api_tests/security/enduser-write-restrictions.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts +18 -7
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js +162 -74
- package/lib/esm/tests/api_tests/security/globalunique-conflict-redaction.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts +15 -9
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js +96 -100
- package/lib/esm/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js +129 -87
- package/lib/esm/tests/api_tests/security/load-inbox-redaction.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts +12 -5
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js +187 -136
- package/lib/esm/tests/api_tests/security/proxy-image-unauth-ssrf.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/register_business_id_injection.test.d.ts +18 -16
- package/lib/esm/tests/api_tests/security/register_business_id_injection.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/register_business_id_injection.test.js +162 -123
- package/lib/esm/tests/api_tests/security/register_business_id_injection.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js +122 -2
- package/lib/esm/tests/api_tests/security/sanitize-user-html-with-iframes.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts +11 -5
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js +285 -272
- package/lib/esm/tests/api_tests/security/schema-adminonly-enforcement.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts +17 -10
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js +171 -137
- package/lib/esm/tests/api_tests/security/self-admin-role-assignment.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js +307 -263
- package/lib/esm/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.js.map +1 -1
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts +9 -5
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.js +105 -81
- package/lib/esm/tests/api_tests/security/webhook-timeout.test.js.map +1 -1
- package/lib/esm/tests/api_tests/stedi_approval.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/stedi_approval.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/stedi_approval.test.js +204 -136
- package/lib/esm/tests/api_tests/stedi_approval.test.js.map +1 -1
- package/lib/esm/tests/api_tests/ticket_stage_archive.test.d.ts +7 -0
- package/lib/esm/tests/api_tests/ticket_stage_archive.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/ticket_stage_archive.test.js +339 -0
- package/lib/esm/tests/api_tests/ticket_stage_archive.test.js.map +1 -0
- package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.js +162 -147
- package/lib/esm/tests/api_tests/tickets_bulk_assign_care_team.test.js.map +1 -1
- package/lib/esm/tests/api_tests/translations.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/translations.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/translations.test.js +102 -74
- package/lib/esm/tests/api_tests/translations.test.js.map +1 -1
- package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.d.ts +21 -4
- package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.js +236 -369
- package/lib/esm/tests/api_tests/trigger_set_fields_date_difference.test.js.map +1 -1
- package/lib/esm/tests/api_tests/user_preferences.test.d.ts +30 -0
- package/lib/esm/tests/api_tests/user_preferences.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/user_preferences.test.js +274 -0
- package/lib/esm/tests/api_tests/user_preferences.test.js.map +1 -0
- package/lib/esm/tests/api_tests/webhook_error_handling.test.d.ts +17 -5
- package/lib/esm/tests/api_tests/webhook_error_handling.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/webhook_error_handling.test.js +202 -194
- package/lib/esm/tests/api_tests/webhook_error_handling.test.js.map +1 -1
- package/lib/esm/tests/api_tests/webhook_raw_json_number.test.d.ts +15 -5
- package/lib/esm/tests/api_tests/webhook_raw_json_number.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/webhook_raw_json_number.test.js +152 -178
- package/lib/esm/tests/api_tests/webhook_raw_json_number.test.js.map +1 -1
- package/lib/esm/tests/api_tests/welle_partner_token.test.d.ts +6 -5
- package/lib/esm/tests/api_tests/welle_partner_token.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/welle_partner_token.test.js +391 -250
- package/lib/esm/tests/api_tests/welle_partner_token.test.js.map +1 -1
- package/lib/esm/tests/setup_isolated.d.ts +7 -0
- package/lib/esm/tests/setup_isolated.d.ts.map +1 -1
- package/lib/esm/tests/setup_isolated.js.map +1 -1
- package/lib/esm/tests/tests.d.ts.map +1 -1
- package/lib/esm/tests/tests.js +229 -461
- package/lib/esm/tests/tests.js.map +1 -1
- package/lib/esm/tests/unit_tests/date_string_validation.test.d.ts +2 -0
- package/lib/esm/tests/unit_tests/date_string_validation.test.d.ts.map +1 -0
- package/lib/esm/tests/unit_tests/date_string_validation.test.js +108 -0
- package/lib/esm/tests/unit_tests/date_string_validation.test.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/sdk.ts +14 -3
- package/src/tests/api_tests/ai_conversations.test.ts +170 -138
- package/src/tests/api_tests/ai_conversations_agent_message.test.ts +491 -0
- package/src/tests/api_tests/appointment_link_expiration.test.ts +94 -35
- package/src/tests/api_tests/appointment_no_showed_trigger.test.ts +181 -128
- package/src/tests/api_tests/availability_block_buffer.test.ts +286 -0
- package/src/tests/api_tests/beluga_manual_sync.test.ts +103 -53
- package/src/tests/api_tests/beluga_trigger_refill.test.ts +131 -46
- package/src/tests/api_tests/bulk_assignment.test.ts +307 -220
- package/src/tests/api_tests/calendar_event_references_update.test.ts +97 -54
- package/src/tests/api_tests/calendar_event_webhook_template.test.ts +198 -158
- package/src/tests/api_tests/chats_analytics.test.ts +161 -123
- package/src/tests/api_tests/concurrent_build_threads.test.ts +80 -69
- package/src/tests/api_tests/configurations_public_read.test.ts +154 -67
- package/src/tests/api_tests/copied_form_response_no_enduser_sync.test.ts +307 -0
- package/src/tests/api_tests/create_note_action.test.ts +149 -70
- package/src/tests/api_tests/create_user_notifications_trigger.test.ts +116 -144
- package/src/tests/api_tests/custom_aggregation.test.ts +163 -92
- package/src/tests/api_tests/database_cascade_delete.test.ts +101 -87
- package/src/tests/api_tests/dont_sync_to_elation_form_submission.test.ts +122 -51
- package/src/tests/api_tests/elation_user_id.test.ts +105 -42
- package/src/tests/api_tests/file_download_unicode_names.test.ts +171 -122
- package/src/tests/api_tests/form_intake_email_normalization.test.ts +489 -0
- package/src/tests/api_tests/form_submitted_trigger.test.ts +152 -86
- package/src/tests/api_tests/form_translations.test.ts +117 -48
- package/src/tests/api_tests/formsort_header_auth.test.ts +147 -97
- package/src/tests/api_tests/gcal_sync_retry.test.ts +71 -49
- package/src/tests/api_tests/get_some_projection.test.ts +333 -169
- package/src/tests/api_tests/group_event_attendee_self_update.test.ts +103 -52
- package/src/tests/api_tests/integrations_redacted.test.ts +161 -84
- package/src/tests/api_tests/journey_delete_cancels_actions.test.ts +93 -64
- package/src/tests/api_tests/load_team_chat.test.ts +62 -6
- package/src/tests/api_tests/load_threads_autobuild.test.ts +163 -67
- package/src/tests/api_tests/load_threads_care_team.test.ts +103 -0
- package/src/tests/api_tests/managed_content_file_access.test.ts +132 -108
- package/src/tests/api_tests/mdb_sort.test.ts +247 -161
- package/src/tests/api_tests/mdi_manual_sync.test.ts +277 -0
- package/src/tests/api_tests/mdi_trigger_refill.test.ts +132 -78
- package/src/tests/api_tests/mdi_webhooks.test.ts +52 -22
- package/src/tests/api_tests/message_assignment_trigger.test.ts +129 -155
- package/src/tests/api_tests/metriport_push_form_response.test.ts +109 -49
- package/src/tests/api_tests/organization_api_keys.test.ts +170 -2
- package/src/tests/api_tests/organization_settings_duplicates.test.ts +291 -181
- package/src/tests/api_tests/organization_signup.test.ts +170 -5
- package/src/tests/api_tests/out_of_office_endpoint.test.ts +98 -0
- package/src/tests/api_tests/outbound_chat_sent_trigger.test.ts +163 -175
- package/src/tests/api_tests/phone_calls_cold_transfer.test.ts +195 -133
- package/src/tests/api_tests/phone_calls_conference_hold.test.ts +112 -42
- package/src/tests/api_tests/phone_tree_enduser_condition.test.ts +81 -32
- package/src/tests/api_tests/programs.test.ts +350 -0
- package/src/tests/api_tests/security/ai-conversations-rbac.test.ts +248 -128
- package/src/tests/api_tests/security/automated-actions-process-gate.test.ts +47 -42
- package/src/tests/api_tests/security/booking-info-idor-token-mint.test.ts +53 -45
- package/src/tests/api_tests/security/cascade-role-rename-cross-tenant.test.ts +100 -73
- package/src/tests/api_tests/security/data-sync-redaction-bypass.test.ts +125 -59
- package/src/tests/api_tests/security/develop-health-benefit-verification-rbac.test.ts +131 -103
- package/src/tests/api_tests/security/enduser-ai-summary-trust-gate.test.ts +161 -68
- package/src/tests/api_tests/security/enduser-cross-create.test.ts +200 -61
- package/src/tests/api_tests/security/enduser-write-restrictions.test.ts +179 -61
- package/src/tests/api_tests/security/globalunique-conflict-redaction.test.ts +163 -44
- package/src/tests/api_tests/security/handle-incoming-communication-cross-tenant.test.ts +78 -70
- package/src/tests/api_tests/security/load-inbox-redaction.test.ts +79 -44
- package/src/tests/api_tests/security/proxy-image-unauth-ssrf.test.ts +95 -52
- package/src/tests/api_tests/security/register_business_id_injection.test.ts +132 -93
- package/src/tests/api_tests/security/sanitize-user-html-with-iframes.test.ts +127 -0
- package/src/tests/api_tests/security/schema-adminonly-enforcement.test.ts +42 -37
- package/src/tests/api_tests/security/self-admin-role-assignment.test.ts +92 -54
- package/src/tests/api_tests/security/startlinktoken-enduser-staff-escalation.test.ts +76 -34
- package/src/tests/api_tests/security/webhook-timeout.test.ts +67 -36
- package/src/tests/api_tests/stedi_approval.test.ts +156 -90
- package/src/tests/api_tests/ticket_stage_archive.test.ts +314 -0
- package/src/tests/api_tests/tickets_bulk_assign_care_team.test.ts +138 -103
- package/src/tests/api_tests/translations.test.ts +69 -46
- package/src/tests/api_tests/trigger_set_fields_date_difference.test.ts +198 -256
- package/src/tests/api_tests/user_preferences.test.ts +227 -0
- package/src/tests/api_tests/webhook_error_handling.test.ts +121 -60
- package/src/tests/api_tests/webhook_raw_json_number.test.ts +127 -109
- package/src/tests/api_tests/welle_partner_token.test.ts +217 -90
- package/src/tests/setup_isolated.ts +7 -0
- package/src/tests/tests.ts +41 -147
- package/src/tests/{api_tests → unit_tests}/date_string_validation.test.ts +2 -23
- package/test_generated.pdf +0 -0
|
@@ -34,326 +34,381 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
34
34
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
38
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39
|
-
if (ar || !(i in from)) {
|
|
40
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
41
|
-
ar[i] = from[i];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45
|
-
};
|
|
46
37
|
require('source-map-support').install();
|
|
47
|
-
import {
|
|
48
|
-
import { assert, async_test, log_header, } from "@tellescope/testing";
|
|
49
|
-
import { setup_tests } from "../setup";
|
|
38
|
+
import { assert_checks, setup_isolated_tenant, } from "../setup_isolated";
|
|
50
39
|
var host = process.env.API_URL || 'http://localhost:8080';
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
40
|
+
var RAND = function () { return Math.random().toString(36).slice(2, 10); };
|
|
41
|
+
var ALICE_EMAIL = 'alice-mdbsort@tellescope.com';
|
|
42
|
+
var ALICE2_EMAIL = 'alice2-mdbsort@tellescope.com';
|
|
43
|
+
var BOB_EMAIL = 'bob-mdbsort@tellescope.com';
|
|
44
|
+
var CHARLIE_EMAIL = 'charlie-mdbsort@tellescope.com';
|
|
45
|
+
/**
|
|
46
|
+
* getSome `mdbSort` coverage: ascending, descending, multi-field tie-breaking, combined with
|
|
47
|
+
* mdbFilter, keyset pagination through mdbFilter $or, combined with projection, for a non-admin
|
|
48
|
+
* session, and the fallback to sortBy when mdbSort is absent.
|
|
49
|
+
*
|
|
50
|
+
* Runs on its own provisioned tenant. The mdbFilter checks (tests 4 and 5) query by email with NO id
|
|
51
|
+
* scoping — `filter` is ignored when mdbFilter is present — so on the shared fixture org any leftover
|
|
52
|
+
* *-mdbsort@tellescope.com enduser from an earlier run silently changed the counts and the ordering.
|
|
53
|
+
* On a disposable tenant those four fixed addresses are unambiguous.
|
|
54
|
+
*
|
|
55
|
+
* Each former async_test's nested `assert` calls became one Check each: `assert` calls process.exit,
|
|
56
|
+
* which inside a pooled `run` would skip every concurrently running suite's teardown and strand its
|
|
57
|
+
* tenant permanently.
|
|
58
|
+
*/
|
|
59
|
+
export var mdb_sort_checks = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
60
|
+
var checks, record, describe, errorMessage, names, step, tenant, sdk_1, sdkNonAdmin_1, careTeam, testEndusers, enduserIds_1, e_1, e_2;
|
|
61
|
+
return __generator(this, function (_a) {
|
|
62
|
+
switch (_a.label) {
|
|
63
|
+
case 0:
|
|
64
|
+
checks = [];
|
|
65
|
+
record = function (label, pass, detail) { return checks.push({ label: label, pass: pass, detail: detail }); };
|
|
66
|
+
describe = function (value) {
|
|
67
|
+
if (value === undefined || value === null)
|
|
68
|
+
return String(value);
|
|
69
|
+
var stringified = JSON.stringify(value);
|
|
70
|
+
return stringified === undefined ? String(value) : stringified;
|
|
71
|
+
};
|
|
72
|
+
errorMessage = function (e) { return (typeof (e === null || e === void 0 ? void 0 : e.message) === 'string' && e.message !== '' ? e.message : describe(e)); };
|
|
73
|
+
names = function (results) { return (describe(results.map(function (e) { return "".concat(e.fname, " ").concat(e.lname); }))); };
|
|
74
|
+
step = function (name, body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
75
|
+
var e_3;
|
|
76
|
+
return __generator(this, function (_a) {
|
|
77
|
+
switch (_a.label) {
|
|
78
|
+
case 0:
|
|
79
|
+
_a.trys.push([0, 2, , 3]);
|
|
80
|
+
return [4 /*yield*/, body()];
|
|
81
|
+
case 1:
|
|
82
|
+
_a.sent();
|
|
83
|
+
return [3 /*break*/, 3];
|
|
84
|
+
case 2:
|
|
85
|
+
e_3 = _a.sent();
|
|
86
|
+
record("".concat(name, ": block ran to completion"), false, "threw: ".concat(errorMessage(e_3)));
|
|
87
|
+
return [3 /*break*/, 3];
|
|
88
|
+
case 3: return [2 /*return*/];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}); };
|
|
92
|
+
_a.label = 1;
|
|
93
|
+
case 1:
|
|
94
|
+
_a.trys.push([1, , 15, 20]);
|
|
95
|
+
return [4 /*yield*/, setup_isolated_tenant({
|
|
96
|
+
name: "mdbSort ".concat(RAND()),
|
|
97
|
+
users: [{ isAdmin: true }, { roles: ['Non-Admin'] }],
|
|
98
|
+
apiKeys: 0,
|
|
99
|
+
})];
|
|
100
|
+
case 2:
|
|
101
|
+
tenant = _a.sent();
|
|
102
|
+
sdk_1 = tenant.sdk, sdkNonAdmin_1 = tenant.sdkNonAdmin;
|
|
103
|
+
_a.label = 3;
|
|
104
|
+
case 3:
|
|
105
|
+
_a.trys.push([3, 13, , 14]);
|
|
106
|
+
careTeam = [tenant.users[1].id];
|
|
107
|
+
return [4 /*yield*/, Promise.all([
|
|
108
|
+
sdk_1.api.endusers.createOne({ fname: 'Alice', lname: 'Smith', email: ALICE_EMAIL, assignedTo: careTeam }),
|
|
109
|
+
sdk_1.api.endusers.createOne({ fname: 'Bob', lname: 'Jones', email: BOB_EMAIL, assignedTo: careTeam }),
|
|
110
|
+
sdk_1.api.endusers.createOne({ fname: 'Charlie', lname: 'Adams', email: CHARLIE_EMAIL, assignedTo: careTeam }),
|
|
111
|
+
sdk_1.api.endusers.createOne({ fname: 'Alice', lname: 'Zeta', email: ALICE2_EMAIL, assignedTo: careTeam }), // Same fname for multi-field test
|
|
112
|
+
])];
|
|
113
|
+
case 4:
|
|
114
|
+
testEndusers = _a.sent();
|
|
115
|
+
enduserIds_1 = testEndusers.map(function (e) { return e.id; });
|
|
116
|
+
// Test 1: Sort by fname ascending (alphabetical order)
|
|
117
|
+
return [4 /*yield*/, step('mdbSort-fname-ascending', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
118
|
+
var results;
|
|
119
|
+
var _a, _b, _c, _d;
|
|
120
|
+
return __generator(this, function (_e) {
|
|
121
|
+
switch (_e.label) {
|
|
122
|
+
case 0: return [4 /*yield*/, sdk_1.api.endusers.getSome({
|
|
123
|
+
filter: { id: { _in: enduserIds_1 } },
|
|
124
|
+
mdbSort: { fname: 1 },
|
|
125
|
+
})];
|
|
126
|
+
case 1:
|
|
127
|
+
results = _e.sent();
|
|
128
|
+
record('mdbSort-fname-ascending: Expected 4 endusers', results.length === 4, "Got ".concat(results.length));
|
|
129
|
+
// Verify alphabetical order: Alice, Alice, Bob, Charlie
|
|
130
|
+
record('mdbSort-fname-ascending: First should be Alice', ((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fname) === 'Alice', names(results));
|
|
131
|
+
record('mdbSort-fname-ascending: Second should be Alice', ((_b = results[1]) === null || _b === void 0 ? void 0 : _b.fname) === 'Alice', names(results));
|
|
132
|
+
record('mdbSort-fname-ascending: Third should be Bob', ((_c = results[2]) === null || _c === void 0 ? void 0 : _c.fname) === 'Bob', names(results));
|
|
133
|
+
record('mdbSort-fname-ascending: Fourth should be Charlie', ((_d = results[3]) === null || _d === void 0 ? void 0 : _d.fname) === 'Charlie', names(results));
|
|
134
|
+
return [2 /*return*/];
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}); })
|
|
98
138
|
// Test 2: Sort by fname descending (reverse alphabetical order)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return [4 /*yield*/, async_test('mdbSort-multi-field', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
126
|
-
var results;
|
|
127
|
-
return __generator(this, function (_a) {
|
|
128
|
-
switch (_a.label) {
|
|
129
|
-
case 0: return [4 /*yield*/, sdk.api.endusers.getSome({
|
|
130
|
-
filter: { id: { _in: enduserIds } },
|
|
131
|
-
mdbSort: { fname: 1, lname: 1 },
|
|
132
|
-
})];
|
|
133
|
-
case 1:
|
|
134
|
-
results = _a.sent();
|
|
135
|
-
assert(results.length === 4, 'Expected 4 endusers');
|
|
136
|
-
// Verify multi-field sort:
|
|
137
|
-
// Alice Smith (fname: Alice, lname: Smith)
|
|
138
|
-
// Alice Zeta (fname: Alice, lname: Zeta)
|
|
139
|
-
// Bob Jones (fname: Bob)
|
|
140
|
-
// Charlie Adams (fname: Charlie)
|
|
141
|
-
assert(results[0].fname === 'Alice' && results[0].lname === 'Smith', 'First should be Alice Smith');
|
|
142
|
-
assert(results[1].fname === 'Alice' && results[1].lname === 'Zeta', 'Second should be Alice Zeta');
|
|
143
|
-
assert(results[2].fname === 'Bob', 'Third should be Bob');
|
|
144
|
-
assert(results[3].fname === 'Charlie', 'Fourth should be Charlie');
|
|
145
|
-
return [2 /*return*/, results];
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}); }, { onResult: function () { return true; } })
|
|
149
|
-
// Test 4: mdbSort combined with mdbFilter
|
|
150
|
-
];
|
|
151
|
-
case 5:
|
|
139
|
+
];
|
|
140
|
+
case 5:
|
|
141
|
+
// Test 1: Sort by fname ascending (alphabetical order)
|
|
142
|
+
_a.sent();
|
|
143
|
+
// Test 2: Sort by fname descending (reverse alphabetical order)
|
|
144
|
+
return [4 /*yield*/, step('mdbSort-fname-descending', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
145
|
+
var results;
|
|
146
|
+
var _a, _b, _c, _d;
|
|
147
|
+
return __generator(this, function (_e) {
|
|
148
|
+
switch (_e.label) {
|
|
149
|
+
case 0: return [4 /*yield*/, sdk_1.api.endusers.getSome({
|
|
150
|
+
filter: { id: { _in: enduserIds_1 } },
|
|
151
|
+
mdbSort: { fname: -1 },
|
|
152
|
+
})];
|
|
153
|
+
case 1:
|
|
154
|
+
results = _e.sent();
|
|
155
|
+
record('mdbSort-fname-descending: Expected 4 endusers', results.length === 4, "Got ".concat(results.length));
|
|
156
|
+
// Verify reverse alphabetical order: Charlie, Bob, Alice, Alice
|
|
157
|
+
record('mdbSort-fname-descending: First should be Charlie', ((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fname) === 'Charlie', names(results));
|
|
158
|
+
record('mdbSort-fname-descending: Second should be Bob', ((_b = results[1]) === null || _b === void 0 ? void 0 : _b.fname) === 'Bob', names(results));
|
|
159
|
+
record('mdbSort-fname-descending: Third should be Alice', ((_c = results[2]) === null || _c === void 0 ? void 0 : _c.fname) === 'Alice', names(results));
|
|
160
|
+
record('mdbSort-fname-descending: Fourth should be Alice', ((_d = results[3]) === null || _d === void 0 ? void 0 : _d.fname) === 'Alice', names(results));
|
|
161
|
+
return [2 /*return*/];
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}); })
|
|
152
165
|
// Test 3: Multi-field sort (fname ascending, then lname ascending for ties)
|
|
153
|
-
|
|
166
|
+
];
|
|
167
|
+
case 6:
|
|
168
|
+
// Test 2: Sort by fname descending (reverse alphabetical order)
|
|
169
|
+
_a.sent();
|
|
170
|
+
// Test 3: Multi-field sort (fname ascending, then lname ascending for ties)
|
|
171
|
+
return [4 /*yield*/, step('mdbSort-multi-field', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
172
|
+
var results;
|
|
173
|
+
var _a, _b, _c, _d, _e, _f;
|
|
174
|
+
return __generator(this, function (_g) {
|
|
175
|
+
switch (_g.label) {
|
|
176
|
+
case 0: return [4 /*yield*/, sdk_1.api.endusers.getSome({
|
|
177
|
+
filter: { id: { _in: enduserIds_1 } },
|
|
178
|
+
mdbSort: { fname: 1, lname: 1 },
|
|
179
|
+
})];
|
|
180
|
+
case 1:
|
|
181
|
+
results = _g.sent();
|
|
182
|
+
record('mdbSort-multi-field: Expected 4 endusers', results.length === 4, "Got ".concat(results.length));
|
|
183
|
+
// Verify multi-field sort:
|
|
184
|
+
// Alice Smith (fname: Alice, lname: Smith)
|
|
185
|
+
// Alice Zeta (fname: Alice, lname: Zeta)
|
|
186
|
+
// Bob Jones (fname: Bob)
|
|
187
|
+
// Charlie Adams (fname: Charlie)
|
|
188
|
+
record('mdbSort-multi-field: First should be Alice Smith', ((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fname) === 'Alice' && ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.lname) === 'Smith', names(results));
|
|
189
|
+
record('mdbSort-multi-field: Second should be Alice Zeta', ((_c = results[1]) === null || _c === void 0 ? void 0 : _c.fname) === 'Alice' && ((_d = results[1]) === null || _d === void 0 ? void 0 : _d.lname) === 'Zeta', names(results));
|
|
190
|
+
record('mdbSort-multi-field: Third should be Bob', ((_e = results[2]) === null || _e === void 0 ? void 0 : _e.fname) === 'Bob', names(results));
|
|
191
|
+
record('mdbSort-multi-field: Fourth should be Charlie', ((_f = results[3]) === null || _f === void 0 ? void 0 : _f.fname) === 'Charlie', names(results));
|
|
192
|
+
return [2 /*return*/];
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}); })
|
|
154
196
|
// Test 4: mdbSort combined with mdbFilter
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
_b.sent();
|
|
197
|
+
];
|
|
198
|
+
case 7:
|
|
199
|
+
// Test 3: Multi-field sort (fname ascending, then lname ascending for ties)
|
|
200
|
+
_a.sent();
|
|
201
|
+
// Test 4: mdbSort combined with mdbFilter
|
|
202
|
+
return [4 /*yield*/, step('mdbSort-with-mdbFilter', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
203
|
+
var results;
|
|
204
|
+
var _a, _b, _c, _d;
|
|
205
|
+
return __generator(this, function (_e) {
|
|
206
|
+
switch (_e.label) {
|
|
207
|
+
case 0: return [4 /*yield*/, sdk_1.api.endusers.getSome({
|
|
208
|
+
mdbFilter: {
|
|
209
|
+
email: { $in: [ALICE_EMAIL, ALICE2_EMAIL] },
|
|
210
|
+
fname: 'Alice', // Only get Alice endusers
|
|
211
|
+
},
|
|
212
|
+
mdbSort: { lname: 1 }, // Sort by last name
|
|
213
|
+
})];
|
|
214
|
+
case 1:
|
|
215
|
+
results = _e.sent();
|
|
216
|
+
record('mdbSort-with-mdbFilter: Expected 2 Alice endusers', results.length === 2, "Got ".concat(results.length));
|
|
217
|
+
// Verify both are Alice and sorted by lname: Smith, then Zeta
|
|
218
|
+
record('mdbSort-with-mdbFilter: First Alice should be Smith', ((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fname) === 'Alice' && ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.lname) === 'Smith', names(results));
|
|
219
|
+
record('mdbSort-with-mdbFilter: Second Alice should be Zeta', ((_c = results[1]) === null || _c === void 0 ? void 0 : _c.fname) === 'Alice' && ((_d = results[1]) === null || _d === void 0 ? void 0 : _d.lname) === 'Zeta', names(results));
|
|
220
|
+
return [2 /*return*/];
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}); })
|
|
183
224
|
// Test 5: mdbSort keyset pagination via mdbFilter $or
|
|
184
225
|
// Note: filter is ignored when mdbFilter is present, so both id scoping and keyset cursor
|
|
185
226
|
// must be expressed in mdbFilter.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
mdbFilter: {
|
|
210
|
-
email: { $in: testEmails },
|
|
211
|
-
fname: { $gt: lastFname },
|
|
212
|
-
},
|
|
213
|
-
mdbSort: { fname: 1 },
|
|
214
|
-
limit: 2,
|
|
215
|
-
})];
|
|
216
|
-
case 2:
|
|
217
|
-
page2 = _a.sent();
|
|
218
|
-
assert(page2.length === 2, 'Expected 2 endusers on page 2');
|
|
219
|
-
assert(page2[0].fname === 'Bob', 'Page 2 first should be Bob');
|
|
220
|
-
assert(page2[1].fname === 'Charlie', 'Page 2 second should be Charlie');
|
|
221
|
-
return [2 /*return*/, __spreadArray(__spreadArray([], page1, true), page2, true)];
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
}); }, { onResult: function () { return true; } })
|
|
225
|
-
// Test 6: mdbSort with projection (ensure both work together)
|
|
226
|
-
];
|
|
227
|
-
case 7:
|
|
228
|
-
// Test 5: mdbSort keyset pagination via mdbFilter $or
|
|
229
|
-
// Note: filter is ignored when mdbFilter is present, so both id scoping and keyset cursor
|
|
230
|
-
// must be expressed in mdbFilter.
|
|
231
|
-
_b.sent();
|
|
232
|
-
// Test 6: mdbSort with projection (ensure both work together)
|
|
233
|
-
return [4 /*yield*/, async_test('mdbSort-with-projection', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
234
|
-
var results;
|
|
235
|
-
return __generator(this, function (_a) {
|
|
236
|
-
switch (_a.label) {
|
|
237
|
-
case 0: return [4 /*yield*/, sdk.api.endusers.getSome({
|
|
238
|
-
filter: { id: { _in: enduserIds } },
|
|
239
|
-
mdbSort: { fname: -1 },
|
|
240
|
-
projection: { fname: 1, lname: 1 },
|
|
227
|
+
];
|
|
228
|
+
case 8:
|
|
229
|
+
// Test 4: mdbSort combined with mdbFilter
|
|
230
|
+
_a.sent();
|
|
231
|
+
// Test 5: mdbSort keyset pagination via mdbFilter $or
|
|
232
|
+
// Note: filter is ignored when mdbFilter is present, so both id scoping and keyset cursor
|
|
233
|
+
// must be expressed in mdbFilter.
|
|
234
|
+
return [4 /*yield*/, step('mdbSort-keyset-pagination', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
235
|
+
var testEmails, page1, lastFname, page2;
|
|
236
|
+
var _a, _b, _c, _d, _e;
|
|
237
|
+
return __generator(this, function (_f) {
|
|
238
|
+
switch (_f.label) {
|
|
239
|
+
case 0:
|
|
240
|
+
testEmails = [
|
|
241
|
+
ALICE_EMAIL,
|
|
242
|
+
ALICE2_EMAIL,
|
|
243
|
+
BOB_EMAIL,
|
|
244
|
+
CHARLIE_EMAIL,
|
|
245
|
+
];
|
|
246
|
+
return [4 /*yield*/, sdk_1.api.endusers.getSome({
|
|
247
|
+
mdbFilter: { email: { $in: testEmails } },
|
|
248
|
+
mdbSort: { fname: 1 },
|
|
249
|
+
limit: 2,
|
|
241
250
|
})];
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
});
|
|
254
|
-
}); }, { onResult: function () { return true; } })
|
|
255
|
-
// Test 7: Non-admin access with mdbSort (RBA still applies)
|
|
256
|
-
];
|
|
257
|
-
case 8:
|
|
258
|
-
// Test 6: mdbSort with projection (ensure both work together)
|
|
259
|
-
_b.sent();
|
|
260
|
-
// Test 7: Non-admin access with mdbSort (RBA still applies)
|
|
261
|
-
return [4 /*yield*/, async_test('non-admin-mdbSort', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
262
|
-
var results, fnames;
|
|
263
|
-
return __generator(this, function (_a) {
|
|
264
|
-
switch (_a.label) {
|
|
265
|
-
case 0: return [4 /*yield*/, sdkNonAdmin.api.endusers.getSome({
|
|
266
|
-
filter: { id: { _in: enduserIds } },
|
|
251
|
+
case 1:
|
|
252
|
+
page1 = _f.sent();
|
|
253
|
+
record('mdbSort-keyset-pagination: Expected 2 endusers on page 1', page1.length === 2, "Got ".concat(page1.length));
|
|
254
|
+
record('mdbSort-keyset-pagination: Page 1 first should be Alice', ((_a = page1[0]) === null || _a === void 0 ? void 0 : _a.fname) === 'Alice', names(page1));
|
|
255
|
+
record('mdbSort-keyset-pagination: Page 1 second should be Alice', ((_b = page1[1]) === null || _b === void 0 ? void 0 : _b.fname) === 'Alice', names(page1));
|
|
256
|
+
lastFname = (_c = page1[page1.length - 1]) === null || _c === void 0 ? void 0 : _c.fname;
|
|
257
|
+
return [4 /*yield*/, sdk_1.api.endusers.getSome({
|
|
258
|
+
mdbFilter: {
|
|
259
|
+
email: { $in: testEmails },
|
|
260
|
+
fname: { $gt: lastFname },
|
|
261
|
+
},
|
|
267
262
|
mdbSort: { fname: 1 },
|
|
268
|
-
|
|
269
|
-
// Non-admin should still get results (RBA should apply)
|
|
270
|
-
];
|
|
271
|
-
case 1:
|
|
272
|
-
results = _a.sent();
|
|
273
|
-
// Non-admin should still get results (RBA should apply)
|
|
274
|
-
assert(Array.isArray(results), 'Non-admin should receive an array response');
|
|
275
|
-
// Verify sort order
|
|
276
|
-
if (results.length >= 2) {
|
|
277
|
-
fnames = results.map(function (e) { return e.fname; });
|
|
278
|
-
// Should be sorted alphabetically
|
|
279
|
-
assert(fnames[0] <= fnames[1], 'Non-admin results should be sorted');
|
|
280
|
-
}
|
|
281
|
-
return [2 /*return*/, results];
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
}); }, { onResult: function () { return true; } })
|
|
285
|
-
// Test 8: mdbSort fallback behavior (no mdbSort uses sortBy default)
|
|
286
|
-
];
|
|
287
|
-
case 9:
|
|
288
|
-
// Test 7: Non-admin access with mdbSort (RBA still applies)
|
|
289
|
-
_b.sent();
|
|
290
|
-
// Test 8: mdbSort fallback behavior (no mdbSort uses sortBy default)
|
|
291
|
-
return [4 /*yield*/, async_test('no-mdbSort-fallback', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
292
|
-
var results;
|
|
293
|
-
return __generator(this, function (_a) {
|
|
294
|
-
switch (_a.label) {
|
|
295
|
-
case 0: return [4 /*yield*/, sdk.api.endusers.getSome({
|
|
296
|
-
filter: { id: { _in: enduserIds } },
|
|
297
|
-
sortBy: 'updatedAt',
|
|
298
|
-
sort: 'oldFirst',
|
|
263
|
+
limit: 2,
|
|
299
264
|
})];
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
265
|
+
case 2:
|
|
266
|
+
page2 = _f.sent();
|
|
267
|
+
record('mdbSort-keyset-pagination: Expected 2 endusers on page 2', page2.length === 2, "Got ".concat(page2.length, " (cursor fname > ").concat(describe(lastFname), ")"));
|
|
268
|
+
record('mdbSort-keyset-pagination: Page 2 first should be Bob', ((_d = page2[0]) === null || _d === void 0 ? void 0 : _d.fname) === 'Bob', names(page2));
|
|
269
|
+
record('mdbSort-keyset-pagination: Page 2 second should be Charlie', ((_e = page2[1]) === null || _e === void 0 ? void 0 : _e.fname) === 'Charlie', names(page2));
|
|
270
|
+
return [2 /*return*/];
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}); })
|
|
274
|
+
// Test 6: mdbSort with projection (ensure both work together)
|
|
275
|
+
];
|
|
276
|
+
case 9:
|
|
277
|
+
// Test 5: mdbSort keyset pagination via mdbFilter $or
|
|
278
|
+
// Note: filter is ignored when mdbFilter is present, so both id scoping and keyset cursor
|
|
279
|
+
// must be expressed in mdbFilter.
|
|
280
|
+
_a.sent();
|
|
281
|
+
// Test 6: mdbSort with projection (ensure both work together)
|
|
282
|
+
return [4 /*yield*/, step('mdbSort-with-projection', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
283
|
+
var results;
|
|
284
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
285
|
+
return __generator(this, function (_h) {
|
|
286
|
+
switch (_h.label) {
|
|
287
|
+
case 0: return [4 /*yield*/, sdk_1.api.endusers.getSome({
|
|
288
|
+
filter: { id: { _in: enduserIds_1 } },
|
|
289
|
+
mdbSort: { fname: -1 },
|
|
290
|
+
projection: { fname: 1, lname: 1 },
|
|
291
|
+
})];
|
|
292
|
+
case 1:
|
|
293
|
+
results = _h.sent();
|
|
294
|
+
record('mdbSort-with-projection: Expected 4 endusers', results.length === 4, "Got ".concat(results.length));
|
|
295
|
+
// Verify sort order (descending)
|
|
296
|
+
record('mdbSort-with-projection: First should be Charlie', ((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fname) === 'Charlie', names(results));
|
|
297
|
+
// Verify projection (only fname, lname, plus id and createdAt)
|
|
298
|
+
record('mdbSort-with-projection: fname should be present', ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.fname) !== undefined, "fname=".concat(describe((_c = results[0]) === null || _c === void 0 ? void 0 : _c.fname)));
|
|
299
|
+
record('mdbSort-with-projection: lname should be present', ((_d = results[0]) === null || _d === void 0 ? void 0 : _d.lname) !== undefined, "lname=".concat(describe((_e = results[0]) === null || _e === void 0 ? void 0 : _e.lname)));
|
|
300
|
+
record('mdbSort-with-projection: email should NOT be present', ((_f = results[0]) === null || _f === void 0 ? void 0 : _f.email) === undefined, "email=".concat(describe((_g = results[0]) === null || _g === void 0 ? void 0 : _g.email)));
|
|
301
|
+
return [2 /*return*/];
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}); })
|
|
305
|
+
// Test 7: Non-admin access with mdbSort (RBA still applies)
|
|
306
|
+
];
|
|
307
|
+
case 10:
|
|
308
|
+
// Test 6: mdbSort with projection (ensure both work together)
|
|
309
|
+
_a.sent();
|
|
310
|
+
// Test 7: Non-admin access with mdbSort (RBA still applies)
|
|
311
|
+
return [4 /*yield*/, step('non-admin-mdbSort', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
312
|
+
var results, fnames;
|
|
313
|
+
return __generator(this, function (_a) {
|
|
314
|
+
switch (_a.label) {
|
|
315
|
+
case 0: return [4 /*yield*/, sdkNonAdmin_1.api.endusers.getSome({
|
|
316
|
+
filter: { id: { _in: enduserIds_1 } },
|
|
317
|
+
mdbSort: { fname: 1 },
|
|
318
|
+
})
|
|
319
|
+
// Non-admin should still get results (RBA should apply)
|
|
320
|
+
];
|
|
321
|
+
case 1:
|
|
322
|
+
results = _a.sent();
|
|
323
|
+
// Non-admin should still get results (RBA should apply)
|
|
324
|
+
record('non-admin-mdbSort: Non-admin should receive an array response', Array.isArray(results), "results=".concat(describe(results.map(function (e) { return e.id; }))));
|
|
325
|
+
fnames = results.map(function (e) { return e.fname; });
|
|
326
|
+
record('non-admin-mdbSort: Non-admin results should be sorted', results.length >= 2 && fnames[0] <= fnames[1], "fnames=".concat(describe(fnames)));
|
|
327
|
+
return [2 /*return*/];
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
}); })
|
|
310
331
|
// Test 8: mdbSort fallback behavior (no mdbSort uses sortBy default)
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
332
|
+
];
|
|
333
|
+
case 11:
|
|
334
|
+
// Test 7: Non-admin access with mdbSort (RBA still applies)
|
|
335
|
+
_a.sent();
|
|
336
|
+
// Test 8: mdbSort fallback behavior (no mdbSort uses sortBy default)
|
|
337
|
+
return [4 /*yield*/, step('no-mdbSort-fallback', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
338
|
+
var results;
|
|
339
|
+
var _a;
|
|
340
|
+
return __generator(this, function (_b) {
|
|
341
|
+
switch (_b.label) {
|
|
342
|
+
case 0: return [4 /*yield*/, sdk_1.api.endusers.getSome({
|
|
343
|
+
filter: { id: { _in: enduserIds_1 } },
|
|
344
|
+
sortBy: 'updatedAt',
|
|
345
|
+
sort: 'oldFirst',
|
|
346
|
+
})];
|
|
347
|
+
case 1:
|
|
348
|
+
results = _b.sent();
|
|
349
|
+
record('no-mdbSort-fallback: Expected 4 endusers', results.length === 4, "Got ".concat(results.length));
|
|
350
|
+
// Verify traditional sortBy still works when mdbSort not provided
|
|
351
|
+
record('no-mdbSort-fallback: Should return valid endusers', ((_a = results[0]) === null || _a === void 0 ? void 0 : _a.id) !== undefined, "ids=".concat(describe(results.map(function (e) { return e.id; }))));
|
|
352
|
+
return [2 /*return*/];
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}); })
|
|
356
|
+
// The shared-org version deleted its endusers here. Teardown discards the whole tenant, so the
|
|
357
|
+
// records go with it.
|
|
358
|
+
];
|
|
359
|
+
case 12:
|
|
360
|
+
// Test 8: mdbSort fallback behavior (no mdbSort uses sortBy default)
|
|
361
|
+
_a.sent();
|
|
362
|
+
return [3 /*break*/, 14];
|
|
363
|
+
case 13:
|
|
364
|
+
e_1 = _a.sent();
|
|
365
|
+
// A fixture write outside a step threw. Record it rather than letting it escape `run`, which
|
|
366
|
+
// would fail every other suite in the batch instead of just this one.
|
|
367
|
+
record('mdbSort suite ran to completion', false, "threw: ".concat(errorMessage(e_1)));
|
|
368
|
+
return [3 /*break*/, 14];
|
|
369
|
+
case 14: return [3 /*break*/, 20];
|
|
370
|
+
case 15:
|
|
371
|
+
if (!tenant) return [3 /*break*/, 19];
|
|
372
|
+
_a.label = 16;
|
|
373
|
+
case 16:
|
|
374
|
+
_a.trys.push([16, 18, , 19]);
|
|
375
|
+
return [4 /*yield*/, tenant.teardown()];
|
|
376
|
+
case 17:
|
|
377
|
+
_a.sent();
|
|
378
|
+
return [3 /*break*/, 19];
|
|
379
|
+
case 18:
|
|
380
|
+
e_2 = _a.sent();
|
|
381
|
+
console.error('teardown failed', e_2);
|
|
382
|
+
return [3 /*break*/, 19];
|
|
383
|
+
case 19: return [7 /*endfinally*/];
|
|
384
|
+
case 20: return [2 /*return*/, checks];
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}); };
|
|
388
|
+
/** Asserting wrapper, for standalone runs. */
|
|
389
|
+
export var mdb_sort_tests = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
390
|
+
var _a, _b;
|
|
391
|
+
return __generator(this, function (_c) {
|
|
392
|
+
switch (_c.label) {
|
|
393
|
+
case 0:
|
|
394
|
+
_a = assert_checks;
|
|
395
|
+
_b = ['mdbSort'];
|
|
396
|
+
return [4 /*yield*/, mdb_sort_checks()];
|
|
397
|
+
case 1:
|
|
398
|
+
_a.apply(void 0, _b.concat([_c.sent()]));
|
|
399
|
+
return [2 /*return*/];
|
|
400
|
+
}
|
|
336
401
|
});
|
|
402
|
+
}); };
|
|
403
|
+
/** Enrolls this suite in the auto-discovered parallel pool — see run_discovered_isolated_suites. */
|
|
404
|
+
export var ISOLATED_SUITE = {
|
|
405
|
+
name: 'mdbSort',
|
|
406
|
+
run: mdb_sort_checks,
|
|
337
407
|
};
|
|
338
408
|
// Allow running this test file independently
|
|
339
409
|
if (require.main === module) {
|
|
340
410
|
console.log("\uD83C\uDF10 Using API URL: ".concat(host));
|
|
341
|
-
|
|
342
|
-
var sdkNonAdmin_1 = new Session({ host: host });
|
|
343
|
-
var runTests = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
344
|
-
return __generator(this, function (_a) {
|
|
345
|
-
switch (_a.label) {
|
|
346
|
-
case 0: return [4 /*yield*/, setup_tests(sdk_1, sdkNonAdmin_1)];
|
|
347
|
-
case 1:
|
|
348
|
-
_a.sent();
|
|
349
|
-
return [4 /*yield*/, mdb_sort_tests({ sdk: sdk_1, sdkNonAdmin: sdkNonAdmin_1 })];
|
|
350
|
-
case 2:
|
|
351
|
-
_a.sent();
|
|
352
|
-
return [2 /*return*/];
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
}); };
|
|
356
|
-
runTests()
|
|
411
|
+
mdb_sort_tests()
|
|
357
412
|
.then(function () {
|
|
358
413
|
console.log("✅ mdbSort test suite completed successfully");
|
|
359
414
|
process.exit(0);
|