@awell-health/awell-extensions 1.0.120 → 1.0.122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. package/dist/extensions/markdown.json +2 -2
  2. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/fields.d.ts +78 -0
  3. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/fields.js +66 -0
  4. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/fields.js.map +1 -0
  5. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/index.d.ts +2 -0
  6. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/index.js +9 -0
  7. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/index.js.map +1 -0
  8. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/settings.d.ts +35 -0
  9. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/settings.js +11 -0
  10. package/dist/extensions/wellinks/actions/insertMemberListEvent/config/settings.js.map +1 -0
  11. package/dist/extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.d.ts +2 -52
  12. package/dist/extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.js +15 -103
  13. package/dist/extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.js.map +1 -1
  14. package/dist/extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.test.js +3 -12
  15. package/dist/extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.test.js.map +1 -1
  16. package/dist/extensions/wellinks/config/settings.d.ts +35 -0
  17. package/dist/extensions/wellinks/config/settings.js +14 -1
  18. package/dist/extensions/wellinks/config/settings.js.map +1 -1
  19. package/package.json +1 -1
@@ -89,10 +89,10 @@
89
89
  },
90
90
  "wellinks": {
91
91
  "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.",
92
- "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."
92
+ "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."
93
93
  },
94
94
  "zendesk": {
95
- "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 need a **sales API token**. You can visit Zendesk Sales CRM dashboard and go to **Settings > Integration > OAuth** to enable and create an API token.\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",
95
+ "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",
96
96
  "changelog": "# Zendesk changelog\n"
97
97
  },
98
98
  "zusHealth": {
@@ -0,0 +1,78 @@
1
+ import { z } from 'zod';
2
+ import { FieldType } from '@awell-health/extensions-core';
3
+ export declare const fields: {
4
+ eventName: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ required: true;
10
+ };
11
+ memberId: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: FieldType.STRING;
16
+ required: true;
17
+ };
18
+ sourceName: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ type: FieldType.STRING;
23
+ required: true;
24
+ };
25
+ sendgridListId: {
26
+ id: string;
27
+ label: string;
28
+ description: string;
29
+ type: FieldType.STRING;
30
+ required: true;
31
+ };
32
+ originatorName: {
33
+ id: string;
34
+ label: string;
35
+ description: string;
36
+ type: FieldType.STRING;
37
+ required: true;
38
+ };
39
+ eventDate: {
40
+ id: string;
41
+ label: string;
42
+ description: string;
43
+ type: FieldType.DATE;
44
+ required: true;
45
+ };
46
+ lockedById: {
47
+ id: string;
48
+ label: string;
49
+ description: string;
50
+ type: FieldType.STRING;
51
+ required: false;
52
+ };
53
+ };
54
+ export declare const FieldsValidationSchema: z.ZodObject<{
55
+ eventName: z.ZodString;
56
+ memberId: z.ZodString;
57
+ sourceName: z.ZodString;
58
+ sendgridListId: z.ZodString;
59
+ originatorName: z.ZodString;
60
+ eventDate: z.ZodString;
61
+ lockedById: z.ZodOptional<z.ZodString>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ eventName: string;
64
+ memberId: string;
65
+ sourceName: string;
66
+ sendgridListId: string;
67
+ originatorName: string;
68
+ eventDate: string;
69
+ lockedById?: string | undefined;
70
+ }, {
71
+ eventName: string;
72
+ memberId: string;
73
+ sourceName: string;
74
+ sendgridListId: string;
75
+ originatorName: string;
76
+ eventDate: string;
77
+ lockedById?: string | undefined;
78
+ }>;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const zod_1 = require("zod");
5
+ const extensions_core_1 = require("@awell-health/extensions-core");
6
+ exports.fields = {
7
+ eventName: {
8
+ id: 'eventName',
9
+ label: 'Event Name',
10
+ description: 'The member list event name (Marked Ineligble, Enrolled, Unenrolled, etc)',
11
+ type: extensions_core_1.FieldType.STRING,
12
+ required: true,
13
+ },
14
+ memberId: {
15
+ id: 'memberId',
16
+ label: 'Member ID',
17
+ description: 'The Wellinks ID of the patient.',
18
+ type: extensions_core_1.FieldType.STRING,
19
+ required: true,
20
+ },
21
+ sourceName: {
22
+ id: 'sourceName',
23
+ label: 'Source',
24
+ description: 'The source of the Member List Event (Sendgrid, Member Medical History CCA, Member Event Form, etc)',
25
+ type: extensions_core_1.FieldType.STRING,
26
+ required: true,
27
+ },
28
+ sendgridListId: {
29
+ id: 'sendgridListId',
30
+ label: 'Sendgrid List ID',
31
+ description: 'The ID of the Sendgrid list.',
32
+ type: extensions_core_1.FieldType.STRING,
33
+ required: true,
34
+ },
35
+ originatorName: {
36
+ id: 'originatorName',
37
+ label: 'Originator',
38
+ description: 'The originator of the event (Memeber, Coach, etc)',
39
+ type: extensions_core_1.FieldType.STRING,
40
+ required: true,
41
+ },
42
+ eventDate: {
43
+ id: 'eventDate',
44
+ label: 'Event Date',
45
+ description: 'The Date/Time of the Member List Event',
46
+ type: extensions_core_1.FieldType.DATE,
47
+ required: true,
48
+ },
49
+ lockedById: {
50
+ id: 'lockedById',
51
+ label: 'Locked By ID',
52
+ description: 'The ID of the coach that signed and locked the healthie form.',
53
+ type: extensions_core_1.FieldType.STRING,
54
+ required: false,
55
+ },
56
+ };
57
+ exports.FieldsValidationSchema = zod_1.z.object({
58
+ eventName: zod_1.z.string(),
59
+ memberId: zod_1.z.string(),
60
+ sourceName: zod_1.z.string(),
61
+ sendgridListId: zod_1.z.string(),
62
+ originatorName: zod_1.z.string(),
63
+ eventDate: zod_1.z.string(),
64
+ lockedById: zod_1.z.string().optional(),
65
+ });
66
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/wellinks/actions/insertMemberListEvent/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,0EAA0E;QAC5E,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,iCAAiC;QAC9C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,QAAQ;QACf,WAAW,EACT,oGAAoG;QACtG,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,wCAAwC;QACrD,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,+DAA+D;QACjE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACgB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { fields, FieldsValidationSchema } from './fields';
2
+ export { InsertMemberListEventSettingsSchema } from './settings';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InsertMemberListEventSettingsSchema = 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 settings_1 = require("./settings");
8
+ Object.defineProperty(exports, "InsertMemberListEventSettingsSchema", { enumerable: true, get: function () { return settings_1.InsertMemberListEventSettingsSchema; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/wellinks/actions/insertMemberListEvent/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,uCAAgE;AAAvD,+HAAA,mCAAmC,OAAA"}
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ export declare const InsertMemberListEventSettingsSchema: z.ZodObject<{
3
+ apiUrl: z.ZodOptional<z.ZodString>;
4
+ apiKey: z.ZodOptional<z.ZodString>;
5
+ selectEventTypeQuestion: z.ZodOptional<z.ZodString>;
6
+ startSendingRemindersQuestions: z.ZodOptional<z.ZodString>;
7
+ memberEventFormId: z.ZodOptional<z.ZodString>;
8
+ flourishApiUrl: z.ZodOptional<z.ZodString>;
9
+ flourishApiKey: z.ZodOptional<z.ZodString>;
10
+ flourishClientExtId: z.ZodOptional<z.ZodString>;
11
+ platformApiKey: z.ZodString;
12
+ platformApiUrl: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ platformApiUrl: string;
15
+ platformApiKey: string;
16
+ apiUrl?: string | undefined;
17
+ apiKey?: string | undefined;
18
+ selectEventTypeQuestion?: string | undefined;
19
+ startSendingRemindersQuestions?: string | undefined;
20
+ memberEventFormId?: string | undefined;
21
+ flourishApiUrl?: string | undefined;
22
+ flourishApiKey?: string | undefined;
23
+ flourishClientExtId?: string | undefined;
24
+ }, {
25
+ platformApiUrl: string;
26
+ platformApiKey: string;
27
+ apiUrl?: string | undefined;
28
+ apiKey?: string | undefined;
29
+ selectEventTypeQuestion?: string | undefined;
30
+ startSendingRemindersQuestions?: string | undefined;
31
+ memberEventFormId?: string | undefined;
32
+ flourishApiUrl?: string | undefined;
33
+ flourishApiKey?: string | undefined;
34
+ flourishClientExtId?: string | undefined;
35
+ }>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InsertMemberListEventSettingsSchema = void 0;
4
+ const settings_1 = require("../../../config/settings");
5
+ const zod_1 = require("zod");
6
+ const requiredFields = zod_1.z.object({
7
+ platformApiKey: zod_1.z.string(),
8
+ platformApiUrl: zod_1.z.string(),
9
+ });
10
+ exports.InsertMemberListEventSettingsSchema = settings_1.SettingsValidationSchema.merge(requiredFields);
11
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../../../extensions/wellinks/actions/insertMemberListEvent/config/settings.ts"],"names":[],"mappings":";;;AAAA,uDAAmE;AACnE,6BAAuB;AACvB,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAA;AAEW,QAAA,mCAAmC,GAC9C,mCAAwB,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA"}
@@ -1,56 +1,6 @@
1
- import { FieldType, type Action } from '@awell-health/extensions-core';
1
+ import { type Action } from '@awell-health/extensions-core';
2
2
  import { type settings } from '../../config/settings';
3
- declare const fields: {
4
- eventName: {
5
- id: string;
6
- label: string;
7
- description: string;
8
- type: FieldType.STRING;
9
- required: true;
10
- };
11
- memberId: {
12
- id: string;
13
- label: string;
14
- description: string;
15
- type: FieldType.STRING;
16
- required: true;
17
- };
18
- sourceName: {
19
- id: string;
20
- label: string;
21
- description: string;
22
- type: FieldType.STRING;
23
- required: true;
24
- };
25
- sendgridListId: {
26
- id: string;
27
- label: string;
28
- description: string;
29
- type: FieldType.STRING;
30
- required: true;
31
- };
32
- originatorName: {
33
- id: string;
34
- label: string;
35
- description: string;
36
- type: FieldType.STRING;
37
- required: true;
38
- };
39
- eventDate: {
40
- id: string;
41
- label: string;
42
- description: string;
43
- type: FieldType.DATE;
44
- required: true;
45
- };
46
- lockedById: {
47
- id: string;
48
- label: string;
49
- description: string;
50
- type: FieldType.STRING;
51
- required: false;
52
- };
53
- };
3
+ import { fields } from './config';
54
4
  declare const dataPoints: {
55
5
  insertSuccessful: {
56
6
  key: string;
@@ -2,60 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.insertMemberListEvent = void 0;
4
4
  const extensions_core_1 = require("@awell-health/extensions-core");
5
- const extensions_core_2 = require("@awell-health/extensions-core");
6
5
  const wellinksClient_1 = require("../../api/clients/wellinksClient");
7
- const lodash_1 = require("lodash");
8
- const fields = {
9
- eventName: {
10
- id: 'eventName',
11
- label: 'Event Name',
12
- description: 'The member list event name (Marked Ineligble, Enrolled, Unenrolled, etc)',
13
- type: extensions_core_1.FieldType.STRING,
14
- required: true,
15
- },
16
- memberId: {
17
- id: 'memberId',
18
- label: 'Member ID',
19
- description: 'The Wellinks ID of the patient.',
20
- type: extensions_core_1.FieldType.STRING,
21
- required: true,
22
- },
23
- sourceName: {
24
- id: 'sourceName',
25
- label: 'Source',
26
- description: 'The source of the Member List Event (Sendgrid, Member Medical History CCA, Member Event Form, etc)',
27
- type: extensions_core_1.FieldType.STRING,
28
- required: true,
29
- },
30
- sendgridListId: {
31
- id: 'sendgridListId',
32
- label: 'Sendgrid List ID',
33
- description: 'The ID of the Sendgrid list.',
34
- type: extensions_core_1.FieldType.STRING,
35
- required: true,
36
- },
37
- originatorName: {
38
- id: 'originatorName',
39
- label: 'Originator',
40
- description: 'The originator of the event (Memeber, Coach, etc)',
41
- type: extensions_core_1.FieldType.STRING,
42
- required: true,
43
- },
44
- eventDate: {
45
- id: 'eventDate',
46
- label: 'Event Date',
47
- description: 'The Date/Time of the Member List Event',
48
- type: extensions_core_1.FieldType.DATE,
49
- required: true,
50
- },
51
- lockedById: {
52
- id: 'lockedById',
53
- label: 'Locked By ID',
54
- description: 'The ID of the coach that signed and locked the healthie form.',
55
- type: extensions_core_1.FieldType.STRING,
56
- required: false,
57
- },
58
- };
6
+ const config_1 = require("./config");
7
+ const zod_1 = require("zod");
59
8
  const dataPoints = {
60
9
  insertSuccessful: {
61
10
  key: 'insertSuccessful',
@@ -64,44 +13,22 @@ const dataPoints = {
64
13
  };
65
14
  exports.insertMemberListEvent = {
66
15
  key: 'insertMemberListEvent',
67
- category: extensions_core_2.Category.SCHEDULING,
16
+ category: extensions_core_1.Category.SCHEDULING,
68
17
  title: 'Insert Member List Event',
69
18
  description: 'Inserts a MembersListEvent record in the Hubble Database',
70
- fields,
19
+ fields: config_1.fields,
71
20
  dataPoints,
72
21
  previewable: true,
73
22
  onActivityCreated: async (payload, onComplete, onError) => {
74
- const { fields, settings } = payload;
75
- const { eventName, memberId, sourceName, sendgridListId, originatorName, eventDate, lockedById, } = fields;
23
+ const { fields: { eventName, memberId, sourceName, sendgridListId, originatorName, eventDate, lockedById, }, settings: { platformApiUrl, platformApiKey }, } = (0, extensions_core_1.validate)({
24
+ schema: zod_1.z.object({
25
+ fields: config_1.FieldsValidationSchema,
26
+ settings: config_1.InsertMemberListEventSettingsSchema,
27
+ }),
28
+ payload,
29
+ });
76
30
  try {
77
- if ((0, lodash_1.isNil)(settings.platformApiUrl) || (0, lodash_1.isNil)(settings.platformApiKey)) {
78
- throw new Error('The Platform API URL and/or API Key is not set in the settings');
79
- }
80
- const client = new wellinksClient_1.WellinksClient(settings.platformApiUrl, settings.platformApiKey);
81
- if ((0, lodash_1.isNil)(eventName)) {
82
- await buildValidationError('eventName', onError);
83
- return;
84
- }
85
- if ((0, lodash_1.isNil)(memberId)) {
86
- await buildValidationError('memberId', onError);
87
- return;
88
- }
89
- if ((0, lodash_1.isNil)(sourceName)) {
90
- await buildValidationError('sourceName', onError);
91
- return;
92
- }
93
- if ((0, lodash_1.isNil)(sendgridListId)) {
94
- await buildValidationError('sendgridListId', onError);
95
- return;
96
- }
97
- if ((0, lodash_1.isNil)(originatorName)) {
98
- await buildValidationError('originatorName', onError);
99
- return;
100
- }
101
- if ((0, lodash_1.isNil)(eventDate)) {
102
- await buildValidationError('eventDate', onError);
103
- return;
104
- }
31
+ const client = new wellinksClient_1.WellinksClient(platformApiUrl, platformApiKey);
105
32
  const response = await client.memberListEvent.insert({
106
33
  eventName,
107
34
  memberId,
@@ -126,7 +53,8 @@ exports.insertMemberListEvent = {
126
53
  });
127
54
  }
128
55
  }
129
- catch (_a) {
56
+ catch (err) {
57
+ const error = err;
130
58
  await onError({
131
59
  events: [
132
60
  {
@@ -136,7 +64,7 @@ exports.insertMemberListEvent = {
136
64
  },
137
65
  error: {
138
66
  category: 'SERVER_ERROR',
139
- message: 'an error occurred while trying to insert a MemberListEvent',
67
+ message: `Message: ${error.message}`,
140
68
  },
141
69
  },
142
70
  ],
@@ -144,20 +72,4 @@ exports.insertMemberListEvent = {
144
72
  }
145
73
  },
146
74
  };
147
- async function buildValidationError(field, onError) {
148
- await onError({
149
- events: [
150
- {
151
- date: new Date().toISOString(),
152
- text: {
153
- en: `The ${field} field is required`,
154
- },
155
- error: {
156
- category: 'SERVER_ERROR',
157
- message: `The ${field} field is required`,
158
- },
159
- },
160
- ],
161
- });
162
- }
163
75
  //# sourceMappingURL=insertMemberListEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"insertMemberListEvent.js","sourceRoot":"","sources":["../../../../../extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.ts"],"names":[],"mappings":";;;AAAA,mEAMsC;AACtC,mEAAwD;AAExD,qEAAiE;AACjE,mCAA8B;AAE9B,MAAM,MAAM,GAAG;IACb,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,0EAA0E;QAC5E,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,iCAAiC;QAC9C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,QAAQ;QACf,WAAW,EACT,oGAAoG;QACtG,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,2BAAS,CAAC,MAA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AgB,EAAE,OAAO;qBAC1B;iBACF,CAAC,CAAA;aACH;SACF;QAAC,WAAM;YACN,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE;4BACJ,EAAE,EAAE,4DAA4D;yBACjE;wBACD,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EACL,4DAA4D;yBAC/D;qBACF;iBACF;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA;AAED,KAAK,UAAU,oBAAoB,CACjC,KAAa,EACb,OAAwB;IAExB,MAAM,OAAO,CAAC;QACZ,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBAC9B,IAAI,EAAE;oBACJ,EAAE,EAAE,OAAO,KAAK,oBAAoB;iBACrC;gBACD,KAAK,EAAE;oBACL,QAAQ,EAAE,cAAc;oBACxB,OAAO,EAAE,OAAO,KAAK,oBAAoB;iBAC1C;aACF;SACF;KACF,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"insertMemberListEvent.js","sourceRoot":"","sources":["../../../../../extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.ts"],"names":[],"mappings":";;;AAAA,mEAKsC;AAEtC,qEAAiE;AACjE,qCAIiB;AACjB,6BAAuB;AACvB,MAAM,UAAU,GAAG;IACjB,gBAAgB,EAAE;QAChB,GAAG,EAAE,kBAAkB;QACvB,SAAS,EAAE,SAAS;KACrB;CAC4C,CAAA;AAElC,QAAA,qBAAqB,GAI9B;IACF,GAAG,EAAE,uBAAuB;IAC5B,QAAQ,EAAE,0BAAQ,CAAC,UAAU;IAC7B,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,0DAA0D;IACvE,MAAM,EAAN,eAAM;IACN,UAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OA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ACH,CAAC;CACF,CAAA"}
@@ -4,6 +4,7 @@ const tests_1 = require("../../../../src/tests");
4
4
  const wellinksClient_1 = require("../../api/clients/__mocks__/wellinksClient");
5
5
  const settings_1 = require("../../__mocks__/config/settings");
6
6
  const insertMemberListEvent_1 = require("./insertMemberListEvent");
7
+ const zod_1 = require("zod");
7
8
  jest.mock('../../api/clients/wellinksClient', () => ({ WellinksClient: wellinksClient_1.WellinksClient }));
8
9
  describe('Insert Member List Event', () => {
9
10
  const onComplete = jest.fn();
@@ -72,17 +73,7 @@ describe('Insert Member List Event', () => {
72
73
  },
73
74
  settings: settings_1.mockSettings,
74
75
  });
75
- await insertMemberListEvent_1.insertMemberListEvent.onActivityCreated(invalidPayload, onComplete, onError);
76
- expect(onError).toHaveBeenNthCalledWith(1, {
77
- events: expect.arrayContaining([
78
- expect.objectContaining({
79
- error: {
80
- category: 'SERVER_ERROR',
81
- message: 'The memberId field is required',
82
- },
83
- }),
84
- ]),
85
- });
76
+ await expect(insertMemberListEvent_1.insertMemberListEvent.onActivityCreated(invalidPayload, onComplete, onError)).rejects.toThrow(zod_1.ZodError);
86
77
  expect(onComplete).not.toBeCalled();
87
78
  });
88
79
  test('should call onComplete even if the non-required arguments are undefined/empty', async () => {
@@ -131,7 +122,7 @@ describe('Insert Member List Event', () => {
131
122
  expect.objectContaining({
132
123
  error: {
133
124
  category: 'SERVER_ERROR',
134
- message: 'an error occurred while trying to insert a MemberListEvent',
125
+ message: 'Message: AN ERROR HAS OCCURRED',
135
126
  },
136
127
  }),
137
128
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"insertMemberListEvent.test.js","sourceRoot":"","sources":["../../../../../extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.test.ts"],"names":[],"mappings":";;AAAA,iDAA2D;AAC3D,+EAGmD;AACnD,8DAA8D;AAC9D,mEAA+D;AAE/D,IAAI,CAAC,IAAI,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,cAAc,EA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F,iDAAgC,CAAC,eAAe,CAAC,MAAM,CAAC,sBAAsB,CAC5E,GAAG,EAAE;YACH,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAA;QAC1C,CAAC,CACF,CAAA;QACD,MAAM,6CAAqB,CAAC,iBAAiB,CAC3C,cAAc,EACd,UAAU,EACV,OAAO,CACR,CAAA;QACD,MAAM,CAAC,OAAO,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAAE;YACzC,MAAM,EAAE,MAAM,CAAC,eAAe,CAAC;gBAC7B,MAAM,CAAC,gBAAgB,CAAC;oBACtB,KAAK,EAAE;wBACL,QAAQ,EAAE,cAAc;wBACxB,OAAO,EACL,4DAA4D;qBAC/D;iBACF,CAAC;aACH,CAAC;SACH,CAAC,CAAA;QACF,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IACrC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"insertMemberListEvent.test.js","sourceRoot":"","sources":["../../../../../extensions/wellinks/actions/insertMemberListEvent/insertMemberListEvent.test.ts"],"names":[],"mappings":";;AAAA,iDAA2D;AAC3D,+EAGmD;AACnD,8DAA8D;AAC9D,mEAA+D;AAC/D,6BAA8B;AAC9B,IAAI,CAAC,IAAI,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,cAAc,EAAd,+BAAc,EAAE,CAAC,CAAC,CAAA;AAEzE,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,2FAA2F,EAAE,KAAK,IAAI,EAAE;QAC3G,MAAM,YAAY,GAAG,IAAA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C,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { z } from 'zod';
1
2
  export declare const settings: {
2
3
  platformApiUrl: {
3
4
  key: string;
@@ -70,3 +71,37 @@ export declare const settings: {
70
71
  description: string;
71
72
  };
72
73
  };
74
+ export declare const SettingsValidationSchema: z.ZodObject<{
75
+ platformApiUrl: z.ZodOptional<z.ZodString>;
76
+ platformApiKey: z.ZodOptional<z.ZodString>;
77
+ apiUrl: z.ZodOptional<z.ZodString>;
78
+ apiKey: z.ZodOptional<z.ZodString>;
79
+ selectEventTypeQuestion: z.ZodOptional<z.ZodString>;
80
+ startSendingRemindersQuestions: z.ZodOptional<z.ZodString>;
81
+ memberEventFormId: z.ZodOptional<z.ZodString>;
82
+ flourishApiUrl: z.ZodOptional<z.ZodString>;
83
+ flourishApiKey: z.ZodOptional<z.ZodString>;
84
+ flourishClientExtId: z.ZodOptional<z.ZodString>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ platformApiUrl?: string | undefined;
87
+ platformApiKey?: string | undefined;
88
+ apiUrl?: string | undefined;
89
+ apiKey?: string | undefined;
90
+ selectEventTypeQuestion?: string | undefined;
91
+ startSendingRemindersQuestions?: string | undefined;
92
+ memberEventFormId?: string | undefined;
93
+ flourishApiUrl?: string | undefined;
94
+ flourishApiKey?: string | undefined;
95
+ flourishClientExtId?: string | undefined;
96
+ }, {
97
+ platformApiUrl?: string | undefined;
98
+ platformApiKey?: string | undefined;
99
+ apiUrl?: string | undefined;
100
+ apiKey?: string | undefined;
101
+ selectEventTypeQuestion?: string | undefined;
102
+ startSendingRemindersQuestions?: string | undefined;
103
+ memberEventFormId?: string | undefined;
104
+ flourishApiUrl?: string | undefined;
105
+ flourishApiKey?: string | undefined;
106
+ flourishClientExtId?: string | undefined;
107
+ }>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.settings = void 0;
3
+ exports.SettingsValidationSchema = exports.settings = void 0;
4
+ const zod_1 = require("zod");
4
5
  exports.settings = {
5
6
  platformApiUrl: {
6
7
  key: 'platformApiUrl',
@@ -73,4 +74,16 @@ exports.settings = {
73
74
  description: 'Your Flourish Client Ext ID.',
74
75
  },
75
76
  };
77
+ exports.SettingsValidationSchema = zod_1.z.object({
78
+ platformApiUrl: zod_1.z.string().optional(),
79
+ platformApiKey: zod_1.z.string().optional(),
80
+ apiUrl: zod_1.z.string().optional(),
81
+ apiKey: zod_1.z.string().optional(),
82
+ selectEventTypeQuestion: zod_1.z.string().optional(),
83
+ startSendingRemindersQuestions: zod_1.z.string().optional(),
84
+ memberEventFormId: zod_1.z.string().optional(),
85
+ flourishApiUrl: zod_1.z.string().optional(),
86
+ flourishApiKey: zod_1.z.string().optional(),
87
+ flourishClientExtId: zod_1.z.string().optional(),
88
+ });
76
89
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../extensions/wellinks/config/settings.ts"],"names":[],"mappings":";;;AAEa,QAAA,QAAQ,GAAG;IACtB,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,+CAA+C;KAC7D;IACD,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,+CAA+C;KAC7D;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,mCAAmC;KACjD;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,wBAAwB;KACtC;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,yBAAyB;QAC9B,KAAK,EAAE,+BAA+B;QACtC,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,qEAAqE;KACxE;IACD,8BAA8B,EAAE;QAC9B,GAAG,EAAE,gCAAgC;QACrC,KAAK,EAAE,qCAAqC;QAC5C,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,4EAA4E;KAC/E;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,mBAAmB;QACxB,KAAK,EAAE,sBAAsB;QAC7B,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,+CAA+C;KAC7D;IACD,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,4CAA4C;KAC1D;IACD,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,wBAAwB;KACtC;IACD,mBAAmB,EAAE;QACnB,GAAG,EAAE,qBAAqB;QAC1B,KAAK,EAAE,wBAAwB;QAC/B,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,8BAA8B;KAC5C;CACgC,CAAA"}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../extensions/wellinks/config/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAC3B,QAAA,QAAQ,GAAG;IACtB,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,+CAA+C;KAC7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B,GAAG,EAAE,qBAAqB;QAC1B,KAAK,EAAE,wBAAwB;QAC/B,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,8BAA8B;KAC5C;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,uBAAuB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9C,8BAA8B,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrD,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACS,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.120",
3
+ "version": "1.0.122",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {