@activepieces/piece-google-calendar 0.9.2 → 0.9.4
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/package.json +7 -15
- package/src/index.js +106 -81
- package/src/index.d.ts +0 -6
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/add-attendees.action.d.ts +0 -12
- package/src/lib/actions/add-attendees.action.d.ts.map +0 -1
- package/src/lib/actions/add-attendees.action.js +0 -51
- package/src/lib/actions/add-attendees.action.js.map +0 -1
- package/src/lib/actions/add-calendar-to-calendarlist.d.ts +0 -7
- package/src/lib/actions/add-calendar-to-calendarlist.d.ts.map +0 -1
- package/src/lib/actions/add-calendar-to-calendarlist.js +0 -34
- package/src/lib/actions/add-calendar-to-calendarlist.js.map +0 -1
- package/src/lib/actions/create-event.d.ts +0 -25
- package/src/lib/actions/create-event.d.ts.map +0 -1
- package/src/lib/actions/create-event.js +0 -146
- package/src/lib/actions/create-event.js.map +0 -1
- package/src/lib/actions/create-quick-event.d.ts +0 -12
- package/src/lib/actions/create-quick-event.d.ts.map +0 -1
- package/src/lib/actions/create-quick-event.js +0 -66
- package/src/lib/actions/create-quick-event.js.map +0 -1
- package/src/lib/actions/delete-event.action.d.ts +0 -11
- package/src/lib/actions/delete-event.action.d.ts.map +0 -1
- package/src/lib/actions/delete-event.action.js +0 -34
- package/src/lib/actions/delete-event.action.js.map +0 -1
- package/src/lib/actions/find-busy-free-periods.d.ts +0 -12
- package/src/lib/actions/find-busy-free-periods.d.ts.map +0 -1
- package/src/lib/actions/find-busy-free-periods.js +0 -77
- package/src/lib/actions/find-busy-free-periods.js.map +0 -1
- package/src/lib/actions/get-event-by-id.d.ts +0 -13
- package/src/lib/actions/get-event-by-id.d.ts.map +0 -1
- package/src/lib/actions/get-event-by-id.js +0 -92
- package/src/lib/actions/get-event-by-id.js.map +0 -1
- package/src/lib/actions/get-events.d.ts +0 -15
- package/src/lib/actions/get-events.d.ts.map +0 -1
- package/src/lib/actions/get-events.js +0 -98
- package/src/lib/actions/get-events.js.map +0 -1
- package/src/lib/actions/update-event.action.d.ts +0 -24
- package/src/lib/actions/update-event.action.d.ts.map +0 -1
- package/src/lib/actions/update-event.action.js +0 -111
- package/src/lib/actions/update-event.action.js.map +0 -1
- package/src/lib/auth.d.ts +0 -11
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -86
- package/src/lib/auth.js.map +0 -1
- package/src/lib/common/helper.d.ts +0 -26
- package/src/lib/common/helper.d.ts.map +0 -1
- package/src/lib/common/helper.js +0 -269
- package/src/lib/common/helper.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -20
- package/src/lib/common/index.d.ts.map +0 -1
- package/src/lib/common/index.js +0 -99
- package/src/lib/common/index.js.map +0 -1
- package/src/lib/common/types.d.ts +0 -240
- package/src/lib/common/types.d.ts.map +0 -1
- package/src/lib/common/types.js +0 -17
- package/src/lib/common/types.js.map +0 -1
- package/src/lib/triggers/calendar-event.d.ts +0 -39
- package/src/lib/triggers/calendar-event.d.ts.map +0 -1
- package/src/lib/triggers/calendar-event.js +0 -144
- package/src/lib/triggers/calendar-event.js.map +0 -1
- package/src/lib/triggers/event-cancelled.d.ts +0 -71
- package/src/lib/triggers/event-cancelled.d.ts.map +0 -1
- package/src/lib/triggers/event-cancelled.js +0 -165
- package/src/lib/triggers/event-cancelled.js.map +0 -1
- package/src/lib/triggers/event-ends.d.ts +0 -67
- package/src/lib/triggers/event-ends.d.ts.map +0 -1
- package/src/lib/triggers/event-ends.js +0 -166
- package/src/lib/triggers/event-ends.js.map +0 -1
- package/src/lib/triggers/event-start-time-before.d.ts +0 -75
- package/src/lib/triggers/event-start-time-before.d.ts.map +0 -1
- package/src/lib/triggers/event-start-time-before.js +0 -160
- package/src/lib/triggers/event-start-time-before.js.map +0 -1
- package/src/lib/triggers/new-calendar.d.ts +0 -31
- package/src/lib/triggers/new-calendar.d.ts.map +0 -1
- package/src/lib/triggers/new-calendar.js +0 -151
- package/src/lib/triggers/new-calendar.js.map +0 -1
- package/src/lib/triggers/new-event-matching-search.d.ts +0 -47
- package/src/lib/triggers/new-event-matching-search.d.ts.map +0 -1
- package/src/lib/triggers/new-event-matching-search.js +0 -184
- package/src/lib/triggers/new-event-matching-search.js.map +0 -1
- package/src/lib/triggers/new-event.d.ts +0 -47
- package/src/lib/triggers/new-event.d.ts.map +0 -1
- package/src/lib/triggers/new-event.js +0 -225
- package/src/lib/triggers/new-event.js.map +0 -1
package/src/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { googleCalendarAuth, getAccessToken, GoogleCalendarAuthValue, createGoogleClient } from './lib/common';
|
|
2
|
-
export declare const googleCalendar: import("@activepieces/pieces-framework").Piece<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
3
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
}>)[]>;
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE/G,eAAO,MAAM,cAAc;;;MAqDzB,CAAC"}
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAEwC;AACxC,iDAAqD;AACrD,6DAAyD;AACzD,yEAA4E;AAC5E,2EAAsE;AACtE,yDAAqD;AACrD,2EAAsE;AACtE,yCA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+0,0 @@
|
|
|
1
|
-
export declare const addAttendeesToEventAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
}>)[], {
|
|
5
|
-
calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
}>)[]>;
|
|
9
|
-
eventId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
attendees: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=add-attendees.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-attendees.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-attendees.action.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB;;;;;;;;;;EA+CpC,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addAttendeesToEventAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const googleapis_1 = require("googleapis");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
exports.addAttendeesToEventAction = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: common_1.googleCalendarAuth,
|
|
10
|
-
name: 'google-calendar-add-attendees',
|
|
11
|
-
displayName: 'Add Attendees to Event',
|
|
12
|
-
description: 'Add one or more person to existing event.',
|
|
13
|
-
props: {
|
|
14
|
-
calendar_id: common_1.googleCalendarCommon.calendarDropdown('writer'),
|
|
15
|
-
eventId: pieces_framework_1.Property.ShortText({
|
|
16
|
-
displayName: 'Event ID',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
attendees: pieces_framework_1.Property.Array({
|
|
20
|
-
displayName: 'Attendees',
|
|
21
|
-
description: 'Emails of the attendees (guests)',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
run(context) {
|
|
26
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
var _a;
|
|
28
|
-
const { calendar_id, eventId } = context.propsValue;
|
|
29
|
-
const attendeesInput = context.propsValue.attendees;
|
|
30
|
-
const authClient = yield (0, common_1.createGoogleClient)(context.auth);
|
|
31
|
-
const calendar = googleapis_1.google.calendar({ version: 'v3', auth: authClient });
|
|
32
|
-
// Note that each patch request consumes three quota units;
|
|
33
|
-
// prefer using a get followed by an update
|
|
34
|
-
const currentEvent = yield calendar.events.get({
|
|
35
|
-
calendarId: calendar_id,
|
|
36
|
-
eventId: eventId,
|
|
37
|
-
});
|
|
38
|
-
const currentAttendees = (_a = currentEvent.data.attendees) !== null && _a !== void 0 ? _a : [];
|
|
39
|
-
const attendeeFormattedList = [];
|
|
40
|
-
attendeeFormattedList.push(...currentAttendees);
|
|
41
|
-
attendeeFormattedList.push(...attendeesInput.map((email) => ({ email })));
|
|
42
|
-
const response = yield calendar.events.update({
|
|
43
|
-
calendarId: calendar_id,
|
|
44
|
-
eventId,
|
|
45
|
-
requestBody: Object.assign(Object.assign({}, currentEvent.data), { attendees: attendeeFormattedList }),
|
|
46
|
-
});
|
|
47
|
-
return response.data;
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=add-attendees.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-attendees.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-attendees.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAAiD;AACjD,sCAAyF;AAE5E,QAAA,yBAAyB,GAAG,IAAA,+BAAY,EAAC;IACpD,IAAI,EAAE,2BAAkB;IACxB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,2CAA2C;IACxD,KAAK,EAAE;QACL,WAAW,EAAE,6BAAoB,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QAC5D,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACxB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACpD,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,SAAqB,CAAC;YAEhE,MAAM,UAAU,GAAG,MAAM,IAAA,2BAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,QAAQ,GAAG,mBAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAEtE,2DAA2D;YAC3D,2CAA2C;YAC3C,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;gBAC7C,UAAU,EAAE,WAAW;gBACvB,OAAO,EAAE,OAAO;aACjB,CAAC,CAAC;YACH,MAAM,gBAAgB,GAAG,MAAA,YAAY,CAAC,IAAI,CAAC,SAAS,mCAAI,EAAE,CAAC;YAE3D,MAAM,qBAAqB,GAAuC,EAAE,CAAC;YACrE,qBAAqB,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC;YAChD,qBAAqB,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;YAE1E,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;gBAC5C,UAAU,EAAE,WAAY;gBACxB,OAAO;gBACP,WAAW,kCACN,YAAY,CAAC,IAAI,KACpB,SAAS,EAAE,qBAAqB,GACjC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const addCalendarToCalendarlist: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
}>)[], {
|
|
5
|
-
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
-
}>;
|
|
7
|
-
//# sourceMappingURL=add-calendar-to-calendarlist.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-calendar-to-calendarlist.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-calendar-to-calendarlist.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB;;;;;EA4BpC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addCalendarToCalendarlist = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const googleapis_1 = require("googleapis");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
exports.addCalendarToCalendarlist = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: common_1.googleCalendarAuth,
|
|
10
|
-
name: 'addCalendarToCalendarlist',
|
|
11
|
-
displayName: 'Add Calendar to calendarList',
|
|
12
|
-
description: "Adds other people's calendars to your calendarList",
|
|
13
|
-
props: {
|
|
14
|
-
id: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: "Calendar Id",
|
|
16
|
-
description: "Find calendar id by going to calendar settings",
|
|
17
|
-
required: true
|
|
18
|
-
})
|
|
19
|
-
},
|
|
20
|
-
run(context) {
|
|
21
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const id = context.propsValue.id;
|
|
23
|
-
const authClient = yield (0, common_1.createGoogleClient)(context.auth);
|
|
24
|
-
const calendar = googleapis_1.google.calendar({ version: 'v3', auth: authClient });
|
|
25
|
-
const response = yield calendar.calendarList.insert({
|
|
26
|
-
requestBody: {
|
|
27
|
-
id: id
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
return response.data;
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=add-calendar-to-calendarlist.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-calendar-to-calendarlist.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-calendar-to-calendarlist.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAAoC;AACpC,sCAAyF;AAE5E,QAAA,yBAAyB,GAAG,IAAA,+BAAY,EAAC;IACpD,IAAI,EAAE,2BAAkB;IACxB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,8BAA8B;IAC3C,WAAW,EAAE,oDAAoD;IACjE,KAAK,EAAE;QACL,EAAE,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YAEf,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YAEjC,MAAM,UAAU,GAAG,MAAM,IAAA,2BAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE1D,MAAM,QAAQ,GAAG,mBAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAC,CAAC,CAAC;YAErE,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC;gBAClD,WAAW,EAAE;oBACX,EAAE,EAAE,EAAE;iBACP;aACF,CAAC,CAAA;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const createEvent: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
}>)[], {
|
|
5
|
-
calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
}>)[]>;
|
|
9
|
-
title: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
start_date_time: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
11
|
-
end_date_time: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
12
|
-
location: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
14
|
-
colorId: import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
15
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
16
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
17
|
-
}>)[]>;
|
|
18
|
-
attendees: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
19
|
-
guests_can_modify: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
20
|
-
guests_can_invite_others: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
21
|
-
guests_can_see_other_guests: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
22
|
-
send_notifications: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
23
|
-
create_meet_link: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
24
|
-
}>;
|
|
25
|
-
//# sourceMappingURL=create-event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;EA4JtB,CAAC"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createEvent = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("../common");
|
|
7
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
8
|
-
const googleapis_1 = require("googleapis");
|
|
9
|
-
const crypto_1 = require("crypto");
|
|
10
|
-
exports.createEvent = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: common_1.googleCalendarAuth,
|
|
12
|
-
name: 'create_google_calendar_event',
|
|
13
|
-
description: 'Add Event',
|
|
14
|
-
displayName: 'Create Event',
|
|
15
|
-
props: {
|
|
16
|
-
calendar_id: common_1.googleCalendarCommon.calendarDropdown('writer'),
|
|
17
|
-
title: pieces_framework_1.Property.ShortText({
|
|
18
|
-
displayName: 'Title of the event',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
start_date_time: pieces_framework_1.Property.DateTime({
|
|
22
|
-
displayName: 'Start date time of the event',
|
|
23
|
-
required: true,
|
|
24
|
-
}),
|
|
25
|
-
end_date_time: pieces_framework_1.Property.DateTime({
|
|
26
|
-
displayName: 'End date time of the event',
|
|
27
|
-
description: "By default it'll be 30 min post start time",
|
|
28
|
-
required: false,
|
|
29
|
-
}),
|
|
30
|
-
location: pieces_framework_1.Property.ShortText({
|
|
31
|
-
displayName: 'Location',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
/*attachment: Property.ShortText({
|
|
35
|
-
displayName: 'Attachment',
|
|
36
|
-
description: 'URL of the file to be attached',
|
|
37
|
-
required: false,
|
|
38
|
-
}),*/
|
|
39
|
-
description: pieces_framework_1.Property.LongText({
|
|
40
|
-
displayName: 'Description',
|
|
41
|
-
description: 'Description of the event. You can use HTML tags here.',
|
|
42
|
-
required: false,
|
|
43
|
-
}),
|
|
44
|
-
colorId: common_1.googleCalendarCommon.colorId,
|
|
45
|
-
attendees: pieces_framework_1.Property.Array({
|
|
46
|
-
displayName: 'Attendees',
|
|
47
|
-
description: 'Emails of the attendees (guests)',
|
|
48
|
-
required: false,
|
|
49
|
-
}),
|
|
50
|
-
guests_can_modify: pieces_framework_1.Property.Checkbox({
|
|
51
|
-
displayName: 'Guests can modify',
|
|
52
|
-
defaultValue: false,
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
guests_can_invite_others: pieces_framework_1.Property.Checkbox({
|
|
56
|
-
displayName: 'Guests can invite others',
|
|
57
|
-
defaultValue: false,
|
|
58
|
-
required: false,
|
|
59
|
-
}),
|
|
60
|
-
guests_can_see_other_guests: pieces_framework_1.Property.Checkbox({
|
|
61
|
-
displayName: 'Guests can see other guests',
|
|
62
|
-
defaultValue: false,
|
|
63
|
-
required: false,
|
|
64
|
-
}),
|
|
65
|
-
send_notifications: pieces_framework_1.Property.StaticDropdown({
|
|
66
|
-
displayName: 'Send Notifications',
|
|
67
|
-
defaultValue: 'all',
|
|
68
|
-
options: {
|
|
69
|
-
options: [
|
|
70
|
-
{ label: 'Yes, to everyone', value: 'all' },
|
|
71
|
-
{
|
|
72
|
-
label: 'To non-Google Calendar guests only',
|
|
73
|
-
value: 'externalOnly',
|
|
74
|
-
},
|
|
75
|
-
{ label: 'To no one', value: 'none' },
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
required: true,
|
|
79
|
-
}),
|
|
80
|
-
create_meet_link: pieces_framework_1.Property.Checkbox({
|
|
81
|
-
displayName: 'Create Google Meet Link',
|
|
82
|
-
description: 'Automatically create a Google Meet video conference link for this event',
|
|
83
|
-
defaultValue: false,
|
|
84
|
-
required: false,
|
|
85
|
-
}),
|
|
86
|
-
},
|
|
87
|
-
run(configValue) {
|
|
88
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
// docs: https://developers.google.com/calendar/api/v3/reference/events/insert
|
|
90
|
-
const { calendar_id: calendarId, title: summary, start_date_time, end_date_time, location, description, colorId, guests_can_modify: guestsCanModify, guests_can_invite_others: guestsCanInviteOthers, guests_can_see_other_guests: guestsCanSeeOtherGuests, create_meet_link: createMeetLink, } = configValue.propsValue;
|
|
91
|
-
const start = {
|
|
92
|
-
dateTime: (0, dayjs_1.default)(start_date_time).format('YYYY-MM-DDTHH:mm:ss.sssZ'),
|
|
93
|
-
};
|
|
94
|
-
const endTime = end_date_time
|
|
95
|
-
? end_date_time
|
|
96
|
-
: (0, dayjs_1.default)(start_date_time).add(30, 'm');
|
|
97
|
-
const end = {
|
|
98
|
-
dateTime: (0, dayjs_1.default)(endTime).format('YYYY-MM-DDTHH:mm:ss.sssZ'),
|
|
99
|
-
};
|
|
100
|
-
/*const attachment = {
|
|
101
|
-
fileUrl: configValue.propsValue.attachment,
|
|
102
|
-
};*/
|
|
103
|
-
const attendeesArray = configValue.propsValue.attendees;
|
|
104
|
-
const sendNotifications = configValue.propsValue.send_notifications;
|
|
105
|
-
const attendeesObject = [];
|
|
106
|
-
if (attendeesArray) {
|
|
107
|
-
for (const attendee of attendeesArray) {
|
|
108
|
-
attendeesObject.push({ email: attendee });
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
const authClient = yield (0, common_1.createGoogleClient)(configValue.auth);
|
|
112
|
-
const calendar = googleapis_1.google.calendar({ version: 'v3', auth: authClient });
|
|
113
|
-
const requestBody = {
|
|
114
|
-
summary,
|
|
115
|
-
start,
|
|
116
|
-
end,
|
|
117
|
-
colorId,
|
|
118
|
-
//attachments: configValue.propsValue.attachment ? [attachment] : [],
|
|
119
|
-
location: location !== null && location !== void 0 ? location : '',
|
|
120
|
-
description: description !== null && description !== void 0 ? description : '',
|
|
121
|
-
attendees: attendeesObject,
|
|
122
|
-
guestsCanInviteOthers,
|
|
123
|
-
guestsCanModify,
|
|
124
|
-
guestsCanSeeOtherGuests,
|
|
125
|
-
};
|
|
126
|
-
if (createMeetLink) {
|
|
127
|
-
requestBody.conferenceData = {
|
|
128
|
-
createRequest: {
|
|
129
|
-
conferenceSolutionKey: {
|
|
130
|
-
type: 'hangoutsMeet',
|
|
131
|
-
},
|
|
132
|
-
requestId: (0, crypto_1.randomUUID)(),
|
|
133
|
-
},
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
const response = yield calendar.events.insert({
|
|
137
|
-
calendarId,
|
|
138
|
-
sendUpdates: sendNotifications,
|
|
139
|
-
conferenceDataVersion: createMeetLink ? 1 : 0,
|
|
140
|
-
requestBody,
|
|
141
|
-
});
|
|
142
|
-
return response.data;
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
});
|
|
146
|
-
//# sourceMappingURL=create-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAyF;AACzF,0DAA0B;AAC1B,2CAAoC;AACpC,mCAAoC;AAEvB,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,2BAAkB;IACxB,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,cAAc;IAC3B,KAAK,EAAE;QACL,WAAW,EAAE,6BAAoB,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QAC5D,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACjC,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC/B,WAAW,EAAE,4BAA4B;YACzC,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF;;;;aAIK;QACL,WAAW,EAAE,2BAAQ,CAAC,Q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C,CAAC;YAEtE,MAAM,WAAW,GAAQ;gBACvB,OAAO;gBACP,KAAK;gBACL,GAAG;gBACH,OAAO;gBACP,qEAAqE;gBACrE,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE;gBACxB,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE;gBAC9B,SAAS,EAAE,eAAe;gBAC1B,qBAAqB;gBACrB,eAAe;gBACf,uBAAuB;aACxB,CAAC;YAEF,IAAI,cAAc,EAAE,CAAC;gBACnB,WAAW,CAAC,cAAc,GAAG;oBAC3B,aAAa,EAAE;wBACb,qBAAqB,EAAE;4BACrB,IAAI,EAAE,cAAc;yBACrB;wBACD,SAAS,EAAE,IAAA,mBAAU,GAAE;qBACxB;iBACF,CAAC;YACJ,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;gBAC5C,UAAU;gBACV,WAAW,EAAE,iBAAiB;gBAC9B,qBAAqB,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC7C,WAAW;aACZ,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const createQuickCalendarEvent: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
}>)[], {
|
|
5
|
-
calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
}>)[]>;
|
|
9
|
-
text: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
10
|
-
send_updates: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true> | import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=create-quick-event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-quick-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-quick-event.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,wBAAwB;;;;;;;;;;EAwDnC,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createQuickCalendarEvent = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
exports.createQuickCalendarEvent = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: common_1.googleCalendarAuth,
|
|
10
|
-
name: 'create_quick_event',
|
|
11
|
-
description: 'Add Quick Calendar Event',
|
|
12
|
-
displayName: 'Create Quick Event',
|
|
13
|
-
props: {
|
|
14
|
-
calendar_id: common_1.googleCalendarCommon.calendarDropdown('writer'),
|
|
15
|
-
text: pieces_framework_1.Property.LongText({
|
|
16
|
-
displayName: 'Summary',
|
|
17
|
-
description: 'The text describing the event to be created',
|
|
18
|
-
required: true,
|
|
19
|
-
}),
|
|
20
|
-
send_updates: pieces_framework_1.Property.StaticDropdown({
|
|
21
|
-
displayName: 'Send Updates',
|
|
22
|
-
description: 'Guests who should receive notifications about the creation of the new event.',
|
|
23
|
-
required: false,
|
|
24
|
-
options: {
|
|
25
|
-
disabled: false,
|
|
26
|
-
options: [
|
|
27
|
-
{
|
|
28
|
-
label: 'All',
|
|
29
|
-
value: 'all',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: 'External Only',
|
|
33
|
-
value: 'externalOnly',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: 'none',
|
|
37
|
-
value: 'none',
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
run(configValue) {
|
|
44
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
// docs: https://developers.google.com/calendar/api/v3/reference/events/quickAdd
|
|
46
|
-
const calendarId = configValue.propsValue['calendar_id'];
|
|
47
|
-
const url = `${common_1.googleCalendarCommon.baseUrl}/calendars/${calendarId}/events/quickAdd`;
|
|
48
|
-
const qParams = {
|
|
49
|
-
text: configValue.propsValue['text'],
|
|
50
|
-
sendUpdates: configValue.propsValue['send_updates'] || 'none',
|
|
51
|
-
};
|
|
52
|
-
const request = {
|
|
53
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
54
|
-
url,
|
|
55
|
-
body: {},
|
|
56
|
-
authentication: {
|
|
57
|
-
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
58
|
-
token: yield (0, common_1.getAccessToken)(configValue.auth),
|
|
59
|
-
},
|
|
60
|
-
queryParams: qParams,
|
|
61
|
-
};
|
|
62
|
-
return yield pieces_common_1.httpClient.sendRequest(request);
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=create-quick-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-quick-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-quick-event.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DA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AE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,MAAM,IAAA,uBAAc,EAAC,WAAW,CAAC,IAAI,CAAC;iBAC9C;gBACD,WAAW,EAAE,OAAO;aACrB,CAAC;YACF,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC/C,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const deleteEventAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
}>)[], {
|
|
5
|
-
calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
}>)[]>;
|
|
9
|
-
eventId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=delete-event.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-event.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-event.action.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;;;;EA2B5B,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteEventAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const googleapis_1 = require("googleapis");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
exports.deleteEventAction = (0, pieces_framework_1.createAction)({
|
|
9
|
-
displayName: 'Delete Event',
|
|
10
|
-
auth: common_1.googleCalendarAuth,
|
|
11
|
-
name: 'delete_event',
|
|
12
|
-
description: 'Deletes an event from Google Calendar.',
|
|
13
|
-
props: {
|
|
14
|
-
calendar_id: common_1.googleCalendarCommon.calendarDropdown('writer'),
|
|
15
|
-
eventId: pieces_framework_1.Property.ShortText({
|
|
16
|
-
displayName: 'Event ID',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
},
|
|
20
|
-
run(context) {
|
|
21
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const authClient = yield (0, common_1.createGoogleClient)(context.auth);
|
|
23
|
-
const calendarId = context.propsValue.calendar_id;
|
|
24
|
-
const eventId = context.propsValue.eventId;
|
|
25
|
-
const calendar = googleapis_1.google.calendar({ version: 'v3', auth: authClient });
|
|
26
|
-
const response = yield calendar.events.delete({
|
|
27
|
-
calendarId,
|
|
28
|
-
eventId,
|
|
29
|
-
});
|
|
30
|
-
return response.data;
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=delete-event.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-event.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-event.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAAoC;AACpC,sCAAyF;AAE5E,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,WAAW,EAAE,cAAc;IAC3B,IAAI,EAAE,2BAAkB;IACxB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,wCAAwC;IACrD,KAAK,EAAE;QACL,WAAW,EAAE,6BAAoB,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QAC5D,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,UAAU,GAAG,MAAM,IAAA,2BAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE1D,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;YAClD,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;YAE3C,MAAM,QAAQ,GAAG,mBAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAEtE,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;gBAC5C,UAAU;gBACV,OAAO;aACR,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const findFreeBusy: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
}>)[], {
|
|
5
|
-
calendar_ids: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
}>)[]>;
|
|
9
|
-
start_date: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
10
|
-
end_date: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=find-busy-free-periods.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-busy-free-periods.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-busy-free-periods.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,YAAY;;;;;;;;;;EAuEvB,CAAC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findFreeBusy = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const helper_1 = require("../common/helper");
|
|
9
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
10
|
-
exports.findFreeBusy = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: common_1.googleCalendarAuth,
|
|
12
|
-
name: 'google_calendar_find_busy_free_periods',
|
|
13
|
-
displayName: 'Find Busy/Free Periods in Calendar',
|
|
14
|
-
description: 'Finds free/busy calendar details from Google Calendar.',
|
|
15
|
-
props: {
|
|
16
|
-
calendar_ids: pieces_framework_1.Property.MultiSelectDropdown({
|
|
17
|
-
auth: common_1.googleCalendarAuth,
|
|
18
|
-
displayName: 'Calendars',
|
|
19
|
-
description: 'Select the calendars to check for busy periods.',
|
|
20
|
-
required: true,
|
|
21
|
-
refreshers: [],
|
|
22
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
23
|
-
if (!auth) {
|
|
24
|
-
return {
|
|
25
|
-
disabled: true,
|
|
26
|
-
placeholder: 'Connect your account first',
|
|
27
|
-
options: [],
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const authProp = auth;
|
|
31
|
-
const calendars = yield (0, helper_1.getCalendars)(authProp);
|
|
32
|
-
return {
|
|
33
|
-
disabled: false,
|
|
34
|
-
options: calendars.map((calendar) => {
|
|
35
|
-
return {
|
|
36
|
-
label: calendar.summary,
|
|
37
|
-
value: calendar.id,
|
|
38
|
-
};
|
|
39
|
-
}),
|
|
40
|
-
};
|
|
41
|
-
}),
|
|
42
|
-
}),
|
|
43
|
-
start_date: pieces_framework_1.Property.DateTime({
|
|
44
|
-
displayName: 'Start Time',
|
|
45
|
-
description: 'The start of the time range to check.',
|
|
46
|
-
required: true,
|
|
47
|
-
}),
|
|
48
|
-
end_date: pieces_framework_1.Property.DateTime({
|
|
49
|
-
displayName: 'End Time',
|
|
50
|
-
description: 'The end of the time range to check.',
|
|
51
|
-
required: true,
|
|
52
|
-
}),
|
|
53
|
-
},
|
|
54
|
-
run(context) {
|
|
55
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const { calendar_ids, start_date, end_date } = context.propsValue;
|
|
57
|
-
const access_token = yield (0, common_1.getAccessToken)(context.auth);
|
|
58
|
-
const requestBody = {
|
|
59
|
-
timeMin: (0, dayjs_1.default)(start_date).toISOString(),
|
|
60
|
-
timeMax: (0, dayjs_1.default)(end_date).toISOString(),
|
|
61
|
-
items: calendar_ids.map((id) => ({ id })),
|
|
62
|
-
};
|
|
63
|
-
const request = {
|
|
64
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
65
|
-
url: `${common_1.googleCalendarCommon.baseUrl}/freeBusy`,
|
|
66
|
-
body: requestBody,
|
|
67
|
-
authentication: {
|
|
68
|
-
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
69
|
-
token: access_token,
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
const response = yield pieces_common_1.httpClient.sendRequest(request);
|
|
73
|
-
return response.body;
|
|
74
|
-
});
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
//# sourceMappingURL=find-busy-free-periods.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-busy-free-periods.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-busy-free-periods.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAsG;AACtG,sCAA8G;AAC9G,6CAAgD;AAChD,0DAA0B;AAqBb,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,2BAAkB;IACxB,IAAI,EAAE,wCAAwC;IAC9C,WAAW,EAAE,oCAAoC;IACjD,WAAW,EAAE,wDAAwD;IACrE,KAAK,EAAE;QACL,YAAY,EAAE,2BAAQ,CAAC,mBAAmB,CAAC;YACzC,IAAI,EAAE,2BAAkB;YACxB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,4BAA4B;wBACzC,OAAO,EAAE,EAAE;qBACZ,CAAC;gBACJ,CAAC;gBACD,MAAM,QAAQ,GAAG,IAA+B,CAAC;gBACjD,MAAM,SAAS,GAAG,MAAM,IAAA,qBAAY,EAAC,QAAQ,CAAC,CAAC;gBAC/C,OAAO;oBACL,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;wBAClC,OAAO;4BACL,KAAK,EAAE,QAAQ,CAAC,OAAO;4BACvB,KAAK,EAAE,QAAQ,CAAC,EAAE;yBACnB,CAAC;oBACJ,CAAC,CAAC;iBACH,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;QAC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2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
}>)[], {
|
|
5
|
-
calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
}>)[]>;
|
|
9
|
-
event_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
max_attendees: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
-
time_zone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=get-event-by-id.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-event-by-id.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-event-by-id.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;;;;;;;;;;;EAgHvB,CAAC"}
|