@particle-academy/google-calendar-js 0.0.0 → 0.2.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/CHANGELOG.md +42 -0
- package/LICENSE +21 -0
- package/README.md +209 -2
- package/art/fancified.svg +26 -0
- package/dist/chunk-7CMSUBWQ.js +550 -0
- package/dist/chunk-7CMSUBWQ.js.map +1 -0
- package/dist/flow.cjs +682 -0
- package/dist/flow.cjs.map +1 -0
- package/dist/flow.d.cts +33 -0
- package/dist/flow.d.ts +33 -0
- package/dist/flow.js +130 -0
- package/dist/flow.js.map +1 -0
- package/dist/index.cjs +576 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +398 -0
- package/dist/index.d.ts +398 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +78 -6
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult, TriggerDescriptor, LeaseDeclaration, SharedTokenScheme, InboundDelivery, WebhookVerification } from '@particle-academy/fancy-connector-core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GENERATED FILE — do not edit.
|
|
5
|
+
*
|
|
6
|
+
* Emitted from provider/manifest.json by weaver's generator.
|
|
7
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
8
|
+
* being rejected, because it works until it silently does not. Fix
|
|
9
|
+
* provider/manifest.json (or weaver's template/) and regenerate:
|
|
10
|
+
*
|
|
11
|
+
* npm run provider -- google_calendar
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Google Calendar, as one service descriptor shared by every Google Calendar
|
|
15
|
+
* operation.
|
|
16
|
+
*
|
|
17
|
+
* @particle-academy/fancy-connector-core carries what is true of ALL
|
|
18
|
+
* connectors. This carries what is true of Google Calendar: its base URL, its
|
|
19
|
+
* auth scheme, its idempotency header, and its faker.
|
|
20
|
+
*
|
|
21
|
+
* ## The sandbox trap, written down where it is used
|
|
22
|
+
*
|
|
23
|
+
* Google has no sandbox for Calendar. A test calendar is a real one in a real
|
|
24
|
+
* account, so every watch and every read is real -- point this at a scratch
|
|
25
|
+
* calendar, not a production one. The faker is the only way to develop against
|
|
26
|
+
* it without touching an account.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The connector API version this package was GENERATED against.
|
|
31
|
+
*
|
|
32
|
+
* A literal, never imported. An imported constant lets an upgrade rewrite the
|
|
33
|
+
* very claim it exists to detect, after which the copy agrees with itself
|
|
34
|
+
* forever.
|
|
35
|
+
*/
|
|
36
|
+
declare const CONNECTOR_API_VERSION = 1;
|
|
37
|
+
declare const GOOGLE_CALENDAR_BASE_URLS: {
|
|
38
|
+
readonly live: "https://www.googleapis.com";
|
|
39
|
+
};
|
|
40
|
+
/** Credential keys a remote call cannot proceed without. */
|
|
41
|
+
declare const GOOGLE_CALENDAR_REQUIRES: readonly ["accessToken", "refreshToken", "clientId", "clientSecret"];
|
|
42
|
+
/**
|
|
43
|
+
* Apply Google Calendar's auth scheme to an outgoing request.
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
*
|
|
47
|
+
* The mode is passed in because for some providers auth and estate are the
|
|
48
|
+
* same decision expressed in the URL; here it is unused, and saying so is
|
|
49
|
+
* cheaper than wondering later whether it was forgotten.
|
|
50
|
+
*/
|
|
51
|
+
declare function googleCalendarAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
|
|
52
|
+
/** The Google Calendar service, for the TypeScript runtime. */
|
|
53
|
+
declare const GOOGLE_CALENDAR: ServiceDescriptor;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* GENERATED FILE — do not edit.
|
|
57
|
+
*
|
|
58
|
+
* Emitted from provider/fixtures/ by weaver's generator.
|
|
59
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
60
|
+
* being rejected, because it works until it silently does not. Fix
|
|
61
|
+
* provider/fixtures/ (or weaver's template/) and regenerate:
|
|
62
|
+
*
|
|
63
|
+
* npm run provider -- google_calendar
|
|
64
|
+
*/
|
|
65
|
+
/**
|
|
66
|
+
* The Google Calendar faker.
|
|
67
|
+
*
|
|
68
|
+
* Shapes, not behaviour: the goal is that a downstream node sees the field
|
|
69
|
+
* NAMES Google Calendar actually publishes, so an author can wire {{
|
|
70
|
+
* $json.data.id }} against a fake and have it keep working against the real
|
|
71
|
+
* thing.
|
|
72
|
+
*
|
|
73
|
+
* Deterministic — same inputs, same output. A faker returning a fresh uuid
|
|
74
|
+
* every call cannot be asserted on, so its fixtures degrade to "it did not
|
|
75
|
+
* throw", which is the assertion that catches nothing.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
declare const googleCalendarFaker: ConnectorFaker;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* GENERATED FILE — do not edit.
|
|
82
|
+
*
|
|
83
|
+
* Emitted from provider/actions/channel-stop.json by weaver's generator.
|
|
84
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
85
|
+
* being rejected, because it works until it silently does not. Fix
|
|
86
|
+
* provider/actions/channel-stop.json (or weaver's template/) and regenerate:
|
|
87
|
+
*
|
|
88
|
+
* npm run provider -- google_calendar
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* Close a push-notification channel. The host's subscription machinery calls
|
|
92
|
+
* this before re-creating a channel and when a trigger is removed.
|
|
93
|
+
*
|
|
94
|
+
* POST /calendar/v3/channels/stop —
|
|
95
|
+
* https://developers.google.com/workspace/calendar/api/v3/reference/channels/stop
|
|
96
|
+
*
|
|
97
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
98
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
99
|
+
* connection, picks the estate, and either calls Google Calendar or calls the
|
|
100
|
+
* faker.
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
declare const CHANNEL_STOP_OPERATION = "channel_stop";
|
|
104
|
+
type ChannelStopOptions = {
|
|
105
|
+
/** The node's resolved config. Keys: channelId, resourceId. */
|
|
106
|
+
config: Record<string, unknown>;
|
|
107
|
+
credentials?: Record<string, string | undefined>;
|
|
108
|
+
mode?: RequestedMode;
|
|
109
|
+
connectionId?: string | null;
|
|
110
|
+
input?: unknown;
|
|
111
|
+
attempts?: number;
|
|
112
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
113
|
+
transport?: Transport;
|
|
114
|
+
};
|
|
115
|
+
declare function googleCalendarChannelStop(options: ChannelStopOptions): Promise<ConnectorResult>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* GENERATED FILE — do not edit.
|
|
119
|
+
*
|
|
120
|
+
* Emitted from provider/actions/channel-watch.json by weaver's generator.
|
|
121
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
122
|
+
* being rejected, because it works until it silently does not. Fix
|
|
123
|
+
* provider/actions/channel-watch.json (or weaver's template/) and regenerate:
|
|
124
|
+
*
|
|
125
|
+
* npm run provider -- google_calendar
|
|
126
|
+
*/
|
|
127
|
+
/**
|
|
128
|
+
* Open a push-notification channel on a calendar's events. The host's
|
|
129
|
+
* subscription machinery calls this; it is not a node most workflows need.
|
|
130
|
+
*
|
|
131
|
+
* POST /calendar/v3/calendars/{calendarId}/events/watch —
|
|
132
|
+
* https://developers.google.com/workspace/calendar/api/v3/reference/events/watch
|
|
133
|
+
*
|
|
134
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
135
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
136
|
+
* connection, picks the estate, and either calls Google Calendar or calls the
|
|
137
|
+
* faker.
|
|
138
|
+
*
|
|
139
|
+
* sideEffects: unsafe-to-replay.
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
declare const CHANNEL_WATCH_OPERATION = "channel_watch";
|
|
143
|
+
type ChannelWatchOptions = {
|
|
144
|
+
/** The node's resolved config. Keys: calendarId, channelId, address, token, ttlSeconds. */
|
|
145
|
+
config: Record<string, unknown>;
|
|
146
|
+
credentials?: Record<string, string | undefined>;
|
|
147
|
+
mode?: RequestedMode;
|
|
148
|
+
connectionId?: string | null;
|
|
149
|
+
input?: unknown;
|
|
150
|
+
attempts?: number;
|
|
151
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
152
|
+
transport?: Transport;
|
|
153
|
+
};
|
|
154
|
+
declare function googleCalendarChannelWatch(options: ChannelWatchOptions): Promise<ConnectorResult>;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* GENERATED FILE — do not edit.
|
|
158
|
+
*
|
|
159
|
+
* Emitted from provider/actions/event-create.json by weaver's generator.
|
|
160
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
161
|
+
* being rejected, because it works until it silently does not. Fix
|
|
162
|
+
* provider/actions/event-create.json (or weaver's template/) and regenerate:
|
|
163
|
+
*
|
|
164
|
+
* npm run provider -- google_calendar
|
|
165
|
+
*/
|
|
166
|
+
/**
|
|
167
|
+
* Create a timed event on a Google Calendar.
|
|
168
|
+
*
|
|
169
|
+
* POST /calendar/v3/calendars/{calendarId}/events —
|
|
170
|
+
* https://developers.google.com/workspace/calendar/api/v3/reference/events/insert
|
|
171
|
+
*
|
|
172
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
173
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
174
|
+
* connection, picks the estate, and either calls Google Calendar or calls the
|
|
175
|
+
* faker.
|
|
176
|
+
*
|
|
177
|
+
* sideEffects: unsafe-to-replay.
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
declare const EVENT_CREATE_OPERATION = "event_create";
|
|
181
|
+
type EventCreateOptions = {
|
|
182
|
+
/** The node's resolved config. Keys: calendarId, summary, description, location, startDateTime, startTimeZone, endDateTime, endTimeZone, status, visibility, transparency, colorId. */
|
|
183
|
+
config: Record<string, unknown>;
|
|
184
|
+
credentials?: Record<string, string | undefined>;
|
|
185
|
+
mode?: RequestedMode;
|
|
186
|
+
connectionId?: string | null;
|
|
187
|
+
input?: unknown;
|
|
188
|
+
attempts?: number;
|
|
189
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
190
|
+
transport?: Transport;
|
|
191
|
+
};
|
|
192
|
+
declare function googleCalendarEventCreate(options: EventCreateOptions): Promise<ConnectorResult>;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* GENERATED FILE — do not edit.
|
|
196
|
+
*
|
|
197
|
+
* Emitted from provider/actions/event-delete.json by weaver's generator.
|
|
198
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
199
|
+
* being rejected, because it works until it silently does not. Fix
|
|
200
|
+
* provider/actions/event-delete.json (or weaver's template/) and regenerate:
|
|
201
|
+
*
|
|
202
|
+
* npm run provider -- google_calendar
|
|
203
|
+
*/
|
|
204
|
+
/**
|
|
205
|
+
* Remove an event from a Google Calendar.
|
|
206
|
+
*
|
|
207
|
+
* DELETE /calendar/v3/calendars/{calendarId}/events/{eventId} —
|
|
208
|
+
* https://developers.google.com/workspace/calendar/api/v3/reference/events/delete
|
|
209
|
+
*
|
|
210
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
211
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
212
|
+
* connection, picks the estate, and either calls Google Calendar or calls the
|
|
213
|
+
* faker.
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
declare const EVENT_DELETE_OPERATION = "event_delete";
|
|
217
|
+
type EventDeleteOptions = {
|
|
218
|
+
/** The node's resolved config. Keys: calendarId, eventId. */
|
|
219
|
+
config: Record<string, unknown>;
|
|
220
|
+
credentials?: Record<string, string | undefined>;
|
|
221
|
+
mode?: RequestedMode;
|
|
222
|
+
connectionId?: string | null;
|
|
223
|
+
input?: unknown;
|
|
224
|
+
attempts?: number;
|
|
225
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
226
|
+
transport?: Transport;
|
|
227
|
+
};
|
|
228
|
+
declare function googleCalendarEventDelete(options: EventDeleteOptions): Promise<ConnectorResult>;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* GENERATED FILE — do not edit.
|
|
232
|
+
*
|
|
233
|
+
* Emitted from provider/actions/event-get.json by weaver's generator.
|
|
234
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
235
|
+
* being rejected, because it works until it silently does not. Fix
|
|
236
|
+
* provider/actions/event-get.json (or weaver's template/) and regenerate:
|
|
237
|
+
*
|
|
238
|
+
* npm run provider -- google_calendar
|
|
239
|
+
*/
|
|
240
|
+
/**
|
|
241
|
+
* Read one event from a Google Calendar.
|
|
242
|
+
*
|
|
243
|
+
* GET /calendar/v3/calendars/{calendarId}/events/{eventId} —
|
|
244
|
+
* https://developers.google.com/workspace/calendar/api/v3/reference/events/get
|
|
245
|
+
*
|
|
246
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
247
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
248
|
+
* connection, picks the estate, and either calls Google Calendar or calls the
|
|
249
|
+
* faker.
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
declare const EVENT_GET_OPERATION = "event_get";
|
|
253
|
+
type EventGetOptions = {
|
|
254
|
+
/** The node's resolved config. Keys: calendarId, eventId. */
|
|
255
|
+
config: Record<string, unknown>;
|
|
256
|
+
credentials?: Record<string, string | undefined>;
|
|
257
|
+
mode?: RequestedMode;
|
|
258
|
+
connectionId?: string | null;
|
|
259
|
+
input?: unknown;
|
|
260
|
+
attempts?: number;
|
|
261
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
262
|
+
transport?: Transport;
|
|
263
|
+
};
|
|
264
|
+
declare function googleCalendarEventGet(options: EventGetOptions): Promise<ConnectorResult>;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* GENERATED FILE — do not edit.
|
|
268
|
+
*
|
|
269
|
+
* Emitted from provider/actions/event-list.json by weaver's generator.
|
|
270
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
271
|
+
* being rejected, because it works until it silently does not. Fix
|
|
272
|
+
* provider/actions/event-list.json (or weaver's template/) and regenerate:
|
|
273
|
+
*
|
|
274
|
+
* npm run provider -- google_calendar
|
|
275
|
+
*/
|
|
276
|
+
/**
|
|
277
|
+
* List events from a Google Calendar, in full or incrementally with a sync
|
|
278
|
+
* token.
|
|
279
|
+
*
|
|
280
|
+
* GET /calendar/v3/calendars/{calendarId}/events —
|
|
281
|
+
* https://developers.google.com/workspace/calendar/api/v3/reference/events/list
|
|
282
|
+
*
|
|
283
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
284
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
285
|
+
* connection, picks the estate, and either calls Google Calendar or calls the
|
|
286
|
+
* faker.
|
|
287
|
+
*/
|
|
288
|
+
|
|
289
|
+
declare const EVENT_LIST_OPERATION = "event_list";
|
|
290
|
+
type EventListOptions = {
|
|
291
|
+
/** The node's resolved config. Keys: calendarId, syncToken, timeMin, timeMax, maxResults, pageToken, singleEvents. */
|
|
292
|
+
config: Record<string, unknown>;
|
|
293
|
+
credentials?: Record<string, string | undefined>;
|
|
294
|
+
mode?: RequestedMode;
|
|
295
|
+
connectionId?: string | null;
|
|
296
|
+
input?: unknown;
|
|
297
|
+
attempts?: number;
|
|
298
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
299
|
+
transport?: Transport;
|
|
300
|
+
};
|
|
301
|
+
declare function googleCalendarEventList(options: EventListOptions): Promise<ConnectorResult>;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* GENERATED FILE — do not edit.
|
|
305
|
+
*
|
|
306
|
+
* Emitted from provider/actions/event-update.json by weaver's generator.
|
|
307
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
308
|
+
* being rejected, because it works until it silently does not. Fix
|
|
309
|
+
* provider/actions/event-update.json (or weaver's template/) and regenerate:
|
|
310
|
+
*
|
|
311
|
+
* npm run provider -- google_calendar
|
|
312
|
+
*/
|
|
313
|
+
/**
|
|
314
|
+
* Change one or more fields of an existing event. Only the fields provided are
|
|
315
|
+
* touched.
|
|
316
|
+
*
|
|
317
|
+
* PATCH /calendar/v3/calendars/{calendarId}/events/{eventId} —
|
|
318
|
+
* https://developers.google.com/workspace/calendar/api/v3/reference/events/patch
|
|
319
|
+
*
|
|
320
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
321
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
322
|
+
* connection, picks the estate, and either calls Google Calendar or calls the
|
|
323
|
+
* faker.
|
|
324
|
+
*/
|
|
325
|
+
|
|
326
|
+
declare const EVENT_UPDATE_OPERATION = "event_update";
|
|
327
|
+
type EventUpdateOptions = {
|
|
328
|
+
/** The node's resolved config. Keys: calendarId, eventId, summary, description, location, startDateTime, startTimeZone, endDateTime, endTimeZone, status, visibility, transparency, colorId. */
|
|
329
|
+
config: Record<string, unknown>;
|
|
330
|
+
credentials?: Record<string, string | undefined>;
|
|
331
|
+
mode?: RequestedMode;
|
|
332
|
+
connectionId?: string | null;
|
|
333
|
+
input?: unknown;
|
|
334
|
+
attempts?: number;
|
|
335
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
336
|
+
transport?: Transport;
|
|
337
|
+
};
|
|
338
|
+
declare function googleCalendarEventUpdate(options: EventUpdateOptions): Promise<ConnectorResult>;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* GENERATED FILE — do not edit.
|
|
342
|
+
*
|
|
343
|
+
* Emitted from provider/triggers/events-changed.json by weaver's generator.
|
|
344
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
345
|
+
* being rejected, because it works until it silently does not. Fix
|
|
346
|
+
* provider/triggers/events-changed.json (or weaver's template/) and regenerate:
|
|
347
|
+
*
|
|
348
|
+
* npm run provider -- google_calendar
|
|
349
|
+
*/
|
|
350
|
+
/**
|
|
351
|
+
* Google Calendar's subscription trigger — the delivery contract.
|
|
352
|
+
*
|
|
353
|
+
* Kept beside the service descriptor rather than inside a node, because the
|
|
354
|
+
* way a delivery is verified is a fact about GOOGLE CALENDAR. Two Google
|
|
355
|
+
* Calendar triggers must not be able to disagree about how a delivery is
|
|
356
|
+
* verified.
|
|
357
|
+
*
|
|
358
|
+
* A SUBSCRIPTION: Google Calendar stops delivering unless somebody renews it,
|
|
359
|
+
* forever, and if nobody does the workflow stops firing with no error
|
|
360
|
+
* anywhere. The lease below says where the expiry is read from and how early
|
|
361
|
+
* to renew; the host runs ONE renewal scheduler for every expiring trigger.
|
|
362
|
+
*/
|
|
363
|
+
|
|
364
|
+
/** Where Google Calendar echoes the token it was given when the subscription was created. */
|
|
365
|
+
declare const GOOGLE_CALENDAR_EVENTS_CHANGED_TOKEN_SCHEME: SharedTokenScheme;
|
|
366
|
+
/**
|
|
367
|
+
* The lease this subscription carries: where the provider's expiry sits in the
|
|
368
|
+
* `channel_watch` response (`expiration`, epoch-ms), how early the host
|
|
369
|
+
* renews, and what it calls when the lease is due — the create again, because
|
|
370
|
+
* Google Calendar cannot renew. The host builds the value with the core's
|
|
371
|
+
* `leaseFromResponse` and runs one scheduler for every expiring trigger.
|
|
372
|
+
*/
|
|
373
|
+
declare const GOOGLE_CALENDAR_EVENTS_CHANGED_LEASE: LeaseDeclaration;
|
|
374
|
+
/**
|
|
375
|
+
* Which of this package's actions create, renew and stop the subscription.
|
|
376
|
+
* `renew` is null where the provider cannot renew and the host calls create
|
|
377
|
+
* again — after stopping the old one, and after re-listing, because
|
|
378
|
+
* notifications during the gap are gone.
|
|
379
|
+
*/
|
|
380
|
+
declare const GOOGLE_CALENDAR_EVENTS_CHANGED_SUBSCRIPTION: {
|
|
381
|
+
readonly create: "channel_watch";
|
|
382
|
+
readonly renew: null;
|
|
383
|
+
readonly stop: "channel_stop";
|
|
384
|
+
};
|
|
385
|
+
declare const GOOGLE_CALENDAR_EVENTS_CHANGED: TriggerDescriptor;
|
|
386
|
+
/**
|
|
387
|
+
* Verify one inbound Google Calendar delivery.
|
|
388
|
+
*
|
|
389
|
+
* The host calls this BEFORE starting a run, with the body exactly as
|
|
390
|
+
* received. Re-serialised JSON changes key order and whitespace, and produces
|
|
391
|
+
* a mismatch that looks precisely like a wrong secret — hours of debugging the
|
|
392
|
+
* wrong thing.
|
|
393
|
+
*
|
|
394
|
+
* The secret is the connection's `channelToken`.
|
|
395
|
+
*/
|
|
396
|
+
declare function verifyGoogleCalendarDelivery(delivery: InboundDelivery, channelToken: string | undefined, now?: number): Promise<WebhookVerification>;
|
|
397
|
+
|
|
398
|
+
export { CHANNEL_STOP_OPERATION, CHANNEL_WATCH_OPERATION, CONNECTOR_API_VERSION, type ChannelStopOptions, type ChannelWatchOptions, EVENT_CREATE_OPERATION, EVENT_DELETE_OPERATION, EVENT_GET_OPERATION, EVENT_LIST_OPERATION, EVENT_UPDATE_OPERATION, type EventCreateOptions, type EventDeleteOptions, type EventGetOptions, type EventListOptions, type EventUpdateOptions, GOOGLE_CALENDAR, GOOGLE_CALENDAR_BASE_URLS, GOOGLE_CALENDAR_EVENTS_CHANGED, GOOGLE_CALENDAR_EVENTS_CHANGED_LEASE, GOOGLE_CALENDAR_EVENTS_CHANGED_SUBSCRIPTION, GOOGLE_CALENDAR_EVENTS_CHANGED_TOKEN_SCHEME, GOOGLE_CALENDAR_REQUIRES, googleCalendarAuthorize, googleCalendarChannelStop, googleCalendarChannelWatch, googleCalendarEventCreate, googleCalendarEventDelete, googleCalendarEventGet, googleCalendarEventList, googleCalendarEventUpdate, googleCalendarFaker, verifyGoogleCalendarDelivery };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CHANNEL_STOP_OPERATION, CHANNEL_WATCH_OPERATION, CONNECTOR_API_VERSION, EVENT_CREATE_OPERATION, EVENT_DELETE_OPERATION, EVENT_GET_OPERATION, EVENT_LIST_OPERATION, EVENT_UPDATE_OPERATION, GOOGLE_CALENDAR, GOOGLE_CALENDAR_BASE_URLS, GOOGLE_CALENDAR_EVENTS_CHANGED, GOOGLE_CALENDAR_EVENTS_CHANGED_LEASE, GOOGLE_CALENDAR_EVENTS_CHANGED_SUBSCRIPTION, GOOGLE_CALENDAR_EVENTS_CHANGED_TOKEN_SCHEME, GOOGLE_CALENDAR_REQUIRES, googleCalendarAuthorize, googleCalendarChannelStop, googleCalendarChannelWatch, googleCalendarEventCreate, googleCalendarEventDelete, googleCalendarEventGet, googleCalendarEventList, googleCalendarEventUpdate, googleCalendarFaker, verifyGoogleCalendarDelivery } from './chunk-7CMSUBWQ.js';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,90 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/google-calendar-js",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Google Calendar for Node — the service descriptor, its faker, its webhook verification, and one function per operation. Plain HTTP on @particle-academy/fancy-connector-core; no vendor SDK.",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
7
|
"url": "git+https://github.com/Fancy-Friends/google-calendar.git",
|
|
9
8
|
"directory": "packages/js"
|
|
10
9
|
},
|
|
11
10
|
"homepage": "https://github.com/Fancy-Friends/google-calendar#readme",
|
|
11
|
+
"bugs": "https://github.com/Fancy-Friends/google-calendar/issues",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
|
+
"module": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"require": {
|
|
23
|
+
"types": "./dist/index.d.cts",
|
|
24
|
+
"default": "./dist/index.cjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"./flow": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/flow.d.ts",
|
|
30
|
+
"default": "./dist/flow.js"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/flow.d.cts",
|
|
34
|
+
"default": "./dist/flow.cjs"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"./package.json": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"art",
|
|
42
|
+
"README.md",
|
|
43
|
+
"CHANGELOG.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsup",
|
|
48
|
+
"lint": "tsc --noEmit",
|
|
49
|
+
"test": "node --import tsx --test tests/*.test.ts",
|
|
50
|
+
"prepublishOnly": "tsup"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@particle-academy/fancy-connector-core": ">=0.8.0 <2.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@particle-academy/fancy-flow": ">=0.47.1 <2.0",
|
|
57
|
+
"@particle-academy/google-calendar-ui": ">=0.2.0 <0.3.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"@particle-academy/fancy-flow": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"@particle-academy/google-calendar-ui": {
|
|
64
|
+
"optional": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@particle-academy/fancy-flow": ">=0.47.1 <2.0",
|
|
69
|
+
"@types/node": "^26.2.0",
|
|
70
|
+
"tsup": "^8.5.0",
|
|
71
|
+
"tsx": "^4.19.0",
|
|
72
|
+
"typescript": "^5.8.0"
|
|
73
|
+
},
|
|
12
74
|
"publishConfig": {
|
|
13
75
|
"access": "public"
|
|
14
76
|
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
77
|
+
"keywords": [
|
|
78
|
+
"google_calendar",
|
|
79
|
+
"calendar",
|
|
80
|
+
"connector",
|
|
81
|
+
"api",
|
|
82
|
+
"fancy-ui",
|
|
83
|
+
"particle-academy"
|
|
84
|
+
],
|
|
85
|
+
"license": "MIT",
|
|
86
|
+
"sideEffects": false,
|
|
87
|
+
"engines": {
|
|
88
|
+
"node": ">=22"
|
|
89
|
+
}
|
|
18
90
|
}
|