@awell-health/awell-extensions 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/dist/extensions/awell/v1/actions/startCareFlow/startCareFlow.js.map +1 -1
  2. package/dist/extensions/awell/v1/actions/updatePatient/config/fields.d.ts +4 -4
  3. package/dist/extensions/canvasMedical/v1/validation/patient.zod.d.ts +4 -4
  4. package/dist/extensions/dockHealth/api/schema/task.schema.d.ts +2 -2
  5. package/dist/extensions/elation/actions/index.d.ts +1 -1
  6. package/dist/extensions/elation/constants.d.ts +1 -0
  7. package/dist/extensions/elation/constants.js +5 -0
  8. package/dist/extensions/elation/constants.js.map +1 -0
  9. package/dist/extensions/elation/types/webhooks/appointments.d.ts +69 -0
  10. package/dist/extensions/elation/types/webhooks/appointments.js +27 -0
  11. package/dist/extensions/elation/types/webhooks/appointments.js.map +1 -0
  12. package/dist/extensions/elation/types/webhooks/webhooks.test.d.ts +1 -0
  13. package/dist/extensions/elation/types/webhooks/webhooks.test.js +65 -0
  14. package/dist/extensions/elation/types/webhooks/webhooks.test.js.map +1 -0
  15. package/dist/extensions/elation/validation/letter.zod.d.ts +4 -4
  16. package/dist/extensions/elation/validation/patient.zod.d.ts +58 -58
  17. package/dist/extensions/elation/webhooks/appointmentCreatedOrUpdated.js +9 -3
  18. package/dist/extensions/elation/webhooks/appointmentCreatedOrUpdated.js.map +1 -1
  19. package/dist/extensions/markdown.json +1 -1
  20. package/dist/extensions/medplum/actions/createPatient/config/fields.d.ts +2 -2
  21. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.d.ts +2 -2
  22. package/dist/extensions/rest/actions/post/post.js +8 -5
  23. package/dist/extensions/rest/actions/post/post.js.map +1 -1
  24. package/dist/extensions/rest/actions/post/post.test.js +64 -8
  25. package/dist/extensions/rest/actions/post/post.test.js.map +1 -1
  26. package/dist/extensions/sfdc/actions/createLead/createLead.js +6 -8
  27. package/dist/extensions/sfdc/actions/createLead/createLead.js.map +1 -1
  28. package/dist/extensions/sfdc/actions/updateLead/updateLead.js +6 -8
  29. package/dist/extensions/sfdc/actions/updateLead/updateLead.js.map +1 -1
  30. package/dist/extensions/sfdc/api/cacheService.d.ts +1 -1
  31. package/dist/extensions/sfdc/api/cacheService.js +1 -1
  32. package/dist/extensions/sfdc/api/cacheService.js.map +1 -1
  33. package/dist/extensions/sfdc/api/client.js +4 -7
  34. package/dist/extensions/sfdc/api/client.js.map +1 -1
  35. package/dist/extensions/sfdc/lib/errors.d.ts +9 -4
  36. package/dist/extensions/sfdc/lib/errors.js +18 -24
  37. package/dist/extensions/sfdc/lib/errors.js.map +1 -1
  38. package/dist/extensions/twilio/lib/appendOptOutLanguage.d.ts +3 -0
  39. package/dist/extensions/twilio/lib/appendOptOutLanguage.js +18 -0
  40. package/dist/extensions/twilio/lib/appendOptOutLanguage.js.map +1 -0
  41. package/dist/extensions/twilio/lib/errors.d.ts +9 -0
  42. package/dist/extensions/twilio/lib/errors.js +23 -0
  43. package/dist/extensions/twilio/lib/errors.js.map +1 -0
  44. package/dist/extensions/twilio/lib/index.d.ts +1 -0
  45. package/dist/extensions/twilio/lib/index.js +6 -0
  46. package/dist/extensions/twilio/lib/index.js.map +1 -0
  47. package/dist/extensions/twilio/settings.d.ts +30 -0
  48. package/dist/extensions/twilio/settings.js +39 -0
  49. package/dist/extensions/twilio/settings.js.map +1 -1
  50. package/dist/extensions/twilio/tests/settings.test.d.ts +1 -0
  51. package/dist/extensions/twilio/tests/settings.test.js +24 -0
  52. package/dist/extensions/twilio/tests/settings.test.js.map +1 -0
  53. package/dist/extensions/twilio/v2/actions/createFlowExecution/config/actionSchema.d.ts +33 -0
  54. package/dist/extensions/twilio/v2/actions/getMessages/getMessages.test.js +12 -0
  55. package/dist/extensions/twilio/v2/actions/getMessages/getMessages.test.js.map +1 -1
  56. package/dist/extensions/twilio/v2/actions/sendSms/sendSms.js +11 -29
  57. package/dist/extensions/twilio/v2/actions/sendSms/sendSms.js.map +1 -1
  58. package/dist/extensions/twilio/v2/actions/sendSms/sendSms.test.js +19 -15
  59. package/dist/extensions/twilio/v2/actions/sendSms/sendSms.test.js.map +1 -1
  60. package/dist/extensions/twilio/v2/actions/sendSmsDuringBusinessHours/sendSmsDuringBusinessHours.js +11 -30
  61. package/dist/extensions/twilio/v2/actions/sendSmsDuringBusinessHours/sendSmsDuringBusinessHours.js.map +1 -1
  62. package/dist/extensions/twilio/v2/actions/sendSmsDuringBusinessHours/sendSmsDuringBusinessHours.test.js +25 -15
  63. package/dist/extensions/twilio/v2/actions/sendSmsDuringBusinessHours/sendSmsDuringBusinessHours.test.js.map +1 -1
  64. package/dist/extensions/twilio/v2/actions/sendSmsWithMessagingSid/sendSmsWithMessagingService.js +10 -29
  65. package/dist/extensions/twilio/v2/actions/sendSmsWithMessagingSid/sendSmsWithMessagingService.js.map +1 -1
  66. package/dist/extensions/twilio/v2/actions/sendSmsWithMessagingSid/sendSmsWithMessagingService.test.js +19 -15
  67. package/dist/extensions/twilio/v2/actions/sendSmsWithMessagingSid/sendSmsWithMessagingService.test.js.map +1 -1
  68. package/dist/extensions/workramp/index.js +2 -2
  69. package/dist/extensions/workramp/index.js.map +1 -1
  70. package/dist/extensions/workramp/webhooks/EventWebhook.js +1 -1
  71. package/dist/extensions/workramp/webhooks/EventWebhook.js.map +1 -1
  72. package/package.json +1 -1
@@ -27,23 +27,23 @@ export declare const guarantorSchema: z.ZodObject<{
27
27
  last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
28
  middle_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
29
  }, "strip", z.ZodTypeAny, {
30
- address: string;
31
30
  city: string;
32
31
  state: string;
33
32
  zip: string;
33
+ address: string;
34
+ phone?: string | null | undefined;
34
35
  first_name?: string | null | undefined;
35
36
  last_name?: string | null | undefined;
36
- phone?: string | null | undefined;
37
37
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
38
38
  middle_name?: string | null | undefined;
39
39
  }, {
40
- address: string;
41
40
  city: string;
42
41
  state: string;
43
42
  zip: string;
43
+ address: string;
44
+ phone?: string | null | undefined;
44
45
  first_name?: string | null | undefined;
45
46
  last_name?: string | null | undefined;
46
- phone?: string | null | undefined;
47
47
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
48
48
  middle_name?: string | null | undefined;
49
49
  }>;
@@ -76,11 +76,11 @@ export declare const insuranceSchema: z.ZodObject<{
76
76
  relationship_to_insured: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
77
  }, "strip", z.ZodTypeAny, {
78
78
  rank: "secondary" | "primary" | "tertiary";
79
- address?: string | null | undefined;
80
79
  phone?: string | null | undefined;
81
80
  city?: string | null | undefined;
82
81
  state?: string | null | undefined;
83
82
  zip?: string | null | undefined;
83
+ address?: string | null | undefined;
84
84
  extension?: string | null | undefined;
85
85
  carrier?: string | null | undefined;
86
86
  member_id?: string | null | undefined;
@@ -103,11 +103,11 @@ export declare const insuranceSchema: z.ZodObject<{
103
103
  relationship_to_insured?: string | null | undefined;
104
104
  }, {
105
105
  rank: "secondary" | "primary" | "tertiary";
106
- address?: string | null | undefined;
107
106
  phone?: string | null | undefined;
108
107
  city?: string | null | undefined;
109
108
  state?: string | null | undefined;
110
109
  zip?: string | null | undefined;
110
+ address?: string | null | undefined;
111
111
  extension?: string | null | undefined;
112
112
  carrier?: string | null | undefined;
113
113
  member_id?: string | null | undefined;
@@ -211,23 +211,23 @@ export declare const patientSchema: z.ZodObject<{
211
211
  last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
212
  middle_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
213
  }, "strict", z.ZodTypeAny, {
214
- address: string;
215
214
  city: string;
216
215
  state: string;
217
216
  zip: string;
217
+ address: string;
218
+ phone?: string | null | undefined;
218
219
  first_name?: string | null | undefined;
219
220
  last_name?: string | null | undefined;
220
- phone?: string | null | undefined;
221
221
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
222
222
  middle_name?: string | null | undefined;
223
223
  }, {
224
- address: string;
225
224
  city: string;
226
225
  state: string;
227
226
  zip: string;
227
+ address: string;
228
+ phone?: string | null | undefined;
228
229
  first_name?: string | null | undefined;
229
230
  last_name?: string | null | undefined;
230
- phone?: string | null | undefined;
231
231
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
232
232
  middle_name?: string | null | undefined;
233
233
  }>>>;
@@ -260,11 +260,11 @@ export declare const patientSchema: z.ZodObject<{
260
260
  relationship_to_insured: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
261
  }, "strict", z.ZodTypeAny, {
262
262
  rank: "secondary" | "primary" | "tertiary";
263
- address?: string | null | undefined;
264
263
  phone?: string | null | undefined;
265
264
  city?: string | null | undefined;
266
265
  state?: string | null | undefined;
267
266
  zip?: string | null | undefined;
267
+ address?: string | null | undefined;
268
268
  extension?: string | null | undefined;
269
269
  carrier?: string | null | undefined;
270
270
  member_id?: string | null | undefined;
@@ -287,11 +287,11 @@ export declare const patientSchema: z.ZodObject<{
287
287
  relationship_to_insured?: string | null | undefined;
288
288
  }, {
289
289
  rank: "secondary" | "primary" | "tertiary";
290
- address?: string | null | undefined;
291
290
  phone?: string | null | undefined;
292
291
  city?: string | null | undefined;
293
292
  state?: string | null | undefined;
294
293
  zip?: string | null | undefined;
294
+ address?: string | null | undefined;
295
295
  extension?: string | null | undefined;
296
296
  carrier?: string | null | undefined;
297
297
  member_id?: string | null | undefined;
@@ -342,11 +342,11 @@ export declare const patientSchema: z.ZodObject<{
342
342
  relationship_to_insured: z.ZodOptional<z.ZodNullable<z.ZodString>>;
343
343
  }, "strict", z.ZodTypeAny, {
344
344
  rank: "secondary" | "primary" | "tertiary";
345
- address?: string | null | undefined;
346
345
  phone?: string | null | undefined;
347
346
  city?: string | null | undefined;
348
347
  state?: string | null | undefined;
349
348
  zip?: string | null | undefined;
349
+ address?: string | null | undefined;
350
350
  extension?: string | null | undefined;
351
351
  carrier?: string | null | undefined;
352
352
  member_id?: string | null | undefined;
@@ -369,11 +369,11 @@ export declare const patientSchema: z.ZodObject<{
369
369
  relationship_to_insured?: string | null | undefined;
370
370
  }, {
371
371
  rank: "secondary" | "primary" | "tertiary";
372
- address?: string | null | undefined;
373
372
  phone?: string | null | undefined;
374
373
  city?: string | null | undefined;
375
374
  state?: string | null | undefined;
376
375
  zip?: string | null | undefined;
376
+ address?: string | null | undefined;
377
377
  extension?: string | null | undefined;
378
378
  carrier?: string | null | undefined;
379
379
  member_id?: string | null | undefined;
@@ -433,22 +433,22 @@ export declare const patientSchema: z.ZodObject<{
433
433
  state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
434
434
  zip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
435
435
  }, "strict", z.ZodTypeAny, {
436
- first_name?: string | null | undefined;
437
- last_name?: string | null | undefined;
438
436
  phone?: string | null | undefined;
439
437
  city?: string | null | undefined;
440
438
  state?: string | null | undefined;
441
439
  zip?: string | null | undefined;
440
+ first_name?: string | null | undefined;
441
+ last_name?: string | null | undefined;
442
442
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
443
443
  address_line1?: string | null | undefined;
444
444
  address_line2?: string | null | undefined;
445
445
  }, {
446
- first_name?: string | null | undefined;
447
- last_name?: string | null | undefined;
448
446
  phone?: string | null | undefined;
449
447
  city?: string | null | undefined;
450
448
  state?: string | null | undefined;
451
449
  zip?: string | null | undefined;
450
+ first_name?: string | null | undefined;
451
+ last_name?: string | null | undefined;
452
452
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
453
453
  address_line1?: string | null | undefined;
454
454
  address_line2?: string | null | undefined;
@@ -473,9 +473,9 @@ export declare const patientSchema: z.ZodObject<{
473
473
  metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
474
474
  }, "strict", z.ZodTypeAny, {
475
475
  dob: string;
476
+ sex: "Male" | "Female" | "Other" | "Unknown";
476
477
  first_name: string;
477
478
  last_name: string;
478
- sex: "Male" | "Female" | "Other" | "Unknown";
479
479
  primary_physician: number;
480
480
  caregiver_practice: number;
481
481
  address?: {
@@ -507,23 +507,23 @@ export declare const patientSchema: z.ZodObject<{
507
507
  email: string;
508
508
  }[] | null | undefined;
509
509
  guarantor?: {
510
- address: string;
511
510
  city: string;
512
511
  state: string;
513
512
  zip: string;
513
+ address: string;
514
+ phone?: string | null | undefined;
514
515
  first_name?: string | null | undefined;
515
516
  last_name?: string | null | undefined;
516
- phone?: string | null | undefined;
517
517
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
518
518
  middle_name?: string | null | undefined;
519
519
  } | null | undefined;
520
520
  insurances?: {
521
521
  rank: "secondary" | "primary" | "tertiary";
522
- address?: string | null | undefined;
523
522
  phone?: string | null | undefined;
524
523
  city?: string | null | undefined;
525
524
  state?: string | null | undefined;
526
525
  zip?: string | null | undefined;
526
+ address?: string | null | undefined;
527
527
  extension?: string | null | undefined;
528
528
  carrier?: string | null | undefined;
529
529
  member_id?: string | null | undefined;
@@ -547,11 +547,11 @@ export declare const patientSchema: z.ZodObject<{
547
547
  }[] | null | undefined;
548
548
  deleted_insurances?: {
549
549
  rank: "secondary" | "primary" | "tertiary";
550
- address?: string | null | undefined;
551
550
  phone?: string | null | undefined;
552
551
  city?: string | null | undefined;
553
552
  state?: string | null | undefined;
554
553
  zip?: string | null | undefined;
554
+ address?: string | null | undefined;
555
555
  extension?: string | null | undefined;
556
556
  carrier?: string | null | undefined;
557
557
  member_id?: string | null | undefined;
@@ -584,12 +584,12 @@ export declare const patientSchema: z.ZodObject<{
584
584
  preferred_pharmacy_2?: string | null | undefined;
585
585
  } | null | undefined;
586
586
  emergency_contact?: {
587
- first_name?: string | null | undefined;
588
- last_name?: string | null | undefined;
589
587
  phone?: string | null | undefined;
590
588
  city?: string | null | undefined;
591
589
  state?: string | null | undefined;
592
590
  zip?: string | null | undefined;
591
+ first_name?: string | null | undefined;
592
+ last_name?: string | null | undefined;
593
593
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
594
594
  address_line1?: string | null | undefined;
595
595
  address_line2?: string | null | undefined;
@@ -605,9 +605,9 @@ export declare const patientSchema: z.ZodObject<{
605
605
  } | null | undefined;
606
606
  }, {
607
607
  dob: Date;
608
+ sex: "Male" | "Female" | "Other" | "Unknown";
608
609
  first_name: string;
609
610
  last_name: string;
610
- sex: "Male" | "Female" | "Other" | "Unknown";
611
611
  primary_physician: number;
612
612
  caregiver_practice: number;
613
613
  address?: {
@@ -639,23 +639,23 @@ export declare const patientSchema: z.ZodObject<{
639
639
  email: string;
640
640
  }[] | null | undefined;
641
641
  guarantor?: {
642
- address: string;
643
642
  city: string;
644
643
  state: string;
645
644
  zip: string;
645
+ address: string;
646
+ phone?: string | null | undefined;
646
647
  first_name?: string | null | undefined;
647
648
  last_name?: string | null | undefined;
648
- phone?: string | null | undefined;
649
649
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
650
650
  middle_name?: string | null | undefined;
651
651
  } | null | undefined;
652
652
  insurances?: {
653
653
  rank: "secondary" | "primary" | "tertiary";
654
- address?: string | null | undefined;
655
654
  phone?: string | null | undefined;
656
655
  city?: string | null | undefined;
657
656
  state?: string | null | undefined;
658
657
  zip?: string | null | undefined;
658
+ address?: string | null | undefined;
659
659
  extension?: string | null | undefined;
660
660
  carrier?: string | null | undefined;
661
661
  member_id?: string | null | undefined;
@@ -679,11 +679,11 @@ export declare const patientSchema: z.ZodObject<{
679
679
  }[] | null | undefined;
680
680
  deleted_insurances?: {
681
681
  rank: "secondary" | "primary" | "tertiary";
682
- address?: string | null | undefined;
683
682
  phone?: string | null | undefined;
684
683
  city?: string | null | undefined;
685
684
  state?: string | null | undefined;
686
685
  zip?: string | null | undefined;
686
+ address?: string | null | undefined;
687
687
  extension?: string | null | undefined;
688
688
  carrier?: string | null | undefined;
689
689
  member_id?: string | null | undefined;
@@ -716,12 +716,12 @@ export declare const patientSchema: z.ZodObject<{
716
716
  preferred_pharmacy_2?: string | null | undefined;
717
717
  } | null | undefined;
718
718
  emergency_contact?: {
719
- first_name?: string | null | undefined;
720
- last_name?: string | null | undefined;
721
719
  phone?: string | null | undefined;
722
720
  city?: string | null | undefined;
723
721
  state?: string | null | undefined;
724
722
  zip?: string | null | undefined;
723
+ first_name?: string | null | undefined;
724
+ last_name?: string | null | undefined;
725
725
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
726
726
  address_line1?: string | null | undefined;
727
727
  address_line2?: string | null | undefined;
@@ -802,23 +802,23 @@ export declare const updatePatientSchema: z.ZodObject<{
802
802
  last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
803
803
  middle_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
804
804
  }, "strict", z.ZodTypeAny, {
805
- address: string;
806
805
  city: string;
807
806
  state: string;
808
807
  zip: string;
808
+ address: string;
809
+ phone?: string | null | undefined;
809
810
  first_name?: string | null | undefined;
810
811
  last_name?: string | null | undefined;
811
- phone?: string | null | undefined;
812
812
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
813
813
  middle_name?: string | null | undefined;
814
814
  }, {
815
- address: string;
816
815
  city: string;
817
816
  state: string;
818
817
  zip: string;
818
+ address: string;
819
+ phone?: string | null | undefined;
819
820
  first_name?: string | null | undefined;
820
821
  last_name?: string | null | undefined;
821
- phone?: string | null | undefined;
822
822
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
823
823
  middle_name?: string | null | undefined;
824
824
  }>>>;
@@ -851,11 +851,11 @@ export declare const updatePatientSchema: z.ZodObject<{
851
851
  relationship_to_insured: z.ZodOptional<z.ZodNullable<z.ZodString>>;
852
852
  }, "strict", z.ZodTypeAny, {
853
853
  rank: "secondary" | "primary" | "tertiary";
854
- address?: string | null | undefined;
855
854
  phone?: string | null | undefined;
856
855
  city?: string | null | undefined;
857
856
  state?: string | null | undefined;
858
857
  zip?: string | null | undefined;
858
+ address?: string | null | undefined;
859
859
  extension?: string | null | undefined;
860
860
  carrier?: string | null | undefined;
861
861
  member_id?: string | null | undefined;
@@ -878,11 +878,11 @@ export declare const updatePatientSchema: z.ZodObject<{
878
878
  relationship_to_insured?: string | null | undefined;
879
879
  }, {
880
880
  rank: "secondary" | "primary" | "tertiary";
881
- address?: string | null | undefined;
882
881
  phone?: string | null | undefined;
883
882
  city?: string | null | undefined;
884
883
  state?: string | null | undefined;
885
884
  zip?: string | null | undefined;
885
+ address?: string | null | undefined;
886
886
  extension?: string | null | undefined;
887
887
  carrier?: string | null | undefined;
888
888
  member_id?: string | null | undefined;
@@ -933,11 +933,11 @@ export declare const updatePatientSchema: z.ZodObject<{
933
933
  relationship_to_insured: z.ZodOptional<z.ZodNullable<z.ZodString>>;
934
934
  }, "strict", z.ZodTypeAny, {
935
935
  rank: "secondary" | "primary" | "tertiary";
936
- address?: string | null | undefined;
937
936
  phone?: string | null | undefined;
938
937
  city?: string | null | undefined;
939
938
  state?: string | null | undefined;
940
939
  zip?: string | null | undefined;
940
+ address?: string | null | undefined;
941
941
  extension?: string | null | undefined;
942
942
  carrier?: string | null | undefined;
943
943
  member_id?: string | null | undefined;
@@ -960,11 +960,11 @@ export declare const updatePatientSchema: z.ZodObject<{
960
960
  relationship_to_insured?: string | null | undefined;
961
961
  }, {
962
962
  rank: "secondary" | "primary" | "tertiary";
963
- address?: string | null | undefined;
964
963
  phone?: string | null | undefined;
965
964
  city?: string | null | undefined;
966
965
  state?: string | null | undefined;
967
966
  zip?: string | null | undefined;
967
+ address?: string | null | undefined;
968
968
  extension?: string | null | undefined;
969
969
  carrier?: string | null | undefined;
970
970
  member_id?: string | null | undefined;
@@ -1024,22 +1024,22 @@ export declare const updatePatientSchema: z.ZodObject<{
1024
1024
  state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1025
1025
  zip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1026
1026
  }, "strict", z.ZodTypeAny, {
1027
- first_name?: string | null | undefined;
1028
- last_name?: string | null | undefined;
1029
1027
  phone?: string | null | undefined;
1030
1028
  city?: string | null | undefined;
1031
1029
  state?: string | null | undefined;
1032
1030
  zip?: string | null | undefined;
1031
+ first_name?: string | null | undefined;
1032
+ last_name?: string | null | undefined;
1033
1033
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
1034
1034
  address_line1?: string | null | undefined;
1035
1035
  address_line2?: string | null | undefined;
1036
1036
  }, {
1037
- first_name?: string | null | undefined;
1038
- last_name?: string | null | undefined;
1039
1037
  phone?: string | null | undefined;
1040
1038
  city?: string | null | undefined;
1041
1039
  state?: string | null | undefined;
1042
1040
  zip?: string | null | undefined;
1041
+ first_name?: string | null | undefined;
1042
+ last_name?: string | null | undefined;
1043
1043
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
1044
1044
  address_line1?: string | null | undefined;
1045
1045
  address_line2?: string | null | undefined;
@@ -1064,6 +1064,7 @@ export declare const updatePatientSchema: z.ZodObject<{
1064
1064
  metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
1065
1065
  }, "strict", z.ZodTypeAny, {
1066
1066
  dob?: string | null | undefined;
1067
+ sex?: "Male" | "Female" | "Other" | "Unknown" | null | undefined;
1067
1068
  address?: {
1068
1069
  city: string;
1069
1070
  state: string;
@@ -1074,7 +1075,6 @@ export declare const updatePatientSchema: z.ZodObject<{
1074
1075
  first_name?: string | null | undefined;
1075
1076
  last_name?: string | null | undefined;
1076
1077
  preferred_language?: string | null | undefined;
1077
- sex?: "Male" | "Female" | "Other" | "Unknown" | null | undefined;
1078
1078
  metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
1079
1079
  tags?: string[] | null | undefined;
1080
1080
  middle_name?: string | null | undefined;
@@ -1098,23 +1098,23 @@ export declare const updatePatientSchema: z.ZodObject<{
1098
1098
  email: string;
1099
1099
  }[] | null | undefined;
1100
1100
  guarantor?: {
1101
- address: string;
1102
1101
  city: string;
1103
1102
  state: string;
1104
1103
  zip: string;
1104
+ address: string;
1105
+ phone?: string | null | undefined;
1105
1106
  first_name?: string | null | undefined;
1106
1107
  last_name?: string | null | undefined;
1107
- phone?: string | null | undefined;
1108
1108
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
1109
1109
  middle_name?: string | null | undefined;
1110
1110
  } | null | undefined;
1111
1111
  insurances?: {
1112
1112
  rank: "secondary" | "primary" | "tertiary";
1113
- address?: string | null | undefined;
1114
1113
  phone?: string | null | undefined;
1115
1114
  city?: string | null | undefined;
1116
1115
  state?: string | null | undefined;
1117
1116
  zip?: string | null | undefined;
1117
+ address?: string | null | undefined;
1118
1118
  extension?: string | null | undefined;
1119
1119
  carrier?: string | null | undefined;
1120
1120
  member_id?: string | null | undefined;
@@ -1138,11 +1138,11 @@ export declare const updatePatientSchema: z.ZodObject<{
1138
1138
  }[] | null | undefined;
1139
1139
  deleted_insurances?: {
1140
1140
  rank: "secondary" | "primary" | "tertiary";
1141
- address?: string | null | undefined;
1142
1141
  phone?: string | null | undefined;
1143
1142
  city?: string | null | undefined;
1144
1143
  state?: string | null | undefined;
1145
1144
  zip?: string | null | undefined;
1145
+ address?: string | null | undefined;
1146
1146
  extension?: string | null | undefined;
1147
1147
  carrier?: string | null | undefined;
1148
1148
  member_id?: string | null | undefined;
@@ -1175,12 +1175,12 @@ export declare const updatePatientSchema: z.ZodObject<{
1175
1175
  preferred_pharmacy_2?: string | null | undefined;
1176
1176
  } | null | undefined;
1177
1177
  emergency_contact?: {
1178
- first_name?: string | null | undefined;
1179
- last_name?: string | null | undefined;
1180
1178
  phone?: string | null | undefined;
1181
1179
  city?: string | null | undefined;
1182
1180
  state?: string | null | undefined;
1183
1181
  zip?: string | null | undefined;
1182
+ first_name?: string | null | undefined;
1183
+ last_name?: string | null | undefined;
1184
1184
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
1185
1185
  address_line1?: string | null | undefined;
1186
1186
  address_line2?: string | null | undefined;
@@ -1196,6 +1196,7 @@ export declare const updatePatientSchema: z.ZodObject<{
1196
1196
  } | null | undefined;
1197
1197
  }, {
1198
1198
  dob?: Date | null | undefined;
1199
+ sex?: "Male" | "Female" | "Other" | "Unknown" | null | undefined;
1199
1200
  address?: {
1200
1201
  city: string;
1201
1202
  state: string;
@@ -1206,7 +1207,6 @@ export declare const updatePatientSchema: z.ZodObject<{
1206
1207
  first_name?: string | null | undefined;
1207
1208
  last_name?: string | null | undefined;
1208
1209
  preferred_language?: string | null | undefined;
1209
- sex?: "Male" | "Female" | "Other" | "Unknown" | null | undefined;
1210
1210
  metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
1211
1211
  tags?: string[] | null | undefined;
1212
1212
  middle_name?: string | null | undefined;
@@ -1230,23 +1230,23 @@ export declare const updatePatientSchema: z.ZodObject<{
1230
1230
  email: string;
1231
1231
  }[] | null | undefined;
1232
1232
  guarantor?: {
1233
- address: string;
1234
1233
  city: string;
1235
1234
  state: string;
1236
1235
  zip: string;
1236
+ address: string;
1237
+ phone?: string | null | undefined;
1237
1238
  first_name?: string | null | undefined;
1238
1239
  last_name?: string | null | undefined;
1239
- phone?: string | null | undefined;
1240
1240
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
1241
1241
  middle_name?: string | null | undefined;
1242
1242
  } | null | undefined;
1243
1243
  insurances?: {
1244
1244
  rank: "secondary" | "primary" | "tertiary";
1245
- address?: string | null | undefined;
1246
1245
  phone?: string | null | undefined;
1247
1246
  city?: string | null | undefined;
1248
1247
  state?: string | null | undefined;
1249
1248
  zip?: string | null | undefined;
1249
+ address?: string | null | undefined;
1250
1250
  extension?: string | null | undefined;
1251
1251
  carrier?: string | null | undefined;
1252
1252
  member_id?: string | null | undefined;
@@ -1270,11 +1270,11 @@ export declare const updatePatientSchema: z.ZodObject<{
1270
1270
  }[] | null | undefined;
1271
1271
  deleted_insurances?: {
1272
1272
  rank: "secondary" | "primary" | "tertiary";
1273
- address?: string | null | undefined;
1274
1273
  phone?: string | null | undefined;
1275
1274
  city?: string | null | undefined;
1276
1275
  state?: string | null | undefined;
1277
1276
  zip?: string | null | undefined;
1277
+ address?: string | null | undefined;
1278
1278
  extension?: string | null | undefined;
1279
1279
  carrier?: string | null | undefined;
1280
1280
  member_id?: string | null | undefined;
@@ -1307,12 +1307,12 @@ export declare const updatePatientSchema: z.ZodObject<{
1307
1307
  preferred_pharmacy_2?: string | null | undefined;
1308
1308
  } | null | undefined;
1309
1309
  emergency_contact?: {
1310
- first_name?: string | null | undefined;
1311
- last_name?: string | null | undefined;
1312
1310
  phone?: string | null | undefined;
1313
1311
  city?: string | null | undefined;
1314
1312
  state?: string | null | undefined;
1315
1313
  zip?: string | null | undefined;
1314
+ first_name?: string | null | undefined;
1315
+ last_name?: string | null | undefined;
1316
1316
  relationship?: "Other" | "Caregiver" | "Child" | "Friend" | "Grandparent" | "Guardian" | "Parent" | "Sibling" | "Spouse" | null | undefined;
1317
1317
  address_line1?: string | null | undefined;
1318
1318
  address_line2?: string | null | undefined;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.appointmentCreatedOrUpdated = void 0;
4
+ const constants_1 = require("../constants");
5
+ const appointments_1 = require("../types/webhooks/appointments");
4
6
  const dataPoints = {
5
7
  appointmentId: {
6
8
  key: 'appointmentId',
@@ -11,8 +13,8 @@ exports.appointmentCreatedOrUpdated = {
11
13
  key: 'appointmentCreatedOrUpdated',
12
14
  dataPoints,
13
15
  onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
14
- const { data, resource, action } = payload;
15
- // skip non 'saved' actions for that webhook
16
+ const { action, resource, data: { id: appointmentId, patient: patientId }, } = appointments_1.AppointmentsPayloadSchema.parse(payload);
17
+ // skip non 'saved' actions for that webhook
16
18
  if (action !== 'saved') {
17
19
  return;
18
20
  }
@@ -26,7 +28,11 @@ exports.appointmentCreatedOrUpdated = {
26
28
  }
27
29
  else {
28
30
  await onSuccess({
29
- data_points: { appointmentId: String(data.id) },
31
+ data_points: { appointmentId: String(appointmentId) },
32
+ patient_identifier: {
33
+ system: constants_1.ELATION_SYSTEM,
34
+ value: String(patientId),
35
+ },
30
36
  });
31
37
  }
32
38
  },
@@ -1 +1 @@
1
- {"version":3,"file":"appointmentCreatedOrUpdated.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/appointmentCreatedOrUpdated.ts"],"names":[],"mappings":";;;AAMA,MAAM,UAAU,GAAG;IACjB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,2BAA2B,GAGpC;IACF,GAAG,EAAE,6BAA6B;IAClC,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;QAE1C,4CAA4C;QAC5C,IAAI,MAAM,KAAK,OAAO,EAAE;YACtB,OAAM;SACP;QAED,IAAI,QAAQ,KAAK,cAAc,EAAE;YAC/B,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,gCAAgC;iBAC1C;aACF,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;aAChD,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"appointmentCreatedOrUpdated.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/appointmentCreatedOrUpdated.ts"],"names":[],"mappings":";;;AAIA,4CAA6C;AAE7C,iEAA0E;AAE1E,MAAM,UAAU,GAAG;IACjB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,2BAA2B,GAGpC;IACF,GAAG,EAAE,6BAA6B;IAClC,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,IAAI,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,GAChD,GAAG,wCAAyB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAE5C,6CAA6C;QAC7C,IAAI,MAAM,KAAK,OAAO,EAAE;YACtB,OAAM;SACP;QAED,IAAI,QAAQ,KAAK,cAAc,EAAE;YAC/B,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,gCAAgC;iBAC1C;aACF,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,EAAE;gBACrD,kBAAkB,EAAE;oBAClB,MAAM,EAAE,0BAAc;oBACtB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC;iBACzB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
@@ -136,7 +136,7 @@
136
136
  "changelog": "# Transform changelog\n\n## June 2024\n\n- Added \"Feet and inches to inches\" action\n## March 2024\n\n- Added \"Generate dynamic URL\" action\n\n## January 2024\n\n- Added \"Parse number to text with dictionary\" action"
137
137
  },
138
138
  "twilio": {
139
- "readme": "---\ntitle: Twilio\ndescription: Twilio is a customer engagement platform used by hundreds of thousands of businesses and more than ten million developers worldwide to build unique, personalized experiences for their customers.\n---\n# Twilio\n\nTwilio is a customer engagement platform used by hundreds of thousands of businesses and more than ten million developers worldwide to build unique, personalized experiences for their customers.\n\nThey are known for democratizing channels like voice, text, chat, video, and email through APIs, making it easy for every organization to build meaningful interactions with customers on the channels they prefer.\n\n## Extension settings\n\nIn order to set up this extension, you will need:\n\n1. A Twilio API key or auth token which can be found in the Twilio console.\n2. Your account SID which can be found in the Twilio console.\n3. A phone number to send the message from. This must be a Twilio phone number that you own.\n\n## Custom Actions\n\n### Send SMS\n\nSend an SMS with Twilio to a recipient of your liking.\n\n### Get messages\n\nGet a list of text messages matching the given criteria. Only the last 50 messages are returned.\n\n## Send SMS during working hours\n\nThis action allows for the scheduling of SMS messages to be sent within the \"daily operational hours\" of 9 AM to 5 PM. It ensures that text messages are dispatched at appropriate times during the day, avoiding early morning or late-night disturbances to recipients.\n\n**Here's how it works:**\n\n- If the action is activate during business hours (9 AM to 5 PM), the SMS is sent immediately.\n- If activated before 9 AM, the SMS is scheduled to be sent at 9 AM on the same day.\n- If activated after 5 PM, the SMS is scheduled to be sent at 9 AM the following day.\n\nThis setup ensures that all messages reach your respondents during reasonable daytime hours, enhancing the likelihood of a timely and considerate communication. It's important to mention that messages will still be dispatched over the weekend, but they will adhere to the \"business hours\" schedule of 9 AM to 5 PM.\n\nNote that scheduling messages with Twilio is only possible if you send text messages using a MessagingServiceSid.\n\n\n\n\n\n\n",
139
+ "readme": "---\ntitle: Twilio\ndescription: Twilio is a customer engagement platform used by hundreds of thousands of businesses and more than ten million developers worldwide to build unique, personalized experiences for their customers.\n---\n# Twilio\n\nTwilio is a customer engagement platform used by hundreds of thousands of businesses and more than ten million developers worldwide to build unique, personalized experiences for their customers.\n\nThey are known for democratizing channels like voice, text, chat, video, and email through APIs, making it easy for every organization to build meaningful interactions with customers on the channels they prefer.\n\n## Extension settings\n\nIn order to set up this extension, you will need:\n\n1. A Twilio API key or auth token which can be found in the Twilio console.\n2. Your account SID which can be found in the Twilio console.\n3. A phone number to send the message from. This must be a Twilio phone number that you own.\n\n## User consent\n\nThe extension has some built-in mechanisms to enforce compliance with [Twilio's messaging policy](https://www.twilio.com/en-us/legal/messaging-policy).\n\n### Opt-out\n\nBy default, every text message will be appended with standard opt-out language (\"Reply STOP to unsubscribe.\"). You can specify custom opt-out language within the settings of the extension but make sure the opt-out keywords used are supported. STOP, UNSTOP, UNSUBSCRIBE or CANCEL are the default opt-out keywords supported but Twilio also supports defining custom stop keywords.\n\nIf you don't want to append opt-out language to your text messages, set the \"Add opt-out language\" setting to \"Off\".\n\nFor more information, please visit the Twilio docs.\n\n### Sending text messages to recipients that opted out\n\nIf you attempt to send a text message to a recipient who has opted out, the message will fail to be delivered and the action will be marked as failed. This is the default behavior of Twilio's API, which prevents sending texts to anyone who has chosen to opt out.\n\n## Custom Actions\n\n### Send SMS\n\nSend an SMS with Twilio to a recipient of your liking.\n\n### Get messages\n\nGet a list of text messages matching the given criteria. Only the last 50 messages are returned.\n\n## Send SMS during working hours\n\nThis action allows for the scheduling of SMS messages to be sent within the \"daily operational hours\" of 9 AM to 5 PM. It ensures that text messages are dispatched at appropriate times during the day, avoiding early morning or late-night disturbances to recipients.\n\n**Here's how it works:**\n\n- If the action is activate during business hours (9 AM to 5 PM), the SMS is sent immediately.\n- If activated before 9 AM, the SMS is scheduled to be sent at 9 AM on the same day.\n- If activated after 5 PM, the SMS is scheduled to be sent at 9 AM the following day.\n\nThis setup ensures that all messages reach your respondents during reasonable daytime hours, enhancing the likelihood of a timely and considerate communication. It's important to mention that messages will still be dispatched over the weekend, but they will adhere to the \"business hours\" schedule of 9 AM to 5 PM.\n\nNote that scheduling messages with Twilio is only possible if you send text messages using a MessagingServiceSid.\n\n\n\n\n\n\n",
140
140
  "changelog": "# Twilio changelog\n\n## v2 2024-02-22\n\n1. Add capability to search for messages using all the allowed filters provided by Twilio API. Check here: https://www.twilio.com/docs/messaging/api/message-resource#read-multiple-message-resources\n\n## v2 2023-06-23\n\nFull description: https://github.com/awell-health/awell-extensions/issues/157\n\n1. \"Send SMS\" action\n 1. Change label from \"Send SMS\" to \"Send SMS (with from number)\"\n 2. Throw error when \"From\" number in both settings and in fields is not provided\n2. Add new action \"Send SMS (with Messaging Service)\"\n\n## v2\n\nCompared to v1 (pre-beta release), the extension only has one custom action \"Send SMS\" instead of two. The Custom Action allows for:\n\n1. Sending a text message to a recipient (phone number) stored in a data point, including patient profile data points.\n2. Sending a text message to a fixed recipient (phone number).\n"
141
141
  },
142
142
  "westFax": {
@@ -96,24 +96,24 @@ export declare const FieldsValidationSchema: ZodObject<{
96
96
  firstName?: string | undefined;
97
97
  lastName?: string | undefined;
98
98
  email?: string | undefined;
99
- address?: string | undefined;
100
99
  birthDate?: string | undefined;
101
100
  mobilePhone?: import("libphonenumber-js").E164Number | undefined;
102
101
  city?: string | undefined;
103
102
  country?: string | undefined;
104
103
  state?: string | undefined;
104
+ address?: string | undefined;
105
105
  postalCode?: string | undefined;
106
106
  gender?: "unknown" | "male" | "female" | "other" | undefined;
107
107
  }, {
108
108
  firstName?: string | undefined;
109
109
  lastName?: string | undefined;
110
110
  email?: string | undefined;
111
- address?: string | undefined;
112
111
  birthDate?: "" | Date | undefined;
113
112
  mobilePhone?: string | undefined;
114
113
  city?: string | undefined;
115
114
  country?: string | undefined;
116
115
  state?: string | undefined;
116
+ address?: string | undefined;
117
117
  postalCode?: string | undefined;
118
118
  gender?: "unknown" | "male" | "female" | "other" | undefined;
119
119
  }>;
@@ -15,24 +15,24 @@ export declare const PatientSchema: z.ZodObject<{
15
15
  firstName?: string | undefined;
16
16
  lastName?: string | undefined;
17
17
  email?: string | undefined;
18
- address?: string | undefined;
19
18
  birthDate?: string | undefined;
20
19
  mobilePhone?: import("libphonenumber-js").E164Number | undefined;
21
20
  city?: string | undefined;
22
21
  country?: string | undefined;
23
22
  state?: string | undefined;
23
+ address?: string | undefined;
24
24
  postalCode?: string | undefined;
25
25
  gender?: "unknown" | "male" | "female" | "other" | undefined;
26
26
  }, {
27
27
  firstName?: string | undefined;
28
28
  lastName?: string | undefined;
29
29
  email?: string | undefined;
30
- address?: string | undefined;
31
30
  birthDate?: "" | Date | undefined;
32
31
  mobilePhone?: string | undefined;
33
32
  city?: string | undefined;
34
33
  country?: string | undefined;
35
34
  state?: string | undefined;
35
+ address?: string | undefined;
36
36
  postalCode?: string | undefined;
37
37
  gender?: "unknown" | "male" | "female" | "other" | undefined;
38
38
  }>;