@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
|
@@ -108,23 +108,23 @@ var poll_for = function (get, done, attempts) {
|
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
110
|
var programs_checks = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
111
|
-
var checks, record, tenant, sdk_1, programsEnduser, createdPrograms, replacedPrograms, missingNameError, err_1, authToken, enduserSession, selfRead, selfUpdateError, err_2, afterSelfUpdate, ORDER_SOURCE_1, create_order_1, tags_after_order, orderMatching, orderNonMatching, orderNoPrograms, configuration, tags_after_reading, vitalMatching, vitalNonMatching, CONDITION_FIELD_1, tags_after_create, conditionMatching, conditionNonMatching, e_1;
|
|
112
|
-
var
|
|
113
|
-
return __generator(this, function (
|
|
114
|
-
switch (
|
|
111
|
+
var checks, record, tenant, sdk_1, programsEnduser, createdPrograms, replacedPrograms, missingNameError, err_1, authToken, enduserSession, selfRead, selfUpdateError, err_2, afterSelfUpdate, ORDER_SOURCE_1, create_order_1, tags_after_order, orderMatching, orderNonMatching, orderNoPrograms, configuration, tags_after_reading, vitalMatching, vitalNonMatching, CONDITION_FIELD_1, tags_after_create, conditionMatching, conditionNonMatching, MUTATION_FIELD_1, PROGRAM_1, save_trigger_error, unknownMatchKey, unknownValueKey, operatorKey, emptyMatch, emptyUpdate, unknownField, fire_mutation, programs_once_1, settled_enduser, addedId, added, duplicateId, afterDuplicate, updatedId, afterUpdate, clearedId, afterClear, clearedEntry, removedId, afterRemove, noMatchRemoveId, noMatchUpdateId, afterNoMatchRemove, afterNoMatchUpdate, alreadyDischargedId, afterAlreadyDischarged, fieldsChangedEnduser_1, fieldsChangedTags, emptiedEnduser_1, emptiedTags, _a, _b, _c, _d, _e, _f, cascadeId, afterCascade, fieldEqualsTags, feMatching, feNonMatching, BULK_SOURCE_1, BULK_PROGRAM_1, bulkEndusers, _g, bulkPrograms, e_1;
|
|
112
|
+
var _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
113
|
+
return __generator(this, function (_v) {
|
|
114
|
+
switch (_v.label) {
|
|
115
115
|
case 0:
|
|
116
116
|
checks = [];
|
|
117
117
|
record = function (label, pass, detail) { return checks.push({ label: label, pass: pass, detail: detail }); };
|
|
118
|
-
|
|
118
|
+
_v.label = 1;
|
|
119
119
|
case 1:
|
|
120
|
-
|
|
120
|
+
_v.trys.push([1, , 80, 85]);
|
|
121
121
|
return [4 /*yield*/, (0, setup_isolated_1.setup_isolated_tenant)({
|
|
122
122
|
name: "ProgramFilters ".concat(RAND()),
|
|
123
123
|
users: [{ isAdmin: true }],
|
|
124
124
|
apiKeys: 0,
|
|
125
125
|
})];
|
|
126
126
|
case 2:
|
|
127
|
-
tenant =
|
|
127
|
+
tenant = _v.sent();
|
|
128
128
|
sdk_1 = tenant.sdk;
|
|
129
129
|
return [4 /*yield*/, sdk_1.api.endusers.createOne({
|
|
130
130
|
fname: 'Programs',
|
|
@@ -137,10 +137,10 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
137
137
|
],
|
|
138
138
|
})];
|
|
139
139
|
case 3:
|
|
140
|
-
programsEnduser =
|
|
140
|
+
programsEnduser = _v.sent();
|
|
141
141
|
return [4 /*yield*/, sdk_1.api.endusers.getOne(programsEnduser.id)];
|
|
142
142
|
case 4:
|
|
143
|
-
createdPrograms = (
|
|
143
|
+
createdPrograms = (_v.sent()).programs;
|
|
144
144
|
record('F: Enduser.programs round-trips on create, with and without deviceIds / status', (createdPrograms === null || createdPrograms === void 0 ? void 0 : createdPrograms.length) === 2
|
|
145
145
|
&& createdPrograms[0].name === 'CHF'
|
|
146
146
|
&& JSON.stringify(createdPrograms[0].deviceIds) === JSON.stringify(['dev-a'])
|
|
@@ -150,53 +150,53 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
150
150
|
&& createdPrograms[1].status === undefined, "programs=".concat(JSON.stringify(createdPrograms)));
|
|
151
151
|
return [4 /*yield*/, sdk_1.api.endusers.updateOne(programsEnduser.id, { programs: [{ name: 'CHF', deviceIds: ['dev-a', 'dev-b'] }] }, { replaceObjectFields: true })];
|
|
152
152
|
case 5:
|
|
153
|
-
|
|
153
|
+
_v.sent();
|
|
154
154
|
return [4 /*yield*/, sdk_1.api.endusers.getOne(programsEnduser.id)];
|
|
155
155
|
case 6:
|
|
156
|
-
replacedPrograms = (
|
|
156
|
+
replacedPrograms = (_v.sent()).programs;
|
|
157
157
|
record('G: updating programs with replaceObjectFields replaces the whole list', (replacedPrograms === null || replacedPrograms === void 0 ? void 0 : replacedPrograms.length) === 1
|
|
158
158
|
&& replacedPrograms[0].name === 'CHF'
|
|
159
159
|
&& JSON.stringify(replacedPrograms[0].deviceIds) === JSON.stringify(['dev-a', 'dev-b']), "programs=".concat(JSON.stringify(replacedPrograms)));
|
|
160
160
|
missingNameError = '';
|
|
161
|
-
|
|
161
|
+
_v.label = 7;
|
|
162
162
|
case 7:
|
|
163
|
-
|
|
163
|
+
_v.trys.push([7, 9, , 10]);
|
|
164
164
|
return [4 /*yield*/, sdk_1.api.endusers.updateOne(programsEnduser.id, { programs: [{ deviceIds: ['dev-a'] }] })];
|
|
165
165
|
case 8:
|
|
166
|
-
|
|
166
|
+
_v.sent();
|
|
167
167
|
return [3 /*break*/, 10];
|
|
168
168
|
case 9:
|
|
169
|
-
err_1 =
|
|
170
|
-
missingNameError = (
|
|
169
|
+
err_1 = _v.sent();
|
|
170
|
+
missingNameError = (_h = err_1 === null || err_1 === void 0 ? void 0 : err_1.message) !== null && _h !== void 0 ? _h : String(err_1);
|
|
171
171
|
return [3 /*break*/, 10];
|
|
172
172
|
case 10:
|
|
173
173
|
record('H: a program entry without a name is rejected', missingNameError.includes('name'), "error=".concat(JSON.stringify(missingNameError) || '(none — the write was ACCEPTED)'));
|
|
174
174
|
return [4 /*yield*/, sdk_1.api.endusers.generate_auth_token({ id: programsEnduser.id })];
|
|
175
175
|
case 11:
|
|
176
|
-
authToken = (
|
|
176
|
+
authToken = (_v.sent()).authToken;
|
|
177
177
|
enduserSession = new enduser_1.EnduserSession({ host: host, authToken: authToken, businessId: tenant.businessId });
|
|
178
178
|
return [4 /*yield*/, enduserSession.refresh_session()];
|
|
179
179
|
case 12:
|
|
180
|
-
|
|
180
|
+
_v.sent();
|
|
181
181
|
return [4 /*yield*/, enduserSession.api.endusers.getOne(programsEnduser.id)];
|
|
182
182
|
case 13:
|
|
183
|
-
selfRead =
|
|
183
|
+
selfRead = _v.sent();
|
|
184
184
|
record('I: Enduser.programs is redacted from the enduser\'s own read of their record', selfRead.programs === undefined, "enduser-session programs=".concat(JSON.stringify(selfRead.programs)));
|
|
185
185
|
selfUpdateError = '';
|
|
186
|
-
|
|
186
|
+
_v.label = 14;
|
|
187
187
|
case 14:
|
|
188
|
-
|
|
188
|
+
_v.trys.push([14, 16, , 17]);
|
|
189
189
|
return [4 /*yield*/, enduserSession.api.endusers.updateOne(programsEnduser.id, { programs: [{ name: 'Self Assigned' }] })];
|
|
190
190
|
case 15:
|
|
191
|
-
|
|
191
|
+
_v.sent();
|
|
192
192
|
return [3 /*break*/, 17];
|
|
193
193
|
case 16:
|
|
194
|
-
err_2 =
|
|
195
|
-
selfUpdateError = (
|
|
194
|
+
err_2 = _v.sent();
|
|
195
|
+
selfUpdateError = (_j = err_2 === null || err_2 === void 0 ? void 0 : err_2.message) !== null && _j !== void 0 ? _j : String(err_2);
|
|
196
196
|
return [3 /*break*/, 17];
|
|
197
197
|
case 17: return [4 /*yield*/, sdk_1.api.endusers.getOne(programsEnduser.id)];
|
|
198
198
|
case 18:
|
|
199
|
-
afterSelfUpdate = (
|
|
199
|
+
afterSelfUpdate = (_v.sent()).programs;
|
|
200
200
|
record('J: an enduser cannot update their own programs', selfUpdateError.includes('cannot be updated by endusers')
|
|
201
201
|
&& (afterSelfUpdate === null || afterSelfUpdate === void 0 ? void 0 : afterSelfUpdate.length) === 1 && afterSelfUpdate[0].name === 'CHF', "error=".concat(JSON.stringify(selfUpdateError) || '(none — the write was ACCEPTED)')
|
|
202
202
|
+ " programs=".concat(JSON.stringify(afterSelfUpdate)));
|
|
@@ -210,7 +210,7 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
210
210
|
// no programs filter — the shape of every trigger that exists today; must match regardless
|
|
211
211
|
];
|
|
212
212
|
case 19:
|
|
213
|
-
|
|
213
|
+
_v.sent();
|
|
214
214
|
// no programs filter — the shape of every trigger that exists today; must match regardless
|
|
215
215
|
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
216
216
|
event: { type: 'Order Status Equals', info: { source: ORDER_SOURCE_1, status: 'shipped' } },
|
|
@@ -220,7 +220,7 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
220
220
|
})];
|
|
221
221
|
case 20:
|
|
222
222
|
// no programs filter — the shape of every trigger that exists today; must match regardless
|
|
223
|
-
|
|
223
|
+
_v.sent();
|
|
224
224
|
create_order_1 = function (enduserId, programs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
225
225
|
return __generator(this, function (_a) {
|
|
226
226
|
return [2 /*return*/, (sdk_1.api.enduser_orders.createOne(__assign({ enduserId: enduserId, source: ORDER_SOURCE_1, externalId: "ext-".concat(RAND()), title: 'Program filter order', status: 'shipped' }, (programs ? { programs: programs } : {}))))];
|
|
@@ -248,15 +248,15 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
248
248
|
}); };
|
|
249
249
|
return [4 /*yield*/, tags_after_order([{ name: 'CHF' }])];
|
|
250
250
|
case 21:
|
|
251
|
-
orderMatching =
|
|
251
|
+
orderMatching = _v.sent();
|
|
252
252
|
record('A: Order Status Equals with programs=[CHF] fires for an order in program CHF', orderMatching.includes('order-chf') && orderMatching.includes('order-any'), "tags=".concat(JSON.stringify(orderMatching)));
|
|
253
253
|
return [4 /*yield*/, tags_after_order([{ name: 'Diabetes' }])];
|
|
254
254
|
case 22:
|
|
255
|
-
orderNonMatching =
|
|
255
|
+
orderNonMatching = _v.sent();
|
|
256
256
|
record('B: Order Status Equals with programs=[CHF] does NOT fire for an order in program Diabetes', !orderNonMatching.includes('order-chf') && orderNonMatching.includes('order-any'), "tags=".concat(JSON.stringify(orderNonMatching)));
|
|
257
257
|
return [4 /*yield*/, tags_after_order(undefined)];
|
|
258
258
|
case 23:
|
|
259
|
-
orderNoPrograms =
|
|
259
|
+
orderNoPrograms = _v.sent();
|
|
260
260
|
record('C: Order Status Equals with programs=[CHF] does NOT fire for an order with no programs,'
|
|
261
261
|
+ ' while the unfiltered trigger still does (back-compat)', !orderNoPrograms.includes('order-chf') && orderNoPrograms.includes('order-any'), "tags=".concat(JSON.stringify(orderNoPrograms)));
|
|
262
262
|
return [4 /*yield*/, sdk_1.api.vital_configurations.createOne({
|
|
@@ -270,7 +270,7 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
270
270
|
],
|
|
271
271
|
})];
|
|
272
272
|
case 24:
|
|
273
|
-
configuration =
|
|
273
|
+
configuration = _v.sent();
|
|
274
274
|
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
275
275
|
event: {
|
|
276
276
|
type: 'Vital Update',
|
|
@@ -281,7 +281,7 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
281
281
|
title: "Vital programs=[CHF] ".concat(RAND()),
|
|
282
282
|
})];
|
|
283
283
|
case 25:
|
|
284
|
-
|
|
284
|
+
_v.sent();
|
|
285
285
|
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
286
286
|
event: {
|
|
287
287
|
type: 'Vital Update',
|
|
@@ -292,7 +292,7 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
292
292
|
title: "Vital programs unset ".concat(RAND()),
|
|
293
293
|
})];
|
|
294
294
|
case 26:
|
|
295
|
-
|
|
295
|
+
_v.sent();
|
|
296
296
|
tags_after_reading = function (programs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
297
297
|
var enduser, after;
|
|
298
298
|
var _a;
|
|
@@ -313,11 +313,11 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
313
313
|
}); };
|
|
314
314
|
return [4 /*yield*/, tags_after_reading([{ name: 'CHF' }])];
|
|
315
315
|
case 27:
|
|
316
|
-
vitalMatching =
|
|
316
|
+
vitalMatching = _v.sent();
|
|
317
317
|
record('D: Vital Update with programs=[CHF] fires for a reading in program CHF', vitalMatching.includes('vital-chf') && vitalMatching.includes('vital-any'), "tags=".concat(JSON.stringify(vitalMatching)));
|
|
318
318
|
return [4 /*yield*/, tags_after_reading([{ name: 'Diabetes' }])];
|
|
319
319
|
case 28:
|
|
320
|
-
vitalNonMatching =
|
|
320
|
+
vitalNonMatching = _v.sent();
|
|
321
321
|
record('E: Vital Update with programs=[CHF] does NOT fire for a reading in program Diabetes,'
|
|
322
322
|
+ ' while the unfiltered trigger still does (back-compat)', !vitalNonMatching.includes('vital-chf') && vitalNonMatching.includes('vital-any'), "tags=".concat(JSON.stringify(vitalNonMatching)));
|
|
323
323
|
CONDITION_FIELD_1 = "ProgramConditionKey".concat(RAND());
|
|
@@ -331,7 +331,7 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
331
331
|
// the same event with no enduserCondition — the barrier that makes an absence above meaningful
|
|
332
332
|
];
|
|
333
333
|
case 29:
|
|
334
|
-
|
|
334
|
+
_v.sent();
|
|
335
335
|
// the same event with no enduserCondition — the barrier that makes an absence above meaningful
|
|
336
336
|
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
337
337
|
event: { type: 'Field Equals', info: { field: CONDITION_FIELD_1, value: 'go' } },
|
|
@@ -346,7 +346,7 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
346
346
|
];
|
|
347
347
|
case 30:
|
|
348
348
|
// the same event with no enduserCondition — the barrier that makes an absence above meaningful
|
|
349
|
-
|
|
349
|
+
_v.sent();
|
|
350
350
|
tags_after_create = function (programs, waitFor) { return __awaiter(void 0, void 0, void 0, function () {
|
|
351
351
|
var enduser, after;
|
|
352
352
|
var _a;
|
|
@@ -365,29 +365,396 @@ var programs_checks = function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
365
365
|
}); };
|
|
366
366
|
return [4 /*yield*/, tags_after_create([{ name: 'CHF', status: 'active' }], 'condition-chf')];
|
|
367
367
|
case 31:
|
|
368
|
-
conditionMatching =
|
|
368
|
+
conditionMatching = _v.sent();
|
|
369
369
|
record('K: a trigger with a Programs Is In CHF enduserCondition fires for a patient in program CHF', conditionMatching.includes('condition-chf') && conditionMatching.includes('condition-any'), "tags=".concat(JSON.stringify(conditionMatching)));
|
|
370
370
|
return [4 /*yield*/, tags_after_create(undefined, 'condition-any')];
|
|
371
371
|
case 32:
|
|
372
|
-
conditionNonMatching =
|
|
372
|
+
conditionNonMatching = _v.sent();
|
|
373
373
|
record('L: the same trigger does NOT fire for a patient with no programs,'
|
|
374
374
|
+ ' while the unconditioned trigger still does', !conditionNonMatching.includes('condition-chf') && conditionNonMatching.includes('condition-any'), "tags=".concat(JSON.stringify(conditionNonMatching)));
|
|
375
|
-
|
|
375
|
+
MUTATION_FIELD_1 = "ProgramMutation".concat(RAND());
|
|
376
|
+
PROGRAM_1 = 'CHF';
|
|
377
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
378
|
+
event: { type: 'Field Equals', info: { field: MUTATION_FIELD_1, value: '$exists' } },
|
|
379
|
+
action: { type: 'Add Tags', info: { tags: ['mutation-any'] } },
|
|
380
|
+
status: 'Active',
|
|
381
|
+
title: "Mutation barrier ".concat(RAND()),
|
|
382
|
+
})];
|
|
376
383
|
case 33:
|
|
377
|
-
|
|
378
|
-
|
|
384
|
+
_v.sent();
|
|
385
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
386
|
+
event: { type: 'Field Equals', info: { field: MUTATION_FIELD_1, value: 'add' } },
|
|
387
|
+
action: { type: 'Add List Item', info: { field: 'programs', match: { name: PROGRAM_1 }, values: { status: 'Active' } } },
|
|
388
|
+
status: 'Active',
|
|
389
|
+
title: "Add List Item ".concat(RAND()),
|
|
390
|
+
})];
|
|
379
391
|
case 34:
|
|
380
|
-
|
|
381
|
-
return [4 /*yield*/,
|
|
392
|
+
_v.sent();
|
|
393
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
394
|
+
event: { type: 'Field Equals', info: { field: MUTATION_FIELD_1, value: 'status' } },
|
|
395
|
+
action: { type: 'Update List Item', info: { field: 'programs', match: { name: PROGRAM_1 }, values: { status: 'Discharged' } } },
|
|
396
|
+
status: 'Active',
|
|
397
|
+
title: "Update List Item ".concat(RAND()),
|
|
398
|
+
})];
|
|
382
399
|
case 35:
|
|
383
|
-
|
|
384
|
-
return [
|
|
400
|
+
_v.sent();
|
|
401
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
402
|
+
// a BLANK value clears that sub-field, rather than being a no-op — the $unset half of the action
|
|
403
|
+
event: { type: 'Field Equals', info: { field: MUTATION_FIELD_1, value: 'clear' } },
|
|
404
|
+
action: { type: 'Update List Item', info: { field: 'programs', match: { name: PROGRAM_1 }, values: { status: '' } } },
|
|
405
|
+
status: 'Active',
|
|
406
|
+
title: "Clear List Item status ".concat(RAND()),
|
|
407
|
+
})];
|
|
385
408
|
case 36:
|
|
386
|
-
|
|
409
|
+
_v.sent();
|
|
410
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
411
|
+
event: { type: 'Field Equals', info: { field: MUTATION_FIELD_1, value: 'remove' } },
|
|
412
|
+
action: { type: 'Remove List Item', info: { field: 'programs', match: { name: PROGRAM_1 } } },
|
|
413
|
+
status: 'Active',
|
|
414
|
+
title: "Remove List Item ".concat(RAND()),
|
|
415
|
+
})
|
|
416
|
+
/**
|
|
417
|
+
* The sub-fields a mutation may touch are ENDUSER_LIST_FIELD_CONFIG's, checked when the trigger is
|
|
418
|
+
* SAVED (an automation_triggers constraint, sharing list_item_mutation_error with the editor).
|
|
419
|
+
*
|
|
420
|
+
* Rejecting here rather than at fire time is the point: an accepted-but-ignored key leaves a
|
|
421
|
+
* trigger that looks configured and silently never does what it says. It is also what keeps a
|
|
422
|
+
* `$`-prefixed or dotted key out of the Mongo paths the action builds from these keys.
|
|
423
|
+
*/
|
|
424
|
+
];
|
|
425
|
+
case 37:
|
|
426
|
+
_v.sent();
|
|
427
|
+
save_trigger_error = function (action) { return __awaiter(void 0, void 0, void 0, function () {
|
|
428
|
+
var created, err_3;
|
|
429
|
+
var _a;
|
|
430
|
+
return __generator(this, function (_b) {
|
|
431
|
+
switch (_b.label) {
|
|
432
|
+
case 0:
|
|
433
|
+
_b.trys.push([0, 3, , 4]);
|
|
434
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
435
|
+
event: { type: 'Field Equals', info: { field: "Never".concat(RAND()), value: 'never' } },
|
|
436
|
+
action: action,
|
|
437
|
+
status: 'Inactive', title: "Rejected ".concat(RAND()),
|
|
438
|
+
})
|
|
439
|
+
// it saved; leave nothing behind for the later checks to trip over
|
|
440
|
+
];
|
|
441
|
+
case 1:
|
|
442
|
+
created = _b.sent();
|
|
443
|
+
// it saved; leave nothing behind for the later checks to trip over
|
|
444
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.deleteOne(created.id)];
|
|
445
|
+
case 2:
|
|
446
|
+
// it saved; leave nothing behind for the later checks to trip over
|
|
447
|
+
_b.sent();
|
|
448
|
+
return [2 /*return*/, ''];
|
|
449
|
+
case 3:
|
|
450
|
+
err_3 = _b.sent();
|
|
451
|
+
return [2 /*return*/, (_a = err_3 === null || err_3 === void 0 ? void 0 : err_3.message) !== null && _a !== void 0 ? _a : String(err_3)];
|
|
452
|
+
case 4: return [2 /*return*/];
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
}); };
|
|
456
|
+
return [4 /*yield*/, save_trigger_error({
|
|
457
|
+
type: 'Add List Item', info: { field: 'programs', match: { title: PROGRAM_1 } },
|
|
458
|
+
})];
|
|
459
|
+
case 38:
|
|
460
|
+
unknownMatchKey = _v.sent();
|
|
461
|
+
return [4 /*yield*/, save_trigger_error({
|
|
462
|
+
type: 'Update List Item', info: { field: 'programs', match: { name: PROGRAM_1 }, values: { deviceIds: 'x' } },
|
|
463
|
+
})];
|
|
464
|
+
case 39:
|
|
465
|
+
unknownValueKey = _v.sent();
|
|
466
|
+
return [4 /*yield*/, save_trigger_error({
|
|
467
|
+
type: 'Add List Item', info: { field: 'programs', match: { '$where': PROGRAM_1 } },
|
|
468
|
+
})];
|
|
469
|
+
case 40:
|
|
470
|
+
operatorKey = _v.sent();
|
|
471
|
+
return [4 /*yield*/, save_trigger_error({
|
|
472
|
+
type: 'Remove List Item', info: { field: 'programs', match: {} },
|
|
473
|
+
})];
|
|
474
|
+
case 41:
|
|
475
|
+
emptyMatch = _v.sent();
|
|
476
|
+
return [4 /*yield*/, save_trigger_error({
|
|
477
|
+
type: 'Update List Item', info: { field: 'programs', match: { name: PROGRAM_1 }, values: {} },
|
|
478
|
+
})];
|
|
479
|
+
case 42:
|
|
480
|
+
emptyUpdate = _v.sent();
|
|
481
|
+
return [4 /*yield*/, save_trigger_error({
|
|
482
|
+
type: 'Add List Item', info: { field: 'diagnoses', match: { code: 'I50' } },
|
|
483
|
+
})];
|
|
484
|
+
case 43:
|
|
485
|
+
unknownField = _v.sent();
|
|
486
|
+
record('Y: a list mutation naming a sub-field (or field) outside the registry is rejected ON SAVE,'
|
|
487
|
+
+ ' naming the offending key',
|
|
488
|
+
// the message, not merely "an error": the point of sharing list_item_mutation_error with the
|
|
489
|
+
// editor is that both reject the same action with the same wording, and a rejection for some
|
|
490
|
+
// unrelated reason would pass a non-empty check while proving nothing
|
|
491
|
+
unknownMatchKey.includes('title') && unknownValueKey.includes('deviceIds')
|
|
492
|
+
&& operatorKey.includes('$where') && unknownField.includes('diagnoses'), "match=".concat(JSON.stringify(unknownMatchKey), " values=").concat(JSON.stringify(unknownValueKey))
|
|
493
|
+
+ " operator=".concat(JSON.stringify(operatorKey), " field=").concat(JSON.stringify(unknownField)));
|
|
494
|
+
record('Z: a list mutation that matches nothing, or an Update that sets nothing, is rejected ON SAVE', !!emptyMatch && !!emptyUpdate, "emptyMatch=".concat(JSON.stringify(emptyMatch), " emptyUpdate=").concat(JSON.stringify(emptyUpdate)));
|
|
495
|
+
fire_mutation = function (value, programs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
496
|
+
var enduser;
|
|
497
|
+
var _a;
|
|
498
|
+
return __generator(this, function (_b) {
|
|
499
|
+
switch (_b.label) {
|
|
500
|
+
case 0: return [4 /*yield*/, sdk_1.api.endusers.createOne(__assign({ fname: 'Programs', lname: 'Mutation' }, (programs ? { programs: programs } : {})))
|
|
501
|
+
// an UPDATE, not a create: the mutation actions are reached through the update path, and Field
|
|
502
|
+
// Equals on programs (below) is update-only
|
|
503
|
+
];
|
|
504
|
+
case 1:
|
|
505
|
+
enduser = _b.sent();
|
|
506
|
+
// an UPDATE, not a create: the mutation actions are reached through the update path, and Field
|
|
507
|
+
// Equals on programs (below) is update-only
|
|
508
|
+
return [4 /*yield*/, sdk_1.api.endusers.updateOne(enduser.id, { fields: (_a = {}, _a[MUTATION_FIELD_1] = value, _a) })];
|
|
509
|
+
case 2:
|
|
510
|
+
// an UPDATE, not a create: the mutation actions are reached through the update path, and Field
|
|
511
|
+
// Equals on programs (below) is update-only
|
|
512
|
+
_b.sent();
|
|
513
|
+
return [2 /*return*/, enduser.id];
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
}); };
|
|
517
|
+
programs_once_1 = function (id, done, attempts) { return __awaiter(void 0, void 0, void 0, function () {
|
|
518
|
+
var _a;
|
|
519
|
+
return __generator(this, function (_b) {
|
|
520
|
+
switch (_b.label) {
|
|
521
|
+
case 0: return [4 /*yield*/, poll_for(function () { return sdk_1.api.endusers.getOne(id); }, function (e) { var _a; return done((_a = e.programs) !== null && _a !== void 0 ? _a : []); }, attempts)];
|
|
522
|
+
case 1: return [2 /*return*/, ((_a = (_b.sent()).programs) !== null && _a !== void 0 ? _a : [])
|
|
523
|
+
/**
|
|
524
|
+
* For the checks that assert NOTHING changed. The barrier tag proves trigger processing happened for
|
|
525
|
+
* this patient, but the barrier and the mutation are two triggers dispatched from one loop in
|
|
526
|
+
* whatever order the trigger page came back in, so the tag alone does not prove the mutation already
|
|
527
|
+
* ran. The extra settle closes that window; the positive checks need none of this, since they poll
|
|
528
|
+
* for their own effect.
|
|
529
|
+
*/
|
|
530
|
+
];
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
}); };
|
|
534
|
+
settled_enduser = function (id) { return __awaiter(void 0, void 0, void 0, function () {
|
|
535
|
+
return __generator(this, function (_a) {
|
|
536
|
+
switch (_a.label) {
|
|
537
|
+
case 0: return [4 /*yield*/, poll_for(function () { return sdk_1.api.endusers.getOne(id); }, function (e) { var _a; return !!((_a = e.tags) === null || _a === void 0 ? void 0 : _a.includes('mutation-any')); })];
|
|
538
|
+
case 1:
|
|
539
|
+
_a.sent();
|
|
540
|
+
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 2000); })];
|
|
541
|
+
case 2:
|
|
542
|
+
_a.sent();
|
|
543
|
+
return [2 /*return*/, sdk_1.api.endusers.getOne(id)];
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}); };
|
|
547
|
+
return [4 /*yield*/, fire_mutation('add')];
|
|
548
|
+
case 44:
|
|
549
|
+
addedId = _v.sent();
|
|
550
|
+
return [4 /*yield*/, programs_once_1(addedId, function (p) { return p.length > 0; })];
|
|
551
|
+
case 45:
|
|
552
|
+
added = _v.sent();
|
|
553
|
+
record('M: Add List Item adds the configured program, with the status the action carries', added.length === 1 && added[0].name === PROGRAM_1 && added[0].status === 'Active', "programs=".concat(JSON.stringify(added)));
|
|
554
|
+
return [4 /*yield*/, fire_mutation('add', [{ name: PROGRAM_1, status: 'Discharged' }])];
|
|
555
|
+
case 46:
|
|
556
|
+
duplicateId = _v.sent();
|
|
557
|
+
return [4 /*yield*/, settled_enduser(duplicateId)];
|
|
558
|
+
case 47:
|
|
559
|
+
afterDuplicate = (_k = (_v.sent()).programs) !== null && _k !== void 0 ? _k : [];
|
|
560
|
+
record('N: Add List Item no-ops when the patient is already in that program, and does NOT reset its status', afterDuplicate.length === 1
|
|
561
|
+
&& afterDuplicate[0].name === PROGRAM_1 && afterDuplicate[0].status === 'Discharged', "programs=".concat(JSON.stringify(afterDuplicate)));
|
|
562
|
+
return [4 /*yield*/, fire_mutation('status', [
|
|
563
|
+
{ name: PROGRAM_1, status: 'Active' }, { name: 'Diabetes', status: 'Active' }, { name: PROGRAM_1 },
|
|
564
|
+
])];
|
|
565
|
+
case 48:
|
|
566
|
+
updatedId = _v.sent();
|
|
567
|
+
return [4 /*yield*/, programs_once_1(updatedId, function (p) { return p.filter(function (x) { return x.name === PROGRAM_1 && x.status === 'Discharged'; }).length === 2; })];
|
|
568
|
+
case 49:
|
|
569
|
+
afterUpdate = _v.sent();
|
|
570
|
+
record('O: Update List Item sets the status on EVERY entry with that name, and on no other entry', afterUpdate.length === 3
|
|
571
|
+
&& afterUpdate.filter(function (p) { return p.name === PROGRAM_1 && p.status === 'Discharged'; }).length === 2
|
|
572
|
+
&& ((_l = afterUpdate.find(function (p) { return p.name === 'Diabetes'; })) === null || _l === void 0 ? void 0 : _l.status) === 'Active', "programs=".concat(JSON.stringify(afterUpdate)));
|
|
573
|
+
return [4 /*yield*/, fire_mutation('clear', [
|
|
574
|
+
{ name: PROGRAM_1, status: 'Active' }, { name: 'Diabetes', status: 'Active' },
|
|
575
|
+
])];
|
|
576
|
+
case 50:
|
|
577
|
+
clearedId = _v.sent();
|
|
578
|
+
return [4 /*yield*/, programs_once_1(clearedId, function (p) { return p.some(function (x) { return x.name === PROGRAM_1 && x.status === undefined; }); })];
|
|
579
|
+
case 51:
|
|
580
|
+
afterClear = _v.sent();
|
|
581
|
+
clearedEntry = afterClear.find(function (p) { return p.name === PROGRAM_1; });
|
|
582
|
+
record('AA: Update List Item with a blank value CLEARS that sub-field, leaving no key behind', afterClear.length === 2
|
|
583
|
+
&& !!clearedEntry && !('status' in clearedEntry)
|
|
584
|
+
&& ((_m = afterClear.find(function (p) { return p.name === 'Diabetes'; })) === null || _m === void 0 ? void 0 : _m.status) === 'Active', "programs=".concat(JSON.stringify(afterClear))
|
|
585
|
+
+ " keys=".concat(JSON.stringify(Object.keys(clearedEntry !== null && clearedEntry !== void 0 ? clearedEntry : {}))));
|
|
586
|
+
return [4 /*yield*/, fire_mutation('remove', [
|
|
587
|
+
{ name: PROGRAM_1 }, { name: 'Diabetes', status: 'Active' }, { name: PROGRAM_1, status: 'Active' },
|
|
588
|
+
])];
|
|
589
|
+
case 52:
|
|
590
|
+
removedId = _v.sent();
|
|
591
|
+
return [4 /*yield*/, programs_once_1(removedId, function (p) { return !p.some(function (x) { return x.name === PROGRAM_1; }); })];
|
|
592
|
+
case 53:
|
|
593
|
+
afterRemove = _v.sent();
|
|
594
|
+
record('P: Remove List Item removes EVERY entry with that name, whatever status they hold, and nothing else', afterRemove.length === 1 && afterRemove[0].name === 'Diabetes' && afterRemove[0].status === 'Active', "programs=".concat(JSON.stringify(afterRemove)));
|
|
595
|
+
return [4 /*yield*/, fire_mutation('remove', [{ name: 'Diabetes', status: 'Active' }])];
|
|
596
|
+
case 54:
|
|
597
|
+
noMatchRemoveId = _v.sent();
|
|
598
|
+
return [4 /*yield*/, fire_mutation('status', [{ name: 'Diabetes', status: 'Active' }])];
|
|
599
|
+
case 55:
|
|
600
|
+
noMatchUpdateId = _v.sent();
|
|
601
|
+
return [4 /*yield*/, settled_enduser(noMatchRemoveId)];
|
|
602
|
+
case 56:
|
|
603
|
+
afterNoMatchRemove = (_o = (_v.sent()).programs) !== null && _o !== void 0 ? _o : [];
|
|
604
|
+
return [4 /*yield*/, settled_enduser(noMatchUpdateId)];
|
|
605
|
+
case 57:
|
|
606
|
+
afterNoMatchUpdate = (_p = (_v.sent()).programs) !== null && _p !== void 0 ? _p : [];
|
|
607
|
+
record('Q: Remove and Update List Item both no-op when no entry carries that name', JSON.stringify(afterNoMatchRemove) === JSON.stringify([{ name: 'Diabetes', status: 'Active' }])
|
|
608
|
+
&& JSON.stringify(afterNoMatchUpdate) === JSON.stringify([{ name: 'Diabetes', status: 'Active' }]), "afterRemove=".concat(JSON.stringify(afterNoMatchRemove), " afterUpdate=").concat(JSON.stringify(afterNoMatchUpdate)));
|
|
609
|
+
return [4 /*yield*/, fire_mutation('status', [{ name: PROGRAM_1, status: 'Discharged' }])];
|
|
610
|
+
case 58:
|
|
611
|
+
alreadyDischargedId = _v.sent();
|
|
612
|
+
return [4 /*yield*/, settled_enduser(alreadyDischargedId)];
|
|
613
|
+
case 59:
|
|
614
|
+
afterAlreadyDischarged = (_q = (_v.sent()).programs) !== null && _q !== void 0 ? _q : [];
|
|
615
|
+
record('X: Update List Item leaves an entry alone when it already carries the target status', JSON.stringify(afterAlreadyDischarged) === JSON.stringify([{ name: PROGRAM_1, status: 'Discharged' }]), "programs=".concat(JSON.stringify(afterAlreadyDischarged)));
|
|
616
|
+
/* ============ Fields Changed on programs, and the no-cascade rule ============ */
|
|
617
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
618
|
+
event: { type: 'Fields Changed', info: { fields: ['programs'] } },
|
|
619
|
+
action: { type: 'Add Tags', info: { tags: ['programs-fc'] } },
|
|
620
|
+
status: 'Active',
|
|
621
|
+
title: "Fields Changed programs ".concat(RAND()),
|
|
622
|
+
})];
|
|
623
|
+
case 60:
|
|
624
|
+
/* ============ Fields Changed on programs, and the no-cascade rule ============ */
|
|
625
|
+
_v.sent();
|
|
626
|
+
return [4 /*yield*/, sdk_1.api.endusers.createOne({ fname: 'Programs', lname: 'Changed' })];
|
|
627
|
+
case 61:
|
|
628
|
+
fieldsChangedEnduser_1 = _v.sent();
|
|
629
|
+
return [4 /*yield*/, sdk_1.api.endusers.updateOne(fieldsChangedEnduser_1.id, { programs: [{ name: PROGRAM_1 }] }, { replaceObjectFields: true })];
|
|
630
|
+
case 62:
|
|
631
|
+
_v.sent();
|
|
632
|
+
return [4 /*yield*/, poll_for(function () { return sdk_1.api.endusers.getOne(fieldsChangedEnduser_1.id); }, function (e) { var _a; return !!((_a = e.tags) === null || _a === void 0 ? void 0 : _a.includes('programs-fc')); })];
|
|
633
|
+
case 63:
|
|
634
|
+
fieldsChangedTags = (_r = (_v.sent()).tags) !== null && _r !== void 0 ? _r : [];
|
|
635
|
+
record('R: a Fields Changed trigger on programs fires for a direct staff/API write', fieldsChangedTags.includes('programs-fc'), "tags=".concat(JSON.stringify(fieldsChangedTags)));
|
|
636
|
+
return [4 /*yield*/, sdk_1.api.endusers.createOne({
|
|
637
|
+
fname: 'Programs', lname: 'Emptied', programs: [{ name: PROGRAM_1, status: 'Active' }],
|
|
638
|
+
})];
|
|
639
|
+
case 64:
|
|
640
|
+
emptiedEnduser_1 = _v.sent();
|
|
641
|
+
return [4 /*yield*/, sdk_1.api.endusers.updateOne(emptiedEnduser_1.id, { programs: [] }, { replaceObjectFields: true })];
|
|
642
|
+
case 65:
|
|
643
|
+
_v.sent();
|
|
644
|
+
return [4 /*yield*/, poll_for(function () { return sdk_1.api.endusers.getOne(emptiedEnduser_1.id); }, function (e) { var _a; return !!((_a = e.tags) === null || _a === void 0 ? void 0 : _a.includes('programs-fc')); })];
|
|
645
|
+
case 66:
|
|
646
|
+
emptiedTags = (_s = (_v.sent()).tags) !== null && _s !== void 0 ? _s : [];
|
|
647
|
+
_a = record;
|
|
648
|
+
_b = ['W: a Fields Changed trigger on programs still fires when the patient\'s LAST program is removed',
|
|
649
|
+
emptiedTags.includes('programs-fc')];
|
|
650
|
+
_c = "tags=".concat(JSON.stringify(emptiedTags));
|
|
651
|
+
_d = " programs=".concat;
|
|
652
|
+
_f = (_e = JSON).stringify;
|
|
653
|
+
return [4 /*yield*/, sdk_1.api.endusers.getOne(emptiedEnduser_1.id)];
|
|
654
|
+
case 67:
|
|
655
|
+
_a.apply(void 0, _b.concat([_c + _d.apply(" programs=", [_f.apply(_e, [(_v.sent()).programs])])]));
|
|
656
|
+
return [4 /*yield*/, fire_mutation('add')];
|
|
657
|
+
case 68:
|
|
658
|
+
cascadeId = _v.sent();
|
|
659
|
+
return [4 /*yield*/, programs_once_1(cascadeId, function (p) { return p.some(function (x) { return x.name === PROGRAM_1; }); })]; // the trigger's write landed
|
|
660
|
+
case 69:
|
|
661
|
+
_v.sent(); // the trigger's write landed
|
|
662
|
+
return [4 /*yield*/, settled_enduser(cascadeId)];
|
|
663
|
+
case 70:
|
|
664
|
+
afterCascade = _v.sent();
|
|
665
|
+
record('S: a program written by a trigger does NOT re-fire programs automations (no cascade),'
|
|
666
|
+
+ ' while trigger processing demonstrably ran for this patient', !((_t = afterCascade.tags) === null || _t === void 0 ? void 0 : _t.includes('programs-fc')) && !!((_u = afterCascade.tags) === null || _u === void 0 ? void 0 : _u.includes('mutation-any')), "tags=".concat(JSON.stringify(afterCascade.tags), " programs=").concat(JSON.stringify(afterCascade.programs)));
|
|
667
|
+
/* ============ Field Equals on programs ============ */
|
|
668
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
669
|
+
event: { type: 'Field Equals', info: { field: 'programs', value: PROGRAM_1 } },
|
|
670
|
+
action: { type: 'Add Tags', info: { tags: ['programs-fe'] } },
|
|
671
|
+
status: 'Active',
|
|
672
|
+
title: "Field Equals programs ".concat(RAND()),
|
|
673
|
+
})];
|
|
674
|
+
case 71:
|
|
675
|
+
/* ============ Field Equals on programs ============ */
|
|
676
|
+
_v.sent();
|
|
677
|
+
fieldEqualsTags = function (programs, waitFor) { return __awaiter(void 0, void 0, void 0, function () {
|
|
678
|
+
var enduser, after;
|
|
679
|
+
var _a;
|
|
680
|
+
return __generator(this, function (_b) {
|
|
681
|
+
switch (_b.label) {
|
|
682
|
+
case 0: return [4 /*yield*/, sdk_1.api.endusers.createOne({ fname: 'Programs', lname: 'FieldEquals' })];
|
|
683
|
+
case 1:
|
|
684
|
+
enduser = _b.sent();
|
|
685
|
+
return [4 /*yield*/, sdk_1.api.endusers.updateOne(enduser.id, { programs: programs }, { replaceObjectFields: true })];
|
|
686
|
+
case 2:
|
|
687
|
+
_b.sent();
|
|
688
|
+
return [4 /*yield*/, poll_for(function () { return sdk_1.api.endusers.getOne(enduser.id); }, function (e) { var _a; return !!((_a = e.tags) === null || _a === void 0 ? void 0 : _a.includes(waitFor)); })];
|
|
689
|
+
case 3:
|
|
690
|
+
after = _b.sent();
|
|
691
|
+
return [2 /*return*/, (_a = after.tags) !== null && _a !== void 0 ? _a : []];
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
}); };
|
|
695
|
+
return [4 /*yield*/, fieldEqualsTags([{ name: PROGRAM_1, status: 'Active' }], 'programs-fe')];
|
|
696
|
+
case 72:
|
|
697
|
+
feMatching = _v.sent();
|
|
698
|
+
record('T: Field Equals on programs fires for a patient put into a program of that name', feMatching.includes('programs-fe'), "tags=".concat(JSON.stringify(feMatching)));
|
|
699
|
+
return [4 /*yield*/, fieldEqualsTags([{ name: 'Diabetes' }], 'programs-fc')];
|
|
700
|
+
case 73:
|
|
701
|
+
feNonMatching = _v.sent();
|
|
702
|
+
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 2000); })];
|
|
703
|
+
case 74:
|
|
704
|
+
_v.sent();
|
|
705
|
+
record('U: Field Equals on programs does NOT fire for a different program name,'
|
|
706
|
+
+ ' while the Fields Changed trigger on the same write still does', !feNonMatching.includes('programs-fe') && feNonMatching.includes('programs-fc'), "tags=".concat(JSON.stringify(feNonMatching)));
|
|
707
|
+
BULK_SOURCE_1 = "ProgramBulkSource".concat(RAND());
|
|
708
|
+
BULK_PROGRAM_1 = 'Bulk Program';
|
|
709
|
+
return [4 /*yield*/, sdk_1.api.automation_triggers.createOne({
|
|
710
|
+
event: { type: 'Order Status Equals', info: { source: BULK_SOURCE_1, status: 'shipped' } },
|
|
711
|
+
action: { type: 'Add List Item', info: { field: 'programs', match: { name: BULK_PROGRAM_1 } } },
|
|
712
|
+
status: 'Active',
|
|
713
|
+
title: "Bulk Add List Item ".concat(RAND()),
|
|
714
|
+
})];
|
|
715
|
+
case 75:
|
|
716
|
+
_v.sent();
|
|
717
|
+
return [4 /*yield*/, sdk_1.api.endusers.createOne({ fname: 'Programs', lname: 'BulkA' })];
|
|
718
|
+
case 76:
|
|
719
|
+
_g = [
|
|
720
|
+
_v.sent()
|
|
721
|
+
];
|
|
722
|
+
return [4 /*yield*/, sdk_1.api.endusers.createOne({ fname: 'Programs', lname: 'BulkB' })];
|
|
723
|
+
case 77:
|
|
724
|
+
bulkEndusers = _g.concat([
|
|
725
|
+
_v.sent()
|
|
726
|
+
]);
|
|
727
|
+
return [4 /*yield*/, sdk_1.api.enduser_orders.createSome(bulkEndusers.map(function (e) { return ({
|
|
728
|
+
enduserId: e.id,
|
|
729
|
+
source: BULK_SOURCE_1,
|
|
730
|
+
externalId: "ext-".concat(RAND()),
|
|
731
|
+
title: 'Bulk program order',
|
|
732
|
+
status: 'shipped',
|
|
733
|
+
}); }))];
|
|
734
|
+
case 78:
|
|
735
|
+
_v.sent();
|
|
736
|
+
return [4 /*yield*/, Promise.all(bulkEndusers.map(function (e) { return (programs_once_1(e.id, function (p) { return p.some(function (x) { return x.name === BULK_PROGRAM_1; }); }, 240) // up to 60s; worker-paced
|
|
737
|
+
); }))];
|
|
738
|
+
case 79:
|
|
739
|
+
bulkPrograms = _v.sent();
|
|
740
|
+
record('V: an Add List Item action dispatched in bulk is deferred to the single-record path and applied'
|
|
741
|
+
+ ' to every patient in the batch', bulkPrograms.every(function (p) { return p.length === 1 && p[0].name === BULK_PROGRAM_1; }), "programs=".concat(JSON.stringify(bulkPrograms), " (needs a worker running to drain delayed_events)"));
|
|
742
|
+
return [3 /*break*/, 85];
|
|
743
|
+
case 80:
|
|
744
|
+
if (!tenant) return [3 /*break*/, 84];
|
|
745
|
+
_v.label = 81;
|
|
746
|
+
case 81:
|
|
747
|
+
_v.trys.push([81, 83, , 84]);
|
|
748
|
+
return [4 /*yield*/, tenant.teardown()];
|
|
749
|
+
case 82:
|
|
750
|
+
_v.sent();
|
|
751
|
+
return [3 /*break*/, 84];
|
|
752
|
+
case 83:
|
|
753
|
+
e_1 = _v.sent();
|
|
387
754
|
console.error('teardown failed', e_1);
|
|
388
|
-
return [3 /*break*/,
|
|
389
|
-
case
|
|
390
|
-
case
|
|
755
|
+
return [3 /*break*/, 84];
|
|
756
|
+
case 84: return [7 /*endfinally*/];
|
|
757
|
+
case 85: return [2 /*return*/, checks];
|
|
391
758
|
}
|
|
392
759
|
});
|
|
393
760
|
}); };
|