@awell-health/awell-extensions 2.0.194 → 2.0.196

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 (93) hide show
  1. package/dist/extensions/braze/actions/actionHelpers.d.ts +1 -0
  2. package/dist/extensions/braze/actions/actionHelpers.js +9 -0
  3. package/dist/extensions/braze/actions/actionHelpers.js.map +1 -0
  4. package/dist/extensions/braze/actions/index.d.ts +933 -0
  5. package/dist/extensions/braze/actions/index.js +16 -0
  6. package/dist/extensions/braze/actions/index.js.map +1 -0
  7. package/dist/extensions/braze/actions/scheduleEmail/config.d.ts +145 -0
  8. package/dist/extensions/braze/actions/scheduleEmail/config.js +120 -0
  9. package/dist/extensions/braze/actions/scheduleEmail/config.js.map +1 -0
  10. package/dist/extensions/braze/actions/scheduleEmail/index.d.ts +1 -0
  11. package/dist/extensions/braze/actions/scheduleEmail/index.js +18 -0
  12. package/dist/extensions/braze/actions/scheduleEmail/index.js.map +1 -0
  13. package/dist/extensions/braze/actions/scheduleEmail/scheduleEmail.d.ts +220 -0
  14. package/dist/extensions/braze/actions/scheduleEmail/scheduleEmail.js +73 -0
  15. package/dist/extensions/braze/actions/scheduleEmail/scheduleEmail.js.map +1 -0
  16. package/dist/extensions/braze/actions/scheduleSMS/config.d.ts +129 -0
  17. package/dist/extensions/braze/actions/scheduleSMS/config.js +108 -0
  18. package/dist/extensions/braze/actions/scheduleSMS/config.js.map +1 -0
  19. package/dist/extensions/braze/actions/scheduleSMS/index.d.ts +1 -0
  20. package/dist/extensions/braze/actions/scheduleSMS/index.js +18 -0
  21. package/dist/extensions/braze/actions/scheduleSMS/index.js.map +1 -0
  22. package/dist/extensions/braze/actions/scheduleSMS/scheduleSMS.d.ts +196 -0
  23. package/dist/extensions/braze/actions/scheduleSMS/scheduleSMS.js +68 -0
  24. package/dist/extensions/braze/actions/scheduleSMS/scheduleSMS.js.map +1 -0
  25. package/dist/extensions/braze/actions/sendEmail/config.d.ts +115 -0
  26. package/dist/extensions/braze/actions/sendEmail/config.js +96 -0
  27. package/dist/extensions/braze/actions/sendEmail/config.js.map +1 -0
  28. package/dist/extensions/braze/actions/sendEmail/index.d.ts +1 -0
  29. package/dist/extensions/braze/actions/sendEmail/index.js +18 -0
  30. package/dist/extensions/braze/actions/sendEmail/index.js.map +1 -0
  31. package/dist/extensions/braze/actions/sendEmail/sendEmail.d.ts +178 -0
  32. package/dist/extensions/braze/actions/sendEmail/sendEmail.js +71 -0
  33. package/dist/extensions/braze/actions/sendEmail/sendEmail.js.map +1 -0
  34. package/dist/extensions/braze/actions/sendEmailUsingTemplate/config.d.ts +125 -0
  35. package/dist/extensions/braze/actions/sendEmailUsingTemplate/config.js +104 -0
  36. package/dist/extensions/braze/actions/sendEmailUsingTemplate/config.js.map +1 -0
  37. package/dist/extensions/braze/actions/sendEmailUsingTemplate/index.d.ts +1 -0
  38. package/dist/extensions/braze/actions/sendEmailUsingTemplate/index.js +18 -0
  39. package/dist/extensions/braze/actions/sendEmailUsingTemplate/index.js.map +1 -0
  40. package/dist/extensions/braze/actions/sendEmailUsingTemplate/sendEmailUsingTemplate.d.ts +192 -0
  41. package/dist/extensions/braze/actions/sendEmailUsingTemplate/sendEmailUsingTemplate.js +78 -0
  42. package/dist/extensions/braze/actions/sendEmailUsingTemplate/sendEmailUsingTemplate.js.map +1 -0
  43. package/dist/extensions/braze/actions/sendSMS/config.d.ts +95 -0
  44. package/dist/extensions/braze/actions/sendSMS/config.js +80 -0
  45. package/dist/extensions/braze/actions/sendSMS/config.js.map +1 -0
  46. package/dist/extensions/braze/actions/sendSMS/index.d.ts +1 -0
  47. package/dist/extensions/braze/actions/sendSMS/index.js +18 -0
  48. package/dist/extensions/braze/actions/sendSMS/index.js.map +1 -0
  49. package/dist/extensions/braze/actions/sendSMS/sendSMS.d.ts +150 -0
  50. package/dist/extensions/braze/actions/sendSMS/sendSMS.js +67 -0
  51. package/dist/extensions/braze/actions/sendSMS/sendSMS.js.map +1 -0
  52. package/dist/extensions/braze/client.d.ts +18 -0
  53. package/dist/extensions/braze/client.js +29 -0
  54. package/dist/extensions/braze/client.js.map +1 -0
  55. package/dist/extensions/braze/index.d.ts +2 -0
  56. package/dist/extensions/braze/index.js +20 -0
  57. package/dist/extensions/braze/index.js.map +1 -0
  58. package/dist/extensions/braze/settings.d.ts +27 -0
  59. package/dist/extensions/braze/settings.js +25 -0
  60. package/dist/extensions/braze/settings.js.map +1 -0
  61. package/dist/extensions/canvasMedical/v1/validation/questionnaireResponses.zod.d.ts +12 -12
  62. package/dist/extensions/docuSign/actions/createEmbeddedSignatureRequestWithTemplate/config/fields.d.ts +2 -2
  63. package/dist/extensions/dropboxSign/v1/actions/createEmbeddedSignatureRequestWithTemplate/config/fields.d.ts +2 -2
  64. package/dist/extensions/dropboxSign/v1/actions/sendSignatureRequestWithTemplate/config/fields.d.ts +2 -2
  65. package/dist/extensions/elation/actions/cancelAppointments/__testdata__/Findappointments.mock.d.ts +12 -0
  66. package/dist/extensions/elation/actions/cancelAppointments/__testdata__/Findappointments.mock.js +32 -0
  67. package/dist/extensions/elation/actions/cancelAppointments/__testdata__/Findappointments.mock.js.map +1 -0
  68. package/dist/extensions/elation/actions/cancelAppointments/cancelAppointments.d.ts +4 -0
  69. package/dist/extensions/elation/actions/cancelAppointments/cancelAppointments.js +125 -0
  70. package/dist/extensions/elation/actions/cancelAppointments/cancelAppointments.js.map +1 -0
  71. package/dist/extensions/elation/actions/cancelAppointments/config/dataPoints.d.ts +10 -0
  72. package/dist/extensions/elation/actions/cancelAppointments/config/dataPoints.js +14 -0
  73. package/dist/extensions/elation/actions/cancelAppointments/config/dataPoints.js.map +1 -0
  74. package/dist/extensions/elation/actions/cancelAppointments/config/fields.d.ts +28 -0
  75. package/dist/extensions/elation/actions/cancelAppointments/config/fields.js +26 -0
  76. package/dist/extensions/elation/actions/cancelAppointments/config/fields.js.map +1 -0
  77. package/dist/extensions/elation/actions/cancelAppointments/config/index.d.ts +2 -0
  78. package/dist/extensions/elation/actions/cancelAppointments/config/index.js +9 -0
  79. package/dist/extensions/elation/actions/cancelAppointments/config/index.js.map +1 -0
  80. package/dist/extensions/elation/actions/cancelAppointments/index.d.ts +1 -0
  81. package/dist/extensions/elation/actions/cancelAppointments/index.js +6 -0
  82. package/dist/extensions/elation/actions/cancelAppointments/index.js.map +1 -0
  83. package/dist/extensions/elation/actions/index.d.ts +66 -0
  84. package/dist/extensions/elation/actions/index.js +2 -0
  85. package/dist/extensions/elation/actions/index.js.map +1 -1
  86. package/dist/extensions/elation/client.d.ts +2 -0
  87. package/dist/extensions/elation/client.js +12 -0
  88. package/dist/extensions/elation/client.js.map +1 -1
  89. package/dist/extensions/elation/types/appointment.d.ts +1 -0
  90. package/dist/extensions/index.js +2 -0
  91. package/dist/extensions/index.js.map +1 -1
  92. package/dist/extensions/markdown.json +5 -1
  93. package/package.json +1 -1
