@awell-health/awell-extensions 1.1.43-beta42 → 1.1.43
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/awell/v1/webhooks/index.d.ts +1 -1
- package/dist/extensions/awell/v1/webhooks/pathwayStart.d.ts +1 -3
- package/dist/extensions/awell/v1/webhooks/pathwayStart.js +3 -13
- package/dist/extensions/awell/v1/webhooks/pathwayStart.js.map +1 -1
- package/dist/extensions/calDotCom/webhooks/index.d.ts +1 -1
- package/dist/extensions/calendly/webhooks/index.d.ts +1 -1
- package/dist/extensions/elation/webhooks/index.d.ts +1 -1
- package/dist/extensions/healthie/lib/sdk/errors.d.ts +0 -1
- package/dist/extensions/healthie/lib/sdk/errors.js +1 -42
- package/dist/extensions/healthie/lib/sdk/errors.js.map +1 -1
- package/dist/extensions/healthie/lib/sdk/generated/sdk.d.ts +9 -373
- package/dist/extensions/healthie/lib/sdk/generated/sdk.js +3 -110
- package/dist/extensions/healthie/lib/sdk/generated/sdk.js.map +1 -1
- package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.d.ts +1 -11
- package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.js +1 -15
- package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.js.map +1 -1
- package/dist/extensions/healthie/lib/types.d.ts +0 -1
- package/dist/extensions/healthie/lib/types.js +0 -2
- package/dist/extensions/healthie/lib/types.js.map +1 -1
- package/dist/extensions/healthie/webhooks/appliedTagCreated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/appliedTagCreated.js +7 -19
- package/dist/extensions/healthie/webhooks/appliedTagCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/appliedTagDeleted.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/appliedTagDeleted.js +7 -19
- package/dist/extensions/healthie/webhooks/appliedTagDeleted.js.map +1 -1
- package/dist/extensions/healthie/webhooks/appointmentCreated.d.ts +1 -6
- package/dist/extensions/healthie/webhooks/appointmentCreated.js +6 -25
- package/dist/extensions/healthie/webhooks/appointmentCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/appointmentDeleted.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/appointmentDeleted.js +6 -21
- package/dist/extensions/healthie/webhooks/appointmentDeleted.js.map +1 -1
- package/dist/extensions/healthie/webhooks/appointmentUpdated.d.ts +1 -6
- package/dist/extensions/healthie/webhooks/appointmentUpdated.js +6 -25
- package/dist/extensions/healthie/webhooks/appointmentUpdated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/formAnswerGroupCreated.d.ts +1 -6
- package/dist/extensions/healthie/webhooks/formAnswerGroupCreated.js +7 -26
- package/dist/extensions/healthie/webhooks/formAnswerGroupCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/formAnswerGroupDeleted.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/formAnswerGroupDeleted.js +6 -20
- package/dist/extensions/healthie/webhooks/formAnswerGroupDeleted.js.map +1 -1
- package/dist/extensions/healthie/webhooks/formAnswerGroupLocked.d.ts +1 -6
- package/dist/extensions/healthie/webhooks/formAnswerGroupLocked.js +6 -25
- package/dist/extensions/healthie/webhooks/formAnswerGroupLocked.js.map +1 -1
- package/dist/extensions/healthie/webhooks/formAnswerGroupSigned.d.ts +1 -6
- package/dist/extensions/healthie/webhooks/formAnswerGroupSigned.js +6 -25
- package/dist/extensions/healthie/webhooks/formAnswerGroupSigned.js.map +1 -1
- package/dist/extensions/healthie/webhooks/goalCreated.d.ts +2 -3
- package/dist/extensions/healthie/webhooks/goalCreated.js +9 -21
- package/dist/extensions/healthie/webhooks/goalCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/goalDeleted.d.ts +11 -0
- package/dist/extensions/healthie/webhooks/goalDeleted.js +30 -0
- package/dist/extensions/healthie/webhooks/goalDeleted.js.map +1 -0
- package/dist/extensions/healthie/webhooks/goalUpdated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/goalUpdated.js +8 -20
- package/dist/extensions/healthie/webhooks/goalUpdated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/index.d.ts +5 -316
- package/dist/extensions/healthie/webhooks/index.js +8 -0
- package/dist/extensions/healthie/webhooks/index.js.map +1 -1
- package/dist/extensions/healthie/webhooks/labOrderCreated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/labOrderCreated.js +7 -19
- package/dist/extensions/healthie/webhooks/labOrderCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/labOrderUpdated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/labOrderUpdated.js +7 -19
- package/dist/extensions/healthie/webhooks/labOrderUpdated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/messageCreated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/messageCreated.js +7 -20
- package/dist/extensions/healthie/webhooks/messageCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/messageDeleted.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/messageDeleted.js +7 -20
- package/dist/extensions/healthie/webhooks/messageDeleted.js.map +1 -1
- package/dist/extensions/healthie/webhooks/metricEntryCreated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/metricEntryCreated.js +7 -19
- package/dist/extensions/healthie/webhooks/metricEntryCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/metricEntryDeleted.d.ts +11 -0
- package/dist/extensions/healthie/webhooks/metricEntryDeleted.js +30 -0
- package/dist/extensions/healthie/webhooks/metricEntryDeleted.js.map +1 -0
- package/dist/extensions/healthie/webhooks/metricEntryUpdated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/metricEntryUpdated.js +7 -19
- package/dist/extensions/healthie/webhooks/metricEntryUpdated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/patientCreated.js +0 -5
- package/dist/extensions/healthie/webhooks/patientCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/patientUpdated.js +0 -5
- package/dist/extensions/healthie/webhooks/patientUpdated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/requestedFormCompletionCreated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/requestedFormCompletionCreated.js +7 -19
- package/dist/extensions/healthie/webhooks/requestedFormCompletionCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/requestedFormCompletionDeleted.d.ts +11 -0
- package/dist/extensions/healthie/webhooks/requestedFormCompletionDeleted.js +30 -0
- package/dist/extensions/healthie/webhooks/requestedFormCompletionDeleted.js.map +1 -0
- package/dist/extensions/healthie/webhooks/requestedFormCompletionUpdated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/requestedFormCompletionUpdated.js +7 -19
- package/dist/extensions/healthie/webhooks/requestedFormCompletionUpdated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/taskCreated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/taskCreated.js +7 -19
- package/dist/extensions/healthie/webhooks/taskCreated.js.map +1 -1
- package/dist/extensions/healthie/webhooks/taskDeleted.d.ts +11 -0
- package/dist/extensions/healthie/webhooks/taskDeleted.js +30 -0
- package/dist/extensions/healthie/webhooks/taskDeleted.js.map +1 -0
- package/dist/extensions/healthie/webhooks/taskUpdated.d.ts +1 -2
- package/dist/extensions/healthie/webhooks/taskUpdated.js +8 -20
- package/dist/extensions/healthie/webhooks/taskUpdated.js.map +1 -1
- package/dist/extensions/hello-world/webhooks/index.d.ts +1 -1
- package/dist/extensions/zusHealth/webhooks/index.d.ts +1 -37
- package/dist/extensions/zusHealth/webhooks/patientAdmitted.d.ts +1 -2
- package/dist/extensions/zusHealth/webhooks/patientAdmitted.js.map +1 -1
- package/dist/extensions/zusHealth/webhooks/patientDischarged.d.ts +1 -2
- package/dist/extensions/zusHealth/webhooks/patientDischarged.js.map +1 -1
- package/dist/src/test-server.js +0 -4
- package/dist/src/test-server.js.map +1 -1
- package/package.json +4 -5
- package/dist/extensions/healthie/lib/sdk/createSdk.d.ts +0 -10
- package/dist/extensions/healthie/lib/sdk/createSdk.js +0 -17
- package/dist/extensions/healthie/lib/sdk/createSdk.js.map +0 -1
@@ -2,9 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.appointmentDeleted = void 0;
|
4
4
|
const lodash_1 = require("lodash");
|
5
|
-
const types_1 = require("../lib/types");
|
6
|
-
const errors_1 = require("../lib/sdk/errors");
|
7
|
-
const createSdk_1 = require("../lib/sdk/createSdk");
|
8
5
|
const dataPoints = {
|
9
6
|
deletedAppointmentId: {
|
10
7
|
key: 'deletedAppointmentId',
|
@@ -15,31 +12,19 @@ exports.appointmentDeleted = {
|
|
15
12
|
key: 'appointmentDeleted',
|
16
13
|
dataPoints,
|
17
14
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
const response = await sdk.getAppointment({
|
23
|
-
id: deletedAppointmentId,
|
24
|
-
include_deleted: true,
|
15
|
+
const { resource_id: deletedAppointmentId } = payload;
|
16
|
+
if ((0, lodash_1.isNil)(deletedAppointmentId)) {
|
17
|
+
await onError({
|
18
|
+
// We should automatically send a 400 here, so no need to provide info
|
25
19
|
});
|
26
|
-
|
20
|
+
}
|
21
|
+
else {
|
27
22
|
await onSuccess({
|
28
23
|
data_points: {
|
29
24
|
deletedAppointmentId,
|
30
25
|
},
|
31
|
-
...(!(0, lodash_1.isNil)(healthiePatientId) && {
|
32
|
-
patient_identifier: {
|
33
|
-
system: types_1.HEALTHIE_IDENTIFIER,
|
34
|
-
value: healthiePatientId,
|
35
|
-
},
|
36
|
-
}),
|
37
26
|
});
|
38
27
|
}
|
39
|
-
catch (error) {
|
40
|
-
const formattedError = (0, errors_1.formatErrors)(error);
|
41
|
-
await onError(formattedError);
|
42
|
-
}
|
43
28
|
},
|
44
29
|
};
|
45
30
|
//# sourceMappingURL=appointmentDeleted.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"appointmentDeleted.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/appointmentDeleted.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;
|
1
|
+
{"version":3,"file":"appointmentDeleted.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/appointmentDeleted.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,oBAAoB,EAAE;QACpB,GAAG,EAAE,sBAAsB;QAC3B,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,kBAAkB,GAG3B;IACF,GAAG,EAAE,oBAAoB;IACzB,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAA;QAErD,IAAI,IAAA,cAAK,EAAC,oBAAoB,CAAC,EAAE;YAC/B,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,oBAAoB;iBACrB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -1,16 +1,11 @@
|
|
1
1
|
import { type Webhook } from '@awell-health/extensions-core';
|
2
2
|
import { type HealthieWebhookPayload } from '../lib/types';
|
3
|
-
import { type settings } from '../../awell/settings';
|
4
3
|
declare const dataPoints: {
|
5
4
|
updatedAppointmentId: {
|
6
5
|
key: string;
|
7
6
|
valueType: "string";
|
8
7
|
};
|
9
|
-
appointment: {
|
10
|
-
key: string;
|
11
|
-
valueType: "json";
|
12
|
-
};
|
13
8
|
};
|
14
|
-
export declare const appointmentUpdated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload
|
9
|
+
export declare const appointmentUpdated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
|
15
10
|
export type AppointmentUpdated = typeof appointmentUpdated;
|
16
11
|
export {};
|
@@ -2,48 +2,29 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.appointmentUpdated = void 0;
|
4
4
|
const lodash_1 = require("lodash");
|
5
|
-
const types_1 = require("../lib/types");
|
6
|
-
const errors_1 = require("../lib/sdk/errors");
|
7
|
-
const createSdk_1 = require("../lib/sdk/createSdk");
|
8
5
|
const dataPoints = {
|
9
6
|
updatedAppointmentId: {
|
10
7
|
key: 'updatedAppointmentId',
|
11
8
|
valueType: 'string',
|
12
9
|
},
|
13
|
-
appointment: {
|
14
|
-
key: 'appointment',
|
15
|
-
valueType: 'json',
|
16
|
-
},
|
17
10
|
};
|
18
11
|
exports.appointmentUpdated = {
|
19
12
|
key: 'appointmentUpdated',
|
20
13
|
dataPoints,
|
21
14
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
const response = await sdk.getAppointment({
|
27
|
-
id: updatedAppointmentId,
|
15
|
+
const { resource_id: updatedAppointmentId } = payload;
|
16
|
+
if ((0, lodash_1.isNil)(updatedAppointmentId)) {
|
17
|
+
await onError({
|
18
|
+
// We should automatically send a 400 here, so no need to provide info
|
28
19
|
});
|
29
|
-
|
20
|
+
}
|
21
|
+
else {
|
30
22
|
await onSuccess({
|
31
23
|
data_points: {
|
32
24
|
updatedAppointmentId,
|
33
|
-
appointment: JSON.stringify((_d = response === null || response === void 0 ? void 0 : response.data) === null || _d === void 0 ? void 0 : _d.appointment),
|
34
25
|
},
|
35
|
-
...(!(0, lodash_1.isNil)(healthiePatientId) && {
|
36
|
-
patient_identifier: {
|
37
|
-
system: types_1.HEALTHIE_IDENTIFIER,
|
38
|
-
value: healthiePatientId,
|
39
|
-
},
|
40
|
-
}),
|
41
26
|
});
|
42
27
|
}
|
43
|
-
catch (error) {
|
44
|
-
const formattedError = (0, errors_1.formatErrors)(error);
|
45
|
-
await onError(formattedError);
|
46
|
-
}
|
47
28
|
},
|
48
29
|
};
|
49
30
|
//# sourceMappingURL=appointmentUpdated.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"appointmentUpdated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/appointmentUpdated.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;
|
1
|
+
{"version":3,"file":"appointmentUpdated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/appointmentUpdated.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,oBAAoB,EAAE;QACpB,GAAG,EAAE,sBAAsB;QAC3B,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,kBAAkB,GAG3B;IACF,GAAG,EAAE,oBAAoB;IACzB,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAA;QAErD,IAAI,IAAA,cAAK,EAAC,oBAAoB,CAAC,EAAE;YAC/B,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,oBAAoB;iBACrB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -1,16 +1,11 @@
|
|
1
1
|
import { type Webhook } from '@awell-health/extensions-core';
|
2
2
|
import { type HealthieWebhookPayload } from '../lib/types';
|
3
|
-
import { type settings } from '../settings';
|
4
3
|
declare const dataPoints: {
|
5
4
|
createdFormAnswerGroupId: {
|
6
5
|
key: string;
|
7
6
|
valueType: "string";
|
8
7
|
};
|
9
|
-
createdFormAnswerGroup: {
|
10
|
-
key: string;
|
11
|
-
valueType: "json";
|
12
|
-
};
|
13
8
|
};
|
14
|
-
export declare const formAnswerGroupCreated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload
|
9
|
+
export declare const formAnswerGroupCreated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
|
15
10
|
export type FormAnswerGroupCreated = typeof formAnswerGroupCreated;
|
16
11
|
export {};
|
@@ -2,48 +2,29 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.formAnswerGroupCreated = void 0;
|
4
4
|
const lodash_1 = require("lodash");
|
5
|
-
const types_1 = require("../lib/types");
|
6
|
-
const errors_1 = require("../lib/sdk/errors");
|
7
|
-
const createSdk_1 = require("../lib/sdk/createSdk");
|
8
5
|
const dataPoints = {
|
9
6
|
createdFormAnswerGroupId: {
|
10
7
|
key: 'createdFormAnswerGroupId',
|
11
8
|
valueType: 'string',
|
12
9
|
},
|
13
|
-
createdFormAnswerGroup: {
|
14
|
-
key: 'createdFormAnswerGroup',
|
15
|
-
valueType: 'json',
|
16
|
-
},
|
17
10
|
};
|
18
11
|
exports.formAnswerGroupCreated = {
|
19
12
|
key: 'formAnswerGroupCreated',
|
20
13
|
dataPoints,
|
21
14
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
const response = await sdk.getFormAnswerGroup({
|
27
|
-
id: createdFormAnswerGroupId,
|
15
|
+
const { resource_id: createdFormAnswerGroupId } = payload;
|
16
|
+
if ((0, lodash_1.isNil)(createdFormAnswerGroupId)) {
|
17
|
+
await onError({
|
18
|
+
// We should automatically send a 400 here, so no need to provide info
|
28
19
|
});
|
29
|
-
|
20
|
+
}
|
21
|
+
else {
|
30
22
|
await onSuccess({
|
31
23
|
data_points: {
|
32
24
|
createdFormAnswerGroupId,
|
33
|
-
createdFormAnswerGroup: JSON.stringify((_d = response === null || response === void 0 ? void 0 : response.data) === null || _d === void 0 ? void 0 : _d.formAnswerGroup),
|
34
25
|
},
|
35
|
-
...(!(0, lodash_1.isNil)(healthiePatientId) && {
|
36
|
-
patient_identifier: {
|
37
|
-
system: types_1.HEALTHIE_IDENTIFIER,
|
38
|
-
value: healthiePatientId,
|
39
|
-
},
|
40
|
-
}),
|
41
26
|
});
|
42
27
|
}
|
43
|
-
|
44
|
-
const formattedError = (0, errors_1.formatErrors)(error);
|
45
|
-
await onError(formattedError);
|
46
|
-
}
|
47
|
-
}
|
28
|
+
},
|
48
29
|
};
|
49
30
|
//# sourceMappingURL=formAnswerGroupCreated.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"formAnswerGroupCreated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/formAnswerGroupCreated.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;
|
1
|
+
{"version":3,"file":"formAnswerGroupCreated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/formAnswerGroupCreated.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,wBAAwB,EAAE;QACxB,GAAG,EAAE,0BAA0B;QAC/B,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,sBAAsB,GAG/B;IACF,GAAG,EAAE,wBAAwB;IAC7B,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAA;QAEzD,IAAI,IAAA,cAAK,EAAC,wBAAwB,CAAC,EAAE;YACnC,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,wBAAwB;iBACzB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import { type Webhook } from '@awell-health/extensions-core';
|
2
2
|
import { type HealthieWebhookPayload } from '../lib/types';
|
3
|
-
import { type settings } from '../settings';
|
4
3
|
declare const dataPoints: {
|
5
4
|
deletedFormAnswerGroupId: {
|
6
5
|
key: string;
|
7
6
|
valueType: "string";
|
8
7
|
};
|
9
8
|
};
|
10
|
-
export declare const formAnswerGroupDeleted: Webhook<keyof typeof dataPoints, HealthieWebhookPayload
|
9
|
+
export declare const formAnswerGroupDeleted: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
|
11
10
|
export type FormAnswerGroupDeleted = typeof formAnswerGroupDeleted;
|
12
11
|
export {};
|
@@ -2,9 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.formAnswerGroupDeleted = void 0;
|
4
4
|
const lodash_1 = require("lodash");
|
5
|
-
const types_1 = require("../lib/types");
|
6
|
-
const errors_1 = require("../lib/sdk/errors");
|
7
|
-
const createSdk_1 = require("../lib/sdk/createSdk");
|
8
5
|
const dataPoints = {
|
9
6
|
deletedFormAnswerGroupId: {
|
10
7
|
key: 'deletedFormAnswerGroupId',
|
@@ -15,30 +12,19 @@ exports.formAnswerGroupDeleted = {
|
|
15
12
|
key: 'formAnswerGroupDeleted',
|
16
13
|
dataPoints,
|
17
14
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
const response = await sdk.getFormAnswerGroup({
|
23
|
-
id: deletedFormAnswerGroupId,
|
15
|
+
const { resource_id: deletedFormAnswerGroupId } = payload;
|
16
|
+
if ((0, lodash_1.isNil)(deletedFormAnswerGroupId)) {
|
17
|
+
await onError({
|
18
|
+
// We should automatically send a 400 here, so no need to provide info
|
24
19
|
});
|
25
|
-
|
20
|
+
}
|
21
|
+
else {
|
26
22
|
await onSuccess({
|
27
23
|
data_points: {
|
28
24
|
deletedFormAnswerGroupId,
|
29
25
|
},
|
30
|
-
...(!(0, lodash_1.isNil)(healthiePatientId) && {
|
31
|
-
patient_identifier: {
|
32
|
-
system: types_1.HEALTHIE_IDENTIFIER,
|
33
|
-
value: healthiePatientId,
|
34
|
-
},
|
35
|
-
}),
|
36
26
|
});
|
37
27
|
}
|
38
|
-
catch (error) {
|
39
|
-
const formattedError = (0, errors_1.formatErrors)(error);
|
40
|
-
await onError(formattedError);
|
41
|
-
}
|
42
28
|
},
|
43
29
|
};
|
44
30
|
//# sourceMappingURL=formAnswerGroupDeleted.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"formAnswerGroupDeleted.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/formAnswerGroupDeleted.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;
|
1
|
+
{"version":3,"file":"formAnswerGroupDeleted.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/formAnswerGroupDeleted.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,wBAAwB,EAAE;QACxB,GAAG,EAAE,0BAA0B;QAC/B,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,sBAAsB,GAG/B;IACF,GAAG,EAAE,wBAAwB;IAC7B,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAA;QAEzD,IAAI,IAAA,cAAK,EAAC,wBAAwB,CAAC,EAAE;YACnC,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,wBAAwB;iBACzB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -1,16 +1,11 @@
|
|
1
1
|
import { type Webhook } from '@awell-health/extensions-core';
|
2
2
|
import { type HealthieWebhookPayload } from '../lib/types';
|
3
|
-
import { type settings } from '../settings';
|
4
3
|
declare const dataPoints: {
|
5
4
|
lockedFormAnswerGroupId: {
|
6
5
|
key: string;
|
7
6
|
valueType: "string";
|
8
7
|
};
|
9
|
-
lockedFormAnswerGroup: {
|
10
|
-
key: string;
|
11
|
-
valueType: "json";
|
12
|
-
};
|
13
8
|
};
|
14
|
-
export declare const formAnswerGroupLocked: Webhook<keyof typeof dataPoints, HealthieWebhookPayload
|
9
|
+
export declare const formAnswerGroupLocked: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
|
15
10
|
export type FormAnswerGroupLocked = typeof formAnswerGroupLocked;
|
16
11
|
export {};
|
@@ -2,48 +2,29 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.formAnswerGroupLocked = void 0;
|
4
4
|
const lodash_1 = require("lodash");
|
5
|
-
const types_1 = require("../lib/types");
|
6
|
-
const errors_1 = require("../lib/sdk/errors");
|
7
|
-
const createSdk_1 = require("../lib/sdk/createSdk");
|
8
5
|
const dataPoints = {
|
9
6
|
lockedFormAnswerGroupId: {
|
10
7
|
key: 'lockedFormAnswerGroupId',
|
11
8
|
valueType: 'string',
|
12
9
|
},
|
13
|
-
lockedFormAnswerGroup: {
|
14
|
-
key: 'lockedFormAnswerGroup',
|
15
|
-
valueType: 'json',
|
16
|
-
},
|
17
10
|
};
|
18
11
|
exports.formAnswerGroupLocked = {
|
19
12
|
key: 'formAnswerGroupLocked',
|
20
13
|
dataPoints,
|
21
14
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
const response = await sdk.getFormAnswerGroup({
|
27
|
-
id: lockedFormAnswerGroupId,
|
15
|
+
const { resource_id: lockedFormAnswerGroupId } = payload;
|
16
|
+
if ((0, lodash_1.isNil)(lockedFormAnswerGroupId)) {
|
17
|
+
await onError({
|
18
|
+
// We should automatically send a 400 here, so no need to provide info
|
28
19
|
});
|
29
|
-
|
20
|
+
}
|
21
|
+
else {
|
30
22
|
await onSuccess({
|
31
23
|
data_points: {
|
32
24
|
lockedFormAnswerGroupId,
|
33
|
-
lockedFormAnswerGroup: JSON.stringify((_d = response === null || response === void 0 ? void 0 : response.data) === null || _d === void 0 ? void 0 : _d.formAnswerGroup),
|
34
25
|
},
|
35
|
-
...(!(0, lodash_1.isNil)(healthiePatientId) && {
|
36
|
-
patient_identifier: {
|
37
|
-
system: types_1.HEALTHIE_IDENTIFIER,
|
38
|
-
value: healthiePatientId,
|
39
|
-
},
|
40
|
-
}),
|
41
26
|
});
|
42
27
|
}
|
43
|
-
catch (error) {
|
44
|
-
const formattedError = (0, errors_1.formatErrors)(error);
|
45
|
-
await onError(formattedError);
|
46
|
-
}
|
47
28
|
},
|
48
29
|
};
|
49
30
|
//# sourceMappingURL=formAnswerGroupLocked.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"formAnswerGroupLocked.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/formAnswerGroupLocked.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;
|
1
|
+
{"version":3,"file":"formAnswerGroupLocked.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/formAnswerGroupLocked.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,uBAAuB,EAAE;QACvB,GAAG,EAAE,yBAAyB;QAC9B,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,qBAAqB,GAG9B;IACF,GAAG,EAAE,uBAAuB;IAC5B,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,uBAAuB,EAAE,GAAG,OAAO,CAAA;QAExD,IAAI,IAAA,cAAK,EAAC,uBAAuB,CAAC,EAAE;YAClC,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,uBAAuB;iBACxB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -1,16 +1,11 @@
|
|
1
1
|
import { type Webhook } from '@awell-health/extensions-core';
|
2
2
|
import { type HealthieWebhookPayload } from '../lib/types';
|
3
|
-
import { type settings } from '../settings';
|
4
3
|
declare const dataPoints: {
|
5
4
|
signedFormAnswerGroupId: {
|
6
5
|
key: string;
|
7
6
|
valueType: "string";
|
8
7
|
};
|
9
|
-
signedFormAnswerGroup: {
|
10
|
-
key: string;
|
11
|
-
valueType: "json";
|
12
|
-
};
|
13
8
|
};
|
14
|
-
export declare const formAnswerGroupSigned: Webhook<keyof typeof dataPoints, HealthieWebhookPayload
|
9
|
+
export declare const formAnswerGroupSigned: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
|
15
10
|
export type FormAnswerGroupSigned = typeof formAnswerGroupSigned;
|
16
11
|
export {};
|
@@ -2,48 +2,29 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.formAnswerGroupSigned = void 0;
|
4
4
|
const lodash_1 = require("lodash");
|
5
|
-
const types_1 = require("../lib/types");
|
6
|
-
const errors_1 = require("../lib/sdk/errors");
|
7
|
-
const createSdk_1 = require("../lib/sdk/createSdk");
|
8
5
|
const dataPoints = {
|
9
6
|
signedFormAnswerGroupId: {
|
10
7
|
key: 'signedFormAnswerGroupId',
|
11
8
|
valueType: 'string',
|
12
9
|
},
|
13
|
-
signedFormAnswerGroup: {
|
14
|
-
key: 'signedFormAnswerGroup',
|
15
|
-
valueType: 'json',
|
16
|
-
},
|
17
10
|
};
|
18
11
|
exports.formAnswerGroupSigned = {
|
19
12
|
key: 'formAnswerGroupSigned',
|
20
13
|
dataPoints,
|
21
14
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
const response = await sdk.getFormAnswerGroup({
|
27
|
-
id: signedFormAnswerGroupId,
|
15
|
+
const { resource_id: signedFormAnswerGroupId } = payload;
|
16
|
+
if ((0, lodash_1.isNil)(signedFormAnswerGroupId)) {
|
17
|
+
await onError({
|
18
|
+
// We should automatically send a 400 here, so no need to provide info
|
28
19
|
});
|
29
|
-
|
20
|
+
}
|
21
|
+
else {
|
30
22
|
await onSuccess({
|
31
23
|
data_points: {
|
32
24
|
signedFormAnswerGroupId,
|
33
|
-
signedFormAnswerGroup: JSON.stringify((_d = response === null || response === void 0 ? void 0 : response.data) === null || _d === void 0 ? void 0 : _d.formAnswerGroup),
|
34
25
|
},
|
35
|
-
...(!(0, lodash_1.isNil)(healthiePatientId) && {
|
36
|
-
patient_identifier: {
|
37
|
-
system: types_1.HEALTHIE_IDENTIFIER,
|
38
|
-
value: healthiePatientId,
|
39
|
-
},
|
40
|
-
}),
|
41
26
|
});
|
42
27
|
}
|
43
|
-
catch (error) {
|
44
|
-
const formattedError = (0, errors_1.formatErrors)(error);
|
45
|
-
await onError(formattedError);
|
46
|
-
}
|
47
28
|
},
|
48
29
|
};
|
49
30
|
//# sourceMappingURL=formAnswerGroupSigned.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"formAnswerGroupSigned.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/formAnswerGroupSigned.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;
|
1
|
+
{"version":3,"file":"formAnswerGroupSigned.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/formAnswerGroupSigned.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,uBAAuB,EAAE;QACvB,GAAG,EAAE,yBAAyB;QAC9B,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,qBAAqB,GAG9B;IACF,GAAG,EAAE,uBAAuB;IAC5B,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,WAAW,EAAE,uBAAuB,EAAE,GAAG,OAAO,CAAA;QAExD,IAAI,IAAA,cAAK,EAAC,uBAAuB,CAAC,EAAE;YAClC,MAAM,OAAO,CAAC;YACZ,sEAAsE;aACvE,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,uBAAuB;iBACxB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import { type Webhook } from '@awell-health/extensions-core';
|
2
2
|
import { type HealthieWebhookPayload } from '../lib/types';
|
3
|
-
import { type settings } from '../settings';
|
4
3
|
declare const dataPoints: {
|
5
4
|
createdGoalId: {
|
6
5
|
key: string;
|
7
|
-
valueType: "
|
6
|
+
valueType: "string";
|
8
7
|
};
|
9
8
|
};
|
10
|
-
export declare const goalCreated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload
|
9
|
+
export declare const goalCreated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
|
11
10
|
export type GoalCreated = typeof goalCreated;
|
12
11
|
export {};
|
@@ -2,41 +2,29 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.goalCreated = void 0;
|
4
4
|
const lodash_1 = require("lodash");
|
5
|
-
const types_1 = require("../lib/types");
|
6
|
-
const createSdk_1 = require("../lib/sdk/createSdk");
|
7
|
-
const errors_1 = require("../lib/sdk/errors");
|
8
5
|
const dataPoints = {
|
9
6
|
createdGoalId: {
|
10
7
|
key: 'createdGoalId',
|
11
|
-
valueType: '
|
8
|
+
valueType: 'string',
|
12
9
|
},
|
13
10
|
};
|
14
11
|
exports.goalCreated = {
|
15
12
|
key: 'goalCreated',
|
16
13
|
dataPoints,
|
17
14
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
+
else {
|
24
22
|
await onSuccess({
|
25
23
|
data_points: {
|
26
24
|
createdGoalId,
|
27
25
|
},
|
28
|
-
...(!(0, lodash_1.isNil)(healthiePatientId) && {
|
29
|
-
patient_identifier: {
|
30
|
-
system: types_1.HEALTHIE_IDENTIFIER,
|
31
|
-
value: healthiePatientId,
|
32
|
-
},
|
33
|
-
}),
|
34
26
|
});
|
35
27
|
}
|
36
|
-
|
37
|
-
const formattedError = (0, errors_1.formatErrors)(error);
|
38
|
-
await onError(formattedError);
|
39
|
-
}
|
40
|
-
}
|
28
|
+
},
|
41
29
|
};
|
42
30
|
//# sourceMappingURL=goalCreated.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"goalCreated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/goalCreated.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;
|
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;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,aAAa;iBACd;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { type Webhook } from '@awell-health/extensions-core';
|
2
|
+
import { type HealthieWebhookPayload } from '../lib/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,30 @@
|
|
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
|
+
else {
|
22
|
+
await onSuccess({
|
23
|
+
data_points: {
|
24
|
+
deletedGoalId,
|
25
|
+
},
|
26
|
+
});
|
27
|
+
}
|
28
|
+
},
|
29
|
+
};
|
30
|
+
//# 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;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,aAAa;iBACd;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import { type Webhook } from '@awell-health/extensions-core';
|
2
2
|
import { type HealthieWebhookPayload } from '../lib/types';
|
3
|
-
import { type settings } from '../settings';
|
4
3
|
declare const dataPoints: {
|
5
4
|
updatedGoalId: {
|
6
5
|
key: string;
|
7
6
|
valueType: "string";
|
8
7
|
};
|
9
8
|
};
|
10
|
-
export declare const goalUpdated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload
|
9
|
+
export declare const goalUpdated: Webhook<keyof typeof dataPoints, HealthieWebhookPayload>;
|
11
10
|
export type GoalUpdated = typeof goalUpdated;
|
12
11
|
export {};
|