@tellescope/sdk 1.256.7 → 1.256.9

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 (51) hide show
  1. package/lib/cjs/tests/api_tests/appointment_link_expiration.test.d.ts.map +1 -1
  2. package/lib/cjs/tests/api_tests/appointment_link_expiration.test.js +12 -9
  3. package/lib/cjs/tests/api_tests/appointment_link_expiration.test.js.map +1 -1
  4. package/lib/cjs/tests/api_tests/create_note_action.test.d.ts +6 -0
  5. package/lib/cjs/tests/api_tests/create_note_action.test.d.ts.map +1 -0
  6. package/lib/cjs/tests/api_tests/create_note_action.test.js +237 -0
  7. package/lib/cjs/tests/api_tests/create_note_action.test.js.map +1 -0
  8. package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.d.ts +6 -0
  9. package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.d.ts.map +1 -0
  10. package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.js +293 -0
  11. package/lib/cjs/tests/api_tests/group_event_attendee_self_update.test.js.map +1 -0
  12. package/lib/cjs/tests/api_tests/security/F-0006-develop-health-benefit-verification-rbac.test.d.ts.map +1 -1
  13. package/lib/cjs/tests/api_tests/security/F-0006-develop-health-benefit-verification-rbac.test.js +132 -47
  14. package/lib/cjs/tests/api_tests/security/F-0006-develop-health-benefit-verification-rbac.test.js.map +1 -1
  15. package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.d.ts +6 -0
  16. package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.d.ts.map +1 -0
  17. package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.js +262 -0
  18. package/lib/cjs/tests/api_tests/webhook_raw_json_number.test.js.map +1 -0
  19. package/lib/cjs/tests/tests.d.ts.map +1 -1
  20. package/lib/cjs/tests/tests.js +262 -223
  21. package/lib/cjs/tests/tests.js.map +1 -1
  22. package/lib/esm/tests/api_tests/appointment_link_expiration.test.d.ts.map +1 -1
  23. package/lib/esm/tests/api_tests/appointment_link_expiration.test.js +12 -9
  24. package/lib/esm/tests/api_tests/appointment_link_expiration.test.js.map +1 -1
  25. package/lib/esm/tests/api_tests/create_note_action.test.d.ts +6 -0
  26. package/lib/esm/tests/api_tests/create_note_action.test.d.ts.map +1 -0
  27. package/lib/esm/tests/api_tests/create_note_action.test.js +233 -0
  28. package/lib/esm/tests/api_tests/create_note_action.test.js.map +1 -0
  29. package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.d.ts +6 -0
  30. package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.d.ts.map +1 -0
  31. package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.js +289 -0
  32. package/lib/esm/tests/api_tests/group_event_attendee_self_update.test.js.map +1 -0
  33. package/lib/esm/tests/api_tests/security/F-0006-develop-health-benefit-verification-rbac.test.d.ts.map +1 -1
  34. package/lib/esm/tests/api_tests/security/F-0006-develop-health-benefit-verification-rbac.test.js +132 -47
  35. package/lib/esm/tests/api_tests/security/F-0006-develop-health-benefit-verification-rbac.test.js.map +1 -1
  36. package/lib/esm/tests/api_tests/webhook_raw_json_number.test.d.ts +6 -0
  37. package/lib/esm/tests/api_tests/webhook_raw_json_number.test.d.ts.map +1 -0
  38. package/lib/esm/tests/api_tests/webhook_raw_json_number.test.js +258 -0
  39. package/lib/esm/tests/api_tests/webhook_raw_json_number.test.js.map +1 -0
  40. package/lib/esm/tests/tests.d.ts.map +1 -1
  41. package/lib/esm/tests/tests.js +263 -224
  42. package/lib/esm/tests/tests.js.map +1 -1
  43. package/lib/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +10 -10
  45. package/src/tests/api_tests/appointment_link_expiration.test.ts +7 -2
  46. package/src/tests/api_tests/create_note_action.test.ts +168 -0
  47. package/src/tests/api_tests/group_event_attendee_self_update.test.ts +161 -0
  48. package/src/tests/api_tests/security/F-0006-develop-health-benefit-verification-rbac.test.ts +66 -6
  49. package/src/tests/api_tests/webhook_raw_json_number.test.ts +152 -0
  50. package/src/tests/tests.ts +54 -1
  51. package/test_generated.pdf +0 -0
@@ -58,13 +58,14 @@ import { purchase_made_trigger_tests } from "./api_tests/purchase_made_trigger.t
58
58
  import { appointment_rescheduled_trigger_tests } from "./api_tests/appointment_rescheduled_trigger.test"
