@awell-health/awell-extensions 1.0.115 → 1.0.117

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 (51) hide show
  1. package/dist/extensions/docuSign/settings.d.ts +2 -2
  2. package/dist/extensions/healthie/actions/createMetricEntry/config/fields.d.ts +38 -0
  3. package/dist/extensions/healthie/actions/createMetricEntry/config/fields.js +34 -0
  4. package/dist/extensions/healthie/actions/createMetricEntry/config/fields.js.map +1 -0
  5. package/dist/extensions/healthie/actions/createMetricEntry/config/index.d.ts +1 -0
  6. package/dist/extensions/healthie/actions/createMetricEntry/config/index.js +7 -0
  7. package/dist/extensions/healthie/actions/createMetricEntry/config/index.js.map +1 -0
  8. package/dist/extensions/healthie/actions/createMetricEntry/createMetricEntry.d.ts +4 -0
  9. package/dist/extensions/healthie/actions/createMetricEntry/createMetricEntry.js +81 -0
  10. package/dist/extensions/healthie/actions/createMetricEntry/createMetricEntry.js.map +1 -0
  11. package/dist/extensions/healthie/actions/createMetricEntry/createMetricEntry.test.d.ts +1 -0
  12. package/dist/extensions/healthie/actions/createMetricEntry/createMetricEntry.test.js +35 -0
  13. package/dist/extensions/healthie/actions/createMetricEntry/createMetricEntry.test.js.map +1 -0
  14. package/dist/extensions/healthie/actions/createMetricEntry/index.d.ts +1 -0
  15. package/dist/extensions/healthie/actions/createMetricEntry/index.js +6 -0
  16. package/dist/extensions/healthie/actions/createMetricEntry/index.js.map +1 -0
  17. package/dist/extensions/healthie/actions/index.d.ts +43 -9
  18. package/dist/extensions/healthie/actions/index.js +2 -0
  19. package/dist/extensions/healthie/actions/index.js.map +1 -1
  20. package/dist/extensions/healthie/gql/sdk.d.ts +5564 -1707
  21. package/dist/extensions/healthie/gql/sdk.js +26 -1
  22. package/dist/extensions/healthie/gql/sdk.js.map +1 -1
  23. package/dist/extensions/healthie/settings.d.ts +11 -0
  24. package/dist/extensions/healthie/settings.js +10 -1
  25. package/dist/extensions/healthie/settings.js.map +1 -1
  26. package/dist/extensions/iterable/v1/actions/index.d.ts +1 -0
  27. package/dist/extensions/iterable/v1/actions/index.js +3 -1
  28. package/dist/extensions/iterable/v1/actions/index.js.map +1 -1
  29. package/dist/extensions/iterable/v1/actions/sendEmail/sendEmail.test.js +1 -1
  30. package/dist/extensions/iterable/v1/actions/sendEmail/sendEmail.test.js.map +1 -1
  31. package/dist/extensions/iterable/v1/actions/trackEvent/config/fields.d.ts +58 -0
  32. package/dist/extensions/iterable/v1/actions/trackEvent/config/fields.js +61 -0
  33. package/dist/extensions/iterable/v1/actions/trackEvent/config/fields.js.map +1 -0
  34. package/dist/extensions/iterable/v1/actions/trackEvent/config/index.d.ts +1 -0
  35. package/dist/extensions/iterable/v1/actions/trackEvent/config/index.js +7 -0
  36. package/dist/extensions/iterable/v1/actions/trackEvent/config/index.js.map +1 -0
  37. package/dist/extensions/iterable/v1/actions/trackEvent/index.d.ts +1 -0
  38. package/dist/extensions/iterable/v1/actions/trackEvent/index.js +6 -0
  39. package/dist/extensions/iterable/v1/actions/trackEvent/index.js.map +1 -0
  40. package/dist/extensions/iterable/v1/actions/trackEvent/trackEvent.d.ts +4 -0
  41. package/dist/extensions/iterable/v1/actions/trackEvent/trackEvent.js +36 -0
  42. package/dist/extensions/iterable/v1/actions/trackEvent/trackEvent.js.map +1 -0
  43. package/dist/extensions/iterable/v1/actions/trackEvent/trackEvent.test.d.ts +1 -0
  44. package/dist/extensions/iterable/v1/actions/trackEvent/trackEvent.test.js +29 -0
  45. package/dist/extensions/iterable/v1/actions/trackEvent/trackEvent.test.js.map +1 -0
  46. package/dist/extensions/iterable/v1/client/client.d.ts +9 -1
  47. package/dist/extensions/iterable/v1/client/client.js +14 -0
  48. package/dist/extensions/iterable/v1/client/client.js.map +1 -1
  49. package/dist/extensions/iterable/v1/client/types.d.ts +11 -0
  50. package/dist/extensions/markdown.json +3 -3
  51. package/package.json +1 -1
@@ -3,9 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getSdk = exports.UpdateTaskDocument = exports.UpdatePatientDocument = exports.UpdateConversationDocument = exports.UpdateAppointmentDocument = exports.SendChatMessageDocument = exports.RemoveTagFromUserDocument = exports.GetUserDocument = exports.GetFormTemplateDocument = exports.GetConversationListDocument = exports.GetAppointmentDocument = exports.DeleteTaskDocument = exports.DeleteAppointmentDocument = exports.CreateTaskDocument = exports.CreatePatientDocument = exports.CreateLocationDocument = exports.CreateJournalEntryDocument = exports.CreateFormCompletionRequestDocument = exports.CreateFormAnswerGroupDocument = exports.CreateConversationDocument = exports.CreateAppointmentDocument = exports.ApplyTagsToUserDocument = void 0;
6
+ exports.getSdk = exports.UpdateTaskDocument = exports.UpdatePatientDocument = exports.UpdateConversationDocument = exports.UpdateAppointmentDocument = exports.SendChatMessageDocument = exports.RemoveTagFromUserDocument = exports.GetUserDocument = exports.GetFormTemplateDocument = exports.GetConversationListDocument = exports.GetAppointmentDocument = exports.DeleteTaskDocument = exports.DeleteAppointmentDocument = exports.CreateTaskDocument = exports.CreatePatientDocument = exports.CreateLocationDocument = exports.CreateJournalEntryDocument = exports.CreateFormCompletionRequestDocument = exports.CreateFormAnswerGroupDocument = exports.CreateEntryDocument = exports.CreateConversationDocument = exports.CreateAppointmentDocument = exports.ApplyTagsToUserDocument = exports.IndividualClientNoteSorting = void 0;
7
7
  const graphql_1 = require("graphql");
8
8
  const graphql_tag_1 = __importDefault(require("graphql-tag"));
9
+ /** Individual client note sorting enum */
10
+ var IndividualClientNoteSorting;
11
+ (function (IndividualClientNoteSorting) {
12
+ IndividualClientNoteSorting["AttendedDesc"] = "ATTENDED_DESC";
13
+ IndividualClientNoteSorting["CreatedAtDesc"] = "CREATED_AT_DESC";
14
+ })(IndividualClientNoteSorting = exports.IndividualClientNoteSorting || (exports.IndividualClientNoteSorting = {}));
9
15
  exports.ApplyTagsToUserDocument = (0, graphql_tag_1.default) `
10
16
  mutation applyTagsToUser($ids: [ID], $taggable_user_id: ID) {
11
17
  bulkApply(input: {ids: $ids, taggable_user_id: $taggable_user_id}) {
@@ -50,6 +56,21 @@ exports.CreateConversationDocument = (0, graphql_tag_1.default) `
50
56
  }
51
57
  }
52
58
  `;
59
+ exports.CreateEntryDocument = (0, graphql_tag_1.default) `
60
+ mutation createEntry($metric_stat: String, $category: String, $type: String, $user_id: String, $created_at: String) {
61
+ createEntry(
62
+ input: {category: $category, type: $type, metric_stat: $metric_stat, user_id: $user_id, created_at: $created_at}
63
+ ) {
64
+ entry {
65
+ id
66
+ }
67
+ messages {
68
+ field
69
+ message
70
+ }
71
+ }
72
+ }
73
+ `;
53
74
  exports.CreateFormAnswerGroupDocument = (0, graphql_tag_1.default) `
54
75
  mutation createFormAnswerGroup($input: createFormAnswerGroupInput!) {
55
76
  createFormAnswerGroup(input: $input) {
@@ -349,6 +370,7 @@ const defaultWrapper = (action, _operationName, _operationType) => action();
349
370
  const ApplyTagsToUserDocumentString = (0, graphql_1.print)(exports.ApplyTagsToUserDocument);
350
371
  const CreateAppointmentDocumentString = (0, graphql_1.print)(exports.CreateAppointmentDocument);
351
372
  const CreateConversationDocumentString = (0, graphql_1.print)(exports.CreateConversationDocument);
373
+ const CreateEntryDocumentString = (0, graphql_1.print)(exports.CreateEntryDocument);
352
374
  const CreateFormAnswerGroupDocumentString = (0, graphql_1.print)(exports.CreateFormAnswerGroupDocument);
353
375
  const CreateFormCompletionRequestDocumentString = (0, graphql_1.print)(exports.CreateFormCompletionRequestDocument);
354
376
  const CreateJournalEntryDocumentString = (0, graphql_1.print)(exports.CreateJournalEntryDocument);
@@ -378,6 +400,9 @@ function getSdk(client, withWrapper = defaultWrapper) {
378
400
  createConversation(variables, requestHeaders) {
379
401
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(CreateConversationDocumentString, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'createConversation', 'mutation');
380
402
  },
403
+ createEntry(variables, requestHeaders) {
404
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(CreateEntryDocumentString, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'createEntry', 'mutation');
405
+ },
381
406
  createFormAnswerGroup(variables, requestHeaders) {
382
407
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(CreateFormAnswerGroupDocumentString, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'createFormAnswerGroup', 'mutation');
383
408
  },
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../../extensions/healthie/gql/sdk.ts"],"names":[],"mappings":";;;;;;AAEA,qCAA+B;AAC/B,8DAA8B;AAu9oBjB,QAAA,uBAAuB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;KAarC,CAAC;AACO,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;KAcvC,CAAC;AACO,QAAA,0BAA0B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;KAcxC,CAAC;AACO,QAAA,6BAA6B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;KAY3C,CAAC;AACO,QAAA,mCAAmC,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;KAYjD,CAAC;AACO,QAAA,0BAA0B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;KAYxC,CAAC;AACO,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;KAepC,CAAC;AACO,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;KAYnC,CAAC;AACO,QAAA,kBAAkB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;KAchC,CAAC;AACO,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;KAYvC,CAAC;AACO,QAAA,kBAAkB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;KAYhC,CAAC;AACO,QAAA,sBAAsB,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AC,CAAC;QAC/N,CAAC;QACD,aAAa,CAAC,SAAyC,EAAE,cAA2C;YAChG,OAAO,WAAW,CAAC,CAAC,qBAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAwB,2BAA2B,EAAE,SAAS,EAAE,EAAC,GAAG,cAAc,EAAE,GAAG,qBAAqB,EAAC,CAAC,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;QAChN,CAAC;QACD,UAAU,CAAC,SAAsC,EAAE,cAA2C;YAC1F,OAAO,WAAW,CAAC,CAAC,qBAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAqB,wBAAwB,EAAE,SAAS,EAAE,EAAC,GAAG,cAAc,EAAE,GAAG,qBAAqB,EAAC,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;QACvM,CAAC;KACF,CAAC;AACJ,CAAC;AArED,wBAqEC"}
@@ -1,3 +1,4 @@
1
+ import { z } from 'zod';
1
2
  export declare const settings: {
2
3
  apiUrl: {
3
4
  key: string;
@@ -14,3 +15,13 @@ export declare const settings: {
14
15
  description: string;
15
16
  };
16
17
  };
18
+ export declare const settingsValidationSchema: z.ZodObject<{
19
+ apiUrl: z.ZodString;
20
+ apiKey: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ apiUrl: string;
23
+ apiKey: string;
24
+ }, {
25
+ apiUrl: string;
26
+ apiKey: string;
27
+ }>;
@@ -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
  apiUrl: {
6
7
  key: 'apiUrl',
@@ -17,4 +18,12 @@ exports.settings = {
17
18
  description: 'Your Healthie API key.',
18
19
  },
19
20
  };
21
+ exports.settingsValidationSchema = zod_1.z.object({
22
+ apiUrl: zod_1.z.string().nonempty({
23
+ message: 'Missing "API URL in the extension settings."',
24
+ }),
25
+ apiKey: zod_1.z.string().nonempty({
26
+ message: 'Missing "API key in the extension settings."',
27
+ }),
28
+ });
20
29
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/healthie/settings.ts"],"names":[],"mappings":";;;AAEa,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,mCAAmC;KACjD;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,wBAAwB;KACtC;CACgC,CAAA"}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/healthie/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,mCAAmC;KACjD;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,wBAAwB;KACtC;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;QAC1B,OAAO,EAAE,8CAA8C;KACxD,CAAC;IACF,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;QAC1B,OAAO,EAAE,8CAA8C;KACxD,CAAC;CACiD,CAAC,CAAA"}
@@ -1 +1,2 @@
1
1
  export { sendEmail } from './sendEmail';
2
+ export { trackEvent } from './trackEvent';
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendEmail = void 0;
3
+ exports.trackEvent = exports.sendEmail = void 0;
4
4
  var sendEmail_1 = require("./sendEmail");
5
5
  Object.defineProperty(exports, "sendEmail", { enumerable: true, get: function () { return sendEmail_1.sendEmail; } });
6
+ var trackEvent_1 = require("./trackEvent");
7
+ Object.defineProperty(exports, "trackEvent", { enumerable: true, get: function () { return trackEvent_1.trackEvent; } });
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/iterable/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,yCAAuC;AAA9B,sGAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/iterable/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,yCAAuC;AAA9B,sGAAA,SAAS,OAAA;AAClB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -4,7 +4,7 @@ const __mocks__1 = require("../../client/__mocks__");
4
4
  const __1 = require("..");
5
5
  const tests_1 = require("../../../../../src/tests");
6
6
  jest.mock('../../client');
7
- describe('Send email', () => {
7
+ describe('Iterable - Send email', () => {
8
8
  const onComplete = jest.fn();
9
9
  const onError = jest.fn();
10
10
  const basePayload = (0, tests_1.generateTestPayload)({
@@ -1 +1 @@
1
- {"version":3,"file":"sendEmail.test.js","sourceRoot":"","sources":["../../../../../../extensions/iterable/v1/actions/sendEmail/sendEmail.test.ts"],"names":[],"mappings":";;AAAA,qDAG+B;AAC/B,0BAA8B;AAC9B,oDAA8D;AAE9D,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AAEzB,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAA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,EAAE,GAAG,EAAE;IACrC,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,UAAU,EAAE,8BAAmB,CAAC,UAAU;YAC1C,cAAc,EAAE,8BAAmB,CAAC,cAAc;YAClD,eAAe,EAAE,8BAAmB,CAAC,eAAe;YACpD,yBAAyB,EAAE,8BAAmB,CAAC,yBAAyB;YACxE,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,8BAAmB,CAAC,UAAU,CAAC;YAC1D,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,8BAAmB,CAAC,QAAQ,CAAC;SACvD;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,aAAS,CAAC,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;QAEnE,MAAM,CACJ,2CAAgC,CAAC,QAAQ,CAAC,SAAS,CACpD,CAAC,oBAAoB,CAAC;YACrB,GAAG,8BAAmB;SACvB,CAAC,CAAA;QACF,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAA;QACrC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod';
2
+ import { FieldType } from '@awell-health/extensions-core';
3
+ export declare const fields: {
4
+ email: {
5
+ id: string;
6
+ label: string;
7
+ type: FieldType.STRING;
8
+ required: false;
9
+ description: string;
10
+ };
11
+ userId: {
12
+ id: string;
13
+ label: string;
14
+ type: FieldType.STRING;
15
+ required: false;
16
+ description: string;
17
+ };
18
+ eventName: {
19
+ id: string;
20
+ label: string;
21
+ type: FieldType.STRING;
22
+ required: true;
23
+ description: string;
24
+ };
25
+ dataFields: {
26
+ label: string;
27
+ id: string;
28
+ type: FieldType.JSON;
29
+ required: false;
30
+ description: string;
31
+ };
32
+ };
33
+ export declare const FieldsValidationSchema: z.ZodEffects<z.ZodObject<{
34
+ email: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
35
+ userId: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
36
+ eventName: z.ZodString;
37
+ dataFields: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodString, Record<string, any>, string>>, z.ZodEffects<z.ZodLiteral<"">, undefined, "">]>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ eventName: string;
40
+ email?: string | undefined;
41
+ userId?: string | undefined;
42
+ dataFields?: Record<string, any> | undefined;
43
+ }, {
44
+ eventName: string;
45
+ email?: string | undefined;
46
+ userId?: string | undefined;
47
+ dataFields?: string | undefined;
48
+ }>, {
49
+ eventName: string;
50
+ email?: string | undefined;
51
+ userId?: string | undefined;
52
+ dataFields?: Record<string, any> | undefined;
53
+ }, {
54
+ eventName: string;
55
+ email?: string | undefined;
56
+ userId?: string | undefined;
57
+ dataFields?: string | undefined;
58
+ }>;
@@ -0,0 +1,61 @@
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
+ const lodash_1 = require("lodash");
7
+ const validation_1 = require("../../../validation");
8
+ exports.fields = {
9
+ email: {
10
+ id: 'email',
11
+ label: 'Email',
12
+ type: extensions_core_1.FieldType.STRING,
13
+ required: false,
14
+ description: 'An email address that identifies a user profile in Iterable. Provide a recipient email or a recipient user ID, but not both, depending on how your project identifies users.',
15
+ },
16
+ userId: {
17
+ id: 'userId',
18
+ label: 'User ID',
19
+ type: extensions_core_1.FieldType.STRING,
20
+ required: false,
21
+ description: 'A user ID that identifies a user profile in Iterable. Provide a recipient email or a recipient user ID, but not both, depending on how your project identifies users.',
22
+ },
23
+ eventName: {
24
+ id: 'eventName',
25
+ label: 'Event name',
26
+ type: extensions_core_1.FieldType.STRING,
27
+ required: true,
28
+ description: '',
29
+ },
30
+ dataFields: {
31
+ label: 'Data fields',
32
+ id: 'dataFields',
33
+ type: extensions_core_1.FieldType.JSON,
34
+ required: false,
35
+ description: 'Additional data associated with event',
36
+ },
37
+ };
38
+ exports.FieldsValidationSchema = zod_1.z
39
+ .object({
40
+ email: (0, extensions_core_1.makeStringOptional)(zod_1.z.string().email()),
41
+ userId: (0, extensions_core_1.makeStringOptional)(zod_1.z.string()),
42
+ eventName: zod_1.z.string(),
43
+ dataFields: (0, extensions_core_1.makeStringOptional)(validation_1.StringTransformToJson),
44
+ })
45
+ .superRefine((value, context) => {
46
+ if ((0, lodash_1.isEmpty)(value.email) && (0, lodash_1.isEmpty)(value.userId)) {
47
+ context.addIssue({
48
+ code: zod_1.z.ZodIssueCode.custom,
49
+ fatal: true,
50
+ message: 'Both "email" and "user ID" are empty. Please provide one of them.',
51
+ });
52
+ }
53
+ if (!(0, lodash_1.isEmpty)(value.email) && !(0, lodash_1.isEmpty)(value.userId)) {
54
+ context.addIssue({
55
+ code: zod_1.z.ZodIssueCode.custom,
56
+ fatal: true,
57
+ message: 'Both "email" and "user ID" are provided. Please provide only one of them.',
58
+ });
59
+ }
60
+ });
61
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/iterable/v1/actions/trackEvent/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAIsC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C,YAAY,CAAC,MAAM;YAC3B,KAAK,EAAE,IAAI;YACX,OAAO,EACL,mEAAmE;SACtE,CAAC,CAAA;KACH;IAED,IAAI,CAAC,IAAA,gBAAO,EAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAA,gBAAO,EAAC,KAAK,CAAC,MAAM,CAAC,EAAE;QACnD,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,KAAK,EAAE,IAAI;YACX,OAAO,EACL,2EAA2E;SAC9E,CAAC,CAAA;KACH;AACH,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { FieldsValidationSchema, fields } from './fields';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fields = exports.FieldsValidationSchema = void 0;
4
+ var fields_1 = require("./fields");
5
+ Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
6
+ Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/iterable/v1/actions/trackEvent/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gHAAA,sBAAsB,OAAA;AAAE,gGAAA,MAAM,OAAA"}
@@ -0,0 +1 @@
1
+ export { trackEvent } from './trackEvent';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.trackEvent = void 0;
4
+ var trackEvent_1 = require("./trackEvent");
5
+ Object.defineProperty(exports, "trackEvent", { enumerable: true, get: function () { return trackEvent_1.trackEvent; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/iterable/v1/actions/trackEvent/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../../settings';
3
+ import { fields } from './config';
4
+ export declare const trackEvent: Action<typeof fields, typeof settings>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.trackEvent = void 0;
4
+ const zod_1 = require("zod");
5
+ const extensions_core_1 = require("@awell-health/extensions-core");
6
+ const settings_1 = require("../../../settings");
7
+ const config_1 = require("./config");
8
+ const client_1 = require("../../client");
9
+ exports.trackEvent = {
10
+ key: 'trackEvent',
11
+ title: 'Track event',
12
+ description: 'Track an event in Iterable',
13
+ category: extensions_core_1.Category.COMMUNICATION,
14
+ fields: config_1.fields,
15
+ previewable: false,
16
+ onActivityCreated: async (payload, onComplete, onError) => {
17
+ const { settings: { apiKey }, fields: { eventName, email, userId, dataFields }, } = (0, extensions_core_1.validate)({
18
+ schema: zod_1.z.object({
19
+ settings: settings_1.SettingsValidationSchema,
20
+ fields: config_1.FieldsValidationSchema,
21
+ }),
22
+ payload,
23
+ });
24
+ const client = new client_1.IterableClient({
25
+ apiKey,
26
+ });
27
+ await client.eventsApi.trackEvent({
28
+ eventName,
29
+ email,
30
+ userId,
31
+ dataFields,
32
+ });
33
+ await onComplete();
34
+ },
35
+ };
36
+ //# sourceMappingURL=trackEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trackEvent.js","sourceRoot":"","sources":["../../../../../../extensions/iterable/v1/actions/trackEvent/trackEvent.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGvB,mEAAkE;AAClE,gDAA4D;AAC5D,qCAAyD;AACzD,yCAA6C;AAEhC,QAAA,UAAU,GAA2C;IAChE,GAAG,EAAE,YAAY;IACjB,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,4BAA4B;IACzC,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,MAAM,EACJ,QAAQ,EAAE,EAAE,MAAM,EAAE,EACpB,MAAM,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,GACjD,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,QAAQ,EAAE,mCAAwB;gBAClC,MAAM,EAAE,+BAAsB;aAC/B,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,IAAI,uBAAc,CAAC;YAChC,MAAM;SACP,CAAC,CAAA;QAEF,MAAM,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;YAChC,SAAS;YACT,KAAK;YACL,MAAM;YACN,UAAU;SACX,CAAC,CAAA;QAEF,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;CACF,CAAA"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const __mocks__1 = require("../../client/__mocks__");
4
+ const __1 = require("..");
5
+ const tests_1 = require("../../../../../src/tests");
6
+ jest.mock('../../client');
7
+ describe('Iterable - Track event', () => {
8
+ const onComplete = jest.fn();
9
+ const onError = jest.fn();
10
+ const basePayload = (0, tests_1.generateTestPayload)({
11
+ fields: {
12
+ ...__mocks__1.mockTrackEventActionFields,
13
+ dataFields: JSON.stringify(__mocks__1.mockTrackEventActionFields.dataFields),
14
+ },
15
+ settings: {
16
+ apiKey: 'apiKey',
17
+ },
18
+ });
19
+ beforeEach(() => {
20
+ jest.clearAllMocks();
21
+ });
22
+ test('Should call the onComplete callback', async () => {
23
+ await __1.trackEvent.onActivityCreated(basePayload, onComplete, onError);
24
+ expect(__mocks__1.IterableClientMockImplementation.eventsApi.trackEvent).toHaveBeenCalledWith(__mocks__1.mockTrackEventActionFields);
25
+ expect(onComplete).toHaveBeenCalled();
26
+ expect(onError).not.toHaveBeenCalled();
27
+ });
28
+ });
29
+ //# sourceMappingURL=trackEvent.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trackEvent.test.js","sourceRoot":"","sources":["../../../../../../extensions/iterable/v1/actions/trackEvent/trackEvent.test.ts"],"names":[],"mappings":";;AAAA,qDAG+B;AAC/B,0BAA+B;AAC/B,oDAA8D;AAE9D,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AAEzB,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,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,GAAG,qCAA0B;YAC7B,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,qCAA0B,CAAC,UAAU,CAAC;SAClE;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,cAAU,CAAC,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;QAEpE,MAAM,CACJ,2CAAgC,CAAC,SAAS,CAAC,UAAU,CACtD,CAAC,oBAAoB,CAAC,qCAA0B,CAAC,CAAA;QAClD,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAA;QACrC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { type AxiosResponse } from 'axios';
2
- import { type ApiResponse, type SendEmailRequest } from './types';
2
+ import { type TrackEventRequest, type ApiResponse, type SendEmailRequest } from './types';
3
3
  declare class IterableEmailAPI {
4
4
  private readonly _baseApi;
5
5
  constructor({ apiKey }: {
@@ -7,8 +7,16 @@ declare class IterableEmailAPI {
7
7
  });
8
8
  sendEmail: (body: SendEmailRequest) => Promise<AxiosResponse<ApiResponse>>;
9
9
  }
10
+ declare class IterableEventsAPI {
11
+ private readonly _baseApi;
12
+ constructor({ apiKey }: {
13
+ apiKey: string;
14
+ });
15
+ trackEvent: (body: TrackEventRequest) => Promise<AxiosResponse<ApiResponse>>;
16
+ }
10
17
  export declare class IterableClient {
11
18
  readonly emailApi: IterableEmailAPI;
19
+ readonly eventsApi: IterableEventsAPI;
12
20
  constructor({ apiKey }: {
13
21
  apiKey: string;
14
22
  });
@@ -53,9 +53,23 @@ class IterableEmailAPI {
53
53
  });
54
54
  }
55
55
  }
56
+ class IterableEventsAPI {
57
+ constructor({ apiKey }) {
58
+ this.trackEvent = async (body) => {
59
+ return await this._baseApi.post('track', {
60
+ body,
61
+ });
62
+ };
63
+ this._baseApi = new IterableBaseAPI({
64
+ baseUrl: `https://api.iterable.com/api/events`,
65
+ apiKey,
66
+ });
67
+ }
68
+ }
56
69
  class IterableClient {
57
70
  constructor({ apiKey }) {
58
71
  this.emailApi = new IterableEmailAPI({ apiKey });
72
+ this.eventsApi = new IterableEventsAPI({ apiKey });
59
73
  }
60
74
  }
61
75
  exports.IterableClient = IterableClient;
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../extensions/iterable/v1/client/client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;AAGjD,MAAM,eAAe;IAKnB,YAAY,EAAE,OAAO,EAAE,MAAM,EAAuC;QASpE,SAAI,GAAG,KAAK,EACV,GAAW,EACX,EAAE,IAAI,EAAe,EACM,EAAE;YAC7B,OAAO,MAAM,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BAAiB;IAGrB,YAAY,EAAE,MAAM,EAAsB;QAO1C,eAAU,GAAG,KAAK,EAChB,IAAuB,EACc,EAAE;YACvC,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAiC,OAAO,EAAE;gBACvE,IAAI;aACL,CAAC,CAAA;QACJ,CAAC,CAAA;QAZC,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC;YAClC,OAAO,EAAE,qCAAqC;YAC9C,MAAM;SACP,CAAC,CAAA;IACJ,CAAC;CASF;AAED,MAAa,cAAc;IAIzB,YAAY,EAAE,MAAM,EAAsB;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;IACpD,CAAC;CACF;AARD,wCAQC"}
@@ -40,3 +40,14 @@ export interface SendEmailRequest {
40
40
  allowRepeatMarketingSends?: boolean;
41
41
  metadata?: Record<string, unknown>;
42
42
  }
43
+ export interface TrackEventRequest {
44
+ eventName: string;
45
+ email?: string;
46
+ userId?: string;
47
+ id?: string;
48
+ dataFields?: Record<string, unknown>;
49
+ createdAt?: number;
50
+ campaignId?: number;
51
+ templateId?: number;
52
+ createNewFields?: boolean;
53
+ }
@@ -40,15 +40,15 @@
40
40
  "changelog": "# Formsort changelog"
41
41
  },
42
42
  "healthie": {
43
- "readme": "---\ntitle: Healthie\ndescription: Healthie offers infrastructure for next generation digital health organizations that provide virtual-first care.\n---\n# What is Healthie?\n\nHealthie offers infrastructure for next generation digital health organizations that provide virtual-first care. Healthie’s API-first and fully brandable suite of solutions (Scheduling, EMR, Client Engagement) enables healthcare builders to launch and scale best-in-class experiences for their members. Healthie also offers a built-in marketplace of business and clinical integrations used by our organizations.\n\nTo learn more, visit [www.gethealthie.com](www.gethealthie.com).\n\n## Healthie x Awell\n\nWith this extension, organizations are able to build clinical workflows in Awell’s low-code platform and easily integrate them into Healthie. By doing so, Healthie’s customers can automate routine clinical tasks, synchronize data between systems and drive seamless coordination between care team and patients.\n\nBy combining Healthie’s web and mobile platform with our clinical workflows, clinicians will be able to provide the right care, at the right time for the right patient.\n\n# Extension settings\n\nIn order to set up this extension, **you will need to provide a Healthie API key and Api url**. You can obtain an API key via the Healthie portal (`Settings > Developer > API keys`). You can obtain API url in the [DOCUMENTATION](https://docs.gethealthie.com/docs/#environments) in `Environments` section.\n\nPlease note that the extension automatically prefixes the API key with `Basic ` so please provide your raw API key without `Basic ` in front.\n\n# Custom Actions\n\n## Send chat message action\n\nSends a chat message to a patient in name of the provided provider ID. Will create a new conversation if no active conversation between patient and provider exists or sends a message in an existing conversation if there is an active conversation between the two.\n\n## Create patient\n\nCreates a new patient according to the passed fields. After completion the `healthiePatientId` will be exposed as a data point in the care flow.\n\n## Update patient\n\nUpdates a specific patient (defined by the provided `id`) according to the passed fields.\n\n## Apply tag to patient\n\nAdds a tag (existing one, identified by an `id`) to a patient. Although the Healthie API call allows assigning multiple tags per API call, for simplicity of the logic this action can only take one tag as input. Assigning multiple tags is possible by adding multiple actions.\n\n## Remove tag from patient\n\nRemoves a tag (identified by an `id`) from a patient.\n\n## Create charting note\n\nCreates a charting note with the provided `note_content`.\n\n**Prerequisites and set-up:**\n1. The form specified by the `form_id` exists in Healthie.\n2. The form specified by the `form_id` is a charting form (click \"Convert to charting form\" in the form options).\n3. The form contains at least one question of type `textarea` (long text answer). The action will write the content of the charting note in the first question of that type it finds in the form.\n\n## Send form completion request\n\nSend a form completion request to the patient. You will need the Healthie patient ID and the ID of the form you would like the patient to complete.\n\nAlthough the Healthie API call allows sending form completion requests to multiple users per API call (see recipient_ids in their docs), we decided that every action only sends one form completion request. This heavily simplifies the logic and better fits our domain model (1-to-1 relationship between patient and pathway). If a user would like to send multiple form completion requests, they you can just add multiple actions.\n\n## Archive patient\n\nArchives a patient with a given `id`.\n\n## Create location\n\nCreates a location. ID of the created location is stored as `locationId` data point.\n\n## Close chat conversation\n\nCloses chat conversation with a given `id` as a provider with the given `provider_id`.\n\n## Delete appointment\n\nDeletes an appointment with a given `id`.\n\n## Cancel appointment\n\nCancels an appointment with a given `id`.\n",
44
- "changelog": "# Healthie changelog\n\n## September 5, 2023\n\n- add Healthie gender to Sex in iso format mapper in `getPatient`\n\n## May 2023\n\n- New webhooks added: `appliedTagCreated`, `appliedTagDeleted`, `appointmentDeleted`, `appointmentUpdated`, `formAnswerGroupCreated`, `formAnswerGroupDeleted`, `formAnswerGroupLocked`, `formAnswerGroupSigned`, `labOrderCreated`, `labOrderUpdated`, `messageCreated`, `messageDeleted`, `metricEntryCreated`, `metricEntryDeleted`, `metricEntryUpdated`, `patientUpdated`, `requestFormCompletionCreated`, `requestFormCompletionDeleted`, `requestFormCompletionUpdated`, `taskCreated`, `taskDeleted`, `taskUpdated`\n\n## April 2023\n\n- Create task action: now also adds support for reminders.\n"
43
+ "readme": "---\ntitle: Healthie\ndescription: Healthie offers infrastructure for next generation digital health organizations that provide virtual-first care.\n---\n\n# What is Healthie?\n\nHealthie offers infrastructure for next generation digital health organizations that provide virtual-first care. Healthie’s API-first and fully brandable suite of solutions (Scheduling, EMR, Client Engagement) enables healthcare builders to launch and scale best-in-class experiences for their members. Healthie also offers a built-in marketplace of business and clinical integrations used by our organizations.\n\nTo learn more, visit [www.gethealthie.com](www.gethealthie.com).\n\n## Healthie x Awell\n\nWith this extension, organizations are able to build clinical workflows in Awell’s low-code platform and easily integrate them into Healthie. By doing so, Healthie’s customers can automate routine clinical tasks, synchronize data between systems and drive seamless coordination between care team and patients.\n\nBy combining Healthie’s web and mobile platform with our clinical workflows, clinicians will be able to provide the right care, at the right time for the right patient.\n\n# Extension settings\n\nIn order to set up this extension, **you will need to provide a Healthie API key and Api url**. You can obtain an API key via the Healthie portal (`Settings > Developer > API keys`). You can obtain API url in the [DOCUMENTATION](https://docs.gethealthie.com/docs/#environments) in `Environments` section.\n\nPlease note that the extension automatically prefixes the API key with `Basic ` so please provide your raw API key without `Basic ` in front.\n\n# Custom Actions\n\n## Send chat message action\n\nSends a chat message to a patient in name of the provided provider ID. Will create a new conversation if no active conversation between patient and provider exists or sends a message in an existing conversation if there is an active conversation between the two.\n\n## Create patient\n\nCreates a new patient according to the passed fields. After completion the `healthiePatientId` will be exposed as a data point in the care flow.\n\n## Update patient\n\nUpdates a specific patient (defined by the provided `id`) according to the passed fields.\n\n## Apply tag to patient\n\nAdds a tag (existing one, identified by an `id`) to a patient. Although the Healthie API call allows assigning multiple tags per API call, for simplicity of the logic this action can only take one tag as input. Assigning multiple tags is possible by adding multiple actions.\n\n## Remove tag from patient\n\nRemoves a tag (identified by an `id`) from a patient.\n\n## Create charting note\n\nCreates a charting note with the provided `note_content`.\n\n**Prerequisites and set-up:**\n\n1. The form specified by the `form_id` exists in Healthie.\n2. The form specified by the `form_id` is a charting form (click \"Convert to charting form\" in the form options).\n3. The form contains at least one question of type `textarea` (long text answer). The action will write the content of the charting note in the first question of that type it finds in the form.\n\n## Send form completion request\n\nSend a form completion request to the patient. You will need the Healthie patient ID and the ID of the form you would like the patient to complete.\n\nAlthough the Healthie API call allows sending form completion requests to multiple users per API call (see recipient_ids in their docs), we decided that every action only sends one form completion request. This heavily simplifies the logic and better fits our domain model (1-to-1 relationship between patient and pathway). If a user would like to send multiple form completion requests, they you can just add multiple actions.\n\n## Archive patient\n\nArchives a patient with a given `id`.\n\n## Create location\n\nCreates a location. ID of the created location is stored as `locationId` data point.\n\n## Close chat conversation\n\nCloses chat conversation with a given `id` as a provider with the given `provider_id`.\n\n## Delete appointment\n\nDeletes an appointment with a given `id`.\n\n## Cancel appointment\n\nCancels an appointment with a given `id`.\n\n## Create metric entry\n\nCreate a metric entry for a patient in Healthie.\n",
44
+ "changelog": "# Healthie changelog\n\n## October 2023\n\n- Create metric entry action.\n\n## September 5, 2023\n\n- add Healthie gender to Sex in iso format mapper in `getPatient`\n\n## May 2023\n\n- New webhooks added: `appliedTagCreated`, `appliedTagDeleted`, `appointmentDeleted`, `appointmentUpdated`, `formAnswerGroupCreated`, `formAnswerGroupDeleted`, `formAnswerGroupLocked`, `formAnswerGroupSigned`, `labOrderCreated`, `labOrderUpdated`, `messageCreated`, `messageDeleted`, `metricEntryCreated`, `metricEntryDeleted`, `metricEntryUpdated`, `patientUpdated`, `requestFormCompletionCreated`, `requestFormCompletionDeleted`, `requestFormCompletionUpdated`, `taskCreated`, `taskDeleted`, `taskUpdated`\n\n## April 2023\n\n- Create task action: now also adds support for reminders.\n"
45
45
  },
46
46
  "hello-world": {
47
47
  "readme": "---\ntitle: Hello world\ndescription: This is an example extension.\n---\n# Hello world extension",
48
48
  "changelog": "# Hello world changelog"
49
49
  },
50
50
  "iterable": {
51
- "readme": "---\ntitle: Iterable\ndescription: Iterable is an email marketing automation platform that allows creating, sending, and tracking personalized email campaigns.\n---\n\n# Iterable\n\nIterable is a marketing automation platform that provides tools and services for businesses to engage with their customers through email, SMS, in-app notifications, and other digital channels. It allows businesses to create and manage personalized marketing campaigns, track customer behavior, and analyze data to optimize their marketing strategies.\n\nIterable offers features such as email marketing, segmentation, A/B testing, workflow automation, and analytics to help businesses deliver the right message to the right audience at the right time.\n\n## Extension settings\n\nIn order to set up this extension, you will need an API key to authenticate with the Iterable API.\n\n## Custom Actions\n\n### Send email\n\nSend an email to a specific email address.\n\n**Important:** Provide a `recipientEmail` or a `recipientUserId` (but not both), depending on how your [project identifies users](https://support.iterable.com/hc/articles/204780579#identifying-users).\n",
51
+ "readme": "---\ntitle: Iterable\ndescription: Iterable is an email marketing automation platform that allows creating, sending, and tracking personalized email campaigns.\n---\n\n# Iterable\n\nIterable is a marketing automation platform that provides tools and services for businesses to engage with their customers through email, SMS, in-app notifications, and other digital channels. It allows businesses to create and manage personalized marketing campaigns, track customer behavior, and analyze data to optimize their marketing strategies.\n\nIterable offers features such as email marketing, segmentation, A/B testing, workflow automation, and analytics to help businesses deliver the right message to the right audience at the right time.\n\n## Extension settings\n\nIn order to set up this extension, you will need an API key to authenticate with the Iterable API.\n\n## Custom Actions\n\n### Send email\n\nSend an email to a specific email address.\n\n**Important:** Provide a `recipientEmail` or a `recipientUserId` (but not both), depending on how your [project identifies users](https://support.iterable.com/hc/articles/204780579#identifying-users).\n\n### Track Event\n\nTrack an event in Iterable.\n\n**Important:** Provide an `email` or a `userId` (but not both), depending on how your [project identifies users](https://support.iterable.com/hc/articles/204780579#identifying-users).\n",
52
52
  "changelog": "# Iterable changelog\n"
53
53
  },
54
54
  "mailchimp": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.115",
3
+ "version": "1.0.117",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {