@awell-health/awell-extensions 1.0.133 → 1.0.134
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.
@@ -5,6 +5,10 @@ declare const dataPoints: {
|
|
5
5
|
key: string;
|
6
6
|
valueType: "string";
|
7
7
|
};
|
8
|
+
eventTypeId: {
|
9
|
+
key: string;
|
10
|
+
valueType: "string";
|
11
|
+
};
|
8
12
|
inviteeEmail: {
|
9
13
|
key: string;
|
10
14
|
valueType: "string";
|
@@ -29,6 +33,38 @@ declare const dataPoints: {
|
|
29
33
|
key: string;
|
30
34
|
valueType: "string";
|
31
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
|
+
};
|
32
68
|
};
|
33
69
|
export declare const eventCanceled: Webhook<keyof typeof dataPoints, CalendlyWebhookPayload>;
|
34
70
|
export type EventCanceled = typeof eventCanceled;
|
@@ -7,6 +7,10 @@ const dataPoints = {
|
|
7
7
|
key: 'eventId',
|
8
8
|
valueType: 'string',
|
9
9
|
},
|
10
|
+
eventTypeId: {
|
11
|
+
key: 'eventTypeId',
|
12
|
+
valueType: 'string',
|
13
|
+
},
|
10
14
|
inviteeEmail: {
|
11
15
|
key: 'inviteeEmail',
|
12
16
|
valueType: 'string',
|
@@ -31,27 +35,75 @@ const dataPoints = {
|
|
31
35
|
key: 'inviteeTimezone',
|
32
36
|
valueType: 'string',
|
33
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
|
+
}
|
34
70
|
};
|
35
71
|
exports.eventCanceled = {
|
36
72
|
key: 'eventCanceled',
|
37
73
|
dataPoints,
|
38
74
|
onWebhookReceived: async ({ payload }, onSuccess, onError) => {
|
39
|
-
|
75
|
+
var _a, _b;
|
76
|
+
const { payload: { email, first_name, last_name, name, scheduled_event, status, timezone, cancel_url, reschedule_url, rescheduled, }, } = payload;
|
40
77
|
if (rescheduled) {
|
41
78
|
return;
|
42
79
|
}
|
43
80
|
// https://api.calendly.com/scheduled_events/GBGBDCAADAEDCRZ2 => GBGBDCAADAEDCRZ2
|
44
81
|
const scheduledEventId = scheduled_event.uri.split('/').pop();
|
45
|
-
|
82
|
+
const scheduledEventTypeId = scheduled_event.event_type.split('/').pop();
|
83
|
+
const hostEmail = scheduled_event.event_memberships.length > 0
|
84
|
+
? scheduled_event.event_memberships[0].user_email
|
85
|
+
: '';
|
86
|
+
if (!(0, lodash_1.isNil)(scheduledEventId) &&
|
87
|
+
!(0, lodash_1.isNil)(scheduledEventTypeId) &&
|
88
|
+
!rescheduled) {
|
46
89
|
await onSuccess({
|
47
90
|
data_points: {
|
48
91
|
eventId: scheduledEventId,
|
92
|
+
eventTypeId: scheduledEventTypeId,
|
49
93
|
inviteeEmail: email,
|
50
94
|
inviteeFirstName: first_name,
|
51
95
|
inviteeLastName: last_name,
|
52
96
|
inviteeName: name,
|
53
97
|
inviteeStatus: status,
|
54
98
|
inviteeTimezone: timezone,
|
99
|
+
startTime: scheduled_event.start_time,
|
100
|
+
endTime: scheduled_event.end_time,
|
101
|
+
cancelUrl: cancel_url,
|
102
|
+
rescheduleUrl: reschedule_url,
|
103
|
+
hostEmail,
|
104
|
+
videoCallUrl: (_a = scheduled_event.location.join_url) !== null && _a !== void 0 ? _a : "",
|
105
|
+
inviteePhoneNumber: (_b = scheduled_event.text_reminder_number) !== null && _b !== void 0 ? _b : "",
|
106
|
+
eventName: scheduled_event.name
|
55
107
|
},
|
56
108
|
});
|
57
109
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"eventCanceled.js","sourceRoot":"","sources":["../../../../extensions/calendly/webhooks/eventCanceled.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,QAAQ;KACpB;IACD,YAAY,EAAE;QACZ,GAAG,EAAE,cAAc;QACnB,SAAS,EAAE,QAAQ;KACpB;IACD,gBAAgB,EAAE;QAChB,GAAG,EAAE,kBAAkB;QACvB,SAAS,EAAE,QAAQ;KACpB;IACD,eAAe,EAAE;QACf,GAAG,EAAE,iBAAiB;QACtB,SAAS,EAAE,QAAQ;KACpB;IACD,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;IACD,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;IACD,eAAe,EAAE;QACf,GAAG,EAAE,iBAAiB;QACtB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,aAAa,GAGtB;IACF,GAAG,EAAE,eAAe;IACpB,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE
|
1
|
+
{"version":3,"file":"eventCanceled.js","sourceRoot":"","sources":["../../../../extensions/calendly/webhooks/eventCanceled.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAO9B,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,QAAQ;KACpB;IACD,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;IACD,YAAY,EAAE;QACZ,GAAG,EAAE,cAAc;QACnB,SAAS,EAAE,QAAQ;KACpB;IACD,gBAAgB,EAAE;QAChB,GAAG,EAAE,kBAAkB;QACvB,SAAS,EAAE,QAAQ;KACpB;IACD,eAAe,EAAE;QACf,GAAG,EAAE,iBAAiB;QACtB,SAAS,EAAE,QAAQ;KACpB;IACD,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;IACD,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;IACD,eAAe,EAAE;QACf,GAAG,EAAE,iBAAiB;QACtB,SAAS,EAAE,QAAQ;KACpB;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,MAAM;KAClB;IACD,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,SAAS,E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C,WAAW,EACZ;YACA,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE;oBACX,OAAO,EAAE,gBAAgB;oBACzB,WAAW,EAAE,oBAAoB;oBACjC,YAAY,EAAE,KAAK;oBACnB,gBAAgB,EAAE,UAAU;oBAC5B,eAAe,EAAE,SAAS;oBAC1B,WAAW,EAAE,IAAI;oBACjB,aAAa,EAAE,MAAM;oBACrB,eAAe,EAAE,QAAQ;oBACzB,SAAS,EAAE,eAAe,CAAC,UAAU;oBACrC,OAAO,EAAE,eAAe,CAAC,QAAQ;oBACjC,SAAS,EAAE,UAAU;oBACrB,aAAa,EAAE,cAAc;oBAC7B,SAAS;oBACT,YAAY,EAAE,MAAA,eAAe,CAAC,QAAQ,CAAC,QAAQ,mCAAI,EAAE;oBACrD,kBAAkB,EAAE,MAAA,eAAe,CAAC,oBAAoB,mCAAI,EAAE;oBAC9D,SAAS,EAAE,eAAe,CAAC,IAAI;iBAChC;aACF,CAAC,CAAA;SACH;QAED,MAAM,OAAO,CAAC;QACZ,sEAAsE;SACvE,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
export type { EventCreated } from './eventCreated';
|
2
2
|
export type { EventCanceled } from './eventCanceled';
|
3
3
|
export type { EventRescheduled } from './eventRescheduled';
|
4
|
-
export declare const webhooks: import("@awell-health/extensions-core").Webhook<"eventId" | "inviteeEmail" | "inviteeFirstName" | "inviteeLastName" | "inviteeName" | "inviteeStatus" | "inviteeTimezone", import("../types").CalendlyWebhookPayload>[];
|
4
|
+
export declare const webhooks: import("@awell-health/extensions-core").Webhook<"endTime" | "startTime" | "eventTypeId" | "videoCallUrl" | "cancelUrl" | "rescheduleUrl" | "eventId" | "inviteeEmail" | "inviteeFirstName" | "inviteeLastName" | "inviteeName" | "inviteeStatus" | "inviteeTimezone" | "hostEmail" | "eventName" | "inviteePhoneNumber", import("../types").CalendlyWebhookPayload>[];
|