@@ -0,0 +1,192 @@
1
+ import { Category } from '@awell-health/extensions-core';
2
+ export declare const sendEmailUsingTemplate: {
3
+ key: string;
4
+ title: string;
5
+ description: string;
6
+ category: Category.COMMUNICATION;
7
+ fields: {
8
+ externalUserId: {
9
+ id: string;
10
+ label: string;
11
+ type: import("@awell-health/extensions-core").FieldType.STRING;
12
+ required: true;
13
+ description: string;
14
+ };
15
+ appId: {
16
+ id: string;
17
+ label: string;
18
+ type: import("@awell-health/extensions-core").FieldType.STRING;
19
+ required: true;
20
+ description: string;
21
+ };
22
+ from: {
23
+ id: string;
24
+ label: string;
25
+ type: import("@awell-health/extensions-core").FieldType.STRING;
26
+ required: true;
27
+ description: string;
28
+ };
29
+ templateId: {
30
+ id: string;
31
+ label: string;
32
+ type: import("@awell-health/extensions-core").FieldType.STRING;
33
+ required: true;
34
+ description: string;
35
+ };
36
+ replyTo: {
37
+ id: string;
38
+ label: string;
39
+ type: import("@awell-health/extensions-core").FieldType.STRING;
40
+ required: false;
41
+ description: string;
42
+ };
43
+ preheader: {
44
+ id: string;
45
+ label: string;
46
+ type: import("@awell-health/extensions-core").FieldType.STRING;
47
+ required: false;
48
+ description: string;
49
+ };
50
+ scheduleTime: {
51
+ id: string;
52
+ label: string;
53
+ type: import("@awell-health/extensions-core").FieldType.DATE;
54
+ required: false;
55
+ description: string;
56
+ };
57
+ inPatientLocalTime: {
58
+ id: string;
59
+ label: string;
60
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
61
+ required: false;
62
+ description: string;
63
+ };
64
+ atOptimalTime: {
65
+ id: string;
66
+ label: string;
67
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
68
+ required: false;
69
+ description: string;
70
+ };
71
+ campaignId: {
72
+ id: string;
73
+ label: string;
74
+ type: import("@awell-health/extensions-core").FieldType.STRING;
75
+ required: false;
76
+ description: string;
77
+ };
78
+ messageVariantionId: {
79
+ id: string;
80
+ label: string;
81
+ type: import("@awell-health/extensions-core").FieldType.STRING;
82
+ required: false;
83
+ description: string;
84
+ };
85
+ };
86
+ dataPoints: {
87
+ EmailDispatchId: {
88
+ key: string;
89
+ valueType: "string";
90
+ };
91
+ };
92
+ previewable: false;
93
+ onEvent: ({ payload, onComplete, onError, helpers }: {
94
+ payload: import("@awell-health/extensions-core").NewActivityPayload<{
95
+ externalUserId: {
96
+ id: string;
97
+ label: string;
98
+ type: import("@awell-health/extensions-core").FieldType.STRING;
99
+ required: true;
100
+ description: string;
101
+ };
102
+ appId: {
103
+ id: string;
104
+ label: string;
105
+ type: import("@awell-health/extensions-core").FieldType.STRING;
106
+ required: true;
107
+ description: string;
108
+ };
109
+ from: {
110
+ id: string;
111
+ label: string;
112
+ type: import("@awell-health/extensions-core").FieldType.STRING;
113
+ required: true;
114
+ description: string;
115
+ };
116
+ templateId: {
117
+ id: string;
118
+ label: string;
119
+ type: import("@awell-health/extensions-core").FieldType.STRING;
120
+ required: true;
121
+ description: string;
122
+ };
123
+ replyTo: {
124
+ id: string;
125
+ label: string;
126
+ type: import("@awell-health/extensions-core").FieldType.STRING;
127
+ required: false;
128
+ description: string;
129
+ };
130
+ preheader: {
131
+ id: string;
132
+ label: string;
133
+ type: import("@awell-health/extensions-core").FieldType.STRING;
134
+ required: false;
135
+ description: string;
136
+ };
137
+ scheduleTime: {
138
+ id: string;
139
+ label: string;
140
+ type: import("@awell-health/extensions-core").FieldType.DATE;
141
+ required: false;
142
+ description: string;
143
+ };
144
+ inPatientLocalTime: {
145
+ id: string;
146
+ label: string;
147
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
148
+ required: false;
149
+ description: string;
150
+ };
151
+ atOptimalTime: {
152
+ id: string;
153
+ label: string;
154
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
155
+ required: false;
156
+ description: string;
157
+ };
158
+ campaignId: {
159
+ id: string;
160
+ label: string;
161
+ type: import("@awell-health/extensions-core").FieldType.STRING;
162
+ required: false;
163
+ description: string;
164
+ };
165
+ messageVariantionId: {
166
+ id: string;
167
+ label: string;
168
+ type: import("@awell-health/extensions-core").FieldType.STRING;
169
+ required: false;
170
+ description: string;
171
+ };
172
+ }, {
173
+ apiKey: {
174
+ key: string;
175
+ label: string;
176
+ obfuscated: true;
177
+ required: true;
178
+ description: string;
179
+ };
180
+ baseUrl: {
181
+ key: string;
182
+ label: string;
183
+ obfuscated: false;
184
+ required: true;
185
+ description: string;
186
+ };
187
+ }>;
188
+ onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
189
+ onError: import("@awell-health/extensions-core").OnErrorCallback;
190
+ helpers: import("@awell-health/extensions-core").Helpers;
191
+ }) => Promise<void>;
192
+ };
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendEmailUsingTemplate = void 0;
4
+ const zod_1 = require("zod");
5
+ const lodash_1 = require("lodash");
6
+ const extensions_core_1 = require("@awell-health/extensions-core");
7
+ const settings_1 = require("../../settings");
8
+ const client_1 = require("../../client");
9
+ const config_1 = require("./config");
10
+ const actionHelpers_1 = require("../actionHelpers");
11
+ exports.sendEmailUsingTemplate = {
12
+ key: 'sendEmailUsingTemplate',
13
+ title: 'Send Email Using Template',
14
+ description: 'Send an email to a patient using a template. You can schedule the email to be sent at a later time.',
15
+ category: extensions_core_1.Category.COMMUNICATION,
16
+ fields: config_1.fields,
17
+ dataPoints: config_1.dataPoints,
18
+ previewable: false,
19
+ onEvent: async ({ payload, onComplete, onError, helpers }) => {
20
+ const { fields: { externalUserId, appId: app_id, from, replyTo: reply_to, templateId: email_template_id, preheader, scheduleTime: time, inPatientLocalTime: in_local_time, atOptimalTime: at_optimal_time, campaignId: campaign_id, messageVariantionId: message_variation_id, }, settings: { apiKey, baseUrl }, } = (0, extensions_core_1.validate)({
21
+ schema: zod_1.z.object({
22
+ fields: config_1.FieldsSchema,
23
+ settings: settings_1.SettingsValidationSchema,
24
+ }),
25
+ payload,
26
+ });
27
+ const client = new client_1.BrazeClient({ apiKey, baseUrl });
28
+ const schedule = {
29
+ ...(!(0, lodash_1.isNil)(time) && {
30
+ time,
31
+ }),
32
+ ...(0, actionHelpers_1.addBooleanFieldIfDefined)({ in_local_time }),
33
+ ...(0, actionHelpers_1.addBooleanFieldIfDefined)({ at_optimal_time }),
34
+ };
35
+ const requestBody = {
36
+ external_user_ids: [externalUserId],
37
+ ...(!(0, lodash_1.isNil)(campaign_id) && {
38
+ campaign_id,
39
+ }),
40
+ ...(!(0, lodash_1.isEmpty)(schedule) && {
41
+ schedule,
42
+ }),
43
+ messages: {
44
+ email: {
45
+ from,
46
+ app_id,
47
+ email_template_id,
48
+ ...(!(0, lodash_1.isNil)(preheader) && {
49
+ preheader,
50
+ }),
51
+ ...(!(0, lodash_1.isNil)(message_variation_id) && {
52
+ message_variation_id,
53
+ }),
54
+ ...(!(0, lodash_1.isNil)(reply_to) && {
55
+ reply_to,
56
+ }),
57
+ },
58
+ },
59
+ };
60
+ const resp = (0, lodash_1.isNil)(time)
61
+ ? await client.sendMessageImmediately(requestBody)
62
+ : await client.scheduleMessage(requestBody);
63
+ await onComplete({
64
+ events: [
65
+ {
66
+ date: new Date().toISOString(),
67
+ text: {
68
+ en: `Email sent using template id ${email_template_id}. Response: ${JSON.stringify(resp)}`,
69
+ },
70
+ },
71
+ ],
72
+ data_points: {
73
+ EmailDispatchId: resp.dispatch_id,
74
+ },
75
+ });
76
+ },
77
+ };
78
+ //# sourceMappingURL=sendEmailUsingTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendEmailUsingTemplate.js","sourceRoot":"","sources":["../../../../../extensions/braze/actions/sendEmailUsingTemplate/sendEmailUsingTemplate.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mCAAuC;AACvC,mEAA+E;AAE/E,6CAAwE;AACxE,yCAA0C;AAC1C,qCAA2D;AAC3D,oDAA2D;AAE9C,QAAA,sBAAsB,GAAG;IACpC,GAAG,EAAE,wBAAwB;IAC7B,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,qGAAqG;IACvG,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;QAC3D,MAAM,EACJ,MAAM,EAAE,EACN,cAAc,EACd,KAAK,EAAE,MAAM,EACb,IAAI,EACJ,OAAO,EAAE,QAAQ,EACjB,UAAU,EAAE,iBAAiB,EAC7B,SAAS,EACT,YAAY,EAAE,IAAI,EAClB,kBAAkB,EAAE,aAAa,EACjC,aAAa,EAAE,eAAe,EAC9B,UAAU,EAAE,WAAW,EACvB,mBAAmB,EAAE,oBAAoB,GAC1C,EACD,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAC9B,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,qBAAY;gBACpB,QAAQ,EAAE,mCAAwB;aACnC,C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;oBAC9B,IAAI,EAAE;wBACJ,EAAE,EAAE,gCAAgC,iBAAiB,eAAe,IAAI,CAAC,SAAS,CAChF,IAAI,CACL,EAAE;qBACJ;iBACF;aACF;YACD,WAAW,EAAE;gBACX,eAAe,EAAE,IAAI,CAAC,WAAW;aAClC;SACF,CAAC,CAAA;IACJ,CAAC;CAC+C,CAAA"}
@@ -0,0 +1,95 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import { z } from 'zod';
3
+ export declare const fields: {
4
+ subscriptionGroupId: {
5
+ id: string;
6
+ label: string;
7
+ type: FieldType.STRING;
8
+ required: true;
9
+ description: string;
10
+ };
11
+ externalUserId: {
12
+ id: string;
13
+ label: string;
14
+ type: FieldType.STRING;
15
+ required: true;
16
+ description: string;
17
+ };
18
+ body: {
19
+ id: string;
20
+ label: string;
21
+ type: FieldType.TEXT;
22
+ required: true;
23
+ description: string;
24
+ };
25
+ appId: {
26
+ id: string;
27
+ label: string;
28
+ type: FieldType.STRING;
29
+ required: true;
30
+ description: string;
31
+ };
32
+ linkShorteningEnabled: {
33
+ id: string;
34
+ label: string;
35
+ type: FieldType.BOOLEAN;
36
+ required: false;
37
+ description: string;
38
+ };
39
+ useClickTrackingEnabled: {
40
+ id: string;
41
+ label: string;
42
+ type: FieldType.BOOLEAN;
43
+ required: false;
44
+ description: string;
45
+ };
46
+ campaignId: {
47
+ id: string;
48
+ label: string;
49
+ type: FieldType.STRING;
50
+ required: false;
51
+ description: string;
52
+ };
53
+ messageVariantionId: {
54
+ id: string;
55
+ label: string;
56
+ type: FieldType.STRING;
57
+ required: false;
58
+ description: string;
59
+ };
60
+ };
61
+ export declare const dataPoints: {
62
+ SMSDispatchId: {
63
+ key: string;
64
+ valueType: "string";
65
+ };
66
+ };
67
+ export declare const FieldsSchema: z.ZodObject<{
68
+ subscriptionGroupId: z.ZodString;
69
+ externalUserId: z.ZodString;
70
+ body: z.ZodString;
71
+ appId: z.ZodString;
72
+ linkShorteningEnabled: z.ZodOptional<z.ZodBoolean>;
73
+ useClickTrackingEnabled: z.ZodOptional<z.ZodBoolean>;
74
+ campaignId: z.ZodOptional<z.ZodString>;
75
+ messageVariantionId: z.ZodOptional<z.ZodString>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ body: string;
78
+ subscriptionGroupId: string;
79
+ externalUserId: string;
80
+ appId: string;
81
+ linkShorteningEnabled?: boolean | undefined;
82
+ useClickTrackingEnabled?: boolean | undefined;
83
+ campaignId?: string | undefined;
84
+ messageVariantionId?: string | undefined;
85
+ }, {
86
+ body: string;
87
+ subscriptionGroupId: string;
88
+ externalUserId: string;
89
+ appId: string;
90
+ linkShorteningEnabled?: boolean | undefined;
91
+ useClickTrackingEnabled?: boolean | undefined;
92
+ campaignId?: string | undefined;
93
+ messageVariantionId?: string | undefined;
94
+ }>;
95
+ export type ActionFields = z.infer<typeof FieldsSchema>;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsSchema = exports.dataPoints = exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ exports.fields = {
7
+ subscriptionGroupId: {
8
+ id: 'subscriptionGroupId',
9
+ label: 'Subscription Group ID',
10
+ type: extensions_core_1.FieldType.STRING,
11
+ required: true,
12
+ description: 'The ID of your subscription group.',
13
+ },
14
+ externalUserId: {
15
+ id: 'externalUserId',
16
+ label: 'External User ID',
17
+ type: extensions_core_1.FieldType.STRING,
18
+ required: true,
19
+ description: 'The ID of the user in your system that this message is being sent to.',
20
+ },
21
+ body: {
22
+ id: 'body',
23
+ label: 'Body',
24
+ type: extensions_core_1.FieldType.TEXT,
25
+ required: true,
26
+ description: 'The body of the SMS.',
27
+ },
28
+ appId: {
29
+ id: 'appId',
30
+ label: 'App ID',
31
+ type: extensions_core_1.FieldType.STRING,
32
+ required: true,
33
+ description: 'App id is the reference of the specific app.',
34
+ },
35
+ linkShorteningEnabled: {
36
+ id: 'linkShorteningEnabled',
37
+ label: 'Link Shortening Enabled',
38
+ type: extensions_core_1.FieldType.BOOLEAN,
39
+ required: false,
40
+ description: 'Use this field to turn on link shortening and campaign-level click tracking',
41
+ },
42
+ useClickTrackingEnabled: {
43
+ id: 'useClickTrackingEnabled',
44
+ label: 'Use Click Tracking Enabled',
45
+ type: extensions_core_1.FieldType.BOOLEAN,
46
+ required: false,
47
+ description: 'If `Link Shortening Enabled` is true, use this field to turn on link shortening, and campaign-level and user-level click tracking',
48
+ },
49
+ campaignId: {
50
+ id: 'campaignId',
51
+ label: 'Campaign ID',
52
+ type: extensions_core_1.FieldType.STRING,
53
+ required: false,
54
+ description: 'Optional but required if you wish to track campaign stats',
55
+ },
56
+ messageVariantionId: {
57
+ id: 'messageVariantionId',
58
+ label: 'Message Variantion ID',
59
+ type: extensions_core_1.FieldType.STRING,
60
+ required: false,
61
+ description: 'Used when providing a campaign_id to specify which message variation this message should be tracked under',
62
+ },
63
+ };
64
+ exports.dataPoints = {
65
+ SMSDispatchId: {
66
+ key: 'SMSDispatchId',
67
+ valueType: 'string',
68
+ },
69
+ };
70
+ exports.FieldsSchema = zod_1.z.object({
71
+ subscriptionGroupId: zod_1.z.string().min(1),
72
+ externalUserId: zod_1.z.string().min(1),
73
+ body: zod_1.z.string().min(1),
74
+ appId: zod_1.z.string().min(1),
75
+ linkShorteningEnabled: zod_1.z.boolean().optional(),
76
+ useClickTrackingEnabled: zod_1.z.boolean().optional(),
77
+ campaignId: zod_1.z.string().optional(),
78
+ messageVariantionId: zod_1.z.string().optional(),
79
+ });
80
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../extensions/braze/actions/sendSMS/config.ts"],"names":[],"mappings":";;;AAAA,mEAIsC;AACtC,6BAAuB;AAEV,QAAA,MAAM,GAAG;IACpB,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE,uBAAuB;QAC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AA;AAEL,QAAA,UAAU,GAAG;IACxB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,qBAAqB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7C,uBAAuB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './sendSMS';
@@ -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("./sendSMS"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/braze/actions/sendSMS/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
@@ -0,0 +1,150 @@
1
+ import { Category } from '@awell-health/extensions-core';
2
+ export declare const sendSMS: {
3
+ key: string;
4
+ title: string;
5
+ description: string;
6
+ category: Category.COMMUNICATION;
7
+ fields: {
8
+ subscriptionGroupId: {
9
+ id: string;
10
+ label: string;
11
+ type: import("@awell-health/extensions-core").FieldType.STRING;
12
+ required: true;
13
+ description: string;
14
+ };
15
+ externalUserId: {
16
+ id: string;
17
+ label: string;
18
+ type: import("@awell-health/extensions-core").FieldType.STRING;
19
+ required: true;
20
+ description: string;
21
+ };
22
+ body: {
23
+ id: string;
24
+ label: string;
25
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
26
+ required: true;
27
+ description: string;
28
+ };
29
+ appId: {
30
+ id: string;
31
+ label: string;
32
+ type: import("@awell-health/extensions-core").FieldType.STRING;
33
+ required: true;
34
+ description: string;
35
+ };
36
+ linkShorteningEnabled: {
37
+ id: string;
38
+ label: string;
39
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
40
+ required: false;
41
+ description: string;
42
+ };
43
+ useClickTrackingEnabled: {
44
+ id: string;
45
+ label: string;
46
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
47
+ required: false;
48
+ description: string;
49
+ };
50
+ campaignId: {
51
+ id: string;
52
+ label: string;
53
+ type: import("@awell-health/extensions-core").FieldType.STRING;
54
+ required: false;
55
+ description: string;
56
+ };
57
+ messageVariantionId: {
58
+ id: string;
59
+ label: string;
60
+ type: import("@awell-health/extensions-core").FieldType.STRING;
61
+ required: false;
62
+ description: string;
63
+ };
64
+ };
65
+ dataPoints: {
66
+ SMSDispatchId: {
67
+ key: string;
68
+ valueType: "string";
69
+ };
70
+ };
71
+ previewable: false;
72
+ onEvent: ({ payload, onComplete, onError, helpers }: {
73
+ payload: import("@awell-health/extensions-core").NewActivityPayload<{
74
+ subscriptionGroupId: {
75
+ id: string;
76
+ label: string;
77
+ type: import("@awell-health/extensions-core").FieldType.STRING;
78
+ required: true;
79
+ description: string;
80
+ };
81
+ externalUserId: {
82
+ id: string;
83
+ label: string;
84
+ type: import("@awell-health/extensions-core").FieldType.STRING;
85
+ required: true;
86
+ description: string;
87
+ };
88
+ body: {
89
+ id: string;
90
+ label: string;
91
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
92
+ required: true;
93
+ description: string;
94
+ };
95
+ appId: {
96
+ id: string;
97
+ label: string;
98
+ type: import("@awell-health/extensions-core").FieldType.STRING;
99
+ required: true;
100
+ description: string;
101
+ };
102
+ linkShorteningEnabled: {
103
+ id: string;
104
+ label: string;
105
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
106
+ required: false;
107
+ description: string;
108
+ };
109
+ useClickTrackingEnabled: {
110
+ id: string;
111
+ label: string;
112
+ type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
113
+ required: false;
114
+ description: string;
115
+ };
116
+ campaignId: {
117
+ id: string;
118
+ label: string;
119
+ type: import("@awell-health/extensions-core").FieldType.STRING;
120
+ required: false;
121
+ description: string;
122
+ };
123
+ messageVariantionId: {
124
+ id: string;
125
+ label: string;
126
+ type: import("@awell-health/extensions-core").FieldType.STRING;
127
+ required: false;
128
+ description: string;
129
+ };
130
+ }, {
131
+ apiKey: {
132
+ key: string;
133
+ label: string;
134
+ obfuscated: true;
135
+ required: true;
136
+ description: string;
137
+ };
138
+ baseUrl: {
139
+ key: string;
140
+ label: string;
141
+ obfuscated: false;
142
+ required: true;
143
+ description: string;
144
+ };
145
+ }>;
146
+ onComplete: import("@awell-health/extensions-core").OnCompleteCallback<string>;
147
+ onError: import("@awell-health/extensions-core").OnErrorCallback;
148
+ helpers: import("@awell-health/extensions-core").Helpers;
149
+ }) => Promise<void>;
150
+ };