59
59
  import { appointment_no_showed_trigger_tests } from "./api_tests/appointment_no_showed_trigger.test"
60
60
  import { group_event_attendee_status_triggers_tests } from "./api_tests/group_event_attendee_status_triggers.test"
61
+ import { group_event_attendee_self_update_tests } from "./api_tests/group_event_attendee_self_update.test"
61
62
  import { calendar_event_create_and_bulk_triggers_tests } from "./api_tests/calendar_event_create_and_bulk_triggers.test"
62
63
  import { journey_error_branching_tests } from "./api_tests/journey_error_branching.test"
63
64
  import { journey_delete_cancels_actions_tests } from "./api_tests/journey_delete_cancels_actions.test"
64
65
  import { afteraction_day_of_month_delay_tests } from "./api_tests/afteraction_day_of_month_delay.test"
65
66
  import { push_forms_to_portal_group_completion_tests } from "./api_tests/push_forms_to_portal_group_completion.test"
66
67
  import { authenticate_enduser_via_token, setup_tests } from "./setup"
67
- 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"
68
+ 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, replace_purchase_template_values, responses_satisfy_conditions, safeJSONParseTemplate, truncate_string, weighted_round_robin, YYYY_MM_DD_to_MM_DD_YYYY } from "@tellescope/utilities"
68
69
  import { DEFAULT_OPERATIONS, PLACEHOLDER_ID, ZENDESK_INTEGRATIONS_TITLE, ZOOM_TITLE } from "@tellescope/constants"
