@tellescope/sdk 1.250.2 → 1.251.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.
Files changed (64) hide show
  1. package/lib/cjs/sdk.d.ts +9 -0
  2. package/lib/cjs/sdk.d.ts.map +1 -1
  3. package/lib/cjs/sdk.js +3 -0
  4. package/lib/cjs/sdk.js.map +1 -1
  5. package/lib/cjs/tests/api_tests/account_switcher.test.d.ts.map +1 -1
  6. package/lib/cjs/tests/api_tests/account_switcher.test.js +1700 -306
  7. package/lib/cjs/tests/api_tests/account_switcher.test.js.map +1 -1
  8. package/lib/cjs/tests/api_tests/enduser_login.test.d.ts +6 -0
  9. package/lib/cjs/tests/api_tests/enduser_login.test.d.ts.map +1 -0
  10. package/lib/cjs/tests/api_tests/enduser_login.test.js +315 -0
  11. package/lib/cjs/tests/api_tests/enduser_login.test.js.map +1 -0
  12. package/lib/cjs/tests/api_tests/push_forms_to_portal_group_completion.test.d.ts +6 -0
  13. package/lib/cjs/tests/api_tests/push_forms_to_portal_group_completion.test.d.ts.map +1 -0
  14. package/lib/cjs/tests/api_tests/push_forms_to_portal_group_completion.test.js +370 -0
  15. package/lib/cjs/tests/api_tests/push_forms_to_portal_group_completion.test.js.map +1 -0
  16. package/lib/cjs/tests/api_tests/set_fields_order_templates.test.d.ts +6 -0
  17. package/lib/cjs/tests/api_tests/set_fields_order_templates.test.d.ts.map +1 -0
  18. package/lib/cjs/tests/api_tests/set_fields_order_templates.test.js +373 -0
  19. package/lib/cjs/tests/api_tests/set_fields_order_templates.test.js.map +1 -0
  20. package/lib/cjs/tests/setup.d.ts.map +1 -1
  21. package/lib/cjs/tests/setup.js +47 -32
  22. package/lib/cjs/tests/setup.js.map +1 -1
  23. package/lib/cjs/tests/tests.d.ts.map +1 -1
  24. package/lib/cjs/tests/tests.js +179 -158
  25. package/lib/cjs/tests/tests.js.map +1 -1
  26. package/lib/esm/sdk.d.ts +9 -0
  27. package/lib/esm/sdk.d.ts.map +1 -1
  28. package/lib/esm/sdk.js +3 -0
  29. package/lib/esm/sdk.js.map +1 -1
  30. package/lib/esm/tests/api_tests/account_switcher.test.d.ts.map +1 -1
  31. package/lib/esm/tests/api_tests/account_switcher.test.js +1702 -305
  32. package/lib/esm/tests/api_tests/account_switcher.test.js.map +1 -1
  33. package/lib/esm/tests/api_tests/enduser_login.test.d.ts +6 -0
  34. package/lib/esm/tests/api_tests/enduser_login.test.d.ts.map +1 -0
  35. package/lib/esm/tests/api_tests/enduser_login.test.js +308 -0
  36. package/lib/esm/tests/api_tests/enduser_login.test.js.map +1 -0
  37. package/lib/esm/tests/api_tests/enduser_login_phi_disclosure.test.d.ts +6 -0
  38. package/lib/esm/tests/api_tests/enduser_login_phi_disclosure.test.d.ts.map +1 -0
  39. package/lib/esm/tests/api_tests/enduser_login_phi_disclosure.test.js +268 -0
  40. package/lib/esm/tests/api_tests/enduser_login_phi_disclosure.test.js.map +1 -0
  41. package/lib/esm/tests/api_tests/push_forms_to_portal_group_completion.test.d.ts +6 -0
  42. package/lib/esm/tests/api_tests/push_forms_to_portal_group_completion.test.d.ts.map +1 -0
  43. package/lib/esm/tests/api_tests/push_forms_to_portal_group_completion.test.js +366 -0
  44. package/lib/esm/tests/api_tests/push_forms_to_portal_group_completion.test.js.map +1 -0
  45. package/lib/esm/tests/api_tests/set_fields_order_templates.test.d.ts +6 -0
  46. package/lib/esm/tests/api_tests/set_fields_order_templates.test.d.ts.map +1 -0
  47. package/lib/esm/tests/api_tests/set_fields_order_templates.test.js +369 -0
  48. package/lib/esm/tests/api_tests/set_fields_order_templates.test.js.map +1 -0
  49. package/lib/esm/tests/setup.d.ts.map +1 -1
  50. package/lib/esm/tests/setup.js +47 -32
  51. package/lib/esm/tests/setup.js.map +1 -1
  52. package/lib/esm/tests/tests.d.ts.map +1 -1
  53. package/lib/esm/tests/tests.js +179 -158
  54. package/lib/esm/tests/tests.js.map +1 -1
  55. package/lib/tsconfig.tsbuildinfo +1 -1
  56. package/package.json +10 -10
  57. package/src/sdk.ts +12 -0
  58. package/src/tests/api_tests/account_switcher.test.ts +1283 -0
  59. package/src/tests/api_tests/enduser_login.test.ts +215 -0
  60. package/src/tests/api_tests/push_forms_to_portal_group_completion.test.ts +198 -0
  61. package/src/tests/api_tests/set_fields_order_templates.test.ts +258 -0
  62. package/src/tests/setup.ts +8 -1
  63. package/src/tests/tests.ts +18 -5
  64. package/test_generated.pdf +0 -0
