@guayaba/workflow-piece-google-calendar 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.
Files changed (42) hide show
  1. package/.babelrc +3 -0
  2. package/.eslintrc.json +18 -0
  3. package/README.md +5 -0
  4. package/assets/logo.png +0 -0
  5. package/package.json +23 -0
  6. package/src/i18n/ca.json +71 -0
  7. package/src/i18n/de.json +151 -0
  8. package/src/i18n/es.json +151 -0
  9. package/src/i18n/fr.json +151 -0
  10. package/src/i18n/hi.json +71 -0
  11. package/src/i18n/id.json +71 -0
  12. package/src/i18n/ja.json +151 -0
  13. package/src/i18n/nl.json +151 -0
  14. package/src/i18n/pt.json +151 -0
  15. package/src/i18n/ru.json +71 -0
  16. package/src/i18n/translation.json +151 -0
  17. package/src/i18n/vi.json +71 -0
  18. package/src/i18n/zh.json +151 -0
  19. package/src/index.ts +78 -0
  20. package/src/lib/actions/add-attendees.action.ts +52 -0
  21. package/src/lib/actions/add-calendar-to-calendarlist.ts +33 -0
  22. package/src/lib/actions/create-event.ts +163 -0
  23. package/src/lib/actions/create-quick-event.ts +66 -0
  24. package/src/lib/actions/delete-event.action.ts +32 -0
  25. package/src/lib/actions/find-busy-free-periods.ts +97 -0
  26. package/src/lib/actions/get-event-by-id.ts +123 -0
  27. package/src/lib/actions/get-events.ts +111 -0
  28. package/src/lib/actions/update-event.action.ts +126 -0
  29. package/src/lib/auth.ts +81 -0
  30. package/src/lib/common/helper.ts +228 -0
  31. package/src/lib/common/index.ts +95 -0
  32. package/src/lib/common/types.ts +246 -0
  33. package/src/lib/google-calendar.mdx +25 -0
  34. package/src/lib/triggers/calendar-event.ts +139 -0
  35. package/src/lib/triggers/event-cancelled.ts +200 -0
  36. package/src/lib/triggers/event-ends.ts +201 -0
  37. package/src/lib/triggers/event-start-time-before.ts +201 -0
  38. package/src/lib/triggers/new-calendar.ts +203 -0
  39. package/src/lib/triggers/new-event-matching-search.ts +225 -0
  40. package/src/lib/triggers/new-event.ts +184 -0
  41. package/tsconfig.json +16 -0
  42. package/tsconfig.lib.json +15 -0
