@awell-health/awell-extensions 2.1.138 → 2.1.140

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.
@@ -738,6 +738,42 @@ export declare const actions: {
738
738
  }[];
739
739
  };
740
740
  };
741
+ webhook: {
742
+ id: string;
743
+ label: string;
744
+ description: string;
745
+ type: import("@awell-health/extensions-core").FieldType.STRING;
746
+ stringType: import("@awell-health/extensions-core").StringType.URL;
747
+ required: false;
748
+ };
749
+ timeOut: {
750
+ id: string;
751
+ label: string;
752
+ description: string;
753
+ type: import("@awell-health/extensions-core").FieldType.NUMERIC;
754
+ required: false;
755
+ };
756
+ timeoutMessage: {
757
+ id: string;
758
+ label: string;
759
+ description: string;
760
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
761
+ required: false;
762
+ };
763
+ warningTime: {
764
+ id: string;
765
+ label: string;
766
+ description: string;
767
+ type: import("@awell-health/extensions-core").FieldType.NUMERIC;
768
+ required: false;
769
+ };
770
+ warningMessage: {
771
+ id: string;
772
+ label: string;
773
+ description: string;
774
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
775
+ required: false;
776
+ };
741
777
  requestData: {
742
778
  id: string;
743
779
  label: string;
@@ -44,6 +44,42 @@ export declare const fields: {
44
44
  }[];
45
45
  };
46
46
  };
