@awell-health/awell-extensions 1.0.136 → 1.0.138

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 (83) hide show
  1. package/dist/extensions/calDotCom/webhooks/bookingCreated.js +8 -6
  2. package/dist/extensions/calDotCom/webhooks/bookingCreated.js.map +1 -1
  3. package/dist/extensions/calDotCom/webhooks/bookingRescheduled.js +8 -6
  4. package/dist/extensions/calDotCom/webhooks/bookingRescheduled.js.map +1 -1
  5. package/dist/extensions/calendly/helpers.d.ts +21 -0
  6. package/dist/extensions/calendly/helpers.js +38 -0
  7. package/dist/extensions/calendly/helpers.js.map +1 -0
  8. package/dist/extensions/calendly/schema.d.ts +1408 -0
  9. package/dist/extensions/calendly/schema.js +115 -0
  10. package/dist/extensions/calendly/schema.js.map +1 -0
  11. package/dist/extensions/calendly/types.d.ts +73 -6
  12. package/dist/extensions/calendly/types.js +4 -2
  13. package/dist/extensions/calendly/types.js.map +1 -1
  14. package/dist/extensions/calendly/webhooks/eventCanceled.d.ts +8 -0
  15. package/dist/extensions/calendly/webhooks/eventCanceled.js +37 -39
  16. package/dist/extensions/calendly/webhooks/eventCanceled.js.map +1 -1
  17. package/dist/extensions/calendly/webhooks/eventCreated.d.ts +8 -0
  18. package/dist/extensions/calendly/webhooks/eventCreated.js +37 -36
  19. package/dist/extensions/calendly/webhooks/eventCreated.js.map +1 -1
  20. package/dist/extensions/calendly/webhooks/index.d.ts +1 -2
  21. package/dist/extensions/calendly/webhooks/index.js +1 -2
  22. package/dist/extensions/calendly/webhooks/index.js.map +1 -1
  23. package/dist/extensions/healthie/webhooks/appliedTagCreated.js +7 -5
  24. package/dist/extensions/healthie/webhooks/appliedTagCreated.js.map +1 -1
  25. package/dist/extensions/healthie/webhooks/appliedTagDeleted.js +7 -5
  26. package/dist/extensions/healthie/webhooks/appliedTagDeleted.js.map +1 -1
  27. package/dist/extensions/healthie/webhooks/appointmentCreated.js +7 -6
  28. package/dist/extensions/healthie/webhooks/appointmentCreated.js.map +1 -1
  29. package/dist/extensions/healthie/webhooks/appointmentDeleted.js +7 -5
  30. package/dist/extensions/healthie/webhooks/appointmentDeleted.js.map +1 -1
  31. package/dist/extensions/healthie/webhooks/appointmentUpdated.js +7 -5
  32. package/dist/extensions/healthie/webhooks/appointmentUpdated.js.map +1 -1
  33. package/dist/extensions/healthie/webhooks/formAnswerGroupCreated.js +7 -5
  34. package/dist/extensions/healthie/webhooks/formAnswerGroupCreated.js.map +1 -1
  35. package/dist/extensions/healthie/webhooks/formAnswerGroupDeleted.js +7 -5
  36. package/dist/extensions/healthie/webhooks/formAnswerGroupDeleted.js.map +1 -1
  37. package/dist/extensions/healthie/webhooks/formAnswerGroupLocked.js +7 -5
  38. package/dist/extensions/healthie/webhooks/formAnswerGroupLocked.js.map +1 -1
  39. package/dist/extensions/healthie/webhooks/formAnswerGroupSigned.js +7 -5
  40. package/dist/extensions/healthie/webhooks/formAnswerGroupSigned.js.map +1 -1
  41. package/dist/extensions/healthie/webhooks/goalCreated.js +7 -5
  42. package/dist/extensions/healthie/webhooks/goalCreated.js.map +1 -1
  43. package/dist/extensions/healthie/webhooks/goalDeleted.js +7 -5
  44. package/dist/extensions/healthie/webhooks/goalDeleted.js.map +1 -1
  45. package/dist/extensions/healthie/webhooks/goalUpdated.js +7 -5
  46. package/dist/extensions/healthie/webhooks/goalUpdated.js.map +1 -1
  47. package/dist/extensions/healthie/webhooks/labOrderCreated.js +7 -5
  48. package/dist/extensions/healthie/webhooks/labOrderCreated.js.map +1 -1
  49. package/dist/extensions/healthie/webhooks/labOrderUpdated.js +7 -5
  50. package/dist/extensions/healthie/webhooks/labOrderUpdated.js.map +1 -1
  51. package/dist/extensions/healthie/webhooks/messageCreated.js +7 -5
  52. package/dist/extensions/healthie/webhooks/messageCreated.js.map +1 -1
  53. package/dist/extensions/healthie/webhooks/messageDeleted.js +7 -5
  54. package/dist/extensions/healthie/webhooks/messageDeleted.js.map +1 -1
  55. package/dist/extensions/healthie/webhooks/metricEntryCreated.js +7 -5
  56. package/dist/extensions/healthie/webhooks/metricEntryCreated.js.map +1 -1
  57. package/dist/extensions/healthie/webhooks/metricEntryDeleted.js +7 -5
  58. package/dist/extensions/healthie/webhooks/metricEntryDeleted.js.map +1 -1
  59. package/dist/extensions/healthie/webhooks/metricEntryUpdated.js +7 -5
  60. package/dist/extensions/healthie/webhooks/metricEntryUpdated.js.map +1 -1
  61. package/dist/extensions/healthie/webhooks/patientCreated.js +7 -5
  62. package/dist/extensions/healthie/webhooks/patientCreated.js.map +1 -1
  63. package/dist/extensions/healthie/webhooks/patientUpdated.js +7 -5
  64. package/dist/extensions/healthie/webhooks/patientUpdated.js.map +1 -1
  65. package/dist/extensions/healthie/webhooks/requestedFormCompletionCreated.js +7 -5
  66. package/dist/extensions/healthie/webhooks/requestedFormCompletionCreated.js.map +1 -1
  67. package/dist/extensions/healthie/webhooks/requestedFormCompletionDeleted.js +7 -5
  68. package/dist/extensions/healthie/webhooks/requestedFormCompletionDeleted.js.map +1 -1
  69. package/dist/extensions/healthie/webhooks/requestedFormCompletionUpdated.js +7 -5
  70. package/dist/extensions/healthie/webhooks/requestedFormCompletionUpdated.js.map +1 -1
  71. package/dist/extensions/healthie/webhooks/taskCreated.js +7 -5
  72. package/dist/extensions/healthie/webhooks/taskCreated.js.map +1 -1
  73. package/dist/extensions/healthie/webhooks/taskDeleted.js +7 -5
  74. package/dist/extensions/healthie/webhooks/taskDeleted.js.map +1 -1
  75. package/dist/extensions/healthie/webhooks/taskUpdated.js +7 -5
  76. package/dist/extensions/healthie/webhooks/taskUpdated.js.map +1 -1
  77. package/dist/extensions/markdown.json +2 -2
  78. package/dist/src/tests/constants.js +2 -1
  79. package/dist/src/tests/constants.js.map +1 -1
  80. package/package.json +1 -1
  81. package/dist/extensions/calendly/webhooks/eventRescheduled.d.ts +0 -71
  82. package/dist/extensions/calendly/webhooks/eventRescheduled.js +0 -111
  83. package/dist/extensions/calendly/webhooks/eventRescheduled.js.map +0 -1
