@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.
Files changed (85) hide show
  1. package/package.json +7 -15
  2. package/src/index.js +106 -81
  3. package/src/index.d.ts +0 -6
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/add-attendees.action.d.ts +0 -12
  7. package/src/lib/actions/add-attendees.action.d.ts.map +0 -1
  8. package/src/lib/actions/add-attendees.action.js +0 -51
  9. package/src/lib/actions/add-attendees.action.js.map +0 -1
  10. package/src/lib/actions/add-calendar-to-calendarlist.d.ts +0 -7
  11. package/src/lib/actions/add-calendar-to-calendarlist.d.ts.map +0 -1
  12. package/src/lib/actions/add-calendar-to-calendarlist.js +0 -34
  13. package/src/lib/actions/add-calendar-to-calendarlist.js.map +0 -1
  14. package/src/lib/actions/create-event.d.ts +0 -25
  15. package/src/lib/actions/create-event.d.ts.map +0 -1
  16. package/src/lib/actions/create-event.js +0 -146
  17. package/src/lib/actions/create-event.js.map +0 -1
  18. package/src/lib/actions/create-quick-event.d.ts +0 -12
  19. package/src/lib/actions/create-quick-event.d.ts.map +0 -1
  20. package/src/lib/actions/create-quick-event.js +0 -66
  21. package/src/lib/actions/create-quick-event.js.map +0 -1
  22. package/src/lib/actions/delete-event.action.d.ts +0 -11
  23. package/src/lib/actions/delete-event.action.d.ts.map +0 -1
  24. package/src/lib/actions/delete-event.action.js +0 -34
  25. package/src/lib/actions/delete-event.action.js.map +0 -1
  26. package/src/lib/actions/find-busy-free-periods.d.ts +0 -12
  27. package/src/lib/actions/find-busy-free-periods.d.ts.map +0 -1
  28. package/src/lib/actions/find-busy-free-periods.js +0 -77
  29. package/src/lib/actions/find-busy-free-periods.js.map +0 -1
  30. package/src/lib/actions/get-event-by-id.d.ts +0 -13
  31. package/src/lib/actions/get-event-by-id.d.ts.map +0 -1
  32. package/src/lib/actions/get-event-by-id.js +0 -92
  33. package/src/lib/actions/get-event-by-id.js.map +0 -1
  34. package/src/lib/actions/get-events.d.ts +0 -15
  35. package/src/lib/actions/get-events.d.ts.map +0 -1
  36. package/src/lib/actions/get-events.js +0 -98
  37. package/src/lib/actions/get-events.js.map +0 -1
  38. package/src/lib/actions/update-event.action.d.ts +0 -24
  39. package/src/lib/actions/update-event.action.d.ts.map +0 -1
  40. package/src/lib/actions/update-event.action.js +0 -111
  41. package/src/lib/actions/update-event.action.js.map +0 -1
  42. package/src/lib/auth.d.ts +0 -11
  43. package/src/lib/auth.d.ts.map +0 -1
  44. package/src/lib/auth.js +0 -86
  45. package/src/lib/auth.js.map +0 -1
  46. package/src/lib/common/helper.d.ts +0 -26
  47. package/src/lib/common/helper.d.ts.map +0 -1
  48. package/src/lib/common/helper.js +0 -269
  49. package/src/lib/common/helper.js.map +0 -1
  50. package/src/lib/common/index.d.ts +0 -20
  51. package/src/lib/common/index.d.ts.map +0 -1
  52. package/src/lib/common/index.js +0 -99
  53. package/src/lib/common/index.js.map +0 -1
  54. package/src/lib/common/types.d.ts +0 -240
  55. package/src/lib/common/types.d.ts.map +0 -1
  56. package/src/lib/common/types.js +0 -17
  57. package/src/lib/common/types.js.map +0 -1
  58. package/src/lib/triggers/calendar-event.d.ts +0 -39
  59. package/src/lib/triggers/calendar-event.d.ts.map +0 -1
  60. package/src/lib/triggers/calendar-event.js +0 -144
  61. package/src/lib/triggers/calendar-event.js.map +0 -1
  62. package/src/lib/triggers/event-cancelled.d.ts +0 -71
  63. package/src/lib/triggers/event-cancelled.d.ts.map +0 -1
  64. package/src/lib/triggers/event-cancelled.js +0 -165
  65. package/src/lib/triggers/event-cancelled.js.map +0 -1
  66. package/src/lib/triggers/event-ends.d.ts +0 -67
  67. package/src/lib/triggers/event-ends.d.ts.map +0 -1
  68. package/src/lib/triggers/event-ends.js +0 -166
  69. package/src/lib/triggers/event-ends.js.map +0 -1
  70. package/src/lib/triggers/event-start-time-before.d.ts +0 -75
  71. package/src/lib/triggers/event-start-time-before.d.ts.map +0 -1
  72. package/src/lib/triggers/event-start-time-before.js +0 -160
  73. package/src/lib/triggers/event-start-time-before.js.map +0 -1
  74. package/src/lib/triggers/new-calendar.d.ts +0 -31
  75. package/src/lib/triggers/new-calendar.d.ts.map +0 -1
  76. package/src/lib/triggers/new-calendar.js +0 -151
  77. package/src/lib/triggers/new-calendar.js.map +0 -1
  78. package/src/lib/triggers/new-event-matching-search.d.ts +0 -47
  79. package/src/lib/triggers/new-event-matching-search.d.ts.map +0 -1
  80. package/src/lib/triggers/new-event-matching-search.js +0 -184
  81. package/src/lib/triggers/new-event-matching-search.js.map +0 -1
  82. package/src/lib/triggers/new-event.d.ts +0 -47
  83. package/src/lib/triggers/new-event.d.ts.map +0 -1
  84. package/src/lib/triggers/new-event.js +0 -225
  85. package/src/lib/triggers/new-event.js.map +0 -1
