@awell-health/awell-extensions 1.0.76 → 1.0.79

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.
@@ -56,7 +56,7 @@ exports.createEmbeddedSignatureRequestWithTemplate = {
56
56
  userName: signerName,
57
57
  clientUserId: patientId,
58
58
  returnUrl: (0, utils_1.replaceStringVariables)(returnUrlTemplate, {
59
- sessionId,
59
+ sessionId: sessionId !== null && sessionId !== void 0 ? sessionId : '',
60
60
  stakeholderId: patientId,
61
61
  pathwayId,
62
62
  activityId,
@@ -1 +1 @@
1
- {"version":3,"file":"createEmbeddedSignatureRequestWithTemplate.js","sourceRoot":"","sources":["../../../../../extensions/docuSign/actions/createEmbeddedSignatureRequestWithTemplate/createEmbeddedSignatureRequestWithTemplate.ts"],"names":[],"mappings":";;;;;;AACA,oEAAwC;AACxC,mEAAwD;AACxD,+DAAmD;AACnD,qCAAmE;AACnE,6CAAgE;AAChE,6BAA8B;AAC9B,wDAAuD;AACvD,0CAAwD;AACxD,0CAAuD;AAE1C,QAAA,0CAA0C,GAGnD;IACF,GAAG,EAAE,4CAA4C;IACjD,KAAK,EAAE,iDAAiD;IACxD,WAAW,EACT,kIAAkI;IACpI,QAAQ,EAAE,0BAAQ,CAAC,mBAAmB;IACtC,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;;QACxD,IAAI;YACF,MAAM,EACJ,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAC1B,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAC1B,QAAQ,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,GACxC,GAAG,OAAO,CAAA;YAEX,MAAM,EACJ,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,OAA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E;6BAChE;yBACF;qBACF;iBACF,CAAC,CAAA;gBACF,OAAM;aACP;YAED,MAAM,KAAK,GAAG,GAAY,CAAA;YAC1B,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,qDAAqD,EAAE;wBACnE,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,KAAK,CAAC,OAAO;yBACvB;qBACF;iBACF;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"createEmbeddedSignatureRequestWithTemplate.js","sourceRoot":"","sources":["../../../../../extensions/docuSign/actions/createEmbeddedSignatureRequestWithTemplate/createEmbeddedSignatureRequestWithTemplate.ts"],"names":[],"mappings":";;;;;;AACA,oEAAwC;AACxC,mEAAwD;AACxD,+DAAmD;AACnD,qCAAmE;AACnE,6CAAgE;AAChE,6BAA8B;AAC9B,wDAAuD;AACvD,0CAAwD;AACxD,0CAAuD;AAE1C,QAAA,0CAA0C,GAGnD;IACF,GAAG,EAAE,4CAA4C;IACjD,KAAK,EAAE,iDAAiD;IACxD,WAAW,EACT,kIAAkI;IACpI,QAAQ,EAAE,0BAAQ,CAAC,mBAAmB;IACtC,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;;QACxD,IAAI;YACF,MAAM,EACJ,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAC1B,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAC1B,QAAQ,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,GACxC,GAAG,OAAO,CAAA;YAEX,MAAM,EACJ,UAAU,EACV,UAAU,EACV,kBAAkB,E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C,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE;6BAChE;yBACF;qBACF;iBACF,CAAC,CAAA;gBACF,OAAM;aACP;YAED,MAAM,KAAK,GAAG,GAAY,CAAA;YAC1B,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,qDAAqD,EAAE;wBACnE,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,KAAK,CAAC,OAAO;yBACvB;qBACF;iBACF;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
@@ -50,7 +50,7 @@ export declare const actions: {
50
50
  description: string;
51
51
  required: true;
52
52
  };
53
- }, "sex" | "firstName" | "lastName" | "mobilePhone" | "preferredLanguage" | "notes" | "pronouns" | "dob" | "ssn" | "race" | "ethnicity" | "primaryPhysicianId" | "caregiverPracticeId" | "middleName" | "actualName" | "genderIdentity" | "legalGenderMarker" | "sexualOrientation" | "previousFirstName" | "previousLastName">;
53
+ }, "sex" | "firstName" | "lastName" | "mobilePhone" | "preferredLanguage" | "notes" | "pronouns" | "dob" | "ssn" | "race" | "ethnicity" | "primaryPhysicianId" | "caregiverPracticeId" | "middleName" | "actualName" | "genderIdentity" | "legalGenderMarker" | "sexualOrientation" | "previousFirstName" | "previousLastName", never>;
54
54
  createPatient: import("@awell-health/extensions-core").Action<{
55
55
  firstName: {
56
56
  id: string;
@@ -215,7 +215,7 @@ export declare const actions: {
215
215
  description: string;
216
216
  required: true;
217
217
  };
218
- }, "patientId">;
218
+ }, "patientId", never>;
219
219
  updatePatient: import("@awell-health/extensions-core").Action<{
220
220
  patientId: {
221
221
  id: string;
@@ -387,7 +387,7 @@ export declare const actions: {
387
387
  description: string;
388
388
  required: true;
389
389
  };
390
- }, never>;
390
+ }, never, never>;
391
391
  createAppointment: import("@awell-health/extensions-core").Action<{
392
392
  scheduledDate: {
393
393
  id: string;
@@ -491,7 +491,7 @@ export declare const actions: {
491
491
  description: string;
492
492
  required: true;
493
493
  };
494
- }, "appointmentId">;
494
+ }, "appointmentId", never>;
495
495
  getAppointment: import("@awell-health/extensions-core").Action<{
496
496
  appointmentId: {
497
497
  id: string;
@@ -543,7 +543,7 @@ export declare const actions: {
543
543
  description: string;
544
544
  required: true;
545
545
  };
546
- }, "reason" | "description" | "duration" | "patientId" | "scheduledDate" | "physicianId" | "practiceId" | "serviceLocationId" | "telehealthDetails">;
546
+ }, "reason" | "description" | "duration" | "patientId" | "scheduledDate" | "physicianId" | "practiceId" | "serviceLocationId" | "telehealthDetails", never>;
547
547
  findPhysician: import("@awell-health/extensions-core").Action<{
548
548
  firstName: {
549
549
  id: string;
@@ -609,7 +609,7 @@ export declare const actions: {
609
609
  description: string;
610
610
  required: true;
611
611
  };
612
- }, "caregiverPracticeId" | "physicianId" | "physicianFirstName" | "physicianLastName" | "physicianCredentials" | "physicianEmail" | "physicianNPI" | "physicianUserId">;
612
+ }, "caregiverPracticeId" | "physicianId" | "physicianFirstName" | "physicianLastName" | "physicianCredentials" | "physicianEmail" | "physicianNPI" | "physicianUserId", never>;
613
613
  createNonVisitNote: import("@awell-health/extensions-core").Action<{
614
614
  text: {
615
615
  id: string;
@@ -711,7 +711,7 @@ export declare const actions: {
711
711
  description: string;
712
712
  required: true;
713
713
  };
714
- }, "nonVisitNoteId" | "nonVisitNoteBulletId">;
714
+ }, "nonVisitNoteId" | "nonVisitNoteBulletId", never>;
715
715
  updateNonVisitNote: import("@awell-health/extensions-core").Action<{
716
716
  nonVisitNoteId: {
717
717
  id: string;
@@ -827,7 +827,7 @@ export declare const actions: {
827
827
  description: string;
828
828
  required: true;
829
829
  };
830
- }, string>;
830
+ }, string, never>;
831
831
  getNonVisitNote: import("@awell-health/extensions-core").Action<{
832
832
  nonVisitNoteId: {
833
833
  id: string;
@@ -879,7 +879,7 @@ export declare const actions: {
879
879
  description: string;
880
880
  required: true;
881
881
  };
882
- }, "text" | "tags" | "patientId" | "practiceId" | "authorId" | "documentDate" | "chartDate">;
882
+ }, "text" | "tags" | "patientId" | "practiceId" | "authorId" | "documentDate" | "chartDate", never>;
883
883
  deleteNonVisitNote: import("@awell-health/extensions-core").Action<{
884
884
  nonVisitNoteId: {
885
885
  id: string;
@@ -931,5 +931,5 @@ export declare const actions: {
931
931
  description: string;
932
932
  required: true;
933
933
  };
934
- }, string>;
934
+ }, string, never>;
935
935
  };
@@ -49,7 +49,7 @@ export declare const actions: {
49
49
  required: true;
50
50
  description: string;
51
51
  };
52
- }, "appointmentId">;
52
+ }, "appointmentId", never>;
53
53
  createTask: import("@awell-health/extensions-core").Action<{
54
54
  patientId: {
55
55
  id: string;
@@ -123,7 +123,7 @@ export declare const actions: {
123
123
  required: true;
124
124
  description: string;
125
125
  };
126
- }, "taskId">;
126
+ }, "taskId", never>;
127
127
  getAppointment: import("@awell-health/extensions-core").Action<{
128
128
  appointmentId: {
129
129
  id: string;
@@ -146,7 +146,7 @@ export declare const actions: {
146
146
  required: true;
147
147
  description: string;
148
148
  };
149
- }, "date" | "patientId" | "appointmentTypeId" | "appointmentTypeName" | "contactType">;
149
+ }, "date" | "patientId" | "appointmentTypeId" | "appointmentTypeName" | "contactType", never>;
150
150
  getPatient: import("@awell-health/extensions-core").Action<{
151
151
  patientId: {
152
152
  id: string;
@@ -169,7 +169,7 @@ export declare const actions: {
169
169
  required: true;
170
170
  description: string;
171
171
  };
172
- }, "email" | "firstName" | "lastName" | "dob" | "gender" | "phoneNumber" | "primaryProviderId" | "groupName">;
172
+ }, "email" | "firstName" | "lastName" | "dob" | "gender" | "phoneNumber" | "primaryProviderId" | "groupName", never>;
173
173
  sendChatMessage: import("@awell-health/extensions-core").Action<{
174
174
  healthie_patient_id: {
175
175
  id: string;
@@ -207,7 +207,7 @@ export declare const actions: {
207
207
  required: true;
208
208
  description: string;
209
209
  };
210
- }, "conversationId">;
210
+ }, "conversationId", never>;
211
211
  createPatient: import("@awell-health/extensions-core").Action<{
212
212
  first_name: {
213
213
  id: string;
@@ -276,7 +276,7 @@ export declare const actions: {
276
276
  required: true;
277
277
  description: string;
278
278
  };
279
- }, "healthiePatientId">;
279
+ }, "healthiePatientId", never>;
280
280
  updatePatient: import("@awell-health/extensions-core").Action<{
281
281
  id: {
282
282
  id: string;
@@ -385,7 +385,7 @@ export declare const actions: {
385
385
  required: true;
386
386
  description: string;
387
387
  };
388
- }, string>;
388
+ }, string, never>;
389
389
  applyTagToPatient: import("@awell-health/extensions-core").Action<{
390
390
  id: {
391
391
  id: string;
@@ -416,7 +416,7 @@ export declare const actions: {
416
416
  required: true;
417
417
  description: string;
418
418
  };
419
- }, string>;
419
+ }, string, never>;
420
420
  removeTagFromPatient: import("@awell-health/extensions-core").Action<{
421
421
  id: {
422
422
  id: string;
@@ -447,7 +447,7 @@ export declare const actions: {
447
447
  required: true;
448
448
  description: string;
449
449
  };
450
- }, string>;
450
+ }, string, never>;
451
451
  createChartingNote: import("@awell-health/extensions-core").Action<{
452
452
  healthie_patient_id: {
453
453
  id: string;
@@ -485,7 +485,7 @@ export declare const actions: {
485
485
  required: true;
486
486
  description: string;
487
487
  };
488
- }, string>;
488
+ }, string, never>;
489
489
  sendFormCompletionRequest: import("@awell-health/extensions-core").Action<{
490
490
  healthie_patient_id: {
491
491
  id: string;
@@ -501,6 +501,62 @@ export declare const actions: {
501
501
  type: import("@awell-health/extensions-core").FieldType.STRING;
502
502
  required: true;
503
503
  };
504
+ is_recurring: {
505
+ id: string;
506
+ label: string;
507
+ description: string;
508
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
509
+ required: false;
510
+ };
511
+ frequency: {
512
+ id: string;
513
+ label: string;
514
+ description: string;
515
+ type: import("@awell-health/extensions-core").FieldType.STRING;
516
+ required: false;
517
+ };
518
+ period: {
519
+ id: string;
520
+ label: string;
521
+ description: string;
522
+ type: import("@awell-health/extensions-core").FieldType.STRING;
523
+ required: false;
524
+ };
525
+ hour: {
526
+ id: string;
527
+ label: string;
528
+ description: string;
529
+ type: import("@awell-health/extensions-core").FieldType.NUMERIC;
530
+ required: false;
531
+ };
532
+ minute: {
533
+ id: string;
534
+ label: string;
535
+ description: string;
536
+ type: import("@awell-health/extensions-core").FieldType.NUMERIC;
537
+ required: false;
538
+ };
539
+ weekday: {
540
+ id: string;
541
+ label: string;
542
+ description: string;
543
+ type: import("@awell-health/extensions-core").FieldType.STRING;
544
+ required: false;
545
+ };
546
+ monthday: {
547
+ id: string;
548
+ label: string;
549
+ description: string;
550
+ type: import("@awell-health/extensions-core").FieldType.STRING;
551
+ required: false;
552
+ };
553
+ ends_on: {
554
+ id: string;
555
+ label: string;
556
+ description: string;
557
+ type: import("@awell-health/extensions-core").FieldType.DATE;
558
+ required: false;
559
+ };
504
560
  }, {
505
561
  apiUrl: {
506
562
  key: string;
@@ -516,7 +572,7 @@ export declare const actions: {
516
572
  required: true;
517
573
  description: string;
518
574
  };
519
- }, string>;
575
+ }, string, never>;
520
576
  archivePatient: import("@awell-health/extensions-core").Action<{
521
577
  id: {
522
578
  id: string;
@@ -540,7 +596,7 @@ export declare const actions: {
540
596
  required: true;
541
597
  description: string;
542
598
  };
543
- }, string>;
599
+ }, string, never>;
544
600
  /**
545
601
  * There is bug in Healthie that prevents linking an address with a patient
546
602
  * Waiting for fix
@@ -575,7 +631,7 @@ export declare const actions: {
575
631
  required: true;
576
632
  description: string;
577
633
  };
578
- }, string>;
634
+ }, string, never>;
579
635
  deleteAppointment: import("@awell-health/extensions-core").Action<{
580
636
  id: {
581
637
  id: string;
@@ -599,7 +655,7 @@ export declare const actions: {
599
655
  required: true;
600
656
  description: string;
601
657
  };
602
- }, string>;
658
+ }, string, never>;
603
659
  cancelAppointment: import("@awell-health/extensions-core").Action<{
604
660
  id: {
605
661
  id: string;
@@ -623,7 +679,7 @@ export declare const actions: {
623
679
  required: true;
624
680
  description: string;
625
681
  };
626
- }, string>;
682
+ }, string, never>;
627
683
  /**
628
684
  * Specs of this API endpoint are unclear so we are not sure what
629
685
  * functional value it delivers in the current state. Needs to be revisited.
@@ -651,7 +707,7 @@ export declare const actions: {
651
707
  required: true;
652
708
  description: string;
653
709
  };
654
- }, string>;
710
+ }, string, never>;
655
711
  completeTask: import("@awell-health/extensions-core").Action<{
656
712
  id: {
657
713
  id: string;
@@ -675,7 +731,7 @@ export declare const actions: {
675
731
  required: true;
676
732
  description: string;
677
733
  };
678
- }, string>;
734
+ }, string, never>;
679
735
  assignPatientToGroup: import("@awell-health/extensions-core").Action<{
680
736
  id: {
681
737
  id: string;
@@ -706,5 +762,5 @@ export declare const actions: {
706
762
  required: true;
707
763
  description: string;
708
764
  };
709
- }, string>;
765
+ }, string, never>;
710
766
  };
@@ -15,6 +15,62 @@ declare const fields: {
15
15
  type: FieldType.STRING;
16
16
  required: true;
17
17
  };
18
+ is_recurring: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ type: FieldType.BOOLEAN;
23
+ required: false;
24
+ };
25
+ frequency: {
26
+ id: string;
27
+ label: string;
28
+ description: string;
29
+ type: FieldType.STRING;
30
+ required: false;
31
+ };
32
+ period: {
33
+ id: string;
34
+ label: string;
35
+ description: string;
36
+ type: FieldType.STRING;
37
+ required: false;
38
+ };
39
+ hour: {
40
+ id: string;
41
+ label: string;
42
+ description: string;
43
+ type: FieldType.NUMERIC;
44
+ required: false;
45
+ };
46
+ minute: {
47
+ id: string;
48
+ label: string;
49
+ description: string;
50
+ type: FieldType.NUMERIC;
51
+ required: false;
52
+ };
53
+ weekday: {
54
+ id: string;
55
+ label: string;
56
+ description: string;
57
+ type: FieldType.STRING;
58
+ required: false;
59
+ };
60
+ monthday: {
61
+ id: string;
62
+ label: string;
63
+ description: string;
64
+ type: FieldType.STRING;
65
+ required: false;
66
+ };
67
+ ends_on: {
68
+ id: string;
69
+ label: string;
70
+ description: string;
71
+ type: FieldType.DATE;
72
+ required: false;
73
+ };
18
74
  };
19
75
  export declare const sendFormCompletionRequest: Action<typeof fields, typeof settings>;
20
76
  export {};
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendFormCompletionRequest = void 0;
4
- const lodash_1 = require("lodash");
5
4
  const errors_1 = require("../errors");
6
5
  const extensions_core_1 = require("@awell-health/extensions-core");
7
6
  const extensions_core_2 = require("@awell-health/extensions-core");
8
7
  const sdk_1 = require("../gql/sdk");
9
8
  const graphqlClient_1 = require("../graphqlClient");
9
+ const sendFormCompletionRequest_zod_1 = require("../validation/sendFormCompletionRequest.zod");
10
+ const lodash_1 = require("lodash");
10
11
  const fields = {
11
12
  healthie_patient_id: {
12
13
  id: 'healthie_patient_id',
@@ -22,6 +23,62 @@ const fields = {
22
23
  type: extensions_core_1.FieldType.STRING,
23
24
  required: true,
24
25
  },
26
+ is_recurring: {
27
+ id: 'is_recurring',
28
+ label: 'Is recurring',
29
+ description: 'Set to true if the Form completion should be recurring.',
30
+ type: extensions_core_1.FieldType.BOOLEAN,
31
+ required: false,
32
+ },
33
+ frequency: {
34
+ id: 'frequency',
35
+ label: 'Frequency',
36
+ description: 'Required if "Is recurring" is set to true. Valid options are: Daily, Weekly, Monthly.',
37
+ type: extensions_core_1.FieldType.STRING,
38
+ required: false,
39
+ },
40
+ period: {
41
+ id: 'period',
42
+ label: 'Period',
43
+ description: 'AM or PM.',
44
+ type: extensions_core_1.FieldType.STRING,
45
+ required: false,
46
+ },
47
+ hour: {
48
+ id: 'hour',
49
+ label: 'Hour',
50
+ description: 'For instance, if you want to trigger the completion request at 1:05 PM, use "1".',
51
+ type: extensions_core_1.FieldType.NUMERIC,
52
+ required: false,
53
+ },
54
+ minute: {
55
+ id: 'minute',
56
+ label: 'Minute',
57
+ description: 'For instance, if you want to trigger the completion request at 1:05 PM, use "5".',
58
+ type: extensions_core_1.FieldType.NUMERIC,
59
+ required: false,
60
+ },
61
+ weekday: {
62
+ id: 'weekday',
63
+ label: 'Weekday',
64
+ description: 'Use the full weekday name, e.g. "Monday".',
65
+ type: extensions_core_1.FieldType.STRING,
66
+ required: false,
67
+ },
68
+ monthday: {
69
+ id: 'monthday',
70
+ label: 'Monthday',
71
+ description: 'Number of the day of month, e.g. "27th".',
72
+ type: extensions_core_1.FieldType.STRING,
73
+ required: false,
74
+ },
75
+ ends_on: {
76
+ id: 'ends_on',
77
+ label: 'Ends on',
78
+ description: 'Recurrence end date in the YYYY-MM-DD format.',
79
+ type: extensions_core_1.FieldType.DATE,
80
+ required: false,
81
+ },
25
82
  };
26
83
  exports.sendFormCompletionRequest = {
27
84
  key: 'sendFormCompletionRequest',
@@ -32,23 +89,8 @@ exports.sendFormCompletionRequest = {
32
89
  previewable: true,
33
90
  onActivityCreated: async (payload, onComplete, onError) => {
34
91
  const { fields, settings } = payload;
35
- const { healthie_patient_id, form_id } = fields;
36
92
  try {
37
- if ((0, lodash_1.isNil)(healthie_patient_id) || (0, lodash_1.isNil)(form_id)) {
38
- await onError({
39
- events: [
40
- {
41
- date: new Date().toISOString(),
42
- text: { en: 'Fields are missing' },
43
- error: {
44
- category: 'MISSING_FIELDS',
45
- message: '`healthie_patient_id` or `form_id` is missing',
46
- },
47
- },
48
- ],
49
- });
50
- return;
51
- }
93
+ const { healthie_patient_id, form_id, is_recurring, frequency, monthday, weekday, hour, minute, period, ends_on, } = sendFormCompletionRequest_zod_1.FieldsSchema.parse(fields);
52
94
  const client = (0, graphqlClient_1.initialiseClient)(settings);
53
95
  if (client !== undefined) {
54
96
  const sdk = (0, sdk_1.getSdk)(client);
@@ -63,6 +105,15 @@ exports.sendFormCompletionRequest = {
63
105
  */
64
106
  recipient_ids: healthie_patient_id,
65
107
  form: form_id,
108
+ is_recurring: is_recurring !== null && is_recurring !== void 0 ? is_recurring : false,
109
+ frequency,
110
+ monthday,
111
+ weekday,
112
+ hour,
113
+ minute,
114
+ period,
115
+ recurrence_ends: !(0, lodash_1.isNil)(ends_on),
116
+ ends_on,
66
117
  },
67
118
  });
68
119
  await onComplete();
@@ -1 +1 @@
1
- {"version":3,"file":"sendFormCompletionRequest.js","sourceRoot":"","sources":["../../../../extensions/healthie/actions/sendFormCompletionRequest.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAC9B,sCAAqE;AACrE,mEAIsC;AACtC,mEAAwD;AACxD,oCAAmC;AACnC,oDAAmD;AAGnD,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,wEAAwE;QAC1E,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,4DAA4D;QACzE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,yBAAyB,GACpC;IACE,GAAG,EAAE,2BAA2B;IAChC,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,0DAA0D;IACvE,MAAM;IACN,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;QACpC,MAAM,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;QAC/C,IAAI;YACF,IAAI,IAAA,cAAK,EAAC,mBAAmB,CAAC,IAAI,IAAA,cAAK,EAAC,OAAO,CAAC,EAAE;gBAChD,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE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ACxB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"sendFormCompletionRequest.js","sourceRoot":"","sources":["../../../../extensions/healthie/actions/sendFormCompletionRequest.ts"],"names":[],"mappings":";;;AAAA,sCAAqE;AACrE,mEAIsC;AACtC,mEAAwD;AACxD,oCAAmC;AACnC,oDAAmD;AAEnD,+FAA0E;AAC1E,mCAA8B;AAE9B,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,wEAAwE;QAC1E,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,4DAA4D;QACzE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,yDAAyD;QACtE,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,WAAW;QAClB,WAAW,EACT,uFAAuF;QACzF,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EACT,kFAAkF;QACpF,IAA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E,gCAAgC,EAAE;4BAC9C,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
@@ -0,0 +1,57 @@
1
+ import { z } from 'zod';
2
+ export declare const FieldsSchema: z.ZodEffects<z.ZodObject<{
3
+ healthie_patient_id: z.ZodString;
4
+ form_id: z.ZodString;
5
+ is_recurring: z.ZodOptional<z.ZodBoolean>;
6
+ frequency: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7
+ period: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
8
+ minute: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
9
+ hour: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
10
+ weekday: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
11
+ monthday: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
12
+ ends_on: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodDate, string, Date>>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ healthie_patient_id: string;
15
+ form_id: string;
16
+ is_recurring?: boolean | undefined;
17
+ frequency?: string | undefined;
18
+ period?: string | undefined;
19
+ minute?: string | undefined;
20
+ hour?: string | undefined;
21
+ weekday?: string | undefined;
22
+ monthday?: string | undefined;
23
+ ends_on?: string | undefined;
24
+ }, {
25
+ healthie_patient_id: string;
26
+ form_id: string;
27
+ is_recurring?: boolean | undefined;
28
+ frequency?: string | undefined;
29
+ period?: string | undefined;
30
+ minute?: string | undefined;
31
+ hour?: string | undefined;
32
+ weekday?: string | undefined;
33
+ monthday?: string | undefined;
34
+ ends_on?: "" | Date | undefined;
35
+ }>, {
36
+ healthie_patient_id: string;
37
+ form_id: string;
38
+ is_recurring?: boolean | undefined;
39
+ frequency?: string | undefined;
40
+ period?: string | undefined;
41
+ minute?: string | undefined;
42
+ hour?: string | undefined;
43
+ weekday?: string | undefined;
44
+ monthday?: string | undefined;
45
+ ends_on?: string | undefined;
46
+ }, {
47
+ healthie_patient_id: string;
48
+ form_id: string;
49
+ is_recurring?: boolean | undefined;
50
+ frequency?: string | undefined;
51
+ period?: string | undefined;
52
+ minute?: string | undefined;
53
+ hour?: string | undefined;
54
+ weekday?: string | undefined;
55
+ monthday?: string | undefined;
56
+ ends_on?: "" | Date | undefined;
57
+ }>;
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsSchema = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const lodash_1 = require("lodash");
6
+ const zod_1 = require("zod");
7
+ const periodEnum = zod_1.z.enum(['AM', 'PM']);
8
+ const frequencyEnum = zod_1.z.enum(['Daily', 'Weekly', 'Monthly']);
9
+ const weekdayEnum = zod_1.z.enum([
10
+ 'Monday',
11
+ 'Tuesday',
12
+ 'Wednesday',
13
+ 'Thursday',
14
+ 'Friday',
15
+ 'Saturday',
16
+ 'Sunday',
17
+ ]);
18
+ // healthie doesn't validate correct form and can lead to errors - validation on our side
19
+ const monthdayEnum = zod_1.z.enum([
20
+ '1st',
21
+ '2nd',
22
+ '3rd',
23
+ '4th',
24
+ '5th',
25
+ '6th',
26
+ '7th',
27
+ '8th',
28
+ '9th',
29
+ '10th',
30
+ '11th',
31
+ '12th',
32
+ '13th',
33
+ '14th',
34
+ '15th',
35
+ '16th',
36
+ '17th',
37
+ '18th',
38
+ '19th',
39
+ '20th',
40
+ '21st',
41
+ '22nd',
42
+ '23rd',
43
+ '24th',
44
+ '25th',
45
+ '26th',
46
+ '27th',
47
+ '28th',
48
+ '29th',
49
+ '30th',
50
+ '31st',
51
+ ]);
52
+ const recurringSchema = zod_1.z.discriminatedUnion('frequency', [
53
+ /**
54
+ * If `frequency` is "daily"
55
+ * then "period", "hour" and "minute" are required
56
+ */
57
+ zod_1.z.object({
58
+ frequency: zod_1.z.literal(frequencyEnum.enum.Daily),
59
+ hour: zod_1.z.coerce.number().min(1).max(12).transform(String),
60
+ minute: zod_1.z.coerce.number().min(0).max(59).transform(String),
61
+ period: periodEnum,
62
+ }),
63
+ /**
64
+ * If `frequency` is "weekly"
65
+ * then "weekday" is required
66
+ */
67
+ zod_1.z.object({
68
+ frequency: zod_1.z.literal(frequencyEnum.enum.Weekly),
69
+ weekday: weekdayEnum,
70
+ }),
71
+ /**
72
+ * If `frequency` is "monthly"
73
+ * then "monthday" is required
74
+ */
75
+ zod_1.z.object({
76
+ frequency: zod_1.z.literal(frequencyEnum.enum.Monthly),
77
+ monthday: monthdayEnum,
78
+ }),
79
+ ]);
80
+ exports.FieldsSchema = zod_1.z
81
+ .object({
82
+ healthie_patient_id: zod_1.z.string().nonempty(),
83
+ form_id: zod_1.z.string().nonempty(),
84
+ is_recurring: zod_1.z.boolean().optional(),
85
+ frequency: zod_1.z.string().transform(lodash_1.capitalize).optional(),
86
+ period: (0, extensions_core_1.makeStringOptional)(zod_1.z.string().toUpperCase()),
87
+ minute: (0, extensions_core_1.makeStringOptional)(zod_1.z.coerce.string()),
88
+ hour: (0, extensions_core_1.makeStringOptional)(zod_1.z.coerce.string()),
89
+ weekday: (0, extensions_core_1.makeStringOptional)(zod_1.z.string().transform(lodash_1.capitalize)),
90
+ monthday: (0, extensions_core_1.makeStringOptional)(zod_1.z.string().toLowerCase()),
91
+ ends_on: extensions_core_1.DateOnlyOptionalSchema,
92
+ })
93
+ .superRefine(({ healthie_patient_id, form_id, is_recurring, frequency, monthday, weekday, hour, minute, period, ends_on, }, ctx) => {
94
+ // if is recurring, then check
95
+ if (is_recurring === true) {
96
+ recurringSchema.parse({
97
+ frequency,
98
+ hour,
99
+ minute,
100
+ period,
101
+ weekday,
102
+ monthday,
103
+ });
104
+ }
105
+ });
106
+ //# sourceMappingURL=sendFormCompletionRequest.zod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendFormCompletionRequest.zod.js","sourceRoot":"","sources":["../../../../extensions/healthie/validation/sendFormCompletionRequest.zod.ts"],"names":[],"mappings":";;;AAAA,mEAGsC;AACtC,mCAAmC;AACnC,6BAAuB;AAEvB,MAAM,UAAU,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AACvC,MAAM,aAAa,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAA;AAC5D,MAAM,WAAW,GAAG,OAAC,CAAC,IAAI,CAAC;IACzB,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,QAAQ;IACR,UAAU;IACV,QAAQ;CACT,CAAC,CAAA;AACF,yFAAyF;AACzF,MAAM,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC;IAC1B,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC,CAAA;AAEF,MAAM,eAAe,GAAG,OAAC,CAAC,kBAAkB,CAAC,WAAW,EAAE;IACxD;;;OAGG;IACH,OAAC,CAAC,MAAM,CAAC;QACP,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,C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C,MAAM,CAAC,MAAM,EAAE,CAAC;IAC3C,OAAO,EAAE,IAAA,oCAAkB,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,mBAAU,CAAC,CAAC;IAC7D,QAAQ,EAAE,IAAA,oCAAkB,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC;IACtD,OAAO,EAAE,wCAAsB;CAChC,CAAC;KACD,WAAW,CACV,CACE,EACE,mBAAmB,EACnB,OAAO,EACP,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,GACR,EACD,GAAG,EACH,EAAE;IACF,8BAA8B;IAC9B,IAAI,YAAY,KAAK,IAAI,EAAE;QACzB,eAAe,CAAC,KAAK,CAAC;YACpB,SAAS;YACT,IAAI;YACJ,MAAM;YACN,MAAM;YACN,OAAO;YACP,QAAQ;SACT,CAAC,CAAA;KACH;AACH,CAAC,CACF,CAAA"}
@@ -3,4 +3,4 @@ export type Markdown = Record<string, {
3
3
  changelog: string;
4
4
  }>;
5
5
  export declare const markdown: Markdown;
6
- export declare const extensions: import("@awell-health/extensions-core").Extension[];
6
+ export declare const extensions: import("@awell-health/extensions-core").Extension<any>[];
@@ -22,7 +22,7 @@ export declare const actions: {
22
22
  description: string;
23
23
  required: false;
24
24
  };
25
- }, "state" | "email" | "phone" | "firstName" | "lastName" | "city" | "country" | "zip" | "dob" | "addressLine1" | "addressLine2" | "genderAtBirth" | "driversLicenseValue" | "driversLicenseState">;
25
+ }, "state" | "email" | "phone" | "firstName" | "lastName" | "city" | "country" | "zip" | "dob" | "addressLine1" | "addressLine2" | "genderAtBirth" | "driversLicenseValue" | "driversLicenseState", never>;
26
26
  createPatient: import("@awell-health/extensions-core").Action<{
27
27
  phone: {
28
28
  id: string;
@@ -139,7 +139,7 @@ export declare const actions: {
139
139
  description: string;
140
140
  required: false;
141
141
  };
142
- }, "patientId">;
142
+ }, "patientId", never>;
143
143
  updatePatient: import("@awell-health/extensions-core").Action<{
144
144
  phone: {
145
145
  id: string;
@@ -263,7 +263,7 @@ export declare const actions: {
263
263
  description: string;
264
264
  required: false;
265
265
  };
266
- }, string>;
266
+ }, string, never>;
267
267
  deletePatient: import("@awell-health/extensions-core").Action<{
268
268
  facilityId: {
269
269
  id: string;
@@ -294,7 +294,7 @@ export declare const actions: {
294
294
  description: string;
295
295
  required: false;
296
296
  };
297
- }, string>;
297
+ }, string, never>;
298
298
  listDocuments: import("@awell-health/extensions-core").Action<{
299
299
  patientId: {
300
300
  id: string;
@@ -325,7 +325,7 @@ export declare const actions: {
325
325
  description: string;
326
326
  required: false;
327
327
  };
328
- }, "queryStatus" | "queryProgressTotal" | "queryProgressComplete">;
328
+ }, "queryStatus" | "queryProgressTotal" | "queryProgressComplete", never>;
329
329
  queryDocs: import("@awell-health/extensions-core").Action<{
330
330
  patientId: {
331
331
  id: string;
@@ -356,7 +356,7 @@ export declare const actions: {
356
356
  description: string;
357
357
  required: false;
358
358
  };
359
- }, "queryStatus" | "queryProgressTotal" | "queryProgressComplete">;
359
+ }, "queryStatus" | "queryProgressTotal" | "queryProgressComplete", never>;
360
360
  getUrl: import("@awell-health/extensions-core").Action<{
361
361
  fileName: {
362
362
  id: string;
@@ -380,5 +380,5 @@ export declare const actions: {
380
380
  description: string;
381
381
  required: false;
382
382
  };
383
- }, "url">;
383
+ }, "url", never>;
384
384
  };