69
70
  import {
70
71
  schema,
@@ -143,6 +144,7 @@ import { form_started_trigger_tests } from "./api_tests/form_started_trigger.tes
143
144
  import { formsort_header_auth_tests } from "./api_tests/formsort_header_auth.test";
144
145
  import { form_submitted_trigger_tests } from "./api_tests/form_submitted_trigger.test";
145
146
  import { start_ai_conversation_tests } from "./api_tests/start_ai_conversation.test";
147
+ import { create_note_action_tests } from "./api_tests/create_note_action.test";
146
148
  import { dont_sync_to_elation_form_submission_tests } from "./api_tests/dont_sync_to_elation_form_submission.test";
147
149
  import { medication_added_trigger_tests } from "./api_tests/medication_added_trigger.test";
148
150
  import { conditional_logic_medication_unit_tests } from "./unit_tests/conditional_logic_medication.test";
@@ -167,6 +169,7 @@ import { date_string_validation_tests } from "./api_tests/date_string_validation
167
169
  import { enduser_session_invalidation_tests } from "./api_tests/enduser_session_invalidation.test";
168
170
  import { enduser_cross_access_isolation_tests } from "./api_tests/enduser_cross_access_isolation.test";
169
171
  import { calendar_event_webhook_template_tests } from "./api_tests/calendar_event_webhook_template.test";
172
+ import { webhook_raw_json_number_tests } from "./api_tests/webhook_raw_json_number.test";
170
173
  import { webhook_error_handling_tests } from "./api_tests/webhook_error_handling.test";
171
174
  import { phone_tree_enduser_condition_tests } from "./api_tests/phone_tree_enduser_condition.test";
172
175
 
@@ -5757,6 +5760,7 @@ const automation_trigger_tests = async () => {
5757
5760
 
5758
5761
  await appointment_no_showed_trigger_tests({ sdk, sdkNonAdmin })
5759
5762
  await group_event_attendee_status_triggers_tests({ sdk, sdkNonAdmin })
5763
+ await group_event_attendee_self_update_tests({ sdk, sdkNonAdmin })
5760
5764
  await calendar_event_create_and_bulk_triggers_tests({ sdk, sdkNonAdmin })
5761
5765
  await assign_care_team_tests()
5762
5766
  await push_forms_to_portal_group_completion_tests({ sdk, sdkNonAdmin })
@@ -13866,6 +13870,52 @@ const replace_enduser_template_values_tests = async () => {
13866
13870
  await sdk.api.endusers.deleteOne(enduser.id)
13867
13871
  }
13868
13872
 
13873
+ const safe_json_parse_template_tests = async () => {
13874
+ log_header("Safe JSON Parse Template Tests")
13875
+
13876
+ // Unquoted placeholders are valid (normalized to 0 before parsing)
13877
+ assert(
13878
+ !!safeJSONParseTemplate('{"amount": {{purchase.cost.amount}}}'),
13879
+ 'fail unquoted placeholder', 'unquoted placeholder'
13880
+ )
13881
+ // Quoted placeholders remain valid (backward compatibility)
13882
+ assert(
13883
+ !!safeJSONParseTemplate('{"amount": "{{purchase.cost.amount}}"}'),
13884
+ 'fail quoted placeholder', 'quoted placeholder'
13885
+ )
13886
+ // Placeholders inside a larger string remain valid
13887
+ assert(
13888
+ !!safeJSONParseTemplate('{"greeting": "Hi {{enduser.fname}}!"}'),
13889
+ 'fail placeholder within string', 'placeholder within string'
13890
+ )
13891
+ // Mixed quoted and unquoted placeholders
13892
+ assert(
13893
+ !!safeJSONParseTemplate('{"amount": {{purchase.cost.amount}}, "asString": "{{purchase.cost.amount}}"}'),
13894
+ 'fail mixed placeholders', 'mixed placeholders'
13895
+ )
13896
+ // Genuinely malformed JSON still rejected
13897
+ assert(
13898
+ safeJSONParseTemplate('{"amount": {{purchase.cost.amount}}') === undefined,
13899
+ 'fail malformed template rejected', 'malformed template rejected'
13900
+ )
13901
+ assert(
13902
+ safeJSONParseTemplate('not json at all') === undefined,
13903
+ 'fail non-json rejected', 'non-json rejected'
13904
+ )
13905
+ assert(safeJSONParseTemplate(undefined) === undefined, 'fail undefined template', 'undefined template')
13906
+
13907
+ // Round-trip: substitution of an unquoted placeholder yields a numeric JSON value,
13908
+ // while the quoted placeholder still yields a string
13909
+ const purchase = { title: 'Test Purchase', cost: { amount: 129.99, currency: 'USD' } } as any
13910
+ const substituted = replace_purchase_template_values(
13911
+ '{"amount": {{purchase.cost.amount}}, "asString": "{{purchase.cost.amount}}"}',
13912
+ purchase,
13913
+ )
13914
+ const parsed = JSON.parse(substituted)
13915
+ assert(typeof parsed.amount === 'number' && parsed.amount === 129.99, 'fail unquoted round-trip number', 'unquoted round-trip number')
13916
+ assert(typeof parsed.asString === 'string' && parsed.asString === '129.99', 'fail quoted round-trip string', 'quoted round-trip string')
13917
+ }
13918
+
13869
13919
  const replace_form_field_template_values_tests = async () => {
13870
13920
  log_header("Replace Form Field Template Values Tests")
13871
13921
 
@@ -15293,6 +15343,7 @@ const ip_address_form_tests = async () => {
15293
15343
  await conditional_logic_medication_unit_tests()
15294
15344
  await phone_validation_unit_tests()
15295
15345
  await replace_enduser_template_values_tests()
15346
+ await safe_json_parse_template_tests()
15296
15347
  await replace_form_field_template_values_tests()
15297
15348
  await mfa_tests()
15298
15349
  await setup_tests(sdk, sdkNonAdmin)
@@ -15324,6 +15375,7 @@ const ip_address_form_tests = async () => {
15324
15375
  await invite_user_enumeration_tests({ sdk, sdkNonAdmin })
15325
15376
  await handle_incoming_communication_cross_tenant_tests({ sdk, sdkNonAdmin })
15326
15377
  await calendar_event_webhook_template_tests({ sdk, sdkNonAdmin })
15378
+ await webhook_raw_json_number_tests({ sdk, sdkNonAdmin })
15327
15379
  await webhook_error_handling_tests({ sdk, sdkNonAdmin })
15328
15380
  await outbound_chat_sent_trigger_tests({ sdk })
15329
15381
  await enduser_login_rate_limits_tests({ sdk, sdkNonAdmin })
@@ -15350,6 +15402,7 @@ const ip_address_form_tests = async () => {
15350
15402
  await field_redaction_tests({ sdk, sdkNonAdmin })
15351
15403
  await form_submitted_trigger_tests({ sdk, sdkNonAdmin })
15352
15404
  await start_ai_conversation_tests({ sdk, sdkNonAdmin })
15405
+ await create_note_action_tests({ sdk, sdkNonAdmin })
15353
15406
  await dont_sync_to_elation_form_submission_tests({ sdk, sdkNonAdmin })
15354
15407
  await date_string_validation_tests({ sdk, sdkNonAdmin })
15355
15408
  await phone_tree_enduser_condition_tests({ sdk, sdkNonAdmin })
Binary file