@@ -1,47 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newEventMatchingSearch: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, (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
- calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
7
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
- }>)[]>;
10
- search_term: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
12
- search_fields: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
13
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
14
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
- }>)[], {
17
- calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
18
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
20
- }>)[]>;
21
- search_term: import("@activepieces/pieces-framework").ShortTextProperty<true>;
22
- event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
23
- search_fields: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
24
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
25
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
26
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
27
- }>)[], {
28
- calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
29
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
30
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
31
- }>)[]>;
32
- search_term: import("@activepieces/pieces-framework").ShortTextProperty<true>;
33
- event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
34
- search_fields: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
35
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
36
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
37
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
38
- }>)[], {
39
- calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
40
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
41
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
42
- }>)[]>;
43
- search_term: import("@activepieces/pieces-framework").ShortTextProperty<true>;
44
- event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
45
- search_fields: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
46
- }>;
47
- //# sourceMappingURL=new-event-matching-search.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-event-matching-search.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event-matching-search.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAiIjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0FjC,CAAC"}
@@ -1,184 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newEventMatchingSearch = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_framework_2 = require("@activepieces/pieces-framework");
7
- const common_1 = require("../common");
8
- const pieces_common_1 = require("@activepieces/pieces-common");
9
- const pieces_common_2 = require("@activepieces/pieces-common");
10
- const polling = {
11
- strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
12
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, lastFetchEpochMS }) {
13
- const { calendar_id, search_term, event_types, search_fields } = propsValue;
14
- if (!calendar_id || !search_term) {
15
- return [];
16
- }
17
- let minUpdated;
18
- if (lastFetchEpochMS === 0) {
19
- minUpdated = new Date();
20
- minUpdated.setDate(minUpdated.getDate() - 1);
21
- }
22
- else {
23
- minUpdated = new Date(lastFetchEpochMS);
24
- }
25
- const queryParams = {
26
- singleEvents: 'true',
27
- orderBy: 'updated',
28
- updatedMin: minUpdated.toISOString(),
29
- q: search_term,
30
- };
31
- if (event_types && event_types.length > 0) {
32
- event_types.forEach((type) => {
33
- if (!queryParams.eventTypes) {
34
- queryParams.eventTypes = type;
35
- }
36
- else {
37
- queryParams.eventTypes += '&eventTypes=' + type;
38
- }
39
- });
40
- }
41
- const request = {
42
- method: pieces_common_2.HttpMethod.GET,
43
- url: `${common_1.googleCalendarCommon.baseUrl}/calendars/${calendar_id}/events`,
44
- authentication: {
45
- type: pieces_common_2.AuthenticationType.BEARER_TOKEN,
46
- token: yield (0, common_1.getAccessToken)(auth),
47
- },
48
- queryParams: queryParams,
49
- };
50
- const response = yield pieces_common_2.httpClient.sendRequest(request);
51
- const events = response.body.items;
52
- const newEvents = events.filter((event) => {
53
- var _a, _b;
54
- const created = new Date((_a = event.created) !== null && _a !== void 0 ? _a : 0).getTime();
55
- const updated = new Date((_b = event.updated) !== null && _b !== void 0 ? _b : 0).getTime();
56
- const isNewEvent = updated - created < 5000;
57
- if (!isNewEvent)
58
- return false;
59
- if (search_fields && search_fields.length > 0) {
60
- const searchTermLower = search_term.toLowerCase();
61
- return search_fields.some((field) => {
62
- var _a, _b, _c, _d;
63
- switch (field) {
64
- case 'summary':
65
- return (((_a = event.summary) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTermLower)) || false);
66
- case 'description':
67
- return (((_b = event.description) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(searchTermLower)) ||
68
- false);
69
- case 'location':
70
- return (((_c = event.location) === null || _c === void 0 ? void 0 : _c.toLowerCase().includes(searchTermLower)) || false);
71
- case 'attendees':
72
- return (((_d = event.attendees) === null || _d === void 0 ? void 0 : _d.some((attendee) => {
73
- var _a, _b;
74
- return ((_a = attendee.email) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTermLower)) ||
75
- ((_b = attendee.displayName) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(searchTermLower));
76
- })) || false);
77
- default:
78
- return false;
79
- }
80
- });
81
- }
82
- return true;
83
- });
84
- return newEvents.map((event) => {
85
- return {
86
- epochMilliSeconds: new Date(event.updated).getTime(),
87
- data: event,
88
- };
89
- });
90
- }),
91
- };
92
- exports.newEventMatchingSearch = (0, pieces_framework_1.createTrigger)({
93
- auth: common_1.googleCalendarAuth,
94
- name: 'new_event_matching_search',
95
- displayName: 'New Event Matching Search',
96
- description: 'Fires when a new event is created that matches a specified search term.',
97
- props: {
98
- calendar_id: common_1.googleCalendarCommon.calendarDropdown('writer'),
99
- search_term: pieces_framework_1.Property.ShortText({
100
- displayName: 'Search Term',
101
- description: 'The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).',
102
- required: true,
103
- }),
104
- event_types: pieces_framework_1.Property.StaticMultiSelectDropdown({
105
- displayName: 'Event Types',
106
- description: 'Filter by specific event types (optional)',
107
- required: false,
108
- options: {
109
- options: [
110
- { label: 'Default Events', value: 'default' },
111
- { label: 'Birthday Events', value: 'birthday' },
112
- { label: 'Focus Time', value: 'focusTime' },
113
- { label: 'Out of Office', value: 'outOfOffice' },
114
- { label: 'Working Location', value: 'workingLocation' },
115
- { label: 'From Gmail', value: 'fromGmail' },
116
- ],
117
- },
118
- }),
119
- search_fields: pieces_framework_1.Property.StaticMultiSelectDropdown({
120
- displayName: 'Search In Fields',
121
- description: "Specify which fields to search in (leave empty to use Google's default search across all fields)",
122
- required: false,
123
- options: {
124
- options: [
125
- { label: 'Event Title/Summary', value: 'summary' },
126
- { label: 'Event Description', value: 'description' },
127
- { label: 'Event Location', value: 'location' },
128
- { label: 'Attendee Names/Emails', value: 'attendees' },
129
- ],
130
- },
131
- }),
132
- },
133
- type: pieces_framework_2.TriggerStrategy.POLLING,
134
- sampleData: {
135
- id: 'abc123def456',
136
- summary: 'Final Project Review',
137
- description: 'Review of the Q3 final project deliverables.',
138
- status: 'confirmed',
139
- created: '2025-08-14T09:05:00.000Z',
140
- updated: '2025-08-14T09:05:01.000Z',
141
- start: { dateTime: '2025-09-01T10:00:00-07:00' },
142
- end: { dateTime: '2025-09-01T11:30:00-07:00' },
143
- organizer: { email: 'project.manager@example.com' },
144
- },
145
- onEnable(context) {
146
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
147
- yield pieces_common_1.pollingHelper.onEnable(polling, {
148
- auth: context.auth,
149
- store: context.store,
150
- propsValue: context.propsValue,
151
- });
152
- });
153
- },
154
- onDisable(context) {
155
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
156
- yield pieces_common_1.pollingHelper.onDisable(polling, {
157
- auth: context.auth,
158
- store: context.store,
159
- propsValue: context.propsValue,
160
- });
161
- });
162
- },
163
- run(context) {
164
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
165
- return yield pieces_common_1.pollingHelper.poll(polling, {
166
- auth: context.auth,
167
- store: context.store,
168
- propsValue: context.propsValue,
169
- files: context.files,
170
- });
171
- });
172
- },
173
- test(context) {
174
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
175
- return yield pieces_common_1.pollingHelper.test(polling, {
176
- auth: context.auth,
177
- store: context.store,
178
- propsValue: context.propsValue,
179
- files: context.files,
180
- });
181
- });
182
- },
183
- });
184
- //# sourceMappingURL=new-event-matching-search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-event-matching-search.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event-matching-search.ts"],"names":[],"mappings":";;;;AAA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AA2B,EAAE;QAChD,GAAG,EAAE,EAAE,QAAQ,EAAE,2BAA2B,EAAE;QAC9C,SAAS,EAAE,EAAE,KAAK,EAAE,6BAA6B,EAAE;KACpD;IAEK,QAAQ,CAAC,OAAO;;YACpB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE;gBACpC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,SAAS,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE;gBACrC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE;gBACvC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,IAAI,CAAC,OAAO;;YAChB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE;gBACvC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,47 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, (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
- calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
7
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
- }>)[]>;
10
- event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
11
- search_filter: import("@activepieces/pieces-framework").ShortTextProperty<false>;
12
- exclude_all_day: import("@activepieces/pieces-framework").CheckboxProperty<false>;
13
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
14
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
- }>)[], {
17
- calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
18
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
20
- }>)[]>;
21
- event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
22
- search_filter: import("@activepieces/pieces-framework").ShortTextProperty<false>;
23
- exclude_all_day: import("@activepieces/pieces-framework").CheckboxProperty<false>;
24
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
25
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
26
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
27
- }>)[], {
28
- calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
29
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
30
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
31
- }>)[]>;
32
- event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
33
- search_filter: import("@activepieces/pieces-framework").ShortTextProperty<false>;
34
- exclude_all_day: import("@activepieces/pieces-framework").CheckboxProperty<false>;
35
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
36
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
37
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
38
- }>)[], {
39
- calendar_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
40
- serviceAccount: import("@activepieces/pieces-framework").ShortTextProperty<true>;
41
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
42
- }>)[]>;
43
- event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
44
- search_filter: import("@activepieces/pieces-framework").ShortTextProperty<false>;
45
- exclude_all_day: import("@activepieces/pieces-framework").CheckboxProperty<false>;
46
- }>;
47
- //# sourceMappingURL=new-event.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGhB,MAAM,gCAAgC,CAAC;AAgExC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6MnB,CAAC"}
@@ -1,225 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newEvent = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const shared_1 = require("@activepieces/shared");
7
- const common_1 = require("../common");
8
- const helper_1 = require("../common/helper");
9
- const WATCH_STORE_KEY = 'google_calendar_watch';
10
- const SYNC_TOKEN_STORE_KEY = 'google_calendar_sync_token';
11
- const SEEN_EVENT_IDS_STORE_KEY = 'google_calendar_seen_event_ids';
12
- const SEEN_EVENT_IDS_LIMIT = 500;
13
- function matchesFilters(event, { event_types, search_filter, exclude_all_day }) {
14
- var _a, _b;
15
- if (event_types && event_types.length > 0) {
16
- const eventType = event.eventType || 'default';
17
- if (!event_types.includes(eventType)) {
18
- return false;
19
- }
20
- }
21
- if (search_filter && search_filter.trim()) {
22
- const searchTerm = search_filter.toLowerCase().trim();
23
- const summary = (event.summary || '').toLowerCase();
24
- const description = (event.description || '').toLowerCase();
25
- const location = (event.location || '').toLowerCase();
26
- const matchesSearch = summary.includes(searchTerm) ||
27
- description.includes(searchTerm) ||
28
- location.includes(searchTerm);
29
- if (!matchesSearch) {
30
- return false;
31
- }
32
- }
33
- if (exclude_all_day) {
34
- const isAllDay = ((_a = event.start) === null || _a === void 0 ? void 0 : _a.date) && !((_b = event.start) === null || _b === void 0 ? void 0 : _b.dateTime);
35
- if (isAllDay) {
36
- return false;
37
- }
38
- }
39
- return true;
40
- }
41
- exports.newEvent = (0, pieces_framework_1.createTrigger)({
42
- auth: common_1.googleCalendarAuth,
43
- name: 'new_event',
44
- displayName: 'New Event',
45
- description: 'Fires when a new event is created in a calendar.',
46
- props: {
47
- calendar_id: common_1.googleCalendarCommon.calendarDropdown('writer'),
48
- event_types: pieces_framework_1.Property.StaticMultiSelectDropdown({
49
- displayName: 'Event Types to Monitor',
50
- description: 'Filter by specific event types (leave empty to monitor all event types)',
51
- required: false,
52
- options: {
53
- options: [
54
- { label: 'Default Events', value: 'default' },
55
- { label: 'Birthday Events', value: 'birthday' },
56
- { label: 'Focus Time', value: 'focusTime' },
57
- { label: 'Out of Office', value: 'outOfOffice' },
58
- { label: 'Working Location', value: 'workingLocation' },
59
- { label: 'From Gmail', value: 'fromGmail' },
60
- ],
61
- },
62
- }),
63
- search_filter: pieces_framework_1.Property.ShortText({
64
- displayName: 'Search Filter',
65
- description: 'Only trigger for events containing this text in title, description, or location (optional)',
66
- required: false,
67
- }),
68
- exclude_all_day: pieces_framework_1.Property.Checkbox({
69
- displayName: 'Exclude All-Day Events',
70
- description: 'Skip triggering for all-day events',
71
- required: false,
72
- defaultValue: false,
73
- }),
74
- },
75
- type: pieces_framework_1.TriggerStrategy.WEBHOOK,
76
- renewConfiguration: {
77
- strategy: pieces_framework_1.WebhookRenewStrategy.CRON,
78
- cronExpression: '0 */12 * * *',
79
- },
80
- sampleData: {
81
- kind: 'calendar#event',
82
- etag: '"3419997894982000"',
83
- id: 'sample_event_id_12345',
84
- status: 'confirmed',
85
- htmlLink: 'https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzEyMzQ1',
86
- created: '2025-08-15T11:02:27.000Z',
87
- updated: '2025-08-15T11:02:27.491Z',
88
- summary: 'Team Sync',
89
- creator: { email: 'creator@example.com' },
90
- organizer: {
91
- email: 'creator@example.com',
92
- self: true,
93
- },
94
- start: {
95
- dateTime: '2025-08-18T10:00:00-07:00',
96
- timeZone: 'America/Los_Angeles',
97
- },
98
- end: {
99
- dateTime: '2025-08-18T11:00:00-07:00',
100
- timeZone: 'America/Los_Angeles',
101
- },
102
- iCalUID: 'sample_event_id_12345@google.com',
103
- sequence: 0,
104
- reminders: { useDefault: true },
105
- eventType: 'default',
106
- },
107
- onEnable(context) {
108
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
109
- const calendarId = context.propsValue.calendar_id;
110
- const auth = context.auth;
111
- const response = yield (0, helper_1.watchEvent)(calendarId, context.webhookUrl, auth);
112
- yield context.store.put(WATCH_STORE_KEY, response);
113
- const initialSyncToken = yield (0, helper_1.getInitialSyncToken)({
114
- calendarId,
115
- authProp: auth,
116
- });
117
- if (!(0, shared_1.isNil)(initialSyncToken)) {
118
- yield context.store.put(SYNC_TOKEN_STORE_KEY, initialSyncToken);
119
- }
120
- });
121
- },
122
- onDisable(context) {
123
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
124
- const auth = context.auth;
125
- const watch = yield context.store.get(WATCH_STORE_KEY);
126
- if (watch) {
127
- yield (0, helper_1.stopWatchEvent)(watch, auth);
128
- }
129
- yield context.store.delete(SYNC_TOKEN_STORE_KEY);
130
- yield context.store.delete(SEEN_EVENT_IDS_STORE_KEY);
131
- });
132
- },
133
- onRenew(context) {
134
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
135
- const calendarId = context.propsValue.calendar_id;
136
- const auth = context.auth;
137
- const existingWatch = yield context.store.get(WATCH_STORE_KEY);
138
- if (existingWatch) {
139
- yield (0, helper_1.stopWatchEvent)(existingWatch, auth);
140
- }
141
- const renewed = yield (0, helper_1.watchEvent)(calendarId, context.webhookUrl, auth);
142
- yield context.store.put(WATCH_STORE_KEY, renewed);
143
- });
144
- },
145
- run(context) {
146
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
147
- var _a;
148
- const payload = context.payload;
149
- const headers = payload.headers;
150
- const resourceState = headers['x-goog-resource-state'];
151
- const filters = {
152
- event_types: context.propsValue.event_types,
153
- search_filter: context.propsValue.search_filter,
154
- exclude_all_day: context.propsValue.exclude_all_day,
155
- };
156
- if (resourceState === 'sync') {
157
- return [];
158
- }
159
- if (resourceState !== 'exists') {
160
- return [];
161
- }
162
- const calendarId = context.propsValue.calendar_id;
163
- const auth = context.auth;
164
- const syncToken = yield context.store.get(SYNC_TOKEN_STORE_KEY);
165
- if ((0, shared_1.isNil)(syncToken)) {
166
- const fresh = yield (0, helper_1.getInitialSyncToken)({ calendarId, authProp: auth });
167
- if (!(0, shared_1.isNil)(fresh)) {
168
- yield context.store.put(SYNC_TOKEN_STORE_KEY, fresh);
169
- }
170
- return [];
171
- }
172
- const { items, nextSyncToken, syncTokenInvalid } = yield (0, helper_1.listEventsWithSyncToken)({
173
- calendarId,
174
- syncToken,
175
- authProp: auth,
176
- });
177
- if (syncTokenInvalid) {
178
- const fresh = yield (0, helper_1.getInitialSyncToken)({ calendarId, authProp: auth });
179
- if (!(0, shared_1.isNil)(fresh)) {
180
- yield context.store.put(SYNC_TOKEN_STORE_KEY, fresh);
181
- }
182
- return [];
183
- }
184
- if (!(0, shared_1.isNil)(nextSyncToken)) {
185
- yield context.store.put(SYNC_TOKEN_STORE_KEY, nextSyncToken);
186
- }
187
- const seenIds = yield context.store.get(SEEN_EVENT_IDS_STORE_KEY);
188
- const seenSet = new Set(seenIds !== null && seenIds !== void 0 ? seenIds : []);
189
- const newEvents = [];
190
- for (const event of items) {
191
- if (!event.id || event.status === 'cancelled') {
192
- continue;
193
- }
194
- if (seenSet.has(event.id)) {
195
- continue;
196
- }
197
- seenSet.add(event.id);
198
- if (matchesFilters(event, filters)) {
199
- newEvents.push(event);
200
- }
201
- }
202
- if (seenSet.size !== ((_a = seenIds === null || seenIds === void 0 ? void 0 : seenIds.length) !== null && _a !== void 0 ? _a : 0)) {
203
- const bounded = Array.from(seenSet).slice(-SEEN_EVENT_IDS_LIMIT);
204
- yield context.store.put(SEEN_EVENT_IDS_STORE_KEY, bounded);
205
- }
206
- return newEvents;
207
- });
208
- },
209
- test(context) {
210
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
211
- const auth = context.auth;
212
- const filters = {
213
- event_types: context.propsValue.event_types,
214
- search_filter: context.propsValue.search_filter,
215
- exclude_all_day: context.propsValue.exclude_all_day,
216
- };
217
- const latestEvent = yield (0, helper_1.getLatestEvent)(context.propsValue.calendar_id, auth);
218
- if (!matchesFilters(latestEvent, filters)) {
219
- return [];
220
- }
221
- return [latestEvent];
222
- });
223
- },
224
- });
225
- //# sourceMappingURL=new-event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event.ts"],"names":[],"mappings":";;;;AAAA,qEAKwC;AACxC,iDAA6C;AAC7C,sCAImB;AACnB,6CAM0B;AAG1B,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAChD,MAAM,oBAAoB,GAAG,4BAA4B,CAAC;AAC1D,MAAM,wBAAwB,GAAG,gCAAgC,CAAC;AAClE,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAQjC,SAAS,cAAc,CACrB,KAA0B,EAC1B,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAgB;;IAE7D,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,SAAS,CAAC;QAC/C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,IAAI,aAAa,IAAI,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC;QAC1C,MAAM,UAAU,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QACtD,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QACpD,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5D,MAAM,QAAQ,GAA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