@@ -71,7 +71,7 @@ export declare const actions: {
71
71
  required: true;
72
72
  description: string;
73
73
  };
74
- }, "activeOverride" | "overrideDate">;
74
+ }, "activeOverride" | "overrideDate", never>;
75
75
  checkForScheduledAppointment: import("@awell-health/extensions-core").Action<{
76
76
  appointmentTypeId: {
77
77
  id: string;
@@ -151,7 +151,7 @@ export declare const actions: {
151
151
  required: true;
152
152
  description: string;
153
153
  };
154
- }, "appointmentScheduled">;
154
+ }, "appointmentScheduled", never>;
155
155
  checkForChat: import("@awell-health/extensions-core").Action<{
156
156
  patientId: {
157
157
  id: string;
@@ -238,7 +238,7 @@ export declare const actions: {
238
238
  required: true;
239
239
  description: string;
240
240
  };
241
- }, "messageSent">;
241
+ }, "messageSent", never>;
242
242
  checkForCheckInOverride: import("@awell-health/extensions-core").Action<{
243
243
  patientId: {
244
244
  id: string;
@@ -318,7 +318,7 @@ export declare const actions: {
318
318
  required: true;
319
319
  description: string;
320
320
  };
321
- }, "activeOverride">;
321
+ }, "activeOverride", never>;
322
322
  insertMemberListEvent: import("@awell-health/extensions-core").Action<{
323
323
  eventName: {
324
324
  id: string;
@@ -433,5 +433,5 @@ export declare const actions: {
433
433
  required: true;
434
434
  description: string;
435
435
  };
436
- }, "insertSuccessful">;
436
+ }, "insertSuccessful", never>;
437
437
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.76",
3
+ "version": "1.0.79",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -60,7 +60,7 @@
60
60
  "typescript": "4.9.5"
61
61
  },
62
62
  "dependencies": {
63
- "@awell-health/extensions-core": "0.1.9",
63
+ "@awell-health/extensions-core": "0.1.21",
64
64
  "@dropbox/sign": "^1.1.3",
65
65
  "@mailchimp/mailchimp_transactional": "^1.0.50",
66
66
  "@metriport/api": "^3.1.5",