@awell-health/awell-extensions 2.0.115 → 2.0.116

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.appointmentCreatedOrUpdated = void 0;
4
4
  const constants_1 = require("../constants");
5
- const appointments_1 = require("../types/webhooks/appointments");
6
5
  const dataPoints = {
7
6
  appointmentId: {
8
7
  key: 'appointmentId',
@@ -17,7 +16,7 @@ exports.appointmentCreatedOrUpdated = {
17
16
  key: 'appointmentCreatedOrUpdated',
18
17
  dataPoints,
19
18
  onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
20
- const { action, resource, data } = appointments_1.AppointmentsPayloadSchema.parse(payload);
19
+ const { action, resource, data } = payload;
21
20
  const { id: appointmentId, patient: patientId } = data;
22
21
  // skip non 'saved' actions for that webhook
23
22
  if (action !== 'saved') {
@@ -1 +1 @@
1
- {"version":3,"file":"appointmentCreatedOrUpdated.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/appointmentCreatedOrUpdated.ts"],"names":[],"mappings":";;;AAIA,4CAA6C;AAE7C,iEAA0E;AAE1E,MAAM,UAAU,GAAG;IACjB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;IACD,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA;AAElC,QAAA,2BAA2B,GAGpC;IACF,GAAG,EAAE,6BAA6B;IAClC,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,wCAAyB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC3E,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;QACtD,6CAA6C;QAC7C,IAAI,MAAM,KAAK,OAAO,EAAE;YACtB,OAAM;SACP;QAED,IAAI,QAAQ,KAAK,cAAc,EAAE;YAC/B,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,gCAAgC;iBAC1C;aACF,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC;oBACpC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBAClC;gBACD,kBAAkB,EAAE;oBAClB,MAAM,EAAE,0BAAc;oBACtB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC;iBACzB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"appointmentCreatedOrUpdated.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/appointmentCreatedOrUpdated.ts"],"names":[],"mappings":";;;AAIA,4CAA6C;AAG7C,MAAM,UAAU,GAAG;IACjB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;IACD,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA;AAElC,QAAA,2BAA2B,GAGpC;IACF,GAAG,EAAE,6BAA6B;IAClC,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;QAC1C,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;QAEtD,6CAA6C;QAC7C,IAAI,MAAM,KAAK,OAAO,EAAE;YACtB,OAAM;SACP;QAED,IAAI,QAAQ,KAAK,cAAc,EAAE;YAC/B,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,gCAAgC;iBAC1C;aACF,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC;oBACpC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBAClC;gBACD,kBAAkB,EAAE;oBAClB,MAAM,EAAE,0BAAc;oBACtB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC;iBACzB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.115",
3
+ "version": "2.0.116",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -1,69 +0,0 @@
1
- import z from 'zod';
2
- /**
3
- * This is not the full payload, only the most interesting parts
4
- */
5
- export declare const AppointmentsPayloadSchema: z.ZodObject<{
6
- event_id: z.ZodNumber;
7
- application_id: z.ZodString;
8
- resource: z.ZodString;
9
- action: z.ZodEnum<["saved", "deleted"]>;
10
- data: z.ZodObject<{
11
- id: z.ZodNumber;
12
- scheduled_date: z.ZodDate;
13
- duration: z.ZodNumber;
14
- reason: z.ZodString;
15
- mode: z.ZodString;
16
- patient: z.ZodNumber;
17
- physician: z.ZodNumber;
18
- practice: z.ZodNumber;
19
- }, "strip", z.ZodTypeAny, {
20
- duration: number;
21
- id: number;
22
- patient: number;
23
- mode: string;
24
- reason: string;
25
- scheduled_date: Date;
26
- physician: number;
27
- practice: number;
28
- }, {
29
- duration: number;
30
- id: number;
31
- patient: number;
32
- mode: string;
33
- reason: string;
34
- scheduled_date: Date;
35
- physician: number;
36
- practice: number;
37
- }>;
38
- }, "strip", z.ZodTypeAny, {
39
- data: {
40
- duration: number;
41
- id: number;
42
- patient: number;
43
- mode: string;
44
- reason: string;
45
- scheduled_date: Date;
46
- physician: number;
47
- practice: number;
48
- };
49
- resource: string;
50
- action: "saved" | "deleted";
51
- event_id: number;
52
- application_id: string;
53
- }, {
54
- data: {
55
- duration: number;
56
- id: number;
57
- patient: number;
58
- mode: string;
59
- reason: string;
60
- scheduled_date: Date;
61
- physician: number;
62
- practice: number;
63
- };
64
- resource: string;
65
- action: "saved" | "deleted";
66
- event_id: number;
67
- application_id: string;
68
- }>;
69
- export type AppointmentsPayload = z.infer<typeof AppointmentsPayloadSchema>;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AppointmentsPayloadSchema = void 0;
7
- const zod_1 = __importDefault(require("zod"));
8
- /**
9
- * This is not the full payload, only the most interesting parts
10
- */
11
- exports.AppointmentsPayloadSchema = zod_1.default.object({
12
- event_id: zod_1.default.number(),
13
- application_id: zod_1.default.string(),
14
- resource: zod_1.default.string(),
15
- action: zod_1.default.enum(['saved', 'deleted']),
16
- data: zod_1.default.object({
17
- id: zod_1.default.number(),
18
- scheduled_date: zod_1.default.coerce.date(),
19
- duration: zod_1.default.number(),
20
- reason: zod_1.default.string(),
21
- mode: zod_1.default.string(),
22
- patient: zod_1.default.number(),
23
- physician: zod_1.default.number(),
24
- practice: zod_1.default.number(),
25
- }),
26
- });
27
- //# sourceMappingURL=appointments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"appointments.js","sourceRoot":"","sources":["../../../../../extensions/elation/types/webhooks/appointments.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmB;AAEnB;;GAEG;AACU,QAAA,yBAAyB,GAAG,aAAC,CAAC,MAAM,CAAC;IAChD,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;IACpB,cAAc,EAAE,aAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACpC,IAAI,EAAE,aAAC,CAAC,MAAM,CAAC;QACb,EAAE,EAAE,aAAC,CAAC,MAAM,EAAE;QACd,cAAc,EAAE,aAAC,CAAC,MAAM,CAAC,IAAI,EAAE;QAC/B,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;QACpB,MAAM,EAAE,aAAC,CAAC,MAAM,EAAE;QAClB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE;QACnB,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;KACrB,CAAC;CACH,CAAC,CAAA"}