@awell-health/awell-extensions 1.0.98 → 1.0.100

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 (31) hide show
  1. package/dist/extensions/calDotCom/actions/createBooking/config/fields.d.ts +5 -14
  2. package/dist/extensions/calDotCom/actions/createBooking/config/fields.js +17 -13
  3. package/dist/extensions/calDotCom/actions/createBooking/config/fields.js.map +1 -1
  4. package/dist/extensions/calDotCom/actions/createBooking/createBooking.test.js +1 -1
  5. package/dist/extensions/calDotCom/actions/createBooking/createBooking.test.js.map +1 -1
  6. package/dist/extensions/markdown.json +2 -2
  7. package/dist/extensions/wellinks/actions/checkFlourishCustomer/checkFlourishCustomer.d.ts +11 -0
  8. package/dist/extensions/wellinks/actions/checkFlourishCustomer/checkFlourishCustomer.js +40 -0
  9. package/dist/extensions/wellinks/actions/checkFlourishCustomer/checkFlourishCustomer.js.map +1 -0
  10. package/dist/extensions/wellinks/actions/checkFlourishCustomer/checkFlourishCustomer.test.d.ts +1 -0
  11. package/dist/extensions/wellinks/actions/checkFlourishCustomer/checkFlourishCustomer.test.js +83 -0
  12. package/dist/extensions/wellinks/actions/checkFlourishCustomer/checkFlourishCustomer.test.js.map +1 -0
  13. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/fields.d.ts +18 -0
  14. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/fields.js +18 -0
  15. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/fields.js.map +1 -0
  16. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/index.d.ts +2 -0
  17. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/index.js +9 -0
  18. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/index.js.map +1 -0
  19. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/settings.d.ts +35 -0
  20. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/settings.js +17 -0
  21. package/dist/extensions/wellinks/actions/checkFlourishCustomer/config/settings.js.map +1 -0
  22. package/dist/extensions/wellinks/actions/index.d.ts +134 -19
  23. package/dist/extensions/wellinks/actions/index.js +2 -0
  24. package/dist/extensions/wellinks/actions/index.js.map +1 -1
  25. package/dist/extensions/wellinks/settings.d.ts +11 -4
  26. package/dist/extensions/wellinks/settings.js +17 -10
  27. package/dist/extensions/wellinks/settings.js.map +1 -1
  28. package/dist/extensions/wellinks/wellinksFlourishClient.d.ts +9 -0
  29. package/dist/extensions/wellinks/wellinksFlourishClient.js +79 -0
  30. package/dist/extensions/wellinks/wellinksFlourishClient.js.map +1 -0
  31. package/package.json +4 -2
@@ -79,7 +79,8 @@ export declare const fields: {
79
79
  description: string;
80
80
  };
81
81
  };
