@awell-health/awell-extensions 1.0.87 → 1.0.89
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.
- package/dist/extensions/calDotCom/actions/bookAppointment/bookAppointment.d.ts +4 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/bookAppointment.js +53 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/bookAppointment.js.map +1 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/bookAppointment.test.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/bookAppointment.test.js +22 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/bookAppointment.test.js.map +1 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/dataPoints.d.ts +6 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/dataPoints.js +10 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/dataPoints.js.map +1 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/fields.d.ts +18 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/fields.js +18 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/fields.js.map +1 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/index.d.ts +2 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/index.js +9 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/config/index.js.map +1 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/index.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/index.js +6 -0
- package/dist/extensions/calDotCom/actions/bookAppointment/index.js.map +1 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/config/fields.d.ts +38 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/config/fields.js +34 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/config/fields.js.map +1 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/config/index.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/config/index.js +7 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/config/index.js.map +1 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/deleteBooking.d.ts +4 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/deleteBooking.js +71 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/deleteBooking.js.map +1 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/deleteBooking.test.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/deleteBooking.test.js +29 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/deleteBooking.test.js.map +1 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/index.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/index.js +6 -0
- package/dist/extensions/calDotCom/actions/deleteBooking/index.js.map +1 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/dataPoints.d.ts +46 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/dataPoints.js +51 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/dataPoints.js.map +1 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/fields.d.ts +17 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/fields.js +17 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/fields.js.map +1 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/index.d.ts +2 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/index.js +9 -0
- package/dist/extensions/calDotCom/actions/getBooking/config/index.js.map +1 -0
- package/dist/extensions/calDotCom/actions/getBooking/getBooking.d.ts +4 -0
- package/dist/extensions/calDotCom/actions/{getBooking.js → getBooking/getBooking.js} +9 -60
- package/dist/extensions/calDotCom/actions/getBooking/getBooking.js.map +1 -0
- package/dist/extensions/calDotCom/actions/getBooking/getBooking.test.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/getBooking/getBooking.test.js +196 -0
- package/dist/extensions/calDotCom/actions/getBooking/getBooking.test.js.map +1 -0
- package/dist/extensions/calDotCom/actions/getBooking/index.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/getBooking/index.js +6 -0
- package/dist/extensions/calDotCom/actions/getBooking/index.js.map +1 -0
- package/dist/extensions/calDotCom/actions/index.d.ts +2 -0
- package/dist/extensions/calDotCom/actions/index.js +2 -0
- package/dist/extensions/calDotCom/actions/index.js.map +1 -1
- package/dist/extensions/calDotCom/actions/updateBooking/config/dataPoints.d.ts +10 -0
- package/dist/extensions/calDotCom/actions/updateBooking/config/dataPoints.js +14 -0
- package/dist/extensions/calDotCom/actions/updateBooking/config/dataPoints.js.map +1 -0
- package/dist/extensions/calDotCom/actions/updateBooking/config/fields.d.ts +68 -0
- package/dist/extensions/calDotCom/actions/updateBooking/config/fields.js +61 -0
- package/dist/extensions/calDotCom/actions/updateBooking/config/fields.js.map +1 -0
- package/dist/extensions/calDotCom/actions/updateBooking/config/index.d.ts +2 -0
- package/dist/extensions/calDotCom/actions/updateBooking/config/index.js +9 -0
- package/dist/extensions/calDotCom/actions/updateBooking/config/index.js.map +1 -0
- package/dist/extensions/calDotCom/actions/updateBooking/index.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/updateBooking/index.js +6 -0
- package/dist/extensions/calDotCom/actions/updateBooking/index.js.map +1 -0
- package/dist/extensions/calDotCom/actions/updateBooking/updateBooking.d.ts +4 -0
- package/dist/extensions/calDotCom/actions/updateBooking/updateBooking.js +80 -0
- package/dist/extensions/calDotCom/actions/updateBooking/updateBooking.js.map +1 -0
- package/dist/extensions/calDotCom/actions/updateBooking/updateBooking.test.d.ts +1 -0
- package/dist/extensions/calDotCom/actions/updateBooking/updateBooking.test.js +43 -0
- package/dist/extensions/calDotCom/actions/updateBooking/updateBooking.test.js.map +1 -0
- package/dist/extensions/calDotCom/calComApi.d.ts +11 -0
- package/dist/extensions/calDotCom/calComApi.js +31 -2
- package/dist/extensions/calDotCom/calComApi.js.map +1 -1
- package/dist/extensions/calDotCom/index.js +2 -0
- package/dist/extensions/calDotCom/index.js.map +1 -1
- package/dist/extensions/calDotCom/schema.d.ts +12 -27
- package/dist/extensions/calDotCom/schema.js +3 -10
- package/dist/extensions/calDotCom/schema.js.map +1 -1
- package/dist/extensions/markdown.json +2 -2
- package/dist/extensions/sendbird/v1/actions/updateTicket/config/fields.d.ts +39 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/config/fields.js +36 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/config/fields.js.map +1 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/config/index.d.ts +1 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/config/index.js +7 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/config/index.js.map +1 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/updateTicket.d.ts +4 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/updateTicket.js +75 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/updateTicket.js.map +1 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/updateTicket.test.d.ts +1 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/updateTicket.test.js +49 -0
- package/dist/extensions/sendbird/v1/actions/updateTicket/updateTicket.test.js.map +1 -0
- package/dist/extensions/sendbird/v1/client/client.d.ts +2 -1
- package/dist/extensions/sendbird/v1/client/client.js +5 -0
- package/dist/extensions/sendbird/v1/client/client.js.map +1 -1
- package/dist/extensions/sendbird/v1/types.d.ts +4 -0
- package/package.json +1 -1
- package/dist/extensions/calDotCom/actions/bookAppointment.d.ts +0 -13
- package/dist/extensions/calDotCom/actions/bookAppointment.js +0 -49
- package/dist/extensions/calDotCom/actions/bookAppointment.js.map +0 -1
- package/dist/extensions/calDotCom/actions/getBooking.d.ts +0 -12
- package/dist/extensions/calDotCom/actions/getBooking.js.map +0 -1
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const updateBooking_1 = require("./updateBooking");
|
4
|
+
const tests_1 = require("../../../../src/tests");
|
5
|
+
const calComApi_1 = require("../../__mocks__/calComApi");
|
6
|
+
jest.mock('../../calComApi', () => jest.fn(() => calComApi_1.mockReturnValue));
|
7
|
+
describe('Update booking', () => {
|
8
|
+
const onComplete = jest.fn();
|
9
|
+
const onError = jest.fn();
|
10
|
+
const basePayload = (0, tests_1.generateTestPayload)({
|
11
|
+
fields: {
|
12
|
+
bookingId: String(calComApi_1.sampleBooking.id),
|
13
|
+
title: calComApi_1.sampleBooking.title,
|
14
|
+
description: undefined,
|
15
|
+
status: calComApi_1.sampleBooking.status,
|
16
|
+
start: calComApi_1.sampleBooking.startTime,
|
17
|
+
end: calComApi_1.sampleBooking.endTime,
|
18
|
+
},
|
19
|
+
settings: {
|
20
|
+
apiKey: 'abc123',
|
21
|
+
},
|
22
|
+
});
|
23
|
+
beforeEach(() => {
|
24
|
+
jest.clearAllMocks();
|
25
|
+
});
|
26
|
+
test('Should call the onComplete callback', async () => {
|
27
|
+
await updateBooking_1.updateBooking.onActivityCreated(basePayload, onComplete, onError);
|
28
|
+
expect(calComApi_1.mockReturnValue.updateBooking).toHaveBeenCalledWith(String(calComApi_1.sampleBooking.id), {
|
29
|
+
title: calComApi_1.sampleBooking.title,
|
30
|
+
description: undefined,
|
31
|
+
status: calComApi_1.sampleBooking.status,
|
32
|
+
start: calComApi_1.sampleBooking.startTime,
|
33
|
+
end: calComApi_1.sampleBooking.endTime,
|
34
|
+
});
|
35
|
+
expect(onComplete).toHaveBeenCalledWith({
|
36
|
+
data_points: {
|
37
|
+
bookingId: String(calComApi_1.sampleBooking.id),
|
38
|
+
bookingUid: calComApi_1.sampleBooking.uid,
|
39
|
+
},
|
40
|
+
});
|
41
|
+
});
|
42
|
+
});
|
43
|
+
//# sourceMappingURL=updateBooking.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateBooking.test.js","sourceRoot":"","sources":["../../../../../extensions/calDotCom/actions/updateBooking/updateBooking.test.ts"],"names":[],"mappings":";;AAAA,mDAA+C;AAC/C,iDAA2D;AAC3D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AAC;YACtC,WAAW,EAAE;gBACX,SAAS,EAAE,MAAM,CAAC,yBAAa,CAAC,EAAE,CAAC;gBACnC,UAAU,EAAE,yBAAa,CAAC,GAAG;aAC9B;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -5,5 +5,16 @@ declare class CalComApi {
|
|
5
5
|
constructor(apiKey: string);
|
6
6
|
private constructUrl;
|
7
7
|
getBooking(id: string): Promise<Booking>;
|
8
|
+
updateBooking(id: string, value: {
|
9
|
+
title?: string;
|
10
|
+
start?: string;
|
11
|
+
end?: string;
|
12
|
+
status?: string;
|
13
|
+
description?: string;
|
14
|
+
}): Promise<Booking>;
|
15
|
+
deleteBooking(id: string, value: {
|
16
|
+
allRemainingBookings?: boolean;
|
17
|
+
cancellationReason?: string;
|
18
|
+
}): Promise<void>;
|
8
19
|
}
|
9
20
|
export default CalComApi;
|
@@ -1,20 +1,49 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
6
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
7
|
+
const lodash_1 = require("lodash");
|
8
|
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
4
9
|
const schema_1 = require("./schema");
|
5
10
|
class CalComApi {
|
6
11
|
constructor(apiKey) {
|
7
12
|
this.baseUrl = 'https://api.cal.com/v1';
|
8
13
|
this.apiKey = apiKey;
|
9
14
|
}
|
10
|
-
constructUrl(url) {
|
11
|
-
|
15
|
+
constructUrl(url, params) {
|
16
|
+
const nonEmptyParams = (0, lodash_1.omitBy)(params, lodash_1.isNil);
|
17
|
+
const queryParams = new URLSearchParams({
|
18
|
+
apiKey: this.apiKey,
|
19
|
+
...nonEmptyParams,
|
20
|
+
});
|
21
|
+
return `${this.baseUrl}${url}?${queryParams.toString()}`;
|
12
22
|
}
|
13
23
|
async getBooking(id) {
|
14
24
|
const url = this.constructUrl(`/bookings/${id}`);
|
15
25
|
const response = await (0, extensions_core_1.fetchTyped)(url, schema_1.GetBookingResponseSchema);
|
16
26
|
return response.booking;
|
17
27
|
}
|
28
|
+
async updateBooking(id, value) {
|
29
|
+
const url = this.constructUrl(`/bookings/${id}`);
|
30
|
+
const response = await (0, node_fetch_1.default)(url, {
|
31
|
+
method: 'PATCH',
|
32
|
+
headers: {
|
33
|
+
Accept: 'application/json',
|
34
|
+
'Content-Type': 'application/json',
|
35
|
+
},
|
36
|
+
body: JSON.stringify(value),
|
37
|
+
});
|
38
|
+
const result = await response.json();
|
39
|
+
return result.booking;
|
40
|
+
}
|
41
|
+
async deleteBooking(id, value) {
|
42
|
+
const url = this.constructUrl(`/bookings/${id}/cancel`, value);
|
43
|
+
await (0, node_fetch_1.default)(url, {
|
44
|
+
method: 'DELETE',
|
45
|
+
});
|
46
|
+
}
|
18
47
|
}
|
19
48
|
exports.default = CalComApi;
|
20
49
|
//# sourceMappingURL=calComApi.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"calComApi.js","sourceRoot":"","sources":["../../../extensions/calDotCom/calComApi.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"calComApi.js","sourceRoot":"","sources":["../../../extensions/calDotCom/calComApi.ts"],"names":[],"mappings":";;;;;AAAA,mEAA0D;AAC1D,mCAAsC;AACtC,4DAA8B;AAC9B,qCAAiE;AAEjE,MAAM,SAAS;IAIb,YAAY,MAAc;QAFT,YAAO,GAAG,wBAAwB,CAAA;QAGjD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEO,YAAY,CAClB,GAAW,EACX,MAAkD;QAElD,MAAM,cAAc,GAAG,IAAA,eAAM,EAAC,MAAM,EAAE,cAAK,CAAC,CAAA;QAC5C,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC;YACtC,MAAM,EAAE,IAAI,CA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Booking: actions_1.getBooking,
|
20
|
+
updateBooking: actions_1.updateBooking,
|
21
|
+
deleteBooking: actions_1.deleteBooking,
|
20
22
|
},
|
21
23
|
webhooks: webhooks_1.webhooks,
|
22
24
|
settings: settings_1.settings,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/calDotCom/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/calDotCom/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,uCAKkB;AAClB,yCAAqC;AACrC,yCAAqC;AAExB,QAAA,SAAS,GAAc;IAClC,GAAG,EAAE,WAAW;IAChB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,0BAA0B;IACpC,WAAW,EAAE,oDAAoD;IACjE,QAAQ,EAAE,0BAAQ,CAAC,UAAU;IAC7B,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,GAAG;KAC3B;IACD,OAAO,EAAE;QACP,eAAe,EAAf,yBAAe;QACf,UAAU,EAAV,oBAAU;QACV,aAAa,EAAb,uBAAa;QACb,aAAa,EAAb,uBAAa;KACd;IACD,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
@@ -1,33 +1,10 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
export declare const
|
3
|
-
|
4
|
-
bookingId: z.ZodString;
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
6
|
-
bookingId: string;
|
7
|
-
}, {
|
8
|
-
bookingId: string;
|
9
|
-
}>;
|
10
|
-
settings: z.ZodObject<{
|
11
|
-
apiKey: z.ZodString;
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
13
|
-
apiKey: string;
|
14
|
-
}, {
|
15
|
-
apiKey: string;
|
16
|
-
}>;
|
2
|
+
export declare const SettingsSchema: z.ZodObject<{
|
3
|
+
apiKey: z.ZodString;
|
17
4
|
}, "strip", z.ZodTypeAny, {
|
18
|
-
|
19
|
-
apiKey: string;
|
20
|
-
};
|
21
|
-
fields: {
|
22
|
-
bookingId: string;
|
23
|
-
};
|
5
|
+
apiKey: string;
|
24
6
|
}, {
|
25
|
-
|
26
|
-
apiKey: string;
|
27
|
-
};
|
28
|
-
fields: {
|
29
|
-
bookingId: string;
|
30
|
-
};
|
7
|
+
apiKey: string;
|
31
8
|
}>;
|
32
9
|
declare const UserSchema: z.ZodObject<{
|
33
10
|
email: z.ZodString;
|
@@ -54,6 +31,7 @@ export declare const BookingSchema: z.ZodObject<{
|
|
54
31
|
endTime: z.ZodString;
|
55
32
|
status: z.ZodString;
|
56
33
|
uid: z.ZodString;
|
34
|
+
id: z.ZodNumber;
|
57
35
|
user: z.ZodObject<{
|
58
36
|
email: z.ZodString;
|
59
37
|
name: z.ZodString;
|
@@ -96,6 +74,7 @@ export declare const BookingSchema: z.ZodObject<{
|
|
96
74
|
}, "strip", z.ZodTypeAny, {
|
97
75
|
endTime: string;
|
98
76
|
startTime: string;
|
77
|
+
id: number;
|
99
78
|
title: string;
|
100
79
|
metadata: {
|
101
80
|
videoCallUrl?: string | undefined;
|
@@ -119,6 +98,7 @@ export declare const BookingSchema: z.ZodObject<{
|
|
119
98
|
}, {
|
120
99
|
endTime: string;
|
121
100
|
startTime: string;
|
101
|
+
id: number;
|
122
102
|
title: string;
|
123
103
|
metadata: {
|
124
104
|
videoCallUrl?: string | undefined;
|
@@ -149,6 +129,7 @@ export declare const GetBookingResponseSchema: z.ZodObject<{
|
|
149
129
|
endTime: z.ZodString;
|
150
130
|
status: z.ZodString;
|
151
131
|
uid: z.ZodString;
|
132
|
+
id: z.ZodNumber;
|
152
133
|
user: z.ZodObject<{
|
153
134
|
email: z.ZodString;
|
154
135
|
name: z.ZodString;
|
@@ -191,6 +172,7 @@ export declare const GetBookingResponseSchema: z.ZodObject<{
|
|
191
172
|
}, "strip", z.ZodTypeAny, {
|
192
173
|
endTime: string;
|
193
174
|
startTime: string;
|
175
|
+
id: number;
|
194
176
|
title: string;
|
195
177
|
metadata: {
|
196
178
|
videoCallUrl?: string | undefined;
|
@@ -214,6 +196,7 @@ export declare const GetBookingResponseSchema: z.ZodObject<{
|
|
214
196
|
}, {
|
215
197
|
endTime: string;
|
216
198
|
startTime: string;
|
199
|
+
id: number;
|
217
200
|
title: string;
|
218
201
|
metadata: {
|
219
202
|
videoCallUrl?: string | undefined;
|
@@ -239,6 +222,7 @@ export declare const GetBookingResponseSchema: z.ZodObject<{
|
|
239
222
|
booking: {
|
240
223
|
endTime: string;
|
241
224
|
startTime: string;
|
225
|
+
id: number;
|
242
226
|
title: string;
|
243
227
|
metadata: {
|
244
228
|
videoCallUrl?: string | undefined;
|
@@ -264,6 +248,7 @@ export declare const GetBookingResponseSchema: z.ZodObject<{
|
|
264
248
|
booking: {
|
265
249
|
endTime: string;
|
266
250
|
startTime: string;
|
251
|
+
id: number;
|
267
252
|
title: string;
|
268
253
|
metadata: {
|
269
254
|
videoCallUrl?: string | undefined;
|
@@ -1,17 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GetBookingResponseSchema = exports.BookingSchema = exports.
|
3
|
+
exports.GetBookingResponseSchema = exports.BookingSchema = exports.SettingsSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
|
5
|
+
exports.SettingsSchema = zod_1.z.object({
|
6
6
|
apiKey: zod_1.z.string().nonempty('Missing API key'),
|
7
7
|
});
|
8
|
-
const GetBookingFieldsSchema = zod_1.z.object({
|
9
|
-
bookingId: zod_1.z.string().nonempty('Missing bookingId'),
|
10
|
-
});
|
11
|
-
exports.GetBookingPayloadSchema = zod_1.z.object({
|
12
|
-
fields: GetBookingFieldsSchema,
|
13
|
-
settings: SettingsSchema,
|
14
|
-
});
|
15
8
|
const UserSchema = zod_1.z.object({
|
16
9
|
email: zod_1.z.string(),
|
17
10
|
name: zod_1.z.string(),
|
@@ -26,7 +19,7 @@ exports.BookingSchema = zod_1.z.object({
|
|
26
19
|
endTime: zod_1.z.string(),
|
27
20
|
status: zod_1.z.string(),
|
28
21
|
uid: zod_1.z.string(),
|
29
|
-
|
22
|
+
id: zod_1.z.coerce.number(),
|
30
23
|
// userId: z.number(),
|
31
24
|
user: UserSchema,
|
32
25
|
attendees: zod_1.z.array(UserSchema),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../extensions/calDotCom/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../extensions/calDotCom/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;CAC/C,CAAC,CAAA;AAEF,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA;AAIW,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,EAAE,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IACrB,wBAAwB;IACxB,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAC9B,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;CAC5D,CAAC,CAAA;AAEW,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,qBAAa;CACvB,CAAC,CAAA"}
|
@@ -8,8 +8,8 @@
|
|
8
8
|
"changelog": "# Awell changelog\n\n## April 19, 2023\n\nStop care flow action added.\nSearch patients by patient code action was added.\n\"Is patient enrolled in care flow\" action added.\n"
|
9
9
|
},
|
10
10
|
"calDotCom": {
|
11
|
-
"readme": "---\ntitle: Cal.com\ndescription: Cal.com is a modern and open source scheduling platform. With HIPAA, GDPR and SOC2 compliance, you can ensure that data is well-protected and that makes Cal.com a great fit for healthcare use cases.\n---\n# Cal.com\n\n[Cal.com](https://cal.com/) is a modern and **open source** scheduling platform. With HIPAA, GDPR and SOC2 compliance, you can ensure that data is well-protected and that makes Cal.com a great fit for healthcare use cases.\n\n## Cal.com x Awell\n\nThis extension allows you to let a stakeholder (eg: a patient) book an appointment as part of a care flow and to retrieve the booking details of an appointment.\n\n## Extension settings\n\nIn order to set up this extension, **you will need to provide a Cal.com API key**. You can obtain an API key via the Cal.com portal (`Settings > Developer > API keys`).\n\n## Custom Actions\n\n### Book appointment action\n\nYou can add this action to your care flow to enable a stakeholder (eg: a patient) to book an appointment in a predefined calendar. This is a **stakeholder-actionable action** which means it requires an actual user to book an appointment. Also note that this is a blocking action and that the care flow will not progress - unless there are parallel tracks or transitions - until the action/activity is completed (i.e. an appointment was booked).\n\n**The actual booking of the appointment can happen in two ways:**\n\n1. With Awell Hosted Pages: when the \"Book appointment\" action is activated, we serve the booking widget to the stakeholder so they can book an appointment directly from within Awell Hosted Pages.\n2. If you are not leveraging Awell Hosted Pages but have built a custom integration then we expose you all the details via our API so you can either create a Cal.com booking widget yourself or redirect the user to the Cal.com platform. Additionally, we expose a mutation that allows you to complete the activity and pass in the required data.\n\nBelow you can find an overview of all Awell Apps and whether they support rendering of the booking widget.\n\n| App | Supported |\n| ----------------------------- | --------- |\n| Awell Hosted Pages | Yes |\n| Your app (custom integration) | Yes |\n| Awell Care | No |\n| Awell MyCare | No |\n\n#### Data points\n\nAdding this action to your care flow will expose a new data point you can use in your care flow, the `bookingId`. When the care flow is orchestrated and the book appointment activity is completed, the id of the actual booking will be ingested as the value of that `bookingId` data point.\n\n### Get booking action\n\nThis action allows you to fetch the details of a booking based on the provided `bookingId`. This action will make the following data points available for you to use in your care flow:\n\n1. Event type ID\n2. Title\n3. Description\n4. Start time\n5. End time\n6. Status\n7. Cancel URL\n8. Reschedule URL\n\n## Pricing\n\n**This extension is free** but keep in mind that you might need a paid plan for Cal.com depending on your needs.\n\n## Limitations\n\n### Rescheduling\n\nWhen a previously made booking is rescheduled, there is no way yet to get the new/updated booking details into the care flow or have the care flow react on the updated booking.\n\nAlso note that when a booking is rescheduled, Cal.com doesn't update the original booking resource but creates a new one instead. As far as we know, there is no reference from the old booking to the new (rescheduled) booking.\n\n#### Example\n\nAn appointment has been booked with Cal.com and we have the below booking resource:\n\n```json\n{\n ...,\n \"bookingId\": \"1\",\n \"date\": \"Jan 1, 2023\"\n}\n```\n\nHowever, the patient reschedules the booking to Jan 10, 2023. When querying Cal.com's API (`GET v1/bookings/{bookingId}`), it will still return the old booking date instead of the new/rescheduled date.\n\n```json\n{\n ...,\n \"bookingId\": \"1\",\n \"date\": \"Jan 1, 2023\"\n}\n```\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 Cal.com, 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",
|
12
|
-
"changelog": "# Cal.com changelog\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"
|
11
|
+
"readme": "---\ntitle: Cal.com\ndescription: Cal.com is a modern and open source scheduling platform. With HIPAA, GDPR and SOC2 compliance, you can ensure that data is well-protected and that makes Cal.com a great fit for healthcare use cases.\n---\n\n# Cal.com\n\n[Cal.com](https://cal.com/) is a modern and **open source** scheduling platform. With HIPAA, GDPR and SOC2 compliance, you can ensure that data is well-protected and that makes Cal.com a great fit for healthcare use cases.\n\n## Cal.com x Awell\n\nThis extension allows you to let a stakeholder (eg: a patient) book an appointment as part of a care flow and to retrieve the booking details of an appointment.\n\n## Extension settings\n\nIn order to set up this extension, **you will need to provide a Cal.com API key**. You can obtain an API key via the Cal.com portal (`Settings > Developer > API keys`).\n\n## Custom Actions\n\n### Book appointment action\n\nYou can add this action to your care flow to enable a stakeholder (eg: a patient) to book an appointment in a predefined calendar. This is a **stakeholder-actionable action** which means it requires an actual user to book an appointment. Also note that this is a blocking action and that the care flow will not progress - unless there are parallel tracks or transitions - until the action/activity is completed (i.e. an appointment was booked).\n\n**The actual booking of the appointment can happen in two ways:**\n\n1. With Awell Hosted Pages: when the \"Book appointment\" action is activated, we serve the booking widget to the stakeholder so they can book an appointment directly from within Awell Hosted Pages.\n2. If you are not leveraging Awell Hosted Pages but have built a custom integration then we expose you all the details via our API so you can either create a Cal.com booking widget yourself or redirect the user to the Cal.com platform. Additionally, we expose a mutation that allows you to complete the activity and pass in the required data.\n\nBelow you can find an overview of all Awell Apps and whether they support rendering of the booking widget.\n\n| App | Supported |\n| ----------------------------- | --------- |\n| Awell Hosted Pages | Yes |\n| Your app (custom integration) | Yes |\n| Awell Care | No |\n| Awell MyCare | No |\n\n#### Data points\n\nAdding this action to your care flow will expose a new data point you can use in your care flow, the `bookingId`. When the care flow is orchestrated and the book appointment activity is completed, the id of the actual booking will be ingested as the value of that `bookingId` data point.\n\n### Get booking action\n\nThis action allows you to fetch the details of a booking based on the provided `bookingId`. This action will make the following data points available for you to use in your care flow:\n\n1. Event type ID\n2. Title\n3. Description\n4. Start time\n5. End time\n6. Status\n7. Cancel URL\n8. Reschedule URL\n\n### Update booking\n\nUpdates a booking and saves new `bookingId` and `bookingUid` as Data Points. Values possible to update:\n\n- Title - Title of Booking event\n- Description - Description of the meeting\n- Status - Status of the meeting to be set. Possible values: \"ACCEPTED\", \"PENDING\", \"CANCELLED\", \"REJECTED\".\n- Start - Start time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z\n- End - End time of the Event in ISO 8601 format, e.g. 2023-05-24T13:00:00.000Z\n\n### Delete Boooking\n\nDeletes a Booking with a given ID.\n\n## Pricing\n\n**This extension is free** but keep in mind that you might need a paid plan for Cal.com depending on your needs.\n\n## Limitations\n\n### Rescheduling\n\nWhen a previously made booking is rescheduled, there is no way yet to get the new/updated booking details into the care flow or have the care flow react on the updated booking.\n\nAlso note that when a booking is rescheduled, Cal.com doesn't update the original booking resource but creates a new one instead. As far as we know, there is no reference from the old booking to the new (rescheduled) booking.\n\n#### Example\n\nAn appointment has been booked with Cal.com and we have the below booking resource:\n\n```json\n{\n ...,\n \"bookingId\": \"1\",\n \"date\": \"Jan 1, 2023\"\n}\n```\n\nHowever, the patient reschedules the booking to Jan 10, 2023. When querying Cal.com's API (`GET v1/bookings/{bookingId}`), it will still return the old booking date instead of the new/rescheduled date.\n\n```json\n{\n ...,\n \"bookingId\": \"1\",\n \"date\": \"Jan 1, 2023\"\n}\n```\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 Cal.com, 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",
|
12
|
+
"changelog": "# Cal.com changelog\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
|
"canvasMedical": {
|
15
15
|
"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- `questionnaireId`: Reference to the Canvas Questionnaire using the questionnaire id.\n- `subjectId`: 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- `authorId`: 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",
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
import { FieldType } from '@awell-health/extensions-core';
|
3
|
+
import { TicketPriority } from '../../../types';
|
4
|
+
export declare const fields: {
|
5
|
+
ticketId: {
|
6
|
+
label: string;
|
7
|
+
id: string;
|
8
|
+
type: FieldType.NUMERIC;
|
9
|
+
required: true;
|
10
|
+
description: string;
|
11
|
+
};
|
12
|
+
priority: {
|
13
|
+
label: string;
|
14
|
+
id: string;
|
15
|
+
type: FieldType.STRING;
|
16
|
+
required: false;
|
17
|
+
description: string;
|
18
|
+
};
|
19
|
+
relatedChannelUrls: {
|
20
|
+
label: string;
|
21
|
+
id: string;
|
22
|
+
type: FieldType.STRING;
|
23
|
+
required: false;
|
24
|
+
description: string;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
28
|
+
ticketId: z.ZodNumber;
|
29
|
+
relatedChannelUrls: z.ZodString;
|
30
|
+
priority: z.ZodEnum<[TicketPriority, ...TicketPriority[]]>;
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
32
|
+
priority: TicketPriority;
|
33
|
+
relatedChannelUrls: string;
|
34
|
+
ticketId: number;
|
35
|
+
}, {
|
36
|
+
priority: TicketPriority;
|
37
|
+
relatedChannelUrls: string;
|
38
|
+
ticketId: number;
|
39
|
+
}>;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
6
|
+
const types_1 = require("../../../types");
|
7
|
+
exports.fields = {
|
8
|
+
ticketId: {
|
9
|
+
label: 'Ticket ID',
|
10
|
+
id: 'ticketId',
|
11
|
+
type: extensions_core_1.FieldType.NUMERIC,
|
12
|
+
required: true,
|
13
|
+
description: "A customer's unique ID.",
|
14
|
+
},
|
15
|
+
priority: {
|
16
|
+
label: 'Priority',
|
17
|
+
id: 'priority',
|
18
|
+
type: extensions_core_1.FieldType.STRING,
|
19
|
+
required: false,
|
20
|
+
description: 'Specifies the priority of a ticket. Acceptable values are the following: "LOW", "MEDIUM", "HIGH", and "URGENT". Defaults to: "MEDIUM".',
|
21
|
+
},
|
22
|
+
relatedChannelUrls: {
|
23
|
+
label: 'Related channel URLs',
|
24
|
+
id: 'relatedChannelUrls',
|
25
|
+
type: extensions_core_1.FieldType.STRING,
|
26
|
+
required: false,
|
27
|
+
description: 'A comma-separated string of group channel URLs for reference, where the corresponding customer belongs. Can have up to 3 group channel URLs.',
|
28
|
+
},
|
29
|
+
};
|
30
|
+
const priorityEnum = zod_1.z.enum(Object.values(types_1.TicketPriority));
|
31
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
32
|
+
ticketId: zod_1.z.coerce.number(),
|
33
|
+
relatedChannelUrls: (0, zod_1.string)((0, extensions_core_1.validateCommaSeparatedList)((value) => zod_1.z.string().safeParse(value).success, false)),
|
34
|
+
priority: priorityEnum,
|
35
|
+
});
|
36
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/sendbird/v1/actions/updateTicket/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAgD;AAChD,mEAIsC;AACtC,0CAA+C;AAElC,QAAA,MAAM,GAAG;IACpB,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW;QAClB,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,yBAAyB;KACvC;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,wIAAwI;KAC3I;IACD,kBAAkB,EAAE;QAClB,KAAK,EAAE,sBAAsB;QAC7B,EAAE,EAAE,oBAAoB;QACxB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,8IAA8I;KACjJ;CAC8B,CAAA;AAEjC,MAAM,YAAY,GAAG,OAAC,CAAC,IAAI,CAGzB,MAAM,CAAC,MAAM,CAAC,sBAAc,CAA0C,CAAC,CAAA;AAE5D,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAC3B,kBAAkB,EAAE,IAAA,YAAM,EACxB,IAAA,4CAA0B,EACxB,CAAC,KAAK,EAAE,EAAE,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAC9C,KAAK,CACN,CACF;IACD,QAAQ,EAAE,YAAY;CAC2B,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { FieldsValidationSchema, fields } from './fields';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.fields = exports.FieldsValidationSchema = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
6
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
7
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/sendbird/v1/actions/updateTicket/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gHAAA,sBAAsB,OAAA;AAAE,gGAAA,MAAM,OAAA"}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.updateTicket = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const zod_validation_error_1 = require("zod-validation-error");
|
6
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
7
|
+
const settings_1 = require("../../../settings");
|
8
|
+
const config_1 = require("./config");
|
9
|
+
const client_1 = require("../../client");
|
10
|
+
exports.updateTicket = {
|
11
|
+
key: 'updateTicket',
|
12
|
+
title: 'Update ticket',
|
13
|
+
description: 'Update a ticket using the Desk API.',
|
14
|
+
category: extensions_core_1.Category.COMMUNICATION,
|
15
|
+
fields: config_1.fields,
|
16
|
+
previewable: false,
|
17
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
18
|
+
try {
|
19
|
+
const { settings: { applicationId, chatApiToken, deskApiToken }, fields: { ticketId, priority, relatedChannelUrls }, } = (0, extensions_core_1.validate)({
|
20
|
+
schema: zod_1.z.object({
|
21
|
+
settings: settings_1.SettingsValidationSchema,
|
22
|
+
fields: config_1.FieldsValidationSchema,
|
23
|
+
}),
|
24
|
+
payload,
|
25
|
+
});
|
26
|
+
const client = new client_1.SendbirdClient({
|
27
|
+
applicationId,
|
28
|
+
chatApiToken,
|
29
|
+
deskApiToken,
|
30
|
+
});
|
31
|
+
await client.deskApi.updateTicket(ticketId, {
|
32
|
+
priority,
|
33
|
+
relatedChannelUrls,
|
34
|
+
});
|
35
|
+
await onComplete();
|
36
|
+
}
|
37
|
+
catch (err) {
|
38
|
+
if (err instanceof zod_1.ZodError) {
|
39
|
+
const error = (0, zod_validation_error_1.fromZodError)(err);
|
40
|
+
await onError({
|
41
|
+
events: [
|
42
|
+
{
|
43
|
+
date: new Date().toISOString(),
|
44
|
+
text: { en: error.message },
|
45
|
+
error: {
|
46
|
+
category: 'WRONG_INPUT',
|
47
|
+
message: error.message,
|
48
|
+
},
|
49
|
+
},
|
50
|
+
],
|
51
|
+
});
|
52
|
+
}
|
53
|
+
else if ((0, client_1.isSendbirdDeskError)(err)) {
|
54
|
+
const events = (0, client_1.sendbirdDeskErrorToActivityEvent)(err);
|
55
|
+
await onError({ events });
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
const message = err.message;
|
59
|
+
await onError({
|
60
|
+
events: [
|
61
|
+
{
|
62
|
+
date: new Date().toISOString(),
|
63
|
+
text: { en: message },
|
64
|
+
error: {
|
65
|
+
category: 'SERVER_ERROR',
|
66
|
+
message,
|
67
|
+
},
|
68
|
+
},
|
69
|
+
],
|
70
|
+
});
|
71
|
+
}
|
72
|
+
}
|
73
|
+
},
|
74
|
+
};
|
75
|
+
//# sourceMappingURL=updateTicket.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateTicket.js","sourceRoot":"","sources":["../../../../../../extensions/sendbird/v1/actions/updateTicket/updateTicket.ts"],"names":[],"mappings":";;;AA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,QAAQ,EAAE,aAAa;gCACvB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;iBAAM,IAAI,IAAA,4BAAmB,EAAC,GAAG,CAAC,EAAE;gBACnC,MAAM,MAAM,GAAG,IAAA,yCAAgC,EAAC,GAAG,CAAC,CAAA;gBACpD,MAAM,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;aAC1B;iBAAM;gBACL,MAAM,OAAO,GAAI,GAAa,CAAC,OAAO,CAAA;gBACtC,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE;4BACrB,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO;6BACR;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const __mocks__1 = require("../../client/__mocks__");
|
4
|
+
const tests_1 = require("../../../../../src/tests");
|
5
|
+
const updateTicket_1 = require("./updateTicket");
|
6
|
+
jest.mock('../../client');
|
7
|
+
describe('Update ticket', () => {
|
8
|
+
const onComplete = jest.fn();
|
9
|
+
const onError = jest.fn();
|
10
|
+
const basePayload = (0, tests_1.generateTestPayload)({
|
11
|
+
pathway: {
|
12
|
+
id: 'pathway-id',
|
13
|
+
definition_id: 'pathway-definition-id',
|
14
|
+
},
|
15
|
+
activity: {
|
16
|
+
id: 'activity-id',
|
17
|
+
},
|
18
|
+
patient: { id: 'test-patient' },
|
19
|
+
fields: {
|
20
|
+
ticketId: __mocks__1.mockedTicketData.id,
|
21
|
+
relatedChannelUrls: `${__mocks__1.mockedChannelNames.channel1},${__mocks__1.mockedChannelNames.channel2}`,
|
22
|
+
priority: __mocks__1.mockedTicketData.priority,
|
23
|
+
},
|
24
|
+
settings: {
|
25
|
+
applicationId: 'applicationId',
|
26
|
+
chatApiToken: 'chatApiToken',
|
27
|
+
deskApiToken: 'deskApiToken',
|
28
|
+
},
|
29
|
+
});
|
30
|
+
beforeEach(() => {
|
31
|
+
jest.clearAllMocks();
|
32
|
+
});
|
33
|
+
test('Should call the onComplete callback', async () => {
|
34
|
+
await updateTicket_1.updateTicket.onActivityCreated(basePayload, onComplete, onError);
|
35
|
+
expect(__mocks__1.SendbirdClientMockImplementation.deskApi.updateTicket).toHaveBeenCalledWith(__mocks__1.mockedTicketData.id, {
|
36
|
+
relatedChannelUrls: `${__mocks__1.mockedChannelNames.channel1},${__mocks__1.mockedChannelNames.channel2}`,
|
37
|
+
priority: __mocks__1.mockedTicketData.priority,
|
38
|
+
});
|
39
|
+
expect(onComplete).toHaveBeenCalledTimes(1);
|
40
|
+
expect(onError).not.toHaveBeenCalled();
|
41
|
+
});
|
42
|
+
test('Should call the onError callback when it receives invalid ticket ID', async () => {
|
43
|
+
basePayload.fields.ticketId = NaN;
|
44
|
+
await updateTicket_1.updateTicket.onActivityCreated(basePayload, onComplete, onError);
|
45
|
+
expect(onComplete).not.toHaveBeenCalled();
|
46
|
+
expect(onError).toHaveBeenCalledTimes(1);
|
47
|
+
});
|
48
|
+
});
|
49
|
+
//# sourceMappingURL=updateTicket.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateTicket.test.js","sourceRoot":"","sources":["../../../../../../extensions/sendbird/v1/actions/updateTicket/updateTicket.test.ts"],"names":[],"mappings":";;AAAA,qDAI+B;AAC/B,oDAA8D;AAC9D,iDAA6C;AAE7C,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AAEzB,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAA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AE,KAAK,IAAI,EAAE;QACrF,WAAW,CAAC,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAA;QAEjC,MAAM,2BAAY,CAAC,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;QAEtE,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;QACzC,MAAM,CAAC,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type AxiosResponse } from 'axios';
|
2
|
-
import { type UpdateUserInput, type CreateUserInput, type User, type Metadata, type CreateCustomerInput, type Customer, type UpdateCustomerCustomFieldsInput, type CreateTicketInput, type Ticket } from '../types';
|
2
|
+
import { type UpdateUserInput, type CreateUserInput, type User, type Metadata, type CreateCustomerInput, type Customer, type UpdateCustomerCustomFieldsInput, type CreateTicketInput, type Ticket, type UpdateTicketInput } from '../types';
|
3
3
|
declare class SendbirdChatAPI {
|
4
4
|
private readonly _baseApi;
|
5
5
|
constructor({ applicationId, token, }: {
|
@@ -26,6 +26,7 @@ declare class SendbirdDeskAPI {
|
|
26
26
|
getCustomer: (customerId: number) => Promise<AxiosResponse<Customer>>;
|
27
27
|
updateCustomerCustomFields: (customerId: number, { customFields }: Pick<UpdateCustomerCustomFieldsInput, 'customFields'>) => Promise<AxiosResponse<Customer>>;
|
28
28
|
createTicket: (ticket: CreateTicketInput) => Promise<AxiosResponse<Ticket>>;
|
29
|
+
updateTicket: (ticketId: number, ticket: UpdateTicketInput) => Promise<AxiosResponse<any>>;
|
29
30
|
}
|
30
31
|
export declare class SendbirdClient {
|
31
32
|
readonly chatApi: SendbirdChatAPI;
|
@@ -99,6 +99,11 @@ class SendbirdDeskAPI {
|
|
99
99
|
body: ticket,
|
100
100
|
});
|
101
101
|
};
|
102
|
+
this.updateTicket = async (ticketId, ticket) => {
|
103
|
+
return await this._baseApi.patch(`tickets/${ticketId}`, {
|
104
|
+
body: ticket,
|
105
|
+
});
|
106
|
+
};
|
102
107
|
this._baseApi = new SendbirdBaseAPI({
|
103
108
|
applicationId,
|
104
109
|
baseUrl: `https://desk-api-${applicationId}.sendbird.com/platform/v1`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../extensions/sendbird/v1/client/client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../extensions/sendbird/v1/client/client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;AAcjD,MAAM,eAAe;IAMnB,YAAY,EACV,aAAa,EACb,OAAO,EACP,KAAK,EACL,cAAc,GAMf;QAUD,SAAI,GAAG,KAAK,EACV,GAAW,EACX,EAAE,IAAI,EAAe,EACM,EAAE;YAC7B,OAAO,MAAM,eAAK,CAAC,IAAI,CAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,GAAG,EAAE,EAAE,IAAI,EAAE;gBAC1D,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB,CAAC,CAAA;QACJ,CAAC,CAAA;QAED,QAAG,GAAG,KAAK,EACT,GAAW,EACX,EAAE,IAAI,EAAe,EACM,EAAE;YAC7B,OAAO,MAAM,eAAK,CAAC,GAAG,CAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,GAAG,EAAE,EAAE,IAAI,EAAE;gBACzD,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB,CAAC,CAAA;QACJ,CAAC,CAAA;QAED,UAAK,GAAG,KAAK,EACX,GAAW,EACX,EAAE,IAAI,EAAe,EACM,EAAE;YAC7B,OAAO,MAAM,eAAK,CAAC,KAAK,CAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,GAAG,EAAE,EAAE,IAAI,EAAE;gBAC3D,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB,CAAC,CAAA;QACJ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