@awell-health/awell-extensions 2.0.194 → 2.0.195

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 (68) 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/index.js +2 -0
  66. package/dist/extensions/index.js.map +1 -1
  67. package/dist/extensions/markdown.json +4 -0
  68. package/package.json +1 -1
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendSMS = 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
+ exports.sendSMS = {
11
+ key: 'sendSMS',
12
+ title: 'Send SMS',
13
+ description: 'Send an SMS to a patient.',
14
+ category: extensions_core_1.Category.COMMUNICATION,
15
+ fields: config_1.fields,
16
+ dataPoints: config_1.dataPoints,
17
+ previewable: false,
18
+ onEvent: async ({ payload, onComplete, onError, helpers }) => {
19
+ const { fields: { subscriptionGroupId: subscription_group_id, externalUserId, body, appId: app_id, linkShorteningEnabled: link_shortening_enabled, useClickTrackingEnabled: use_click_tracking_enabled, campaignId: campaign_id, messageVariantionId: message_variation_id, }, settings: { apiKey, baseUrl }, } = (0, extensions_core_1.validate)({
20
+ schema: zod_1.z.object({
21
+ fields: config_1.FieldsSchema,
22
+ settings: settings_1.SettingsValidationSchema,
23
+ }),
24
+ payload,
25
+ });
26
+ const client = new client_1.BrazeClient({ apiKey, baseUrl });
27
+ const requestBody = {
28
+ external_user_ids: [externalUserId],
29
+ ...(!(0, lodash_1.isNil)(campaign_id) && {
30
+ campaign_id,
31
+ }),
32
+ messages: {
33
+ sms: {
34
+ subscription_group_id,
35
+ body,
36
+ app_id,
37
+ ...(!(0, lodash_1.isNil)(message_variation_id) && {
38
+ message_variation_id,
39
+ }),
40
+ ...(typeof link_shortening_enabled === 'boolean'
41
+ ? {
42
+ link_shortening_enabled,
43
+ }
44
+ : {}),
45
+ ...(typeof use_click_tracking_enabled === 'boolean'
46
+ ? {
47
+ use_click_tracking_enabled,
48
+ }
49
+ : {}),
50
+ },
51
+ },
52
+ };
53
+ const resp = await client.sendMessageImmediately(requestBody);
54
+ await onComplete({
55
+ events: [
56
+ {
57
+ date: new Date().toISOString(),
58
+ text: { en: `SMS sent. Response: ${JSON.stringify(resp)}` },
59
+ },
60
+ ],
61
+ data_points: {
62
+ SMSDispatchId: resp.dispatch_id,
63
+ },
64
+ });
65
+ },
66
+ };
67
+ //# sourceMappingURL=sendSMS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendSMS.js","sourceRoot":"","sources":["../../../../../extensions/braze/actions/sendSMS/sendSMS.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mCAA8B;AAC9B,mEAA+E;AAE/E,6CAAwE;AACxE,yCAA0C;AAC1C,qCAA2D;AAE9C,QAAA,OAAO,GAAG;IACrB,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,2BAA2B;IACxC,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,mBAAmB,EAAE,qBAAqB,EAC1C,cAAc,EACd,IAAI,EACJ,KAAK,EAAE,MAAM,EACb,qBAAqB,EAAE,uBAAuB,EAC9C,uBAAuB,EAAE,0BAA0B,EACnD,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,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;QACnD,MAAM,WAAW,GAAG;YAClB,iBAAiB,EAAE,CAAC,cAAc,CAAC;YACnC,GAAG,CAAC,CAAC,IAAA,cAAK,EAAC,WAAW,CAAC,IAAI;gBACzB,WAAW;aACZ,CAAC;YACF,QAAQ,EAAE;gBACR,GAAG,EAAE;oBACH,qBAAqB;oBACrB,IAAI;oBACJ,MAAM;oBACN,GAAG,CAAC,CAAC,IAAA,cAAK,EAAC,oBAAoB,CAAC,IAAI;wBAClC,oBAAoB;qBACrB,CAAC;oBACF,GAAG,CAAC,OAAO,uBAAuB,KAAK,SAAS;wBAC9C,CAAC,CAAC;4BACE,uBAAuB;yBACxB;wBACH,CAAC,CAAC,EAAE,CAAC;oBACP,GAAG,CAAC,OAAO,0BAA0B,KAAK,SAAS;wBACjD,CAAC,CAAC;4BACE,0BAA0B;yBAC3B;wBACH,CAAC,CAAC,EAAE,CAAC;iBACR;aACF;SACF,CAAA;QAED,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAA;QAE7D,MAAM,UAAU,CAAC;YACf,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,uBAAuB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE;iBAC5D;aACF;YACD,WAAW,EAAE;gBACX,aAAa,EAAE,IAAI,CAAC,WAAW;aAChC;SACF,CAAC,CAAA;IACJ,CAAC;CAC+C,CAAA"}
@@ -0,0 +1,18 @@
1
+ interface SendMessageImmediatelyResponse {
2
+ dispatch_id: string;
3
+ }
4
+ interface ScheduleMessageResponse {
5
+ dispatch_id: string;
6
+ schedule_id: string;
7
+ message: string;
8
+ }
9
+ export declare class BrazeClient {
10
+ private readonly client;
11
+ constructor({ apiKey, baseUrl }: {
12
+ apiKey: string;
13
+ baseUrl: string;
14
+ });
15
+ sendMessageImmediately(data: Record<string, any>): Promise<SendMessageImmediatelyResponse>;
16
+ scheduleMessage(data: Record<string, any>): Promise<ScheduleMessageResponse>;
17
+ }
18
+ export {};
@@ -0,0 +1,29 @@
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.BrazeClient = void 0;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ class BrazeClient {
9
+ constructor({ apiKey, baseUrl }) {
10
+ this.client = axios_1.default.create({
11
+ baseURL: baseUrl,
12
+ headers: {
13
+ Authorization: `Bearer ${apiKey}`,
14
+ 'Content-Type': 'application/json',
15
+ Accept: 'application/json',
16
+ },
17
+ });
18
+ }
19
+ async sendMessageImmediately(data) {
20
+ const resp = await this.client.post(`/messages/send`, data);
21
+ return resp.data;
22
+ }
23
+ async scheduleMessage(data) {
24
+ const response = await this.client.post(`/messages/schedule/create`, data);
25
+ return response.data;
26
+ }
27
+ }
28
+ exports.BrazeClient = BrazeClient;
29
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../extensions/braze/client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;AAYjD,MAAa,WAAW;IAGtB,YAAY,EAAE,MAAM,EAAE,OAAO,EAAuC;QAClE,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,EAAE;gBACjC,cAAc,EAAE,kBAAkB;gBAClC,MAAM,EAAE,kBAAkB;aAC3B;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,sBAAsB,CAC1B,IAAyB;QAEzB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;QAC3D,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,IAAyB;QAEzB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAA;QAC1E,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AA3BD,kCA2BC"}
@@ -0,0 +1,2 @@
1
+ import { type Extension } from '@awell-health/extensions-core';
2
+ export declare const Braze: Extension;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Braze = 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
+ exports.Braze = {
8
+ key: 'braze',
9
+ title: 'Braze',
10
+ description: 'Braze is a customer engagement platform that helps you communicate with your patients.',
11
+ icon_url: 'https://res.cloudinary.com/da7x4rzl4/image/upload/c_thumb,w_200,g_face/v1740686243/brazeLogo_laecb9.jpg',
12
+ category: extensions_core_1.Category.COMMUNICATION,
13
+ author: {
14
+ authorType: extensions_core_1.AuthorType.AWELL,
15
+ },
16
+ settings: settings_1.settings,
17
+ actions: actions_1.actions,
18
+ webhooks: [],
19
+ };
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/braze/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,uCAAmC;AACnC,yCAAqC;AAExB,QAAA,KAAK,GAAc;IAC9B,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,OAAO;IACd,WAAW,EACT,wFAAwF;IAC1F,QAAQ,EACN,yGAAyG;IAC3G,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;IACP,QAAQ,EAAE,EAAE;CACb,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ export declare const settings: {
3
+ apiKey: {
4
+ key: string;
5
+ label: string;
6
+ obfuscated: true;
7
+ required: true;
8
+ description: string;
9
+ };
10
+ baseUrl: {
11
+ key: string;
12
+ label: string;
13
+ obfuscated: false;
14
+ required: true;
15
+ description: string;
16
+ };
17
+ };
18
+ export declare const SettingsValidationSchema: z.ZodObject<{
19
+ apiKey: z.ZodString;
20
+ baseUrl: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ baseUrl: string;
23
+ apiKey: string;
24
+ }, {
25
+ baseUrl: string;
26
+ apiKey: string;
27
+ }>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsValidationSchema = exports.settings = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.settings = {
6
+ apiKey: {
7
+ key: 'apiKey',
8
+ label: 'API Key',
9
+ obfuscated: true,
10
+ required: true,
11
+ description: 'Used to authenticate with Braze',
12
+ },
13
+ baseUrl: {
14
+ key: 'url',
15
+ label: 'URL',
16
+ obfuscated: false,
17
+ required: true,
18
+ description: 'The URL of the Braze instance',
19
+ },
20
+ };
21
+ exports.SettingsValidationSchema = zod_1.z.object({
22
+ apiKey: zod_1.z.string().min(1),
23
+ baseUrl: zod_1.z.string().min(1),
24
+ });
25
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/braze/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;KAC/C;IACD,OAAO,EAAE;QACP,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,KAAK;QACZ,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,+BAA+B;KAC7C;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACyB,CAAC,CAAA"}
@@ -19,22 +19,22 @@ export declare const creatingQuestionnaireResponsesSchema: z.ZodObject<{
19
19
  }>>;