47
+ webhook: {
48
+ id: string;
49
+ label: string;
50
+ description: string;
51
+ type: FieldType.STRING;
52
+ stringType: StringType.URL;
53
+ required: false;
54
+ };
55
+ timeOut: {
56
+ id: string;
57
+ label: string;
58
+ description: string;
59
+ type: FieldType.NUMERIC;
60
+ required: false;
61
+ };
62
+ timeoutMessage: {
63
+ id: string;
64
+ label: string;
65
+ description: string;
66
+ type: FieldType.TEXT;
67
+ required: false;
68
+ };
69
+ warningTime: {
70
+ id: string;
71
+ label: string;
72
+ description: string;
73
+ type: FieldType.NUMERIC;
74
+ required: false;
75
+ };
76
+ warningMessage: {
77
+ id: string;
78
+ label: string;
79
+ description: string;
80
+ type: FieldType.TEXT;
81
+ required: false;
82
+ };
47
83
  requestData: {
48
84
  id: string;
49
85
  label: string;
@@ -65,6 +101,11 @@ export declare const FieldsValidationSchema: z.ZodObject<{
65
101
  agentMessage: z.ZodOptional<z.ZodString>;
66
102
  pathwayId: z.ZodOptional<z.ZodString>;
67
103
  newConversation: z.ZodOptional<z.ZodEffects<z.ZodEnum<["true", "false"]>, boolean, "true" | "false">>;
104
+ webhook: z.ZodOptional<z.ZodString>;
105
+ timeOut: z.ZodOptional<z.ZodNumber>;
106
+ timeoutMessage: z.ZodOptional<z.ZodString>;
107
+ warningTime: z.ZodOptional<z.ZodNumber>;
108
+ warningMessage: z.ZodOptional<z.ZodString>;
68
109
  requestData: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodString>, Record<string, unknown>, string | undefined>>;
69
110
  metadata: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodString>, Record<string, unknown>, string | undefined>>;
70
111
  }, "strip", z.ZodTypeAny, {
@@ -72,15 +113,25 @@ export declare const FieldsValidationSchema: z.ZodObject<{
72
113
  agentNumber: string;
73
114
  pathwayId?: string | undefined;
74
115
  metadata?: Record<string, unknown> | undefined;
116
+ webhook?: string | undefined;
75
117
  requestData?: Record<string, unknown> | undefined;
76
118
  agentMessage?: string | undefined;
77
119
  newConversation?: boolean | undefined;
120
+ timeOut?: number | undefined;
121
+ timeoutMessage?: string | undefined;
122
+ warningTime?: number | undefined;
123
+ warningMessage?: string | undefined;
78
124
  }, {
79
125
  userNumber: string;
80
126
  agentNumber: string;
81
127
  pathwayId?: string | undefined;
82
128
  metadata?: string | undefined;
129
+ webhook?: string | undefined;
83
130
  requestData?: string | undefined;
84
131
  agentMessage?: string | undefined;
85
132
  newConversation?: "true" | "false" | undefined;
133
+ timeOut?: number | undefined;
134
+ timeoutMessage?: string | undefined;
135
+ warningTime?: number | undefined;
136
+ warningMessage?: string | undefined;
86
137
  }>;
@@ -48,6 +48,42 @@ exports.fields = {
48
48
  dropdownOptions: sharedActionFields_1.dropdownOptionsBoolean,
49
49
  },
50
50
  },
51
+ webhook: {
52
+ id: 'webhook',
53
+ label: 'Webhook',
54
+ description: 'The webhook URL to send SMS conversation events to. The Awell activity ID is appended as an activity_id query parameter for correlation.',
55
+ type: extensions_core_1.FieldType.STRING,
56
+ stringType: extensions_core_1.StringType.URL,
57
+ required: false,
58
+ },
59
+ timeOut: {
60
+ id: 'timeOut',
61
+ label: 'Timeout (seconds)',
62
+ description: 'Seconds of user silence (after an agent message) before the timeout flow fires (warning message and/or conversation end). Overrides the time_out on the agent number\u2019s SMS config and persists on the conversation.',
63
+ type: extensions_core_1.FieldType.NUMERIC,
64
+ required: false,
65
+ },
66
+ timeoutMessage: {
67
+ id: 'timeoutMessage',
68
+ label: 'Timeout message',
69
+ description: 'The message sent to the user when the timeout fires. Overrides the timeout_message on the agent number\u2019s SMS config.',
70
+ type: extensions_core_1.FieldType.TEXT,
71
+ required: false,
72
+ },
73
+ warningTime: {
74
+ id: 'warningTime',
75
+ label: 'Warning time (seconds)',
76
+ description: 'Seconds of user silence before sending the warning message. Must be less than the timeout. Overrides the warning_time on the agent number\u2019s SMS config.',
77
+ type: extensions_core_1.FieldType.NUMERIC,
78
+ required: false,
79
+ },
80
+ warningMessage: {
81
+ id: 'warningMessage',
82
+ label: 'Warning message',
83
+ description: 'The warning message sent to the user at the warning time. Overrides the warning_message on the agent number\u2019s SMS config.',
84
+ type: extensions_core_1.FieldType.TEXT,
85
+ required: false,
86
+ },
51
87
  requestData: {
52
88
  id: 'requestData',
53
89
  label: 'Request data',
@@ -69,6 +105,11 @@ exports.FieldsValidationSchema = zod_1.default.object({
69
105
  agentMessage: zod_1.default.string().optional(),
70
106
  pathwayId: zod_1.default.string().optional(),
71
107
  newConversation: sharedActionFields_1.dropdownOptionsBooleanSchema.optional(),
108
+ webhook: zod_1.default.string().optional(),
109
+ timeOut: zod_1.default.number().optional(),
110
+ timeoutMessage: zod_1.default.string().optional(),
111
+ warningTime: zod_1.default.number().optional(),
112
+ warningMessage: zod_1.default.string().optional(),
72
113
  requestData: sharedActionFields_1.JsonObjectSchema.optional(),
73
114
  metadata: sharedActionFields_1.JsonObjectSchema.optional(),
74
115
  });
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/bland/actions/sendSms/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAIsC;AACtC,8CAAwC;AACxC,wEAIwC;AAE3B,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,oFAAoF;QACtF,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,eAAe;QACtB,WAAW,EACT,uHAAuH;QACzH,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,gEAAgE;QAClE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,kFAAkF;QACpF,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE;YACP,eAAe,EAAE,2CAAsB;SACxC;KACF;IACD,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,gIAAgI;QAClI,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,6EAA6E;QAC/E,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,eAAe,EAAE,iDAA4B,CAAC,QAAQ,EAAE;IACxD,WAAW,EAAE,qCAAgB,CAAC,QAAQ,EAAE;IACxC,QAAQ,EAAE,qCAAgB,CAAC,QAAQ,EAAE;CACY,CAAC,CAAA"}
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/bland/actions/sendSms/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAIsC;AACtC,8CAAwC;AACxC,wEAIwC;AAE3B,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,EAAE,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,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,cAAc,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,qCAAgB,CAAC,QAAQ,EAAE;IACxC,QAAQ,EAAE,qCAAgB,CAAC,QAAQ,EAAE;CACY,CAAC,CAAA"}
@@ -22,6 +22,13 @@ exports.sendSms = {
22
22
  fieldsSchema: config_1.FieldsValidationSchema,
23
23
  payload,
24
24
  });
25
+ const getWebhookUrl = () => {
26
+ var _a;
27
+ if ((0, lodash_1.isEmpty)(fields.webhook))
28
+ return undefined;
29
+ const separator = ((_a = fields.webhook) === null || _a === void 0 ? void 0 : _a.includes('?')) === true ? '&' : '?';
30
+ return `${fields.webhook}${separator}activity_id=${payload.activity.id}`;
31
+ };
25
32
  const sendSmsInput = schema_1.SendSmsInputSchema.parse({
26
33
  user_number: fields.userNumber,
27
34
  agent_number: fields.agentNumber,
@@ -30,6 +37,15 @@ exports.sendSms = {
30
37
  : fields.agentMessage,
31
38
  pathway_id: (0, lodash_1.isEmpty)(fields.pathwayId) ? undefined : fields.pathwayId,
32
39
  new_conversation: fields.newConversation,
40
+ webhook: getWebhookUrl(),
41
+ time_out: fields.timeOut,
42
+ timeout_message: (0, lodash_1.isEmpty)(fields.timeoutMessage)
43
+ ? undefined
44
+ : fields.timeoutMessage,
45
+ warning_time: fields.warningTime,
46
+ warning_message: (0, lodash_1.isEmpty)(fields.warningMessage)
47
+ ? undefined
48
+ : fields.warningMessage,
33
49
  request_data: (0, lodash_1.isEmpty)(fields.requestData) ? undefined : fields.requestData,
34
50
  metadata: {
35
51
  ...fields.metadata,
@@ -1 +1 @@
1
- {"version":3,"file":"sendSms.js","sourceRoot":"","sources":["../../../../../extensions/bland/actions/sendSms/sendSms.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AACxD,mCAAuC;AACvC,uFAAmF;AAEnF,qCAAqE;AACrE,6CAAqD;AACrD,uEAA2E;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AC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc;gBAClE,WAAW,EAAE,IAAA,cAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;aAC5D;YACD,MAAM,EAAE;gBACN,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,gDACP,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,KACpB,EAAE;iBACH,CAAC;aACH;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -7,6 +7,10 @@ export declare const SendSmsInputSchema: z.ZodObject<{
7
7
  new_conversation: z.ZodOptional<z.ZodBoolean>;
8
8
  request_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
9
9
  webhook: z.ZodOptional<z.ZodString>;
10
+ time_out: z.ZodOptional<z.ZodNumber>;
11
+ timeout_message: z.ZodOptional<z.ZodString>;
12
+ warning_time: z.ZodOptional<z.ZodNumber>;
13
+ warning_message: z.ZodOptional<z.ZodString>;
10
14
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
11
15
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
12
16
  user_number: z.ZodString;
@@ -16,6 +20,10 @@ export declare const SendSmsInputSchema: z.ZodObject<{
16
20
  new_conversation: z.ZodOptional<z.ZodBoolean>;
17
21
  request_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
18
22
  webhook: z.ZodOptional<z.ZodString>;
23
+ time_out: z.ZodOptional<z.ZodNumber>;
24
+ timeout_message: z.ZodOptional<z.ZodString>;
25
+ warning_time: z.ZodOptional<z.ZodNumber>;
26
+ warning_message: z.ZodOptional<z.ZodString>;
19
27
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
20
28
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
21
29
  user_number: z.ZodString;
@@ -25,6 +33,10 @@ export declare const SendSmsInputSchema: z.ZodObject<{
25
33
  new_conversation: z.ZodOptional<z.ZodBoolean>;
26
34
  request_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
27
35
  webhook: z.ZodOptional<z.ZodString>;
36
+ time_out: z.ZodOptional<z.ZodNumber>;
37
+ timeout_message: z.ZodOptional<z.ZodString>;
38
+ warning_time: z.ZodOptional<z.ZodNumber>;
39
+ warning_message: z.ZodOptional<z.ZodString>;
28
40
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
29
41
  }, z.ZodTypeAny, "passthrough">>;
30
42
  export type SendSmsInputType = z.infer<typeof SendSmsInputSchema>;
@@ -11,6 +11,10 @@ exports.SendSmsInputSchema = zod_1.z
11
11
  new_conversation: zod_1.z.boolean().optional(),
12
12
  request_data: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
13
13
  webhook: zod_1.z.string().optional(),
14
+ time_out: zod_1.z.number().optional(), // Seconds of user silence before the timeout flow fires. Persists on the conversation.
15
+ timeout_message: zod_1.z.string().optional(), // Message sent when the timeout fires.
16
+ warning_time: zod_1.z.number().optional(), // Seconds before sending the warning message. Must be less than time_out.
17
+ warning_message: zod_1.z.string().optional(), // Warning message sent at warning_time.
14
18
  metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
15
19
  })
16
20
  .passthrough();
@@ -1 +1 @@
1
- {"version":3,"file":"SendSms.schema.js","sourceRoot":"","sources":["../../../../../extensions/bland/api/schema/SendSms.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,0CAA0C;IAC1E,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,4CAA4C;IAC7E,aAAa,EAAE,OAAC,CAAC,MAAM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Z,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE;CACnC,CAAC;KACD,WAAW,EAAE,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { type Webhook } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { type CompletedBlandTextWebhookPayload } from './types';
4
+ declare const dataPoints: {
5
+ conversationId: {
6
+ key: string;
7
+ valueType: "string";
8
+ };
9
+ status: {
10
+ key: string;
11
+ valueType: "string";
12
+ };
13
+ reason: {
14
+ key: string;
15
+ valueType: "string";
16
+ };
17
+ userNumber: {
18
+ key: string;
19
+ valueType: "string";
20
+ };
21
+ agentNumber: {
22
+ key: string;
23
+ valueType: "string";
24
+ };
25
+ pathwayId: {
26
+ key: string;
27
+ valueType: "string";
28
+ };
29
+ messageCount: {
30
+ key: string;
31
+ valueType: "number";
32
+ };
33
+ transcript: {
34
+ key: string;
35
+ valueType: "string";
36
+ };
37
+ variables: {
38
+ key: string;
39
+ valueType: "json";
40
+ };
41
+ conversationObject: {
42
+ key: string;
43
+ valueType: "json";
44
+ };
45
+ };
46
+ export declare const completedBlandText: Webhook<keyof typeof dataPoints, CompletedBlandTextWebhookPayload, typeof settings>;
47
+ export type CompletedBlandText = typeof completedBlandText;
48
+ export {};
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.completedBlandText = void 0;
4
+ const lodash_1 = require("lodash");
5
+ const dataPoints = {
6
+ conversationId: {
7
+ key: 'conversationId',
8
+ valueType: 'string',
9
+ },
10
+ status: {
11
+ key: 'status',
12
+ valueType: 'string',
13
+ },
14
+ reason: {
15
+ key: 'reason',
16
+ valueType: 'string',
17
+ },
18
+ userNumber: {
19
+ key: 'userNumber',
20
+ valueType: 'string',
21
+ },
22
+ agentNumber: {
23
+ key: 'agentNumber',
24
+ valueType: 'string',
25
+ },
26
+ pathwayId: {
27
+ key: 'pathwayId',
28
+ valueType: 'string',
29
+ },
30
+ messageCount: {
31
+ key: 'messageCount',
32
+ valueType: 'number',
33
+ },
34
+ transcript: {
35
+ key: 'transcript',
36
+ valueType: 'string',
37
+ },
38
+ variables: {
39
+ key: 'variables',
40
+ valueType: 'json',
41
+ },
42
+ conversationObject: {
43
+ key: 'conversationObject',
44
+ valueType: 'json',
45
+ },
46
+ };
47
+ exports.completedBlandText = {
48
+ key: 'completedBlandText',
49
+ description: 'Triggered when a Bland SMS conversation ends (status webhook with channel "sms").',
50
+ dataPoints,
51
+ onEvent: async ({ payload: { payload }, onSuccess, onError }) => {
52
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
53
+ const conversationId = payload === null || payload === void 0 ? void 0 : payload.conversation_id;
54
+ const awellPatientId = (_b = (_a = payload === null || payload === void 0 ? void 0 : payload.metadata) === null || _a === void 0 ? void 0 : _a.awell_patient_id) !== null && _b !== void 0 ? _b : (_d = (_c = payload === null || payload === void 0 ? void 0 : payload.variables) === null || _c === void 0 ? void 0 : _c.metadata) === null || _d === void 0 ? void 0 : _d.awell_patient_id;
55
+ if ((0, lodash_1.isNil)(conversationId)) {
56
+ await onError({
57
+ response: {
58
+ statusCode: 400,
59
+ message: 'Missing conversation_id in payload',
60
+ },
61
+ });
62
+ return;
63
+ }
64
+ await onSuccess({
65
+ data_points: {
66
+ conversationId,
67
+ /**
68
+ * The status of the conversation, e.g. "ended".
69
+ */
70
+ status: (_e = payload === null || payload === void 0 ? void 0 : payload.status) !== null && _e !== void 0 ? _e : '',
71
+ /**
72
+ * Why the conversation ended,
73
+ * e.g. "Conversation ended at End Call or Transfer Call node".
74
+ */
75
+ reason: (_f = payload === null || payload === void 0 ? void 0 : payload.reason) !== null && _f !== void 0 ? _f : '',
76
+ userNumber: (_g = payload === null || payload === void 0 ? void 0 : payload.phone_number) !== null && _g !== void 0 ? _g : '',
77
+ agentNumber: (_h = payload === null || payload === void 0 ? void 0 : payload.agent_number) !== null && _h !== void 0 ? _h : '',
78
+ pathwayId: (_j = payload === null || payload === void 0 ? void 0 : payload.pathway_id) !== null && _j !== void 0 ? _j : '',
79
+ messageCount: (_l = (_k = payload === null || payload === void 0 ? void 0 : payload.message_count) === null || _k === void 0 ? void 0 : _k.toString()) !== null && _l !== void 0 ? _l : '',
80
+ /**
81
+ * The full conversation as a single string
82
+ * ("AGENT: ...\nUSER: ...").
83
+ */
84
+ transcript: (_m = payload === null || payload === void 0 ? void 0 : payload.concatenated_transcript) !== null && _m !== void 0 ? _m : '',
85
+ /**
86
+ * Pathway variables captured during the conversation
87
+ * (e.g. opted_out, patient_reply, or custom extraction variables).
88
+ */
89
+ variables: (0, lodash_1.isNil)(payload === null || payload === void 0 ? void 0 : payload.variables)
90
+ ? ''
91
+ : JSON.stringify(payload.variables),
92
+ conversationObject: JSON.stringify(payload),
93
+ },
94
+ ...(awellPatientId !== undefined && { patient_id: awellPatientId }),
95
+ });
96
+ },
97
+ };
98
+ //# sourceMappingURL=completedBlandText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completedBlandText.js","sourceRoot":"","sources":["../../../../../extensions/bland/webhooks/CompletedBlandText/completedBlandText.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAQ9B,MAAM,UAAU,GAAG;IACjB,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,SAAS,EAAE,QAAQ;KACpB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,UAAU,EAAE;QACV,GAAG,EAAE,YAAY;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;IACD,YAAY,EAAE;QAC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AP,OAAO,uBAAP,OAAO,CAAE,YAAY,mCAAI,EAAE;gBACvC,WAAW,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,mCAAI,EAAE;gBACxC,SAAS,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,EAAE;gBACpC,YAAY,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,0CAAE,QAAQ,EAAE,mCAAI,EAAE;gBACtD;;;mBAGG;gBACH,UAAU,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB,mCAAI,EAAE;gBAClD;;;mBAGG;gBACH,SAAS,EAAE,IAAA,cAAK,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC;oBAClC,CAAC,CAAC,EAAE;oBACJ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC;gBACrC,kBAAkB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;aAC5C;YACD,GAAG,CAAC,cAAc,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;SACpE,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,30 @@
1
+ export interface SmsConversationHistoryEntry {
2
+ sender?: 'AGENT' | 'USER' | string;
3
+ message?: string;
4
+ status?: string;
5
+ timestamp?: string;
6
+ }
7
+ export interface CompletedBlandTextWebhookPayload {
8
+ type?: string;
9
+ conversation_id?: string;
10
+ status?: string;
11
+ channel?: string;
12
+ phone_number?: string;
13
+ agent_number?: string;
14
+ conversation_history?: SmsConversationHistoryEntry[];
15
+ pathway_id?: string;
16
+ pathway_version?: string;
17
+ message_count?: number;
18
+ ended_at?: string;
19
+ reason?: string;
20
+ variables?: Record<string, unknown>;
21
+ metadata?: {
22
+ awell_patient_id?: string;
23
+ awell_activity_id?: string;
24
+ awell_care_flow_id?: string;
25
+ awell_care_flow_definition_id?: string;
26
+ [key: string]: unknown;
27
+ };
28
+ created_at?: string;
29
+ concatenated_transcript?: string;
30
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../extensions/bland/webhooks/CompletedBlandText/types.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- export declare const webhooks: import("@awell-health/extensions-core").Webhook<"status" | "completed" | "callId" | "answeredBy" | "errorMessage" | "callObject", import("./CallCompleted/types").CallCompletedWebhookPayload, {
1
+ export declare const webhooks: (import("@awell-health/extensions-core").Webhook<"status" | "completed" | "callId" | "answeredBy" | "errorMessage" | "callObject", import("./CallCompleted/types").CallCompletedWebhookPayload, {
2
2
  apiKey: {
3
3
  key: string;
4
4
  label: string;
@@ -6,4 +6,12 @@ export declare const webhooks: import("@awell-health/extensions-core").Webhook<"
6
6
  description: string;
7
7
  required: true;
8
8
  };
9
- }>[];
9
+ }> | import("@awell-health/extensions-core").Webhook<"status" | "reason" | "pathwayId" | "variables" | "userNumber" | "agentNumber" | "conversationId" | "messageCount" | "transcript" | "conversationObject", import("./CompletedBlandText/types").CompletedBlandTextWebhookPayload, {
10
+ apiKey: {
11
+ key: string;
12
+ label: string;
13
+ obfuscated: true;
14
+ description: string;
15
+ required: true;
16
+ };
17
+ }>)[];
@@ -2,5 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.webhooks = void 0;
4
4
  const callCompleted_1 = require("./CallCompleted/callCompleted");
5
- exports.webhooks = [callCompleted_1.callCompleted];
5
+ const completedBlandText_1 = require("./CompletedBlandText/completedBlandText");
6
+ exports.webhooks = [callCompleted_1.callCompleted, completedBlandText_1.completedBlandText];
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/bland/webhooks/index.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAEhD,QAAA,QAAQ,GAAG,CAAC,6BAAa,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/bland/webhooks/index.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAC7D,gFAA4E;AAE/D,QAAA,QAAQ,GAAG,CAAC,6BAAa,EAAE,uCAAkB,CAAC,CAAA"}
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "bland": {
23
23
  "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\nInitiates an AI phone call using a simple prompt or a conversational pathway agent built on the Bland platform. This action is asynchronous—it triggers a call request in Bland, which queues the call. Note that the action only confirms that Bland has received the request; it does not wait for the call to complete or handle any callbacks from Bland.\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### Get call details\n\nRetrieve the details of a call based on the provider call ID.",
24
- "changelog": "# CHANGELOG\n\n## Unreleased\n\n- Added `sendSms` action: send an SMS immediately via Bland `POST /v1/sms/send`. The agent message is optional; when omitted, the pathway configured on the agent number generates the message.\n- Added `createSmsConversation` action: seed an SMS conversation positioned at pathway state via Bland `POST /v1/sms/create` without sending a message.\n"
24
+ "changelog": "# CHANGELOG\n\n## Unreleased\n\n- Added `sendSms` action: send an SMS immediately via Bland `POST /v1/sms/send`. The agent message is optional; when omitted, the pathway configured on the agent number generates the message.\n- Added `createSmsConversation` action: seed an SMS conversation positioned at pathway state via Bland `POST /v1/sms/create` without sending a message.\n- Added optional timeout fields to `sendSms` (`time_out`, `timeout_message`, `warning_time`, `warning_message`): per-conversation overrides for Bland's silence-timeout flow.\n- Added `completedBlandText` webhook: triggered when a Bland SMS conversation ends. Maps conversation data (status, reason, transcript, pathway variables) to data points and resolves the patient via the `awell_patient_id` echoed back in metadata.\n"
25
25
  },
26
26
  "braze": {
27
27
  "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## 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. \n\nAn app ID can also be specified via the extension settings or the action field. Actions requiring an app ID to be provided will throw an error if no app ID is provided via the extension settings or the action field. If both are provided, the app ID from the action field will be used.\n\nList of URLs can be found [here](https://www.braze.com/docs/api/basics/#endpoints) - make sure it's the REST Endpoint URL. Documentation on API keys can be found [here](https://www.braze.com/docs/api/basics/#about-rest-api-keys).\n\n## Supported Actins\n\n### Send SMS\n\nSend an immediate SMS message to a specified user\n\nRequired permissions: `messages.send`\n\n### Schedule SMS\n\nSchedule an SMS message to be sent at a specific time\n\nRequired permissions: `messages.schedule.create`\n\n### Send Email\n\nSend an immediate email to a specified user\n\nRequired permissions: `messages.send`\n\n### Schedule Email\n\nSchedule an email to be sent at a specific time\n\nRequired permissions: `messages.schedule.create`\n\n### Send Email Using Template\n\nSend an email using a pre-defined Braze template\n\nRequired permissions: `messages.send`\n\n### Send campaign\n\nSend a campaign message.\n\nRequired permissions: `campaigns.trigger.send`\n",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.1.138",
3
+ "version": "2.1.140",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {