@activepieces/piece-google-calendar 0.8.4 → 0.9.1
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 +11 -21
- package/src/index.d.ts +6 -2
- package/src/index.d.ts.map +1 -0
- package/src/index.js +8 -17
- package/src/index.js.map +1 -1
- package/src/lib/actions/add-attendees.action.d.ts +9 -2
- package/src/lib/actions/add-attendees.action.d.ts.map +1 -0
- package/src/lib/actions/add-attendees.action.js +2 -5
- package/src/lib/actions/add-attendees.action.js.map +1 -1
- package/src/lib/actions/add-calendar-to-calendarlist.d.ts +5 -1
- package/src/lib/actions/add-calendar-to-calendarlist.d.ts.map +1 -0
- package/src/lib/actions/add-calendar-to-calendarlist.js +3 -5
- package/src/lib/actions/add-calendar-to-calendarlist.js.map +1 -1
- package/src/lib/actions/create-event.d.ts +13 -3
- package/src/lib/actions/create-event.d.ts.map +1 -0
- package/src/lib/actions/create-event.js +2 -5
- package/src/lib/actions/create-event.js.map +1 -1
- package/src/lib/actions/create-quick-event.d.ts +9 -2
- package/src/lib/actions/create-quick-event.d.ts.map +1 -0
- package/src/lib/actions/create-quick-event.js +2 -3
- package/src/lib/actions/create-quick-event.js.map +1 -1
- package/src/lib/actions/delete-event.action.d.ts +9 -2
- package/src/lib/actions/delete-event.action.d.ts.map +1 -0
- package/src/lib/actions/delete-event.action.js +2 -5
- package/src/lib/actions/delete-event.action.js.map +1 -1
- package/src/lib/actions/find-busy-free-periods.d.ts +9 -2
- package/src/lib/actions/find-busy-free-periods.d.ts.map +1 -0
- package/src/lib/actions/find-busy-free-periods.js +3 -4
- package/src/lib/actions/find-busy-free-periods.js.map +1 -1
- package/src/lib/actions/get-event-by-id.d.ts +9 -2
- package/src/lib/actions/get-event-by-id.d.ts.map +1 -0
- package/src/lib/actions/get-event-by-id.js +2 -3
- package/src/lib/actions/get-event-by-id.js.map +1 -1
- package/src/lib/actions/get-events.d.ts +9 -2
- package/src/lib/actions/get-events.d.ts.map +1 -0
- package/src/lib/actions/get-events.js +2 -3
- package/src/lib/actions/get-events.js.map +1 -1
- package/src/lib/actions/update-event.action.d.ts +13 -3
- package/src/lib/actions/update-event.action.d.ts.map +1 -0
- package/src/lib/actions/update-event.action.js +2 -5
- package/src/lib/actions/update-event.action.js.map +1 -1
- package/src/lib/auth.d.ts +11 -0
- package/src/lib/auth.d.ts.map +1 -0
- package/src/lib/auth.js +86 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common/helper.d.ts +9 -8
- package/src/lib/common/helper.d.ts.map +1 -0
- package/src/lib/common/helper.js +7 -6
- package/src/lib/common/helper.js.map +1 -1
- package/src/lib/common/index.d.ts +17 -3
- package/src/lib/common/index.d.ts.map +1 -0
- package/src/lib/common/index.js +14 -9
- package/src/lib/common/index.js.map +1 -1
- package/src/lib/common/types.d.ts +1 -0
- package/src/lib/common/types.d.ts.map +1 -0
- package/src/lib/common/types.js.map +1 -1
- package/src/lib/triggers/calendar-event.d.ts +33 -8
- package/src/lib/triggers/calendar-event.d.ts.map +1 -0
- package/src/lib/triggers/calendar-event.js +2 -2
- package/src/lib/triggers/calendar-event.js.map +1 -1
- package/src/lib/triggers/event-cancelled.d.ts +61 -12
- package/src/lib/triggers/event-cancelled.d.ts.map +1 -0
- package/src/lib/triggers/event-cancelled.js +3 -3
- package/src/lib/triggers/event-cancelled.js.map +1 -1
- package/src/lib/triggers/event-ends.d.ts +61 -12
- package/src/lib/triggers/event-ends.d.ts.map +1 -0
- package/src/lib/triggers/event-ends.js +3 -4
- package/src/lib/triggers/event-ends.js.map +1 -1
- package/src/lib/triggers/event-start-time-before.d.ts +61 -12
- package/src/lib/triggers/event-start-time-before.d.ts.map +1 -0
- package/src/lib/triggers/event-start-time-before.js +3 -4
- package/src/lib/triggers/event-start-time-before.js.map +1 -1
- package/src/lib/triggers/new-calendar.d.ts +17 -4
- package/src/lib/triggers/new-calendar.d.ts.map +1 -0
- package/src/lib/triggers/new-calendar.js +2 -2
- package/src/lib/triggers/new-calendar.js.map +1 -1
- package/src/lib/triggers/new-event-matching-search.d.ts +33 -8
- package/src/lib/triggers/new-event-matching-search.d.ts.map +1 -0
- package/src/lib/triggers/new-event-matching-search.js +2 -3
- package/src/lib/triggers/new-event-matching-search.js.map +1 -1
- package/src/lib/triggers/new-event.d.ts +33 -8
- package/src/lib/triggers/new-event.d.ts.map +1 -0
- package/src/lib/triggers/new-event.js +1 -2
- package/src/lib/triggers/new-event.js.map +1 -1
- package/README.md +0 -7
package/package.json
CHANGED
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-google-calendar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
|
+
"main": "./src/index.js",
|
|
5
|
+
"types": "./src/index.d.ts",
|
|
4
6
|
"dependencies": {
|
|
5
|
-
"@
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"axios-retry": "4.4.1",
|
|
7
|
+
"@activepieces/pieces-common": "0.12.0",
|
|
8
|
+
"@activepieces/pieces-framework": "0.26.0",
|
|
9
|
+
"@activepieces/shared": "0.50.1",
|
|
9
10
|
"dayjs": "1.11.9",
|
|
10
|
-
"deepmerge-ts": "7.1.0",
|
|
11
|
-
"form-data": "4.0.4",
|
|
12
11
|
"googleapis": "129.0.0",
|
|
13
|
-
"
|
|
14
|
-
"nanoid": "3.3.8",
|
|
15
|
-
"semver": "7.6.0",
|
|
16
|
-
"socket.io-client": "4.8.1",
|
|
17
|
-
"zod": "4.1.13",
|
|
18
|
-
"@activepieces/pieces-common": "0.11.6",
|
|
19
|
-
"@activepieces/pieces-framework": "0.25.4",
|
|
20
|
-
"@activepieces/shared": "0.37.0",
|
|
12
|
+
"googleapis-common": "7.2.0",
|
|
21
13
|
"tslib": "2.6.2"
|
|
22
14
|
},
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"main": "./src/index.js",
|
|
28
|
-
"type": "commonjs"
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
17
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
18
|
+
}
|
|
29
19
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const googleCalendar: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.googleCalendar = exports.googleCalendarAuth = void 0;
|
|
3
|
+
exports.googleCalendar = exports.createGoogleClient = exports.getAccessToken = exports.googleCalendarAuth = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
6
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
@@ -21,19 +21,10 @@ const event_start_time_before_1 = require("./lib/triggers/event-start-time-befor
|
|
|
21
21
|
const new_event_matching_search_1 = require("./lib/triggers/new-event-matching-search");
|
|
22
22
|
const event_cancelled_1 = require("./lib/triggers/event-cancelled");
|
|
23
23
|
const new_calendar_1 = require("./lib/triggers/new-calendar");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
required: true,
|
|
29
|
-
pkce: true,
|
|
30
|
-
scope: [
|
|
31
|
-
'https://www.googleapis.com/auth/calendar.events',
|
|
32
|
-
'https://www.googleapis.com/auth/calendar.readonly',
|
|
33
|
-
// TODO: Add the scope after Google App Verification
|
|
34
|
-
// 'https://www.googleapis.com/auth/calendar.calendarlist'
|
|
35
|
-
],
|
|
36
|
-
});
|
|
24
|
+
var common_2 = require("./lib/common");
|
|
25
|
+
Object.defineProperty(exports, "googleCalendarAuth", { enumerable: true, get: function () { return common_2.googleCalendarAuth; } });
|
|
26
|
+
Object.defineProperty(exports, "getAccessToken", { enumerable: true, get: function () { return common_2.getAccessToken; } });
|
|
27
|
+
Object.defineProperty(exports, "createGoogleClient", { enumerable: true, get: function () { return common_2.createGoogleClient; } });
|
|
37
28
|
exports.googleCalendar = (0, pieces_framework_1.createPiece)({
|
|
38
29
|
minimumSupportedRelease: '0.30.0',
|
|
39
30
|
logoUrl: 'https://cdn.activepieces.com/pieces/google-calendar.png',
|
|
@@ -54,7 +45,7 @@ exports.googleCalendar = (0, pieces_framework_1.createPiece)({
|
|
|
54
45
|
'sanket-a11y',
|
|
55
46
|
'geekyme'
|
|
56
47
|
],
|
|
57
|
-
auth:
|
|
48
|
+
auth: common_1.googleCalendarAuth,
|
|
58
49
|
actions: [
|
|
59
50
|
add_attendees_action_1.addAttendeesToEventAction,
|
|
60
51
|
create_quick_event_1.createQuickCalendarEvent,
|
|
@@ -67,13 +58,13 @@ exports.googleCalendar = (0, pieces_framework_1.createPiece)({
|
|
|
67
58
|
// TODO: add action after calendarList scope is verified
|
|
68
59
|
// addCalendarToCalendarlist,
|
|
69
60
|
(0, pieces_common_1.createCustomApiCallAction)({
|
|
70
|
-
auth:
|
|
61
|
+
auth: common_1.googleCalendarAuth,
|
|
71
62
|
baseUrl() {
|
|
72
63
|
return common_1.googleCalendarCommon.baseUrl;
|
|
73
64
|
},
|
|
74
65
|
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
75
66
|
return {
|
|
76
|
-
Authorization: `Bearer ${(auth)
|
|
67
|
+
Authorization: `Bearer ${yield (0, common_1.getAccessToken)(auth)}`,
|
|
77
68
|
};
|
|
78
69
|
}),
|
|
79
70
|
}),
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
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,yCAAsH;AACtH,kEAAqE;AACrE,6EAA+E;AAC/E,iFAAoE;AACpE,mEAA6D;AAC7D,wDAAoD;AACpD,0DAAsD;AACtD,oFAA8E;AAC9E,wFAAkF;AAClF,oEAAgE;AAChE,8DAA0D;AAE1D,uCAA+G;AAAtG,4GAAA,kBAAkB,OAAA;AAAE,wGAAA,cAAc,OAAA;AAA2B,4GAAA,kBAAkB,OAAA;AAE3E,QAAA,cAAc,GAAG,IAAA,8BAAW,EAAC;IACxC,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,yDAAyD;IAClE,UAAU,EAAE,CAAC,sBAAa,CAAC,YAAY,CAAC;IACxC,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,oCAAoC;IAEjD,OAAO,EAAE;QACP,aAAa;QACb,kBAAkB;QAClB,UAAU;QACV,cAAc;QACd,YAAY;QACZ,WAAW;QACX,eAAe;QACf,UAAU;QACV,SAAS;QACT,cAAc;QACd,aAAa;QACb,SAAS;KACV;IACD,IAAI,EAAE,2BAAkB;IACxB,OAAO,EAAE;QACP,gDAAyB;QACzB,6CAAwB;QACxB,0BAAW;QACX,sBAAS;QACT,uCAAiB;QACjB,uCAAiB;QACjB,qCAAY;QACZ,8BAAY;QACZ,wDAAwD;QACxD,6BAA6B;QAC7B,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,2BAAkB;YACxB,OAAO;gBACL,OAAO,6BAAoB,CAAC,OAAO,CAAC;YACtC,CAAC;YACD,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO;oBACL,aAAa,EAAE,UAAU,MAAM,IAAA,uBAAc,EAAC,IAA+B,CAAC,EAAE;iBACjF,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,qCAAoB;QAC7B,oBAAQ;QACR,sBAAS;QACT,8CAAoB;QACpB,kDAAsB;QACtB,gCAAc;QACd,0BAAW;KACZ;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
export declare const addAttendeesToEventAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
2
|
-
|
|
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
|
+
}>)[]>;
|
|
3
9
|
eventId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
10
|
attendees: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
5
11
|
}>;
|
|
12
|
+
//# sourceMappingURL=add-attendees.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addAttendeesToEventAction = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const __1 = require("../../");
|
|
6
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
6
|
const googleapis_1 = require("googleapis");
|
|
8
|
-
const googleapis_common_1 = require("googleapis-common");
|
|
9
7
|
const common_1 = require("../common");
|
|
10
8
|
exports.addAttendeesToEventAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth:
|
|
9
|
+
auth: common_1.googleCalendarAuth,
|
|
12
10
|
name: 'google-calendar-add-attendees',
|
|
13
11
|
displayName: 'Add Attendees to Event',
|
|
14
12
|
description: 'Add one or more person to existing event.',
|
|
@@ -29,8 +27,7 @@ exports.addAttendeesToEventAction = (0, pieces_framework_1.createAction)({
|
|
|
29
27
|
var _a;
|
|
30
28
|
const { calendar_id, eventId } = context.propsValue;
|
|
31
29
|
const attendeesInput = context.propsValue.attendees;
|
|
32
|
-
const authClient =
|
|
33
|
-
authClient.setCredentials(context.auth);
|
|
30
|
+
const authClient = yield (0, common_1.createGoogleClient)(context.auth);
|
|
34
31
|
const calendar = googleapis_1.google.calendar({ version: 'v3', auth: authClient });
|
|
35
32
|
// Note that each patch request consumes three quota units;
|
|
36
33
|
// prefer using a get followed by an update
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-attendees.action.js","sourceRoot":"","sources":["
|
|
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,3 +1,7 @@
|
|
|
1
|
-
export declare const addCalendarToCalendarlist: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
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
|
+
}>)[], {
|
|
2
5
|
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
6
|
}>;
|
|
7
|
+
//# sourceMappingURL=add-calendar-to-calendarlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addCalendarToCalendarlist = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const index_1 = require("../../index");
|
|
6
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const googleapis_common_1 = require("googleapis-common");
|
|
8
6
|
const googleapis_1 = require("googleapis");
|
|
7
|
+
const common_1 = require("../common");
|
|
9
8
|
exports.addCalendarToCalendarlist = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth:
|
|
9
|
+
auth: common_1.googleCalendarAuth,
|
|
11
10
|
name: 'addCalendarToCalendarlist',
|
|
12
11
|
displayName: 'Add Calendar to calendarList',
|
|
13
12
|
description: "Adds other people's calendars to your calendarList",
|
|
@@ -21,8 +20,7 @@ exports.addCalendarToCalendarlist = (0, pieces_framework_1.createAction)({
|
|
|
21
20
|
run(context) {
|
|
22
21
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
22
|
const id = context.propsValue.id;
|
|
24
|
-
const authClient =
|
|
25
|
-
authClient.setCredentials(context.auth);
|
|
23
|
+
const authClient = yield (0, common_1.createGoogleClient)(context.auth);
|
|
26
24
|
const calendar = googleapis_1.google.calendar({ version: 'v3', auth: authClient });
|
|
27
25
|
const response = yield calendar.calendarList.insert({
|
|
28
26
|
requestBody: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-calendar-to-calendarlist.js","sourceRoot":"","sources":["
|
|
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,11 +1,20 @@
|
|
|
1
|
-
export declare const createEvent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
2
|
-
|
|
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
|
+
}>)[]>;
|
|
3
9
|
title: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
10
|
start_date_time: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
5
11
|
end_date_time: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
6
12
|
location: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
13
|
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
8
|
-
colorId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
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
|
+
}>)[]>;
|
|
9
18
|
attendees: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
10
19
|
guests_can_modify: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
11
20
|
guests_can_invite_others: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
@@ -13,3 +22,4 @@ export declare const createEvent: import("@activepieces/pieces-framework").IActi
|
|
|
13
22
|
send_notifications: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
14
23
|
create_meet_link: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
15
24
|
}>;
|
|
25
|
+
//# sourceMappingURL=create-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;EA4JtB,CAAC"}
|
|
@@ -5,12 +5,10 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const common_1 = require("../common");
|
|
7
7
|
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
8
|
-
const __1 = require("../../");
|
|
9
8
|
const googleapis_1 = require("googleapis");
|
|
10
|
-
const googleapis_common_1 = require("googleapis-common");
|
|
11
9
|
const crypto_1 = require("crypto");
|
|
12
10
|
exports.createEvent = (0, pieces_framework_1.createAction)({
|
|
13
|
-
auth:
|
|
11
|
+
auth: common_1.googleCalendarAuth,
|
|
14
12
|
name: 'create_google_calendar_event',
|
|
15
13
|
description: 'Add Event',
|
|
16
14
|
displayName: 'Create Event',
|
|
@@ -110,8 +108,7 @@ exports.createEvent = (0, pieces_framework_1.createAction)({
|
|
|
110
108
|
attendeesObject.push({ email: attendee });
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
|
-
const authClient =
|
|
114
|
-
authClient.setCredentials(configValue.auth);
|
|
111
|
+
const authClient = yield (0, common_1.createGoogleClient)(configValue.auth);
|
|
115
112
|
const calendar = googleapis_1.google.calendar({ version: 'v3', auth: authClient });
|
|
116
113
|
const requestBody = {
|
|
117
114
|
summary,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-event.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"create-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAyF;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AAE,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,5 +1,12 @@
|
|
|
1
|
-
export declare const createQuickCalendarEvent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
2
|
-
|
|
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
|
+
}>)[]>;
|
|
3
9
|
text: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
4
10
|
send_updates: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true> | import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
5
11
|
}>;
|
|
12
|
+
//# sourceMappingURL=create-quick-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -5,9 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
|
-
const __1 = require("../../");
|
|
9
8
|
exports.createQuickCalendarEvent = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth:
|
|
9
|
+
auth: common_1.googleCalendarAuth,
|
|
11
10
|
name: 'create_quick_event',
|
|
12
11
|
description: 'Add Quick Calendar Event',
|
|
13
12
|
displayName: 'Create Quick Event',
|
|
@@ -56,7 +55,7 @@ exports.createQuickCalendarEvent = (0, pieces_framework_1.createAction)({
|
|
|
56
55
|
body: {},
|
|
57
56
|
authentication: {
|
|
58
57
|
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
59
|
-
token: configValue.auth
|
|
58
|
+
token: yield (0, common_1.getAccessToken)(configValue.auth),
|
|
60
59
|
},
|
|
61
60
|
queryParams: qParams,
|
|
62
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-quick-event.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"create-quick-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-quick-event.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAKqC;AACrC,sCAAqF;AAExE,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,2BAAkB;IACxB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,oBAAoB;IACjC,KAAK,EAAE;QACL,WAAW,EAAE,6BAAoB,CA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C/C,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
export declare const deleteEventAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
2
|
-
|
|
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
|
+
}>)[]>;
|
|
3
9
|
eventId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
10
|
}>;
|
|
11
|
+
//# sourceMappingURL=delete-event.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -4,12 +4,10 @@ exports.deleteEventAction = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const googleapis_1 = require("googleapis");
|
|
7
|
-
const googleapis_common_1 = require("googleapis-common");
|
|
8
|
-
const index_1 = require("../../index");
|
|
9
7
|
const common_1 = require("../common");
|
|
10
8
|
exports.deleteEventAction = (0, pieces_framework_1.createAction)({
|
|
11
9
|
displayName: 'Delete Event',
|
|
12
|
-
auth:
|
|
10
|
+
auth: common_1.googleCalendarAuth,
|
|
13
11
|
name: 'delete_event',
|
|
14
12
|
description: 'Deletes an event from Google Calendar.',
|
|
15
13
|
props: {
|
|
@@ -21,8 +19,7 @@ exports.deleteEventAction = (0, pieces_framework_1.createAction)({
|
|
|
21
19
|
},
|
|
22
20
|
run(context) {
|
|
23
21
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
const authClient =
|
|
25
|
-
authClient.setCredentials(context.auth);
|
|
22
|
+
const authClient = yield (0, common_1.createGoogleClient)(context.auth);
|
|
26
23
|
const calendarId = context.propsValue.calendar_id;
|
|
27
24
|
const eventId = context.propsValue.eventId;
|
|
28
25
|
const calendar = googleapis_1.google.calendar({ version: 'v3', auth: authClient });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-event.action.js","sourceRoot":"","sources":["
|
|
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,5 +1,12 @@
|
|
|
1
|
-
export declare const findFreeBusy: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
2
|
-
|
|
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
|
+
}>)[]>;
|
|
3
9
|
start_date: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
4
10
|
end_date: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
5
11
|
}>;
|
|
12
|
+
//# sourceMappingURL=find-busy-free-periods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -4,18 +4,17 @@ exports.findFreeBusy = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const __1 = require("../../");
|
|
8
7
|
const common_1 = require("../common");
|
|
9
8
|
const helper_1 = require("../common/helper");
|
|
10
9
|
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
11
10
|
exports.findFreeBusy = (0, pieces_framework_1.createAction)({
|
|
12
|
-
auth:
|
|
11
|
+
auth: common_1.googleCalendarAuth,
|
|
13
12
|
name: 'google_calendar_find_busy_free_periods',
|
|
14
13
|
displayName: 'Find Busy/Free Periods in Calendar',
|
|
15
14
|
description: 'Finds free/busy calendar details from Google Calendar.',
|
|
16
15
|
props: {
|
|
17
16
|
calendar_ids: pieces_framework_1.Property.MultiSelectDropdown({
|
|
18
|
-
auth:
|
|
17
|
+
auth: common_1.googleCalendarAuth,
|
|
19
18
|
displayName: 'Calendars',
|
|
20
19
|
description: 'Select the calendars to check for busy periods.',
|
|
21
20
|
required: true,
|
|
@@ -55,7 +54,7 @@ exports.findFreeBusy = (0, pieces_framework_1.createAction)({
|
|
|
55
54
|
run(context) {
|
|
56
55
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
57
56
|
const { calendar_ids, start_date, end_date } = context.propsValue;
|
|
58
|
-
const
|
|
57
|
+
const access_token = yield (0, common_1.getAccessToken)(context.auth);
|
|
59
58
|
const requestBody = {
|
|
60
59
|
timeMin: (0, dayjs_1.default)(start_date).toISOString(),
|
|
61
60
|
timeMax: (0, dayjs_1.default)(end_date).toISOString(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-busy-free-periods.js","sourceRoot":"","sources":["
|
|
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;QACF,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAClE,MAAM,YAAY,GAAG,MAAM,IAAA,uBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAExD,MAAM,WAAW,GAAG;gBAElB,OAAO,EAAE,IAAA,eAAK,EAAC,UAAU,CAAC,CAAC,WAAW,EAAE;gBACxC,OAAO,EAAE,IAAA,eAAK,EAAC,QAAQ,CAAC,CAAC,WAAW,EAAE;gBAEtC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;aAC1C,CAAC;YAEF,MAAM,OAAO,GAAgB;gBAC3B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,6BAAoB,CAAC,OAAO,WAAW;gBAC/C,IAAI,EAAE,WAAW;gBACjB,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,YAAY;iBACpB;aACF,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAmB,OAAO,CAAC,CAAC;YAGzE,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
export declare const getEventById: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
2
|
-
|
|
1
|
+
export declare const getEventById: 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
|
+
}>)[]>;
|
|
3
9
|
event_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
10
|
max_attendees: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
5
11
|
time_zone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
12
|
}>;
|
|
13
|
+
//# sourceMappingURL=get-event-by-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -5,9 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
|
-
const __1 = require("../../");
|
|
9
8
|
exports.getEventById = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth:
|
|
9
|
+
auth: common_1.googleCalendarAuth,
|
|
11
10
|
name: 'google_calendar_get_event_by_id',
|
|
12
11
|
displayName: 'Get Event by ID',
|
|
13
12
|
description: 'Fetch event details by its unique ID from Google Calendar.',
|
|
@@ -33,7 +32,7 @@ exports.getEventById = (0, pieces_framework_1.createAction)({
|
|
|
33
32
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
33
|
var _a, _b, _c, _d;
|
|
35
34
|
const { calendar_id: calendarId, event_id: eventId, max_attendees: maxAttendees, time_zone: timeZone, } = context.propsValue;
|
|
36
|
-
const
|
|
35
|
+
const token = yield (0, common_1.getAccessToken)(context.auth);
|
|
37
36
|
if (!calendarId ||
|
|
38
37
|
typeof calendarId !== 'string' ||
|
|
39
38
|
calendarId.trim().length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-event-by-id.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"get-event-by-id.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-event-by-id.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAKqC;AACrC,sCAAqF;AAGxE,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,2BAAkB;IACxB,IAAI,EAAE,iCAAiC;IACvC,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,4DAA4D;IACzE,KAAK,EAAE;QACL,WAAW,EAAE,6BAAoB,CAAC,gBAAgB,EAAE;QACpD,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EACT,uHAAuH;YACzH,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC7B,WAAW,EAAE,eAAe;YAC5B,WAAW,EACT,wHAAwH;YAC1H,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,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CAAC,OAAO,IAAI,wBAAwB,EAAE,CACtE,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
export declare const getEvents: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props
|
|
2
|
-
|
|
1
|
+
export declare const getEvents: 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
|
+
}>)[]>;
|
|
3
9
|
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, true>;
|
|
4
10
|
search: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
11
|
start_date: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
6
12
|
end_date: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
7
13
|
singleEvents: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
8
14
|
}>;
|
|
15
|
+
//# sourceMappingURL=get-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-events.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-events.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;EAoGpB,CAAC"}
|
|
@@ -6,9 +6,8 @@ const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
9
|
-
const __1 = require("../../");
|
|
10
9
|
exports.getEvents = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth:
|
|
10
|
+
auth: common_1.googleCalendarAuth,
|
|
12
11
|
name: 'google_calendar_get_events',
|
|
13
12
|
description: 'Get Events',
|
|
14
13
|
displayName: 'Get all Events',
|
|
@@ -63,7 +62,7 @@ exports.getEvents = (0, pieces_framework_1.createAction)({
|
|
|
63
62
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
63
|
// docs: https://developers.google.com/calendar/api/v3/reference/events/list
|
|
65
64
|
const { calendar_id: calendarId, start_date, end_date, search, event_types, singleEvents, } = configValue.propsValue;
|
|
66
|
-
const
|
|
65
|
+
const token = yield (0, common_1.getAccessToken)(configValue.auth);
|
|
67
66
|
const queryParams = { showDeleted: 'false' };
|
|
68
67
|
let url = `${common_1.googleCalendarCommon.baseUrl}/calendars/${calendarId}/events`;
|
|
69
68
|
if (singleEvents !== null) {
|