@particle-academy/google-calendar-ui 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -188,6 +188,220 @@ var googleCalendarChannelWatchKind = defineConnectorKind(GOOGLE_CALENDAR_CHANNEL
188
188
  },
189
189
  renderBody: ({ config }) => summarize(GOOGLE_CALENDAR_CHANNEL_WATCH_META, config, "watch a calendar")
190
190
  });
191
+ var GOOGLE_CALENDAR_EVENT_CREATE_KIND = "@particle-academy/google_calendar_event_create";
192
+ var GOOGLE_CALENDAR_EVENT_CREATE_OPERATION = "event_create";
193
+ var GOOGLE_CALENDAR_EVENT_CREATE_META = googleCalendarMeta("action", "create an event", "https://developers.google.com/workspace/calendar/api/v3/reference/events/insert");
194
+ var GOOGLE_CALENDAR_EVENT_CREATE_OUTPUT = [
195
+ {
196
+ "path": "data.id",
197
+ "type": "string",
198
+ "description": "The new event's id."
199
+ },
200
+ {
201
+ "path": "data.status",
202
+ "type": "string",
203
+ "description": "confirmed or tentative, echoing what was sent (or Google's default)."
204
+ },
205
+ {
206
+ "path": "data.summary",
207
+ "type": "string",
208
+ "description": "Echoes what was sent."
209
+ },
210
+ {
211
+ "path": "data.htmlLink",
212
+ "type": "string",
213
+ "description": "The event in the Google Calendar UI."
214
+ },
215
+ {
216
+ "path": "data.start.dateTime",
217
+ "type": "string",
218
+ "description": "Echoes what was sent."
219
+ },
220
+ {
221
+ "path": "data.end.dateTime",
222
+ "type": "string",
223
+ "description": "Echoes what was sent."
224
+ },
225
+ {
226
+ "path": "data.created",
227
+ "type": "string",
228
+ "description": "RFC 3339 creation time."
229
+ },
230
+ {
231
+ "path": "data.organizer.email",
232
+ "type": "string",
233
+ "description": "The connected account, almost always."
234
+ },
235
+ {
236
+ "path": "mode",
237
+ "type": "string",
238
+ "description": "Which estate this ran against. Google has no sandbox, so: fake or live."
239
+ }
240
+ ];
241
+ var googleCalendarEventCreateKind = defineConnectorKind(GOOGLE_CALENDAR_EVENT_CREATE_META, {
242
+ name: GOOGLE_CALENDAR_EVENT_CREATE_KIND,
243
+ aliases: ["google_calendar_event_create"],
244
+ label: "Create Google Calendar event",
245
+ description: "Create a timed event on a Google Calendar.",
246
+ inputs: [{ id: "in" }],
247
+ outputs: [{ id: "out" }],
248
+ sideEffects: "unsafe-to-replay",
249
+ outputShape: GOOGLE_CALENDAR_EVENT_CREATE_OUTPUT,
250
+ configSchema: [
251
+ {
252
+ "type": "text",
253
+ "key": "calendarId",
254
+ "label": "Calendar ID",
255
+ "required": true,
256
+ "default": "primary",
257
+ "description": "`primary` for the connected account's own calendar, or a calendar's id."
258
+ },
259
+ {
260
+ "type": "text",
261
+ "key": "summary",
262
+ "label": "Title",
263
+ "required": true
264
+ },
265
+ {
266
+ "type": "textarea",
267
+ "key": "description",
268
+ "label": "Description",
269
+ "description": "Can contain HTML."
270
+ },
271
+ {
272
+ "type": "text",
273
+ "key": "location",
274
+ "label": "Location",
275
+ "description": "Free-form text."
276
+ },
277
+ {
278
+ "type": "text",
279
+ "key": "startDateTime",
280
+ "label": "Start",
281
+ "required": true,
282
+ "description": "RFC 3339, e.g. 2026-10-01T14:00:00Z. Include an offset, or pair with a time zone below."
283
+ },
284
+ {
285
+ "type": "text",
286
+ "key": "startTimeZone",
287
+ "label": "Start time zone",
288
+ "description": "IANA name, e.g. America/New_York. Optional when the start time already carries an offset."
289
+ },
290
+ {
291
+ "type": "text",
292
+ "key": "endDateTime",
293
+ "label": "End",
294
+ "required": true,
295
+ "description": "RFC 3339. Exclusive -- the event ends at, not through, this instant."
296
+ },
297
+ {
298
+ "type": "text",
299
+ "key": "endTimeZone",
300
+ "label": "End time zone"
301
+ },
302
+ {
303
+ "type": "select",
304
+ "key": "status",
305
+ "label": "Status",
306
+ "options": [
307
+ {
308
+ "value": "confirmed",
309
+ "label": "Confirmed"
310
+ },
311
+ {
312
+ "value": "tentative",
313
+ "label": "Tentative"
314
+ }
315
+ ],
316
+ "description": `"cancelled" is not offered here -- that is event_delete's job, not a status this action should be able to set on create.`
317
+ },
318
+ {
319
+ "type": "select",
320
+ "key": "visibility",
321
+ "label": "Visibility",
322
+ "options": [
323
+ {
324
+ "value": "default",
325
+ "label": "Default"
326
+ },
327
+ {
328
+ "value": "public",
329
+ "label": "Public"
330
+ },
331
+ {
332
+ "value": "private",
333
+ "label": "Private"
334
+ }
335
+ ]
336
+ },
337
+ {
338
+ "type": "select",
339
+ "key": "transparency",
340
+ "label": "Show me as",
341
+ "options": [
342
+ {
343
+ "value": "opaque",
344
+ "label": "Busy"
345
+ },
346
+ {
347
+ "value": "transparent",
348
+ "label": "Available"
349
+ }
350
+ ],
351
+ "description": "opaque blocks time on the calendar (Busy); transparent does not (Available)."
352
+ },
353
+ {
354
+ "type": "text",
355
+ "key": "colorId",
356
+ "label": "Color ID",
357
+ "description": "An id from the colors endpoint's event section. Leave blank for the calendar's default."
358
+ }
359
+ ],
360
+ defaultConfig: {
361
+ "mode": "auto"
362
+ },
363
+ renderBody: ({ config }) => summarize(GOOGLE_CALENDAR_EVENT_CREATE_META, config, "create an event")
364
+ });
365
+ var GOOGLE_CALENDAR_EVENT_DELETE_KIND = "@particle-academy/google_calendar_event_delete";
366
+ var GOOGLE_CALENDAR_EVENT_DELETE_OPERATION = "event_delete";
367
+ var GOOGLE_CALENDAR_EVENT_DELETE_META = googleCalendarMeta("action", "delete an event", "https://developers.google.com/workspace/calendar/api/v3/reference/events/delete");
368
+ var GOOGLE_CALENDAR_EVENT_DELETE_OUTPUT = [
369
+ {
370
+ "path": "mode",
371
+ "type": "string",
372
+ "description": "Which estate this ran against. Google answers 204 with no body, so this is the only thing published."
373
+ }
374
+ ];
375
+ var googleCalendarEventDeleteKind = defineConnectorKind(GOOGLE_CALENDAR_EVENT_DELETE_META, {
376
+ name: GOOGLE_CALENDAR_EVENT_DELETE_KIND,
377
+ aliases: ["google_calendar_event_delete"],
378
+ label: "Delete Google Calendar event",
379
+ description: "Remove an event from a Google Calendar.",
380
+ inputs: [{ id: "in" }],
381
+ outputs: [{ id: "out" }],
382
+ sideEffects: "idempotent",
383
+ outputShape: GOOGLE_CALENDAR_EVENT_DELETE_OUTPUT,
384
+ configSchema: [
385
+ {
386
+ "type": "text",
387
+ "key": "calendarId",
388
+ "label": "Calendar ID",
389
+ "required": true,
390
+ "default": "primary"
391
+ },
392
+ {
393
+ "type": "text",
394
+ "key": "eventId",
395
+ "label": "Event ID",
396
+ "required": true,
397
+ "description": "From event_create's data.id, or event_list/event_get."
398
+ }
399
+ ],
400
+ defaultConfig: {
401
+ "mode": "auto"
402
+ },
403
+ renderBody: ({ config }) => summarize(GOOGLE_CALENDAR_EVENT_DELETE_META, config, "delete an event")
404
+ });
191
405
  var GOOGLE_CALENDAR_EVENT_GET_KIND = "@particle-academy/google_calendar_event_get";
192
406
  var GOOGLE_CALENDAR_EVENT_GET_OPERATION = "event_get";
193
407
  var GOOGLE_CALENDAR_EVENT_GET_META = googleCalendarMeta("action", "read an event", "https://developers.google.com/workspace/calendar/api/v3/reference/events/get");
@@ -368,6 +582,177 @@ var googleCalendarEventListKind = defineConnectorKind(GOOGLE_CALENDAR_EVENT_LIST
368
582
  },
369
583
  renderBody: ({ config }) => summarize(GOOGLE_CALENDAR_EVENT_LIST_META, config, "list events")
370
584
  });
585
+ var GOOGLE_CALENDAR_EVENT_UPDATE_KIND = "@particle-academy/google_calendar_event_update";
586
+ var GOOGLE_CALENDAR_EVENT_UPDATE_OPERATION = "event_update";
587
+ var GOOGLE_CALENDAR_EVENT_UPDATE_META = googleCalendarMeta("action", "update an event", "https://developers.google.com/workspace/calendar/api/v3/reference/events/patch");
588
+ var GOOGLE_CALENDAR_EVENT_UPDATE_OUTPUT = [
589
+ {
590
+ "path": "data.id",
591
+ "type": "string",
592
+ "description": "The event's id."
593
+ },
594
+ {
595
+ "path": "data.status",
596
+ "type": "string",
597
+ "description": "The event's status after this update."
598
+ },
599
+ {
600
+ "path": "data.summary",
601
+ "type": "string",
602
+ "description": "The event's title after this update."
603
+ },
604
+ {
605
+ "path": "data.htmlLink",
606
+ "type": "string",
607
+ "description": "The event in the Google Calendar UI."
608
+ },
609
+ {
610
+ "path": "data.start.dateTime",
611
+ "type": "string",
612
+ "description": "The event's start after this update."
613
+ },
614
+ {
615
+ "path": "data.end.dateTime",
616
+ "type": "string",
617
+ "description": "The event's end after this update."
618
+ },
619
+ {
620
+ "path": "data.updated",
621
+ "type": "string",
622
+ "description": "RFC 3339 last modification -- now."
623
+ },
624
+ {
625
+ "path": "mode",
626
+ "type": "string",
627
+ "description": "Which estate this ran against. Google has no sandbox, so: fake or live."
628
+ }
629
+ ];
630
+ var googleCalendarEventUpdateKind = defineConnectorKind(GOOGLE_CALENDAR_EVENT_UPDATE_META, {
631
+ name: GOOGLE_CALENDAR_EVENT_UPDATE_KIND,
632
+ aliases: ["google_calendar_event_update"],
633
+ label: "Update Google Calendar event",
634
+ description: "Change one or more fields of an existing event. Only the fields provided are touched.",
635
+ inputs: [{ id: "in" }],
636
+ outputs: [{ id: "out" }],
637
+ sideEffects: "idempotent",
638
+ outputShape: GOOGLE_CALENDAR_EVENT_UPDATE_OUTPUT,
639
+ configSchema: [
640
+ {
641
+ "type": "text",
642
+ "key": "calendarId",
643
+ "label": "Calendar ID",
644
+ "required": true,
645
+ "default": "primary"
646
+ },
647
+ {
648
+ "type": "text",
649
+ "key": "eventId",
650
+ "label": "Event ID",
651
+ "required": true,
652
+ "description": "From event_create's data.id, or event_list/event_get."
653
+ },
654
+ {
655
+ "type": "text",
656
+ "key": "summary",
657
+ "label": "Title"
658
+ },
659
+ {
660
+ "type": "textarea",
661
+ "key": "description",
662
+ "label": "Description"
663
+ },
664
+ {
665
+ "type": "text",
666
+ "key": "location",
667
+ "label": "Location"
668
+ },
669
+ {
670
+ "type": "text",
671
+ "key": "startDateTime",
672
+ "label": "Start",
673
+ "description": "RFC 3339. Leave blank to leave the start time unchanged."
674
+ },
675
+ {
676
+ "type": "text",
677
+ "key": "startTimeZone",
678
+ "label": "Start time zone"
679
+ },
680
+ {
681
+ "type": "text",
682
+ "key": "endDateTime",
683
+ "label": "End",
684
+ "description": "RFC 3339. Leave blank to leave the end time unchanged."
685
+ },
686
+ {
687
+ "type": "text",
688
+ "key": "endTimeZone",
689
+ "label": "End time zone"
690
+ },
691
+ {
692
+ "type": "select",
693
+ "key": "status",
694
+ "label": "Status",
695
+ "options": [
696
+ {
697
+ "value": "confirmed",
698
+ "label": "Confirmed"
699
+ },
700
+ {
701
+ "value": "tentative",
702
+ "label": "Tentative"
703
+ },
704
+ {
705
+ "value": "cancelled",
706
+ "label": "Cancelled"
707
+ }
708
+ ],
709
+ "description": "Setting cancelled here has the same effect as event_delete -- offered because PATCH is also Google's documented way to cancel one instance of a recurring event, which event_delete (which removes the whole resource) cannot target."
710
+ },
711
+ {
712
+ "type": "select",
713
+ "key": "visibility",
714
+ "label": "Visibility",
715
+ "options": [
716
+ {
717
+ "value": "default",
718
+ "label": "Default"
719
+ },
720
+ {
721
+ "value": "public",
722
+ "label": "Public"
723
+ },
724
+ {
725
+ "value": "private",
726
+ "label": "Private"
727
+ }
728
+ ]
729
+ },
730
+ {
731
+ "type": "select",
732
+ "key": "transparency",
733
+ "label": "Show me as",
734
+ "options": [
735
+ {
736
+ "value": "opaque",
737
+ "label": "Busy"
738
+ },
739
+ {
740
+ "value": "transparent",
741
+ "label": "Available"
742
+ }
743
+ ]
744
+ },
745
+ {
746
+ "type": "text",
747
+ "key": "colorId",
748
+ "label": "Color ID"
749
+ }
750
+ ],
751
+ defaultConfig: {
752
+ "mode": "auto"
753
+ },
754
+ renderBody: ({ config }) => summarize(GOOGLE_CALENDAR_EVENT_UPDATE_META, config, "update an event")
755
+ });
371
756
  var GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_KIND = "@particle-academy/google_calendar_events_changed_trigger";
372
757
  var GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_OPERATION = "events_changed";
373
758
  var GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_META = googleCalendarMeta("trigger", "a calendar change", "https://developers.google.com/workspace/calendar/api/guides/push");
@@ -447,11 +832,14 @@ var googleCalendarEventsChangedTriggerKind = defineConnectorKind(GOOGLE_CALENDAR
447
832
  var GOOGLE_CALENDAR_KINDS = [
448
833
  googleCalendarChannelStopKind,
449
834
  googleCalendarChannelWatchKind,
835
+ googleCalendarEventCreateKind,
836
+ googleCalendarEventDeleteKind,
450
837
  googleCalendarEventGetKind,
451
838
  googleCalendarEventListKind,
839
+ googleCalendarEventUpdateKind,
452
840
  googleCalendarEventsChangedTriggerKind
453
841
  ];
454
842
 
455
- export { CONNECTOR_API_VERSION, GOOGLE_CALENDAR_CHANNEL_STOP_KIND, GOOGLE_CALENDAR_CHANNEL_STOP_META, GOOGLE_CALENDAR_CHANNEL_STOP_OPERATION, GOOGLE_CALENDAR_CHANNEL_STOP_OUTPUT, GOOGLE_CALENDAR_CHANNEL_WATCH_KIND, GOOGLE_CALENDAR_CHANNEL_WATCH_META, GOOGLE_CALENDAR_CHANNEL_WATCH_OPERATION, GOOGLE_CALENDAR_CHANNEL_WATCH_OUTPUT, GOOGLE_CALENDAR_CREDENTIALS, GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_KIND, GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_META, GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_OPERATION, GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_OUTPUT, GOOGLE_CALENDAR_EVENT_GET_KIND, GOOGLE_CALENDAR_EVENT_GET_META, GOOGLE_CALENDAR_EVENT_GET_OPERATION, GOOGLE_CALENDAR_EVENT_GET_OUTPUT, GOOGLE_CALENDAR_EVENT_LIST_KIND, GOOGLE_CALENDAR_EVENT_LIST_META, GOOGLE_CALENDAR_EVENT_LIST_OPERATION, GOOGLE_CALENDAR_EVENT_LIST_OUTPUT, GOOGLE_CALENDAR_KINDS, GOOGLE_CALENDAR_OAUTH, GOOGLE_CALENDAR_SERVICE, googleCalendarChannelStopKind, googleCalendarChannelWatchKind, googleCalendarEventGetKind, googleCalendarEventListKind, googleCalendarEventsChangedTriggerKind, googleCalendarMeta };
843
+ export { CONNECTOR_API_VERSION, GOOGLE_CALENDAR_CHANNEL_STOP_KIND, GOOGLE_CALENDAR_CHANNEL_STOP_META, GOOGLE_CALENDAR_CHANNEL_STOP_OPERATION, GOOGLE_CALENDAR_CHANNEL_STOP_OUTPUT, GOOGLE_CALENDAR_CHANNEL_WATCH_KIND, GOOGLE_CALENDAR_CHANNEL_WATCH_META, GOOGLE_CALENDAR_CHANNEL_WATCH_OPERATION, GOOGLE_CALENDAR_CHANNEL_WATCH_OUTPUT, GOOGLE_CALENDAR_CREDENTIALS, GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_KIND, GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_META, GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_OPERATION, GOOGLE_CALENDAR_EVENTS_CHANGED_TRIGGER_OUTPUT, GOOGLE_CALENDAR_EVENT_CREATE_KIND, GOOGLE_CALENDAR_EVENT_CREATE_META, GOOGLE_CALENDAR_EVENT_CREATE_OPERATION, GOOGLE_CALENDAR_EVENT_CREATE_OUTPUT, GOOGLE_CALENDAR_EVENT_DELETE_KIND, GOOGLE_CALENDAR_EVENT_DELETE_META, GOOGLE_CALENDAR_EVENT_DELETE_OPERATION, GOOGLE_CALENDAR_EVENT_DELETE_OUTPUT, GOOGLE_CALENDAR_EVENT_GET_KIND, GOOGLE_CALENDAR_EVENT_GET_META, GOOGLE_CALENDAR_EVENT_GET_OPERATION, GOOGLE_CALENDAR_EVENT_GET_OUTPUT, GOOGLE_CALENDAR_EVENT_LIST_KIND, GOOGLE_CALENDAR_EVENT_LIST_META, GOOGLE_CALENDAR_EVENT_LIST_OPERATION, GOOGLE_CALENDAR_EVENT_LIST_OUTPUT, GOOGLE_CALENDAR_EVENT_UPDATE_KIND, GOOGLE_CALENDAR_EVENT_UPDATE_META, GOOGLE_CALENDAR_EVENT_UPDATE_OPERATION, GOOGLE_CALENDAR_EVENT_UPDATE_OUTPUT, GOOGLE_CALENDAR_KINDS, GOOGLE_CALENDAR_OAUTH, GOOGLE_CALENDAR_SERVICE, googleCalendarChannelStopKind, googleCalendarChannelWatchKind, googleCalendarEventCreateKind, googleCalendarEventDeleteKind, googleCalendarEventGetKind, googleCalendarEventListKind, googleCalendarEventUpdateKind, googleCalendarEventsChangedTriggerKind, googleCalendarMeta };
456
844
  //# sourceMappingURL=index.js.map
457
845
  //# sourceMappingURL=index.js.map