@awell-health/awell-extensions 1.0.57 → 1.0.59

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.
@@ -0,0 +1,11 @@
1
+ import { type Webhook } from '@awell-health/extensions-core';
2
+ import { type HealthieWebhookPayload } from '../types';
3
+ declare const dataPoints: {
4
+ createdGoalId: {
5
+ key: string;
6
+ valueType: "string";
7
+ };
8
+ };
9
+ export declare const goalCreated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
10
+ export type GoalCreated = typeof goalCreated;
11
+ export {};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.goalCreated = void 0;
4
+ const lodash_1 = require("lodash");
5
+ const dataPoints = {
6
+ createdGoalId: {
7
+ key: 'createdGoalId',
8
+ valueType: 'string',
9
+ },
10
+ };
11
+ exports.goalCreated = {
12
+ key: 'goalCreated',
13
+ dataPoints,
14
+ onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
15
+ const { resource_id: createdGoalId } = payload;
16
+ if ((0, lodash_1.isNil)(createdGoalId)) {
17
+ await onError({
18
+ // We should automatically send a 400 here, so no need to provide info
19
+ });
20
+ }
21
+ await onSuccess({
22
+ data_points: {
23
+ createdGoalId,
24
+ },
25
+ });
26
+ },
27
+ };
28
+ //# sourceMappingURL=goalCreated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goalCreated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/goalCreated.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,WAAW,GAGpB;IACF,GAAG,EAAE,aAAa;IAClB,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,OAAO,CAAA;QAE9C,IAAI,IAAA,cAAK,EAAC,aAAa,CAAC,EAAE;YACxB,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;QAED,MAAM,SAAS,CAAC;YACd,WAAW,EAAE;gBACX,aAAa;aACd;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { type Webhook } from '@awell-health/extensions-core';
2
+ import { type HealthieWebhookPayload } from '../types';
3
+ declare const dataPoints: {
4
+ deletedGoalId: {
5
+ key: string;
6
+ valueType: "string";
7
+ };
8
+ };
9
+ export declare const goalDeleted: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
10
+ export type GoalDeleted = typeof goalDeleted;
11
+ export {};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.goalDeleted = void 0;
4
+ const lodash_1 = require("lodash");
5
+ const dataPoints = {
6
+ deletedGoalId: {
7
+ key: 'deletedGoalId',
8
+ valueType: 'string',
9
+ },
10
+ };
11
+ exports.goalDeleted = {
12
+ key: 'goalDeleted',
13
+ dataPoints,
14
+ onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
15
+ const { resource_id: deletedGoalId } = payload;
16
+ if ((0, lodash_1.isNil)(deletedGoalId)) {
17
+ await onError({
18
+ // We should automatically send a 400 here, so no need to provide info
19
+ });
20
+ }
21
+ await onSuccess({
22
+ data_points: {
23
+ deletedGoalId,
24
+ },
25
+ });
26
+ },
27
+ };
28
+ //# sourceMappingURL=goalDeleted.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goalDeleted.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/goalDeleted.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,WAAW,GAGpB;IACF,GAAG,EAAE,aAAa;IAClB,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,OAAO,CAAA;QAE9C,IAAI,IAAA,cAAK,EAAC,aAAa,CAAC,EAAE;YACxB,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;QAED,MAAM,SAAS,CAAC;YACd,WAAW,EAAE;gBACX,aAAa;aACd;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { type Webhook } from '@awell-health/extensions-core';
2
+ import { type HealthieWebhookPayload } from '../types';
3
+ declare const dataPoints: {
4
+ updatedGoalId: {
5
+ key: string;
6
+ valueType: "string";
7
+ };
8
+ };
9
+ export declare const goalUpdated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
10
+ export type GoalUpdated = typeof goalUpdated;
11
+ export {};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.goalUpdated = void 0;
4
+ const lodash_1 = require("lodash");
5
+ const dataPoints = {
6
+ updatedGoalId: {
7
+ key: 'updatedGoalId',
8
+ valueType: 'string',
9
+ },
10
+ };
11
+ exports.goalUpdated = {
12
+ key: 'goalUpdated',
13
+ dataPoints,
14
+ onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
15
+ const { resource_id: updatedGoalId } = payload;
16
+ if ((0, lodash_1.isNil)(updatedGoalId)) {
17
+ await onError({
18
+ // We should automatically send a 400 here, so no need to provide info
19
+ });
20
+ }
21
+ await onSuccess({
22
+ data_points: {
23
+ updatedGoalId,
24
+ },
25
+ });
26
+ },
27
+ };
28
+ //# sourceMappingURL=goalUpdated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goalUpdated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/goalUpdated.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,WAAW,GAGpB;IACF,GAAG,EAAE,aAAa;IAClB,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,OAAO,CAAA;QAE9C,IAAI,IAAA,cAAK,EAAC,aAAa,CAAC,EAAE;YACxB,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;QAED,MAAM,SAAS,CAAC;YACd,WAAW,EAAE;gBACX,aAAa;aACd;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -22,4 +22,7 @@ export type { RequestFormCompletionUpdated } from './requestedFormCompletionUpda
22
22
  export type { TaskCreated } from './taskCreated';
23
23
  export type { TaskDeleted } from './taskDeleted';
24
24
  export type { TaskUpdated } from './taskUpdated';
25
- export declare const webhooks: (import("@awell-health/extensions-core").Webhook<"appointmentId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"patientId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdAppliedTagId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedAppliedTagId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedAppointmentId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedAppointmentId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdFormAnswerGroupId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedFormAnswerGroupId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"lockedFormAnswerGroupId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"signedFormAnswerGroupId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdLabOrderId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedLabOrderId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdMessageId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedMessageId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdMetricId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedMetricId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedMetricId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedPatientId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdFormCompletionId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedFormCompletionId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedFormCompletionId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdTaskId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedTaskId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedTaskId", import("../types").HealthieWebhookPayload>)[];
25
+ export type { GoalCreated } from './goalCreated';
26
+ export type { GoalUpdated } from './goalUpdated';
27
+ export type { GoalDeleted } from './goalDeleted';
28
+ export declare const webhooks: (import("@awell-health/extensions-core").Webhook<"appointmentId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"patientId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdAppliedTagId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedAppliedTagId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedAppointmentId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedAppointmentId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdFormAnswerGroupId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedFormAnswerGroupId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"lockedFormAnswerGroupId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"signedFormAnswerGroupId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdLabOrderId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedLabOrderId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdMessageId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedMessageId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdMetricId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedMetricId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedMetricId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedPatientId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdFormCompletionId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedFormCompletionId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedFormCompletionId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdTaskId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedTaskId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedTaskId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"createdGoalId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"updatedGoalId", import("../types").HealthieWebhookPayload> | import("@awell-health/extensions-core").Webhook<"deletedGoalId", import("../types").HealthieWebhookPayload>)[];
@@ -25,6 +25,9 @@ const requestedFormCompletionUpdated_1 = require("./requestedFormCompletionUpdat
25
25
  const taskCreated_1 = require("./taskCreated");
26
26
  const taskDeleted_1 = require("./taskDeleted");
27
27
  const taskUpdated_1 = require("./taskUpdated");
28
+ const goalCreated_1 = require("./goalCreated");
29
+ const goalUpdated_1 = require("./goalUpdated");
30
+ const goalDeleted_1 = require("./goalDeleted");
28
31
  exports.webhooks = [
29
32
  appointmentCreated_1.appointmentCreated,
30
33
  patientCreated_1.patientCreated,
@@ -50,5 +53,8 @@ exports.webhooks = [
50
53
  taskCreated_1.taskCreated,
51
54
  taskDeleted_1.taskDeleted,
52
55
  taskUpdated_1.taskUpdated,
56
+ goalCreated_1.goalCreated,
57
+ goalUpdated_1.goalUpdated,
58
+ goalDeleted_1.goalDeleted,
53
59
  ];
54
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/index.ts"],"names":[],"mappings":";;;AAAA,6DAAyD;AACzD,qDAAiD;AACjD,2DAAuD;AACvD,2DAAuD;AACvD,6DAAyD;AACzD,6DAAyD;AACzD,qEAAiE;AACjE,qEAAiE;AACjE,mEAA+D;AAC/D,mEAA+D;AAC/D,uDAAmD;AACnD,uDAAmD;AACnD,qDAAiD;AACjD,qDAAiD;AACjD,6DAAyD;AACzD,6DAAyD;AACzD,6DAAyD;AACzD,qDAAiD;AACjD,qFAA+E;AAC/E,qFAA+E;AAC/E,qFAA+E;AAC/E,+CAA2C;AAC3C,+CAA2C;AAC3C,+CAA2C;AA2B9B,QAAA,QAAQ,GAAG;IACtB,uCAAkB;IAClB,+BAAc;IACd,qCAAiB;IACjB,qCAAiB;IACjB,uCAAkB;IAClB,uCAAkB;IAClB,+CAAsB;IACtB,+CAAsB;IACtB,6CAAqB;IACrB,6CAAqB;IACrB,iCAAe;IACf,iCAAe;IACf,+BAAc;IACd,+BAAc;IACd,uCAAkB;IAClB,uCAAkB;IAClB,uCAAkB;IAClB,+BAAc;IACd,6DAA4B;IAC5B,6DAA4B;IAC5B,6DAA4B;IAC5B,yBAAW;IACX,yBAAW;IACX,yBAAW;CACZ,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/index.ts"],"names":[],"mappings":";;;AAAA,6DAAyD;AACzD,qDAAiD;AACjD,2DAAuD;AACvD,2DAAuD;AACvD,6DAAyD;AACzD,6DAAyD;AACzD,qEAAiE;AACjE,qEAAiE;AACjE,mEAA+D;AAC/D,mEAA+D;AAC/D,uDAAmD;AACnD,uDAAmD;AACnD,qDAAiD;AACjD,qDAAiD;AACjD,6DAAyD;AACzD,6DAAyD;AACzD,6DAAyD;AACzD,qDAAiD;AACjD,qFAA+E;AAC/E,qFAA+E;AAC/E,qFAA+E;AAC/E,+CAA2C;AAC3C,+CAA2C;AAC3C,+CAA2C;AAC3C,+CAA2C;AAC3C,+CAA2C;AAC3C,+CAA2C;AA8B9B,QAAA,QAAQ,GAAG;IACtB,uCAAkB;IAClB,+BAAc;IACd,qCAAiB;IACjB,qCAAiB;IACjB,uCAAkB;IAClB,uCAAkB;IAClB,+CAAsB;IACtB,+CAAsB;IACtB,6CAAqB;IACrB,6CAAqB;IACrB,iCAAe;IACf,iCAAe;IACf,+BAAc;IACd,+BAAc;IACd,uCAAkB;IAClB,uCAAkB;IAClB,uCAAkB;IAClB,+BAAc;IACd,6DAA4B;IAC5B,6DAA4B;IAC5B,6DAA4B;IAC5B,yBAAW;IACX,yBAAW;IACX,yBAAW;IACX,yBAAW;IACX,yBAAW;IACX,yBAAW;CACZ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {