@squidcloud/google-calendar-client 1.0.407
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/common/src/google-calendar-types.d.ts +150 -0
- package/dist/googlecalendar-client/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -0
- package/dist/googlecalendar-client/src/google-calendar-client.d.ts +48 -0
- package/dist/googlecalendar-client/src/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +27 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth2 scopes (ie level of access) required for Google Calendar integration.
|
|
3
|
+
* Use these scopes when requesting the OAuth2 auth code from Google. Provided here for convenience only.
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
export declare const GOOGLE_CALENDAR_SCOPES: readonly ["openid", "email", "https://www.googleapis.com/auth/calendar.events"];
|
|
7
|
+
/**
|
|
8
|
+
* Request to exchange a Google OAuth2 authorization code for access and refresh tokens, which are then saved in the
|
|
9
|
+
* Squid backend for future use.
|
|
10
|
+
* This is called after the user completes the Google OAuth flow and receives an authorization code.
|
|
11
|
+
*/
|
|
12
|
+
export interface SaveAuthCodeRequest {
|
|
13
|
+
/**
|
|
14
|
+
* OAuth2 authorization code received from Google after user consent.
|
|
15
|
+
* This is a one-time use code that can be exchanged for access/refresh tokens.
|
|
16
|
+
*/
|
|
17
|
+
authCode: string;
|
|
18
|
+
/** The ID of the Google Calendar integration in the Squid console. */
|
|
19
|
+
integrationId: string;
|
|
20
|
+
/**
|
|
21
|
+
* User-specific identifier to associate the tokens with a particular user.
|
|
22
|
+
* This identifier will be used later to retrieve the correct tokens for API calls.
|
|
23
|
+
*/
|
|
24
|
+
identifier: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Represents an attendee of a calendar event
|
|
28
|
+
*/
|
|
29
|
+
export interface CalendarEventAttendee {
|
|
30
|
+
email: string;
|
|
31
|
+
status: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Represents a formatted calendar event with all relevant details
|
|
35
|
+
*/
|
|
36
|
+
export interface CalendarEvent {
|
|
37
|
+
id: string;
|
|
38
|
+
summary: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
start: string;
|
|
41
|
+
end: string;
|
|
42
|
+
location?: string;
|
|
43
|
+
attendees?: Array<CalendarEventAttendee>;
|
|
44
|
+
htmlLink?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Request parameters for retrieving calendar events
|
|
48
|
+
*/
|
|
49
|
+
export interface GetCalendarEventsRequest {
|
|
50
|
+
/** The ID of the Google Calendar integration in the Squid console. */
|
|
51
|
+
integrationId: string;
|
|
52
|
+
/**
|
|
53
|
+
* User-specific identifier to retrieve the correct OAuth tokens.
|
|
54
|
+
*/
|
|
55
|
+
identifier: string;
|
|
56
|
+
/** Start date for the event query. Defaults to today. */
|
|
57
|
+
startDate?: Date;
|
|
58
|
+
/** End date for the event query. Defaults to 7 days from start. */
|
|
59
|
+
endDate?: Date;
|
|
60
|
+
/** Maximum number of events to return. Defaults to 50. */
|
|
61
|
+
maxResults?: number;
|
|
62
|
+
/** Calendar ID to query. Defaults to "primary". */
|
|
63
|
+
calendarId?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Attendee information for a calendar event
|
|
67
|
+
*/
|
|
68
|
+
export interface EventAttendee {
|
|
69
|
+
/** Email address of the attendee */
|
|
70
|
+
email: string;
|
|
71
|
+
/** Display name of the attendee (optional) */
|
|
72
|
+
displayName?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Event reminder/notification
|
|
76
|
+
*/
|
|
77
|
+
export interface EventReminder {
|
|
78
|
+
/** Reminder method: 'email' or 'popup' */
|
|
79
|
+
method: 'email' | 'popup';
|
|
80
|
+
/** Number of minutes before the event when the reminder should trigger */
|
|
81
|
+
minutes: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Recurrence rule frequency
|
|
85
|
+
*/
|
|
86
|
+
export type RecurrenceFrequency = 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY';
|
|
87
|
+
/**
|
|
88
|
+
* Recurrence rule for repeating events
|
|
89
|
+
*/
|
|
90
|
+
export interface RecurrenceRule {
|
|
91
|
+
/** How often the event repeats */
|
|
92
|
+
frequency: RecurrenceFrequency;
|
|
93
|
+
/** Number of occurrences after which to stop repeating. Mutually exclusive with until. */
|
|
94
|
+
count?: number;
|
|
95
|
+
/** Date until which the event repeats. Mutually exclusive with count. */
|
|
96
|
+
until?: Date;
|
|
97
|
+
/** Interval between recurrences (e.g., every 2 weeks). Defaults to 1. */
|
|
98
|
+
interval?: number;
|
|
99
|
+
/** For WEEKLY frequency, which days of the week (e.g., ['MO', 'WE', 'FR']). */
|
|
100
|
+
byDay?: Array<'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'SU'>;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Event visibility settings
|
|
104
|
+
*/
|
|
105
|
+
export type EventVisibility = 'default' | 'public' | 'private';
|
|
106
|
+
/**
|
|
107
|
+
* Request parameters for upserting (creating or updating) a calendar event
|
|
108
|
+
*/
|
|
109
|
+
export interface UpsertCalendarEventRequest {
|
|
110
|
+
/** The ID of the Google Calendar integration in the Squid console. */
|
|
111
|
+
integrationId: string;
|
|
112
|
+
/**
|
|
113
|
+
* User-specific identifier to retrieve the correct OAuth tokens.
|
|
114
|
+
*/
|
|
115
|
+
identifier: string;
|
|
116
|
+
/** Event ID for updating an existing event. If not provided, creates a new event. */
|
|
117
|
+
eventId?: string;
|
|
118
|
+
/** Calendar ID where the event should be created/updated. Defaults to "primary". */
|
|
119
|
+
calendarId?: string;
|
|
120
|
+
/** Title/summary of the event (required) */
|
|
121
|
+
summary: string;
|
|
122
|
+
/** Detailed description of the event (optional) */
|
|
123
|
+
description?: string;
|
|
124
|
+
/** Event start time. For all-day events, use date without time. */
|
|
125
|
+
start: Date;
|
|
126
|
+
/** Event end time. For all-day events, use date without time. */
|
|
127
|
+
end: Date;
|
|
128
|
+
/** Whether this is an all-day event. If true, start/end are treated as dates only. */
|
|
129
|
+
isAllDay?: boolean;
|
|
130
|
+
/** Geographic location of the event as free-form text (optional) */
|
|
131
|
+
location?: string;
|
|
132
|
+
/** List of attendees to invite to the event (optional) */
|
|
133
|
+
attendees?: Array<EventAttendee>;
|
|
134
|
+
/** Timezone for the event (e.g., "America/Los_Angeles"). Defaults to user's calendar timezone. */
|
|
135
|
+
timeZone?: string;
|
|
136
|
+
/** Add Google Meet video conferencing to the event. If true, creates a Google Meet link. */
|
|
137
|
+
addMeetLink?: boolean;
|
|
138
|
+
/** List of reminders/notifications for the event (optional) */
|
|
139
|
+
reminders?: Array<EventReminder>;
|
|
140
|
+
/** Recurrence rule for repeating events (optional) */
|
|
141
|
+
recurrence?: RecurrenceRule;
|
|
142
|
+
/** Visibility of the event. Defaults to "default". */
|
|
143
|
+
visibility?: EventVisibility;
|
|
144
|
+
/** Whether guests can modify the event. Defaults to false. */
|
|
145
|
+
guestsCanModify?: boolean;
|
|
146
|
+
/** Whether guests can invite others. Defaults to true. */
|
|
147
|
+
guestsCanInviteOthers?: boolean;
|
|
148
|
+
/** Whether guests can see other guests. Defaults to true. */
|
|
149
|
+
guestsCanSeeOtherGuests?: boolean;
|
|
150
|
+
}
|