@awell-health/awell-extensions 2.0.196 → 2.0.198

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 (94) hide show
  1. package/dist/extensions/elation/actions/checkPatientTags/checkPatientTags.d.ts +12 -0
  2. package/dist/extensions/elation/actions/checkPatientTags/checkPatientTags.js +63 -0
  3. package/dist/extensions/elation/actions/checkPatientTags/checkPatientTags.js.map +1 -0
  4. package/dist/extensions/elation/actions/checkPatientTags/config/dataPoints.d.ts +10 -0
  5. package/dist/extensions/elation/actions/checkPatientTags/config/dataPoints.js +14 -0
  6. package/dist/extensions/elation/actions/checkPatientTags/config/dataPoints.js.map +1 -0
  7. package/dist/extensions/elation/actions/checkPatientTags/config/fields.d.ts +28 -0
  8. package/dist/extensions/elation/actions/checkPatientTags/config/fields.js +26 -0
  9. package/dist/extensions/elation/actions/checkPatientTags/config/fields.js.map +1 -0
  10. package/dist/extensions/elation/actions/checkPatientTags/config/index.d.ts +2 -0
  11. package/dist/extensions/elation/actions/checkPatientTags/config/index.js +9 -0
  12. package/dist/extensions/elation/actions/checkPatientTags/config/index.js.map +1 -0
  13. package/dist/extensions/elation/actions/checkPatientTags/index.d.ts +1 -0
  14. package/dist/extensions/elation/actions/checkPatientTags/index.js +6 -0
  15. package/dist/extensions/elation/actions/checkPatientTags/index.js.map +1 -0
  16. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/checkTagsWithLLM.d.ts +13 -0
  17. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/checkTagsWithLLM.js +29 -0
  18. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/checkTagsWithLLM.js.map +1 -0
  19. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/parser.d.ts +23 -0
  20. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/parser.js +11 -0
  21. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/parser.js.map +1 -0
  22. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/prompt.d.ts +2 -0
  23. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/prompt.js +30 -0
  24. package/dist/extensions/elation/actions/checkPatientTags/lib/checkTagsWithLLM/prompt.js.map +1 -0
  25. package/dist/extensions/elation/actions/checkPatientTags/lib/evaluateCheckTags.d.ts +1 -0
  26. package/dist/extensions/elation/actions/checkPatientTags/lib/evaluateCheckTags.js +148 -0
  27. package/dist/extensions/elation/actions/checkPatientTags/lib/evaluateCheckTags.js.map +1 -0
  28. package/dist/extensions/elation/actions/index.d.ts +66 -0
  29. package/dist/extensions/elation/actions/index.js +2 -0
  30. package/dist/extensions/elation/actions/index.js.map +1 -1
  31. package/dist/extensions/index.js +2 -0
  32. package/dist/extensions/index.js.map +1 -1
  33. package/dist/extensions/markdown.json +5 -1
  34. package/dist/extensions/text-em-all/actions/createCallBroadcast/__testdata__/CreateCallBroadcast.mock.d.ts +88 -0
  35. package/dist/extensions/text-em-all/actions/createCallBroadcast/__testdata__/CreateCallBroadcast.mock.js +92 -0
  36. package/dist/extensions/text-em-all/actions/createCallBroadcast/__testdata__/CreateCallBroadcast.mock.js.map +1 -0
  37. package/dist/extensions/text-em-all/actions/createCallBroadcast/config.d.ts +254 -0
  38. package/dist/extensions/text-em-all/actions/createCallBroadcast/config.js +166 -0
  39. package/dist/extensions/text-em-all/actions/createCallBroadcast/config.js.map +1 -0
  40. package/dist/extensions/text-em-all/actions/createCallBroadcast/createCallBroadcast.d.ts +4 -0
  41. package/dist/extensions/text-em-all/actions/createCallBroadcast/createCallBroadcast.js +55 -0
  42. package/dist/extensions/text-em-all/actions/createCallBroadcast/createCallBroadcast.js.map +1 -0
  43. package/dist/extensions/text-em-all/actions/createCallBroadcast/index.d.ts +1 -0
  44. package/dist/extensions/text-em-all/actions/createCallBroadcast/index.js +18 -0
  45. package/dist/extensions/text-em-all/actions/createCallBroadcast/index.js.map +1 -0
  46. package/dist/extensions/text-em-all/actions/createCallBroadcast/types.d.ts +2 -0
  47. package/dist/extensions/text-em-all/actions/createCallBroadcast/types.js +6 -0
  48. package/dist/extensions/text-em-all/actions/createCallBroadcast/types.js.map +1 -0
  49. package/dist/extensions/text-em-all/actions/createSMSBroadcast/__testdata__/CreateSMSBroadcast.mock.d.ts +55 -0
  50. package/dist/extensions/text-em-all/actions/createSMSBroadcast/__testdata__/CreateSMSBroadcast.mock.js +59 -0
  51. package/dist/extensions/text-em-all/actions/createSMSBroadcast/__testdata__/CreateSMSBroadcast.mock.js.map +1 -0
  52. package/dist/extensions/text-em-all/actions/createSMSBroadcast/config.d.ts +82 -0
  53. package/dist/extensions/text-em-all/actions/createSMSBroadcast/config.js +87 -0
  54. package/dist/extensions/text-em-all/actions/createSMSBroadcast/config.js.map +1 -0
  55. package/dist/extensions/text-em-all/actions/createSMSBroadcast/createSMSBroadcast.d.ts +4 -0
  56. package/dist/extensions/text-em-all/actions/createSMSBroadcast/createSMSBroadcast.js +49 -0
  57. package/dist/extensions/text-em-all/actions/createSMSBroadcast/createSMSBroadcast.js.map +1 -0
  58. package/dist/extensions/text-em-all/actions/createSMSBroadcast/index.d.ts +1 -0
  59. package/dist/extensions/text-em-all/actions/createSMSBroadcast/index.js +18 -0
  60. package/dist/extensions/text-em-all/actions/createSMSBroadcast/index.js.map +1 -0
  61. package/dist/extensions/text-em-all/actions/createSMSBroadcast/types.d.ts +2 -0
  62. package/dist/extensions/text-em-all/actions/createSMSBroadcast/types.js +6 -0
  63. package/dist/extensions/text-em-all/actions/createSMSBroadcast/types.js.map +1 -0
  64. package/dist/extensions/text-em-all/actions/index.d.ts +69 -0
  65. package/dist/extensions/text-em-all/actions/index.js +9 -0
  66. package/dist/extensions/text-em-all/actions/index.js.map +1 -0
  67. package/dist/extensions/text-em-all/actions/types.d.ts +152 -0
  68. package/dist/extensions/text-em-all/actions/types.js +60 -0
  69. package/dist/extensions/text-em-all/actions/types.js.map +1 -0
  70. package/dist/extensions/text-em-all/actions/utils/validateJsonField.d.ts +2 -0
  71. package/dist/extensions/text-em-all/actions/utils/validateJsonField.js +32 -0
  72. package/dist/extensions/text-em-all/actions/utils/validateJsonField.js.map +1 -0
  73. package/dist/extensions/text-em-all/index.d.ts +2 -0
  74. package/dist/extensions/text-em-all/index.js +21 -0
  75. package/dist/extensions/text-em-all/index.js.map +1 -0
  76. package/dist/extensions/text-em-all/lib/client.d.ts +17 -0
  77. package/dist/extensions/text-em-all/lib/client.js +64 -0
  78. package/dist/extensions/text-em-all/lib/client.js.map +1 -0
  79. package/dist/extensions/text-em-all/lib/index.d.ts +1 -0
  80. package/dist/extensions/text-em-all/lib/index.js +18 -0
  81. package/dist/extensions/text-em-all/lib/index.js.map +1 -0
  82. package/dist/extensions/text-em-all/settings.d.ts +48 -0
  83. package/dist/extensions/text-em-all/settings.js +41 -0
  84. package/dist/extensions/text-em-all/settings.js.map +1 -0
  85. package/dist/extensions/text-em-all/webhooks/broadcastStatusChange.d.ts +15 -0
  86. package/dist/extensions/text-em-all/webhooks/broadcastStatusChange.js +42 -0
  87. package/dist/extensions/text-em-all/webhooks/broadcastStatusChange.js.map +1 -0
  88. package/dist/extensions/text-em-all/webhooks/index.d.ts +1 -0
  89. package/dist/extensions/text-em-all/webhooks/index.js +6 -0
  90. package/dist/extensions/text-em-all/webhooks/index.js.map +1 -0
  91. package/dist/extensions/text-em-all/webhooks/types.d.ts +24 -0
  92. package/dist/extensions/text-em-all/webhooks/types.js +15 -0
  93. package/dist/extensions/text-em-all/webhooks/types.js.map +1 -0
  94. package/package.json +4 -1
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./createSMSBroadcast"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/text-em-all/actions/createSMSBroadcast/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC"}
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export declare const BroadcastTypes: z.ZodEnum<["SMS"]>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BroadcastTypes = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.BroadcastTypes = zod_1.z.enum(['SMS']);
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../extensions/text-em-all/actions/createSMSBroadcast/types.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,cAAc,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA"}
@@ -0,0 +1,69 @@
1
+ export declare const actions: {
2
+ createSMSBroadcast: import("@awell-health/extensions-core").Action<{
3
+ broadcastName: {
4
+ id: string;
5
+ label: string;
6
+ type: import("@awell-health/extensions-core").FieldType.STRING;
7
+ required: true;
8
+ description: string;
9
+ };
10
+ phoneNumber: {
11
+ id: string;
12
+ label: string;
13
+ type: import("@awell-health/extensions-core").FieldType.STRING;
14
+ stringType: import("@awell-health/extensions-core").StringType.PHONE;
15
+ required: true;
16
+ description: string;
17
+ };
18
+ textMessage: {
19
+ id: string;
20
+ label: string;
21
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
22
+ required: true;
23
+ description: string;
24
+ };
25
+ textNumberID: {
26
+ id: string;
27
+ label: string;
28
+ type: import("@awell-health/extensions-core").FieldType.NUMERIC;
29
+ required: false;
30
+ description: string;
31
+ };
32
+ startDate: {
33
+ id: string;
34
+ label: string;
35
+ type: import("@awell-health/extensions-core").FieldType.DATE;
36
+ required: false;
37
+ description: string;
38
+ };
39
+ }, {
40
+ customerKey: {
41
+ label: string;
42
+ key: string;
43
+ obfuscated: true;
44
+ required: true;
45
+ description: string;
46
+ };
47
+ customerSecret: {
48
+ label: string;
49
+ key: string;
50
+ obfuscated: true;
51
+ required: true;
52
+ description: string;
53
+ };
54
+ token: {
55
+ label: string;
56
+ key: string;
57
+ obfuscated: true;
58
+ required: true;
59
+ description: string;
60
+ };
61
+ baseUrl: {
62
+ label: string;
63
+ key: string;
64
+ obfuscated: false;
65
+ required: true;
66
+ description: string;
67
+ };
68
+ }, "broadcastId" | "broadcastStatus" | "uriBroadcastDetails" | "broadcastStatusCategory" | "broadcastStartDate">;
69
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.actions = void 0;
4
+ const createSMSBroadcast_1 = require("./createSMSBroadcast");
5
+ // createCallBroadcast is not included here because we cannot test it yet and it's not currently needed
6
+ exports.actions = {
7
+ createSMSBroadcast: createSMSBroadcast_1.createSMSBroadcast,
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/text-em-all/actions/index.ts"],"names":[],"mappings":";;;AAAA,6DAAyD;AAEzD,uGAAuG;AAC1F,QAAA,OAAO,GAAG;IACrB,kBAAkB,EAAlB,uCAAkB;CACnB,CAAA"}
@@ -0,0 +1,152 @@
1
+ import { z } from 'zod';
2
+ export declare const BroadcastTypes: z.ZodEnum<["Announcement", "Survey", "SMS", "SMSAndAnnouncement", "SMSAndSurvey", "SMSOrAnnouncement", "SMSOrSurvey"]>;
3
+ export declare const VoiceOptions: z.ZodEnum<["Ivy", "Joanna", "Kendra", "Kimberly", "Salli", "Joey", "Justin", "Kevin", "Matthew"]>;
4
+ export type VoiceOption = z.infer<typeof VoiceOptions>;
5
+ export declare const VoiceSchema: z.ZodObject<{
6
+ TextToSpeech: z.ZodBoolean;
7
+ Text: z.ZodString;
8
+ Voice: z.ZodEnum<["Ivy", "Joanna", "Kendra", "Kimberly", "Salli", "Joey", "Justin", "Kevin", "Matthew"]>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ Text: string;
11
+ Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
12
+ TextToSpeech: boolean;
13
+ }, {
14
+ Text: string;
15
+ Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
16
+ TextToSpeech: boolean;
17
+ }>;
18
+ export declare const TransferSchema: z.ZodObject<{
19
+ transferNumber: z.ZodString;
20
+ transferMessage: z.ZodString;
21
+ transferDigit: z.ZodString;
22
+ transferIntroduction: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ transferNumber: string;
25
+ transferMessage: string;
26
+ transferDigit: string;
27
+ transferIntroduction: string;
28
+ }, {
29
+ transferNumber: string;
30
+ transferMessage: string;
31
+ transferDigit: string;
32
+ transferIntroduction: string;
33
+ }>;
34
+ export type TransferDetails = z.infer<typeof TransferSchema>;
35
+ export declare const AudioType: z.ZodEnum<["NeverUsed", "Announcement", "SurveyLiveAnswer", "SurveyVoiceMail", "AnnouncementVoiceMail", "TransferAndConnect"]>;
36
+ export declare const AudioSchema: z.ZodObject<{
37
+ Uri: z.ZodString;
38
+ AudioID: z.ZodString;
39
+ Name: z.ZodString;
40
+ Description: z.ZodString;
41
+ Favorite: z.ZodBoolean;
42
+ Shared: z.ZodBoolean;
43
+ Length: z.ZodNumber;
44
+ MessageType: z.ZodEnum<["NeverUsed", "Announcement", "SurveyLiveAnswer", "SurveyVoiceMail", "AnnouncementVoiceMail", "TransferAndConnect"]>;
45
+ ReadOnly: z.ZodBoolean;
46
+ Created: z.ZodString;
47
+ LastUsed: z.ZodString;
48
+ TextToSpeech: z.ZodBoolean;
49
+ Text: z.ZodString;
50
+ Voice: z.ZodObject<{
51
+ TextToSpeech: z.ZodBoolean;
52
+ Text: z.ZodString;
53
+ Voice: z.ZodEnum<["Ivy", "Joanna", "Kendra", "Kimberly", "Salli", "Joey", "Justin", "Kevin", "Matthew"]>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ Text: string;
56
+ Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
57
+ TextToSpeech: boolean;
58
+ }, {
59
+ Text: string;
60
+ Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
61
+ TextToSpeech: boolean;
62
+ }>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ Description: string;
65
+ Created: string;
66
+ Text: string;
67
+ Name: string;
68
+ Voice: {
69
+ Text: string;
70
+ Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
71
+ TextToSpeech: boolean;
72
+ };
73
+ TextToSpeech: boolean;
74
+ Uri: string;
75
+ AudioID: string;
76
+ Favorite: boolean;
77
+ Shared: boolean;
78
+ Length: number;
79
+ MessageType: "Announcement" | "NeverUsed" | "SurveyLiveAnswer" | "SurveyVoiceMail" | "AnnouncementVoiceMail" | "TransferAndConnect";
80
+ ReadOnly: boolean;
81
+ LastUsed: string;
82
+ }, {
83
+ Description: string;
84
+ Created: string;
85
+ Text: string;
86
+ Name: string;
87
+ Voice: {
88
+ Text: string;
89
+ Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
90
+ TextToSpeech: boolean;
91
+ };
92
+ TextToSpeech: boolean;
93
+ Uri: string;
94
+ AudioID: string;
95
+ Favorite: boolean;
96
+ Shared: boolean;
97
+ Length: number;
98
+ MessageType: "Announcement" | "NeverUsed" | "SurveyLiveAnswer" | "SurveyVoiceMail" | "AnnouncementVoiceMail" | "TransferAndConnect";
99
+ ReadOnly: boolean;
100
+ LastUsed: string;
101
+ }>;
102
+ export type AudioDetails = z.infer<typeof AudioSchema>;
103
+ export interface Broadcast {
104
+ Uri: string;
105
+ UriBroadcastDetails: string;
106
+ BroadcastID: number;
107
+ BroadcastName: string;
108
+ BroadcastType: z.infer<typeof BroadcastTypes>;
109
+ BroadcastStatus: string;
110
+ BroadcastStatusCategory: string;
111
+ CreatedDate: string;
112
+ StartDate: string;
113
+ CompletedDate: string;
114
+ CallerID: string | null;
115
+ CreditsUsed: number;
116
+ PhoneNumberCount: number;
117
+ TotalCompleted: number;
118
+ User: Record<string, unknown>;
119
+ TransferAndConnect?: z.infer<typeof TransferSchema> | null;
120
+ Audio?: z.infer<typeof AudioSchema> | null;
121
+ AudioVM?: z.infer<typeof AudioSchema> | null;
122
+ RetryTimes?: number;
123
+ CallThrottle?: number;
124
+ LivePersonTotal?: number;
125
+ AnsweringMachineTotal?: number;
126
+ BusyNoAnswerTotal?: number;
127
+ InvalidNumberTotal?: number;
128
+ SurveyResponseTotal?: number;
129
+ TransferTotal?: number;
130
+ BroadcastSurveyResponse?: Record<string, unknown>;
131
+ MaxMessageLength?: number;
132
+ MessageRecordingInstruction?: string;
133
+ EstimatedDuration?: number;
134
+ EstimatedCompletion?: number;
135
+ ExcludedDaysIgnored?: boolean;
136
+ CallingWindowIgnored?: boolean;
137
+ NotEnoughTimeToComplete?: boolean;
138
+ TextMessage?: string;
139
+ DeliveredTexts?: number;
140
+ NotDeliveredTexts?: number;
141
+ InvalidTextCount?: number;
142
+ FailedTextTotal?: number;
143
+ TextReplies?: number;
144
+ UnreadTextReplies?: number;
145
+ UnreadConversationReplies?: number;
146
+ NotRepliedTotal?: number;
147
+ TextOptedOut?: number;
148
+ TextNumberID?: number;
149
+ TextPhoneNumber?: string;
150
+ TextBroadcastID?: string;
151
+ FailedContacts?: Array<Record<string, unknown>>;
152
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AudioSchema = exports.AudioType = exports.TransferSchema = exports.VoiceSchema = exports.VoiceOptions = exports.BroadcastTypes = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.BroadcastTypes = zod_1.z.enum([
6
+ 'Announcement',
7
+ 'Survey',
8
+ 'SMS',
9
+ 'SMSAndAnnouncement',
10
+ 'SMSAndSurvey',
11
+ 'SMSOrAnnouncement',
12
+ 'SMSOrSurvey',
13
+ ]);
14
+ exports.VoiceOptions = zod_1.z.enum([
15
+ 'Ivy',
16
+ 'Joanna',
17
+ 'Kendra',
18
+ 'Kimberly',
19
+ 'Salli',
20
+ 'Joey',
21
+ 'Justin',
22
+ 'Kevin',
23
+ 'Matthew',
24
+ ]);
25
+ exports.VoiceSchema = zod_1.z.object({
26
+ TextToSpeech: zod_1.z.boolean(),
27
+ Text: zod_1.z.string(),
28
+ Voice: exports.VoiceOptions,
29
+ });
30
+ exports.TransferSchema = zod_1.z.object({
31
+ transferNumber: zod_1.z.string(),
32
+ transferMessage: zod_1.z.string(),
33
+ transferDigit: zod_1.z.string(),
34
+ transferIntroduction: zod_1.z.string(),
35
+ });
36
+ exports.AudioType = zod_1.z.enum([
37
+ 'NeverUsed',
38
+ 'Announcement',
39
+ 'SurveyLiveAnswer',
40
+ 'SurveyVoiceMail',
41
+ 'AnnouncementVoiceMail',
42
+ 'TransferAndConnect',
43
+ ]);
44
+ exports.AudioSchema = zod_1.z.object({
45
+ Uri: zod_1.z.string(),
46
+ AudioID: zod_1.z.string(),
47
+ Name: zod_1.z.string(),
48
+ Description: zod_1.z.string(),
49
+ Favorite: zod_1.z.boolean(),
50
+ Shared: zod_1.z.boolean(),
51
+ Length: zod_1.z.number(),
52
+ MessageType: exports.AudioType,
53
+ ReadOnly: zod_1.z.boolean(),
54
+ Created: zod_1.z.string(),
55
+ LastUsed: zod_1.z.string(),
56
+ TextToSpeech: zod_1.z.boolean(),
57
+ Text: zod_1.z.string(),
58
+ Voice: exports.VoiceSchema,
59
+ });
60
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../extensions/text-em-all/actions/types.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,cAAc,GAAG,OAAC,CAAC,IAAI,CAAC;IACnC,cAAc;IACd,QAAQ;IACR,KAAK;IACL,oBAAoB;IACpB,cAAc;IACd,mBAAmB;IACnB,aAAa;CACd,CAAC,CAAA;AAEW,QAAA,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC;IACjC,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,OAAO;IACP,MAAM;IACN,QAAQ;IACR,OAAO;IACP,SAAS;CACV,CAAC,CAAA;AAIW,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,oBAAY;CACpB,CAAC,CAAA;AAEW,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE;CACjC,CAAC,CAAA;AAIW,QAAA,SAAS,GAAG,OAAC,CAAC,IAAI,CAAC;IAC9B,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB;IACvB,oBAAoB;CACrB,CAAC,CAAA;AAEW,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IACrB,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,iBAAS;IACtB,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IACrB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,mBAAW;CACnB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { z } from "zod";
2
+ export declare const validateJsonField: <T>(schema: z.ZodType<T>, errorMessage: string) => (str: string | undefined, ctx: z.RefinementCtx) => T | undefined;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateJsonField = void 0;
4
+ const lodash_1 = require("lodash");
5
+ const zod_1 = require("zod");
6
+ const validateJsonField = (schema, errorMessage) => {
7
+ return (str, ctx) => {
8
+ if ((0, lodash_1.isNil)(str) || (0, lodash_1.isEmpty)(str))
9
+ return undefined;
10
+ try {
11
+ const parsedJson = JSON.parse(str);
12
+ if ((0, lodash_1.isEmpty)(parsedJson)) {
13
+ return undefined;
14
+ }
15
+ const result = schema.safeParse(parsedJson);
16
+ if (!result.success) {
17
+ ctx.addIssue({
18
+ code: 'custom',
19
+ message: errorMessage,
20
+ });
21
+ return zod_1.z.NEVER;
22
+ }
23
+ return parsedJson;
24
+ }
25
+ catch (e) {
26
+ ctx.addIssue({ code: 'custom', message: 'Invalid JSON.' });
27
+ return zod_1.z.NEVER;
28
+ }
29
+ };
30
+ };
31
+ exports.validateJsonField = validateJsonField;
32
+ //# sourceMappingURL=validateJsonField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateJsonField.js","sourceRoot":"","sources":["../../../../../extensions/text-em-all/actions/utils/validateJsonField.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AACvC,6BAAuB;AAEhB,MAAM,iBAAiB,GAAG,CAAI,MAAoB,EAAE,YAAoB,EAAE,EAAE;IAC/E,OAAO,CAAC,GAAuB,EAAE,GAAoB,EAAiB,EAAE;QACtE,IAAI,IAAA,cAAK,EAAC,GAAG,CAAC,IAAI,IAAA,gBAAO,EAAC,GAAG,CAAC;YAAE,OAAO,SAAS,CAAA;QAEhD,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAElC,IAAI,IAAA,gBAAO,EAAC,UAAU,CAAC,EAAE,CAAC;gBACxB,OAAO,SAAS,CAAA;YAClB,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;YAE3C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,GAAG,CAAC,QAAQ,CAAC;oBACX,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,YAAY;iBACtB,CAAC,CAAA;gBACF,OAAO,OAAC,CAAC,KAAK,CAAA;YAChB,CAAC;YAED,OAAO,UAAU,CAAA;QACnB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAA;YAC1D,OAAO,OAAC,CAAC,KAAK,CAAA;QAChB,CAAC;IACH,CAAC,CAAA;AACH,CAAC,CAAA;AA3BU,QAAA,iBAAiB,qBA2B3B"}
@@ -0,0 +1,2 @@
1
+ import { type Extension } from '@awell-health/extensions-core';
2
+ export declare const TextEmAll: Extension;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextEmAll = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const actions_1 = require("./actions");
6
+ const settings_1 = require("./settings");
7
+ const webhooks_1 = require("./webhooks");
8
+ exports.TextEmAll = {
9
+ key: 'text-em-all',
10
+ category: extensions_core_1.Category.COMMUNICATION,
11
+ title: 'Text-em-all',
12
+ description: 'Send text messages to your patients.',
13
+ icon_url: 'https://res.cloudinary.com/da7x4rzl4/image/upload/c_thumb,w_200,g_face/v1740592441/text-em-all-logo_ljty2t.png',
14
+ author: {
15
+ authorType: extensions_core_1.AuthorType.AWELL,
16
+ },
17
+ settings: settings_1.settings,
18
+ actions: actions_1.actions,
19
+ webhooks: webhooks_1.webhooks,
20
+ };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/text-em-all/index.ts"],"names":[],"mappings":";;;AAAA,mEAIsC;AACtC,uCAAmC;AACnC,yCAAqC;AACrC,yCAAqC;AAExB,QAAA,SAAS,GAAc;IAClC,GAAG,EAAE,aAAa;IAClB,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EACN,gHAAgH;IAClH,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;IACP,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { type AxiosResponse } from 'axios';
2
+ import { type Broadcast } from '../actions/types';
3
+ interface TextEmAllClientConfig {
4
+ customerKey: string;
5
+ customerSecret: string;
6
+ token: string;
7
+ baseUrl: string;
8
+ }
9
+ export declare class TextEmAllClient {
10
+ private readonly client;
11
+ private readonly oauth;
12
+ private readonly token;
13
+ private readonly customerSecret;
14
+ constructor(params: TextEmAllClientConfig);
15
+ createBroadcast(data: Record<string, any>): Promise<AxiosResponse<Broadcast>>;
16
+ }
17
+ export {};
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TextEmAllClient = void 0;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const crypto_js_1 = __importDefault(require("crypto-js"));
9
+ const oauth_1_0a_1 = __importDefault(require("oauth-1.0a"));
10
+ class TextEmAllClient {
11
+ constructor(params) {
12
+ const { customerKey, customerSecret, token, baseUrl } = params;
13
+ this.token = token;
14
+ this.customerSecret = customerSecret;
15
+ // Initialize OAuth
16
+ this.oauth = new oauth_1_0a_1.default({
17
+ consumer: {
18
+ key: customerKey,
19
+ secret: customerSecret,
20
+ },
21
+ signature_method: 'HMAC-SHA1',
22
+ hash_function(baseString, key) {
23
+ return crypto_js_1.default.HmacSHA1(baseString, key).toString(crypto_js_1.default.enc.Base64);
24
+ },
25
+ });
26
+ this.client = axios_1.default.create({
27
+ baseURL: baseUrl,
28
+ headers: {
29
+ 'Content-Type': 'application/json',
30
+ Accept: 'application/json',
31
+ },
32
+ });
33
+ // Add request interceptor to add OAuth headers
34
+ this.client.interceptors.request.use((config) => {
35
+ var _a, _b, _c;
36
+ const requestData = {
37
+ url: `${baseUrl}${(_a = config.url) !== null && _a !== void 0 ? _a : ''}`,
38
+ method: (_c = (_b = config.method) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : 'GET',
39
+ data: config.data,
40
+ };
41
+ const authHeader = this.oauth.toHeader(this.oauth.authorize(requestData, {
42
+ key: this.token,
43
+ secret: this.customerSecret,
44
+ }));
45
+ // Verify the header format matches Text-em-all's requirements
46
+ if (!authHeader.Authorization.startsWith('OAuth ')) {
47
+ throw new Error('Invalid OAuth header format');
48
+ }
49
+ config.headers.Authorization = authHeader.Authorization;
50
+ return config;
51
+ });
52
+ }
53
+ async createBroadcast(data) {
54
+ try {
55
+ const resp = await this.client.post('/broadcasts', data);
56
+ return resp.data;
57
+ }
58
+ catch (error) {
59
+ throw new Error(`Failed to create broadcast: ${error instanceof Error ? error.message : 'Unknown error'}`);
60
+ }
61
+ }
62
+ }
63
+ exports.TextEmAllClient = TextEmAllClient;
64
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../extensions/text-em-all/lib/client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAqE;AACrE,0DAAgC;AAChC,4DAA8B;AAW9B,MAAa,eAAe;IAM1B,YAAY,MAA6B;QACvC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;QAE9D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QAEpC,mBAAmB;QACnB,IAAI,CAAC,KAAK,GAAG,IAAI,oBAAK,CAAC;YACrB,QAAQ,EAAE;gBACR,GAAG,EAAE,WAAW;gBAChB,MAAM,EAAE,cAAc;aACvB;YACD,gBAAgB,EAAE,WAAW;YAC7B,aAAa,CAAC,UAAU,EAAE,GAAG;gBAC3B,OAAO,mBAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,mBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACzE,CAAC;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,MAAM,EAAE,kBAAkB;aAC3B;SACF,CAAC,CAAA;QAEF,+CAA+C;QAC/C,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;;YAC9C,MAAM,WAAW,GAAG;gBAClB,GAAG,EAAE,GAAG,OAAO,GAAG,MAAA,MAAM,CAAC,GAAG,mCAAI,EAAE,EAAE;gBACpC,MAAM,EAAE,MAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,WAAW,EAAE,mCAAI,KAAK;gBAC7C,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,CAAA;YAED,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CACpC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE;gBAChC,GAAG,EAAE,IAAI,CAAC,KAAK;gBACf,MAAM,EAAE,IAAI,CAAC,cAAc;aAC5B,CAAC,CACH,CAAA;YAED,8DAA8D;YAC9D,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACnD,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;YAChD,CAAC;YAED,MAAM,CAAC,OAAO,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,CAAA;YACvD,OAAO,MAAM,CAAA;QACf,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,IAAyB;QAEzB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;YACxD,OAAO,IAAI,CAAC,IAAI,CAAA;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAC1F,CAAA;QACH,CAAC;IACH,CAAC;CACF;AArED,0CAqEC"}
@@ -0,0 +1 @@
1
+ export * from './client';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/text-em-all/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB"}
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ export declare const settings: {
3
+ customerKey: {
4
+ label: string;
5
+ key: string;
6
+ obfuscated: true;
7
+ required: true;
8
+ description: string;
9
+ };
10
+ customerSecret: {
11
+ label: string;
12
+ key: string;
13
+ obfuscated: true;
14
+ required: true;
15
+ description: string;
16
+ };
17
+ token: {
18
+ label: string;
19
+ key: string;
20
+ obfuscated: true;
21
+ required: true;
22
+ description: string;
23
+ };
24
+ baseUrl: {
25
+ label: string;
26
+ key: string;
27
+ obfuscated: false;
28
+ required: true;
29
+ description: string;
30
+ };
31
+ };
32
+ export declare const SettingsSchema: z.ZodObject<{
33
+ customerKey: z.ZodString;
34
+ customerSecret: z.ZodString;
35
+ token: z.ZodString;
36
+ baseUrl: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ baseUrl: string;
39
+ token: string;
40
+ customerKey: string;
41
+ customerSecret: string;
42
+ }, {
43
+ baseUrl: string;
44
+ token: string;
45
+ customerKey: string;
46
+ customerSecret: string;
47
+ }>;
48
+ export type ExtensionSettings = z.infer<typeof SettingsSchema>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsSchema = exports.settings = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.settings = {
6
+ customerKey: {
7
+ label: 'Customer Key',
8
+ key: 'customerKey',
9
+ obfuscated: true,
10
+ required: true,
11
+ description: 'Your Text-Em-All customer key.',
12
+ },
13
+ customerSecret: {
14
+ label: 'Customer Secret',
15
+ key: 'customerSecret',
16
+ obfuscated: true,
17
+ required: true,
18
+ description: 'Your Text-Em-All customer secret.',
19
+ },
20
+ token: {
21
+ label: 'Token',
22
+ key: 'token',
23
+ obfuscated: true,
24
+ required: true,
25
+ description: 'Your Text-Em-All token.',
26
+ },
27
+ baseUrl: {
28
+ label: 'Base URL',
29
+ key: 'baseUrl',
30
+ obfuscated: false,
31
+ required: true,
32
+ description: 'Your Text-Em-All base URL.',
33
+ },
34
+ };
35
+ exports.SettingsSchema = zod_1.z.object({
36
+ customerKey: zod_1.z.string(),
37
+ customerSecret: zod_1.z.string(),
38
+ token: zod_1.z.string(),
39
+ baseUrl: zod_1.z.string(),
40
+ });
41
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/text-em-all/settings.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGV,QAAA,QAAQ,GAAG;IACtB,WAAW,EAAE;QACX,KAAK,EAAE,cAAc;QACrB,GAAG,EAAE,aAAa;QAClB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,gCAAgC;KAC9C;IACD,cAAc,EAAE;QACd,KAAK,EAAE,iBAAiB;QACxB,GAAG,EAAE,gBAAgB;QACrB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,mCAAmC;KACjD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,OAAO;QACZ,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,yBAAyB;KACvC;IACD,OAAO,EAAE;QACP,KAAK,EAAE,UAAU;QACjB,GAAG,EAAE,SAAS;QACd,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,4BAA4B;KAC1C;CACiB,CAAA;AAEP,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { type Webhook } from '@awell-health/extensions-core';
2
+ import { type BroadcastStatusNotification } from './types';
3
+ declare const dataPoints: {
4
+ broadcastId: {
5
+ key: string;
6
+ valueType: "number";
7
+ };
8
+ broadcastStatus: {
9
+ key: string;
10
+ valueType: "string";
11
+ };
12
+ };
13
+ export declare const broadcastStatusChange: Webhook<keyof typeof dataPoints, BroadcastStatusNotification>;
14
+ export type OnbroadcastStatusChange = typeof broadcastStatusChange;
15
+ export {};