@@ -0,0 +1,71 @@
1
+ {
2
+ "Google Calendar": "Календарь Google",
3
+ "Get organized and stay on schedule": "Организуйте и оставайтесь в расписании",
4
+ "Add Attendees to Event": "Добавить участников к событию",
5
+ "Create Quick Event": "Создать быстрое событие",
6
+ "Create Event": "Создать событие",
7
+ "Get all Events": "Получить все события",
8
+ "Update Event": "Обновить событие",
9
+ "Delete Event": "Удалить событие",
10
+ "Custom API Call": "Пользовательский вызов API",
11
+ "Add one or more person to existing event.": "Добавьте одного или нескольких людей к существующему событию.",
12
+ "Add Quick Calendar Event": "Добавить событие быстрого календаря",
13
+ "Add Event": "Добавить событие",
14
+ "Get Events": "Получить события",
15
+ "Updates an event in Google Calendar.": "Обновляет событие в календаре Google.",
16
+ "Deletes an event from Google Calendar.": "Удаляет событие из Календаря Google.",
17
+ "Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
18
+ "Calendar": "Календарь",
19
+ "Event ID": "ID события",
20
+ "Attendees": "Участники",
21
+ "Summary": "Summary",
22
+ "Send Updates": "Отправить обновления",
23
+ "Title of the event": "Название события",
24
+ "Start date time of the event": "Дата начала события",
25
+ "End date time of the event": "Дата окончания события",
26
+ "Location": "Местоположение",
27
+ "Description": "Описание",
28
+ "Color": "Цвет",
29
+ "Guests can modify": "Гости могут изменять",
30
+ "Guests can invite others": "Гости могут пригласить других",
31
+ "Guests can see other guests": "Гости могут видеть других гостей",
32
+ "Send Notifications": "Отправить уведомления",
33
+ "Event types": "Типы событий",
34
+ "Search Term": "Поиск термина",
35
+ "Date from": "Дата с",
36
+ "Date to": "Дата до",
37
+ "Expand Recurring Event?": "Развернуть повторяющееся событие?",
38
+ "Method": "Метод",
39
+ "Headers": "Заголовки",
40
+ "Query Parameters": "Параметры запроса",
41
+ "Body": "Тело",
42
+ "No Error on Failure": "Нет ошибок при ошибке",
43
+ "Timeout (in seconds)": "Таймаут (в секундах)",
44
+ "Emails of the attendees (guests)": "Письма участников (гостей)",
45
+ "The text describing the event to be created": "Текст, описывающий создаваемый событие",
46
+ "Guests who should receive notifications about the creation of the new event.": "Гости, которые должны получать уведомления о создании нового события.",
47
+ "By default it'll be 30 min post start time": "По умолчанию он будет равен 30 минутам времени начала записи",
48
+ "Description of the event. You can use HTML tags here.": "Описание события. Вы можете использовать HTML теги здесь.",
49
+ "Select event types": "Выберите типы событий",
50
+ "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.": "Распределять повторяющиеся события в экземпляры и возвращать только разовые и повторяющиеся события, но не сами по себе.",
51
+ "Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
52
+ "All": "Все",
53
+ "External Only": "Только внешние",
54
+ "none": "нет",
55
+ "Yes, to everyone": "Да, всем",
56
+ "To non-Google Calendar guests only": "Только гостям не Google Календаря",
57
+ "To no one": "Никому",
58
+ "Default": "По умолчанию",
59
+ "Out Of Office": "Вне офиса",
60
+ "Focus Time": "Время фокусировки",
61
+ "Working Location": "Место работы",
62
+ "GET": "ПОЛУЧИТЬ",
63
+ "POST": "ПОСТ",
64
+ "PATCH": "ПАТЧ",
65
+ "PUT": "ПОКУПИТЬ",
66
+ "DELETE": "УДАЛИТЬ",
67
+ "HEAD": "HEAD",
68
+ "New or Updated Event": "Новое или обновленное событие",
69
+ "Triggers when an event is added or updated": "Триггеры при добавлении или обновлении события",
70
+ "If true, the trigger will activate for every occurrence of a recurring event.": "Если включено, то триггер будет активирован для каждого вхождения повторяющегося события."
71
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "Get organized and stay on schedule": "Get organized and stay on schedule",
3
+ "Add Attendees to Event": "Add Attendees to Event",
4
+ "Create Quick Event": "Create Quick Event",
5
+ "Create Event": "Create Event",
6
+ "Get all Events": "Get all Events",
7
+ "Update Event": "Update Event",
8
+ "Delete Event": "Delete Event",
9
+ "Find Busy/Free Periods in Calendar": "Find Busy/Free Periods in Calendar",
10
+ "Get Event by ID": "Get Event by ID",
11
+ "Custom API Call": "Custom API Call",
12
+ "Add one or more person to existing event.": "Add one or more person to existing event.",
13
+ "Add Quick Calendar Event": "Add Quick Calendar Event",
14
+ "Add Event": "Add Event",
15
+ "Get Events": "Get Events",
16
+ "Updates an event in Google Calendar.": "Updates an event in Google Calendar.",
17
+ "Deletes an event from Google Calendar.": "Deletes an event from Google Calendar.",
18
+ "Finds free/busy calendar details from Google Calendar.": "Finds free/busy calendar details from Google Calendar.",
19
+ "Fetch event details by its unique ID from Google Calendar.": "Fetch event details by its unique ID from Google Calendar.",
20
+ "Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
21
+ "Calendar": "Calendar",
22
+ "Event ID": "Event ID",
23
+ "Attendees": "Attendees",
24
+ "Summary": "Summary",
25
+ "Send Updates": "Send Updates",
26
+ "Title of the event": "Title of the event",
27
+ "Start date time of the event": "Start date time of the event",
28
+ "End date time of the event": "End date time of the event",
29
+ "Location": "Location",
30
+ "Description": "Description",
31
+ "Color": "Color",
32
+ "Guests can modify": "Guests can modify",
33
+ "Guests can invite others": "Guests can invite others",
34
+ "Guests can see other guests": "Guests can see other guests",
35
+ "Send Notifications": "Send Notifications",
36
+ "Create Google Meet Link": "Create Google Meet Link",
37
+ "Event types": "Event types",
38
+ "Search Term": "Search Term",
39
+ "Date from": "Date from",
40
+ "Date to": "Date to",
41
+ "Expand Recurring Event?": "Expand Recurring Event?",
42
+ "Calendars": "Calendars",
43
+ "Start Time": "Start Time",
44
+ "End Time": "End Time",
45
+ "Max Attendees": "Max Attendees",
46
+ "Time Zone": "Time Zone",
47
+ "Method": "Method",
48
+ "Headers": "Headers",
49
+ "Query Parameters": "Query Parameters",
50
+ "Body Type": "Body Type",
51
+ "Body": "Body",
52
+ "Response is Binary ?": "Response is Binary ?",
53
+ "No Error on Failure": "No Error on Failure",
54
+ "Timeout (in seconds)": "Timeout (in seconds)",
55
+ "Follow redirects": "Follow redirects",
56
+ "Emails of the attendees (guests)": "Emails of the attendees (guests)",
57
+ "The text describing the event to be created": "The text describing the event to be created",
58
+ "Guests who should receive notifications about the creation of the new event.": "Guests who should receive notifications about the creation of the new event.",
59
+ "By default it'll be 30 min post start time": "By default it'll be 30 min post start time",
60
+ "Description of the event. You can use HTML tags here.": "Description of the event. You can use HTML tags here.",
61
+ "Automatically create a Google Meet video conference link for this event": "Automatically create a Google Meet video conference link for this event",
62
+ "Select event types": "Select event types",
63
+ "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.": "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.",
64
+ "Select the calendars to check for busy periods.": "Select the calendars to check for busy periods.",
65
+ "The start of the time range to check.": "The start of the time range to check.",
66
+ "The end of the time range to check.": "The end of the time range to check.",
67
+ "The unique ID of the event (e.g., \"abc123def456\"). You can find this in the event URL or from other calendar actions.": "The unique ID of the event (e.g., \"abc123def456\"). You can find this in the event URL or from other calendar actions.",
68
+ "Maximum number of attendees to include in the response. If there are more attendees, only the participant is returned.": "Maximum number of attendees to include in the response. If there are more attendees, only the participant is returned.",
69
+ "Time zone for the response (e.g., \"America/New_York\", \"Europe/London\"). Defaults to the calendar's time zone if not specified.": "Time zone for the response (e.g., \"America/New_York\", \"Europe/London\"). Defaults to the calendar's time zone if not specified.",
70
+ "Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
71
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
72
+ "All": "All",
73
+ "External Only": "External Only",
74
+ "none": "none",
75
+ "Yes, to everyone": "Yes, to everyone",
76
+ "To non-Google Calendar guests only": "To non-Google Calendar guests only",
77
+ "To no one": "To no one",
78
+ "Default": "Default",
79
+ "Out Of Office": "Out Of Office",
80
+ "Focus Time": "Focus Time",
81
+ "Working Location": "Working Location",
82
+ "GET": "GET",
83
+ "POST": "POST",
84
+ "PATCH": "PATCH",
85
+ "PUT": "PUT",
86
+ "DELETE": "DELETE",
87
+ "HEAD": "HEAD",
88
+ "None": "None",
89
+ "JSON": "JSON",
90
+ "Form Data": "Form Data",
91
+ "Raw": "Raw",
92
+ "New or Updated Event": "New or Updated Event",
93
+ "New Event": "New Event",
94
+ "Event Ends": "Event Ends",
95
+ "Event Start (Time Before)": "Event Start (Time Before)",
96
+ "New Event Matching Search": "New Event Matching Search",
97
+ "Event Cancelled": "Event Cancelled",
98
+ "New Calendar": "New Calendar",
99
+ "Triggers when an event is added or updated": "Triggers when an event is added or updated",
100
+ "Fires when a new event is created in a calendar.": "Fires when a new event is created in a calendar.",
101
+ "Fires when an event ends.": "Fires when an event ends.",
102
+ "Fires at a specified amount of time before an event starts (e.g., a reminder).": "Fires at a specified amount of time before an event starts (e.g., a reminder).",
103
+ "Fires when a new event is created that matches a specified search term.": "Fires when a new event is created that matches a specified search term.",
104
+ "Fires when an event is canceled or deleted.": "Fires when an event is canceled or deleted.",
105
+ "Fires when a new calendar is created or becomes accessible.": "Fires when a new calendar is created or becomes accessible.",
106
+ "Event Types to Monitor": "Event Types to Monitor",
107
+ "Search Filter": "Search Filter",
108
+ "Exclude All-Day Events": "Exclude All-Day Events",
109
+ "Target Specific Event": "Target Specific Event",
110
+ "Event": "Event",
111
+ "Time Before": "Time Before",
112
+ "Time Unit": "Time Unit",
113
+ "Event Types": "Event Types",
114
+ "Search In Fields": "Search In Fields",
115
+ "Cancellation Reasons": "Cancellation Reasons",
116
+ "Access Role Filter": "Access Role Filter",
117
+ "Calendar Name Filter": "Calendar Name Filter",
118
+ "Exclude Shared Calendars": "Exclude Shared Calendars",
119
+ "If true, the trigger will activate for every occurrence of a recurring event.": "If true, the trigger will activate for every occurrence of a recurring event.",
120
+ "Filter by specific event types (leave empty to monitor all event types)": "Filter by specific event types (leave empty to monitor all event types)",
121
+ "Only trigger for events containing this text in title, description, or location (optional)": "Only trigger for events containing this text in title, description, or location (optional)",
122
+ "Skip triggering for all-day events": "Skip triggering for all-day events",
123
+ "Enable to monitor a specific event instead of all events in the calendar.": "Enable to monitor a specific event instead of all events in the calendar.",
124
+ "The amount of time before the event starts.": "The amount of time before the event starts.",
125
+ "The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).": "The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).",
126
+ "Filter by specific event types (optional)": "Filter by specific event types (optional)",
127
+ "Specify which fields to search in (leave empty to use Google's default search across all fields)": "Specify which fields to search in (leave empty to use Google's default search across all fields)",
128
+ "Filter by specific types of cancellations (optional)": "Filter by specific types of cancellations (optional)",
129
+ "Only trigger for calendars with specific access roles (optional)": "Only trigger for calendars with specific access roles (optional)",
130
+ "Only trigger for calendars containing this text in name or description (optional)": "Only trigger for calendars containing this text in name or description (optional)",
131
+ "Only trigger for calendars you own, not shared calendars": "Only trigger for calendars you own, not shared calendars",
132
+ "Default Events": "Default Events",
133
+ "Birthday Events": "Birthday Events",
134
+ "Out of Office": "Out of Office",
135
+ "From Gmail": "From Gmail",
136
+ "Minutes": "Minutes",
137
+ "Hours": "Hours",
138
+ "Days": "Days",
139
+ "Event Title/Summary": "Event Title/Summary",
140
+ "Event Description": "Event Description",
141
+ "Event Location": "Event Location",
142
+ "Attendee Names/Emails": "Attendee Names/Emails",
143
+ "Event Deleted": "Event Deleted",
144
+ "Attendee Declined": "Attendee Declined",
145
+ "Event Rescheduled": "Event Rescheduled",
146
+ "Other Cancellations": "Other Cancellations",
147
+ "Owner": "Owner",
148
+ "Writer": "Writer",
149
+ "Reader": "Reader",
150
+ "Free/Busy Reader": "Free/Busy Reader"
151
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "Google Calendar": "Google Calendar",
3
+ "Get organized and stay on schedule": "Get organized and stay on schedule",
4
+ "Add Attendees to Event": "Add Attendees to Event",
5
+ "Create Quick Event": "Create Quick Event",
6
+ "Create Event": "Create Event",
7
+ "Get all Events": "Get all Events",
8
+ "Update Event": "Update Event",
9
+ "Delete Event": "Delete Event",
10
+ "Custom API Call": "Custom API Call",
11
+ "Add one or more person to existing event.": "Add one or more person to existing event.",
12
+ "Add Quick Calendar Event": "Add Quick Calendar Event",
13
+ "Add Event": "Add Event",
14
+ "Get Events": "Get Events",
15
+ "Updates an event in Google Calendar.": "Updates an event in Google Calendar.",
16
+ "Deletes an event from Google Calendar.": "Deletes an event from Google Calendar.",
17
+ "Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
18
+ "Calendar": "Calendar",
19
+ "Event ID": "Event ID",
20
+ "Attendees": "Attendees",
21
+ "Summary": "Summary",
22
+ "Send Updates": "Send Updates",
23
+ "Title of the event": "Title of the event",
24
+ "Start date time of the event": "Start date time of the event",
25
+ "End date time of the event": "End date time of the event",
26
+ "Location": "Location",
27
+ "Description": "Description",
28
+ "Color": "Color",
29
+ "Guests can modify": "Guests can modify",
30
+ "Guests can invite others": "Guests can invite others",
31
+ "Guests can see other guests": "Guests can see other guests",
32
+ "Send Notifications": "Send Notifications",
33
+ "Event types": "Event types",
34
+ "Search Term": "Search Term",
35
+ "Date from": "Date from",
36
+ "Date to": "Date to",
37
+ "Expand Recurring Event?": "Expand Recurring Event?",
38
+ "Method": "Method",
39
+ "Headers": "Headers",
40
+ "Query Parameters": "Query Parameters",
41
+ "Body": "Body",
42
+ "No Error on Failure": "No Error on Failure",
43
+ "Timeout (in seconds)": "Timeout (in seconds)",
44
+ "Emails of the attendees (guests)": "Emails of the attendees (guests)",
45
+ "The text describing the event to be created": "The text describing the event to be created",
46
+ "Guests who should receive notifications about the creation of the new event.": "Guests who should receive notifications about the creation of the new event.",
47
+ "By default it'll be 30 min post start time": "By default it'll be 30 min post start time",
48
+ "Description of the event. You can use HTML tags here.": "Description of the event. You can use HTML tags here.",
49
+ "Select event types": "Select event types",
50
+ "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.": "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.",
51
+ "Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
52
+ "All": "Tất cả",
53
+ "External Only": "External Only",
54
+ "none": "none",
55
+ "Yes, to everyone": "Yes, to everyone",
56
+ "To non-Google Calendar guests only": "To non-Google Calendar guests only",
57
+ "To no one": "To no one",
58
+ "Default": "Default",
59
+ "Out Of Office": "Out Of Office",
60
+ "Focus Time": "Focus Time",
61
+ "Working Location": "Working Location",
62
+ "GET": "GET",
63
+ "POST": "POST",
64
+ "PATCH": "PATCH",
65
+ "PUT": "PUT",
66
+ "DELETE": "DELETE",
67
+ "HEAD": "HEAD",
68
+ "New or Updated Event": "New or Updated Event",
69
+ "Triggers when an event is added or updated": "Triggers when an event is added or updated",
70
+ "If true, the trigger will activate for every occurrence of a recurring event.": "If true, the trigger will activate for every occurrence of a recurring event."
71
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "Get organized and stay on schedule": "Get organized and stay on schedule",
3
+ "Add Attendees to Event": "Add Attendees to Event",
4
+ "Create Quick Event": "Create Quick Event",
5
+ "Create Event": "Create Event",
6
+ "Get all Events": "Get all Events",
7
+ "Update Event": "Update Event",
8
+ "Delete Event": "Delete Event",
9
+ "Find Busy/Free Periods in Calendar": "Find Busy/Free Periods in Calendar",
10
+ "Get Event by ID": "Get Event by ID",
11
+ "Custom API Call": "自定义 API 呼叫",
12
+ "Add one or more person to existing event.": "Add one or more person to existing event.",
13
+ "Add Quick Calendar Event": "Add Quick Calendar Event",
14
+ "Add Event": "Add Event",
15
+ "Get Events": "Get Events",
16
+ "Updates an event in Google Calendar.": "Updates an event in Google Calendar.",
17
+ "Deletes an event from Google Calendar.": "Deletes an event from Google Calendar.",
18
+ "Finds free/busy calendar details from Google Calendar.": "Finds free/busy calendar details from Google Calendar.",
19
+ "Fetch event details by its unique ID from Google Calendar.": "Fetch event details by its unique ID from Google Calendar.",
20
+ "Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
21
+ "Calendar": "Calendar",
22
+ "Event ID": "Event ID",
23
+ "Attendees": "Attendees",
24
+ "Summary": "Summary",
25
+ "Send Updates": "Send Updates",
26
+ "Title of the event": "Title of the event",
27
+ "Start date time of the event": "Start date time of the event",
28
+ "End date time of the event": "End date time of the event",
29
+ "Location": "Location",
30
+ "Description": "描述",
31
+ "Color": "Color",
32
+ "Guests can modify": "Guests can modify",
33
+ "Guests can invite others": "Guests can invite others",
34
+ "Guests can see other guests": "Guests can see other guests",
35
+ "Send Notifications": "Send Notifications",
36
+ "Create Google Meet Link": "Create Google Meet Link",
37
+ "Event types": "Event types",
38
+ "Search Term": "Search Term",
39
+ "Date from": "Date from",
40
+ "Date to": "Date to",
41
+ "Expand Recurring Event?": "Expand Recurring Event?",
42
+ "Calendars": "Calendars",
43
+ "Start Time": "开始时间",
44
+ "End Time": "End Time",
45
+ "Max Attendees": "Max Attendees",
46
+ "Time Zone": "Time Zone",
47
+ "Method": "方法",
48
+ "Headers": "信头",
49
+ "Query Parameters": "查询参数",
50
+ "Body Type": "Body Type",
51
+ "Body": "正文内容",
52
+ "Response is Binary ?": "Response is Binary ?",
53
+ "No Error on Failure": "失败时没有错误",
54
+ "Timeout (in seconds)": "超时(秒)",
55
+ "Follow redirects": "Follow redirects",
56
+ "Emails of the attendees (guests)": "Emails of the attendees (guests)",
57
+ "The text describing the event to be created": "The text describing the event to be created",
58
+ "Guests who should receive notifications about the creation of the new event.": "Guests who should receive notifications about the creation of the new event.",
59
+ "By default it'll be 30 min post start time": "By default it'll be 30 min post start time",
60
+ "Description of the event. You can use HTML tags here.": "Description of the event. You can use HTML tags here.",
61
+ "Automatically create a Google Meet video conference link for this event": "Automatically create a Google Meet video conference link for this event",
62
+ "Select event types": "Select event types",
63
+ "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.": "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.",
64
+ "Select the calendars to check for busy periods.": "Select the calendars to check for busy periods.",
65
+ "The start of the time range to check.": "The start of the time range to check.",
66
+ "The end of the time range to check.": "The end of the time range to check.",
67
+ "The unique ID of the event (e.g., \"abc123def456\"). You can find this in the event URL or from other calendar actions.": "The unique ID of the event (e.g., \"abc123def456\"). You can find this in the event URL or from other calendar actions.",
68
+ "Maximum number of attendees to include in the response. If there are more attendees, only the participant is returned.": "Maximum number of attendees to include in the response. If there are more attendees, only the participant is returned.",
69
+ "Time zone for the response (e.g., \"America/New_York\", \"Europe/London\"). Defaults to the calendar's time zone if not specified.": "Time zone for the response (e.g., \"America/New_York\", \"Europe/London\"). Defaults to the calendar's time zone if not specified.",
70
+ "Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
71
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
72
+ "All": "所有的",
73
+ "External Only": "External Only",
74
+ "none": "无",
75
+ "Yes, to everyone": "Yes, to everyone",
76
+ "To non-Google Calendar guests only": "To non-Google Calendar guests only",
77
+ "To no one": "To no one",
78
+ "Default": "Default",
79
+ "Out Of Office": "Out Of Office",
80
+ "Focus Time": "Focus Time",
81
+ "Working Location": "Working Location",
82
+ "GET": "获取",
83
+ "POST": "帖子",
84
+ "PATCH": "PATCH",
85
+ "PUT": "弹出",
86
+ "DELETE": "删除",
87
+ "HEAD": "黑色",
88
+ "None": "无",
89
+ "JSON": "JSON",
90
+ "Form Data": "表单数据",
91
+ "Raw": "原始文件",
92
+ "New or Updated Event": "New or Updated Event",
93
+ "New Event": "New Event",
94
+ "Event Ends": "Event Ends",
95
+ "Event Start (Time Before)": "Event Start (Time Before)",
96
+ "New Event Matching Search": "New Event Matching Search",
97
+ "Event Cancelled": "Event Cancelled",
98
+ "New Calendar": "New Calendar",
99
+ "Triggers when an event is added or updated": "Triggers when an event is added or updated",
100
+ "Fires when a new event is created in a calendar.": "Fires when a new event is created in a calendar.",
101
+ "Fires when an event ends.": "Fires when an event ends.",
102
+ "Fires at a specified amount of time before an event starts (e.g., a reminder).": "Fires at a specified amount of time before an event starts (e.g., a reminder).",
103
+ "Fires when a new event is created that matches a specified search term.": "Fires when a new event is created that matches a specified search term.",
104
+ "Fires when an event is canceled or deleted.": "Fires when an event is canceled or deleted.",
105
+ "Fires when a new calendar is created or becomes accessible.": "Fires when a new calendar is created or becomes accessible.",
106
+ "Event Types to Monitor": "Event Types to Monitor",
107
+ "Search Filter": "Search Filter",
108
+ "Exclude All-Day Events": "Exclude All-Day Events",
109
+ "Target Specific Event": "Target Specific Event",
110
+ "Event": "Event",
111
+ "Time Before": "Time Before",
112
+ "Time Unit": "Time Unit",
113
+ "Event Types": "Event Types",
114
+ "Search In Fields": "Search In Fields",
115
+ "Cancellation Reasons": "Cancellation Reasons",
116
+ "Access Role Filter": "Access Role Filter",
117
+ "Calendar Name Filter": "Calendar Name Filter",
118
+ "Exclude Shared Calendars": "Exclude Shared Calendars",
119
+ "If true, the trigger will activate for every occurrence of a recurring event.": "If true, the trigger will activate for every occurrence of a recurring event.",
120
+ "Filter by specific event types (leave empty to monitor all event types)": "Filter by specific event types (leave empty to monitor all event types)",
121
+ "Only trigger for events containing this text in title, description, or location (optional)": "Only trigger for events containing this text in title, description, or location (optional)",
122
+ "Skip triggering for all-day events": "Skip triggering for all-day events",
123
+ "Enable to monitor a specific event instead of all events in the calendar.": "Enable to monitor a specific event instead of all events in the calendar.",
124
+ "The amount of time before the event starts.": "The amount of time before the event starts.",
125
+ "The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).": "The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).",
126
+ "Filter by specific event types (optional)": "Filter by specific event types (optional)",
127
+ "Specify which fields to search in (leave empty to use Google's default search across all fields)": "Specify which fields to search in (leave empty to use Google's default search across all fields)",
128
+ "Filter by specific types of cancellations (optional)": "Filter by specific types of cancellations (optional)",
129
+ "Only trigger for calendars with specific access roles (optional)": "Only trigger for calendars with specific access roles (optional)",
130
+ "Only trigger for calendars containing this text in name or description (optional)": "Only trigger for calendars containing this text in name or description (optional)",
131
+ "Only trigger for calendars you own, not shared calendars": "Only trigger for calendars you own, not shared calendars",
132
+ "Default Events": "Default Events",
133
+ "Birthday Events": "Birthday Events",
134
+ "Out of Office": "Out of Office",
135
+ "From Gmail": "From Gmail",
136
+ "Minutes": "Minutes",
137
+ "Hours": "Hours",
138
+ "Days": "Days",
139
+ "Event Title/Summary": "Event Title/Summary",
140
+ "Event Description": "Event Description",
141
+ "Event Location": "Event Location",
142
+ "Attendee Names/Emails": "Attendee Names/Emails",
143
+ "Event Deleted": "Event Deleted",
144
+ "Attendee Declined": "Attendee Declined",
145
+ "Event Rescheduled": "Event Rescheduled",
146
+ "Other Cancellations": "Other Cancellations",
147
+ "Owner": "所有者",
148
+ "Writer": "Writer",
149
+ "Reader": "Reader",
150
+ "Free/Busy Reader": "Free/Busy Reader"
151
+ }
package/src/index.ts ADDED
@@ -0,0 +1,78 @@
1
+ import { createCustomApiCallAction } from '@guayaba/workflows-common';
2
+ import {
3
+ createPiece,
4
+ } from '@guayaba/workflows-framework';
5
+ import { PieceCategory } from '@guayaba/workflows-shared';
6
+ import { createEvent } from './lib/actions/create-event';
7
+ import { createQuickCalendarEvent } from './lib/actions/create-quick-event';
8
+ import { deleteEventAction } from './lib/actions/delete-event.action';
9
+ import { getEvents } from './lib/actions/get-events';
10
+ import { updateEventAction } from './lib/actions/update-event.action';
11
+ import { googleCalendarCommon, googleCalendarAuth, getAccessToken, type GoogleCalendarAuthValue } from './lib/common';
12
+ import { calendarEventChanged } from './lib/triggers/calendar-event';
13
+ import { addAttendeesToEventAction } from './lib/actions/add-attendees.action';
14
+ import { findFreeBusy } from './lib/actions/find-busy-free-periods';
15
+ import { getEventById } from './lib/actions/get-event-by-id';
16
+ import { newEvent } from './lib/triggers/new-event';
17
+ import { eventEnds } from './lib/triggers/event-ends';
18
+ import { eventStartTimeBefore } from './lib/triggers/event-start-time-before';
19
+ import { newEventMatchingSearch } from './lib/triggers/new-event-matching-search';
20
+ import { eventCancelled } from './lib/triggers/event-cancelled';
21
+ import { newCalendar } from './lib/triggers/new-calendar';
22
+
23
+ export { googleCalendarAuth, getAccessToken, GoogleCalendarAuthValue, createGoogleClient } from './lib/common';
24
+
25
+ export const googleCalendar = createPiece({
26
+ minimumSupportedRelease: '0.30.0',
27
+ logoUrl: 'https://cdn.activepieces.com/pieces/google-calendar.png',
28
+ categories: [PieceCategory.PRODUCTIVITY],
29
+ displayName: 'Google Calendar',
30
+ description: 'Get organized and stay on schedule',
31
+
32
+ authors: [
33
+ 'OsamaHaikal',
34
+ 'bibhuty-did-this',
35
+ 'Vitalini',
36
+ 'pfernandez98',
37
+ 'kishanprmr',
38
+ 'MoShizzle',
39
+ 'khaledmashaly',
40
+ 'abuaboud',
41
+ 'ikus060',
42
+ 'Cloudieunnie',
43
+ 'sanket-a11y',
44
+ 'geekyme'
45
+ ],
46
+ auth: googleCalendarAuth,
47
+ actions: [
48
+ addAttendeesToEventAction,
49
+ createQuickCalendarEvent,
50
+ createEvent,
51
+ getEvents,
52
+ updateEventAction,
53
+ deleteEventAction,
54
+ findFreeBusy,
55
+ getEventById,
56
+ // TODO: add action after calendarList scope is verified
57
+ // addCalendarToCalendarlist,
58
+ createCustomApiCallAction({
59
+ auth: googleCalendarAuth,
60
+ baseUrl() {
61
+ return googleCalendarCommon.baseUrl;
62
+ },
63
+ authMapping: async (auth) => {
64
+ return {
65
+ Authorization: `Bearer ${await getAccessToken(auth as GoogleCalendarAuthValue)}`,
66
+ };
67
+ },
68
+ }),
69
+ ],
70
+ triggers: [calendarEventChanged,
71
+ newEvent,
72
+ eventEnds,
73
+ eventStartTimeBefore,
74
+ newEventMatchingSearch,
75
+ eventCancelled,
76
+ newCalendar
77
+ ],
78
+ });
@@ -0,0 +1,52 @@
1
+ import { createAction, Property } from '@guayaba/workflows-framework';
2
+ import { google, calendar_v3 } from 'googleapis';
3
+ import { googleCalendarCommon, googleCalendarAuth, createGoogleClient } from '../common';
4
+
5
+ export const addAttendeesToEventAction = createAction({
6
+ auth: googleCalendarAuth,
7
+ name: 'google-calendar-add-attendees',
8
+ displayName: 'Add Attendees to Event',
9
+ description: 'Add one or more person to existing event.',
10
+ props: {
11
+ calendar_id: googleCalendarCommon.calendarDropdown('writer'),
12
+ eventId: Property.ShortText({
13
+ displayName: 'Event ID',
14
+ required: true,
15
+ }),
16
+ attendees: Property.Array({
17
+ displayName: 'Attendees',
18
+ description: 'Emails of the attendees (guests)',
19
+ required: true,
20
+ }),
21
+ },
22
+ async run(context) {
23
+ const { calendar_id, eventId } = context.propsValue;
24
+ const attendeesInput = context.propsValue.attendees as string[];
25
+
26
+ const authClient = await createGoogleClient(context.auth);
27
+ const calendar = google.calendar({ version: 'v3', auth: authClient });
28
+
29
+ // Note that each patch request consumes three quota units;
30
+ // prefer using a get followed by an update
31
+ const currentEvent = await calendar.events.get({
32
+ calendarId: calendar_id,
33
+ eventId: eventId,
34
+ });
35
+ const currentAttendees = currentEvent.data.attendees ?? [];
36
+
37
+ const attendeeFormattedList: calendar_v3.Schema$EventAttendee[] = [];
38
+ attendeeFormattedList.push(...currentAttendees);
39
+ attendeeFormattedList.push(...attendeesInput.map((email) => ({ email })));
40
+
41
+ const response = await calendar.events.update({
42
+ calendarId: calendar_id!,
43
+ eventId,
44
+ requestBody: {
45
+ ...currentEvent.data,
46
+ attendees: attendeeFormattedList,
47
+ },
48
+ });
49
+
50
+ return response.data;
51
+ },
52
+ });
@@ -0,0 +1,33 @@
1
+ import { createAction, Property } from '@guayaba/workflows-framework';
2
+ import { google } from 'googleapis';
3
+ import { googleCalendarCommon, googleCalendarAuth, createGoogleClient } from '../common';
4
+
5
+ export const addCalendarToCalendarlist = createAction({
6
+ auth: googleCalendarAuth,
7
+ name: 'addCalendarToCalendarlist',
8
+ displayName: 'Add Calendar to calendarList',
9
+ description: "Adds other people's calendars to your calendarList",
10
+ props: {
11
+ id: Property.ShortText({
12
+ displayName: "Calendar Id",
13
+ description: "Find calendar id by going to calendar settings",
14
+ required: true
15
+ })
16
+ },
17
+ async run(context) {
18
+
19
+ const id = context.propsValue.id;
20
+
21
+ const authClient = await createGoogleClient(context.auth);
22
+
23
+ const calendar = google.calendar({ version: 'v3', auth: authClient});
24
+
25
+ const response = await calendar.calendarList.insert({
26
+ requestBody: {
27
+ id: id
28
+ }
29
+ })
30
+
31
+ return response.data;
32
+ },
33
+ });