@awell-health/awell-extensions 1.0.174 → 1.0.175
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/index.js +2 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/markdown.json +4 -0
- package/dist/extensions/westFax/actions/index.d.ts +47 -0
- package/dist/extensions/westFax/actions/index.js +8 -0
- package/dist/extensions/westFax/actions/index.js.map +1 -0
- package/dist/extensions/westFax/actions/sendFax/config/dataPoints.d.ts +6 -0
- package/dist/extensions/westFax/actions/sendFax/config/dataPoints.js +10 -0
- package/dist/extensions/westFax/actions/sendFax/config/dataPoints.js.map +1 -0
- package/dist/extensions/westFax/actions/sendFax/config/fields.d.ts +48 -0
- package/dist/extensions/westFax/actions/sendFax/config/fields.js +42 -0
- package/dist/extensions/westFax/actions/sendFax/config/fields.js.map +1 -0
- package/dist/extensions/westFax/actions/sendFax/config/index.d.ts +1 -0
- package/dist/extensions/westFax/actions/sendFax/config/index.js +6 -0
- package/dist/extensions/westFax/actions/sendFax/config/index.js.map +1 -0
- package/dist/extensions/westFax/actions/sendFax/index.d.ts +1 -0
- package/dist/extensions/westFax/actions/sendFax/index.js +6 -0
- package/dist/extensions/westFax/actions/sendFax/index.js.map +1 -0
- package/dist/extensions/westFax/actions/sendFax/sendFax.d.ts +4 -0
- package/dist/extensions/westFax/actions/sendFax/sendFax.js +107 -0
- package/dist/extensions/westFax/actions/sendFax/sendFax.js.map +1 -0
- package/dist/extensions/westFax/index.d.ts +2 -0
- package/dist/extensions/westFax/index.js +19 -0
- package/dist/extensions/westFax/index.js.map +1 -0
- package/dist/extensions/westFax/settings.d.ts +27 -0
- package/dist/extensions/westFax/settings.js +29 -0
- package/dist/extensions/westFax/settings.js.map +1 -0
- package/package.json +1 -1
package/dist/extensions/index.js
CHANGED
@@ -50,6 +50,7 @@ const transform_1 = require("./transform");
|
|
50
50
|
const iterable_1 = require("./iterable");
|
51
51
|
const zendesk_1 = require("./zendesk");
|
52
52
|
const infobip_1 = require("./infobip");
|
53
|
+
const westFax_1 = require("./westFax");
|
53
54
|
const nexuzhealth_1 = require("./nexuzhealth");
|
54
55
|
const collectData_1 = require("./collectData");
|
55
56
|
const json = __importStar(require("./markdown.json"));
|
@@ -87,5 +88,6 @@ exports.extensions = [
|
|
87
88
|
twilio_1.Twilio,
|
88
89
|
wellinks_1.Wellinks,
|
89
90
|
zendesk_1.Zendesk,
|
91
|
+
westFax_1.WestFax
|
90
92
|
];
|
91
93
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,6CAAyC;AACzC,+CAA2C;AAC3C,uCAAmC;AACnC,yCAAqC;AACrC,yCAAqC;AACrC,+CAA0C;AAC1C,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,+CAA2C;AAC3C,2CAAuC;AACvC,qCAAiC;AACjC,yCAAqC;AACrC,6DAA+C;AAC/C,yCAAqC;AACrC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,uCAAmC;AACnC,uCAAmC;AACnC,+CAA2C;AAC3C,+CAA2C;AAE3C,sDAAuC;AACvC,uDAAkD;AAGrC,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,oFAAoF;IACpF,4CAA4C;IAC5C,aAAa;IACb,aAAK;IACL,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,mBAAQ;IACR,yBAAW;IACX,iBAAO;IACP,gCAAc;IACd,mBAAQ;IACR,mBAAQ;IACR,wBAAU;IACV,iBAAO;IACP,mBAAQ;IACR,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,qBAAS;IACT,yBAAW;IACX,mBAAQ;IACR,6BAAQ;IACR,qBAAS;IACT,eAAM;IACN,mBAAQ;IACR,iBAAO;CACR,CAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,6CAAyC;AACzC,+CAA2C;AAC3C,uCAAmC;AACnC,yCAAqC;AACrC,yCAAqC;AACrC,+CAA0C;AAC1C,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,+CAA2C;AAC3C,2CAAuC;AACvC,qCAAiC;AACjC,yCAAqC;AACrC,6DAA+C;AAC/C,yCAAqC;AACrC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,uCAAmC;AACnC,uCAAmC;AACnC,uCAAmC;AACnC,+CAA2C;AAC3C,+CAA2C;AAE3C,sDAAuC;AACvC,uDAAkD;AAGrC,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,oFAAoF;IACpF,4CAA4C;IAC5C,aAAa;IACb,aAAK;IACL,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,mBAAQ;IACR,yBAAW;IACX,iBAAO;IACP,gCAAc;IACd,mBAAQ;IACR,mBAAQ;IACR,wBAAU;IACV,iBAAO;IACP,mBAAQ;IACR,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,qBAAS;IACT,yBAAW;IACX,mBAAQ;IACR,6BAAQ;IACR,qBAAS;IACT,eAAM;IACN,mBAAQ;IACR,iBAAO;IACP,iBAAO;CACR,CAAA"}
|
@@ -111,6 +111,10 @@
|
|
111
111
|
"readme": "---\ntitle: Wellinks\ndescription: The purpose of this extension is to keep application logic out of the Pathways and Tracks. Some actions require interactions with the Healthie API, hence the need for the API URL and Key in the settings.\n---\n# Wellinks Extension\n\nThe purpose of this extension is to keep application logic out of the Pathways and Tracks. Some actions require interactions with the Healthie API, hence the need for the API URL and Key in the settings.\n\n## Extension Settings\n\nYou will need to provide the API URL and Key for the Wellinks Healthie instance.\n\n# Custom Actions\n\n## Check for Override\n\nChecks to see if the patient in Healthie has an active Override form.\n\n## Check for Scheduled Appointments\n\nChecks to see if the patient in Healthie has an appointment of a specific type scheduled in the future.\n\n## Check for Chat\n\nChecks that a Chat message (either to or from a patient and coach) has happened at least 24 hours after an appointment\n\n## Insert Member List Event\n\nAdds an Insert Member List Event to the Platform Database.\n\n## Check for Flourish Customer\n\nQueries Flourish to see if there is a record that has a matching ThirdPartyIdentifier. Returns True/False.\n\n## Submit a PAM Survey\n\nSubmits a PAM 13 Survey (completed in the Careflow) to Flourish and returns the PAM Score and Levl.",
|
112
112
|
"changelog": "# Wellinks Changelog\n\n## May 18th, 2023\n\nAdded the checkForOverride action.\n\n## May 19th, 2023\n\nAdded the checkForScheduledAppointment action.\n\n## May 25th, 2023\n\nAdded datapoints for actions\n\n\n## July 6th, 2023\n\nAdded new action to unenroll user from Sendgrid.\n\n## July 16th, 2023\n\nAdded a new action to insert a Member Event List to the Platform DB. This requires setting the platform API URL and API Key values for the extension.\n\n## September 12th, 2023\n\nAdds a new action to check Flourish for a customer with a matching ThirdPartyIdentifier.\n\n## September 18th, 2023\n\nAdds a new action to submit a PAM13 survey to Flourish, returning a PAM Score, level, and whether or not the submission was a success.\n\n## September 19th, 2023\n\nAdds a new action to create a customer in Flourish, returning true or false based on whether or not the creation was a success.\n\n## October 12th, 2023\n\nUpdates InsertMemberListEvent action to have clearer error messages."
|
113
113
|
},
|
114
|
+
"westFax": {
|
115
|
+
"readme": "---\ntitle: WestFax\ndescription: WestFax is a leading provider of HIPAA Compliant Cloud Fax / Fax to Email, Print to Fax\n---\n\n# WestFax\n\n[WestFax](https://westfax.com/) is a cloud-based faxing service that offers a variety of features, including:\n- Secure faxing: WestFax uses end-to-end encryption to protect your documents from unauthorized access.\n- HIPAA compliance: WestFax is HIPAA compliant, so you can be sure that your medical records are safe.\n- Integration with other applications: WestFax can be integrated with your existing email, CRM, and other applications.\n- Mobile app: You can send and receive faxes from your mobile device with the WestFax mobile app.\n- Paperless faxing: WestFax can store your faxes in the cloud, so you can access them from anywhere.\n\n## WestFax x Awell\n\nThis extension allows you to let a stakeholder (eg: a patient) send a fax as part of a care flow.\n\n## Extension settings\n\nIn order to set up this extension, **you will need to provide a WestFax Username and Password**. You will need as well to provide the ProductId when setting up the action - check how [here](https://westfax.com/how-to-get-productid/).\n\n\n",
|
116
|
+
"changelog": "# WestFax changelog\n\n## February 2024\n\n- Initial action to send an fax to an email\n"
|
117
|
+
},
|
114
118
|
"zendesk": {
|
115
119
|
"readme": "---\ntitle: Zendesk\ndescription: Zendesk is a customer service and support platform that provides a suite of tools and software for businesses to manage their customer interactions.\n---\n\n# Zendesk\n\nZendesk is a customer service and support platform that provides a suite of tools and software for businesses to manage their customer interactions. It offers a range of customer service solutions, including help desk ticketing systems, customer support and engagement, and self-service options. Zendesk is designed to help companies streamline their customer support processes, improve communication with their customers, and resolve issues more efficiently.\n\n## Extension settings\n\nIn order to set up this extension, you will to authenticate with the Sell API and need an API token. You can visit Zendesk Sales CRM dashboard and go to **Settings > Integration > OAuth** to enable and create an API token. Read more about how to get an access token for the Sell API [here](https://developer.zendesk.com/documentation/sales-crm/first-call/).\n\n## Custom Actions\n\n### Create task\n\nCreates a new task. You can create either a floating task or create a related task and associate it with one of the resource types: Leads, Contacts, Deals.\n\n### Complete task\n\nMarks a task as completed.\n",
|
116
120
|
"changelog": "# Zendesk changelog\n"
|
@@ -0,0 +1,47 @@
|
|
1
|
+
export declare const actions: {
|
2
|
+
sendFax: import("@awell-health/extensions-core").Action<{
|
3
|
+
productId: {
|
4
|
+
id: string;
|
5
|
+
label: string;
|
6
|
+
description: string;
|
7
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
8
|
+
required: true;
|
9
|
+
};
|
10
|
+
feedbackEmail: {
|
11
|
+
id: string;
|
12
|
+
label: string;
|
13
|
+
description: string;
|
14
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
15
|
+
required: false;
|
16
|
+
};
|
17
|
+
number: {
|
18
|
+
id: string;
|
19
|
+
label: string;
|
20
|
+
description: string;
|
21
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
22
|
+
required: true;
|
23
|
+
};
|
24
|
+
content: {
|
25
|
+
id: string;
|
26
|
+
label: string;
|
27
|
+
description: string;
|
28
|
+
type: import("@awell-health/extensions-core").FieldType.HTML;
|
29
|
+
required: false;
|
30
|
+
};
|
31
|
+
}, {
|
32
|
+
username: {
|
33
|
+
key: string;
|
34
|
+
label: string;
|
35
|
+
obfuscated: false;
|
36
|
+
required: true;
|
37
|
+
description: string;
|
38
|
+
};
|
39
|
+
password: {
|
40
|
+
key: string;
|
41
|
+
label: string;
|
42
|
+
obfuscated: true;
|
43
|
+
required: true;
|
44
|
+
description: string;
|
45
|
+
};
|
46
|
+
}, string, never>;
|
47
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/westFax/actions/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEtB,QAAA,OAAO,GAAG;IACnB,OAAO,EAAP,iBAAO;CACV,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/westFax/actions/sendFax/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE;QACL,GAAG,EAAE,OAAO;QACZ,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
2
|
+
import { type ZodTypeAny, z } from 'zod';
|
3
|
+
export declare const fields: {
|
4
|
+
productId: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
description: string;
|
8
|
+
type: FieldType.STRING;
|
9
|
+
required: true;
|
10
|
+
};
|
11
|
+
feedbackEmail: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: FieldType.STRING;
|
16
|
+
required: false;
|
17
|
+
};
|
18
|
+
number: {
|
19
|
+
id: string;
|
20
|
+
label: string;
|
21
|
+
description: string;
|
22
|
+
type: FieldType.STRING;
|
23
|
+
required: true;
|
24
|
+
};
|
25
|
+
content: {
|
26
|
+
id: string;
|
27
|
+
label: string;
|
28
|
+
description: string;
|
29
|
+
type: FieldType.HTML;
|
30
|
+
required: false;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
34
|
+
productId: z.ZodString;
|
35
|
+
feedbackEmail: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
|
36
|
+
number: z.ZodString;
|
37
|
+
content: z.ZodString;
|
38
|
+
}, "strip", ZodTypeAny, {
|
39
|
+
number: string;
|
40
|
+
content: string;
|
41
|
+
productId: string;
|
42
|
+
feedbackEmail?: string | undefined;
|
43
|
+
}, {
|
44
|
+
number: string;
|
45
|
+
content: string;
|
46
|
+
productId: string;
|
47
|
+
feedbackEmail?: string | undefined;
|
48
|
+
}>;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
exports.fields = {
|
7
|
+
productId: {
|
8
|
+
id: 'productId',
|
9
|
+
label: 'Product Id',
|
10
|
+
description: 'Product id. Guid Ex. 12345678-1234-1234-1234-123456789abc',
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
12
|
+
required: true,
|
13
|
+
},
|
14
|
+
feedbackEmail: {
|
15
|
+
id: 'feedbackEmail',
|
16
|
+
label: 'Feedback Email',
|
17
|
+
description: 'The email that the fax is sent to',
|
18
|
+
type: extensions_core_1.FieldType.STRING,
|
19
|
+
required: false,
|
20
|
+
},
|
21
|
+
number: {
|
22
|
+
id: 'number',
|
23
|
+
label: 'Number',
|
24
|
+
description: 'Destination Fax Number',
|
25
|
+
type: extensions_core_1.FieldType.STRING,
|
26
|
+
required: true,
|
27
|
+
},
|
28
|
+
content: {
|
29
|
+
id: 'content',
|
30
|
+
label: 'Fax content',
|
31
|
+
description: 'Content of the fax',
|
32
|
+
type: extensions_core_1.FieldType.HTML,
|
33
|
+
required: false,
|
34
|
+
},
|
35
|
+
};
|
36
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
37
|
+
productId: zod_1.z.string().min(1),
|
38
|
+
feedbackEmail: (0, extensions_core_1.makeStringOptional)(zod_1.z.string()),
|
39
|
+
number: zod_1.z.string().min(1),
|
40
|
+
content: zod_1.z.string().min(1),
|
41
|
+
});
|
42
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/westFax/actions/sendFax/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAIsC;AACtC,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,2DAA2D;QACxE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,mCAAmC;QAChD,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,wBAAwB;QACrC,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,aAAa,EAAE,IAAA,oCAAkB,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC7C,MAAM,EAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,OAAO,EAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAEsB,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { fields } from './fields';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/westFax/actions/sendFax/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAAxB,gGAAA,MAAM,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { sendFax } from './sendFax';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendFax = void 0;
|
4
|
+
var sendFax_1 = require("./sendFax");
|
5
|
+
Object.defineProperty(exports, "sendFax", { enumerable: true, get: function () { return sendFax_1.sendFax; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/westFax/actions/sendFax/index.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAA1B,kGAAA,OAAO,OAAA"}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendFax = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const lodash_1 = require("lodash");
|
6
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
7
|
+
const settings_1 = require("../../settings");
|
8
|
+
const config_1 = require("./config");
|
9
|
+
const dataPoints_1 = require("./config/dataPoints");
|
10
|
+
const fields_1 = require("./config/fields");
|
11
|
+
exports.sendFax = {
|
12
|
+
key: 'sendFax',
|
13
|
+
category: extensions_core_1.Category.COMMUNICATION,
|
14
|
+
title: 'SendFax',
|
15
|
+
description: 'Send fax with WestFax.',
|
16
|
+
fields: config_1.fields,
|
17
|
+
dataPoints: dataPoints_1.dataPoints,
|
18
|
+
previewable: false,
|
19
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
20
|
+
const { fields, settings } = (0, extensions_core_1.validate)({
|
21
|
+
schema: zod_1.z.object({
|
22
|
+
settings: settings_1.SettingsValidationSchema,
|
23
|
+
fields: fields_1.FieldsValidationSchema,
|
24
|
+
}),
|
25
|
+
payload,
|
26
|
+
});
|
27
|
+
const { productId, feedbackEmail, number, content } = fields;
|
28
|
+
const { username, password } = settings;
|
29
|
+
try {
|
30
|
+
const blob = new Blob([content], { type: 'text/html' });
|
31
|
+
const formData = new FormData();
|
32
|
+
formData.append('Username', username);
|
33
|
+
formData.append('Password', password);
|
34
|
+
formData.append('Cookies', 'false');
|
35
|
+
formData.append('ProductId', productId);
|
36
|
+
if (!(0, lodash_1.isNil)(feedbackEmail)) {
|
37
|
+
formData.append('FeedbackEmail', feedbackEmail);
|
38
|
+
}
|
39
|
+
formData.append('Numbers1', number);
|
40
|
+
formData.append('Files0', blob, 'content.html');
|
41
|
+
const requestOptions = {
|
42
|
+
method: 'POST',
|
43
|
+
body: formData,
|
44
|
+
};
|
45
|
+
const response = await fetch('https://api2.westfax.com/REST/Fax_SendFax/json', requestOptions);
|
46
|
+
const jsonResponse = await response.json();
|
47
|
+
if (!(0, lodash_1.isNil)(jsonResponse.Success) && jsonResponse.Success === true) {
|
48
|
+
const faxId = jsonResponse.Result;
|
49
|
+
await onComplete({
|
50
|
+
data_points: {
|
51
|
+
faxId,
|
52
|
+
},
|
53
|
+
});
|
54
|
+
}
|
55
|
+
else {
|
56
|
+
if (!(0, lodash_1.isNil)(jsonResponse.Success) && jsonResponse.Success === false) {
|
57
|
+
await onError({
|
58
|
+
events: [
|
59
|
+
{
|
60
|
+
date: new Date().toISOString(),
|
61
|
+
text: {
|
62
|
+
en: 'There is a miss configuration in the WestFax settings',
|
63
|
+
},
|
64
|
+
error: {
|
65
|
+
category: 'MISSING_FIELDS',
|
66
|
+
message: jsonResponse.InfoString,
|
67
|
+
},
|
68
|
+
},
|
69
|
+
],
|
70
|
+
});
|
71
|
+
}
|
72
|
+
else {
|
73
|
+
await onError({
|
74
|
+
events: [
|
75
|
+
{
|
76
|
+
date: new Date().toISOString(),
|
77
|
+
text: {
|
78
|
+
en: 'There is a miss configuration in the WestFax settings',
|
79
|
+
},
|
80
|
+
error: {
|
81
|
+
category: 'MISSING_SETTINGS',
|
82
|
+
message: 'Missing api url or api key',
|
83
|
+
},
|
84
|
+
},
|
85
|
+
],
|
86
|
+
});
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
catch (err) {
|
91
|
+
const error = err;
|
92
|
+
await onError({
|
93
|
+
events: [
|
94
|
+
{
|
95
|
+
date: new Date().toISOString(),
|
96
|
+
text: { en: 'WestFax API reported an error' },
|
97
|
+
error: {
|
98
|
+
category: 'SERVER_ERROR',
|
99
|
+
message: error.message,
|
100
|
+
},
|
101
|
+
},
|
102
|
+
],
|
103
|
+
});
|
104
|
+
}
|
105
|
+
},
|
106
|
+
};
|
107
|
+
//# sourceMappingURL=sendFax.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sendFax.js","sourceRoot":"","sources":["../../../../../extensions/westFax/actions/sendFax/sendFax.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.WestFax = void 0;
|
4
|
+
const actions_1 = require("./actions");
|
5
|
+
const settings_1 = require("./settings");
|
6
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
7
|
+
exports.WestFax = {
|
8
|
+
key: 'westFax',
|
9
|
+
category: extensions_core_1.Category.COMMUNICATION,
|
10
|
+
title: 'WestFax',
|
11
|
+
description: '** In beta ** Easily orchestrate actions in WestFax.',
|
12
|
+
icon_url: 'https://images.g2crowd.com/uploads/product/image/large_detail/large_detail_7dc2e23dc9bbc80068bbfde536ac5451/westfax.png',
|
13
|
+
author: {
|
14
|
+
authorType: extensions_core_1.AuthorType.AWELL,
|
15
|
+
},
|
16
|
+
settings: settings_1.settings,
|
17
|
+
actions: actions_1.actions,
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/westFax/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,yCAAqC;AACrC,mEAAoE;AAEvD,QAAA,OAAO,GAAc;IAChC,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,sDAAsD;IACnE,QAAQ,EACN,yHAAyH;IAC3H,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;CACR,CAAA"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const settings: {
|
3
|
+
username: {
|
4
|
+
key: string;
|
5
|
+
label: string;
|
6
|
+
obfuscated: false;
|
7
|
+
required: true;
|
8
|
+
description: string;
|
9
|
+
};
|
10
|
+
password: {
|
11
|
+
key: string;
|
12
|
+
label: string;
|
13
|
+
obfuscated: true;
|
14
|
+
required: true;
|
15
|
+
description: string;
|
16
|
+
};
|
17
|
+
};
|
18
|
+
export declare const SettingsValidationSchema: z.ZodObject<{
|
19
|
+
username: z.ZodString;
|
20
|
+
password: z.ZodString;
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
22
|
+
password: string;
|
23
|
+
username: string;
|
24
|
+
}, {
|
25
|
+
password: string;
|
26
|
+
username: string;
|
27
|
+
}>;
|
@@ -0,0 +1,29 @@
|
|
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
|
+
username: {
|
7
|
+
key: 'username',
|
8
|
+
label: 'Username',
|
9
|
+
obfuscated: false,
|
10
|
+
required: true,
|
11
|
+
description: 'Your WestFax username',
|
12
|
+
},
|
13
|
+
password: {
|
14
|
+
key: 'password',
|
15
|
+
label: 'Password',
|
16
|
+
obfuscated: true,
|
17
|
+
required: true,
|
18
|
+
description: 'Your WestFax password',
|
19
|
+
},
|
20
|
+
};
|
21
|
+
exports.SettingsValidationSchema = zod_1.z.object({
|
22
|
+
username: zod_1.z.string().min(1, {
|
23
|
+
message: 'Missing "Ursername in the extension settings."',
|
24
|
+
}),
|
25
|
+
password: zod_1.z.string().min(1, {
|
26
|
+
message: 'Missing "Password in the extension settings."',
|
27
|
+
}),
|
28
|
+
});
|
29
|
+
//# sourceMappingURL=settings.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/westFax/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uBAAuB;KACrC;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uBAAuB;KACrC;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;QAC1B,OAAO,EAAE,gDAAgD;KAC1D,CAAC;IACF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;QAC1B,OAAO,EAAE,+CAA+C;KACzD,CAAC;CACiD,CAAC,CAAA"}
|