@@ -49,6 +49,7 @@ import { purchase_made_trigger_tests } from "./api_tests/purchase_made_trigger.t
49
49
  import { appointment_rescheduled_trigger_tests } from "./api_tests/appointment_rescheduled_trigger.test"
50
50
  import { journey_error_branching_tests } from "./api_tests/journey_error_branching.test"
51
51
  import { afteraction_day_of_month_delay_tests } from "./api_tests/afteraction_day_of_month_delay.test"
52
+ import { push_forms_to_portal_group_completion_tests } from "./api_tests/push_forms_to_portal_group_completion.test"
52
53
  import { setup_tests } from "./setup"
53
54
  import { evaluate_conditional_logic_for_enduser_fields, FORM_LOGIC_CALCULATED_FIELDS, get_care_team_primary, get_flattened_fields, get_next_reminder_timestamp, object_is_empty, replace_enduser_template_values, replace_form_field_template_values, responses_satisfy_conditions, truncate_string, weighted_round_robin, YYYY_MM_DD_to_MM_DD_YYYY } from "@tellescope/utilities"
54
55
  import { DEFAULT_OPERATIONS, PLACEHOLDER_ID, ZENDESK_INTEGRATIONS_TITLE, ZOOM_TITLE } from "@tellescope/constants"
@@ -74,6 +75,7 @@ import {
74
75
 
75
76
  import fs from "fs"
76
77
  import { load_inbox_data_tests } from "./api_tests/load_inbox_data.test";
78
+ import { enduser_login_tests } from "./api_tests/enduser_login.test";
77
79
  import { eom_procedure_codes_tests } from "./api_tests/eom_procedure_codes.test";
78
80
  import { cross_org_api_key_tests } from "./api_tests/cross_org_api_key.test";
79
81
  import { custom_dashboards_tests } from "./api_tests/custom_dashboards.test";
@@ -102,6 +104,8 @@ import { organization_settings_duplicates_tests } from "./api_tests/organization
102
104
  import { calendar_events_bulk_update_tests } from "./api_tests/calendar_events_bulk_update.test";
103
105
  import { openloop_webhooks_tests } from "./api_tests/openloop_webhooks.test";
104
106
  import { beluga_pharmacy_mappings_tests } from "./api_tests/beluga_pharmacy_mappings.test";
107
+ import { account_switcher_tests } from "./api_tests/account_switcher.test";
108
+ import { set_fields_order_templates_tests } from "./api_tests/set_fields_order_templates.test";
105
109
  import { date_string_validation_tests } from "./api_tests/date_string_validation.test";
106
110
  import { enduser_session_invalidation_tests } from "./api_tests/enduser_session_invalidation.test";
107
111
  import { enduser_cross_access_isolation_tests } from "./api_tests/enduser_cross_access_isolation.test";
@@ -5089,6 +5093,7 @@ const automation_trigger_tests = async () => {
5089
5093
  log_header("Automation Trigger Tests")
5090
5094
 
5091
5095
  await order_status_equals_tests()
5096
+ await set_fields_order_templates_tests({ sdk, sdkNonAdmin })
5092
5097
  await medication_added_trigger_tests({ sdk, sdkNonAdmin })
5093
5098
  await appointment_cancelled_tests()
5094
5099
  await set_fields_tests()
@@ -5097,6 +5102,7 @@ const automation_trigger_tests = async () => {
5097
5102
  await form_response_set_fields_trigger_tests()
5098
5103
  await form_response_set_fields_journey_tests()
5099
5104
  await appointment_completed_trigger_tests({ sdk, sdkNonAdmin })
5105
+ await push_forms_to_portal_group_completion_tests({ sdk, sdkNonAdmin })
5100
5106
  await trigger_events_api_tests()
5101
5107
  await fields_changed_tests()
5102
5108
  await field_equals_trigger_tests()
@@ -7121,16 +7127,18 @@ const merge_enduser_tests = async () => {
7121
7127
  const stripeCustomerId = 'example_cu_id';
7122
7128
  const stripeKey = 'example_stripe_key';
7123
7129
  const [source, destination, otherEnduser] = (await sdk.api.endusers.createSome([
7124
- {
7125
- email: 'source@tellescope.com', fname: 'source', lname: 'enduser',
7126
- references: [{ type: '2', id: '2.2' }, { type: '3', id: '3.2' }, { type: '4', id: '4.2'}],
7130
+ {
7131
+ email: 'source@tellescope.com', fname: 'source', lname: 'enduser',
7132
+ references: [{ type: '2', id: '2.2' }, { type: '3', id: '3.2' }, { type: '4', id: '4.2'}],
7127
7133
  // @ts-ignore
7128
7134
  stripeCustomerId,
7129
7135
  stripeKey,
7130
7136
  athenaPracticeId: '12345',
7131
7137
  athenaDepartmentId: '54321',
7138
+ insurance: { memberId: 'src-member', payerName: 'Source Payer' },
7139
+ insuranceSecondary: { memberId: 'src-secondary' },
7132
7140
  },
7133
- { email: 'destination@tellescope.com', source: '4', externalId: "4", references: [{ type: '1', id: '1' }, { type: '2', id: '2' }] },
7141
+ { email: 'destination@tellescope.com', source: '4', externalId: "4", references: [{ type: '1', id: '1' }, { type: '2', id: '2' }], insurance: { memberId: 'dest-member', payerName: 'Dest Payer' } },
7134
7142
  { email: 'other@tellescope.com'},
7135
7143
  ])).created
7136
7144
 
@@ -7179,7 +7187,10 @@ const merge_enduser_tests = async () => {
7179
7187
  && e.references?.find(r => r.type === '1')?.id === '1'
7180
7188
  && e.references?.find(r => r.type === '2')?.id === '2'
7181
7189
  && e.references?.find(r => r.type === '3')?.id === '3.2'
7182
- && !e.references?.find(r => r.type === '4')?.id
7190
+ && !e.references?.find(r => r.type === '4')?.id
7191
+ && e.insurance?.memberId === 'dest-member'
7192
+ && e.insurance?.payerName === 'Dest Payer'
7193
+ && e.insuranceSecondary?.memberId === 'src-secondary'
7183
7194
  )}
7184
7195
  )
7185
7196
 
@@ -14310,6 +14321,8 @@ const ip_address_form_tests = async () => {
14310
14321
  await replace_form_field_template_values_tests()
14311
14322
  await mfa_tests()
14312
14323
  await setup_tests(sdk, sdkNonAdmin)
14324
+ await account_switcher_tests({ sdk, sdkNonAdmin })
14325
+ await enduser_login_tests({ sdk, sdkNonAdmin })
14313
14326
  await outbound_chat_sent_trigger_tests({ sdk })
14314
14327
  await automation_trigger_tests()
14315
14328
  await enduser_cross_access_isolation_tests({ sdk, sdkNonAdmin })
Binary file