@awell-health/awell-extensions 2.0.65 → 2.0.66

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/dist/extensions/bland/actions/index.d.ts +52 -0
  2. package/dist/extensions/bland/actions/index.js +10 -0
  3. package/dist/extensions/bland/actions/index.js.map +1 -0
  4. package/dist/extensions/bland/actions/sendCall/config/dataPoints.d.ts +10 -0
  5. package/dist/extensions/bland/actions/sendCall/config/dataPoints.js +14 -0
  6. package/dist/extensions/bland/actions/sendCall/config/dataPoints.js.map +1 -0
  7. package/dist/extensions/bland/actions/sendCall/config/fields.d.ts +29 -0
  8. package/dist/extensions/bland/actions/sendCall/config/fields.js +30 -0
  9. package/dist/extensions/bland/actions/sendCall/config/fields.js.map +1 -0
  10. package/dist/extensions/bland/actions/sendCall/config/index.d.ts +2 -0
  11. package/dist/extensions/bland/actions/sendCall/config/index.js +9 -0
  12. package/dist/extensions/bland/actions/sendCall/config/index.js.map +1 -0
  13. package/dist/extensions/bland/actions/sendCall/index.d.ts +1 -0
  14. package/dist/extensions/bland/actions/sendCall/index.js +18 -0
  15. package/dist/extensions/bland/actions/sendCall/index.js.map +1 -0
  16. package/dist/extensions/bland/actions/sendCall/sendCall.d.ts +4 -0
  17. package/dist/extensions/bland/actions/sendCall/sendCall.js +38 -0
  18. package/dist/extensions/bland/actions/sendCall/sendCall.js.map +1 -0
  19. package/dist/extensions/bland/actions/sendCallWithPathway/config/dataPoints.d.ts +10 -0
  20. package/dist/extensions/bland/actions/sendCallWithPathway/config/dataPoints.js +14 -0
  21. package/dist/extensions/bland/actions/sendCallWithPathway/config/dataPoints.js.map +1 -0
  22. package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.d.ts +29 -0
  23. package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.js +30 -0
  24. package/dist/extensions/bland/actions/sendCallWithPathway/config/fields.js.map +1 -0
  25. package/dist/extensions/bland/actions/sendCallWithPathway/config/index.d.ts +2 -0
  26. package/dist/extensions/bland/actions/sendCallWithPathway/config/index.js +9 -0
  27. package/dist/extensions/bland/actions/sendCallWithPathway/config/index.js.map +1 -0
  28. package/dist/extensions/bland/actions/sendCallWithPathway/index.d.ts +1 -0
  29. package/dist/extensions/bland/actions/sendCallWithPathway/index.js +18 -0
  30. package/dist/extensions/bland/actions/sendCallWithPathway/index.js.map +1 -0
  31. package/dist/extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.d.ts +4 -0
  32. package/dist/extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.js +39 -0
  33. package/dist/extensions/bland/actions/sendCallWithPathway/sendCallWithPathway.js.map +1 -0
  34. package/dist/extensions/bland/api/client.d.ts +10 -0
  35. package/dist/extensions/bland/api/client.js +24 -0
  36. package/dist/extensions/bland/api/client.js.map +1 -0
  37. package/dist/extensions/bland/api/schema/SendCall.schema.d.ts +132 -0
  38. package/dist/extensions/bland/api/schema/SendCall.schema.js +50 -0
  39. package/dist/extensions/bland/api/schema/SendCall.schema.js.map +1 -0
  40. package/dist/extensions/bland/api/schema/index.d.ts +1 -0
  41. package/dist/extensions/bland/api/schema/index.js +18 -0
  42. package/dist/extensions/bland/api/schema/index.js.map +1 -0
  43. package/dist/extensions/bland/index.d.ts +2 -0
  44. package/dist/extensions/bland/index.js +19 -0
  45. package/dist/extensions/bland/index.js.map +1 -0
  46. package/dist/extensions/bland/lib/validatePayloadAndCreateSdk.d.ts +18 -0
  47. package/dist/extensions/bland/lib/validatePayloadAndCreateSdk.js +34 -0
  48. package/dist/extensions/bland/lib/validatePayloadAndCreateSdk.js.map +1 -0
  49. package/dist/extensions/bland/settings.d.ts +17 -0
  50. package/dist/extensions/bland/settings.js +17 -0
  51. package/dist/extensions/bland/settings.js.map +1 -0
  52. package/dist/extensions/markdown.json +4 -0
  53. 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,10 @@
