@awell-health/awell-extensions 2.0.229 → 2.0.231
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.
- package/dist/extensions/bland/actions/getCallDetails/config/dataPoints.d.ts +48 -0
- package/dist/extensions/bland/actions/getCallDetails/config/dataPoints.js +48 -0
- package/dist/extensions/bland/actions/getCallDetails/config/dataPoints.js.map +1 -1
- package/dist/extensions/bland/actions/getCallDetails/config/fields.js +1 -1
- package/dist/extensions/bland/actions/getCallDetails/config/fields.js.map +1 -1
- package/dist/extensions/bland/actions/getCallDetails/getCallDetails.js +24 -8
- package/dist/extensions/bland/actions/getCallDetails/getCallDetails.js.map +1 -1
- package/dist/extensions/bland/actions/index.d.ts +542 -1
- package/dist/extensions/bland/actions/sendCall/config/dataPoints.js +0 -2
- package/dist/extensions/bland/actions/sendCall/config/dataPoints.js.map +1 -1
- package/dist/extensions/bland/actions/sendCall/config/fields.d.ts +360 -2
- package/dist/extensions/bland/actions/sendCall/config/fields.js +291 -36
- package/dist/extensions/bland/actions/sendCall/config/fields.js.map +1 -1
- package/dist/extensions/bland/actions/sendCall/sendCall.js +23 -40
- package/dist/extensions/bland/actions/sendCall/sendCall.js.map +1 -1
- package/dist/extensions/bland/actions/sendCallWithPathway/config/dataPoints.js +0 -2
- package/dist/extensions/bland/actions/sendCallWithPathway/config/dataPoints.js.map +1 -1
- package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.d.ts +370 -2
- package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.js +300 -37
- package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.js.map +1 -1
- package/dist/extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.js +23 -40
- package/dist/extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.js.map +1 -1
- package/dist/extensions/bland/api/schema/GetCallDetails.schema.d.ts +20 -29
- package/dist/extensions/bland/api/schema/GetCallDetails.schema.js +8 -9
- package/dist/extensions/bland/api/schema/GetCallDetails.schema.js.map +1 -1
- package/dist/extensions/bland/api/schema/SendCall.schema.d.ts +281 -34
- package/dist/extensions/bland/api/schema/SendCall.schema.js +53 -15
- package/dist/extensions/bland/api/schema/SendCall.schema.js.map +1 -1
- package/dist/extensions/bland/api/schema/atoms/BackgroundTrackSchema.d.ts +8 -0
- package/dist/extensions/bland/api/schema/atoms/BackgroundTrackSchema.js +26 -0
- package/dist/extensions/bland/api/schema/atoms/BackgroundTrackSchema.js.map +1 -0
- package/dist/extensions/bland/api/schema/atoms/ModelSchema.d.ts +2 -0
- package/dist/extensions/bland/api/schema/atoms/ModelSchema.js +6 -0
- package/dist/extensions/bland/api/schema/atoms/ModelSchema.js.map +1 -0
- package/dist/extensions/bland/api/schema/atoms/VoicemailActionSchema.d.ts +2 -0
- package/dist/extensions/bland/api/schema/atoms/VoicemailActionSchema.js +10 -0
- package/dist/extensions/bland/api/schema/atoms/VoicemailActionSchema.js.map +1 -0
- package/dist/extensions/bland/api/schema/atoms/WebhookEventsSchema.d.ts +2 -0
- package/dist/extensions/bland/api/schema/atoms/WebhookEventsSchema.js +6 -0
- package/dist/extensions/bland/api/schema/atoms/WebhookEventsSchema.js.map +1 -0
- package/dist/extensions/bland/api/schema/atoms/index.d.ts +4 -0
- package/dist/extensions/bland/api/schema/atoms/index.js +21 -0
- package/dist/extensions/bland/api/schema/atoms/index.js.map +1 -0
- package/dist/extensions/bland/index.js +2 -0
- package/dist/extensions/bland/index.js.map +1 -1
- package/dist/extensions/bland/lib/sharedActionFields.d.ts +8 -0
- package/dist/extensions/bland/lib/sharedActionFields.js +59 -0
- package/dist/extensions/bland/lib/sharedActionFields.js.map +1 -0
- package/dist/extensions/bland/webhooks/CallCompleted/__testdata__/callCompleted.mock.d.ts +68 -0
- package/dist/extensions/bland/webhooks/CallCompleted/__testdata__/callCompleted.mock.js +108 -0
- package/dist/extensions/bland/webhooks/CallCompleted/__testdata__/callCompleted.mock.js.map +1 -0
- package/dist/extensions/bland/webhooks/CallCompleted/callCompleted.d.ts +12 -0
- package/dist/extensions/bland/webhooks/CallCompleted/callCompleted.js +31 -0
- package/dist/extensions/bland/webhooks/CallCompleted/callCompleted.js.map +1 -0
- package/dist/extensions/bland/webhooks/CallCompleted/index.d.ts +1 -0
- package/dist/extensions/bland/webhooks/CallCompleted/index.js +18 -0
- package/dist/extensions/bland/webhooks/CallCompleted/index.js.map +1 -0
- package/dist/extensions/bland/webhooks/CallCompleted/types.d.ts +37 -0
- package/dist/extensions/bland/webhooks/CallCompleted/types.js +3 -0
- package/dist/extensions/bland/webhooks/CallCompleted/types.js.map +1 -0
- package/dist/extensions/bland/webhooks/index.d.ts +9 -0
- package/dist/extensions/bland/webhooks/index.js +6 -0
- package/dist/extensions/bland/webhooks/index.js.map +1 -0
- package/dist/extensions/markdown.json +1 -1
- package/dist/extensions/text-em-all/actions/createCallBroadcast/config.d.ts +20 -20
- package/dist/extensions/text-em-all/actions/types.d.ts +14 -14
- package/package.json +1 -1
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.VoicemailActionSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
exports.VoicemailActionSchema = zod_1.z.enum([
|
6
|
+
'hangup',
|
7
|
+
'leave_message',
|
8
|
+
'ignore',
|
9
|
+
]);
|
10
|
+
//# sourceMappingURL=VoicemailActionSchema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"VoicemailActionSchema.js","sourceRoot":"","sources":["../../../../../../extensions/bland/api/schema/atoms/VoicemailActionSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,qBAAqB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC1C,QAAQ;IACR,eAAe;IACf,QAAQ;CACT,CAAC,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.WebhookEventsSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
exports.WebhookEventsSchema = zod_1.z.array(zod_1.z.enum(['queue', 'call', 'latency', 'webhook', 'tool', 'dynamic_data']));
|
6
|
+
//# sourceMappingURL=WebhookEventsSchema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WebhookEventsSchema.js","sourceRoot":"","sources":["../../../../../../extensions/bland/api/schema/atoms/WebhookEventsSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,mBAAmB,GAAG,OAAC,CAAC,KAAK,CACxC,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CACxE,CAAA"}
|
@@ -0,0 +1,21 @@
|
|
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("./BackgroundTrackSchema"), exports);
|
18
|
+
__exportStar(require("./ModelSchema"), exports);
|
19
|
+
__exportStar(require("./VoicemailActionSchema"), exports);
|
20
|
+
__exportStar(require("./WebhookEventsSchema"), exports);
|
21
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/bland/api/schema/atoms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,gDAA6B;AAC7B,0DAAuC;AACvC,wDAAqC"}
|
@@ -4,6 +4,7 @@ exports.bland = void 0;
|
|
4
4
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
5
|
const actions_1 = require("./actions");
|
6
6
|
const settings_1 = require("./settings");
|
7
|
+
const webhooks_1 = require("./webhooks");
|
7
8
|
exports.bland = {
|
8
9
|
key: 'bland',
|
9
10
|
title: 'Bland.ai',
|
@@ -15,5 +16,6 @@ exports.bland = {
|
|
15
16
|
},
|
16
17
|
actions: actions_1.actions,
|
17
18
|
settings: settings_1.settings,
|
19
|
+
webhooks: webhooks_1.webhooks,
|
18
20
|
};
|
19
21
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/bland/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,uCAAmC;AACnC,yCAAqC;AAExB,QAAA,KAAK,GAAc;IAC9B,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,UAAU;IACjB,QAAQ,EACN,+FAA+F;IACjG,WAAW,EAAE,mCAAmC;IAChD,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,OAAO,EAAP,iBAAO;IACP,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/bland/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,uCAAmC;AACnC,yCAAqC;AACrC,yCAAqC;AAExB,QAAA,KAAK,GAAc;IAC9B,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,UAAU;IACjB,QAAQ,EACN,+FAA+F;IACjG,WAAW,EAAE,mCAAmC;IAChD,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,OAAO,EAAP,iBAAO;IACP,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const dropdownOptionsBoolean: {
|
3
|
+
value: string;
|
4
|
+
label: string;
|
5
|
+
}[];
|
6
|
+
export declare const dropdownOptionsBooleanSchema: z.ZodEffects<z.ZodEnum<["true", "false"]>, boolean, "true" | "false">;
|
7
|
+
export declare const JsonObjectSchema: z.ZodEffects<z.ZodOptional<z.ZodString>, Record<string, unknown>, string | undefined>;
|
8
|
+
export declare const JsonArraySchema: z.ZodEffects<z.ZodOptional<z.ZodString>, Record<string, string>[], string | undefined>;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.JsonArraySchema = exports.JsonObjectSchema = exports.dropdownOptionsBooleanSchema = exports.dropdownOptionsBoolean = void 0;
|
4
|
+
const lodash_1 = require("lodash");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
exports.dropdownOptionsBoolean = [
|
7
|
+
{ value: 'true', label: 'Yes' },
|
8
|
+
{ value: 'false', label: 'No' },
|
9
|
+
];
|
10
|
+
exports.dropdownOptionsBooleanSchema = zod_1.z
|
11
|
+
.enum(['true', 'false'])
|
12
|
+
.transform((val) => val === 'true');
|
13
|
+
exports.JsonObjectSchema = zod_1.z
|
14
|
+
.string()
|
15
|
+
.optional()
|
16
|
+
.transform((str, ctx) => {
|
17
|
+
if ((0, lodash_1.isNil)(str) || (0, lodash_1.isEmpty)(str))
|
18
|
+
return {};
|
19
|
+
try {
|
20
|
+
const parsedJson = JSON.parse(str);
|
21
|
+
return parsedJson;
|
22
|
+
}
|
23
|
+
catch (e) {
|
24
|
+
ctx.addIssue({
|
25
|
+
code: 'custom',
|
26
|
+
message: 'Not a valid JSON object',
|
27
|
+
});
|
28
|
+
return zod_1.z.NEVER;
|
29
|
+
}
|
30
|
+
});
|
31
|
+
exports.JsonArraySchema = zod_1.z
|
32
|
+
.string()
|
33
|
+
.optional()
|
34
|
+
.transform((str, ctx) => {
|
35
|
+
if ((0, lodash_1.isNil)(str) || (0, lodash_1.isEmpty)(str))
|
36
|
+
return [];
|
37
|
+
try {
|
38
|
+
const parsedJson = JSON.parse(str);
|
39
|
+
if ((0, lodash_1.isEmpty)(parsedJson)) {
|
40
|
+
return [];
|
41
|
+
}
|
42
|
+
if (!Array.isArray(parsedJson)) {
|
43
|
+
ctx.addIssue({
|
44
|
+
code: 'custom',
|
45
|
+
message: 'pronunciation_guide should be an array',
|
46
|
+
});
|
47
|
+
return zod_1.z.NEVER;
|
48
|
+
}
|
49
|
+
return parsedJson;
|
50
|
+
}
|
51
|
+
catch (e) {
|
52
|
+
ctx.addIssue({
|
53
|
+
code: 'custom',
|
54
|
+
message: 'Invalid pronunciation_guide data',
|
55
|
+
});
|
56
|
+
return zod_1.z.NEVER;
|
57
|
+
}
|
58
|
+
});
|
59
|
+
//# sourceMappingURL=sharedActionFields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sharedActionFields.js","sourceRoot":"","sources":["../../../../extensions/bland/lib/sharedActionFields.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AACvC,6BAAuB;AAEV,QAAA,sBAAsB,GAAG;IACpC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;IAC/B,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;CAChC,CAAA;AAEY,QAAA,4BAA4B,GAAG,OAAC;KAC1C,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvB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QAED,OAAO,UAAU,CAAA;IACnB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,kCAAkC;SAC5C,CAAC,CAAA;QACF,OAAO,OAAC,CAAC,KAAK,CAAA;IAChB,CAAC;AACH,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
export declare const callCompletedPayload: {
|
2
|
+
call_id: string;
|
3
|
+
c_id: string;
|
4
|
+
call_length: number;
|
5
|
+
batch_id: null;
|
6
|
+
to: string;
|
7
|
+
from: string;
|
8
|
+
completed: true;
|
9
|
+
created_at: string;
|
10
|
+
inbound: false;
|
11
|
+
queue_status: string;
|
12
|
+
max_duration: number;
|
13
|
+
error_message: null;
|
14
|
+
variables: {
|
15
|
+
now: string;
|
16
|
+
now_utc: string;
|
17
|
+
short_from: string;
|
18
|
+
short_to: string;
|
19
|
+
from: string;
|
20
|
+
to: string;
|
21
|
+
call_id: string;
|
22
|
+
phone_number: string;
|
23
|
+
country: string;
|
24
|
+
language: string;
|
25
|
+
metadata: {
|
26
|
+
awell_patient_id: string;
|
27
|
+
awell_care_flow_definition_id: string;
|
28
|
+
awell_care_flow_id: string;
|
29
|
+
awell_activity_id: string;
|
30
|
+
};
|
31
|
+
timestamp: string;
|
32
|
+
timezone: string;
|
33
|
+
};
|
34
|
+
answered_by: null;
|
35
|
+
record: false;
|
36
|
+
recording_url: null;
|
37
|
+
metadata: {
|
38
|
+
awell_patient_id: string;
|
39
|
+
awell_activity_id: string;
|
40
|
+
awell_care_flow_id: string;
|
41
|
+
awell_care_flow_definition_id: string;
|
42
|
+
};
|
43
|
+
summary: string;
|
44
|
+
price: number;
|
45
|
+
started_at: string;
|
46
|
+
local_dialing: false;
|
47
|
+
call_ended_by: string;
|
48
|
+
pathway_logs: null;
|
49
|
+
analysis_schema: null;
|
50
|
+
analysis: {
|
51
|
+
name: string;
|
52
|
+
};
|
53
|
+
transferred_to: null;
|
54
|
+
pathway_tags: never[];
|
55
|
+
recording_expiration: null;
|
56
|
+
status: string;
|
57
|
+
pathway_id: null;
|
58
|
+
concatenated_transcript: string;
|
59
|
+
transcripts: {
|
60
|
+
id: number;
|
61
|
+
user: string;
|
62
|
+
text: string;
|
63
|
+
created_at: string;
|
64
|
+
}[];
|
65
|
+
corrected_duration: string;
|
66
|
+
end_at: string;
|
67
|
+
disposition_tag: string;
|
68
|
+
};
|
@@ -0,0 +1,108 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.callCompletedPayload = void 0;
|
4
|
+
exports.callCompletedPayload = {
|
5
|
+
call_id: '4c150427-fb1e-4dd1-a44d-4f25b24361b0',
|
6
|
+
c_id: '4c150427-fb1e-4dd1-a44d-4f25b24361b0',
|
7
|
+
call_length: 0.4,
|
8
|
+
batch_id: null,
|
9
|
+
to: '+32476581696',
|
10
|
+
from: '+441174634094',
|
11
|
+
completed: true,
|
12
|
+
created_at: '2025-04-15T18:31:53.696+00:00',
|
13
|
+
inbound: false,
|
14
|
+
queue_status: 'complete',
|
15
|
+
max_duration: 30,
|
16
|
+
error_message: null,
|
17
|
+
variables: {
|
18
|
+
now: 'Tuesday, April 15, 2025 11:32 AM',
|
19
|
+
now_utc: 'Tuesday, April 15, 2025 6:32 PM',
|
20
|
+
short_from: '1174634094',
|
21
|
+
short_to: '2476581696',
|
22
|
+
from: '+441174634094',
|
23
|
+
to: '+32476581696',
|
24
|
+
call_id: '4c150427-fb1e-4dd1-a44d-4f25b24361b0',
|
25
|
+
phone_number: '+32476581696',
|
26
|
+
country: 'BE',
|
27
|
+
language: 'English',
|
28
|
+
metadata: {
|
29
|
+
awell_patient_id: 'patient-id',
|
30
|
+
awell_care_flow_definition_id: 'pathway-definition-id',
|
31
|
+
awell_care_flow_id: 'pathway-id',
|
32
|
+
awell_activity_id: 'activity-id',
|
33
|
+
},
|
34
|
+
timestamp: '2025-04-15T11:32:00-07:00',
|
35
|
+
timezone: 'America/Los_Angeles',
|
36
|
+
},
|
37
|
+
answered_by: null,
|
38
|
+
record: false,
|
39
|
+
recording_url: null,
|
40
|
+
metadata: {
|
41
|
+
awell_patient_id: 'patient-id',
|
42
|
+
awell_activity_id: 'activity-id',
|
43
|
+
awell_care_flow_id: 'pathway-id',
|
44
|
+
awell_care_flow_definition_id: 'pathway-definition-id',
|
45
|
+
},
|
46
|
+
summary: 'The call was brief and did not progress beyond introductions. The user, Mr. Chung, provided his name but the conversation was cut short, and the call was ended abruptly without discussing any specific topic or issue.',
|
47
|
+
price: 0.036,
|
48
|
+
started_at: '2025-04-15T18:31:53.696Z',
|
49
|
+
local_dialing: false,
|
50
|
+
call_ended_by: 'ASSISTANT',
|
51
|
+
pathway_logs: null,
|
52
|
+
analysis_schema: null,
|
53
|
+
analysis: { name: 'Chung' },
|
54
|
+
transferred_to: null,
|
55
|
+
pathway_tags: [],
|
56
|
+
recording_expiration: null,
|
57
|
+
status: 'completed',
|
58
|
+
pathway_id: null,
|
59
|
+
concatenated_transcript: 'assistant: Hello, thank you for calling. Could you please tell me your name? \n user: My name is Chung. \n assistant: Thank you, Mr. Chung. \n assistant: Hello, Mr. Chung, are you still there? \n user: Yes. \n agent-action: Ended call \n assistant: Goodbye, Mr. Chung. \n ',
|
60
|
+
transcripts: [
|
61
|
+
{
|
62
|
+
id: 144157637,
|
63
|
+
user: 'assistant',
|
64
|
+
text: 'Hello, thank you for calling. Could you please tell me your name?',
|
65
|
+
created_at: '2025-04-15T18:32:02.173844+00:00',
|
66
|
+
},
|
67
|
+
{
|
68
|
+
id: 144157732,
|
69
|
+
user: 'user',
|
70
|
+
text: 'My name is Chung.',
|
71
|
+
created_at: '2025-04-15T18:32:06.228492+00:00',
|
72
|
+
},
|
73
|
+
{
|
74
|
+
id: 144157766,
|
75
|
+
user: 'assistant',
|
76
|
+
text: 'Thank you, Mr. Chung.',
|
77
|
+
created_at: '2025-04-15T18:32:08.112669+00:00',
|
78
|
+
},
|
79
|
+
{
|
80
|
+
id: 144158017,
|
81
|
+
user: 'assistant',
|
82
|
+
text: 'Hello, Mr. Chung, are you still there?',
|
83
|
+
created_at: '2025-04-15T18:32:18.672315+00:00',
|
84
|
+
},
|
85
|
+
{
|
86
|
+
id: 144158086,
|
87
|
+
user: 'user',
|
88
|
+
text: 'Yes.',
|
89
|
+
created_at: '2025-04-15T18:32:21.219698+00:00',
|
90
|
+
},
|
91
|
+
{
|
92
|
+
id: 144158138,
|
93
|
+
user: 'agent-action',
|
94
|
+
text: 'Ended call',
|
95
|
+
created_at: '2025-04-15T18:32:23.353835+00:00',
|
96
|
+
},
|
97
|
+
{
|
98
|
+
id: 144158139,
|
99
|
+
user: 'assistant',
|
100
|
+
text: 'Goodbye, Mr. Chung.',
|
101
|
+
created_at: '2025-04-15T18:32:23.355831+00:00',
|
102
|
+
},
|
103
|
+
],
|
104
|
+
corrected_duration: '24',
|
105
|
+
end_at: '2025-04-15T18:32:23.000Z',
|
106
|
+
disposition_tag: 'NO_CONTACT_MADE',
|
107
|
+
};
|
108
|
+
//# sourceMappingURL=callCompleted.mock.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"callCompleted.mock.js","sourceRoot":"","sources":["../../../../../../extensions/bland/webhooks/CallCompleted/__testdata__/callCompleted.mock.ts"],"names":[],"mappings":";;;AACa,QAAA,oBAAoB,GAAG;IAClC,OAAO,EAAE,sCAAsC;IAC/C,IAAI,EAAE,sCAAsC;IAC5C,WAAW,EAAE,GAAG;IAChB,QAAQ,EAAE,IAAI;IACd,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,eAAe;IACrB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,+BAA+B;IAC3C,OAAO,EAAE,KAAK;IACd,YAAY,EAAE,UAAU;IACxB,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE;QACT,GAAG,EAAE,kCAAkC;QACvC,OAAO,E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E,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,uBAAuB;YAC7B,UAAU,EAAE,kCAAkC;SAC/C;QACD;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,wCAAwC;YAC9C,UAAU,EAAE,kCAAkC;SAC/C;QACD;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE,kCAAkC;SAC/C;QACD;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,YAAY;YAClB,UAAU,EAAE,kCAAkC;SAC/C;QACD;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,qBAAqB;YAC3B,UAAU,EAAE,kCAAkC;SAC/C;KACF;IACD,kBAAkB,EAAE,IAAI;IACxB,MAAM,EAAE,0BAA0B;IAClC,eAAe,EAAE,iBAAiB;CACG,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { type Webhook } from '@awell-health/extensions-core';
|
2
|
+
import { type settings } from '../../settings';
|
3
|
+
import { type CallCompletedWebhookPayload } from './types';
|
4
|
+
declare const dataPoints: {
|
5
|
+
callId: {
|
6
|
+
key: string;
|
7
|
+
valueType: "string";
|
8
|
+
};
|
9
|
+
};
|
10
|
+
export declare const callCompleted: Webhook<keyof typeof dataPoints, CallCompletedWebhookPayload, typeof settings>;
|
11
|
+
export type CallCompleted = typeof callCompleted;
|
12
|
+
export {};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.callCompleted = void 0;
|
4
|
+
const lodash_1 = require("lodash");
|
5
|
+
const dataPoints = {
|
6
|
+
callId: {
|
7
|
+
key: 'callId',
|
8
|
+
valueType: 'string',
|
9
|
+
},
|
10
|
+
};
|
11
|
+
exports.callCompleted = {
|
12
|
+
key: 'callCompleted',
|
13
|
+
dataPoints,
|
14
|
+
onEvent: async ({ payload: { payload, rawBody, headers, settings }, onSuccess, onError, }) => {
|
15
|
+
const callId = payload === null || payload === void 0 ? void 0 : payload.call_id;
|
16
|
+
if ((0, lodash_1.isNil)(callId)) {
|
17
|
+
await onError({
|
18
|
+
response: {
|
19
|
+
statusCode: 400,
|
20
|
+
message: 'Missing call_id in payload',
|
21
|
+
},
|
22
|
+
});
|
23
|
+
}
|
24
|
+
await onSuccess({
|
25
|
+
data_points: {
|
26
|
+
callId,
|
27
|
+
},
|
28
|
+
});
|
29
|
+
},
|
30
|
+
};
|
31
|
+
//# sourceMappingURL=callCompleted.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"callCompleted.js","sourceRoot":"","sources":["../../../../../extensions/bland/webhooks/CallCompleted/callCompleted.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAQ9B,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,aAAa,GAItB;IACF,GAAG,EAAE,eAAe;IACpB,UAAU;IACV,OAAO,EAAE,KAAK,EAAE,EACd,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAChD,SAAS,EACT,OAAO,GACR,EAAE,EAAE;QACH,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA;QAE/B,IAAI,IAAA,cAAK,EAAC,MAAM,CAAC,EAAE,CAAC;YAClB,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,4BAA4B;iBACtC;aACF,CAAC,CAAA;QACJ,CAAC;QAED,MAAM,SAAS,CAAC;YACd,WAAW,EAAE;gBACX,MAAM;aACP;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './callCompleted';
|
@@ -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("./callCompleted"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/bland/webhooks/CallCompleted/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
export interface CallCompletedWebhookPayload {
|
2
|
+
call_id: string;
|
3
|
+
c_id: string;
|
4
|
+
call_length: number;
|
5
|
+
batch_id: string | null;
|
6
|
+
to: string;
|
7
|
+
from: string;
|
8
|
+
completed: boolean;
|
9
|
+
created_at: string;
|
10
|
+
inbound: boolean;
|
11
|
+
queue_status: string;
|
12
|
+
max_duration: number;
|
13
|
+
error_message: string | null;
|
14
|
+
variables: Record<string, any>;
|
15
|
+
answered_by: string | null;
|
16
|
+
record: boolean;
|
17
|
+
recording_url: string | null;
|
18
|
+
metadata: Record<string, any>;
|
19
|
+
summary: string;
|
20
|
+
price: number;
|
21
|
+
started_at: string;
|
22
|
+
local_dialing: boolean;
|
23
|
+
call_ended_by: string;
|
24
|
+
pathway_logs: unknown | null;
|
25
|
+
analysis_schema: unknown | null;
|
26
|
+
analysis: Record<string, any>;
|
27
|
+
transferred_to: string | null;
|
28
|
+
pathway_tags: string[];
|
29
|
+
recording_expiration: string | null;
|
30
|
+
status: string;
|
31
|
+
pathway_id: string | null;
|
32
|
+
concatenated_transcript: string;
|
33
|
+
transcripts: Array<Record<string, any>>;
|
34
|
+
corrected_duration: string;
|
35
|
+
end_at: string;
|
36
|
+
disposition_tag: string;
|
37
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../extensions/bland/webhooks/CallCompleted/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare const webhooks: import("@awell-health/extensions-core").Webhook<"callId", import("./CallCompleted/types").CallCompletedWebhookPayload, {
|
2
|
+
apiKey: {
|
3
|
+
key: string;
|
4
|
+
label: string;
|
5
|
+
obfuscated: true;
|
6
|
+
description: string;
|
7
|
+
required: true;
|
8
|
+
};
|
9
|
+
}>[];
|
@@ -0,0 +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"}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"changelog": "# CHANGELOG"
|
13
13
|
},
|
14
14
|
"bland": {
|
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\
|
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\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.",
|
16
16
|
"changelog": "# CHANGELOG"
|
17
17
|
},
|
18
18
|
"braze": {
|
@@ -138,15 +138,15 @@ export declare const FieldsSchema: z.ZodObject<{
|
|
138
138
|
transferIntroduction: string;
|
139
139
|
} | undefined, string | undefined>;
|
140
140
|
audio: z.ZodEffects<z.ZodOptional<z.ZodString>, {
|
141
|
-
Description: string;
|
142
|
-
Created: string;
|
143
|
-
Text: string;
|
144
|
-
Name: string;
|
145
141
|
Voice: {
|
146
|
-
Text: string;
|
147
142
|
Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
|
143
|
+
Text: string;
|
148
144
|
TextToSpeech: boolean;
|
149
145
|
};
|
146
|
+
Description: string;
|
147
|
+
Created: string;
|
148
|
+
Text: string;
|
149
|
+
Name: string;
|
150
150
|
TextToSpeech: boolean;
|
151
151
|
Uri: string;
|
152
152
|
AudioID: string;
|
@@ -158,15 +158,15 @@ export declare const FieldsSchema: z.ZodObject<{
|
|
158
158
|
LastUsed: string;
|
159
159
|
} | undefined, string | undefined>;
|
160
160
|
audioVM: z.ZodEffects<z.ZodOptional<z.ZodString>, {
|
161
|
-
Description: string;
|
162
|
-
Created: string;
|
163
|
-
Text: string;
|
164
|
-
Name: string;
|
165
161
|
Voice: {
|
166
|
-
Text: string;
|
167
162
|
Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
|
163
|
+
Text: string;
|
168
164
|
TextToSpeech: boolean;
|
169
165
|
};
|
166
|
+
Description: string;
|
167
|
+
Created: string;
|
168
|
+
Text: string;
|
169
|
+
Name: string;
|
170
170
|
TextToSpeech: boolean;
|
171
171
|
Uri: string;
|
172
172
|
AudioID: string;
|
@@ -195,15 +195,15 @@ export declare const FieldsSchema: z.ZodObject<{
|
|
195
195
|
transferIntroduction: string;
|
196
196
|
} | undefined;
|
197
197
|
audio?: {
|
198
|
-
Description: string;
|
199
|
-
Created: string;
|
200
|
-
Text: string;
|
201
|
-
Name: string;
|
202
198
|
Voice: {
|
203
|
-
Text: string;
|
204
199
|
Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
|
200
|
+
Text: string;
|
205
201
|
TextToSpeech: boolean;
|
206
202
|
};
|
203
|
+
Description: string;
|
204
|
+
Created: string;
|
205
|
+
Text: string;
|
206
|
+
Name: string;
|
207
207
|
TextToSpeech: boolean;
|
208
208
|
Uri: string;
|
209
209
|
AudioID: string;
|
@@ -215,15 +215,15 @@ export declare const FieldsSchema: z.ZodObject<{
|
|
215
215
|
LastUsed: string;
|
216
216
|
} | undefined;
|
217
217
|
audioVM?: {
|
218
|
-
Description: string;
|
219
|
-
Created: string;
|
220
|
-
Text: string;
|
221
|
-
Name: string;
|
222
218
|
Voice: {
|
223
|
-
Text: string;
|
224
219
|
Voice: "Ivy" | "Joanna" | "Kendra" | "Kimberly" | "Salli" | "Joey" | "Justin" | "Kevin" | "Matthew";
|
220
|
+
Text: string;
|
225
221
|
TextToSpeech: boolean;
|
226
222
|
};
|
223
|
+
Description: string;
|
224
|
+
Created: string;
|
225
|
+
Text: string;
|
226
|
+
Name: string;
|
227
227
|
TextToSpeech: boolean;
|
228
228
|
Uri: string;
|
229
229
|
AudioID: string;
|