@pipedream/google_calendar 0.3.6 → 0.3.7

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.
@@ -0,0 +1,162 @@
1
+ import googleCalendar from "../../google_calendar.app.mjs";
2
+
3
+ export default {
4
+ key: "google_calendar-list-events",
5
+ name: "List Events",
6
+ description: "Retrieve a list of event from the Google Calendar. [See the docs here](https://developers.google.com/calendar/api/v3/reference/events/list)",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ props: {
10
+ googleCalendar,
11
+ calendarId: {
12
+ propDefinition: [
13
+ googleCalendar,
14
+ "calendarId",
15
+ ],
16
+ },
17
+ iCalUID: {
18
+ propDefinition: [
19
+ googleCalendar,
20
+ "iCalUID",
21
+ ],
22
+ },
23
+ maxAttendees: {
24
+ propDefinition: [
25
+ googleCalendar,
26
+ "maxAttendees",
27
+ ],
28
+ },
29
+ maxResults: {
30
+ propDefinition: [
31
+ googleCalendar,
32
+ "maxResults",
33
+ ],
34
+ },
35
+ orderBy: {
36
+ propDefinition: [
37
+ googleCalendar,
38
+ "orderBy",
39
+ ],
40
+ default: "",
41
+ },
42
+ pageToken: {
43
+ propDefinition: [
44
+ googleCalendar,
45
+ "pageToken",
46
+ ],
47
+ },
48
+ privateExtendedProperty: {
49
+ propDefinition: [
50
+ googleCalendar,
51
+ "privateExtendedProperty",
52
+ ],
53
+ },
54
+ q: {
55
+ propDefinition: [
56
+ googleCalendar,
57
+ "q",
58
+ ],
59
+ },
60
+ sharedExtendedProperty: {
61
+ propDefinition: [
62
+ googleCalendar,
63
+ "sharedExtendedProperty",
64
+ ],
65
+ },
66
+ showDeleted: {
67
+ propDefinition: [
68
+ googleCalendar,
69
+ "showDeleted",
70
+ ],
71
+ },
72
+ showHiddenInvitations: {
73
+ propDefinition: [
74
+ googleCalendar,
75
+ "showHiddenInvitations",
76
+ ],
77
+ },
78
+ singleEvents: {
79
+ propDefinition: [
80
+ googleCalendar,
81
+ "singleEvents",
82
+ ],
83
+ },
84
+ syncToken: {
85
+ propDefinition: [
86
+ googleCalendar,
87
+ "syncToken",
88
+ ],
89
+ },
90
+ timeMax: {
91
+ propDefinition: [
92
+ googleCalendar,
93
+ "timeMax",
94
+ ],
95
+ },
96
+ timeMin: {
97
+ propDefinition: [
98
+ googleCalendar,
99
+ "timeMin",
100
+ ],
101
+ },
102
+ timeZone: {
103
+ propDefinition: [
104
+ googleCalendar,
105
+ "timeZone",
106
+ ],
107
+ },
108
+ updatedMin: {
109
+ propDefinition: [
110
+ googleCalendar,
111
+ "updatedMin",
112
+ ],
113
+ },
114
+ },
115
+ methods: {
116
+ filterEmptyValues(obj) {
117
+ if (!obj) {
118
+ return obj;
119
+ }
120
+ return Object.entries(obj)
121
+ .reduce((reduction,
122
+ [
123
+ key,
124
+ value,
125
+ ]) => {
126
+ if (value === undefined || value === null) {
127
+ return reduction;
128
+ }
129
+ return {
130
+ ...reduction,
131
+ [key]: value,
132
+ };
133
+ }, {});
134
+ },
135
+ },
136
+ async run({ $ }) {
137
+ const args = this.filterEmptyValues({
138
+ calendarId: this.calendarId,
139
+ iCalUID: this.iCalUID,
140
+ maxAttendees: this.maxAttendees,
141
+ maxResults: this.maxResults,
142
+ orderBy: this.orderBy || undefined,
143
+ pageToken: this.pageToken,
144
+ privateExtendedProperty: this.privateExtendedProperty,
145
+ q: this.q,
146
+ sharedExtendedProperty: this.sharedExtendedProperty,
147
+ showDeleted: this.showDeleted,
148
+ showHiddenInvitations: this.showHiddenInvitations,
149
+ singleEvents: this.singleEvents,
150
+ syncToken: this.syncToken,
151
+ timeMax: this.timeMax,
152
+ timeMin: this.timeMin,
153
+ timeZone: this.timeZone,
154
+ updatedMin: this.updatedMin,
155
+ });
156
+ const response = await this.googleCalendar.listEvents(args);
157
+
158
+ $.export("$summary", `Successfully retrieved ${response.items.length} event(s)`);
159
+
160
+ return response;
161
+ },
162
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/google_calendar",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Pipedream Google_calendar Components",
5
5
  "main": "google_calendar.app.mjs",
6
6
  "keywords": [