1
+ export declare const dataPoints: {
2
+ callId: {
3
+ key: string;
4
+ valueType: "string";
5
+ };
6
+ status: {
7
+ key: string;
8
+ valueType: "string";
9
+ };
10
+ };
@@ -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,2 @@
1
+ export { fields, FieldsValidationSchema } from './fields';
2
+ export { dataPoints } from './dataPoints';
@@ -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,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const sendCall: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -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,10 @@
1
+ export declare const dataPoints: {
2
+ callId: {
3
+ key: string;
4
+ valueType: "string";
5
+ };
6
+ status: {
7
+ key: string;
8
+ valueType: "string";
9
+ };
10
+ };
@@ -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,2 @@
1
+ export { fields, FieldsValidationSchema } from './fields';
2
+ export { dataPoints } from './dataPoints';
@@ -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,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const sendCallWithPathway: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -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>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendCallResponseSchema = exports.SendCallInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SendCallInputSchema = zod_1.z.object({
6
+ phone_number: zod_1.z.string().min(1),
7
+ task: zod_1.z.string().min(1),
8
+ pathway_id: zod_1.z.string().optional(),
9
+ start_node_id: zod_1.z.string().optional(),
10
+ voice: zod_1.z.string().optional(),
11
+ background_track: zod_1.z.string().optional(),
12
+ first_sentence: zod_1.z.string().optional(),
13
+ wait_for_greeting: zod_1.z.boolean().optional(),
14
+ block_interruptions: zod_1.z.boolean().optional(),
15
+ interruption_threshold: zod_1.z.number().optional(),
16
+ model: zod_1.z.string().optional(),
17
+ temperature: zod_1.z.number().optional(),
18
+ keywords: zod_1.z.array(zod_1.z.string()).optional(),
19
+ pronunciation_guide: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.string())).optional(),
20
+ transfer_phone_number: zod_1.z.string().optional(),
21
+ transfer_list: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
22
+ language: zod_1.z.string().optional(),
23
+ timezone: zod_1.z.string().optional(),
24
+ request_data: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
25
+ tools: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())).optional(),
26
+ dynamic_data: zod_1.z
27
+ .array(zod_1.z.object({
28
+ response_data: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
29
+ }))
30
+ .optional(),
31
+ start_time: zod_1.z.string().optional(),
32
+ voicemail_message: zod_1.z.string().optional(),
33
+ voicemail_action: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
34
+ retry: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
35
+ max_duration: zod_1.z.number().optional(),
36
+ record: zod_1.z.boolean().optional(),
37
+ from: zod_1.z.string().optional(),
38
+ webhook: zod_1.z.string().optional(),
39
+ webhook_events: zod_1.z.array(zod_1.z.string()).optional(),
40
+ metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
41
+ summary_prompt: zod_1.z.string().optional(),
42
+ analysis_prompt: zod_1.z.string().optional(),
43
+ analysis_schema: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
44
+ answered_by_enabled: zod_1.z.boolean().optional(),
45
+ });
46
+ exports.SendCallResponseSchema = zod_1.z.object({
47
+ status: zod_1.z.string(),
48
+ call_id: zod_1.z.string().uuid(),
49
+ });
50
+ //# sourceMappingURL=SendCall.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendCall.schema.js","sourceRoot":"","sources":["../../../../../extensions/bland/api/schema/SendCall.schema.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ export * from './SendCall.schema';
@@ -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.schema"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/bland/api/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAiC"}
@@ -0,0 +1,2 @@
1
+ import { type Extension } from '@awell-health/extensions-core';
2
+ export declare const bland: Extension;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bland = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const actions_1 = require("./actions");
6
+ const settings_1 = require("./settings");
7
+ exports.bland = {
8
+ key: 'bland',
9
+ title: 'Bland.ai',
10
+ icon_url: 'https://res.cloudinary.com/da7x4rzl4/image/upload/v1731027387/Awell%20Extensions/Bland-AI.jpg',
11
+ description: 'Automate your phone calls with AI',
12
+ category: extensions_core_1.Category.COMMUNICATION,
13
+ author: {
14
+ authorType: extensions_core_1.AuthorType.AWELL,
15
+ },
16
+ actions: actions_1.actions,
17
+ settings: settings_1.settings,
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
@@ -0,0 +1,18 @@
1
+ import { type NewActivityPayload, type Pathway, type Patient } from '@awell-health/extensions-core';
2
+ import z from 'zod';
3
+ import { SettingsValidationSchema } from '../settings';
4
+ import { type Activity } from '@awell-health/extensions-core/dist/types/Activity';
5
+ import { BlandApiClient } from '../api/client';
6
+ type ValidatePayloadAndCreateSdk = <T extends z.ZodTypeAny, P extends NewActivityPayload<any, any>>(args: {
7
+ fieldsSchema: T;
8
+ payload: P;
9
+ }) => Promise<{
10
+ blandSdk: BlandApiClient;
11
+ fields: z.infer<(typeof args)['fieldsSchema']>;
12
+ settings: z.infer<typeof SettingsValidationSchema>;
13
+ pathway: Pathway;
14
+ patient: Patient;
15
+ activity: Activity;
16
+ }>;
17
+ export declare const validatePayloadAndCreateSdk: ValidatePayloadAndCreateSdk;
18
+ export {};
@@ -0,0 +1,34 @@
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.validatePayloadAndCreateSdk = void 0;
7
+ const extensions_core_1 = require("@awell-health/extensions-core");
8
+ const zod_1 = __importDefault(require("zod"));
9
+ const settings_1 = require("../settings");
10
+ const client_1 = require("../api/client");
11
+ const validatePayloadAndCreateSdk = async ({ fieldsSchema, payload, }) => {
12
+ const { settings, fields } = (0, extensions_core_1.validate)({
13
+ schema: zod_1.default.object({
14
+ fields: fieldsSchema,
15
+ settings: settings_1.SettingsValidationSchema,
16
+ }),
17
+ payload,
18
+ });
19
+ const { patient, pathway, activity } = payload;
20
+ const blandSdk = new client_1.BlandApiClient({
21
+ baseUrl: 'https://api.bland.ai/v1',
22
+ apiKey: settings.apiKey,
23
+ });
24
+ return {
25
+ blandSdk,
26
+ settings,
27
+ fields,
28
+ patient,
29
+ pathway,
30
+ activity,
31
+ };
32
+ };
33
+ exports.validatePayloadAndCreateSdk = validatePayloadAndCreateSdk;
34
+ //# sourceMappingURL=validatePayloadAndCreateSdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePayloadAndCreateSdk.js","sourceRoot":"","sources":["../../../../extensions/bland/lib/validatePayloadAndCreateSdk.ts"],"names":[],"mappings":";;;;;;AAAA,mEAKsC;AACtC,8CAAmB;AACnB,0CAAsD;AAEtD,0CAA8C;AAiBvC,MAAM,2BAA2B,GAAgC,KAAK,EAAE,EAC7E,YAAY,EACZ,OAAO,GACR,EAAE,EAAE;IACH,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAA,0BAAQ,EAAC;QACpC,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,YAAY;YACpB,QAAQ,EAAE,mCAAwB;SACnC,CAAC;QACF,OAAO;KACR,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAE9C,MAAM,QAAQ,GAAG,IAAI,uBAAc,CAAC;QAClC,OAAO,EAAE,yBAAyB;QAClC,MAAM,EAAE,QAAQ,CAAC,MAAM;KACxB,CAAC,CAAA;IAEF,OAAO;QACL,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,OAAO;QACP,OAAO;QACP,QAAQ;KACT,CAAA;AACH,CAAC,CAAA;AA3BY,QAAA,2BAA2B,+BA2BvC"}
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const settings: {
3
+ apiKey: {
4
+ key: string;
5
+ label: string;
6
+ obfuscated: true;
7
+ description: string;
8
+ required: true;
9
+ };
10
+ };
11
+ export declare const SettingsValidationSchema: z.ZodObject<{
12
+ apiKey: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ apiKey: string;
15
+ }, {
16
+ apiKey: string;
17
+ }>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsValidationSchema = exports.settings = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.settings = {
6
+ apiKey: {
7
+ key: 'apiKey',
8
+ label: 'Bland API key',
9
+ obfuscated: true,
10
+ description: '',
11
+ required: true,
12
+ },
13
+ };
14
+ exports.SettingsValidationSchema = zod_1.z.object({
15
+ apiKey: zod_1.z.string().min(1),
16
+ });
17
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/bland/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,eAAe;QACtB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC0B,CAAC,CAAA"}
@@ -7,6 +7,10 @@
7
7
  "readme": "---\ntitle: Awell Workflow\ndescription: Enrich your care flows with powerful Awell actions.\n---\n\n# Awell API extension\n\n## Extension settings\n\nYou will need to provide the [API URL](https://developers.awellhealth.com/awell-orchestration/api-reference/overview/endpoints) and an [API key](https://developers.awellhealth.com/awell-orchestration/api-reference/overview/authorization).\n\n## Custom Actions\n\n### Start care flow\n\nStarts a new care flow for the patient enrolled in your current care flow.\n\n**Passing baseline info:**\nPlease read the documentation on [our developer hub](https://developers.awellhealth.com/awell-orchestration/api-reference/mutations/start-pathway) to learn more about how to pass baseline info.\n\n**Example of how to configure a value for the baseline info action field:**\n\n```json\n[\n {\n \"data_point_definition_id\": \"age\",\n \"value\": \"29\"\n },\n {\n \"data_point_definition_id\": \"dob\",\n \"value\": \"1993-11-30\"\n }\n]\n```\n\n### Stop care flow\n\nStops the care flow the patient is currently enrolled in. A reason is why you are stopping the care flow is mandatory.\n\n### Update patient\n\nAllows updating patient data for the patient currently enrolled in the care flow.\n\n### Is patient already enrolled in care flow\n\nChecks whether the patient is already enrolled in a care flow definition. The care flow the patient is currently enrolled in does not count and is excluded from the results.\n\n**Action fields:**\n\n- pathwayStatus: a comma-separated string of care flow statuses that will be used when looking for care flows the patient is already enrolled in. By default, we only look at active care flows. Options: \"active\", \"completed\", \"missing_baseline_info\", \"starting\", and \"stopped\".\n- careFlowDefinitionIds: a comma-separated string of care flow definition ids that will be used when looking for care flows the patient is already enrolled in. By default, we only search for care flows that match the current care flow definition id (i.e. is the patient already included in the current care flow?).\n\n**Data points:**\n\n- result: a boolean indicating whether the patient is already enrolled in another care flow that matches your criteria (status & care flow definition id)\n- nbrOfResults: the number of care flows found for the patient that match the criteria.\n- careFlowIds: a comma-separated string of care flow ids that matched your search criteria. It will be empty when the result is `false` because then there are no other care flow ids that match your criteria.\n\n### Search patients by patient code\n\nNote that this action is deprecated and we recommend using [identifiers](https://developers.awellhealth.com/awell-orchestration/docs/misc/patient-identifiers) instead.\n\nSearch whether, apart from the patient currently enrolled in the care flow, another patient with the same `patient_code` already exists.\n\n**Data points:**\n\n1. patientAlreadyExists: a boolean which will be true if minimum one patient with the patient code already exists.\n2. numberOfPatientsFound: the number of patients found with the same patient code.\n3. awellPatientIds: a comma-separated string of all Awell patient ids (except the current patient) that have the same patient code as the patient currently enrolled in the care flow. Will return an empty string when there are no other patients with the same patient code.\n\n### Get patient by identifier\n\nThis action lets you check if a patient with a specific identifier already exists in Awell. It's particularly useful when a patient's identity is initially anonymous during the start of the care flow, but later becomes identifiable through the identifiers collected during the care flow. This check ensures whether a patient with that identifier is already present or not.\n\n### Add identifier to patient\n\nThis action allows you to add a unique identifier to the current patient's profile. If the patient already has an identifier with the same system but a different value, this action will update the existing identifier with the new value provided. \n\nFirst, it checks if this identifier (system and value) is already associated with another patient. If it's safe to proceed, it will add or update the identifier as needed. However, if another patient already has this identifier, the action will stop and notify you, preventing duplicates. To avoid conflicts, we recommend first running the \"Get patient by identifier\" action to check for any existing matches.\n\n## Webhooks\n\nWebhooks in the Awell extension offer ways to trigger a care flow based on the end of another care flow, or from any event that happens in your system (via the pathwayStart webhook).\n",
8
8
  "changelog": "# Awell changelog\n\n## April 2024\n\nTwo new action were added: \"Get patient by identifier\" and \"Add identifier to patient\".\n\n## October 26, 2023\n\nGeneric webhook to start a care flow added\n\n## April 19, 2023\n\nStop care flow action added.\nSearch patients by patient code action was added.\n\"Is patient enrolled in care flow\" action added.\n"
9
9
  },
