@activepieces/piece-google-calendar 0.9.3 → 0.9.5

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 -53
  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 -148
  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 -68
  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 -36
  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 -79
  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 -94
  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 -100
  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 -113
  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 -147
  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 -168
  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 -169
  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 -163
  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 -154
  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 -187
  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 -228
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6FjC,CAAC"}
@@ -1,187 +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
- aiMetadata: {
98
- description: 'Fires when a newly created event in the selected calendar matches a required search term (matched across title, description, location, and attendees by default, or restricted to chosen fields). Each fired item is the matching new event; can also be filtered by event type.',
99
- },
100
- props: {
101
- calendar_id: common_1.googleCalendarCommon.calendarDropdown('writer'),
102
- search_term: pieces_framework_1.Property.ShortText({
103
- displayName: 'Search Term',
104
- description: 'The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).',
105
- required: true,
106
- }),
107
- event_types: pieces_framework_1.Property.StaticMultiSelectDropdown({
108
- displayName: 'Event Types',
109
- description: 'Filter by specific event types (optional)',
110
- required: false,
111
- options: {
112
- options: [
113
- { label: 'Default Events', value: 'default' },
114
- { label: 'Birthday Events', value: 'birthday' },
115
- { label: 'Focus Time', value: 'focusTime' },
116
- { label: 'Out of Office', value: 'outOfOffice' },
117
- { label: 'Working Location', value: 'workingLocation' },
118
- { label: 'From Gmail', value: 'fromGmail' },
119
- ],
120
- },
121
- }),
122
- search_fields: pieces_framework_1.Property.StaticMultiSelectDropdown({
123
- displayName: 'Search In Fields',
124
- description: "Specify which fields to search in (leave empty to use Google's default search across all fields)",
125
- required: false,
126
- options: {
127
- options: [
128
- { label: 'Event Title/Summary', value: 'summary' },
129
- { label: 'Event Description', value: 'description' },
130
- { label: 'Event Location', value: 'location' },
131
- { label: 'Attendee Names/Emails', value: 'attendees' },
132
- ],
133
- },
134
- }),
135
- },
136
- type: pieces_framework_2.TriggerStrategy.POLLING,
137
- sampleData: {
138
- id: 'abc123def456',
139
- summary: 'Final Project Review',
140
- description: 'Review of the Q3 final project deliverables.',
141
- status: 'confirmed',
142
- created: '2025-08-14T09:05:00.000Z',
143
- updated: '2025-08-14T09:05:01.000Z',
144
- start: { dateTime: '2025-09-01T10:00:00-07:00' },
145
- end: { dateTime: '2025-09-01T11:30:00-07:00' },
146
- organizer: { email: 'project.manager@example.com' },
147
- },
148
- onEnable(context) {
149
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
150
- yield pieces_common_1.pollingHelper.onEnable(polling, {
151
- auth: context.auth,
152
- store: context.store,
153
- propsValue: context.propsValue,
154
- });
155
- });
156
- },
157
- onDisable(context) {
158
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
159
- yield pieces_common_1.pollingHelper.onDisable(polling, {
160
- auth: context.auth,
161
- store: context.store,
162
- propsValue: context.propsValue,
163
- });
164
- });
165
- },
166
- run(context) {
167
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
168
- return yield pieces_common_1.pollingHelper.poll(polling, {
169
- auth: context.auth,
170
- store: context.store,
171
- propsValue: context.propsValue,
172
- files: context.files,
173
- });
174
- });
175
- },
176
- test(context) {
177
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
178
- return yield pieces_common_1.pollingHelper.test(polling, {
179
- auth: context.auth,
180
- store: context.store,
181
- propsValue: context.propsValue,
182
- files: context.files,
183
- });
184
- });
185
- },
186
- });
187
- //# 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":";;;;AAAA,qEAIwC;AACxC,qEAAiE;AACjE,sCAAqF;AAErF,+DAIqC;AACrC,+DAKqC;AAMrC,MAAM,OAAO,GAQT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE;QAClD,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC;QAE5E,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,EAAE,CAAC;YACjC,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,UAAgB,CAAC;QACrB,IAAI,gBAAgB,KAAK,CAAC,EAAE,CAAC;YAC3B,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;YACxB,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,UAAU,GAAG,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,WAAW,GAA2B;YAC1C,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,UAAU,CAAC,WAAW,EAAE;YACpC,CAAC,EAAE,WAAW;SACf,CAAC;QAEF,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1C,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC3B,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;oBAC5B,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC;gBAChC,CAAC;qBAAM,CAAC;oBACN,WAAW,CAAC,UAAU,IAAI,cAAc,GAAG,IAA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ACrB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgNnB,CAAC"}
@@ -1,228 +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
- aiMetadata: {
47
- description: 'Fires when a brand-new event is created in the selected calendar (not on edits or cancellations), via Google push notifications. Each fired item is the new event; can be narrowed by event type, a text search across title/description/location, and an option to skip all-day events.',
48
- },
49
- props: {
50
- calendar_id: common_1.googleCalendarCommon.calendarDropdown('writer'),
51
- event_types: pieces_framework_1.Property.StaticMultiSelectDropdown({
52
- displayName: 'Event Types to Monitor',
53
- description: 'Filter by specific event types (leave empty to monitor all event types)',
54
- required: false,
55
- options: {
56
- options: [
57
- { label: 'Default Events', value: 'default' },
58
- { label: 'Birthday Events', value: 'birthday' },
59
- { label: 'Focus Time', value: 'focusTime' },
60
- { label: 'Out of Office', value: 'outOfOffice' },
61
- { label: 'Working Location', value: 'workingLocation' },
62
- { label: 'From Gmail', value: 'fromGmail' },
63
- ],
64
- },
65
- }),
66
- search_filter: pieces_framework_1.Property.ShortText({
67
- displayName: 'Search Filter',
68
- description: 'Only trigger for events containing this text in title, description, or location (optional)',
69
- required: false,
70
- }),
71
- exclude_all_day: pieces_framework_1.Property.Checkbox({
72
- displayName: 'Exclude All-Day Events',
73
- description: 'Skip triggering for all-day events',
74
- required: false,
75
- defaultValue: false,
76
- }),
77
- },
78
- type: pieces_framework_1.TriggerStrategy.WEBHOOK,
79
- renewConfiguration: {
80
- strategy: pieces_framework_1.WebhookRenewStrategy.CRON,
81
- cronExpression: '0 */12 * * *',
82
- },
83
- sampleData: {
84
- kind: 'calendar#event',
85
- etag: '"3419997894982000"',
86
- id: 'sample_event_id_12345',
87
- status: 'confirmed',
88
- htmlLink: 'https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzEyMzQ1',
89
- created: '2025-08-15T11:02:27.000Z',
90
- updated: '2025-08-15T11:02:27.491Z',
91
- summary: 'Team Sync',
92
- creator: { email: 'creator@example.com' },
93
- organizer: {
94
- email: 'creator@example.com',
95
- self: true,
96
- },
97
- start: {
98
- dateTime: '2025-08-18T10:00:00-07:00',
99
- timeZone: 'America/Los_Angeles',
100
- },
101
- end: {
102
- dateTime: '2025-08-18T11:00:00-07:00',
103
- timeZone: 'America/Los_Angeles',
104
- },
105
- iCalUID: 'sample_event_id_12345@google.com',
106
- sequence: 0,
107
- reminders: { useDefault: true },
108
- eventType: 'default',
109
- },
110
- onEnable(context) {
111
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
112
- const calendarId = context.propsValue.calendar_id;
113
- const auth = context.auth;
114
- const response = yield (0, helper_1.watchEvent)(calendarId, context.webhookUrl, auth);
115
- yield context.store.put(WATCH_STORE_KEY, response);
116
- const initialSyncToken = yield (0, helper_1.getInitialSyncToken)({
117
- calendarId,
118
- authProp: auth,
119
- });
120
- if (!(0, shared_1.isNil)(initialSyncToken)) {
121
- yield context.store.put(SYNC_TOKEN_STORE_KEY, initialSyncToken);
122
- }
123
- });
124
- },
125
- onDisable(context) {
126
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
127
- const auth = context.auth;
128
- const watch = yield context.store.get(WATCH_STORE_KEY);
129
- if (watch) {
130
- yield (0, helper_1.stopWatchEvent)(watch, auth);
131
- }
132
- yield context.store.delete(SYNC_TOKEN_STORE_KEY);
133
- yield context.store.delete(SEEN_EVENT_IDS_STORE_KEY);
134
- });
135
- },
136
- onRenew(context) {
137
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
138
- const calendarId = context.propsValue.calendar_id;
139
- const auth = context.auth;
140
- const existingWatch = yield context.store.get(WATCH_STORE_KEY);
141
- if (existingWatch) {
142
- yield (0, helper_1.stopWatchEvent)(existingWatch, auth);
143
- }
144
- const renewed = yield (0, helper_1.watchEvent)(calendarId, context.webhookUrl, auth);
145
- yield context.store.put(WATCH_STORE_KEY, renewed);
146
- });
147
- },
148
- run(context) {
149
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
150
- var _a;
151
- const payload = context.payload;
152
- const headers = payload.headers;
153
- const resourceState = headers['x-goog-resource-state'];
154
- const filters = {
155
- event_types: context.propsValue.event_types,
156
- search_filter: context.propsValue.search_filter,
157
- exclude_all_day: context.propsValue.exclude_all_day,
158
- };
159
- if (resourceState === 'sync') {
160
- return [];
161
- }
162
- if (resourceState !== 'exists') {
163
- return [];
164
- }
165
- const calendarId = context.propsValue.calendar_id;
166
- const auth = context.auth;
167
- const syncToken = yield context.store.get(SYNC_TOKEN_STORE_KEY);
168
- if ((0, shared_1.isNil)(syncToken)) {
169
- const fresh = yield (0, helper_1.getInitialSyncToken)({ calendarId, authProp: auth });
170
- if (!(0, shared_1.isNil)(fresh)) {
171
- yield context.store.put(SYNC_TOKEN_STORE_KEY, fresh);
172
- }
173
- return [];
174
- }
175
- const { items, nextSyncToken, syncTokenInvalid } = yield (0, helper_1.listEventsWithSyncToken)({
176
- calendarId,
177
- syncToken,
178
- authProp: auth,
179
- });
180
- if (syncTokenInvalid) {
181
- const fresh = yield (0, helper_1.getInitialSyncToken)({ calendarId, authProp: auth });
182
- if (!(0, shared_1.isNil)(fresh)) {
183
- yield context.store.put(SYNC_TOKEN_STORE_KEY, fresh);
184
- }
185
- return [];
186
- }
187
- if (!(0, shared_1.isNil)(nextSyncToken)) {
188
- yield context.store.put(SYNC_TOKEN_STORE_KEY, nextSyncToken);
189
- }
190
- const seenIds = yield context.store.get(SEEN_EVENT_IDS_STORE_KEY);
191
- const seenSet = new Set(seenIds !== null && seenIds !== void 0 ? seenIds : []);
192
- const newEvents = [];
193
- for (const event of items) {
194
- if (!event.id || event.status === 'cancelled') {
195
- continue;
196
- }
197
- if (seenSet.has(event.id)) {
198
- continue;
199
- }
200
- seenSet.add(event.id);
201
- if (matchesFilters(event, filters)) {
202
- newEvents.push(event);
203
- }
204
- }
205
- if (seenSet.size !== ((_a = seenIds === null || seenIds === void 0 ? void 0 : seenIds.length) !== null && _a !== void 0 ? _a : 0)) {
206
- const bounded = Array.from(seenSet).slice(-SEEN_EVENT_IDS_LIMIT);
207
- yield context.store.put(SEEN_EVENT_IDS_STORE_KEY, bounded);
208
- }
209
- return newEvents;
210
- });
211
- },
212
- test(context) {
213
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
214
- const auth = context.auth;
215
- const filters = {
216
- event_types: context.propsValue.event_types,
217
- search_filter: context.propsValue.search_filter,
218
- exclude_all_day: context.propsValue.exclude_all_day,
219
- };
220
- const latestEvent = yield (0, helper_1.getLatestEvent)(context.propsValue.calendar_id, auth);
221
- if (!matchesFilters(latestEvent, filters)) {
222
- return [];
223
- }
224
- return [latestEvent];
225
- });
226
- },
227
- });
228
- //# 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,EAA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