20
20
  item: z.ZodArray<z.ZodAny, "many">;
21
21
  }, "strip", z.ZodTypeAny, {
22
- resourceType: "QuestionnaireResponse";
23
- questionnaire: string;
24
22
  subject: {
25
23
  reference: string;
26
24
  };
25
+ resourceType: "QuestionnaireResponse";
26
+ questionnaire: string;
27
27
  item: any[];
28
28
  authored?: string | undefined;
29
29
  author?: {
30
30
  reference: string;
31
31
  } | undefined;
32
32
  }, {
33
- resourceType: "QuestionnaireResponse";
34
- questionnaire: string;
35
33
  subject: {
36
34
  reference: string;
37
35
  };
36
+ resourceType: "QuestionnaireResponse";
37
+ questionnaire: string;
38
38
  item: any[];
39
39
  authored?: Date | undefined;
40
40
  author?: {
@@ -74,11 +74,11 @@ export declare const questionnaireResponseSchema: z.ZodObject<z.objectUtil.exten
74
74
  status: z.ZodString;
75
75
  }>, "strip", z.ZodTypeAny, {
76
76
  status: string;
77
- resourceType: "QuestionnaireResponse";
78
- questionnaire: string;
79
77
  subject: {
80
78
  reference: string;
81
79
  };
80
+ resourceType: "QuestionnaireResponse";
81
+ questionnaire: string;
82
82
  item: any[];
83
83
  meta: {
84
84
  versionId: string;
@@ -90,11 +90,11 @@ export declare const questionnaireResponseSchema: z.ZodObject<z.objectUtil.exten
90
90
  } | undefined;
91
91
  }, {
92
92
  status: string;
93
- resourceType: "QuestionnaireResponse";
94
- questionnaire: string;
95
93
  subject: {
96
94
  reference: string;
97
95
  };
96
+ resourceType: "QuestionnaireResponse";
97
+ questionnaire: string;
98
98
  item: any[];
99
99
  meta: {
100
100
  versionId: string;
@@ -141,11 +141,11 @@ export declare const questionnaireResponseWithIdSchema: z.ZodObject<z.objectUtil
141
141
  }>, "strip", z.ZodTypeAny, {
142
142
  status: string;
143
143
  id: string;
144
- resourceType: "QuestionnaireResponse";
145
- questionnaire: string;
146
144
  subject: {
147
145
  reference: string;
148
146
  };
147
+ resourceType: "QuestionnaireResponse";
148
+ questionnaire: string;
149
149
  item: any[];
150
150
  meta: {
151
151
  versionId: string;
@@ -158,11 +158,11 @@ export declare const questionnaireResponseWithIdSchema: z.ZodObject<z.objectUtil
158
158
  }, {
159
159
  status: string;
160
160
  id: string;
161
- resourceType: "QuestionnaireResponse";
162
- questionnaire: string;
163
161
  subject: {
164
162
  reference: string;
165
163
  };
164
+ resourceType: "QuestionnaireResponse";
165
+ questionnaire: string;
166
166
  item: any[];
167
167
  meta: {
168
168
  versionId: string;
@@ -52,17 +52,17 @@ export declare const FieldsValidationSchema: z.ZodObject<{
52
52
  subject: z.ZodOptional<z.ZodString>;
53
53
  message: z.ZodOptional<z.ZodString>;
54
54
  }, "strip", z.ZodTypeAny, {
55
+ templateId: string;
55
56
  signerRole: string;
56
57
  signerName: string;
57
58
  signerEmailAddress: string;
58
- templateId: string;
59
59
  message?: string | undefined;
60
60
  subject?: string | undefined;
61
61
  }, {
62
+ templateId: string;
62
63
  signerRole: string;
63
64
  signerName: string;
64
65
  signerEmailAddress: string;
65
- templateId: string;
66
66
  message?: string | undefined;
67
67
  subject?: string | undefined;
68
68
  }>;
@@ -74,19 +74,19 @@ export declare const FieldsValidationSchema: z.ZodObject<{
74
74
  message: z.ZodOptional<z.ZodString>;
75
75
  customFields: z.ZodEffects<z.ZodOptional<z.ZodString>, CustomFieldSchema[], string | undefined>;
76
76
  }, "strip", z.ZodTypeAny, {
77
+ templateId: string;
77
78
  customFields: CustomFieldSchema[];
78
79
  signerRole: string;
79
80
  signerName: string;
80
81
  signerEmailAddress: string;
81
- templateId: string;
82
82
  message?: string | undefined;
83
83
  title?: string | undefined;
84
84
  subject?: string | undefined;
85
85
  }, {
86
+ templateId: string;
86
87
  signerRole: string;
87
88
  signerName: string;
88
89
  signerEmailAddress: string;
89
- templateId: string;
90
90
  message?: string | undefined;
91
91
  title?: string | undefined;
92
92
  subject?: string | undefined;
@@ -68,19 +68,19 @@ export declare const FieldsValidationSchema: z.ZodObject<{
68
68
  message: z.ZodOptional<z.ZodString>;
69
69
  signingRedirectUrl: z.ZodOptional<z.ZodString>;
70
70
  }, "strip", z.ZodTypeAny, {
71
+ templateId: string;
71
72
  signerRole: string;
72
73
  signerName: string;
73
74
  signerEmailAddress: string;
74
- templateId: string;
75
75
  message?: string | undefined;
76
76
  title?: string | undefined;
77
77
  subject?: string | undefined;
78
78
  signingRedirectUrl?: string | undefined;
79
79
  }, {
80
+ templateId: string;
80
81
  signerRole: string;
81
82
  signerName: string;
82
83
  signerEmailAddress: string;
83
- templateId: string;
84
84
  message?: string | undefined;
85
85
  title?: string | undefined;
86
86
  subject?: string | undefined;
@@ -38,6 +38,7 @@ const athenahealth_1 = require("./athenahealth");
38
38
  const awell_1 = require("./awell");
39
39
  const awellTasks_1 = require("./awellTasks");
40
40
  const bland_1 = require("./bland");
41
+ const braze_1 = require("./braze");
41
42
  const calDotCom_1 = require("./calDotCom");
42
43
  const calendly_1 = require("./calendly");
43
44
  const canvasMedical_1 = require("./canvasMedical");
@@ -84,6 +85,7 @@ const json = __importStar(require("./markdown.json"));
84
85
  exports.markdown = json;
85
86
  exports.extensions = [
86
87
  bland_1.bland,
88
+ braze_1.Braze,
87
89
  athenahealth_1.athenahealth,
88
90
  awell_1.Awell,
89
91
  awellTasks_1.awellTasks,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA6C;AAC7C,mCAA+B;AAC/B,6CAAyC;AACzC,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,qCAAiC;AACjC,6CAAyC;AACzC,yCAAqC;AACrC,+CAA2C;AAC3C,6CAAyC;AACzC,yCAAqC;AACrC,+CAA2C;AAC3C,uCAAmC;AACnC,iCAA6B;AAC7B,iDAA6C;AAC7C,uDAAkD;AAClD,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,+CAA0C;AAC1C,uCAAmC;AACnC,iEAA6D;AAC7D,uCAAmC;AACnC,yCAAqC;AACrC,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,uCAAmC;AACnC,+CAA2C;AAC3C,0CAA0C;AAC1C,+CAA2C;AAC3C,iCAA6B;AAC7B,yCAAqC;AACrC,6DAA+C;AAC/C,iCAA6B;AAC7B,qCAAiC;AACjC,qCAAiC;AACjC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AACvC,qCAAiC;AACjC,uCAAmC;AACnC,yCAAqC;AACrC,uCAAmC;AAEnC,sDAAuC;AAG1B,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,aAAK;IACL,2BAAY;IACZ,aAAK;IACL,uBAAU;IACV,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,eAAM;IACN,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,iBAAO;IACP,WAAI;IACJ,2BAAY;IACZ,gCAAc;IACd,mBAAQ;IACR,qBAAS;IACT,mBAAQ;IACR,wBAAU;IACV,iBAAO;IACP,2CAAoB;IACpB,iBAAO;IACP,mBAAQ;IACR,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,iBAAO;IACP,aAAa;IACb,yBAAW;IACX,WAAI;IACJ,mBAAQ;IACR,6BAAQ;IACR,WAAI;IACJ,eAAM;IACN,eAAM;IACN,mBAAQ;IACR,mBAAQ;IACR,qBAAS;IACT,eAAM;IACN,iBAAO;IACP,mBAAQ;IACR,iBAAO;CACR,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA6C;AAC7C,mCAA+B;AAC/B,6CAAyC;AACzC,mCAA+B;AAC/B,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,qCAAiC;AACjC,6CAAyC;AACzC,yCAAqC;AACrC,+CAA2C;AAC3C,6CAAyC;AACzC,yCAAqC;AACrC,+CAA2C;AAC3C,uCAAmC;AACnC,iCAA6B;AAC7B,iDAA6C;AAC7C,uDAAkD;AAClD,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,+CAA0C;AAC1C,uCAAmC;AACnC,iEAA6D;AAC7D,uCAAmC;AACnC,yCAAqC;AACrC,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,uCAAmC;AACnC,+CAA2C;AAC3C,0CAA0C;AAC1C,+CAA2C;AAC3C,iCAA6B;AAC7B,yCAAqC;AACrC,6DAA+C;AAC/C,iCAA6B;AAC7B,qCAAiC;AACjC,qCAAiC;AACjC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AACvC,qCAAiC;AACjC,uCAAmC;AACnC,yCAAqC;AACrC,uCAAmC;AAEnC,sDAAuC;AAG1B,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,aAAK;IACL,aAAK;IACL,2BAAY;IACZ,aAAK;IACL,uBAAU;IACV,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,eAAM;IACN,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,iBAAO;IACP,WAAI;IACJ,2BAAY;IACZ,gCAAc;IACd,mBAAQ;IACR,qBAAS;IACT,mBAAQ;IACR,wBAAU;IACV,iBAAO;IACP,2CAAoB;IACpB,iBAAO;IACP,mBAAQ;IACR,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,iBAAO;IACP,aAAa;IACb,yBAAW;IACX,WAAI;IACJ,mBAAQ;IACR,6BAAQ;IACR,WAAI;IACJ,eAAM;IACN,eAAM;IACN,mBAAQ;IACR,mBAAQ;IACR,qBAAS;IACT,eAAM;IACN,iBAAO;IACP,mBAAQ;IACR,iBAAO;CACR,CAAA"}
@@ -15,6 +15,10 @@
15
15
  "readme": "---\ntitle: Bland.ai\ndescription: To do\n---\n\n# Bland.ai\n\nWith Bland.ai you can build, test, and deploy AI phone calling agents. \n\n## Extension settings\n\nTo set up this extension, you will need to provide an API key for Bland.\n\n## Actions\n\n### Send call (with Pathway)\n\nSend an AI phone call using a simple prompt or a conversational pathway agent you've built in the Bland platform. **The action is completed when Awell receives a callback from the Bland platform.**\n\nAwell lets you specify both the data you want to send to Bland and the structured data you’d like to receive in return. This is achieved by defining the request data for outgoing information and an analysis schema for the structured data you’ll get back.\n\n#### Request data\n\nAny JSON you put in here will be visible to the AI agent during the call - and can also be referenced with Prompt Variables.\n\nFor example, let’s say in the action you want to programmatically set the name of the person you’re calling. You could set request data to:\n\n```json\n{\n \"name\": \"John Doe\",\n}\n```\n\n[Also see Bland documentation.](https://docs.bland.ai/api-v1/post/calls)\n\n#### Analysis schema\n\nDefine a JSON schema for how you want to get information about the call - information like email addresses, names, appointment times or any other type of custom data.\n\nFor example, if you wanted to retrieve this information from the call:\n\n```json\n{\n \"email_address\": \"email\",\n \"first_name\": \"string\",\n \"last_name\": \"string\",\n \"wants_to_book_appointment\": \"boolean\",\n \"appointment_time\": \"YYYY-MM-DD HH:MM:SS\"\n}\n```\n\nWhen retrieving the call details, Bland will return data about the call in the following format:\n\n```json\n{\n \"analysis\": {\n \"email_address\": \"johndoe@gmail.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"wants_to_book_appointment\": true,\n \"appointment_time\": \"2024-01-01 12:00:00\"\n }\n}\n```\n\n[Also see Bland documentation.](https://docs.bland.ai/api-v1/post/calls)\n\n\n\n### Get call details\n\nRetrieve the details of a call based on the provider call ID.",
16
16
  "changelog": "# CHANGELOG"
17
17
  },
18
+ "braze": {
19
+ "readme": "---\ntitle: Braze\ndescription: Braze is a customer engagement platform that helps you communicate with your patients.\n---\n\n# Braze\n\nBraze is a comprehensive customer engagement platform that specializes in helping businesses connect with their users through personalized messaging channels.\n\n## Supported Actins\n\n- **sendSMS** - Send an immediate SMS message to a specified user\n- **scheduleSMS** - Schedule an SMS message to be sent at a specific time\n- **sendEmail** - Send an immediate email to a specified user\n- **scheduleEmail** - Schedule an email to be sent at a specific time\n- **sendEmailUsingTemplate** - Send an email using a pre-defined Braze template\n\n## Extension settings\n\nAn api key and the REST Endpoint URL are needed to be provided in order for the extension to authenticate with Braze's API.\nList of URLs can be found [here](https://www.braze.com/docs/api/basics/#endpoints) - make sure it's the REST Endpoint URL.\nDocumentation on API keys can be found [here](https://www.braze.com/docs/api/basics/#about-rest-api-keys).\n\nPermissions needed for the API key: \n- messages.schedule.create (Schedule a message to be sent at a specific time.)\n- messages.send (Send an immediate message to specific users.)\n\n\n",
20
+ "changelog": "# Braze changelog\n"
21
+ },
18
22
  "calDotCom": {
19
23
  "readme": "---\ntitle: Cal.com\ndescription: Cal.com is a modern and open source scheduling platform. With HIPAA, GDPR and SOC2 compliance, you can ensure that data is well-protected and that makes Cal.com a great fit for healthcare use cases.\n---\n\n# Cal.com\n\n[Cal.com](https://cal.com/) is a modern and **open source** scheduling platform. With HIPAA, GDPR and SOC2 compliance, you can ensure that data is well-protected and that makes Cal.com a great fit for healthcare use cases.\n\n## Cal.com x Awell\n\nThis extension allows you to let a stakeholder (eg: a patient) book an appointment as part of a care flow and to retrieve the booking details of an appointment.\n\n## Extension settings\n\nIn order to set up this extension, **you will need to provide a Cal.com API key**. You can obtain an API key via the Cal.com portal (`Settings > Developer > API keys`).\n\n## Custom Actions\n\n### Book appointment action\n\nYou can add this action to your care flow to enable a stakeholder (eg: a patient) to book an appointment in a predefined calendar. This is a **stakeholder-actionable action** which means it requires an actual user to book an appointment. Also note that this is a blocking action and that the care flow will not progress - unless there are parallel tracks or transitions - until the action/activity is completed (i.e. an appointment was booked).\n\n**The actual booking of the appointment can happen in two ways:**\n\n1. With Awell Hosted Pages: when the \"Book appointment\" action is activated, we serve the booking widget to the stakeholder so they can book an appointment directly from within Awell Hosted Pages.\n2. If you are not leveraging Awell Hosted Pages but have built a custom integration then we expose you all the details via our API so you can either create a Cal.com booking widget yourself or redirect the user to the Cal.com platform. Additionally, we expose a mutation that allows you to complete the activity and pass in the required data.\n\nBelow you can find an overview of all Awell Apps and whether they support rendering of the booking widget.\n\n| App | Supported |\n| ----------------------------- | --------- |\n| Awell Hosted Pages | Yes |\n| Your app (custom integration) | Yes |\n| Awell Care | No |\n| Awell MyCare | No |\n\n#### Data points\n\nAdding this action to your care flow will expose a new data point you can use in your care flow, the `bookingId`. When the care flow is orchestrated and the book appointment activity is completed, the id of the actual booking will be ingested as the value of that `bookingId` data point.\n\n### Get booking action\n\nThis action allows you to fetch the details of a booking based on the provided `bookingId`. This action will make the following data points available for you to use in your care flow:\n\n1. Event type ID\n2. Title\n3. Description\n4. Start time\n5. End time\n6. Status\n7. Cancel URL\n8. Reschedule URL\n9. Video call URL (if available)\n10. First Attendee's name\n12. First Attendee's timezone\n12. First Attendee's email\n13. Organizer's email\n\n### Update booking\n\nUpdates a booking and saves new `bookingId` and `bookingUid` as Data Points. Values possible to update:\n\n- Title - Title of Booking event\n- Description - Description of the meeting\n- Status - Status of the meeting to be set. Possible values: \"ACCEPTED\", \"PENDING\", \"CANCELLED\", \"REJECTED\".\n- Start - Start time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z. Please note that start/end time must be within user's availability hours.\n- End - End time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z. Please note that start/end time must be within user's availability hours.\n\n### Create booking\n\nCreates a booking and saves new `bookingId` as Data Points. Available fields:\n\n- Event Type ID - ID of the event type to book\n- Responses - Object containing email, name, location\n - ```json\n \"responses\": {\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"location\": \"Calcom HQ\"\n },\n ```\n- Metadata - Any metadata associated with the booking\n- Timezone - Timezone of the Attendee\n- Language - Language of the Attendee\n- Recurring Event ID - Recurring Event ID if the event is recurring\n- Title - Title of Booking event\n- Description - Description of the meeting\n- Status - Status of the meeting to be set. Possible values: \"ACCEPTED\", \"PENDING\", \"CANCELLED\", \"REJECTED\".\n- Start - Start time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z. Please note that start/end time must be within user's availability hours.\n- End - End time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z. Please note that start/end time must be within user's availability hours.\n\n### Delete Boooking\n\nDeletes a Booking with a given ID.\n\n## Pricing\n\n**This extension is free** but keep in mind that you might need a paid plan for Cal.com depending on your needs.\n\n## Limitations\n\n### Rescheduling\n\nWhen a previously made booking is rescheduled, there is no way yet to get the new/updated booking details into the care flow or have the care flow react on the updated booking.\n\nAlso note that when a booking is rescheduled, Cal.com doesn't update the original booking resource but creates a new one instead. As far as we know, there is no reference from the old booking to the new (rescheduled) booking.\n\n#### Example\n\nAn appointment has been booked with Cal.com and we have the below booking resource:\n\n```json\n{\n ...,\n \"bookingId\": \"1\",\n \"date\": \"Jan 1, 2023\"\n}\n```\n\nHowever, the patient reschedules the booking to Jan 10, 2023. When querying Cal.com's API (`GET v1/bookings/{bookingId}`), it will still return the old booking date instead of the new/rescheduled date.\n\n```json\n{\n ...,\n \"bookingId\": \"1\",\n \"date\": \"Jan 1, 2023\"\n}\n```\n\n## Webhooks\n\nWebhooks offer a great way to automate the flow with Awell when invitees schedule, cancel, or reschedule events, or when the meeting ends.\n\n**Important notes:**\n\n1. An Awell webhook endpoint can only listen to one event type. So make sure that when you create a webhook in Cal.com, the subscriber URL and the event trigger match the Awell webhook endpoint. This also means there can only be one event type per subscriber URL.\n2. Using a secret to verify the authenticity of the received payload is not yet supported.\n3. Custom payload templates are not supported, please use the default ones.\n",
20
24
  "changelog": "# Cal.com changelog\n\n## September 15, 2023\n\n- add createBooking action\n- add first attendee name and timezone to getBooking data points\n\n## September 4, 2023\n\n- add updateBooking and deleteBooking actions\n- update and refactor structure of getBooking and bookAppointment actions\n\n## July 4, 2023\n\n- Get booking action: add validation that bookingId and apiKey are not empty\n- Get booking action: add validation of response data to make sure we have data points\n\n## April 27, 2023\n\n- Get booking action: `startTime` and `endTime` data points are now of value type `date` instead of `string`.\n"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.194",
3
+ "version": "2.0.195",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {