@tellescope/sdk 1.254.0 → 1.255.0
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 +4 -0
- 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_decision_summary_config.test.d.ts +16 -0
- package/lib/cjs/tests/api_tests/ai_decision_summary_config.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/ai_decision_summary_config.test.js +187 -0
- package/lib/cjs/tests/api_tests/ai_decision_summary_config.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/mdi_case_offerings.test.d.ts +6 -0
- package/lib/cjs/tests/api_tests/mdi_case_offerings.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/mdi_case_offerings.test.js +443 -0
- package/lib/cjs/tests/api_tests/mdi_case_offerings.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/order_status_equals_frequency.test.d.ts +6 -0
- package/lib/cjs/tests/api_tests/order_status_equals_frequency.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/order_status_equals_frequency.test.js +254 -0
- package/lib/cjs/tests/api_tests/order_status_equals_frequency.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/organization_api_keys.test.d.ts +6 -0
- package/lib/cjs/tests/api_tests/organization_api_keys.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/organization_api_keys.test.js +226 -0
- package/lib/cjs/tests/api_tests/organization_api_keys.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.d.ts +21 -0
- package/lib/cjs/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.js +362 -0
- package/lib/cjs/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0145-globalunique-leak.test.d.ts +20 -0
- package/lib/cjs/tests/api_tests/security/F-0145-globalunique-leak.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0145-globalunique-leak.test.js +139 -0
- package/lib/cjs/tests/api_tests/security/F-0145-globalunique-leak.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0151-load-inbox-redaction.test.d.ts +18 -0
- package/lib/cjs/tests/api_tests/security/F-0151-load-inbox-redaction.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0151-load-inbox-redaction.test.js +156 -0
- package/lib/cjs/tests/api_tests/security/F-0151-load-inbox-redaction.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0155-webhook-timeout.test.d.ts +20 -0
- package/lib/cjs/tests/api_tests/security/F-0155-webhook-timeout.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0155-webhook-timeout.test.js +157 -0
- package/lib/cjs/tests/api_tests/security/F-0155-webhook-timeout.test.js.map +1 -0
- package/lib/cjs/tests/setup.d.ts.map +1 -1
- package/lib/cjs/tests/setup.js +20 -1
- package/lib/cjs/tests/setup.js.map +1 -1
- package/lib/cjs/tests/tests.d.ts.map +1 -1
- package/lib/cjs/tests/tests.js +543 -282
- package/lib/cjs/tests/tests.js.map +1 -1
- package/lib/esm/sdk.d.ts +6 -2
- 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/session.d.ts +1 -0
- package/lib/esm/session.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/ai_decision_summary_config.test.d.ts +16 -0
- package/lib/esm/tests/api_tests/ai_decision_summary_config.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/ai_decision_summary_config.test.js +183 -0
- package/lib/esm/tests/api_tests/ai_decision_summary_config.test.js.map +1 -0
- package/lib/esm/tests/api_tests/mdi_case_offerings.test.d.ts +6 -0
- package/lib/esm/tests/api_tests/mdi_case_offerings.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/mdi_case_offerings.test.js +439 -0
- package/lib/esm/tests/api_tests/mdi_case_offerings.test.js.map +1 -0
- package/lib/esm/tests/api_tests/order_status_equals_frequency.test.d.ts +6 -0
- package/lib/esm/tests/api_tests/order_status_equals_frequency.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/order_status_equals_frequency.test.js +250 -0
- package/lib/esm/tests/api_tests/order_status_equals_frequency.test.js.map +1 -0
- package/lib/esm/tests/api_tests/organization_api_keys.test.d.ts +6 -0
- package/lib/esm/tests/api_tests/organization_api_keys.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/organization_api_keys.test.js +222 -0
- package/lib/esm/tests/api_tests/organization_api_keys.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.d.ts +21 -0
- package/lib/esm/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.js +358 -0
- package/lib/esm/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0145-globalunique-leak.test.d.ts +20 -0
- package/lib/esm/tests/api_tests/security/F-0145-globalunique-leak.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0145-globalunique-leak.test.js +135 -0
- package/lib/esm/tests/api_tests/security/F-0145-globalunique-leak.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0151-load-inbox-redaction.test.d.ts +18 -0
- package/lib/esm/tests/api_tests/security/F-0151-load-inbox-redaction.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0151-load-inbox-redaction.test.js +152 -0
- package/lib/esm/tests/api_tests/security/F-0151-load-inbox-redaction.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0155-webhook-timeout.test.d.ts +20 -0
- package/lib/esm/tests/api_tests/security/F-0155-webhook-timeout.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0155-webhook-timeout.test.js +150 -0
- package/lib/esm/tests/api_tests/security/F-0155-webhook-timeout.test.js.map +1 -0
- package/lib/esm/tests/setup.d.ts.map +1 -1
- package/lib/esm/tests/setup.js +20 -1
- package/lib/esm/tests/setup.js.map +1 -1
- package/lib/esm/tests/tests.d.ts.map +1 -1
- package/lib/esm/tests/tests.js +543 -282
- package/lib/esm/tests/tests.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/sdk.ts +11 -0
- package/src/tests/api_tests/mdi_case_offerings.test.ts +414 -0
- package/src/tests/api_tests/organization_api_keys.test.ts +207 -0
- package/src/tests/api_tests/security/F-0116-F-0119-enduser-cross-create.test.ts +221 -0
- package/src/tests/api_tests/security/F-0145-globalunique-leak.test.ts +78 -0
- package/src/tests/api_tests/security/F-0151-load-inbox-redaction.test.ts +81 -0
- package/src/tests/api_tests/security/F-0155-webhook-timeout.test.ts +85 -0
- package/src/tests/setup.ts +9 -0
- package/src/tests/tests.ts +199 -2
- package/test_generated.pdf +0 -0
package/src/tests/tests.ts
CHANGED
|
@@ -80,6 +80,7 @@ import { enduser_login_tests } from "./api_tests/enduser_login.test";
|
|
|
80
80
|
import { enduser_login_rate_limits_tests } from "./api_tests/enduser_login_rate_limits.test";
|
|
81
81
|
import { eom_procedure_codes_tests } from "./api_tests/eom_procedure_codes.test";
|
|
82
82
|
import { cross_org_api_key_tests } from "./api_tests/cross_org_api_key.test";
|
|
83
|
+
import { organization_api_keys_tests } from "./api_tests/organization_api_keys.test";
|
|
83
84
|
import { custom_dashboards_tests } from "./api_tests/custom_dashboards.test";
|
|
84
85
|
import { message_assignment_trigger_tests } from "./api_tests/message_assignment_trigger.test";
|
|
85
86
|
import { outbound_chat_sent_trigger_tests } from "./api_tests/outbound_chat_sent_trigger.test";
|
|
@@ -100,6 +101,10 @@ import { invite_user_enumeration_tests } from "./api_tests/security/F-0007-invit
|
|
|
100
101
|
import { handle_incoming_communication_cross_tenant_tests } from "./api_tests/security/F-0008-handle-incoming-communication-cross-tenant.test";
|
|
101
102
|
import { sanitize_user_html_xss_tests } from "./api_tests/security/F-0013-sanitize-user-html.test";
|
|
102
103
|
import { prototype_pollution_tests } from "./api_tests/security/F-0016-prototype-pollution.test";
|
|
104
|
+
import { enduser_cross_create_tests } from "./api_tests/security/F-0116-F-0119-enduser-cross-create.test";
|
|
105
|
+
import { globalunique_leak_tests } from "./api_tests/security/F-0145-globalunique-leak.test";
|
|
106
|
+
import { load_inbox_redaction_tests } from "./api_tests/security/F-0151-load-inbox-redaction.test";
|
|
107
|
+
import { webhook_timeout_tests } from "./api_tests/security/F-0155-webhook-timeout.test";
|
|
103
108
|
import { bulk_assignment_tests } from "./api_tests/bulk_assignment.test";
|
|
104
109
|
import { managed_content_enduser_access_tests } from "./api_tests/managed_content_enduser_access.test";
|
|
105
110
|
import { managed_content_file_access_tests } from "./api_tests/managed_content_file_access.test";
|
|
@@ -116,6 +121,7 @@ import { organization_settings_duplicates_tests } from "./api_tests/organization
|
|
|
116
121
|
import { calendar_events_bulk_update_tests } from "./api_tests/calendar_events_bulk_update.test";
|
|
117
122
|
import { openloop_webhooks_tests } from "./api_tests/openloop_webhooks.test";
|
|
118
123
|
import { beluga_pharmacy_mappings_tests } from "./api_tests/beluga_pharmacy_mappings.test";
|
|
124
|
+
import { mdi_case_offerings_tests } from "./api_tests/mdi_case_offerings.test";
|
|
119
125
|
import { beluga_manual_sync_tests } from "./api_tests/beluga_manual_sync.test";
|
|
120
126
|
import { mdi_webhooks_tests } from "./api_tests/mdi_webhooks.test";
|
|
121
127
|
import { account_switcher_tests } from "./api_tests/account_switcher.test";
|
|
@@ -3488,6 +3494,39 @@ const order_status_equals_tests = async () => {
|
|
|
3488
3494
|
title: "Protocol Condition"
|
|
3489
3495
|
})
|
|
3490
3496
|
|
|
3497
|
+
// Frequency filter triggers (exact-match array filter, mirrors fills/skus). All use a dedicated
|
|
3498
|
+
// source/status so their assertions stay isolated from the t1-t9 incremental tag-count checks above.
|
|
3499
|
+
const tf1 = await sdk.api.automation_triggers.createOne({
|
|
3500
|
+
event: { type: 'Order Status Equals', info: { source: 'FreqSource', status: "FreqStatus" } }, // no frequencies -> fires for all
|
|
3501
|
+
action: { type: 'Add Tags', info: { tags: ['Freq No Filter'] }},
|
|
3502
|
+
status: 'Active',
|
|
3503
|
+
title: "Frequency - no filter (backward compat)"
|
|
3504
|
+
})
|
|
3505
|
+
const tf2 = await sdk.api.automation_triggers.createOne({
|
|
3506
|
+
event: { type: 'Order Status Equals', info: { source: 'FreqSource', status: "FreqStatus", frequencies: ['4', '12'] } },
|
|
3507
|
+
action: { type: 'Add Tags', info: { tags: ['Freq Match'] }},
|
|
3508
|
+
status: 'Active',
|
|
3509
|
+
title: "Frequency - multi-value match"
|
|
3510
|
+
})
|
|
3511
|
+
const tf3 = await sdk.api.automation_triggers.createOne({
|
|
3512
|
+
event: { type: 'Order Status Equals', info: { source: 'FreqSource', status: "FreqStatus", frequencies: [] } }, // empty array -> fires for all
|
|
3513
|
+
action: { type: 'Add Tags', info: { tags: ['Freq Empty All'] }},
|
|
3514
|
+
status: 'Active',
|
|
3515
|
+
title: "Frequency - empty array means all"
|
|
3516
|
+
})
|
|
3517
|
+
const tf4 = await sdk.api.automation_triggers.createOne({
|
|
3518
|
+
event: { type: 'Order Status Equals', info: { source: 'FreqSource', status: "FreqShipped", frequencies: ['4'] } },
|
|
3519
|
+
action: { type: 'Add Tags', info: { tags: ['Freq Status Combo'] }},
|
|
3520
|
+
status: 'Active',
|
|
3521
|
+
title: "Frequency + status combination (AND semantics)"
|
|
3522
|
+
})
|
|
3523
|
+
const tf5 = await sdk.api.automation_triggers.createOne({
|
|
3524
|
+
event: { type: 'Order Status Equals', info: { source: 'FreqSource', status: "FreqStatus", frequencies: ['12'] } },
|
|
3525
|
+
action: { type: 'Add Tags', info: { tags: ['Freq Match 12'] }},
|
|
3526
|
+
status: 'Active',
|
|
3527
|
+
title: "Frequency - second listed value"
|
|
3528
|
+
})
|
|
3529
|
+
|
|
3491
3530
|
const e = await sdk.api.endusers.createOne({})
|
|
3492
3531
|
|
|
3493
3532
|
await sdk.api.enduser_orders.createOne({ status: 'Nooo', source: 'Source', title: 'nomatch', externalId: '1', enduserId: e.id })
|
|
@@ -3700,6 +3739,85 @@ const order_status_equals_tests = async () => {
|
|
|
3700
3739
|
) }
|
|
3701
3740
|
)
|
|
3702
3741
|
|
|
3742
|
+
// --- Frequency filter coverage (fresh enduser keeps tag-count assertions isolated) ---
|
|
3743
|
+
const ef = await sdk.api.endusers.createOne({})
|
|
3744
|
+
|
|
3745
|
+
// Order with NO frequency: no-filter trigger (tf1) and empty-array trigger (tf3) both fire;
|
|
3746
|
+
// populated-filter trigger (tf2) does NOT (missing frequency must never match a populated filter).
|
|
3747
|
+
await sdk.api.enduser_orders.createOne({ status: 'FreqStatus', source: 'FreqSource', externalId: 'f1', enduserId: ef.id, title: "Freq No Frequency" })
|
|
3748
|
+
await wait(undefined, 500) // allow triggers to happen
|
|
3749
|
+
await async_test(
|
|
3750
|
+
"Frequency: no-filter + empty-array fire for order with no frequency (backward compat)",
|
|
3751
|
+
() => sdk.api.endusers.getOne(ef.id),
|
|
3752
|
+
{ onResult: e => !!(
|
|
3753
|
+
e.tags?.length === 2
|
|
3754
|
+
&& e.tags?.includes('Freq No Filter')
|
|
3755
|
+
&& e.tags?.includes('Freq Empty All')
|
|
3756
|
+
&& !e.tags?.includes('Freq Match')
|
|
3757
|
+
) }
|
|
3758
|
+
)
|
|
3759
|
+
|
|
3760
|
+
// Order with a frequency NOT in ['4','12'] -> populated-filter trigger still does not fire.
|
|
3761
|
+
await sdk.api.enduser_orders.createOne({ status: 'FreqStatus', source: 'FreqSource', externalId: 'f2', enduserId: ef.id, title: "Freq 8", frequency: '8' })
|
|
3762
|
+
await wait(undefined, 500) // allow triggers to happen
|
|
3763
|
+
await async_test(
|
|
3764
|
+
"Frequency: no match (order frequency '8' not in ['4','12'])",
|
|
3765
|
+
() => sdk.api.endusers.getOne(ef.id),
|
|
3766
|
+
{ onResult: e => !!(
|
|
3767
|
+
e.tags?.length === 2
|
|
3768
|
+
&& !e.tags?.includes('Freq Match')
|
|
3769
|
+
) }
|
|
3770
|
+
)
|
|
3771
|
+
|
|
3772
|
+
// Order with frequency '4' -> ['4','12'] trigger fires.
|
|
3773
|
+
await sdk.api.enduser_orders.createOne({ status: 'FreqStatus', source: 'FreqSource', externalId: 'f3', enduserId: ef.id, title: "Freq 4", frequency: '4' })
|
|
3774
|
+
await wait(undefined, 500) // allow triggers to happen
|
|
3775
|
+
await async_test(
|
|
3776
|
+
"Frequency: match (order frequency '4' is in ['4','12'])",
|
|
3777
|
+
() => sdk.api.endusers.getOne(ef.id),
|
|
3778
|
+
{ onResult: e => !!(
|
|
3779
|
+
e.tags?.length === 3
|
|
3780
|
+
&& e.tags?.includes('Freq Match')
|
|
3781
|
+
&& !e.tags?.includes('Freq Match 12')
|
|
3782
|
+
) }
|
|
3783
|
+
)
|
|
3784
|
+
|
|
3785
|
+
// Order with frequency '12' -> the second listed value also matches (tf5 frequencies: ['12']).
|
|
3786
|
+
await sdk.api.enduser_orders.createOne({ status: 'FreqStatus', source: 'FreqSource', externalId: 'f4', enduserId: ef.id, title: "Freq 12", frequency: '12' })
|
|
3787
|
+
await wait(undefined, 500) // allow triggers to happen
|
|
3788
|
+
await async_test(
|
|
3789
|
+
"Frequency: second listed value '12' also matches",
|
|
3790
|
+
() => sdk.api.endusers.getOne(ef.id),
|
|
3791
|
+
{ onResult: e => !!(
|
|
3792
|
+
e.tags?.length === 4
|
|
3793
|
+
&& e.tags?.includes('Freq Match 12')
|
|
3794
|
+
) }
|
|
3795
|
+
)
|
|
3796
|
+
|
|
3797
|
+
// AND semantics: frequency + status must BOTH match. Right frequency, wrong status -> no fire.
|
|
3798
|
+
await sdk.api.enduser_orders.createOne({ status: 'FreqShipped', source: 'FreqSource', externalId: 'f5', enduserId: ef.id, title: "Freq Combo Wrong Freq", frequency: '8' })
|
|
3799
|
+
await wait(undefined, 500) // allow triggers to happen
|
|
3800
|
+
await async_test(
|
|
3801
|
+
"Frequency + status combo: status matches but frequency does not -> no fire",
|
|
3802
|
+
() => sdk.api.endusers.getOne(ef.id),
|
|
3803
|
+
{ onResult: e => !!(
|
|
3804
|
+
e.tags?.length === 4
|
|
3805
|
+
&& !e.tags?.includes('Freq Status Combo')
|
|
3806
|
+
) }
|
|
3807
|
+
)
|
|
3808
|
+
|
|
3809
|
+
// AND semantics: right status AND right frequency -> fires.
|
|
3810
|
+
await sdk.api.enduser_orders.createOne({ status: 'FreqShipped', source: 'FreqSource', externalId: 'f6', enduserId: ef.id, title: "Freq Combo Match", frequency: '4' })
|
|
3811
|
+
await wait(undefined, 500) // allow triggers to happen
|
|
3812
|
+
await async_test(
|
|
3813
|
+
"Frequency + status combo: both match -> fires (AND semantics)",
|
|
3814
|
+
() => sdk.api.endusers.getOne(ef.id),
|
|
3815
|
+
{ onResult: e => !!(
|
|
3816
|
+
e.tags?.length === 5
|
|
3817
|
+
&& e.tags?.includes('Freq Status Combo')
|
|
3818
|
+
) }
|
|
3819
|
+
)
|
|
3820
|
+
|
|
3703
3821
|
await Promise.all([
|
|
3704
3822
|
sdk.api.automation_triggers.deleteOne(t1.id),
|
|
3705
3823
|
sdk.api.automation_triggers.deleteOne(t2.id),
|
|
@@ -3710,7 +3828,13 @@ const order_status_equals_tests = async () => {
|
|
|
3710
3828
|
sdk.api.automation_triggers.deleteOne(t7.id),
|
|
3711
3829
|
sdk.api.automation_triggers.deleteOne(t8.id),
|
|
3712
3830
|
sdk.api.automation_triggers.deleteOne(t9.id),
|
|
3831
|
+
sdk.api.automation_triggers.deleteOne(tf1.id),
|
|
3832
|
+
sdk.api.automation_triggers.deleteOne(tf2.id),
|
|
3833
|
+
sdk.api.automation_triggers.deleteOne(tf3.id),
|
|
3834
|
+
sdk.api.automation_triggers.deleteOne(tf4.id),
|
|
3835
|
+
sdk.api.automation_triggers.deleteOne(tf5.id),
|
|
3713
3836
|
sdk.api.endusers.deleteOne(e.id),
|
|
3837
|
+
sdk.api.endusers.deleteOne(ef.id),
|
|
3714
3838
|
])
|
|
3715
3839
|
}
|
|
3716
3840
|
|
|
@@ -6712,11 +6836,25 @@ export const self_serve_appointment_booking_tests = async () => {
|
|
|
6712
6836
|
confirmationEmailDisabled: true,
|
|
6713
6837
|
confirmationSMSDisabled: true,
|
|
6714
6838
|
})
|
|
6715
|
-
const event30minGroup = await sdk.api.calendar_event_templates.createOne({
|
|
6839
|
+
const event30minGroup = await sdk.api.calendar_event_templates.createOne({
|
|
6716
6840
|
title: 'test group', durationInMinutes: 30,
|
|
6717
6841
|
confirmationEmailDisabled: true,
|
|
6718
6842
|
confirmationSMSDisabled: true,
|
|
6719
|
-
enduserAttendeeLimit: 2,
|
|
6843
|
+
enduserAttendeeLimit: 2,
|
|
6844
|
+
})
|
|
6845
|
+
const event30minTwilio = await sdk.api.calendar_event_templates.createOne({
|
|
6846
|
+
title: 'test twilio', durationInMinutes: 30,
|
|
6847
|
+
confirmationEmailDisabled: true,
|
|
6848
|
+
confirmationSMSDisabled: true,
|
|
6849
|
+
enableVideoCall: true,
|
|
6850
|
+
videoIntegration: 'Twilio',
|
|
6851
|
+
})
|
|
6852
|
+
const event30minZoom = await sdk.api.calendar_event_templates.createOne({
|
|
6853
|
+
title: 'test zoom', durationInMinutes: 30,
|
|
6854
|
+
confirmationEmailDisabled: true,
|
|
6855
|
+
confirmationSMSDisabled: true,
|
|
6856
|
+
enableVideoCall: true,
|
|
6857
|
+
videoIntegration: 'Zoom',
|
|
6720
6858
|
})
|
|
6721
6859
|
|
|
6722
6860
|
// ensure it doesn't match current day, to avoid errors on testing
|
|
@@ -7276,17 +7414,70 @@ export const self_serve_appointment_booking_tests = async () => {
|
|
|
7276
7414
|
{ onResult: event => !!event.rescheduledAt }
|
|
7277
7415
|
)
|
|
7278
7416
|
|
|
7417
|
+
// videoIntegration passthrough from template to booked event (Twilio fix + Zoom regression guard)
|
|
7418
|
+
// set up fresh, dedicated availability so this doesn't interfere with the slot-accounting tests above
|
|
7419
|
+
await sdk.api.users.updateOne(sdk.userInfo.id, {
|
|
7420
|
+
weeklyAvailabilities: [
|
|
7421
|
+
{
|
|
7422
|
+
dayOfWeekStartingSundayIndexedByZero,
|
|
7423
|
+
startTimeInMinutes: 60 * 9, // 9am,
|
|
7424
|
+
endTimeInMinutes: 60 * 11, // 11am,
|
|
7425
|
+
},
|
|
7426
|
+
],
|
|
7427
|
+
timezone: 'America/New_York',
|
|
7428
|
+
}, {
|
|
7429
|
+
replaceObjectFields: true,
|
|
7430
|
+
})
|
|
7431
|
+
|
|
7432
|
+
const twilioSlots = await enduserSDK.api.calendar_events.get_appointment_availability({
|
|
7433
|
+
calendarEventTemplateId: event30minTwilio.id,
|
|
7434
|
+
from: new Date(Date.now() - 10000),
|
|
7435
|
+
to: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000),
|
|
7436
|
+
userIds: [sdk.userInfo.id],
|
|
7437
|
+
})
|
|
7438
|
+
const bookedTwilioAppointment = (await enduserSDK.api.calendar_events.book_appointment({
|
|
7439
|
+
calendarEventTemplateId: event30minTwilio.id,
|
|
7440
|
+
startTime: new Date(twilioSlots.availabilityBlocks[0].startTimeInMS),
|
|
7441
|
+
userId: sdk.userInfo.id,
|
|
7442
|
+
})).createdEvent
|
|
7443
|
+
assert(
|
|
7444
|
+
bookedTwilioAppointment.videoIntegration === 'Twilio',
|
|
7445
|
+
'Twilio videoIntegration not propagated to booked event',
|
|
7446
|
+
'Twilio videoIntegration propagated to booked event'
|
|
7447
|
+
)
|
|
7448
|
+
|
|
7449
|
+
const zoomSlots = await enduserSDK.api.calendar_events.get_appointment_availability({
|
|
7450
|
+
calendarEventTemplateId: event30minZoom.id,
|
|
7451
|
+
from: new Date(Date.now() - 10000),
|
|
7452
|
+
to: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000),
|
|
7453
|
+
userIds: [sdk.userInfo.id],
|
|
7454
|
+
})
|
|
7455
|
+
const bookedZoomAppointment = (await enduserSDK.api.calendar_events.book_appointment({
|
|
7456
|
+
calendarEventTemplateId: event30minZoom.id,
|
|
7457
|
+
startTime: new Date(zoomSlots.availabilityBlocks[0].startTimeInMS),
|
|
7458
|
+
userId: sdk.userInfo.id,
|
|
7459
|
+
})).createdEvent
|
|
7460
|
+
assert(
|
|
7461
|
+
bookedZoomAppointment.videoIntegration === 'Zoom',
|
|
7462
|
+
'Zoom videoIntegration not propagated to booked event',
|
|
7463
|
+
'Zoom videoIntegration propagated to booked event'
|
|
7464
|
+
)
|
|
7465
|
+
|
|
7279
7466
|
await Promise.all([
|
|
7280
7467
|
sdk.api.endusers.deleteOne(e1.id),
|
|
7281
7468
|
sdk.api.endusers.deleteOne(e2.id),
|
|
7282
7469
|
sdk.api.endusers.deleteOne(e3.id),
|
|
7283
7470
|
sdk.api.calendar_event_templates.deleteOne(event30min.id),
|
|
7284
7471
|
sdk.api.calendar_event_templates.deleteOne(event30minGroup.id),
|
|
7472
|
+
sdk.api.calendar_event_templates.deleteOne(event30minTwilio.id),
|
|
7473
|
+
sdk.api.calendar_event_templates.deleteOne(event30minZoom.id),
|
|
7285
7474
|
sdk.api.calendar_event_templates.deleteOne(event15min.id),
|
|
7286
7475
|
sdk.api.calendar_event_templates.deleteOne(templatePreserveHosts.id),
|
|
7287
7476
|
sdk.api.calendar_event_templates.deleteOne(templateReplaceHosts.id),
|
|
7288
7477
|
sdk.api.calendar_events.deleteOne(bookedAppointment.id),
|
|
7289
7478
|
sdk.api.calendar_events.deleteOne(bookedMultiAppointment.id),
|
|
7479
|
+
sdk.api.calendar_events.deleteOne(bookedTwilioAppointment.id),
|
|
7480
|
+
sdk.api.calendar_events.deleteOne(bookedZoomAppointment.id),
|
|
7290
7481
|
sdk.api.calendar_events.deleteOne(groupEvent.id),
|
|
7291
7482
|
sdk.api.calendar_events.deleteOne(originalMultiHostAppt.id),
|
|
7292
7483
|
sdk.api.calendar_events.deleteOne(rescheduledPreserveHosts.id),
|
|
@@ -14840,7 +15031,12 @@ const ip_address_form_tests = async () => {
|
|
|
14840
15031
|
await resource_access_tags_tests({ sdk, sdkNonAdmin })
|
|
14841
15032
|
await beluga_manual_sync_tests({ sdk, sdkNonAdmin })
|
|
14842
15033
|
await beluga_pharmacy_mappings_tests({ sdk, sdkNonAdmin })
|
|
15034
|
+
await mdi_case_offerings_tests({ sdk, sdkNonAdmin })
|
|
14843
15035
|
await enduser_write_restrictions_tests({ sdk, sdkNonAdmin })
|
|
15036
|
+
await enduser_cross_create_tests({ sdk, sdkNonAdmin })
|
|
15037
|
+
await globalunique_leak_tests({ sdk, sdkNonAdmin })
|
|
15038
|
+
await load_inbox_redaction_tests({ sdk, sdkNonAdmin })
|
|
15039
|
+
await webhook_timeout_tests({ sdk, sdkNonAdmin })
|
|
14844
15040
|
await user_portal_settings_tests({ sdk, sdkNonAdmin })
|
|
14845
15041
|
await automation_trigger_tests()
|
|
14846
15042
|
await invite_user_enumeration_tests({ sdk, sdkNonAdmin })
|
|
@@ -14860,6 +15056,7 @@ const ip_address_form_tests = async () => {
|
|
|
14860
15056
|
await enduser_cross_access_isolation_tests({ sdk, sdkNonAdmin })
|
|
14861
15057
|
await eom_procedure_codes_tests({ sdk, sdkNonAdmin })
|
|
14862
15058
|
await cross_org_api_key_tests({ sdk, sdkNonAdmin })
|
|
15059
|
+
await organization_api_keys_tests({ sdk, sdkNonAdmin })
|
|
14863
15060
|
await organization_settings_duplicates_tests({ sdk, sdkNonAdmin })
|
|
14864
15061
|
await enduser_session_invalidation_tests({ sdk, sdkNonAdmin })
|
|
14865
15062
|
await chats_analytics_tests({ sdk, sdkNonAdmin })
|
package/test_generated.pdf
CHANGED
|
Binary file
|