10
+ "bland": {
11
+ "readme": "---\ntitle: Bland.ai\ndescription: To do\n---\n\n# Bland.ai\n\nTo do",
12
+ "changelog": "# CHANGELOG"
13
+ },
10
14
  "calDotCom": {
11
15
  "readme": "---\ntitle: Cal.com\ndescription: Cal.com is a modern and open source scheduling platform. With HIPAA, GDPR and SOC2 compliance, you can ensure that data is well-protected and that makes Cal.com a great fit for healthcare use cases.\n---\n\n# Cal.com\n\n[Cal.com](https://cal.com/) is a modern and **open source** scheduling platform. With HIPAA, GDPR and SOC2 compliance, you can ensure that data is well-protected and that makes Cal.com a great fit for healthcare use cases.\n\n## Cal.com x Awell\n\nThis extension allows you to let a stakeholder (eg: a patient) book an appointment as part of a care flow and to retrieve the booking details of an appointment.\n\n## Extension settings\n\nIn order to set up this extension, **you will need to provide a Cal.com API key**. You can obtain an API key via the Cal.com portal (`Settings > Developer > API keys`).\n\n## Custom Actions\n\n### Book appointment action\n\nYou can add this action to your care flow to enable a stakeholder (eg: a patient) to book an appointment in a predefined calendar. This is a **stakeholder-actionable action** which means it requires an actual user to book an appointment. Also note that this is a blocking action and that the care flow will not progress - unless there are parallel tracks or transitions - until the action/activity is completed (i.e. an appointment was booked).\n\n**The actual booking of the appointment can happen in two ways:**\n\n1. With Awell Hosted Pages: when the \"Book appointment\" action is activated, we serve the booking widget to the stakeholder so they can book an appointment directly from within Awell Hosted Pages.\n2. If you are not leveraging Awell Hosted Pages but have built a custom integration then we expose you all the details via our API so you can either create a Cal.com booking widget yourself or redirect the user to the Cal.com platform. Additionally, we expose a mutation that allows you to complete the activity and pass in the required data.\n\nBelow you can find an overview of all Awell Apps and whether they support rendering of the booking widget.\n\n| App | Supported |\n| ----------------------------- | --------- |\n| Awell Hosted Pages | Yes |\n| Your app (custom integration) | Yes |\n| Awell Care | No |\n| Awell MyCare | No |\n\n#### Data points\n\nAdding this action to your care flow will expose a new data point you can use in your care flow, the `bookingId`. When the care flow is orchestrated and the book appointment activity is completed, the id of the actual booking will be ingested as the value of that `bookingId` data point.\n\n### Get booking action\n\nThis action allows you to fetch the details of a booking based on the provided `bookingId`. This action will make the following data points available for you to use in your care flow:\n\n1. Event type ID\n2. Title\n3. Description\n4. Start time\n5. End time\n6. Status\n7. Cancel URL\n8. Reschedule URL\n9. Video call URL (if available)\n10. First Attendee's name\n12. First Attendee's timezone\n12. First Attendee's email\n13. Organizer's email\n\n### Update booking\n\nUpdates a booking and saves new `bookingId` and `bookingUid` as Data Points. Values possible to update:\n\n- Title - Title of Booking event\n- Description - Description of the meeting\n- Status - Status of the meeting to be set. Possible values: \"ACCEPTED\", \"PENDING\", \"CANCELLED\", \"REJECTED\".\n- Start - Start time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z. Please note that start/end time must be within user's availability hours.\n- End - End time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z. Please note that start/end time must be within user's availability hours.\n\n### Create booking\n\nCreates a booking and saves new `bookingId` as Data Points. Available fields:\n\n- Event Type ID - ID of the event type to book\n- Responses - Object containing email, name, location\n - ```json\n \"responses\": {\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"location\": \"Calcom HQ\"\n },\n ```\n- Metadata - Any metadata associated with the booking\n- Timezone - Timezone of the Attendee\n- Language - Language of the Attendee\n- Recurring Event ID - Recurring Event ID if the event is recurring\n- Title - Title of Booking event\n- Description - Description of the meeting\n- Status - Status of the meeting to be set. Possible values: \"ACCEPTED\", \"PENDING\", \"CANCELLED\", \"REJECTED\".\n- Start - Start time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z. Please note that start/end time must be within user's availability hours.\n- End - End time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z. Please note that start/end time must be within user's availability hours.\n\n### Delete Boooking\n\nDeletes a Booking with a given ID.\n\n## Pricing\n\n**This extension is free** but keep in mind that you might need a paid plan for Cal.com depending on your needs.\n\n## Limitations\n\n### Rescheduling\n\nWhen a previously made booking is rescheduled, there is no way yet to get the new/updated booking details into the care flow or have the care flow react on the updated booking.\n\nAlso note that when a booking is rescheduled, Cal.com doesn't update the original booking resource but creates a new one instead. As far as we know, there is no reference from the old booking to the new (rescheduled) booking.\n\n#### Example\n\nAn appointment has been booked with Cal.com and we have the below booking resource:\n\n```json\n{\n ...,\n \"bookingId\": \"1\",\n \"date\": \"Jan 1, 2023\"\n}\n```\n\nHowever, the patient reschedules the booking to Jan 10, 2023. When querying Cal.com's API (`GET v1/bookings/{bookingId}`), it will still return the old booking date instead of the new/rescheduled date.\n\n```json\n{\n ...,\n \"bookingId\": \"1\",\n \"date\": \"Jan 1, 2023\"\n}\n```\n\n## Webhooks\n\nWebhooks offer a great way to automate the flow with Awell when invitees schedule, cancel, or reschedule events, or when the meeting ends.\n\n**Important notes:**\n\n1. An Awell webhook endpoint can only listen to one event type. So make sure that when you create a webhook in Cal.com, the subscriber URL and the event trigger match the Awell webhook endpoint. This also means there can only be one event type per subscriber URL.\n2. Using a secret to verify the authenticity of the received payload is not yet supported.\n3. Custom payload templates are not supported, please use the default ones.\n",
12
16
  "changelog": "# Cal.com changelog\n\n## September 15, 2023\n\n- add createBooking action\n- add first attendee name and timezone to getBooking data points\n\n## September 4, 2023\n\n- add updateBooking and deleteBooking actions\n- update and refactor structure of getBooking and bookAppointment actions\n\n## July 4, 2023\n\n- Get booking action: add validation that bookingId and apiKey are not empty\n- Get booking action: add validation of response data to make sure we have data points\n\n## April 27, 2023\n\n- Get booking action: `startTime` and `endTime` data points are now of value type `date` instead of `string`.\n"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.65",
3
+ "version": "2.0.66",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {