@awell-health/awell-extensions 2.0.64 → 2.0.66
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/bland/actions/index.d.ts +52 -0
- package/dist/extensions/bland/actions/index.js +10 -0
- package/dist/extensions/bland/actions/index.js.map +1 -0
- package/dist/extensions/bland/actions/sendCall/config/dataPoints.d.ts +10 -0
- package/dist/extensions/bland/actions/sendCall/config/dataPoints.js +14 -0
- package/dist/extensions/bland/actions/sendCall/config/dataPoints.js.map +1 -0
- package/dist/extensions/bland/actions/sendCall/config/fields.d.ts +29 -0
- package/dist/extensions/bland/actions/sendCall/config/fields.js +30 -0
- package/dist/extensions/bland/actions/sendCall/config/fields.js.map +1 -0
- package/dist/extensions/bland/actions/sendCall/config/index.d.ts +2 -0
- package/dist/extensions/bland/actions/sendCall/config/index.js +9 -0
- package/dist/extensions/bland/actions/sendCall/config/index.js.map +1 -0
- package/dist/extensions/bland/actions/sendCall/index.d.ts +1 -0
- package/dist/extensions/bland/actions/sendCall/index.js +18 -0
- package/dist/extensions/bland/actions/sendCall/index.js.map +1 -0
- package/dist/extensions/bland/actions/sendCall/sendCall.d.ts +4 -0
- package/dist/extensions/bland/actions/sendCall/sendCall.js +38 -0
- package/dist/extensions/bland/actions/sendCall/sendCall.js.map +1 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/dataPoints.d.ts +10 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/dataPoints.js +14 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/dataPoints.js.map +1 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.d.ts +29 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.js +30 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.js.map +1 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/index.d.ts +2 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/index.js +9 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/config/index.js.map +1 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/index.d.ts +1 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/index.js +18 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/index.js.map +1 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.d.ts +4 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.js +39 -0
- package/dist/extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.js.map +1 -0
- package/dist/extensions/bland/api/client.d.ts +10 -0
- package/dist/extensions/bland/api/client.js +24 -0
- package/dist/extensions/bland/api/client.js.map +1 -0
- package/dist/extensions/bland/api/schema/SendCall.schema.d.ts +132 -0
- package/dist/extensions/bland/api/schema/SendCall.schema.js +50 -0
- package/dist/extensions/bland/api/schema/SendCall.schema.js.map +1 -0
- package/dist/extensions/bland/api/schema/index.d.ts +1 -0
- package/dist/extensions/bland/api/schema/index.js +18 -0
- package/dist/extensions/bland/api/schema/index.js.map +1 -0
- package/dist/extensions/bland/index.d.ts +2 -0
- package/dist/extensions/bland/index.js +19 -0
- package/dist/extensions/bland/index.js.map +1 -0
- package/dist/extensions/bland/lib/validatePayloadAndCreateSdk.d.ts +18 -0
- package/dist/extensions/bland/lib/validatePayloadAndCreateSdk.js +34 -0
- package/dist/extensions/bland/lib/validatePayloadAndCreateSdk.js.map +1 -0
- package/dist/extensions/bland/settings.d.ts +17 -0
- package/dist/extensions/bland/settings.js +17 -0
- package/dist/extensions/bland/settings.js.map +1 -0
- package/dist/extensions/healthie/actions/index.d.ts +24 -0
- package/dist/extensions/healthie/actions/index.js +2 -0
- package/dist/extensions/healthie/actions/index.js.map +1 -1
- package/dist/extensions/healthie/actions/lockFormAnswer/config/datapoints.d.ts +1 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/config/datapoints.js +5 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/config/datapoints.js.map +1 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/config/fields.d.ts +18 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/config/fields.js +21 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/config/fields.js.map +1 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/config/index.d.ts +2 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/config/index.js +9 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/config/index.js.map +1 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/index.d.ts +1 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/index.js +6 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/index.js.map +1 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/lockFormAnswerGroup.d.ts +4 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/lockFormAnswerGroup.js +35 -0
- package/dist/extensions/healthie/actions/lockFormAnswer/lockFormAnswerGroup.js.map +1 -0
- package/dist/extensions/healthie/lib/sdk/genql/generated/schema.d.ts +931 -26
- package/dist/extensions/healthie/lib/sdk/genql/generated/schema.js +141 -14
- package/dist/extensions/healthie/lib/sdk/genql/generated/schema.js.map +1 -1
- package/dist/extensions/healthie/lib/sdk/genql/generated/types.d.ts +295 -4
- package/dist/extensions/healthie/lib/sdk/genql/generated/types.js +10271 -9543
- package/dist/extensions/healthie/lib/sdk/genql/generated/types.js.map +1 -1
- package/dist/extensions/markdown.json +4 -0
- package/package.json +1 -1
@@ -0,0 +1,52 @@
|
|
1
|
+
export declare const actions: {
|
2
|
+
sendCallWithPathway: import("@awell-health/extensions-core").Action<{
|
3
|
+
phoneNumber: {
|
4
|
+
id: string;
|
5
|
+
label: string;
|
6
|
+
description: string;
|
7
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
8
|
+
stringType: import("@awell-health/extensions-core").StringType.PHONE;
|
9
|
+
required: true;
|
10
|
+
};
|
11
|
+
pathwayId: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: import("@awell-health/extensions-core").FieldType.TEXT;
|
16
|
+
required: true;
|
17
|
+
};
|
18
|
+
}, {
|
19
|
+
apiKey: {
|
20
|
+
key: string;
|
21
|
+
label: string;
|
22
|
+
obfuscated: true;
|
23
|
+
description: string;
|
24
|
+
required: true;
|
25
|
+
};
|
26
|
+
}, "status" | "callId">;
|
27
|
+
sendCall: import("@awell-health/extensions-core").Action<{
|
28
|
+
phoneNumber: {
|
29
|
+
id: string;
|
30
|
+
label: string;
|
31
|
+
description: string;
|
32
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
33
|
+
stringType: import("@awell-health/extensions-core").StringType.PHONE;
|
34
|
+
required: true;
|
35
|
+
};
|
36
|
+
task: {
|
37
|
+
id: string;
|
38
|
+
label: string;
|
39
|
+
description: string;
|
40
|
+
type: import("@awell-health/extensions-core").FieldType.TEXT;
|
41
|
+
required: true;
|
42
|
+
};
|
43
|
+
}, {
|
44
|
+
apiKey: {
|
45
|
+
key: string;
|
46
|
+
label: string;
|
47
|
+
obfuscated: true;
|
48
|
+
description: string;
|
49
|
+
required: true;
|
50
|
+
};
|
51
|
+
}, "status" | "callId">;
|
52
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.actions = void 0;
|
4
|
+
const sendCall_1 = require("./sendCall");
|
5
|
+
const sendCallWithPathway_1 = require("./sendCallWithPathway");
|
6
|
+
exports.actions = {
|
7
|
+
sendCallWithPathway: sendCallWithPathway_1.sendCallWithPathway,
|
8
|
+
sendCall: sendCall_1.sendCall,
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/bland/actions/index.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AACrC,+DAA2D;AAE9C,QAAA,OAAO,GAAG;IACrB,mBAAmB,EAAnB,yCAAmB;IACnB,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = void 0;
|
4
|
+
exports.dataPoints = {
|
5
|
+
callId: {
|
6
|
+
key: 'callId',
|
7
|
+
valueType: 'string',
|
8
|
+
},
|
9
|
+
status: {
|
10
|
+
key: 'status',
|
11
|
+
valueType: 'string',
|
12
|
+
},
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=dataPoints.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/bland/actions/sendCall/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { FieldType, StringType } from '@awell-health/extensions-core';
|
2
|
+
import z from 'zod';
|
3
|
+
export declare const fields: {
|
4
|
+
phoneNumber: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
description: string;
|
8
|
+
type: FieldType.STRING;
|
9
|
+
stringType: StringType.PHONE;
|
10
|
+
required: true;
|
11
|
+
};
|
12
|
+
task: {
|
13
|
+
id: string;
|
14
|
+
label: string;
|
15
|
+
description: string;
|
16
|
+
type: FieldType.TEXT;
|
17
|
+
required: true;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
21
|
+
phoneNumber: z.ZodString;
|
22
|
+
task: z.ZodString;
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
24
|
+
phoneNumber: string;
|
25
|
+
task: string;
|
26
|
+
}, {
|
27
|
+
phoneNumber: string;
|
28
|
+
task: string;
|
29
|
+
}>;
|
@@ -0,0 +1,30 @@
|
|
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.FieldsValidationSchema = exports.fields = void 0;
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
9
|
+
exports.fields = {
|
10
|
+
phoneNumber: {
|
11
|
+
id: 'phoneNumber',
|
12
|
+
label: 'Phone number',
|
13
|
+
description: '',
|
14
|
+
type: extensions_core_1.FieldType.STRING,
|
15
|
+
stringType: extensions_core_1.StringType.PHONE,
|
16
|
+
required: true,
|
17
|
+
},
|
18
|
+
task: {
|
19
|
+
id: 'task',
|
20
|
+
label: 'Task',
|
21
|
+
description: 'Provide instructions, relevant information, and examples of the ideal conversation flow.',
|
22
|
+
type: extensions_core_1.FieldType.TEXT,
|
23
|
+
required: true,
|
24
|
+
},
|
25
|
+
};
|
26
|
+
exports.FieldsValidationSchema = zod_1.default.object({
|
27
|
+
phoneNumber: zod_1.default.string().min(1),
|
28
|
+
task: zod_1.default.string().min(1),
|
29
|
+
});
|
30
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/bland/actions/sendCall/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAIsC;AACtC,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EACT,0FAA0F;QAC5F,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC0B,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
7
|
+
var dataPoints_1 = require("./dataPoints");
|
8
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/bland/actions/sendCall/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './sendCall';
|
@@ -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("./sendCall"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/bland/actions/sendCall/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA0B"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendCall = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const addEventLog_1 = require("../../../../src/lib/awell/addEventLog");
|
6
|
+
const validatePayloadAndCreateSdk_1 = require("../../lib/validatePayloadAndCreateSdk");
|
7
|
+
const config_1 = require("./config");
|
8
|
+
exports.sendCall = {
|
9
|
+
key: 'sendCall',
|
10
|
+
category: extensions_core_1.Category.COMMUNICATION,
|
11
|
+
title: 'Send call',
|
12
|
+
description: 'Send an AI phone call with a custom objective and actions.',
|
13
|
+
fields: config_1.fields,
|
14
|
+
previewable: false,
|
15
|
+
dataPoints: config_1.dataPoints,
|
16
|
+
onEvent: async ({ payload, onComplete }) => {
|
17
|
+
const { fields, blandSdk } = await (0, validatePayloadAndCreateSdk_1.validatePayloadAndCreateSdk)({
|
18
|
+
fieldsSchema: config_1.FieldsValidationSchema,
|
19
|
+
payload,
|
20
|
+
});
|
21
|
+
const { data } = await blandSdk.sendCall({
|
22
|
+
phone_number: fields.phoneNumber,
|
23
|
+
task: fields.task,
|
24
|
+
});
|
25
|
+
await onComplete({
|
26
|
+
data_points: {
|
27
|
+
callId: data.call_id,
|
28
|
+
status: data.status,
|
29
|
+
},
|
30
|
+
events: [
|
31
|
+
(0, addEventLog_1.addActivityEventLog)({
|
32
|
+
message: `Call sent to Bland. Status: ${data.status}, Call ID: ${data.call_id}`,
|
33
|
+
}),
|
34
|
+
],
|
35
|
+
});
|
36
|
+
},
|
37
|
+
};
|
38
|
+
//# sourceMappingURL=sendCall.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sendCall.js","sourceRoot":"","sources":["../../../../../extensions/bland/actions/sendCall/sendCall.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AACxD,uEAA2E;AAC3E,uFAAmF;AAEnF,qCAAqE;AAExD,QAAA,QAAQ,GAIjB;IACF,GAAG,EAAE,UAAU;IACf,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,4DAA4D;IACzE,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAiB,EAAE;QACxD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAA,yDAA2B,EAAC;YAC7D,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC;YACvC,YAAY,EAAE,MAAM,CAAC,WAAW;YAChC,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC,CAAA;QAEF,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,MAAM,EAAE,IAAI,CAAC,OAAO;gBACpB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB;YACD,MAAM,EAAE;gBACN,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,+BAA+B,IAAI,CAAC,MAAM,cAAc,IAAI,CAAC,OAAO,EAAE;iBAChF,CAAC;aACH;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = void 0;
|
4
|
+
exports.dataPoints = {
|
5
|
+
callId: {
|
6
|
+
key: 'callId',
|
7
|
+
valueType: 'string',
|
8
|
+
},
|
9
|
+
status: {
|
10
|
+
key: 'status',
|
11
|
+
valueType: 'string',
|
12
|
+
},
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=dataPoints.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/bland/actions/sendCallWithPathway/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { FieldType, StringType } from '@awell-health/extensions-core';
|
2
|
+
import z from 'zod';
|
3
|
+
export declare const fields: {
|
4
|
+
phoneNumber: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
description: string;
|
8
|
+
type: FieldType.STRING;
|
9
|
+
stringType: StringType.PHONE;
|
10
|
+
required: true;
|
11
|
+
};
|
12
|
+
pathwayId: {
|
13
|
+
id: string;
|
14
|
+
label: string;
|
15
|
+
description: string;
|
16
|
+
type: FieldType.TEXT;
|
17
|
+
required: true;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
21
|
+
phoneNumber: z.ZodString;
|
22
|
+
pathwayId: z.ZodString;
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
24
|
+
pathwayId: string;
|
25
|
+
phoneNumber: string;
|
26
|
+
}, {
|
27
|
+
pathwayId: string;
|
28
|
+
phoneNumber: string;
|
29
|
+
}>;
|
@@ -0,0 +1,30 @@
|
|
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.FieldsValidationSchema = exports.fields = void 0;
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
9
|
+
exports.fields = {
|
10
|
+
phoneNumber: {
|
11
|
+
id: 'phoneNumber',
|
12
|
+
label: 'Phone number',
|
13
|
+
description: '',
|
14
|
+
type: extensions_core_1.FieldType.STRING,
|
15
|
+
stringType: extensions_core_1.StringType.PHONE,
|
16
|
+
required: true,
|
17
|
+
},
|
18
|
+
pathwayId: {
|
19
|
+
id: 'pathwayId',
|
20
|
+
label: 'Pathway ID',
|
21
|
+
description: 'Follows the conversational pathway you created to guide the conversation.',
|
22
|
+
type: extensions_core_1.FieldType.TEXT,
|
23
|
+
required: true,
|
24
|
+
},
|
25
|
+
};
|
26
|
+
exports.FieldsValidationSchema = zod_1.default.object({
|
27
|
+
phoneNumber: zod_1.default.string().min(1),
|
28
|
+
pathwayId: zod_1.default.string().min(1),
|
29
|
+
});
|
30
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/bland/actions/sendCallWithPathway/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAIsC;AACtC,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,2EAA2E;QAC7E,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACqB,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
7
|
+
var dataPoints_1 = require("./dataPoints");
|
8
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/bland/actions/sendCallWithPathway/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './sendCallWithPathway';
|
@@ -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("./sendCallWithPathway"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/bland/actions/sendCallWithPathway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendCallWithPathway = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const addEventLog_1 = require("../../../../src/lib/awell/addEventLog");
|
6
|
+
const validatePayloadAndCreateSdk_1 = require("../../lib/validatePayloadAndCreateSdk");
|
7
|
+
const config_1 = require("./config");
|
8
|
+
exports.sendCallWithPathway = {
|
9
|
+
key: 'sendCallWithPathway',
|
10
|
+
category: extensions_core_1.Category.COMMUNICATION,
|
11
|
+
title: 'Send call with pathway',
|
12
|
+
description: 'Send an AI phone call based on a pathway',
|
13
|
+
fields: config_1.fields,
|
14
|
+
previewable: false,
|
15
|
+
dataPoints: config_1.dataPoints,
|
16
|
+
onEvent: async ({ payload, onComplete }) => {
|
17
|
+
const { fields, blandSdk } = await (0, validatePayloadAndCreateSdk_1.validatePayloadAndCreateSdk)({
|
18
|
+
fieldsSchema: config_1.FieldsValidationSchema,
|
19
|
+
payload,
|
20
|
+
});
|
21
|
+
const { data } = await blandSdk.sendCall({
|
22
|
+
phone_number: fields.phoneNumber,
|
23
|
+
pathway_id: fields.pathwayId,
|
24
|
+
task: '',
|
25
|
+
});
|
26
|
+
await onComplete({
|
27
|
+
data_points: {
|
28
|
+
callId: data.call_id,
|
29
|
+
status: data.status,
|
30
|
+
},
|
31
|
+
events: [
|
32
|
+
(0, addEventLog_1.addActivityEventLog)({
|
33
|
+
message: `Call sent to Bland. Status: ${data.status}, Call ID: ${data.call_id}`,
|
34
|
+
}),
|
35
|
+
],
|
36
|
+
});
|
37
|
+
},
|
38
|
+
};
|
39
|
+
//# sourceMappingURL=sendCallWithPathway.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sendCallWithPathway.js","sourceRoot":"","sources":["../../../../../extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AACxD,uEAA2E;AAC3E,uFAAmF;AAEnF,qCAAqE;AAExD,QAAA,mBAAmB,GAI5B;IACF,GAAG,EAAE,qBAAqB;IAC1B,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,0CAA0C;IACvD,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAiB,EAAE;QACxD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAA,yDAA2B,EAAC;YAC7D,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC;YACvC,YAAY,EAAE,MAAM,CAAC,WAAW;YAChC,UAAU,EAAE,MAAM,CAAC,SAAS;YAC5B,IAAI,EAAE,EAAE;SACT,CAAC,CAAA;QAEF,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,MAAM,EAAE,IAAI,CAAC,OAAO;gBACpB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB;YACD,MAAM,EAAE;gBACN,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,+BAA+B,IAAI,CAAC,MAAM,cAAc,IAAI,CAAC,OAAO,EAAE;iBAChF,CAAC;aACH;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { type AxiosResponse } from 'axios';
|
2
|
+
import { type SendCallResponseType, type SendCallInputType } from './schema';
|
3
|
+
export declare class BlandApiClient {
|
4
|
+
private readonly client;
|
5
|
+
constructor({ baseUrl, apiKey }: {
|
6
|
+
baseUrl: string;
|
7
|
+
apiKey: string;
|
8
|
+
});
|
9
|
+
sendCall(input: SendCallInputType): Promise<AxiosResponse<SendCallResponseType>>;
|
10
|
+
}
|
@@ -0,0 +1,24 @@
|
|
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.BlandApiClient = void 0;
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
8
|
+
class BlandApiClient {
|
9
|
+
constructor({ baseUrl, apiKey }) {
|
10
|
+
this.client = axios_1.default.create({
|
11
|
+
baseURL: baseUrl,
|
12
|
+
headers: {
|
13
|
+
Authorization: apiKey,
|
14
|
+
'Content-Type': 'application/json',
|
15
|
+
},
|
16
|
+
});
|
17
|
+
}
|
18
|
+
async sendCall(input) {
|
19
|
+
const response = await this.client.post(`/calls`, input);
|
20
|
+
return response;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
exports.BlandApiClient = BlandApiClient;
|
24
|
+
//# sourceMappingURL=client.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../extensions/bland/api/client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAqE;AAGrE,MAAa,cAAc;IAGzB,YAAY,EAAE,OAAO,EAAE,MAAM,EAAuC;QAClE,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE;gBACP,aAAa,EAAE,MAAM;gBACrB,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,KAAwB;QAExB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACrC,QAAQ,EACR,KAAK,CACN,CAAA;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAvBD,wCAuBC"}
|
@@ -0,0 +1,132 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const SendCallInputSchema: z.ZodObject<{
|
3
|
+
phone_number: z.ZodString;
|
4
|
+
task: z.ZodString;
|
5
|
+
pathway_id: z.ZodOptional<z.ZodString>;
|
6
|
+
start_node_id: z.ZodOptional<z.ZodString>;
|
7
|
+
voice: z.ZodOptional<z.ZodString>;
|
8
|
+
background_track: z.ZodOptional<z.ZodString>;
|
9
|
+
first_sentence: z.ZodOptional<z.ZodString>;
|
10
|
+
wait_for_greeting: z.ZodOptional<z.ZodBoolean>;
|
11
|
+
block_interruptions: z.ZodOptional<z.ZodBoolean>;
|
12
|
+
interruption_threshold: z.ZodOptional<z.ZodNumber>;
|
13
|
+
model: z.ZodOptional<z.ZodString>;
|
14
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
15
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
16
|
+
pronunciation_guide: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>, "many">>;
|
17
|
+
transfer_phone_number: z.ZodOptional<z.ZodString>;
|
18
|
+
transfer_list: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
19
|
+
language: z.ZodOptional<z.ZodString>;
|
20
|
+
timezone: z.ZodOptional<z.ZodString>;
|
21
|
+
request_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
22
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>;
|
23
|
+
dynamic_data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
24
|
+
response_data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
26
|
+
response_data: Record<string, any>[];
|
27
|
+
}, {
|
28
|
+
response_data: Record<string, any>[];
|
29
|
+
}>, "many">>;
|
30
|
+
start_time: z.ZodOptional<z.ZodString>;
|
31
|
+
voicemail_message: z.ZodOptional<z.ZodString>;
|
32
|
+
voicemail_action: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
33
|
+
retry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
34
|
+
max_duration: z.ZodOptional<z.ZodNumber>;
|
35
|
+
record: z.ZodOptional<z.ZodBoolean>;
|
36
|
+
from: z.ZodOptional<z.ZodString>;
|
37
|
+
webhook: z.ZodOptional<z.ZodString>;
|
38
|
+
webhook_events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
39
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
40
|
+
summary_prompt: z.ZodOptional<z.ZodString>;
|
41
|
+
analysis_prompt: z.ZodOptional<z.ZodString>;
|
42
|
+
analysis_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
43
|
+
answered_by_enabled: z.ZodOptional<z.ZodBoolean>;
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
45
|
+
phone_number: string;
|
46
|
+
task: string;
|
47
|
+
pathway_id?: string | undefined;
|
48
|
+
language?: string | undefined;
|
49
|
+
metadata?: Record<string, any> | undefined;
|
50
|
+
start_time?: string | undefined;
|
51
|
+
timezone?: string | undefined;
|
52
|
+
from?: string | undefined;
|
53
|
+
keywords?: string[] | undefined;
|
54
|
+
voice?: string | undefined;
|
55
|
+
temperature?: number | undefined;
|
56
|
+
model?: string | undefined;
|
57
|
+
start_node_id?: string | undefined;
|
58
|
+
background_track?: string | undefined;
|
59
|
+
first_sentence?: string | undefined;
|
60
|
+
wait_for_greeting?: boolean | undefined;
|
61
|
+
block_interruptions?: boolean | undefined;
|
62
|
+
interruption_threshold?: number | undefined;
|
63
|
+
pronunciation_guide?: Record<string, string>[] | undefined;
|
64
|
+
transfer_phone_number?: string | undefined;
|
65
|
+
transfer_list?: Record<string, string> | undefined;
|
66
|
+
request_data?: Record<string, any> | undefined;
|
67
|
+
tools?: Record<string, any>[] | undefined;
|
68
|
+
dynamic_data?: {
|
69
|
+
response_data: Record<string, any>[];
|
70
|
+
}[] | undefined;
|
71
|
+
voicemail_message?: string | undefined;
|
72
|
+
voicemail_action?: Record<string, any> | undefined;
|
73
|
+
retry?: Record<string, any> | undefined;
|
74
|
+
max_duration?: number | undefined;
|
75
|
+
record?: boolean | undefined;
|
76
|
+
webhook?: string | undefined;
|
77
|
+
webhook_events?: string[] | undefined;
|
78
|
+
summary_prompt?: string | undefined;
|
79
|
+
analysis_prompt?: string | undefined;
|
80
|
+
analysis_schema?: Record<string, any> | undefined;
|
81
|
+
answered_by_enabled?: boolean | undefined;
|
82
|
+
}, {
|
83
|
+
phone_number: string;
|
84
|
+
task: string;
|
85
|
+
pathway_id?: string | undefined;
|
86
|
+
language?: string | undefined;
|
87
|
+
metadata?: Record<string, any> | undefined;
|
88
|
+
start_time?: string | undefined;
|
89
|
+
timezone?: string | undefined;
|
90
|
+
from?: string | undefined;
|
91
|
+
keywords?: string[] | undefined;
|
92
|
+
voice?: string | undefined;
|
93
|
+
temperature?: number | undefined;
|
94
|
+
model?: string | undefined;
|
95
|
+
start_node_id?: string | undefined;
|
96
|
+
background_track?: string | undefined;
|
97
|
+
first_sentence?: string | undefined;
|
98
|
+
wait_for_greeting?: boolean | undefined;
|
99
|
+
block_interruptions?: boolean | undefined;
|
100
|
+
interruption_threshold?: number | undefined;
|
101
|
+
pronunciation_guide?: Record<string, string>[] | undefined;
|
102
|
+
transfer_phone_number?: string | undefined;
|
103
|
+
transfer_list?: Record<string, string> | undefined;
|
104
|
+
request_data?: Record<string, any> | undefined;
|
105
|
+
tools?: Record<string, any>[] | undefined;
|
106
|
+
dynamic_data?: {
|
107
|
+
response_data: Record<string, any>[];
|
108
|
+
}[] | undefined;
|
109
|
+
voicemail_message?: string | undefined;
|
110
|
+
voicemail_action?: Record<string, any> | undefined;
|
111
|
+
retry?: Record<string, any> | undefined;
|
112
|
+
max_duration?: number | undefined;
|
113
|
+
record?: boolean | undefined;
|
114
|
+
webhook?: string | undefined;
|
115
|
+
webhook_events?: string[] | undefined;
|
116
|
+
summary_prompt?: string | undefined;
|
117
|
+
analysis_prompt?: string | undefined;
|
118
|
+
analysis_schema?: Record<string, any> | undefined;
|
119
|
+
answered_by_enabled?: boolean | undefined;
|
120
|
+
}>;
|
121
|
+
export type SendCallInputType = z.infer<typeof SendCallInputSchema>;
|
122
|
+
export declare const SendCallResponseSchema: z.ZodObject<{
|
123
|
+
status: z.ZodString;
|
124
|
+
call_id: z.ZodString;
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
126
|
+
status: string;
|
127
|
+
call_id: string;
|
128
|
+
}, {
|
129
|
+
status: string;
|
130
|
+
call_id: string;
|
131
|
+
}>;
|
132
|
+
export type SendCallResponseType = z.infer<typeof SendCallResponseSchema>;
|