@@ -18,11 +18,13 @@ exports.taskUpdated = {
18
18
  // We should automatically send a 400 here, so no need to provide info
19
19
  });
20
20
  }
21
- await onSuccess({
22
- data_points: {
23
- updatedTaskId,
24
- },
25
- });
21
+ else {
22
+ await onSuccess({
23
+ data_points: {
24
+ updatedTaskId,
25
+ },
26
+ });
27
+ }
26
28
  },
27
29
  };
28
30
  //# sourceMappingURL=taskUpdated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taskUpdated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/taskUpdated.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"}
1
+ {"version":3,"file":"taskUpdated.js","sourceRoot":"","sources":["../../../../extensions/healthie/webhooks/taskUpdated.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"}
@@ -12,8 +12,8 @@
12
12
  "changelog": "# Cal.com changelog\n\n## September 15, 2023\n\n- add createBooking action\n- add first attendee name and timezone to getBooking data points\n\n## September 4, 2023\n\n- add updateBooking and deleteBooking actions\n- update and refactor structure of getBooking and bookAppointment actions\n\n## July 4, 2023\n\n- Get booking action: add validation that bookingId and apiKey are not empty\n- Get booking action: add validation of response data to make sure we have data points\n\n## April 27, 2023\n\n- Get booking action: `startTime` and `endTime` data points are now of value type `date` instead of `string`.\n"
13
13
  },
14
14
  "calendly": {
15
- "readme": "---\ntitle: Calendly\ndescription: Calendly is your scheduling automation platform for eliminating the back-and-forth emails to find the perfect time\n---\n\n# Calendly\n\n[Calendly](https://calendly.com/) is the scheduling automation platform with team-based scheduling, solutions and integrations for every department, and advanced security features. Note that Calendly is not HIPAA-compliant, so is not endorsed by Awell. If you wish to use a HIPAA-compliant scheduling solution, we recommend using our Cal.com extension instead.\n\n## Extension settings\n\nIn order to set up this extension, **you will need to provide a Calendly API key**. You can obtain an API key via the Calendly portal (`Settings > Developer > API keys`).\n\n## Pricing\n\n**This extension is free** but keep in mind that you might need a paid plan for Calendly depending on your needs.\n\n## Webhooks\n\nWebhooks offer a great way to automate the flow with Awell when invitees schedule, cancel, or reschedule events, or when the meeting ends.\n\n**Important notes:**\n\n1. An Awell webhook endpoint can only listen to one event type. So make sure that when you create a webhook in Calendly, the subscriber URL and the event trigger match the Awell webhook endpoint. This also means there can only be one event type per subscriber URL.\n2. Using a secret to verify the authenticity of the received payload is not yet supported.\n3. Custom payload templates are not supported, please use the default ones.\n",
16
- "changelog": "# Calendly changelog\n\n## November 3, 2023\n\n- Calendly webhooks for event created, canceled and rescheduled are now supported.\n"
15
+ "readme": "---\ntitle: Calendly\ndescription: Calendly is your scheduling automation platform for eliminating the back-and-forth emails to find the perfect time\n---\n\n# Calendly\n\n[Calendly](https://calendly.com/) is the scheduling automation platform with team-based scheduling, solutions and integrations for every department, and advanced security features. Note that Calendly is not HIPAA-compliant, so is not endorsed by Awell. If you wish to use a HIPAA-compliant scheduling solution, we recommend using our Cal.com extension instead.\n\n## Extension settings\n\nIn order to set up this extension, **you will need to provide a Calendly API key**. You can obtain an API key via the Calendly portal (`Settings > Developer > API keys`).\n\n## Pricing\n\n**This extension is free** but keep in mind that you might need a paid plan for Calendly depending on your needs.\n\n## Webhooks\n\nWebhooks offer a great way to automate the flow with Awell when invitees schedule, cancel, or reschedule events, or when the meeting ends.\n\n**Important notes:**\n\n1. An Awell webhook endpoint can only listen to one event type. So make sure that when you create a webhook in Calendly, the subscriber URL and the event trigger match the Awell webhook endpoint. This also means there can only be one event type per subscriber URL.\n2. Using a secret to verify the authenticity of the received payload is not yet supported.\n3. Custom payload templates are not supported, please use the default ones.\n\n## Notes about rescheduled appointments\n\nApparently, Calendly doesn't make it completely clear when an `invitee.created` event is created and sent via a webhook. Instead, the `rescheduled` field is part of the `invitee.cancelled` webhook, and the `old_invitee` field is populated in the new `invitee.created` event. So, this extension uses a `is_rescheduled_event` field in the `invitee.created` listener to reflect an `old_invitee` being present. So:\n\nIn order to check to see if an **event was rescheduled** (rather than a new event):\n\n- validate `is_rescheduled_event` is true\n\nIn order to understand if a **cancellation was actually a rescheduling**:\n\n- validate `rescheduled` is true\n",
16
+ "changelog": "# Calendly changelog\n\n## November 3, 2023\n\n- Calendly webhooks for event created, canceled and rescheduled are now supported.\n\n## November 20, 2023\n\n- Removed rescheduled event; expectation is that the rescheduling should be handled on the client side, given Calendly does not direcly support a rescheduled webhook\n"
17
17
  },
18
18
  "canvasMedical": {
19
19
  "readme": "---\ntitle: Canvas Medical\ndescription: Canvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users.\n---\n\n# Canvas Medical\n\nCanvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users. Leveraging certified EHR as a foundation, Canvas Medical offers a comprehensive suite of APIs, enabling customers to swiftly launch innovative patient experiences and cost-effective business models.\n\nCanvas Medical provides appointment management, patient data creation and updates, task management, questionnaire creation, and much more.\n\n## Extension settings\n\nFor the extension to function correctly, you must include the following elements in your settings:\n\n`client_id` and `client_secret`: These values are generated on the Canvas Medical platform.\n`base_url`: This determines the base URL for your FHIR endpoint.\n`auth_url`: This determines the base URL for your authorization endpoint.\n\n### Create appointment\n\nEasily schedule appointments with providers using the Canvas API. This action allows you to reserve a meeting with a healthcare provider by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the unique `appointmentId`, serving as the key within the Canvas API object.\n\n### Create patient\n\nEffortlessly create patients using the Canvas API. This action allows you to generate a new patient record by submitting `patientData` in JSON format. Upon successful execution, the data points returns the unique `patientId`, serving as the key within the Canvas API object.\n\n### Create task\n\nEfficiently create tasks associated with a specific patient using the Canvas API. This action allows you to generate a new task linked to a designated patient by submitting `taskData` in JSON format. Upon successful execution, the data points returns the unique `taskId`, serving as the key within the Canvas API object.\n\n### Create questionnaire responses\n\nCreate questionnaire responses using the Canvas API to effortlessly record answers within an existing questionnaire. This action requires several parameters:\n\n- `Questionnaire ID`: Reference to the Canvas Questionnaire using the questionnaire id.\n- `Subject ID`: Reference to the Canvas Patient using the patient id.\n- `Authored`: Timestamp when the Questionnaire response was filled out (If omitted, the current timestamp at data ingestion will be used).\n- `Author ID`: Reference to the patient or practitioner filling out the questionnaire. If omitted, it defaults to Canvas Bot.\n- `Item`: List of answers to questions in the questionnaire.\n\nUpon successful execution, the data points returns `questionnaireResponseId`, which serves as the key within the Canvas API object.\n\n### Update appointment\n\nEffortlessly cancel or modify a reserved appointment using the Canvas API. This action allows you to update appointment details by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the `appointmentId`, serving as the key within the Canvas API object.\n\n### Update patient\n\nEfficiently update existing patient information within the system using the Canvas API. This action allows you to modify data by submitting `patientData` in JSON format. Upon successful execution, the data points returns the `patientId`, which serves as the key within the Canvas API object\n\n### Update task\n\nEfficiently update existing task information within the system using the Canvas API. This action allows you to modify data by submitting `taskData` in JSON format. Upon successful execution, the action returns the `taskId`, which serves as the key within the Canvas API object.\n\n### Create coverage\n\nEfficiently create a coverage using the Canvas API. This action requires several parameters:\n\n- `Order`: Specifies the order in which insurance coverages should be utilized when processing claims.\n- `Status`: Refers to the statuses represented within the Canvas Medical system.\n- `Type`: Pertains to the Insurance Coverage Code Category, such as medical or accident, using values from http://hl7.org/fhir/ValueSet/coverage-type.\n- `Subscriber`: Refers to the Canvas Patient using the patient ID, serving as the resource for the coverage's subscriber.\n- `Subscriber ID`: Refers to the Canvas Patient using the patient ID.\n- `Beneficiary`: Specifies the intended patient for the coverage.\n- `Relationship`: Relates to the beneficiary's relationship to the subscriber, as defined in the http://hl7.org/fhir/ValueSet/.\n- `Period start`: Indicates when the coverage became active for the patient.\n- `Period end`: Indicates when the coverage ceased to be active for the patient.\n- `Payor`: Relates to the entity responsible for payment.\n- `Class`: Utilized to define the plan, subplan, group, and subgroup.\n\n### Update coverage\n\nEfficiently update existin coverage using the Canvas API. This action requires several parameters:\n\n- `Id`: Reference to the Canvas Coverage using the coverage id.\n- `Order`: Specifies the order in which insurance coverages should be utilized when processing claims.\n- `Status`: Refers to the statuses represented within the Canvas Medical system.\n- `Type`: Pertains to the Insurance Coverage Code Category, such as medical or accident, using values from http://hl7.org/fhir/ValueSet/coverage-type.\n- `Subscriber`: Refers to the Canvas Patient using the patient ID, serving as the resource for the coverage's subscriber.\n- `Subscriber ID`: Refers to the Canvas Patient using the patient ID.\n- `Beneficiary`: Specifies the intended patient for the coverage.\n- `Relationship`: Relates to the beneficiary's relationship to the subscriber, as defined in the http://hl7.org/fhir/ValueSet/.\n- `Period start`: Indicates when the coverage became active for the patient.\n- `Period end`: Indicates when the coverage ceased to be active for the patient.\n- `Payor`: Relates to the entity responsible for payment.\n- `Class`: Utilized to define the plan, subplan, group, and subgroup.\n\n### Create claim\n\nCreate claim using the Canvas API. This action requires several parameters:\n\n- `status`: Status compliant with Canvas Medical.\n- `type`: Type compliant with Canvas Medical.\n- `patientId`: Reference to the Canvas Patient using the patient id.\n- `created`: The field indicating when this claim resource was created\n- `provider`: The field related to determining personnel resources for services in the statement\n- `supportingInfo`: Supporting info compliant with Canvas Medical.\n- `diagnosis`: The field represents the list will create the Assessments in Canvas for this claim.\n- `insurance`: The field represents the list of elements that defines what coverages are to be used when adjudicating the claim.\n- `item`: The field represents the list of service charges to be used in the claim.\n\nUpon successful execution, the data points returns `claimId`, which serves as the key within the Canvas API object.\n\n",
@@ -18,7 +18,8 @@ exports.testPayload = {
18
18
  settings: {},
19
19
  };
20
20
  const generateTestPayload = ({ fields, settings, ...value }) => ({
21
- ...(0, lodash_1.merge)(exports.testPayload, value),
21
+ // merge will mutate the first object, which is a little dangerous
22
+ ...(0, lodash_1.merge)({}, exports.testPayload, value),
22
23
  fields,
23
24
  settings,
24
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/tests/constants.ts"],"names":[],"mappings":";;;AACA,mCAA8B;AAEjB,QAAA,WAAW,GAAiC;IACvD,OAAO,EAAE;QACP,EAAE,EAAE,YAAY;QAChB,aAAa,EAAE,uBAAuB;KACvC;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,aAAa;QACjB,SAAS,EAAE,YAAY;KACxB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,cAAc;KACnB;IACD,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;CACb,CAAA;AAkBM,MAAM,mBAAmB,GAAG,CAGjC,EACA,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EAIT,EAAgC,EAAE,CAAC,CAAC;IACnC,GAAG,IAAA,cAAK,EAAC,mBAAW,EAAE,KAAK,CAAC;IAC5B,MAAM;IACN,QAAQ;CACT,CAAC,CAAA;AAdW,QAAA,mBAAmB,uBAc9B"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/tests/constants.ts"],"names":[],"mappings":";;;AACA,mCAA8B;AAEjB,QAAA,WAAW,GAAiC;IACvD,OAAO,EAAE;QACP,EAAE,EAAE,YAAY;QAChB,aAAa,EAAE,uBAAuB;KACvC;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,aAAa;QACjB,SAAS,EAAE,YAAY;KACxB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,cAAc;KACnB;IACD,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;CACb,CAAA;AAkBM,MAAM,mBAAmB,GAAG,CAGjC,EACA,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EAIT,EAAgC,EAAE,CAAC,CAAC;IACnC,kEAAkE;IAClE,GAAG,IAAA,cAAK,EAAC,EAAE,EAAE,mBAAW,EAAE,KAAK,CAAC;IAChC,MAAM;IACN,QAAQ;CACT,CAAC,CAAA;AAfW,QAAA,mBAAmB,uBAe9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.136",
3
+ "version": "1.0.138",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -1,71 +0,0 @@
1
- import { type Webhook } from '@awell-health/extensions-core';
2
- import { type CalendlyWebhookPayload } from '../types';
3
- declare const dataPoints: {
4
- eventId: {
5
- key: string;
6
- valueType: "string";
7
- };
8
- eventTypeId: {
9
- key: string;
10
- valueType: "string";
11
- };
12
- inviteeEmail: {
13
- key: string;
14
- valueType: "string";
15
- };
16
- inviteeFirstName: {
17
- key: string;
18
- valueType: "string";
19
- };
20
- inviteeLastName: {
21
- key: string;
22
- valueType: "string";
23
- };
24
- inviteeName: {
25
- key: string;
26
- valueType: "string";
27
- };
28
- inviteeStatus: {
29
- key: string;
30
- valueType: "string";
31
- };
32
- inviteeTimezone: {
33
- key: string;
34
- valueType: "string";
35
- };
36
- hostEmail: {
37
- key: string;
38
- valueType: "string";
39
- };
40
- startTime: {
41
- key: string;
42
- valueType: "date";
43
- };
44
- endTime: {
45
- key: string;
46
- valueType: "date";
47
- };
48
- cancelUrl: {
49
- key: string;
50
- valueType: "string";
51
- };
52
- rescheduleUrl: {
53
- key: string;
54
- valueType: "string";
55
- };
56
- videoCallUrl: {
57
- key: string;
58
- valueType: "string";
59
- };
60
- eventName: {
61
- key: string;
62
- valueType: "string";
63
- };
64
- inviteePhoneNumber: {
65
- key: string;
66
- valueType: "string";
67
- };
68
- };
69
- export declare const eventRescheduled: Webhook<keyof typeof dataPoints, CalendlyWebhookPayload>;
70
- export type EventRescheduled = typeof eventRescheduled;
71
- export {};
@@ -1,111 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eventRescheduled = void 0;
4
- const lodash_1 = require("lodash");
5
- const dataPoints = {
6
- eventId: {
7
- key: 'eventId',
8
- valueType: 'string',
9
- },
10
- eventTypeId: {
11
- key: 'eventTypeId',
12
- valueType: 'string',
13
- },
14
- inviteeEmail: {
15
- key: 'inviteeEmail',
16
- valueType: 'string',
17
- },
18
- inviteeFirstName: {
19
- key: 'inviteeFirstName',
20
- valueType: 'string',
21
- },
22
- inviteeLastName: {
23
- key: 'inviteeLastName',
24
- valueType: 'string',
25
- },
26
- inviteeName: {
27
- key: 'inviteeName',
28
- valueType: 'string',
29
- },
30
- inviteeStatus: {
31
- key: 'inviteeStatus',
32
- valueType: 'string',
33
- },
34
- inviteeTimezone: {
35
- key: 'inviteeTimezone',
36
- valueType: 'string',
37
- },
38
- hostEmail: {
39
- key: 'hostEmail',
40
- valueType: 'string',
41
- },
42
- startTime: {
43
- key: 'startTime',
44
- valueType: 'date',
45
- },
46
- endTime: {
47
- key: 'endTime',
48
- valueType: 'date',
49
- },
50
- cancelUrl: {
51
- key: 'cancelUrl',
52
- valueType: 'string',
53
- },
54
- rescheduleUrl: {
55
- key: 'rescheduleUrl',
56
- valueType: 'string',
57
- },
58
- videoCallUrl: {
59
- key: 'videoCallUrl',
60
- valueType: 'string',
61
- },
62
- eventName: {
63
- key: 'eventName',
64
- valueType: 'string',
65
- },
66
- inviteePhoneNumber: {
67
- key: 'inviteePhoneNumber',
68
- valueType: 'string',
69
- }
70
- };
71
- exports.eventRescheduled = {
72
- key: 'eventRescheduled',
73
- dataPoints,
74
- onWebhookReceived: async ({ payload }, onSuccess, onError) => {
75
- var _a, _b;
76
- const { payload: { email, first_name, last_name, name, scheduled_event, status, timezone, cancel_url, reschedule_url, rescheduled, old_invitee }, } = payload;
77
- if (rescheduled) {
78
- // https://api.calendly.com/scheduled_events/GBGBDCAADAEDCRZ2 => GBGBDCAADAEDCRZ2
79
- const scheduledEventId = scheduled_event.uri.split('/').pop();
80
- const scheduledEventTypeId = scheduled_event.event_type.split('/').pop();
81
- const hostEmail = scheduled_event.event_memberships.length > 0
82
- ? scheduled_event.event_memberships[0].user_email
83
- : '';
84
- if (!(0, lodash_1.isNil)(scheduledEventId) &&
85
- !(0, lodash_1.isNil)(scheduledEventTypeId) &&
86
- !(0, lodash_1.isEmpty)(old_invitee)) {
87
- await onSuccess({
88
- data_points: {
89
- eventId: scheduledEventId,
90
- eventTypeId: scheduledEventTypeId,
91
- inviteeEmail: email,
92
- inviteeFirstName: first_name,
93
- inviteeLastName: last_name,
94
- inviteeName: name,
95
- inviteeStatus: status,
96
- inviteeTimezone: timezone,
97
- startTime: scheduled_event.start_time,
98
- endTime: scheduled_event.end_time,
99
- cancelUrl: cancel_url,
100
- rescheduleUrl: reschedule_url,
101
- hostEmail,
102
- videoCallUrl: (_a = scheduled_event.location.join_url) !== null && _a !== void 0 ? _a : "",
103
- inviteePhoneNumber: (_b = scheduled_event.text_reminder_number) !== null && _b !== void 0 ? _b : "",
104
- eventName: scheduled_event.name
105
- },
106
- });
107
- }
108
- }
109
- },
110
- };
111
- //# sourceMappingURL=eventRescheduled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventRescheduled.js","sourceRoot":"","sources":["../../../../extensions/calendly/webhooks/eventRescheduled.ts"],"names":[],"mappings":"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"}