82
- export declare const JsonStringValidationSchema: z.ZodEffects<z.ZodString, {
82
+ export declare const JsonStringValidationSchema: z.ZodEffects<z.ZodString, object, string>;
83
+ export declare const ResponsesValidationSchema: z.ZodEffects<z.ZodEffects<z.ZodString, object, string>, {
83
84
  name: string;
84
85
  email: string;
85
86
  metadata: object;
@@ -89,18 +90,13 @@ export declare const FieldsValidationSchema: z.ZodObject<{
89
90
  eventTypeId: z.ZodNumber;
90
91
  start: z.ZodEffects<z.ZodDate, string, Date>;
91
92
  end: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodDate, string, Date>>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
92
- responses: z.ZodEffects<z.ZodString, {
93
+ responses: z.ZodEffects<z.ZodEffects<z.ZodString, object, string>, {
93
94
  name: string;
94
95
  email: string;
95
96
  metadata: object;
96
97
  location: string;
97
98
  }, string>;
98
- metadata: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodString, {
99
- name: string;
100
- email: string;
101
- metadata: object;
102
- location: string;
103
- }, string>>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
99
+ metadata: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodString, object, string>>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
104
100
  timeZone: z.ZodString;
105
101
  language: z.ZodString;
106
102
  title: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
@@ -119,12 +115,7 @@ export declare const FieldsValidationSchema: z.ZodObject<{
119
115
  location: string;
120
116
  };
121
117
  end?: string | undefined;
122
- metadata?: {
123
- name: string;
124
- email: string;
125
- metadata: object;
126
- location: string;
127
- } | undefined;
118
+ metadata?: object | undefined;
128
119
  title?: string | undefined;
129
120
  recurringEventId?: number | undefined;
130
121
  description?: string | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldsValidationSchema = exports.JsonStringValidationSchema = exports.fields = void 0;
3
+ exports.FieldsValidationSchema = exports.ResponsesValidationSchema = exports.JsonStringValidationSchema = exports.fields = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const extensions_core_1 = require("@awell-health/extensions-core");
6
6
  const lodash_1 = require("lodash");
@@ -85,22 +85,16 @@ exports.fields = {
85
85
  description: 'Status of the meeting to be set. Possible values: "ACCEPTED", "PENDING", "CANCELLED", "REJECTED".',
86
86
  },
87
87
  };
88
- exports.JsonStringValidationSchema = zod_1.z.string().transform((str, ctx) => {
88
+ exports.JsonStringValidationSchema = zod_1.z
89
+ .string()
90
+ .transform((str, ctx) => {
89
91
  if ((0, lodash_1.isNil)(str) || (0, lodash_1.isEmpty)(str)) {
90
- ctx.addIssue({
91
- code: 'custom',
92
- message: 'The value should represent a correct object',
93
- });
94
- return zod_1.z.NEVER;
92
+ return {};
95
93
  }
96
94
  try {
97
95
  const parsedJson = JSON.parse(str);
98
96
  if ((0, lodash_1.isEmpty)(parsedJson)) {
99
- ctx.addIssue({
100
- code: 'custom',
101
- message: 'The value should represent a correct object',
102
- });
103
- return zod_1.z.NEVER;
97
+ return {};
104
98
  }
105
99
  if (typeof parsedJson !== 'object' || Array.isArray(parsedJson)) {
106
100
  ctx.addIssue({
@@ -116,12 +110,22 @@ exports.JsonStringValidationSchema = zod_1.z.string().transform((str, ctx) => {
116
110
  return zod_1.z.NEVER;
117
111
  }
118
112
  });
113
+ exports.ResponsesValidationSchema = exports.JsonStringValidationSchema.transform((value, ctx) => {
114
+ if ((0, lodash_1.isEmpty)(value)) {
115
+ ctx.addIssue({
116
+ code: 'custom',
117
+ message: 'The value should represent a correct object',
118
+ });
119
+ return zod_1.z.NEVER;
120
+ }
121
+ return value;
122
+ });
119
123
  const statusEnum = zod_1.z.enum(['ACCEPTED', 'PENDING', 'CANCELLED', 'REJECTED']);
120
124
  exports.FieldsValidationSchema = zod_1.z.object({
121
125
  eventTypeId: extensions_core_1.NumericIdSchema,
122
126
  start: extensions_core_1.DateTimeSchema,
123
127
  end: extensions_core_1.DateTimeOptionalSchema,
124
- responses: exports.JsonStringValidationSchema,
128
+ responses: exports.ResponsesValidationSchema,
125
129
  metadata: (0, extensions_core_1.makeStringOptional)(exports.JsonStringValidationSchema),
126
130
  timeZone: zod_1.z.string(),
127
131
  language: zod_1.z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/calDotCom/actions/createBooking/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAOsC;AACtC,mCAAuC;AAE1B,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,KAAK,EAAE,eAAe;QACtB,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,8BAA8B;KAC5C;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,EAAE,EAAE,OAAO;QACX,6CAA6C;QAC7C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EACT,sJAAsJ;KACzJ;IACD,GAAG,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,EAAE,EAAE,KAAK;QACT,6CAA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AC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAA;AAE9D,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,iCAAe;IAC5B,KAAK,EAAE,gCAAc;IACrB,GAAG,EAAE,wCAAsB;IAC3B,SAAS,EAAE,kCAA0B;IACrC,QAAQ,EAAE,IAAA,oCAAkB,EAAC,kCAA0B,CAAC;IACxD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,IAAA,oCAAkB,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IACrC,gBAAgB,EAAE,IAAA,oCAAkB,EAAC,iCAAe,CAAC;IACrD,WAAW,EAAE,IAAA,oCAAkB,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC3C,MAAM,EAAE,IAAA,oCAAkB,EAAC,UAAU,CAAC;CACW,CAAC,CAAA"}
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/calDotCom/actions/createBooking/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAOsC;AACtC,mCAAuC;AAE1B,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,KAAK,EAAE,eAAe;QACtB,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,8BAA8B;KAC5C;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,EAAE,EAAE,OAAO;QACX,6CAA6C;QAC7C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EACT,sJAAsJ;KACzJ;IACD,GAAG,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,EAAE,EAAE,KAAK;QACT,6CAA6C;QAC7C,IAAI,EAAE,2BAAS,CAAC,MA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,CACF,CAAA;AAED,MAAM,UAAU,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAA;AAE9D,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,iCAAe;IAC5B,KAAK,EAAE,gCAAc;IACrB,GAAG,EAAE,wCAAsB;IAC3B,SAAS,EAAE,iCAAyB;IACpC,QAAQ,EAAE,IAAA,oCAAkB,EAAC,kCAA0B,CAAC;IACxD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,IAAA,oCAAkB,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IACrC,gBAAgB,EAAE,IAAA,oCAAkB,EAAC,iCAAe,CAAC;IACrD,WAAW,EAAE,IAAA,oCAAkB,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC3C,MAAM,EAAE,IAAA,oCAAkB,EAAC,UAAU,CAAC;CACW,CAAC,CAAA"}
@@ -13,7 +13,7 @@ describe('Create booking', () => {
13
13
  start: calComApi_1.sampleBooking.startTime,
14
14
  end: calComApi_1.sampleBooking.endTime,
15
15
  responses: JSON.stringify(calComApi_1.sampleBooking.responses),
16
- metadata: undefined,
16
+ metadata: JSON.stringify({}),
17
17
  timeZone: calComApi_1.sampleBooking.timeZone,
18
18
  language: calComApi_1.sampleBooking.language,
19
19
  title: calComApi_1.sampleBooking.title,
@@ -1 +1 @@
1
- {"version":3,"file":"createBooking.test.js","sourceRoot":"","sources":["../../../../../extensions/calDotCom/actions/createBooking/createBooking.test.ts"],"names":[],"mappings":";;AAAA,mDAA+C;AAC/C,iDAA2D;AAC3D,yDAA0E;AAE1E,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,2BAAe,CAAC,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,EAAE,yBAAa,CAAC,QAAQ;YAChC,KAAK,EAAE,yBAAa,CAAC,KAAK;YAC1B,gBAAgB,EAAE,SAAS;YAC3B,WAAW,EAAE,SAAS;YACtB,MAAM,EAAE,yBAAa,CAAC,MAAM;SAC7B,CAAC,CAAA;QACF,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,SAAS,EAAE,MAAM,CAAC,yBAAa,CAAC,EAAE,CAAC;aACpC;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"createBooking.test.js","sourceRoot":"","sources":["../../../../../extensions/calDotCom/actions/createBooking/createBooking.test.ts"],"names":[],"mappings":";;AAAA,mDAA+C;AAC/C,iDAA2D;AAC3D,yDAA0E;AAE1E,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,2BAAe,CAAC,CAAC,CAAA;AAElE,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,MAAM,WAAW,GAAG,IAAA,2BAAmB,EAAC;QACtC,MAAM,EAAE;YACN,WAAW,EAAE,yBAAa,CAAC,WAAW;YACtC,KAAK,EAAE,yBAAa,CAAC,SAAS;YAC9B,GAAG,EAAE,yBAAa,CAAC,OAAO;YAC1B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,yBAAa,CAAC,SAAS,CAAC;YAClD,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5B,QAAQ,EAAE,yBAAa,CAAC,QAAQ;YAChC,QAAQ,EAAE,yBAAa,CAAC,QAAQ;YAChC,KAAK,EAAE,yBAAa,CAAC,KAAK;YAC1B,gBAAgB,EAAE,SAAS;YAC3B,WAAW,EAAE,SAAS;YACtB,MAAM,EAAE,yBAAa,CAAC,MAAM;SAC7B;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;SACjB;KACF,CAAC,CAAA;IAEF,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,6BAAa,CAAC,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;QAEvE,MAAM,CAAC,2BAAe,CAAC,aAAa,CAAC,CAAC,oBAAoB,CAAC;YACzD,WAAW,EAAE,yBAAa,CAAC,WAAW;YACtC,KAAK,EAAE,yBAAa,CAAC,SAAS;YAC9B,GAAG,EAAE,yBAAa,CAAC,OAAO;YAC1B,SAAS,EAAE,yBAAa,CAAC,SAAS;YAClC,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,yBAAa,CAAC,QAAQ;YAChC,QAAQ,EAAE,yBAAa,CAAC,QAAQ;YAChC,KAAK,EAAE,yBAAa,CAAC,KAAK;YAC1B,gBAAgB,EAAE,SAAS;YAC3B,WAAW,EAAE,SAAS;YACtB,MAAM,EAAE,yBAAa,CAAC,MAAM;SAC7B,CAAC,CAAA;QACF,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,SAAS,EAAE,MAAM,CAAC,yBAAa,CAAC,EAAE,CAAC;aACpC;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -80,7 +80,7 @@
80
80
  "changelog": "# Twilio changelog\n\n## v2 2023-06-23\n\nFull description: https://github.com/awell-health/awell-extensions/issues/157\n\n1. \"Send SMS\" action\n 1. Change label from \"Send SMS\" to \"Send SMS (with from number)\"\n 2. Throw error when \"From\" number in both settings and in fields is not provided\n2. Add new action \"Send SMS (with Messaging Service)\"\n\n## v2\n\nCompared to v1 (pre-beta release), the extension only has one custom action \"Send SMS\" instead of two. The Custom Action allows for:\n\n1. Sending a text message to a recipient (phone number) stored in a data point, including patient profile data points.\n2. Sending a text message to a fixed recipient (phone number).\n"
81
81
  },
82
82
  "wellinks": {
83
- "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",
84
- "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."
83
+ "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.",
84
+ "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."
85
85
  }
86
86
  }
@@ -0,0 +1,11 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields } from './config';
4
+ declare const dataPoints: {
5
+ userExists: {
6
+ key: string;
7
+ valueType: "boolean";
8
+ };
9
+ };
10
+ export declare const checkFlourishCustomer: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
11
+ export {};
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkFlourishCustomer = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const wellinksFlourishClient_1 = require("../../wellinksFlourishClient");
6
+ const config_1 = require("./config");
7
+ const zod_1 = require("zod");
8
+ const dataPoints = {
9
+ userExists: {
10
+ key: 'userExists',
11
+ valueType: 'boolean',
12
+ },
13
+ };
14
+ exports.checkFlourishCustomer = {
15
+ key: 'checkFlourishCustomer',
16
+ category: extensions_core_1.Category.WORKFLOW,
17
+ title: 'Check for Flourish Customer',
18
+ description: 'Checks Flourish for a customer with the given identifier.',
19
+ fields: config_1.fields,
20
+ dataPoints,
21
+ previewable: true,
22
+ onActivityCreated: async (payload, onComplete, onError) => {
23
+ // try {
24
+ const { fields: { identifier }, settings: { flourishApiKey, flourishApiUrl, flourishClientExtId }, } = (0, extensions_core_1.validate)({
25
+ schema: zod_1.z.object({
26
+ fields: config_1.FieldsValidationSchema,
27
+ settings: config_1.SettingsValidationSchema,
28
+ }),
29
+ payload,
30
+ });
31
+ const client = new wellinksFlourishClient_1.WellinksFlourishClient(flourishApiUrl, flourishApiKey, flourishClientExtId);
32
+ const result = await client.user.exists(identifier);
33
+ await onComplete({
34
+ data_points: {
35
+ userExists: result.toString(),
36
+ },
37
+ });
38
+ },
39
+ };
40
+ //# sourceMappingURL=checkFlourishCustomer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkFlourishCustomer.js","sourceRoot":"","sources":["../../../../../extensions/wellinks/actions/checkFlourishCustomer/checkFlourishCustomer.ts"],"names":[],"mappings":";;;AAAA,mEAKsC;AAEtC,yEAAqE;AACrE,qCAIiB;AACjB,6BAAuB;AAEvB,MAAM,UAAU,GAAG;IACjB,UAAU,EAAE;QACV,GAAG,EAAE,YAAY;QACjB,SAAS,EAAE,SAAS;KACrB;CAC4C,CAAA;AAElC,QAAA,qBAAqB,GAI9B;IACF,GAAG,EAAE,uBAAuB;IAC5B,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,2DAA2D;IACxE,MAAM,EAAN,eAAM;IACN,UAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,QAAQ;QACR,MAAM,EACJ,MAAM,EAAE,EAAE,UAAU,EAAE,EACtB,QAAQ,EAAE,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,GAClE,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;gBAC9B,QAAQ,EAAE,iCAAwB;aACnC,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,IAAI,+CAAsB,CACvC,cAAc,EACd,cAAc,EACd,mBAAmB,CACpB,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;QACnD,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC9B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tests_1 = require("../../../../src/tests");
4
+ const wellinksFlourishClient_1 = require("../../__mocks__/wellinksFlourishClient");
5
+ const settings_1 = require("../../__mocks__/settings");
6
+ const checkFlourishCustomer_1 = require("./checkFlourishCustomer");
7
+ const zod_1 = require("zod");
8
+ jest.mock('../../wellinksFlourishClient', () => ({ WellinksFlourishClient: wellinksFlourishClient_1.WellinksFlourishClient }));
9
+ describe('Check Flourish Customer', () => {
10
+ const onComplete = jest.fn();
11
+ const onError = jest.fn();
12
+ beforeEach(() => {
13
+ jest.clearAllMocks();
14
+ });
15
+ test('should call onComplete with a true DataPoint when there is a customer with the given identifier', async () => {
16
+ const validPayload = (0, tests_1.generateTestPayload)({
17
+ fields: {
18
+ identifier: 'identifier',
19
+ },
20
+ settings: settings_1.mockSettings,
21
+ });
22
+ wellinksFlourishClient_1.WellinksFlourishClientMockImplementation.user.exists.mockImplementationOnce(() => {
23
+ return true;
24
+ });
25
+ await checkFlourishCustomer_1.checkFlourishCustomer.onActivityCreated(validPayload, onComplete, onError);
26
+ expect(onError).not.toBeCalled();
27
+ expect(onComplete).toHaveBeenNthCalledWith(1, {
28
+ data_points: {
29
+ userExists: 'true',
30
+ },
31
+ });
32
+ });
33
+ test('should call onComplete with a false DataPoint when there is a customer with the given identifier', async () => {
34
+ const validPayload = (0, tests_1.generateTestPayload)({
35
+ fields: {
36
+ identifier: 'identifier',
37
+ },
38
+ settings: settings_1.mockSettings,
39
+ });
40
+ wellinksFlourishClient_1.WellinksFlourishClientMockImplementation.user.exists.mockImplementationOnce(() => {
41
+ return false;
42
+ });
43
+ await checkFlourishCustomer_1.checkFlourishCustomer.onActivityCreated(validPayload, onComplete, onError);
44
+ expect(onError).not.toBeCalled();
45
+ expect(onComplete).toHaveBeenNthCalledWith(1, {
46
+ data_points: {
47
+ userExists: 'false',
48
+ },
49
+ });
50
+ });
51
+ test('should call onError when the action is not given an identifier', async () => {
52
+ const validPayload = (0, tests_1.generateTestPayload)({
53
+ fields: {
54
+ identifier: undefined,
55
+ },
56
+ settings: settings_1.mockSettings,
57
+ });
58
+ wellinksFlourishClient_1.WellinksFlourishClientMockImplementation.user.exists.mockImplementationOnce(() => {
59
+ return true;
60
+ });
61
+ await expect(checkFlourishCustomer_1.checkFlourishCustomer.onActivityCreated(validPayload, onComplete, onError)).rejects.toThrow(zod_1.ZodError);
62
+ expect(onComplete).not.toBeCalled();
63
+ });
64
+ test('should call onError when the Flourish Settings are not set', async () => {
65
+ const validPayload = (0, tests_1.generateTestPayload)({
66
+ fields: {
67
+ identifier: 'identifier',
68
+ },
69
+ settings: {
70
+ ...settings_1.mockSettings,
71
+ flourishApiKey: undefined,
72
+ flourishApiUrl: undefined,
73
+ flourishClientExtId: undefined,
74
+ },
75
+ });
76
+ wellinksFlourishClient_1.WellinksFlourishClientMockImplementation.user.exists.mockImplementationOnce(() => {
77
+ return true;
78
+ });
79
+ await expect(checkFlourishCustomer_1.checkFlourishCustomer.onActivityCreated(validPayload, onComplete, onError)).rejects.toThrow(zod_1.ZodError);
80
+ expect(onComplete).not.toBeCalled();
81
+ });
82
+ });
83
+ //# sourceMappingURL=checkFlourishCustomer.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkFlourishCustomer.test.js","sourceRoot":"","sources":["../../../../../extensions/wellinks/actions/checkFlourishCustomer/checkFlourishCustomer.test.ts"],"names":[],"mappings":";;AAAA,iDAA2D;AAC3D,mFAG+C;AAC/C,uDAAuD;AACvD,mEAA+D;AAC/D,6BAA8B;AAE9B,IAAI,CAAC,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,sBAAsB,EAAtB,+CAAsB,EAAE,CAAC,CAAC,CAAA;AAE7E,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IACzB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,iGAAiG,EAAE,KAAK,IAAI,EAAE;QACjH,MAAM,YAAY,GAAG,IAAA,2BAAmB,EAAC;YACvC,MAAM,EAAE;gBACN,UAAU,EAAE,YAAY;aACzB;YACD,QAAQ,EAAE,uBAAY;SACvB,CAAC,CAAA;QACF,iEAAwC,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CACzE,GAAG,EAAE;YACH,OAAO,IAAI,CAAA;QACb,CAAC,CACF,CAAA;QACD,MAAM,6CAAqB,CAAC,iBAAiB,CAC3C,YAAY,EACZ,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;QAChC,MAAM,CAAC,UAAU,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAAE;YAC5C,WAAW,EAAE;gBACX,UAAU,EAAE,MAAM;aACnB;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,kGAAkG,EAAE,KAAK,IAAI,EAAE;QAClH,MAAM,YAAY,GAAG,IAAA,2BAAmB,E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cAAc,EAAE,SAAS;gBACzB,cAAc,EAAE,SAAS;gBACzB,mBAAmB,EAAE,SAAS;aAC/B;SACF,CAAC,CAAA;QACF,iEAAwC,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CACzE,GAAG,EAAE;YACH,OAAO,IAAI,CAAA;QACb,CAAC,CACF,CAAA;QACD,MAAM,MAAM,CACV,6CAAqB,CAAC,iBAAiB,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,CAC3E,CAAC,OAAO,CAAC,OAAO,CAAC,cAAQ,CAAC,CAAA;QAE3B,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IACrC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { FieldType } from '@awell-health/extensions-core';
3
+ export declare const fields: {
4
+ identifier: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ required: true;
10
+ };
11
+ };
12
+ export declare const FieldsValidationSchema: z.ZodObject<{
13
+ identifier: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ identifier: string;
16
+ }, {
17
+ identifier: string;
18
+ }>;
@@ -0,0 +1,18 @@
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
+ identifier: {
8
+ id: 'identifier',
9
+ label: 'Identifier',
10
+ description: 'The identifier of the user to check Flourish for.',
11
+ type: extensions_core_1.FieldType.STRING,
12
+ required: true,
13
+ },
14
+ };
15
+ exports.FieldsValidationSchema = zod_1.z.object({
16
+ identifier: zod_1.z.string(),
17
+ });
18
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/wellinks/actions/checkFlourishCustomer/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CAC2B,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { fields, FieldsValidationSchema } from './fields';
2
+ export { SettingsValidationSchema } from './settings';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsValidationSchema = 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, "SettingsValidationSchema", { enumerable: true, get: function () { return settings_1.SettingsValidationSchema; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/wellinks/actions/checkFlourishCustomer/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,uCAAqD;AAA5C,oHAAA,wBAAwB,OAAA"}
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ export declare const SettingsValidationSchema: z.ZodObject<{
3
+ platformApiKey: z.ZodOptional<z.ZodString>;
4
+ platformApiUrl: z.ZodOptional<z.ZodString>;
5
+ apiUrl: z.ZodOptional<z.ZodString>;
6
+ apiKey: z.ZodOptional<z.ZodString>;
7
+ selectEventTypeQuestion: z.ZodOptional<z.ZodString>;
8
+ startSendingRemindersQuestions: z.ZodOptional<z.ZodString>;
9
+ memberEventFormId: z.ZodOptional<z.ZodString>;
10
+ flourishApiKey: z.ZodString;
11
+ flourishApiUrl: z.ZodString;
12
+ flourishClientExtId: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ flourishApiUrl: string;
15
+ flourishApiKey: string;
16
+ flourishClientExtId: string;
17
+ platformApiKey?: string | undefined;
18
+ platformApiUrl?: string | undefined;
19
+ apiUrl?: string | undefined;
20
+ apiKey?: string | undefined;
21
+ selectEventTypeQuestion?: string | undefined;
22
+ startSendingRemindersQuestions?: string | undefined;
23
+ memberEventFormId?: string | undefined;
24
+ }, {
25
+ flourishApiUrl: string;
26
+ flourishApiKey: string;
27
+ flourishClientExtId: string;
28
+ platformApiKey?: string | undefined;
29
+ platformApiUrl?: string | undefined;
30
+ apiUrl?: string | undefined;
31
+ apiKey?: string | undefined;
32
+ selectEventTypeQuestion?: string | undefined;
33
+ startSendingRemindersQuestions?: string | undefined;
34
+ memberEventFormId?: string | undefined;
35
+ }>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsValidationSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SettingsValidationSchema = zod_1.z.object({
6
+ platformApiKey: zod_1.z.string().optional(),
7
+ platformApiUrl: zod_1.z.string().optional(),
8
+ apiUrl: zod_1.z.string().optional(),
9
+ apiKey: zod_1.z.string().optional(),
10
+ selectEventTypeQuestion: zod_1.z.string().optional(),
11
+ startSendingRemindersQuestions: zod_1.z.string().optional(),
12
+ memberEventFormId: zod_1.z.string().optional(),
13
+ flourishApiKey: zod_1.z.string(),
14
+ flourishApiUrl: zod_1.z.string(),
15
+ flourishClientExtId: zod_1.z.string(),
16
+ });
17
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../../../extensions/wellinks/actions/checkFlourishCustomer/config/settings.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AAE3B,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;IAC1B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE;CACoB,CAAC,CAAA"}
@@ -57,18 +57,25 @@ export declare const actions: {
57
57
  required: false;
58
58
  description: string;
59
59
  };
60
- sendgridApiUrl: {
60
+ flourishApiUrl: {
61
61
  key: string;
62
62
  label: string;
63
63
  obfuscated: false;
64
- required: true;
64
+ required: false;
65
65
  description: string;
66
66
  };
67
- sendgridApiKey: {
67
+ flourishApiKey: {
68
68
  key: string;
69
69
  label: string;
70
70
  obfuscated: true;
71
- required: true;
71
+ required: false;
72
+ description: string;
73
+ };
74
+ flourishClientExtId: {
75
+ key: string;
76
+ label: string;
77
+ obfuscated: false;
78
+ required: false;
72
79
  description: string;
73
80
  };
74
81
  }, "activeOverride" | "overrideDate", never>;
@@ -137,18 +144,25 @@ export declare const actions: {
137
144
  required: false;
138
145
  description: string;
139
146
  };
140
- sendgridApiUrl: {
147
+ flourishApiUrl: {
141
148
  key: string;
142
149
  label: string;
143
150
  obfuscated: false;
144
- required: true;
151
+ required: false;
145
152
  description: string;
146
153
  };
147
- sendgridApiKey: {
154
+ flourishApiKey: {
148
155
  key: string;
149
156
  label: string;
150
157
  obfuscated: true;
151
- required: true;
158
+ required: false;
159
+ description: string;
160
+ };
161
+ flourishClientExtId: {
162
+ key: string;
163
+ label: string;
164
+ obfuscated: false;
165
+ required: false;
152
166
  description: string;
153
167
  };
154
168
  }, "appointmentScheduled", never>;
@@ -224,18 +238,25 @@ export declare const actions: {
224
238
  required: false;
225
239
  description: string;
226
240
  };
227
- sendgridApiUrl: {
241
+ flourishApiUrl: {
228
242
  key: string;
229
243
  label: string;
230
244
  obfuscated: false;
231
- required: true;
245
+ required: false;
232
246
  description: string;
233
247
  };
234
- sendgridApiKey: {
248
+ flourishApiKey: {
235
249
  key: string;
236
250
  label: string;
237
251
  obfuscated: true;
238
- required: true;
252
+ required: false;
253
+ description: string;
254
+ };
255
+ flourishClientExtId: {
256
+ key: string;
257
+ label: string;
258
+ obfuscated: false;
259
+ required: false;
239
260
  description: string;
240
261
  };
241
262
  }, "messageSent", never>;
@@ -304,18 +325,25 @@ export declare const actions: {
304
325
  required: false;
305
326
  description: string;
306
327
  };
307
- sendgridApiUrl: {
328
+ flourishApiUrl: {
308
329
  key: string;
309
330
  label: string;
310
331
  obfuscated: false;
311
- required: true;
332
+ required: false;
312
333
  description: string;
313
334
  };
314
- sendgridApiKey: {
335
+ flourishApiKey: {
315
336
  key: string;
316
337
  label: string;
317
338
  obfuscated: true;
318
- required: true;
339
+ required: false;
340
+ description: string;
341
+ };
342
+ flourishClientExtId: {
343
+ key: string;
344
+ label: string;
345
+ obfuscated: false;
346
+ required: false;
319
347
  description: string;
320
348
  };
321
349
  }, "activeOverride", never>;
@@ -419,19 +447,106 @@ export declare const actions: {
419
447
  required: false;
420
448
  description: string;
421
449
  };
422
- sendgridApiUrl: {
450
+ flourishApiUrl: {
451
+ key: string;
452
+ label: string;
453
+ obfuscated: false;
454
+ required: false;
455
+ description: string;
456
+ };
457
+ flourishApiKey: {
458
+ key: string;
459
+ label: string;
460
+ obfuscated: true;
461
+ required: false;
462
+ description: string;
463
+ };
464
+ flourishClientExtId: {
465
+ key: string;
466
+ label: string;
467
+ obfuscated: false;
468
+ required: false;
469
+ description: string;
470
+ };
471
+ }, "insertSuccessful", never>;
472
+ checkFlourishCustomer: import("@awell-health/extensions-core").Action<{
473
+ identifier: {
474
+ id: string;
475
+ label: string;
476
+ description: string;
477
+ type: import("@awell-health/extensions-core").FieldType.STRING;
478
+ required: true;
479
+ };
480
+ }, {
481
+ platformApiUrl: {
482
+ key: string;
483
+ label: string;
484
+ obfuscated: false;
485
+ required: false;
486
+ description: string;
487
+ };
488
+ platformApiKey: {
489
+ key: string;
490
+ label: string;
491
+ obfuscated: true;
492
+ required: false;
493
+ description: string;
494
+ };
495
+ apiUrl: {
423
496
  key: string;
424
497
  label: string;
425
498
  obfuscated: false;
426
499
  required: true;
427
500
  description: string;
428
501
  };
429
- sendgridApiKey: {
502
+ apiKey: {
430
503
  key: string;
431
504
  label: string;
432
505
  obfuscated: true;
433
506
  required: true;
434
507
  description: string;
435
508
  };
436
- }, "insertSuccessful", never>;
509
+ selectEventTypeQuestion: {
510
+ key: string;
511
+ label: string;
512
+ obfuscated: false;
513
+ required: false;
514
+ description: string;
515
+ };
516
+ startSendingRemindersQuestions: {
517
+ key: string;
518
+ label: string;
519
+ obfuscated: false;
520
+ required: false;
521
+ description: string;
522
+ };
523
+ memberEventFormId: {
524
+ key: string;
525
+ label: string;
526
+ obfuscated: false;
527
+ required: false;
528
+ description: string;
529
+ };
530
+ flourishApiUrl: {
531
+ key: string;
532
+ label: string;
533
+ obfuscated: false;
534
+ required: false;
535
+ description: string;
536
+ };
537
+ flourishApiKey: {
538
+ key: string;
539
+ label: string;
540
+ obfuscated: true;
541
+ required: false;
542
+ description: string;
543
+ };
544
+ flourishClientExtId: {
545
+ key: string;
546
+ label: string;
547
+ obfuscated: false;
548
+ required: false;
549
+ description: string;
550
+ };
551
+ }, "userExists", never>;
437
552
  };
@@ -6,11 +6,13 @@ const checkForScheduledAppointment_1 = require("./checkForScheduledAppointment/c
6
6
  const checkForChat_1 = require("./checkForChat/checkForChat");
7
7
  const checkForCheckInOverride_1 = require("./checkForCheckInOverride/checkForCheckInOverride");
8
8
  const insertMemberListEvent_1 = require("./insertMemberListEvent/insertMemberListEvent");
9
+ const checkFlourishCustomer_1 = require("./checkFlourishCustomer/checkFlourishCustomer");
9
10
  exports.actions = {
10
11
  checkForOverride: checkForOverride_1.checkForOverride,
11
12
  checkForScheduledAppointment: checkForScheduledAppointment_1.checkForScheduledAppointment,
12
13
  checkForChat: checkForChat_1.checkForChat,
13
14
  checkForCheckInOverride: checkForCheckInOverride_1.checkForCheckInOverride,
14
15
  insertMemberListEvent: insertMemberListEvent_1.insertMemberListEvent,
16
+ checkFlourishCustomer: checkFlourishCustomer_1.checkFlourishCustomer,
15
17
  };
16
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/wellinks/actions/index.ts"],"names":[],"mappings":";;;AAAA,0EAAsE;AACtE,8GAA0G;AAC1G,8DAA0D;AAC1D,+FAA2F;AAC3F,yFAAqF;AAExE,QAAA,OAAO,GAAG;IACrB,gBAAgB,EAAhB,mCAAgB;IAChB,4BAA4B,EAA5B,2DAA4B;IAC5B,YAAY,EAAZ,2BAAY;IACZ,uBAAuB,EAAvB,iDAAuB;IACvB,qBAAqB,EAArB,6CAAqB;CACtB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/wellinks/actions/index.ts"],"names":[],"mappings":";;;AAAA,0EAAsE;AACtE,8GAA0G;AAC1G,8DAA0D;AAC1D,+FAA2F;AAC3F,yFAAqF;AACrF,yFAAqF;AACxE,QAAA,OAAO,GAAG;IACrB,gBAAgB,EAAhB,mCAAgB;IAChB,4BAA4B,EAA5B,2DAA4B;IAC5B,YAAY,EAAZ,2BAAY;IACZ,uBAAuB,EAAvB,iDAAuB;IACvB,qBAAqB,EAArB,6CAAqB;IACrB,qBAAqB,EAArB,6CAAqB;CACtB,CAAA"}
@@ -48,18 +48,25 @@ export declare const settings: {
48
48
  required: false;
49
49
  description: string;
50
50
  };
51
- sendgridApiUrl: {
51
+ flourishApiUrl: {
52
52
  key: string;
53
53
  label: string;
54
54
  obfuscated: false;
55
- required: true;
55
+ required: false;
56
56
  description: string;
57
57
  };
58
- sendgridApiKey: {
58
+ flourishApiKey: {
59
59
  key: string;
60
60
  label: string;
61
61
  obfuscated: true;
62
- required: true;
62
+ required: false;
63
+ description: string;
64
+ };
65
+ flourishClientExtId: {
66
+ key: string;
67
+ label: string;
68
+ obfuscated: false;
69
+ required: false;
63
70
  description: string;
64
71
  };
65
72
  };
@@ -51,19 +51,26 @@ exports.settings = {
51
51
  required: false,
52
52
  description: 'The form ID of the Healthie Member Event Form',
53
53
  },
54
- sendgridApiUrl: {
55
- key: 'sendgridApiUrl',
56
- label: 'Sendgrid API url',
54
+ flourishApiUrl: {
55
+ key: 'flourishApiUrl',
56
+ label: 'Flourish API url',
57
57
  obfuscated: false,
58
- required: true,
59
- description: 'The environment specific Sendgrid API url.',
58
+ required: false,
59
+ description: 'The environment specific Flourish API url.',
60
60
  },
61
- sendgridApiKey: {
62
- key: 'sendgridApiKey',
63
- label: 'Sendgrid API key',
61
+ flourishApiKey: {
62
+ key: 'flourishApiKey',
63
+ label: 'Flourish API key',
64
64
  obfuscated: true,
65
- required: true,
66
- description: 'Your Sendgrid API key.',
65
+ required: false,
66
+ description: 'Your Flourish API key.',
67
+ },
68
+ flourishClientExtId: {
69
+ key: 'flourishClientExtId',
70
+ label: 'Flourish Client Ext ID',
71
+ obfuscated: false,
72
+ required: false,
73
+ description: 'Your Flourish Client Ext ID.',
67
74
  },
68
75
  };
69
76
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/wellinks/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,IAAI;QACd,WAAW,EAAE,4CAA4C;KAC1D;IACD,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,wBAAwB;KACtC;CACgC,CAAA"}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/wellinks/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"}
@@ -0,0 +1,9 @@
1
+ export declare class WellinksFlourishClient {
2
+ private readonly _apiUrl;
3
+ private readonly _apiKey;
4
+ private readonly _clientextid;
5
+ constructor(apiUrl: string, apiKey: string, clientextid: string);
6
+ readonly user: {
7
+ exists: (identifier: string) => Promise<boolean>;
8
+ };
9
+ }
@@ -0,0 +1,79 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WellinksFlourishClient = void 0;
30
+ const node_fetch_1 = __importDefault(require("node-fetch"));
31
+ const xml2js = __importStar(require("xml2js"));
32
+ const lodash_1 = require("lodash");
33
+ class WellinksFlourishClient {
34
+ constructor(apiUrl, apiKey, clientextid) {
35
+ this.user = {
36
+ exists: async (identifier) => {
37
+ try {
38
+ const response = await (0, node_fetch_1.default)(`${this._apiUrl}/checkifuserexists`, {
39
+ method: 'POST',
40
+ body: buildCheckIfUserExistsRequest(identifier, this._clientextid, this._apiKey),
41
+ headers: {
42
+ contentType: 'text/xml',
43
+ accept: 'application/xml',
44
+ },
45
+ });
46
+ xml2js.parseString(response.body, (err, result) => {
47
+ if (!(0, lodash_1.isNil)(err)) {
48
+ throw err;
49
+ }
50
+ else {
51
+ return result.statusMessage[0] === 'Success';
52
+ }
53
+ });
54
+ return false;
55
+ }
56
+ catch (_a) {
57
+ return false;
58
+ }
59
+ },
60
+ };
61
+ this._apiKey = apiKey;
62
+ this._apiUrl = apiUrl;
63
+ this._clientextid = clientextid;
64
+ }
65
+ }
66
+ exports.WellinksFlourishClient = WellinksFlourishClient;
67
+ function buildCheckIfUserExistsRequest(identifier, clientextid, apiKey) {
68
+ return `
69
+ <?xml version="1.0" encoding="utf-8" ?>
70
+ <request>
71
+ <user>
72
+ <clientextid>${clientextid}</clientextid>
73
+ <clientpasskey>${apiKey}</clientpasskey>
74
+ <thirdpartyidentifier>${identifier}</thirdpartyidentifier>
75
+ </user>
76
+ </request>
77
+ `;
78
+ }
79
+ //# sourceMappingURL=wellinksFlourishClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wellinksFlourishClient.js","sourceRoot":"","sources":["../../../extensions/wellinks/wellinksFlourishClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA8B;AAC9B,+CAAgC;AAChC,mCAA8B;AAC9B,MAAa,sBAAsB;IAKjC,YAAY,MAAc,EAAE,MAAc,EAAE,WAAmB;QAMtD,SAAI,GAAG;YACd,MAAM,EAAE,KAAK,EAAE,UAAkB,EAAoB,EAAE;gBACrD,IAAI;oBACF,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAK,EAAC,GAAG,IAAI,CAAC,OAAO,oBAAoB,EAAE;wBAChE,MAAM,EAAE,MAAM;wBACd,IAAI,EAAE,6BAA6B,CACjC,UAAU,EACV,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,CACb;wBACD,OAAO,EAAE;4BACP,WAAW,EAAE,UAAU;4BACvB,MAAM,EAAE,iBAAiB;yBAC1B;qBACF,CAAC,CAAA;oBACF,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;wBAChD,IAAI,CAAC,IAAA,cAAK,EAAC,GAAG,CAAC,EAAE;4BACf,MAAM,GAAG,CAAA;yBACV;6BAAM;4BACL,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,SAAS,CAAA;yBAC7C;oBACH,CAAC,CAAC,CAAA;oBACF,OAAO,KAAK,CAAA;iBACb;gBAAC,WAAM;oBACN,OAAO,KAAK,CAAA;iBACb;YACH,CAAC;SACF,CAAA;QAhCC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;IACjC,CAAC;CA8BF;AAvCD,wDAuCC;AAED,SAAS,6BAA6B,CACpC,UAAkB,EAClB,WAAmB,EACnB,MAAc;IAEd,OAAO;;;;yBAIgB,WAAW;2BACT,MAAM;kCACC,UAAU;;;GAGzC,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.98",
3
+ "version": "1.0.100",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -43,6 +43,7 @@
43
43
  "@types/node": "^18.13.0",
44
44
  "@types/node-fetch": "^2.6.2",
45
45
  "@types/showdown": "^2.0.0",
46
+ "@types/xml2js": "^0.4.12",
46
47
  "@typescript-eslint/eslint-plugin": "^5.52.0",
47
48
  "eslint": "^8.34.0",
48
49
  "eslint-config-prettier": "^8.6.0",
@@ -57,7 +58,8 @@
57
58
  "rimraf": "^4.1.2",
58
59
  "ts-jest": "^29.0.5",
59
60
  "ts-node-dev": "^2.0.0",
60
- "typescript": "4.9.5"
61
+ "typescript": "4.9.5",
62
+ "xml2js": "^0.6.2"
61
63
  },
62
64
  "dependencies": {
63
65
  "@awell-health/extensions-core": "0.1.21",